/*
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
if you want to view the source, please visit the github repository of this plugin
https://github.com/joethei/obisidian-rss
*/
var __create = Object.create;
var __defProp = Object.defineProperty;
var __defProps = Object.defineProperties;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __propIsEnum = Object.prototype.propertyIsEnumerable;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues = (a, b) => {
for (var prop in b || (b = {}))
if (__hasOwnProp.call(b, prop))
__defNormalProp(a, prop, b[prop]);
if (__getOwnPropSymbols)
for (var prop of __getOwnPropSymbols(b)) {
if (__propIsEnum.call(b, prop))
__defNormalProp(a, prop, b[prop]);
}
return a;
};
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
var __commonJS = (cb, mod) => function __require() {
return mod || (0, cb[Object.keys(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
};
var __export = (target, all) => {
__markAsModule(target);
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __reExport = (target, module2, desc) => {
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
for (let key of __getOwnPropNames(module2))
if (!__hasOwnProp.call(target, key) && key !== "default")
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
}
return target;
};
var __toModule = (module2) => {
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", module2 && module2.__esModule && "default" in module2 ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
};
var __async = (__this, __arguments, generator) => {
return new Promise((resolve, reject) => {
var fulfilled = (value) => {
try {
step(generator.next(value));
} catch (e) {
reject(e);
}
};
var rejected = (value) => {
try {
step(generator.throw(value));
} catch (e) {
reject(e);
}
};
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
step((generator = generator.apply(__this, __arguments)).next());
});
};
// node_modules/tslib/tslib.js
var require_tslib = __commonJS({
"node_modules/tslib/tslib.js"(exports, module2) {
var __extends2;
var __assign2;
var __rest2;
var __decorate2;
var __param2;
var __metadata2;
var __awaiter2;
var __generator2;
var __exportStar2;
var __values2;
var __read2;
var __spread2;
var __spreadArrays2;
var __spreadArray2;
var __await2;
var __asyncGenerator2;
var __asyncDelegator2;
var __asyncValues2;
var __makeTemplateObject2;
var __importStar2;
var __importDefault2;
var __classPrivateFieldGet2;
var __classPrivateFieldSet2;
var __createBinding2;
(function(factory) {
var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {};
if (typeof define === "function" && define.amd) {
define("tslib", ["exports"], function(exports2) {
factory(createExporter(root, createExporter(exports2)));
});
} else if (typeof module2 === "object" && typeof module2.exports === "object") {
factory(createExporter(root, createExporter(module2.exports)));
} else {
factory(createExporter(root));
}
function createExporter(exports2, previous) {
if (exports2 !== root) {
if (typeof Object.create === "function") {
Object.defineProperty(exports2, "__esModule", { value: true });
} else {
exports2.__esModule = true;
}
}
return function(id, v) {
return exports2[id] = previous ? previous(id, v) : v;
};
}
})(function(exporter) {
var extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d, b) {
d.__proto__ = b;
} || function(d, b) {
for (var p in b)
if (Object.prototype.hasOwnProperty.call(b, p))
d[p] = b[p];
};
__extends2 = function(d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() {
this.constructor = d;
}
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
__assign2 = Object.assign || function(t2) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s)
if (Object.prototype.hasOwnProperty.call(s, p))
t2[p] = s[p];
}
return t2;
};
__rest2 = function(s, e) {
var t2 = {};
for (var p in s)
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
t2[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function")
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
t2[p[i]] = s[p[i]];
}
return t2;
};
__decorate2 = function(decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
r = Reflect.decorate(decorators, target, key, desc);
else
for (var i = decorators.length - 1; i >= 0; i--)
if (d = decorators[i])
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
__param2 = function(paramIndex, decorator) {
return function(target, key) {
decorator(target, key, paramIndex);
};
};
__metadata2 = function(metadataKey, metadataValue) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
return Reflect.metadata(metadataKey, metadataValue);
};
__awaiter2 = function(thisArg, _arguments, P, generator) {
function adopt(value) {
return value instanceof P ? value : new P(function(resolve) {
resolve(value);
});
}
return new (P || (P = Promise))(function(resolve, reject) {
function fulfilled(value) {
try {
step(generator.next(value));
} catch (e) {
reject(e);
}
}
function rejected(value) {
try {
step(generator["throw"](value));
} catch (e) {
reject(e);
}
}
function step(result) {
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
}
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
__generator2 = function(thisArg, body) {
var _ = { label: 0, sent: function() {
if (t2[0] & 1)
throw t2[1];
return t2[1];
}, trys: [], ops: [] }, f, y, t2, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
return this;
}), g;
function verb(n) {
return function(v) {
return step([n, v]);
};
}
function step(op) {
if (f)
throw new TypeError("Generator is already executing.");
while (_)
try {
if (f = 1, y && (t2 = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t2 = y["return"]) && t2.call(y), 0) : y.next) && !(t2 = t2.call(y, op[1])).done)
return t2;
if (y = 0, t2)
op = [op[0] & 2, t2.value];
switch (op[0]) {
case 0:
case 1:
t2 = op;
break;
case 4:
_.label++;
return { value: op[1], done: false };
case 5:
_.label++;
y = op[1];
op = [0];
continue;
case 7:
op = _.ops.pop();
_.trys.pop();
continue;
default:
if (!(t2 = _.trys, t2 = t2.length > 0 && t2[t2.length - 1]) && (op[0] === 6 || op[0] === 2)) {
_ = 0;
continue;
}
if (op[0] === 3 && (!t2 || op[1] > t2[0] && op[1] < t2[3])) {
_.label = op[1];
break;
}
if (op[0] === 6 && _.label < t2[1]) {
_.label = t2[1];
t2 = op;
break;
}
if (t2 && _.label < t2[2]) {
_.label = t2[2];
_.ops.push(op);
break;
}
if (t2[2])
_.ops.pop();
_.trys.pop();
continue;
}
op = body.call(thisArg, _);
} catch (e) {
op = [6, e];
y = 0;
} finally {
f = t2 = 0;
}
if (op[0] & 5)
throw op[1];
return { value: op[0] ? op[1] : void 0, done: true };
}
};
__exportStar2 = function(m, o) {
for (var p in m)
if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
__createBinding2(o, m, p);
};
__createBinding2 = Object.create ? function(o, m, k, k2) {
if (k2 === void 0)
k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() {
return m[k];
} });
} : function(o, m, k, k2) {
if (k2 === void 0)
k2 = k;
o[k2] = m[k];
};
__values2 = function(o) {
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
if (m)
return m.call(o);
if (o && typeof o.length === "number")
return {
next: function() {
if (o && i >= o.length)
o = void 0;
return { value: o && o[i++], done: !o };
}
};
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
};
__read2 = function(o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m)
return o;
var i = m.call(o), r, ar = [], e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
ar.push(r.value);
} catch (error) {
e = { error };
} finally {
try {
if (r && !r.done && (m = i["return"]))
m.call(i);
} finally {
if (e)
throw e.error;
}
}
return ar;
};
__spread2 = function() {
for (var ar = [], i = 0; i < arguments.length; i++)
ar = ar.concat(__read2(arguments[i]));
return ar;
};
__spreadArrays2 = function() {
for (var s = 0, i = 0, il = arguments.length; i < il; i++)
s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
};
__spreadArray2 = function(to, from, pack) {
if (pack || arguments.length === 2)
for (var i = 0, l = from.length, ar; i < l; i++) {
if (ar || !(i in from)) {
if (!ar)
ar = Array.prototype.slice.call(from, 0, i);
ar[i] = from[i];
}
}
return to.concat(ar || Array.prototype.slice.call(from));
};
__await2 = function(v) {
return this instanceof __await2 ? (this.v = v, this) : new __await2(v);
};
__asyncGenerator2 = function(thisArg, _arguments, generator) {
if (!Symbol.asyncIterator)
throw new TypeError("Symbol.asyncIterator is not defined.");
var g = generator.apply(thisArg, _arguments || []), i, q = [];
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() {
return this;
}, i;
function verb(n) {
if (g[n])
i[n] = function(v) {
return new Promise(function(a, b) {
q.push([n, v, a, b]) > 1 || resume(n, v);
});
};
}
function resume(n, v) {
try {
step(g[n](v));
} catch (e) {
settle(q[0][3], e);
}
}
function step(r) {
r.value instanceof __await2 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r);
}
function fulfill(value) {
resume("next", value);
}
function reject(value) {
resume("throw", value);
}
function settle(f, v) {
if (f(v), q.shift(), q.length)
resume(q[0][0], q[0][1]);
}
};
__asyncDelegator2 = function(o) {
var i, p;
return i = {}, verb("next"), verb("throw", function(e) {
throw e;
}), verb("return"), i[Symbol.iterator] = function() {
return this;
}, i;
function verb(n, f) {
i[n] = o[n] ? function(v) {
return (p = !p) ? { value: __await2(o[n](v)), done: n === "return" } : f ? f(v) : v;
} : f;
}
};
__asyncValues2 = function(o) {
if (!Symbol.asyncIterator)
throw new TypeError("Symbol.asyncIterator is not defined.");
var m = o[Symbol.asyncIterator], i;
return m ? m.call(o) : (o = typeof __values2 === "function" ? __values2(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() {
return this;
}, i);
function verb(n) {
i[n] = o[n] && function(v) {
return new Promise(function(resolve, reject) {
v = o[n](v), settle(resolve, reject, v.done, v.value);
});
};
}
function settle(resolve, reject, d, v) {
Promise.resolve(v).then(function(v2) {
resolve({ value: v2, done: d });
}, reject);
}
};
__makeTemplateObject2 = function(cooked, raw) {
if (Object.defineProperty) {
Object.defineProperty(cooked, "raw", { value: raw });
} else {
cooked.raw = raw;
}
return cooked;
};
var __setModuleDefault = Object.create ? function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
} : function(o, v) {
o["default"] = v;
};
__importStar2 = function(mod) {
if (mod && mod.__esModule)
return mod;
var result = {};
if (mod != null) {
for (var k in mod)
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
__createBinding2(result, mod, k);
}
__setModuleDefault(result, mod);
return result;
};
__importDefault2 = function(mod) {
return mod && mod.__esModule ? mod : { "default": mod };
};
__classPrivateFieldGet2 = function(receiver, state, kind, f) {
if (kind === "a" && !f)
throw new TypeError("Private accessor was defined without a getter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
throw new TypeError("Cannot read private member from an object whose class did not declare it");
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
};
__classPrivateFieldSet2 = function(receiver, state, value, kind, f) {
if (kind === "m")
throw new TypeError("Private method is not writable");
if (kind === "a" && !f)
throw new TypeError("Private accessor was defined without a setter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
throw new TypeError("Cannot write private member to an object whose class did not declare it");
return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;
};
exporter("__extends", __extends2);
exporter("__assign", __assign2);
exporter("__rest", __rest2);
exporter("__decorate", __decorate2);
exporter("__param", __param2);
exporter("__metadata", __metadata2);
exporter("__awaiter", __awaiter2);
exporter("__generator", __generator2);
exporter("__exportStar", __exportStar2);
exporter("__createBinding", __createBinding2);
exporter("__values", __values2);
exporter("__read", __read2);
exporter("__spread", __spread2);
exporter("__spreadArrays", __spreadArrays2);
exporter("__spreadArray", __spreadArray2);
exporter("__await", __await2);
exporter("__asyncGenerator", __asyncGenerator2);
exporter("__asyncDelegator", __asyncDelegator2);
exporter("__asyncValues", __asyncValues2);
exporter("__makeTemplateObject", __makeTemplateObject2);
exporter("__importStar", __importStar2);
exporter("__importDefault", __importDefault2);
exporter("__classPrivateFieldGet", __classPrivateFieldGet2);
exporter("__classPrivateFieldSet", __classPrivateFieldSet2);
});
}
});
// node_modules/feather-icons/dist/feather.js
var require_feather = __commonJS({
"node_modules/feather-icons/dist/feather.js"(exports, module2) {
(function webpackUniversalModuleDefinition(root, factory) {
if (typeof exports === "object" && typeof module2 === "object")
module2.exports = factory();
else if (typeof define === "function" && define.amd)
define([], factory);
else if (typeof exports === "object")
exports["feather"] = factory();
else
root["feather"] = factory();
})(typeof self !== "undefined" ? self : exports, function() {
return function(modules) {
var installedModules = {};
function __webpack_require__(moduleId) {
if (installedModules[moduleId]) {
return installedModules[moduleId].exports;
}
var module3 = installedModules[moduleId] = {
i: moduleId,
l: false,
exports: {}
};
modules[moduleId].call(module3.exports, module3, module3.exports, __webpack_require__);
module3.l = true;
return module3.exports;
}
__webpack_require__.m = modules;
__webpack_require__.c = installedModules;
__webpack_require__.d = function(exports2, name, getter) {
if (!__webpack_require__.o(exports2, name)) {
Object.defineProperty(exports2, name, {
configurable: false,
enumerable: true,
get: getter
});
}
};
__webpack_require__.r = function(exports2) {
Object.defineProperty(exports2, "__esModule", { value: true });
};
__webpack_require__.n = function(module3) {
var getter = module3 && module3.__esModule ? function getDefault() {
return module3["default"];
} : function getModuleExports() {
return module3;
};
__webpack_require__.d(getter, "a", getter);
return getter;
};
__webpack_require__.o = function(object, property) {
return Object.prototype.hasOwnProperty.call(object, property);
};
__webpack_require__.p = "";
return __webpack_require__(__webpack_require__.s = 0);
}({
"./dist/icons.json": function(module3) {
module3.exports = { "activity": '', "airplay": '', "alert-circle": '', "alert-octagon": '', "alert-triangle": '', "align-center": '', "align-justify": '', "align-left": '', "align-right": '', "anchor": '', "aperture": '', "archive": '', "arrow-down-circle": '', "arrow-down-left": '', "arrow-down-right": '', "arrow-down": '', "arrow-left-circle": '', "arrow-left": '', "arrow-right-circle": '', "arrow-right": '', "arrow-up-circle": '', "arrow-up-left": '', "arrow-up-right": '', "arrow-up": '', "at-sign": '', "award": '', "bar-chart-2": '', "bar-chart": '', "battery-charging": '', "battery": '', "bell-off": '', "bell": '', "bluetooth": '', "bold": '', "book-open": '', "book": '', "bookmark": '', "box": '', "briefcase": '', "calendar": '', "camera-off": '', "camera": '', "cast": '', "check-circle": '', "check-square": '', "check": '', "chevron-down": '', "chevron-left": '', "chevron-right": '', "chevron-up": '', "chevrons-down": '', "chevrons-left": '', "chevrons-right": '', "chevrons-up": '', "chrome": '', "circle": '', "clipboard": '', "clock": '', "cloud-drizzle": '', "cloud-lightning": '', "cloud-off": '', "cloud-rain": '', "cloud-snow": '', "cloud": '', "code": '', "codepen": '', "codesandbox": '', "coffee": '', "columns": '', "command": '', "compass": '', "copy": '', "corner-down-left": '', "corner-down-right": '', "corner-left-down": '', "corner-left-up": '', "corner-right-down": '', "corner-right-up": '', "corner-up-left": '', "corner-up-right": '', "cpu": '', "credit-card": '', "crop": '', "crosshair": '', "database": '', "delete": '', "disc": '', "divide-circle": '', "divide-square": '', "divide": '', "dollar-sign": '', "download-cloud": '', "download": '', "dribbble": '', "droplet": '', "edit-2": '', "edit-3": '', "edit": '', "external-link": '', "eye-off": '', "eye": '', "facebook": '', "fast-forward": '', "feather": '', "figma": '', "file-minus": '', "file-plus": '', "file-text": '', "file": '', "film": '', "filter": '', "flag": '', "folder-minus": '', "folder-plus": '', "folder": '', "framer": '', "frown": '', "gift": '', "git-branch": '', "git-commit": '', "git-merge": '', "git-pull-request": '', "github": '', "gitlab": '', "globe": '', "grid": '', "hard-drive": '', "hash": '', "headphones": '', "heart": '', "help-circle": '', "hexagon": '', "home": '', "image": '', "inbox": '', "info": '', "instagram": '', "italic": '', "key": '', "layers": '', "layout": '', "life-buoy": '', "link-2": '', "link": '', "linkedin": '', "list": '', "loader": '', "lock": '', "log-in": '', "log-out": '', "mail": '', "map-pin": '', "map": '', "maximize-2": '', "maximize": '', "meh": '', "menu": '', "message-circle": '', "message-square": '', "mic-off": '', "mic": '', "minimize-2": '', "minimize": '', "minus-circle": '', "minus-square": '', "minus": '', "monitor": '', "moon": '', "more-horizontal": '', "more-vertical": '', "mouse-pointer": '', "move": '', "music": '', "navigation-2": '', "navigation": '', "octagon": '', "package": '', "paperclip": '', "pause-circle": '', "pause": '', "pen-tool": '', "percent": '', "phone-call": '', "phone-forwarded": '', "phone-incoming": '', "phone-missed": '', "phone-off": '', "phone-outgoing": '', "phone": '', "pie-chart": '', "play-circle": '', "play": '', "plus-circle": '', "plus-square": '', "plus": '', "pocket": '', "power": '', "printer": '', "radio": '', "refresh-ccw": '', "refresh-cw": '', "repeat": '', "rewind": '', "rotate-ccw": '', "rotate-cw": '', "rss": '', "save": '', "scissors": '', "search": '', "send": '', "server": '', "settings": '', "share-2": '', "share": '', "shield-off": '', "shield": '', "shopping-bag": '', "shopping-cart": '', "shuffle": '', "sidebar": '', "skip-back": '', "skip-forward": '', "slack": '', "slash": '', "sliders": '', "smartphone": '', "smile": '', "speaker": '', "square": '', "star": '', "stop-circle": '', "sun": '', "sunrise": '', "sunset": '', "tablet": '', "tag": '', "target": '', "terminal": '', "thermometer": '', "thumbs-down": '', "thumbs-up": '', "toggle-left": '', "toggle-right": '', "tool": '', "trash-2": '', "trash": '', "trello": '', "trending-down": '', "trending-up": '', "triangle": '', "truck": '', "tv": '', "twitch": '', "twitter": '', "type": '', "umbrella": '', "underline": '', "unlock": '', "upload-cloud": '', "upload": '', "user-check": '', "user-minus": '', "user-plus": '', "user-x": '', "user": '', "users": '', "video-off": '', "video": '', "voicemail": '', "volume-1": '', "volume-2": '', "volume-x": '', "volume": '', "watch": '', "wifi-off": '', "wifi": '', "wind": '', "x-circle": '', "x-octagon": '', "x-square": '', "x": '', "youtube": '', "zap-off": '', "zap": '', "zoom-in": '', "zoom-out": '' };
},
"./node_modules/classnames/dedupe.js": function(module3, exports2, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
(function() {
"use strict";
var classNames = function() {
function StorageObject() {
}
StorageObject.prototype = Object.create(null);
function _parseArray(resultSet, array) {
var length = array.length;
for (var i = 0; i < length; ++i) {
_parse(resultSet, array[i]);
}
}
var hasOwn = {}.hasOwnProperty;
function _parseNumber(resultSet, num) {
resultSet[num] = true;
}
function _parseObject(resultSet, object) {
for (var k in object) {
if (hasOwn.call(object, k)) {
resultSet[k] = !!object[k];
}
}
}
var SPACE = /\s+/;
function _parseString(resultSet, str) {
var array = str.split(SPACE);
var length = array.length;
for (var i = 0; i < length; ++i) {
resultSet[array[i]] = true;
}
}
function _parse(resultSet, arg) {
if (!arg)
return;
var argType = typeof arg;
if (argType === "string") {
_parseString(resultSet, arg);
} else if (Array.isArray(arg)) {
_parseArray(resultSet, arg);
} else if (argType === "object") {
_parseObject(resultSet, arg);
} else if (argType === "number") {
_parseNumber(resultSet, arg);
}
}
function _classNames() {
var len = arguments.length;
var args = Array(len);
for (var i = 0; i < len; i++) {
args[i] = arguments[i];
}
var classSet = new StorageObject();
_parseArray(classSet, args);
var list = [];
for (var k in classSet) {
if (classSet[k]) {
list.push(k);
}
}
return list.join(" ");
}
return _classNames;
}();
if (typeof module3 !== "undefined" && module3.exports) {
module3.exports = classNames;
} else if (true) {
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = function() {
return classNames;
}.apply(exports2, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== void 0 && (module3.exports = __WEBPACK_AMD_DEFINE_RESULT__));
} else {
}
})();
},
"./node_modules/core-js/es/array/from.js": function(module3, exports2, __webpack_require__) {
__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js");
__webpack_require__("./node_modules/core-js/modules/es.array.from.js");
var path = __webpack_require__("./node_modules/core-js/internals/path.js");
module3.exports = path.Array.from;
},
"./node_modules/core-js/internals/a-function.js": function(module3, exports2) {
module3.exports = function(it) {
if (typeof it != "function") {
throw TypeError(String(it) + " is not a function");
}
return it;
};
},
"./node_modules/core-js/internals/an-object.js": function(module3, exports2, __webpack_require__) {
var isObject = __webpack_require__("./node_modules/core-js/internals/is-object.js");
module3.exports = function(it) {
if (!isObject(it)) {
throw TypeError(String(it) + " is not an object");
}
return it;
};
},
"./node_modules/core-js/internals/array-from.js": function(module3, exports2, __webpack_require__) {
"use strict";
var bind = __webpack_require__("./node_modules/core-js/internals/bind-context.js");
var toObject = __webpack_require__("./node_modules/core-js/internals/to-object.js");
var callWithSafeIterationClosing = __webpack_require__("./node_modules/core-js/internals/call-with-safe-iteration-closing.js");
var isArrayIteratorMethod = __webpack_require__("./node_modules/core-js/internals/is-array-iterator-method.js");
var toLength = __webpack_require__("./node_modules/core-js/internals/to-length.js");
var createProperty = __webpack_require__("./node_modules/core-js/internals/create-property.js");
var getIteratorMethod = __webpack_require__("./node_modules/core-js/internals/get-iterator-method.js");
module3.exports = function from(arrayLike) {
var O = toObject(arrayLike);
var C = typeof this == "function" ? this : Array;
var argumentsLength = arguments.length;
var mapfn = argumentsLength > 1 ? arguments[1] : void 0;
var mapping = mapfn !== void 0;
var index = 0;
var iteratorMethod = getIteratorMethod(O);
var length, result, step, iterator;
if (mapping)
mapfn = bind(mapfn, argumentsLength > 2 ? arguments[2] : void 0, 2);
if (iteratorMethod != void 0 && !(C == Array && isArrayIteratorMethod(iteratorMethod))) {
iterator = iteratorMethod.call(O);
result = new C();
for (; !(step = iterator.next()).done; index++) {
createProperty(result, index, mapping ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true) : step.value);
}
} else {
length = toLength(O.length);
result = new C(length);
for (; length > index; index++) {
createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]);
}
}
result.length = index;
return result;
};
},
"./node_modules/core-js/internals/array-includes.js": function(module3, exports2, __webpack_require__) {
var toIndexedObject = __webpack_require__("./node_modules/core-js/internals/to-indexed-object.js");
var toLength = __webpack_require__("./node_modules/core-js/internals/to-length.js");
var toAbsoluteIndex = __webpack_require__("./node_modules/core-js/internals/to-absolute-index.js");
module3.exports = function(IS_INCLUDES) {
return function($this, el, fromIndex) {
var O = toIndexedObject($this);
var length = toLength(O.length);
var index = toAbsoluteIndex(fromIndex, length);
var value;
if (IS_INCLUDES && el != el)
while (length > index) {
value = O[index++];
if (value != value)
return true;
}
else
for (; length > index; index++)
if (IS_INCLUDES || index in O) {
if (O[index] === el)
return IS_INCLUDES || index || 0;
}
return !IS_INCLUDES && -1;
};
};
},
"./node_modules/core-js/internals/bind-context.js": function(module3, exports2, __webpack_require__) {
var aFunction = __webpack_require__("./node_modules/core-js/internals/a-function.js");
module3.exports = function(fn2, that, length) {
aFunction(fn2);
if (that === void 0)
return fn2;
switch (length) {
case 0:
return function() {
return fn2.call(that);
};
case 1:
return function(a) {
return fn2.call(that, a);
};
case 2:
return function(a, b) {
return fn2.call(that, a, b);
};
case 3:
return function(a, b, c) {
return fn2.call(that, a, b, c);
};
}
return function() {
return fn2.apply(that, arguments);
};
};
},
"./node_modules/core-js/internals/call-with-safe-iteration-closing.js": function(module3, exports2, __webpack_require__) {
var anObject = __webpack_require__("./node_modules/core-js/internals/an-object.js");
module3.exports = function(iterator, fn2, value, ENTRIES) {
try {
return ENTRIES ? fn2(anObject(value)[0], value[1]) : fn2(value);
} catch (error) {
var returnMethod = iterator["return"];
if (returnMethod !== void 0)
anObject(returnMethod.call(iterator));
throw error;
}
};
},
"./node_modules/core-js/internals/check-correctness-of-iteration.js": function(module3, exports2, __webpack_require__) {
var wellKnownSymbol = __webpack_require__("./node_modules/core-js/internals/well-known-symbol.js");
var ITERATOR = wellKnownSymbol("iterator");
var SAFE_CLOSING = false;
try {
var called = 0;
var iteratorWithReturn = {
next: function() {
return { done: !!called++ };
},
"return": function() {
SAFE_CLOSING = true;
}
};
iteratorWithReturn[ITERATOR] = function() {
return this;
};
Array.from(iteratorWithReturn, function() {
throw 2;
});
} catch (error) {
}
module3.exports = function(exec, SKIP_CLOSING) {
if (!SKIP_CLOSING && !SAFE_CLOSING)
return false;
var ITERATION_SUPPORT = false;
try {
var object = {};
object[ITERATOR] = function() {
return {
next: function() {
return { done: ITERATION_SUPPORT = true };
}
};
};
exec(object);
} catch (error) {
}
return ITERATION_SUPPORT;
};
},
"./node_modules/core-js/internals/classof-raw.js": function(module3, exports2) {
var toString = {}.toString;
module3.exports = function(it) {
return toString.call(it).slice(8, -1);
};
},
"./node_modules/core-js/internals/classof.js": function(module3, exports2, __webpack_require__) {
var classofRaw = __webpack_require__("./node_modules/core-js/internals/classof-raw.js");
var wellKnownSymbol = __webpack_require__("./node_modules/core-js/internals/well-known-symbol.js");
var TO_STRING_TAG = wellKnownSymbol("toStringTag");
var CORRECT_ARGUMENTS = classofRaw(function() {
return arguments;
}()) == "Arguments";
var tryGet = function(it, key) {
try {
return it[key];
} catch (error) {
}
};
module3.exports = function(it) {
var O, tag, result;
return it === void 0 ? "Undefined" : it === null ? "Null" : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG)) == "string" ? tag : CORRECT_ARGUMENTS ? classofRaw(O) : (result = classofRaw(O)) == "Object" && typeof O.callee == "function" ? "Arguments" : result;
};
},
"./node_modules/core-js/internals/copy-constructor-properties.js": function(module3, exports2, __webpack_require__) {
var has = __webpack_require__("./node_modules/core-js/internals/has.js");
var ownKeys = __webpack_require__("./node_modules/core-js/internals/own-keys.js");
var getOwnPropertyDescriptorModule = __webpack_require__("./node_modules/core-js/internals/object-get-own-property-descriptor.js");
var definePropertyModule = __webpack_require__("./node_modules/core-js/internals/object-define-property.js");
module3.exports = function(target, source) {
var keys = ownKeys(source);
var defineProperty = definePropertyModule.f;
var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
for (var i = 0; i < keys.length; i++) {
var key = keys[i];
if (!has(target, key))
defineProperty(target, key, getOwnPropertyDescriptor(source, key));
}
};
},
"./node_modules/core-js/internals/correct-prototype-getter.js": function(module3, exports2, __webpack_require__) {
var fails = __webpack_require__("./node_modules/core-js/internals/fails.js");
module3.exports = !fails(function() {
function F() {
}
F.prototype.constructor = null;
return Object.getPrototypeOf(new F()) !== F.prototype;
});
},
"./node_modules/core-js/internals/create-iterator-constructor.js": function(module3, exports2, __webpack_require__) {
"use strict";
var IteratorPrototype = __webpack_require__("./node_modules/core-js/internals/iterators-core.js").IteratorPrototype;
var create = __webpack_require__("./node_modules/core-js/internals/object-create.js");
var createPropertyDescriptor = __webpack_require__("./node_modules/core-js/internals/create-property-descriptor.js");
var setToStringTag = __webpack_require__("./node_modules/core-js/internals/set-to-string-tag.js");
var Iterators = __webpack_require__("./node_modules/core-js/internals/iterators.js");
var returnThis = function() {
return this;
};
module3.exports = function(IteratorConstructor, NAME, next) {
var TO_STRING_TAG = NAME + " Iterator";
IteratorConstructor.prototype = create(IteratorPrototype, { next: createPropertyDescriptor(1, next) });
setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true);
Iterators[TO_STRING_TAG] = returnThis;
return IteratorConstructor;
};
},
"./node_modules/core-js/internals/create-property-descriptor.js": function(module3, exports2) {
module3.exports = function(bitmap, value) {
return {
enumerable: !(bitmap & 1),
configurable: !(bitmap & 2),
writable: !(bitmap & 4),
value
};
};
},
"./node_modules/core-js/internals/create-property.js": function(module3, exports2, __webpack_require__) {
"use strict";
var toPrimitive = __webpack_require__("./node_modules/core-js/internals/to-primitive.js");
var definePropertyModule = __webpack_require__("./node_modules/core-js/internals/object-define-property.js");
var createPropertyDescriptor = __webpack_require__("./node_modules/core-js/internals/create-property-descriptor.js");
module3.exports = function(object, key, value) {
var propertyKey = toPrimitive(key);
if (propertyKey in object)
definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value));
else
object[propertyKey] = value;
};
},
"./node_modules/core-js/internals/define-iterator.js": function(module3, exports2, __webpack_require__) {
"use strict";
var $ = __webpack_require__("./node_modules/core-js/internals/export.js");
var createIteratorConstructor = __webpack_require__("./node_modules/core-js/internals/create-iterator-constructor.js");
var getPrototypeOf = __webpack_require__("./node_modules/core-js/internals/object-get-prototype-of.js");
var setPrototypeOf = __webpack_require__("./node_modules/core-js/internals/object-set-prototype-of.js");
var setToStringTag = __webpack_require__("./node_modules/core-js/internals/set-to-string-tag.js");
var hide2 = __webpack_require__("./node_modules/core-js/internals/hide.js");
var redefine = __webpack_require__("./node_modules/core-js/internals/redefine.js");
var wellKnownSymbol = __webpack_require__("./node_modules/core-js/internals/well-known-symbol.js");
var IS_PURE = __webpack_require__("./node_modules/core-js/internals/is-pure.js");
var Iterators = __webpack_require__("./node_modules/core-js/internals/iterators.js");
var IteratorsCore = __webpack_require__("./node_modules/core-js/internals/iterators-core.js");
var IteratorPrototype = IteratorsCore.IteratorPrototype;
var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
var ITERATOR = wellKnownSymbol("iterator");
var KEYS = "keys";
var VALUES = "values";
var ENTRIES = "entries";
var returnThis = function() {
return this;
};
module3.exports = function(Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
createIteratorConstructor(IteratorConstructor, NAME, next);
var getIterationMethod = function(KIND) {
if (KIND === DEFAULT && defaultIterator)
return defaultIterator;
if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype)
return IterablePrototype[KIND];
switch (KIND) {
case KEYS:
return function keys() {
return new IteratorConstructor(this, KIND);
};
case VALUES:
return function values2() {
return new IteratorConstructor(this, KIND);
};
case ENTRIES:
return function entries() {
return new IteratorConstructor(this, KIND);
};
}
return function() {
return new IteratorConstructor(this);
};
};
var TO_STRING_TAG = NAME + " Iterator";
var INCORRECT_VALUES_NAME = false;
var IterablePrototype = Iterable.prototype;
var nativeIterator = IterablePrototype[ITERATOR] || IterablePrototype["@@iterator"] || DEFAULT && IterablePrototype[DEFAULT];
var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);
var anyNativeIterator = NAME == "Array" ? IterablePrototype.entries || nativeIterator : nativeIterator;
var CurrentIteratorPrototype, methods, KEY;
if (anyNativeIterator) {
CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));
if (IteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {
if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
if (setPrototypeOf) {
setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);
} else if (typeof CurrentIteratorPrototype[ITERATOR] != "function") {
hide2(CurrentIteratorPrototype, ITERATOR, returnThis);
}
}
setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true);
if (IS_PURE)
Iterators[TO_STRING_TAG] = returnThis;
}
}
if (DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {
INCORRECT_VALUES_NAME = true;
defaultIterator = function values2() {
return nativeIterator.call(this);
};
}
if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) {
hide2(IterablePrototype, ITERATOR, defaultIterator);
}
Iterators[NAME] = defaultIterator;
if (DEFAULT) {
methods = {
values: getIterationMethod(VALUES),
keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),
entries: getIterationMethod(ENTRIES)
};
if (FORCED)
for (KEY in methods) {
if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
redefine(IterablePrototype, KEY, methods[KEY]);
}
}
else
$({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
}
return methods;
};
},
"./node_modules/core-js/internals/descriptors.js": function(module3, exports2, __webpack_require__) {
var fails = __webpack_require__("./node_modules/core-js/internals/fails.js");
module3.exports = !fails(function() {
return Object.defineProperty({}, "a", { get: function() {
return 7;
} }).a != 7;
});
},
"./node_modules/core-js/internals/document-create-element.js": function(module3, exports2, __webpack_require__) {
var global2 = __webpack_require__("./node_modules/core-js/internals/global.js");
var isObject = __webpack_require__("./node_modules/core-js/internals/is-object.js");
var document2 = global2.document;
var exist = isObject(document2) && isObject(document2.createElement);
module3.exports = function(it) {
return exist ? document2.createElement(it) : {};
};
},
"./node_modules/core-js/internals/enum-bug-keys.js": function(module3, exports2) {
module3.exports = [
"constructor",
"hasOwnProperty",
"isPrototypeOf",
"propertyIsEnumerable",
"toLocaleString",
"toString",
"valueOf"
];
},
"./node_modules/core-js/internals/export.js": function(module3, exports2, __webpack_require__) {
var global2 = __webpack_require__("./node_modules/core-js/internals/global.js");
var getOwnPropertyDescriptor = __webpack_require__("./node_modules/core-js/internals/object-get-own-property-descriptor.js").f;
var hide2 = __webpack_require__("./node_modules/core-js/internals/hide.js");
var redefine = __webpack_require__("./node_modules/core-js/internals/redefine.js");
var setGlobal = __webpack_require__("./node_modules/core-js/internals/set-global.js");
var copyConstructorProperties = __webpack_require__("./node_modules/core-js/internals/copy-constructor-properties.js");
var isForced = __webpack_require__("./node_modules/core-js/internals/is-forced.js");
module3.exports = function(options, source) {
var TARGET = options.target;
var GLOBAL = options.global;
var STATIC = options.stat;
var FORCED, target, key, targetProperty, sourceProperty, descriptor;
if (GLOBAL) {
target = global2;
} else if (STATIC) {
target = global2[TARGET] || setGlobal(TARGET, {});
} else {
target = (global2[TARGET] || {}).prototype;
}
if (target)
for (key in source) {
sourceProperty = source[key];
if (options.noTargetGet) {
descriptor = getOwnPropertyDescriptor(target, key);
targetProperty = descriptor && descriptor.value;
} else
targetProperty = target[key];
FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? "." : "#") + key, options.forced);
if (!FORCED && targetProperty !== void 0) {
if (typeof sourceProperty === typeof targetProperty)
continue;
copyConstructorProperties(sourceProperty, targetProperty);
}
if (options.sham || targetProperty && targetProperty.sham) {
hide2(sourceProperty, "sham", true);
}
redefine(target, key, sourceProperty, options);
}
};
},
"./node_modules/core-js/internals/fails.js": function(module3, exports2) {
module3.exports = function(exec) {
try {
return !!exec();
} catch (error) {
return true;
}
};
},
"./node_modules/core-js/internals/function-to-string.js": function(module3, exports2, __webpack_require__) {
var shared = __webpack_require__("./node_modules/core-js/internals/shared.js");
module3.exports = shared("native-function-to-string", Function.toString);
},
"./node_modules/core-js/internals/get-iterator-method.js": function(module3, exports2, __webpack_require__) {
var classof = __webpack_require__("./node_modules/core-js/internals/classof.js");
var Iterators = __webpack_require__("./node_modules/core-js/internals/iterators.js");
var wellKnownSymbol = __webpack_require__("./node_modules/core-js/internals/well-known-symbol.js");
var ITERATOR = wellKnownSymbol("iterator");
module3.exports = function(it) {
if (it != void 0)
return it[ITERATOR] || it["@@iterator"] || Iterators[classof(it)];
};
},
"./node_modules/core-js/internals/global.js": function(module3, exports2, __webpack_require__) {
(function(global2) {
var O = "object";
var check = function(it) {
return it && it.Math == Math && it;
};
module3.exports = check(typeof globalThis == O && globalThis) || check(typeof window == O && window) || check(typeof self == O && self) || check(typeof global2 == O && global2) || Function("return this")();
}).call(this, __webpack_require__("./node_modules/webpack/buildin/global.js"));
},
"./node_modules/core-js/internals/has.js": function(module3, exports2) {
var hasOwnProperty = {}.hasOwnProperty;
module3.exports = function(it, key) {
return hasOwnProperty.call(it, key);
};
},
"./node_modules/core-js/internals/hidden-keys.js": function(module3, exports2) {
module3.exports = {};
},
"./node_modules/core-js/internals/hide.js": function(module3, exports2, __webpack_require__) {
var DESCRIPTORS = __webpack_require__("./node_modules/core-js/internals/descriptors.js");
var definePropertyModule = __webpack_require__("./node_modules/core-js/internals/object-define-property.js");
var createPropertyDescriptor = __webpack_require__("./node_modules/core-js/internals/create-property-descriptor.js");
module3.exports = DESCRIPTORS ? function(object, key, value) {
return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));
} : function(object, key, value) {
object[key] = value;
return object;
};
},
"./node_modules/core-js/internals/html.js": function(module3, exports2, __webpack_require__) {
var global2 = __webpack_require__("./node_modules/core-js/internals/global.js");
var document2 = global2.document;
module3.exports = document2 && document2.documentElement;
},
"./node_modules/core-js/internals/ie8-dom-define.js": function(module3, exports2, __webpack_require__) {
var DESCRIPTORS = __webpack_require__("./node_modules/core-js/internals/descriptors.js");
var fails = __webpack_require__("./node_modules/core-js/internals/fails.js");
var createElement = __webpack_require__("./node_modules/core-js/internals/document-create-element.js");
module3.exports = !DESCRIPTORS && !fails(function() {
return Object.defineProperty(createElement("div"), "a", {
get: function() {
return 7;
}
}).a != 7;
});
},
"./node_modules/core-js/internals/indexed-object.js": function(module3, exports2, __webpack_require__) {
var fails = __webpack_require__("./node_modules/core-js/internals/fails.js");
var classof = __webpack_require__("./node_modules/core-js/internals/classof-raw.js");
var split = "".split;
module3.exports = fails(function() {
return !Object("z").propertyIsEnumerable(0);
}) ? function(it) {
return classof(it) == "String" ? split.call(it, "") : Object(it);
} : Object;
},
"./node_modules/core-js/internals/internal-state.js": function(module3, exports2, __webpack_require__) {
var NATIVE_WEAK_MAP = __webpack_require__("./node_modules/core-js/internals/native-weak-map.js");
var global2 = __webpack_require__("./node_modules/core-js/internals/global.js");
var isObject = __webpack_require__("./node_modules/core-js/internals/is-object.js");
var hide2 = __webpack_require__("./node_modules/core-js/internals/hide.js");
var objectHas = __webpack_require__("./node_modules/core-js/internals/has.js");
var sharedKey = __webpack_require__("./node_modules/core-js/internals/shared-key.js");
var hiddenKeys = __webpack_require__("./node_modules/core-js/internals/hidden-keys.js");
var WeakMap = global2.WeakMap;
var set, get, has;
var enforce = function(it) {
return has(it) ? get(it) : set(it, {});
};
var getterFor = function(TYPE) {
return function(it) {
var state;
if (!isObject(it) || (state = get(it)).type !== TYPE) {
throw TypeError("Incompatible receiver, " + TYPE + " required");
}
return state;
};
};
if (NATIVE_WEAK_MAP) {
var store = new WeakMap();
var wmget = store.get;
var wmhas = store.has;
var wmset = store.set;
set = function(it, metadata) {
wmset.call(store, it, metadata);
return metadata;
};
get = function(it) {
return wmget.call(store, it) || {};
};
has = function(it) {
return wmhas.call(store, it);
};
} else {
var STATE = sharedKey("state");
hiddenKeys[STATE] = true;
set = function(it, metadata) {
hide2(it, STATE, metadata);
return metadata;
};
get = function(it) {
return objectHas(it, STATE) ? it[STATE] : {};
};
has = function(it) {
return objectHas(it, STATE);
};
}
module3.exports = {
set,
get,
has,
enforce,
getterFor
};
},
"./node_modules/core-js/internals/is-array-iterator-method.js": function(module3, exports2, __webpack_require__) {
var wellKnownSymbol = __webpack_require__("./node_modules/core-js/internals/well-known-symbol.js");
var Iterators = __webpack_require__("./node_modules/core-js/internals/iterators.js");
var ITERATOR = wellKnownSymbol("iterator");
var ArrayPrototype = Array.prototype;
module3.exports = function(it) {
return it !== void 0 && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it);
};
},
"./node_modules/core-js/internals/is-forced.js": function(module3, exports2, __webpack_require__) {
var fails = __webpack_require__("./node_modules/core-js/internals/fails.js");
var replacement = /#|\.prototype\./;
var isForced = function(feature, detection) {
var value = data[normalize(feature)];
return value == POLYFILL ? true : value == NATIVE ? false : typeof detection == "function" ? fails(detection) : !!detection;
};
var normalize = isForced.normalize = function(string) {
return String(string).replace(replacement, ".").toLowerCase();
};
var data = isForced.data = {};
var NATIVE = isForced.NATIVE = "N";
var POLYFILL = isForced.POLYFILL = "P";
module3.exports = isForced;
},
"./node_modules/core-js/internals/is-object.js": function(module3, exports2) {
module3.exports = function(it) {
return typeof it === "object" ? it !== null : typeof it === "function";
};
},
"./node_modules/core-js/internals/is-pure.js": function(module3, exports2) {
module3.exports = false;
},
"./node_modules/core-js/internals/iterators-core.js": function(module3, exports2, __webpack_require__) {
"use strict";
var getPrototypeOf = __webpack_require__("./node_modules/core-js/internals/object-get-prototype-of.js");
var hide2 = __webpack_require__("./node_modules/core-js/internals/hide.js");
var has = __webpack_require__("./node_modules/core-js/internals/has.js");
var wellKnownSymbol = __webpack_require__("./node_modules/core-js/internals/well-known-symbol.js");
var IS_PURE = __webpack_require__("./node_modules/core-js/internals/is-pure.js");
var ITERATOR = wellKnownSymbol("iterator");
var BUGGY_SAFARI_ITERATORS = false;
var returnThis = function() {
return this;
};
var IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;
if ([].keys) {
arrayIterator = [].keys();
if (!("next" in arrayIterator))
BUGGY_SAFARI_ITERATORS = true;
else {
PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator));
if (PrototypeOfArrayIteratorPrototype !== Object.prototype)
IteratorPrototype = PrototypeOfArrayIteratorPrototype;
}
}
if (IteratorPrototype == void 0)
IteratorPrototype = {};
if (!IS_PURE && !has(IteratorPrototype, ITERATOR))
hide2(IteratorPrototype, ITERATOR, returnThis);
module3.exports = {
IteratorPrototype,
BUGGY_SAFARI_ITERATORS
};
},
"./node_modules/core-js/internals/iterators.js": function(module3, exports2) {
module3.exports = {};
},
"./node_modules/core-js/internals/native-symbol.js": function(module3, exports2, __webpack_require__) {
var fails = __webpack_require__("./node_modules/core-js/internals/fails.js");
module3.exports = !!Object.getOwnPropertySymbols && !fails(function() {
return !String(Symbol());
});
},
"./node_modules/core-js/internals/native-weak-map.js": function(module3, exports2, __webpack_require__) {
var global2 = __webpack_require__("./node_modules/core-js/internals/global.js");
var nativeFunctionToString = __webpack_require__("./node_modules/core-js/internals/function-to-string.js");
var WeakMap = global2.WeakMap;
module3.exports = typeof WeakMap === "function" && /native code/.test(nativeFunctionToString.call(WeakMap));
},
"./node_modules/core-js/internals/object-create.js": function(module3, exports2, __webpack_require__) {
var anObject = __webpack_require__("./node_modules/core-js/internals/an-object.js");
var defineProperties = __webpack_require__("./node_modules/core-js/internals/object-define-properties.js");
var enumBugKeys = __webpack_require__("./node_modules/core-js/internals/enum-bug-keys.js");
var hiddenKeys = __webpack_require__("./node_modules/core-js/internals/hidden-keys.js");
var html = __webpack_require__("./node_modules/core-js/internals/html.js");
var documentCreateElement = __webpack_require__("./node_modules/core-js/internals/document-create-element.js");
var sharedKey = __webpack_require__("./node_modules/core-js/internals/shared-key.js");
var IE_PROTO = sharedKey("IE_PROTO");
var PROTOTYPE = "prototype";
var Empty = function() {
};
var createDict = function() {
var iframe = documentCreateElement("iframe");
var length = enumBugKeys.length;
var lt = "<";
var script = "script";
var gt = ">";
var js = "java" + script + ":";
var iframeDocument;
iframe.style.display = "none";
html.appendChild(iframe);
iframe.src = String(js);
iframeDocument = iframe.contentWindow.document;
iframeDocument.open();
iframeDocument.write(lt + script + gt + "document.F=Object" + lt + "/" + script + gt);
iframeDocument.close();
createDict = iframeDocument.F;
while (length--)
delete createDict[PROTOTYPE][enumBugKeys[length]];
return createDict();
};
module3.exports = Object.create || function create(O, Properties) {
var result;
if (O !== null) {
Empty[PROTOTYPE] = anObject(O);
result = new Empty();
Empty[PROTOTYPE] = null;
result[IE_PROTO] = O;
} else
result = createDict();
return Properties === void 0 ? result : defineProperties(result, Properties);
};
hiddenKeys[IE_PROTO] = true;
},
"./node_modules/core-js/internals/object-define-properties.js": function(module3, exports2, __webpack_require__) {
var DESCRIPTORS = __webpack_require__("./node_modules/core-js/internals/descriptors.js");
var definePropertyModule = __webpack_require__("./node_modules/core-js/internals/object-define-property.js");
var anObject = __webpack_require__("./node_modules/core-js/internals/an-object.js");
var objectKeys = __webpack_require__("./node_modules/core-js/internals/object-keys.js");
module3.exports = DESCRIPTORS ? Object.defineProperties : function defineProperties(O, Properties) {
anObject(O);
var keys = objectKeys(Properties);
var length = keys.length;
var i = 0;
var key;
while (length > i)
definePropertyModule.f(O, key = keys[i++], Properties[key]);
return O;
};
},
"./node_modules/core-js/internals/object-define-property.js": function(module3, exports2, __webpack_require__) {
var DESCRIPTORS = __webpack_require__("./node_modules/core-js/internals/descriptors.js");
var IE8_DOM_DEFINE = __webpack_require__("./node_modules/core-js/internals/ie8-dom-define.js");
var anObject = __webpack_require__("./node_modules/core-js/internals/an-object.js");
var toPrimitive = __webpack_require__("./node_modules/core-js/internals/to-primitive.js");
var nativeDefineProperty = Object.defineProperty;
exports2.f = DESCRIPTORS ? nativeDefineProperty : function defineProperty(O, P, Attributes) {
anObject(O);
P = toPrimitive(P, true);
anObject(Attributes);
if (IE8_DOM_DEFINE)
try {
return nativeDefineProperty(O, P, Attributes);
} catch (error) {
}
if ("get" in Attributes || "set" in Attributes)
throw TypeError("Accessors not supported");
if ("value" in Attributes)
O[P] = Attributes.value;
return O;
};
},
"./node_modules/core-js/internals/object-get-own-property-descriptor.js": function(module3, exports2, __webpack_require__) {
var DESCRIPTORS = __webpack_require__("./node_modules/core-js/internals/descriptors.js");
var propertyIsEnumerableModule = __webpack_require__("./node_modules/core-js/internals/object-property-is-enumerable.js");
var createPropertyDescriptor = __webpack_require__("./node_modules/core-js/internals/create-property-descriptor.js");
var toIndexedObject = __webpack_require__("./node_modules/core-js/internals/to-indexed-object.js");
var toPrimitive = __webpack_require__("./node_modules/core-js/internals/to-primitive.js");
var has = __webpack_require__("./node_modules/core-js/internals/has.js");
var IE8_DOM_DEFINE = __webpack_require__("./node_modules/core-js/internals/ie8-dom-define.js");
var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
exports2.f = DESCRIPTORS ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
O = toIndexedObject(O);
P = toPrimitive(P, true);
if (IE8_DOM_DEFINE)
try {
return nativeGetOwnPropertyDescriptor(O, P);
} catch (error) {
}
if (has(O, P))
return createPropertyDescriptor(!propertyIsEnumerableModule.f.call(O, P), O[P]);
};
},
"./node_modules/core-js/internals/object-get-own-property-names.js": function(module3, exports2, __webpack_require__) {
var internalObjectKeys = __webpack_require__("./node_modules/core-js/internals/object-keys-internal.js");
var enumBugKeys = __webpack_require__("./node_modules/core-js/internals/enum-bug-keys.js");
var hiddenKeys = enumBugKeys.concat("length", "prototype");
exports2.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
return internalObjectKeys(O, hiddenKeys);
};
},
"./node_modules/core-js/internals/object-get-own-property-symbols.js": function(module3, exports2) {
exports2.f = Object.getOwnPropertySymbols;
},
"./node_modules/core-js/internals/object-get-prototype-of.js": function(module3, exports2, __webpack_require__) {
var has = __webpack_require__("./node_modules/core-js/internals/has.js");
var toObject = __webpack_require__("./node_modules/core-js/internals/to-object.js");
var sharedKey = __webpack_require__("./node_modules/core-js/internals/shared-key.js");
var CORRECT_PROTOTYPE_GETTER = __webpack_require__("./node_modules/core-js/internals/correct-prototype-getter.js");
var IE_PROTO = sharedKey("IE_PROTO");
var ObjectPrototype = Object.prototype;
module3.exports = CORRECT_PROTOTYPE_GETTER ? Object.getPrototypeOf : function(O) {
O = toObject(O);
if (has(O, IE_PROTO))
return O[IE_PROTO];
if (typeof O.constructor == "function" && O instanceof O.constructor) {
return O.constructor.prototype;
}
return O instanceof Object ? ObjectPrototype : null;
};
},
"./node_modules/core-js/internals/object-keys-internal.js": function(module3, exports2, __webpack_require__) {
var has = __webpack_require__("./node_modules/core-js/internals/has.js");
var toIndexedObject = __webpack_require__("./node_modules/core-js/internals/to-indexed-object.js");
var arrayIncludes = __webpack_require__("./node_modules/core-js/internals/array-includes.js");
var hiddenKeys = __webpack_require__("./node_modules/core-js/internals/hidden-keys.js");
var arrayIndexOf = arrayIncludes(false);
module3.exports = function(object, names) {
var O = toIndexedObject(object);
var i = 0;
var result = [];
var key;
for (key in O)
!has(hiddenKeys, key) && has(O, key) && result.push(key);
while (names.length > i)
if (has(O, key = names[i++])) {
~arrayIndexOf(result, key) || result.push(key);
}
return result;
};
},
"./node_modules/core-js/internals/object-keys.js": function(module3, exports2, __webpack_require__) {
var internalObjectKeys = __webpack_require__("./node_modules/core-js/internals/object-keys-internal.js");
var enumBugKeys = __webpack_require__("./node_modules/core-js/internals/enum-bug-keys.js");
module3.exports = Object.keys || function keys(O) {
return internalObjectKeys(O, enumBugKeys);
};
},
"./node_modules/core-js/internals/object-property-is-enumerable.js": function(module3, exports2, __webpack_require__) {
"use strict";
var nativePropertyIsEnumerable = {}.propertyIsEnumerable;
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
var NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1);
exports2.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
var descriptor = getOwnPropertyDescriptor(this, V);
return !!descriptor && descriptor.enumerable;
} : nativePropertyIsEnumerable;
},
"./node_modules/core-js/internals/object-set-prototype-of.js": function(module3, exports2, __webpack_require__) {
var validateSetPrototypeOfArguments = __webpack_require__("./node_modules/core-js/internals/validate-set-prototype-of-arguments.js");
module3.exports = Object.setPrototypeOf || ("__proto__" in {} ? function() {
var correctSetter = false;
var test = {};
var setter;
try {
setter = Object.getOwnPropertyDescriptor(Object.prototype, "__proto__").set;
setter.call(test, []);
correctSetter = test instanceof Array;
} catch (error) {
}
return function setPrototypeOf(O, proto) {
validateSetPrototypeOfArguments(O, proto);
if (correctSetter)
setter.call(O, proto);
else
O.__proto__ = proto;
return O;
};
}() : void 0);
},
"./node_modules/core-js/internals/own-keys.js": function(module3, exports2, __webpack_require__) {
var global2 = __webpack_require__("./node_modules/core-js/internals/global.js");
var getOwnPropertyNamesModule = __webpack_require__("./node_modules/core-js/internals/object-get-own-property-names.js");
var getOwnPropertySymbolsModule = __webpack_require__("./node_modules/core-js/internals/object-get-own-property-symbols.js");
var anObject = __webpack_require__("./node_modules/core-js/internals/an-object.js");
var Reflect2 = global2.Reflect;
module3.exports = Reflect2 && Reflect2.ownKeys || function ownKeys(it) {
var keys = getOwnPropertyNamesModule.f(anObject(it));
var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;
};
},
"./node_modules/core-js/internals/path.js": function(module3, exports2, __webpack_require__) {
module3.exports = __webpack_require__("./node_modules/core-js/internals/global.js");
},
"./node_modules/core-js/internals/redefine.js": function(module3, exports2, __webpack_require__) {
var global2 = __webpack_require__("./node_modules/core-js/internals/global.js");
var shared = __webpack_require__("./node_modules/core-js/internals/shared.js");
var hide2 = __webpack_require__("./node_modules/core-js/internals/hide.js");
var has = __webpack_require__("./node_modules/core-js/internals/has.js");
var setGlobal = __webpack_require__("./node_modules/core-js/internals/set-global.js");
var nativeFunctionToString = __webpack_require__("./node_modules/core-js/internals/function-to-string.js");
var InternalStateModule = __webpack_require__("./node_modules/core-js/internals/internal-state.js");
var getInternalState = InternalStateModule.get;
var enforceInternalState = InternalStateModule.enforce;
var TEMPLATE = String(nativeFunctionToString).split("toString");
shared("inspectSource", function(it) {
return nativeFunctionToString.call(it);
});
(module3.exports = function(O, key, value, options) {
var unsafe = options ? !!options.unsafe : false;
var simple = options ? !!options.enumerable : false;
var noTargetGet = options ? !!options.noTargetGet : false;
if (typeof value == "function") {
if (typeof key == "string" && !has(value, "name"))
hide2(value, "name", key);
enforceInternalState(value).source = TEMPLATE.join(typeof key == "string" ? key : "");
}
if (O === global2) {
if (simple)
O[key] = value;
else
setGlobal(key, value);
return;
} else if (!unsafe) {
delete O[key];
} else if (!noTargetGet && O[key]) {
simple = true;
}
if (simple)
O[key] = value;
else
hide2(O, key, value);
})(Function.prototype, "toString", function toString() {
return typeof this == "function" && getInternalState(this).source || nativeFunctionToString.call(this);
});
},
"./node_modules/core-js/internals/require-object-coercible.js": function(module3, exports2) {
module3.exports = function(it) {
if (it == void 0)
throw TypeError("Can't call method on " + it);
return it;
};
},
"./node_modules/core-js/internals/set-global.js": function(module3, exports2, __webpack_require__) {
var global2 = __webpack_require__("./node_modules/core-js/internals/global.js");
var hide2 = __webpack_require__("./node_modules/core-js/internals/hide.js");
module3.exports = function(key, value) {
try {
hide2(global2, key, value);
} catch (error) {
global2[key] = value;
}
return value;
};
},
"./node_modules/core-js/internals/set-to-string-tag.js": function(module3, exports2, __webpack_require__) {
var defineProperty = __webpack_require__("./node_modules/core-js/internals/object-define-property.js").f;
var has = __webpack_require__("./node_modules/core-js/internals/has.js");
var wellKnownSymbol = __webpack_require__("./node_modules/core-js/internals/well-known-symbol.js");
var TO_STRING_TAG = wellKnownSymbol("toStringTag");
module3.exports = function(it, TAG, STATIC) {
if (it && !has(it = STATIC ? it : it.prototype, TO_STRING_TAG)) {
defineProperty(it, TO_STRING_TAG, { configurable: true, value: TAG });
}
};
},
"./node_modules/core-js/internals/shared-key.js": function(module3, exports2, __webpack_require__) {
var shared = __webpack_require__("./node_modules/core-js/internals/shared.js");
var uid = __webpack_require__("./node_modules/core-js/internals/uid.js");
var keys = shared("keys");
module3.exports = function(key) {
return keys[key] || (keys[key] = uid(key));
};
},
"./node_modules/core-js/internals/shared.js": function(module3, exports2, __webpack_require__) {
var global2 = __webpack_require__("./node_modules/core-js/internals/global.js");
var setGlobal = __webpack_require__("./node_modules/core-js/internals/set-global.js");
var IS_PURE = __webpack_require__("./node_modules/core-js/internals/is-pure.js");
var SHARED = "__core-js_shared__";
var store = global2[SHARED] || setGlobal(SHARED, {});
(module3.exports = function(key, value) {
return store[key] || (store[key] = value !== void 0 ? value : {});
})("versions", []).push({
version: "3.1.3",
mode: IS_PURE ? "pure" : "global",
copyright: "\xA9 2019 Denis Pushkarev (zloirock.ru)"
});
},
"./node_modules/core-js/internals/string-at.js": function(module3, exports2, __webpack_require__) {
var toInteger = __webpack_require__("./node_modules/core-js/internals/to-integer.js");
var requireObjectCoercible = __webpack_require__("./node_modules/core-js/internals/require-object-coercible.js");
module3.exports = function(that, pos, CONVERT_TO_STRING) {
var S = String(requireObjectCoercible(that));
var position = toInteger(pos);
var size = S.length;
var first, second;
if (position < 0 || position >= size)
return CONVERT_TO_STRING ? "" : void 0;
first = S.charCodeAt(position);
return first < 55296 || first > 56319 || position + 1 === size || (second = S.charCodeAt(position + 1)) < 56320 || second > 57343 ? CONVERT_TO_STRING ? S.charAt(position) : first : CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 55296 << 10) + (second - 56320) + 65536;
};
},
"./node_modules/core-js/internals/to-absolute-index.js": function(module3, exports2, __webpack_require__) {
var toInteger = __webpack_require__("./node_modules/core-js/internals/to-integer.js");
var max2 = Math.max;
var min2 = Math.min;
module3.exports = function(index, length) {
var integer = toInteger(index);
return integer < 0 ? max2(integer + length, 0) : min2(integer, length);
};
},
"./node_modules/core-js/internals/to-indexed-object.js": function(module3, exports2, __webpack_require__) {
var IndexedObject = __webpack_require__("./node_modules/core-js/internals/indexed-object.js");
var requireObjectCoercible = __webpack_require__("./node_modules/core-js/internals/require-object-coercible.js");
module3.exports = function(it) {
return IndexedObject(requireObjectCoercible(it));
};
},
"./node_modules/core-js/internals/to-integer.js": function(module3, exports2) {
var ceil = Math.ceil;
var floor = Math.floor;
module3.exports = function(argument) {
return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);
};
},
"./node_modules/core-js/internals/to-length.js": function(module3, exports2, __webpack_require__) {
var toInteger = __webpack_require__("./node_modules/core-js/internals/to-integer.js");
var min2 = Math.min;
module3.exports = function(argument) {
return argument > 0 ? min2(toInteger(argument), 9007199254740991) : 0;
};
},
"./node_modules/core-js/internals/to-object.js": function(module3, exports2, __webpack_require__) {
var requireObjectCoercible = __webpack_require__("./node_modules/core-js/internals/require-object-coercible.js");
module3.exports = function(argument) {
return Object(requireObjectCoercible(argument));
};
},
"./node_modules/core-js/internals/to-primitive.js": function(module3, exports2, __webpack_require__) {
var isObject = __webpack_require__("./node_modules/core-js/internals/is-object.js");
module3.exports = function(it, S) {
if (!isObject(it))
return it;
var fn2, val;
if (S && typeof (fn2 = it.toString) == "function" && !isObject(val = fn2.call(it)))
return val;
if (typeof (fn2 = it.valueOf) == "function" && !isObject(val = fn2.call(it)))
return val;
if (!S && typeof (fn2 = it.toString) == "function" && !isObject(val = fn2.call(it)))
return val;
throw TypeError("Can't convert object to primitive value");
};
},
"./node_modules/core-js/internals/uid.js": function(module3, exports2) {
var id = 0;
var postfix = Math.random();
module3.exports = function(key) {
return "Symbol(".concat(key === void 0 ? "" : key, ")_", (++id + postfix).toString(36));
};
},
"./node_modules/core-js/internals/validate-set-prototype-of-arguments.js": function(module3, exports2, __webpack_require__) {
var isObject = __webpack_require__("./node_modules/core-js/internals/is-object.js");
var anObject = __webpack_require__("./node_modules/core-js/internals/an-object.js");
module3.exports = function(O, proto) {
anObject(O);
if (!isObject(proto) && proto !== null) {
throw TypeError("Can't set " + String(proto) + " as a prototype");
}
};
},
"./node_modules/core-js/internals/well-known-symbol.js": function(module3, exports2, __webpack_require__) {
var global2 = __webpack_require__("./node_modules/core-js/internals/global.js");
var shared = __webpack_require__("./node_modules/core-js/internals/shared.js");
var uid = __webpack_require__("./node_modules/core-js/internals/uid.js");
var NATIVE_SYMBOL = __webpack_require__("./node_modules/core-js/internals/native-symbol.js");
var Symbol2 = global2.Symbol;
var store = shared("wks");
module3.exports = function(name) {
return store[name] || (store[name] = NATIVE_SYMBOL && Symbol2[name] || (NATIVE_SYMBOL ? Symbol2 : uid)("Symbol." + name));
};
},
"./node_modules/core-js/modules/es.array.from.js": function(module3, exports2, __webpack_require__) {
var $ = __webpack_require__("./node_modules/core-js/internals/export.js");
var from = __webpack_require__("./node_modules/core-js/internals/array-from.js");
var checkCorrectnessOfIteration = __webpack_require__("./node_modules/core-js/internals/check-correctness-of-iteration.js");
var INCORRECT_ITERATION = !checkCorrectnessOfIteration(function(iterable) {
Array.from(iterable);
});
$({ target: "Array", stat: true, forced: INCORRECT_ITERATION }, {
from
});
},
"./node_modules/core-js/modules/es.string.iterator.js": function(module3, exports2, __webpack_require__) {
"use strict";
var codePointAt = __webpack_require__("./node_modules/core-js/internals/string-at.js");
var InternalStateModule = __webpack_require__("./node_modules/core-js/internals/internal-state.js");
var defineIterator = __webpack_require__("./node_modules/core-js/internals/define-iterator.js");
var STRING_ITERATOR = "String Iterator";
var setInternalState = InternalStateModule.set;
var getInternalState = InternalStateModule.getterFor(STRING_ITERATOR);
defineIterator(String, "String", function(iterated) {
setInternalState(this, {
type: STRING_ITERATOR,
string: String(iterated),
index: 0
});
}, function next() {
var state = getInternalState(this);
var string = state.string;
var index = state.index;
var point;
if (index >= string.length)
return { value: void 0, done: true };
point = codePointAt(string, index, true);
state.index += point.length;
return { value: point, done: false };
});
},
"./node_modules/webpack/buildin/global.js": function(module3, exports2) {
var g;
g = function() {
return this;
}();
try {
g = g || Function("return this")() || (1, eval)("this");
} catch (e) {
if (typeof window === "object")
g = window;
}
module3.exports = g;
},
"./src/default-attrs.json": function(module3) {
module3.exports = { "xmlns": "http://www.w3.org/2000/svg", "width": 24, "height": 24, "viewBox": "0 0 24 24", "fill": "none", "stroke": "currentColor", "stroke-width": 2, "stroke-linecap": "round", "stroke-linejoin": "round" };
},
"./src/icon.js": function(module3, exports2, __webpack_require__) {
"use strict";
Object.defineProperty(exports2, "__esModule", {
value: true
});
var _extends = Object.assign || function(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}
return target;
};
var _createClass = function() {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || false;
descriptor.configurable = true;
if ("value" in descriptor)
descriptor.writable = true;
Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function(Constructor, protoProps, staticProps) {
if (protoProps)
defineProperties(Constructor.prototype, protoProps);
if (staticProps)
defineProperties(Constructor, staticProps);
return Constructor;
};
}();
var _dedupe = __webpack_require__("./node_modules/classnames/dedupe.js");
var _dedupe2 = _interopRequireDefault(_dedupe);
var _defaultAttrs = __webpack_require__("./src/default-attrs.json");
var _defaultAttrs2 = _interopRequireDefault(_defaultAttrs);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
function _classCallCheck(instance6, Constructor) {
if (!(instance6 instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}
var Icon = function() {
function Icon2(name, contents) {
var tags = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : [];
_classCallCheck(this, Icon2);
this.name = name;
this.contents = contents;
this.tags = tags;
this.attrs = _extends({}, _defaultAttrs2.default, { class: "feather feather-" + name });
}
_createClass(Icon2, [{
key: "toSvg",
value: function toSvg() {
var attrs = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
var combinedAttrs = _extends({}, this.attrs, attrs, { class: (0, _dedupe2.default)(this.attrs.class, attrs.class) });
return "";
}
}, {
key: "toString",
value: function toString() {
return this.contents;
}
}]);
return Icon2;
}();
function attrsToString(attrs) {
return Object.keys(attrs).map(function(key) {
return key + '="' + attrs[key] + '"';
}).join(" ");
}
exports2.default = Icon;
},
"./src/icons.js": function(module3, exports2, __webpack_require__) {
"use strict";
Object.defineProperty(exports2, "__esModule", {
value: true
});
var _icon = __webpack_require__("./src/icon.js");
var _icon2 = _interopRequireDefault(_icon);
var _icons = __webpack_require__("./dist/icons.json");
var _icons2 = _interopRequireDefault(_icons);
var _tags = __webpack_require__("./src/tags.json");
var _tags2 = _interopRequireDefault(_tags);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
exports2.default = Object.keys(_icons2.default).map(function(key) {
return new _icon2.default(key, _icons2.default[key], _tags2.default[key]);
}).reduce(function(object, icon) {
object[icon.name] = icon;
return object;
}, {});
},
"./src/index.js": function(module3, exports2, __webpack_require__) {
"use strict";
var _icons = __webpack_require__("./src/icons.js");
var _icons2 = _interopRequireDefault(_icons);
var _toSvg = __webpack_require__("./src/to-svg.js");
var _toSvg2 = _interopRequireDefault(_toSvg);
var _replace = __webpack_require__("./src/replace.js");
var _replace2 = _interopRequireDefault(_replace);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
module3.exports = { icons: _icons2.default, toSvg: _toSvg2.default, replace: _replace2.default };
},
"./src/replace.js": function(module3, exports2, __webpack_require__) {
"use strict";
Object.defineProperty(exports2, "__esModule", {
value: true
});
var _extends = Object.assign || function(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}
return target;
};
var _dedupe = __webpack_require__("./node_modules/classnames/dedupe.js");
var _dedupe2 = _interopRequireDefault(_dedupe);
var _icons = __webpack_require__("./src/icons.js");
var _icons2 = _interopRequireDefault(_icons);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
function replace() {
var attrs = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
if (typeof document === "undefined") {
throw new Error("`feather.replace()` only works in a browser environment.");
}
var elementsToReplace = document.querySelectorAll("[data-feather]");
Array.from(elementsToReplace).forEach(function(element2) {
return replaceElement(element2, attrs);
});
}
function replaceElement(element2) {
var attrs = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
var elementAttrs = getAttrs(element2);
var name = elementAttrs["data-feather"];
delete elementAttrs["data-feather"];
var svgString = _icons2.default[name].toSvg(_extends({}, attrs, elementAttrs, { class: (0, _dedupe2.default)(attrs.class, elementAttrs.class) }));
var svgDocument = new DOMParser().parseFromString(svgString, "image/svg+xml");
var svgElement = svgDocument.querySelector("svg");
element2.parentNode.replaceChild(svgElement, element2);
}
function getAttrs(element2) {
return Array.from(element2.attributes).reduce(function(attrs, attr2) {
attrs[attr2.name] = attr2.value;
return attrs;
}, {});
}
exports2.default = replace;
},
"./src/tags.json": function(module3) {
module3.exports = { "activity": ["pulse", "health", "action", "motion"], "airplay": ["stream", "cast", "mirroring"], "alert-circle": ["warning", "alert", "danger"], "alert-octagon": ["warning", "alert", "danger"], "alert-triangle": ["warning", "alert", "danger"], "align-center": ["text alignment", "center"], "align-justify": ["text alignment", "justified"], "align-left": ["text alignment", "left"], "align-right": ["text alignment", "right"], "anchor": [], "archive": ["index", "box"], "at-sign": ["mention", "at", "email", "message"], "award": ["achievement", "badge"], "aperture": ["camera", "photo"], "bar-chart": ["statistics", "diagram", "graph"], "bar-chart-2": ["statistics", "diagram", "graph"], "battery": ["power", "electricity"], "battery-charging": ["power", "electricity"], "bell": ["alarm", "notification", "sound"], "bell-off": ["alarm", "notification", "silent"], "bluetooth": ["wireless"], "book-open": ["read", "library"], "book": ["read", "dictionary", "booklet", "magazine", "library"], "bookmark": ["read", "clip", "marker", "tag"], "box": ["cube"], "briefcase": ["work", "bag", "baggage", "folder"], "calendar": ["date"], "camera": ["photo"], "cast": ["chromecast", "airplay"], "circle": ["off", "zero", "record"], "clipboard": ["copy"], "clock": ["time", "watch", "alarm"], "cloud-drizzle": ["weather", "shower"], "cloud-lightning": ["weather", "bolt"], "cloud-rain": ["weather"], "cloud-snow": ["weather", "blizzard"], "cloud": ["weather"], "codepen": ["logo"], "codesandbox": ["logo"], "code": ["source", "programming"], "coffee": ["drink", "cup", "mug", "tea", "cafe", "hot", "beverage"], "columns": ["layout"], "command": ["keyboard", "cmd", "terminal", "prompt"], "compass": ["navigation", "safari", "travel", "direction"], "copy": ["clone", "duplicate"], "corner-down-left": ["arrow", "return"], "corner-down-right": ["arrow"], "corner-left-down": ["arrow"], "corner-left-up": ["arrow"], "corner-right-down": ["arrow"], "corner-right-up": ["arrow"], "corner-up-left": ["arrow"], "corner-up-right": ["arrow"], "cpu": ["processor", "technology"], "credit-card": ["purchase", "payment", "cc"], "crop": ["photo", "image"], "crosshair": ["aim", "target"], "database": ["storage", "memory"], "delete": ["remove"], "disc": ["album", "cd", "dvd", "music"], "dollar-sign": ["currency", "money", "payment"], "droplet": ["water"], "edit": ["pencil", "change"], "edit-2": ["pencil", "change"], "edit-3": ["pencil", "change"], "eye": ["view", "watch"], "eye-off": ["view", "watch", "hide", "hidden"], "external-link": ["outbound"], "facebook": ["logo", "social"], "fast-forward": ["music"], "figma": ["logo", "design", "tool"], "file-minus": ["delete", "remove", "erase"], "file-plus": ["add", "create", "new"], "file-text": ["data", "txt", "pdf"], "film": ["movie", "video"], "filter": ["funnel", "hopper"], "flag": ["report"], "folder-minus": ["directory"], "folder-plus": ["directory"], "folder": ["directory"], "framer": ["logo", "design", "tool"], "frown": ["emoji", "face", "bad", "sad", "emotion"], "gift": ["present", "box", "birthday", "party"], "git-branch": ["code", "version control"], "git-commit": ["code", "version control"], "git-merge": ["code", "version control"], "git-pull-request": ["code", "version control"], "github": ["logo", "version control"], "gitlab": ["logo", "version control"], "globe": ["world", "browser", "language", "translate"], "hard-drive": ["computer", "server", "memory", "data"], "hash": ["hashtag", "number", "pound"], "headphones": ["music", "audio", "sound"], "heart": ["like", "love", "emotion"], "help-circle": ["question mark"], "hexagon": ["shape", "node.js", "logo"], "home": ["house", "living"], "image": ["picture"], "inbox": ["email"], "instagram": ["logo", "camera"], "key": ["password", "login", "authentication", "secure"], "layers": ["stack"], "layout": ["window", "webpage"], "life-bouy": ["help", "life ring", "support"], "link": ["chain", "url"], "link-2": ["chain", "url"], "linkedin": ["logo", "social media"], "list": ["options"], "lock": ["security", "password", "secure"], "log-in": ["sign in", "arrow", "enter"], "log-out": ["sign out", "arrow", "exit"], "mail": ["email", "message"], "map-pin": ["location", "navigation", "travel", "marker"], "map": ["location", "navigation", "travel"], "maximize": ["fullscreen"], "maximize-2": ["fullscreen", "arrows", "expand"], "meh": ["emoji", "face", "neutral", "emotion"], "menu": ["bars", "navigation", "hamburger"], "message-circle": ["comment", "chat"], "message-square": ["comment", "chat"], "mic-off": ["record", "sound", "mute"], "mic": ["record", "sound", "listen"], "minimize": ["exit fullscreen", "close"], "minimize-2": ["exit fullscreen", "arrows", "close"], "minus": ["subtract"], "monitor": ["tv", "screen", "display"], "moon": ["dark", "night"], "more-horizontal": ["ellipsis"], "more-vertical": ["ellipsis"], "mouse-pointer": ["arrow", "cursor"], "move": ["arrows"], "music": ["note"], "navigation": ["location", "travel"], "navigation-2": ["location", "travel"], "octagon": ["stop"], "package": ["box", "container"], "paperclip": ["attachment"], "pause": ["music", "stop"], "pause-circle": ["music", "audio", "stop"], "pen-tool": ["vector", "drawing"], "percent": ["discount"], "phone-call": ["ring"], "phone-forwarded": ["call"], "phone-incoming": ["call"], "phone-missed": ["call"], "phone-off": ["call", "mute"], "phone-outgoing": ["call"], "phone": ["call"], "play": ["music", "start"], "pie-chart": ["statistics", "diagram"], "play-circle": ["music", "start"], "plus": ["add", "new"], "plus-circle": ["add", "new"], "plus-square": ["add", "new"], "pocket": ["logo", "save"], "power": ["on", "off"], "printer": ["fax", "office", "device"], "radio": ["signal"], "refresh-cw": ["synchronise", "arrows"], "refresh-ccw": ["arrows"], "repeat": ["loop", "arrows"], "rewind": ["music"], "rotate-ccw": ["arrow"], "rotate-cw": ["arrow"], "rss": ["feed", "subscribe"], "save": ["floppy disk"], "scissors": ["cut"], "search": ["find", "magnifier", "magnifying glass"], "send": ["message", "mail", "email", "paper airplane", "paper aeroplane"], "settings": ["cog", "edit", "gear", "preferences"], "share-2": ["network", "connections"], "shield": ["security", "secure"], "shield-off": ["security", "insecure"], "shopping-bag": ["ecommerce", "cart", "purchase", "store"], "shopping-cart": ["ecommerce", "cart", "purchase", "store"], "shuffle": ["music"], "skip-back": ["music"], "skip-forward": ["music"], "slack": ["logo"], "slash": ["ban", "no"], "sliders": ["settings", "controls"], "smartphone": ["cellphone", "device"], "smile": ["emoji", "face", "happy", "good", "emotion"], "speaker": ["audio", "music"], "star": ["bookmark", "favorite", "like"], "stop-circle": ["media", "music"], "sun": ["brightness", "weather", "light"], "sunrise": ["weather", "time", "morning", "day"], "sunset": ["weather", "time", "evening", "night"], "tablet": ["device"], "tag": ["label"], "target": ["logo", "bullseye"], "terminal": ["code", "command line", "prompt"], "thermometer": ["temperature", "celsius", "fahrenheit", "weather"], "thumbs-down": ["dislike", "bad", "emotion"], "thumbs-up": ["like", "good", "emotion"], "toggle-left": ["on", "off", "switch"], "toggle-right": ["on", "off", "switch"], "tool": ["settings", "spanner"], "trash": ["garbage", "delete", "remove", "bin"], "trash-2": ["garbage", "delete", "remove", "bin"], "triangle": ["delta"], "truck": ["delivery", "van", "shipping", "transport", "lorry"], "tv": ["television", "stream"], "twitch": ["logo"], "twitter": ["logo", "social"], "type": ["text"], "umbrella": ["rain", "weather"], "unlock": ["security"], "user-check": ["followed", "subscribed"], "user-minus": ["delete", "remove", "unfollow", "unsubscribe"], "user-plus": ["new", "add", "create", "follow", "subscribe"], "user-x": ["delete", "remove", "unfollow", "unsubscribe", "unavailable"], "user": ["person", "account"], "users": ["group"], "video-off": ["camera", "movie", "film"], "video": ["camera", "movie", "film"], "voicemail": ["phone"], "volume": ["music", "sound", "mute"], "volume-1": ["music", "sound"], "volume-2": ["music", "sound"], "volume-x": ["music", "sound", "mute"], "watch": ["clock", "time"], "wifi-off": ["disabled"], "wifi": ["connection", "signal", "wireless"], "wind": ["weather", "air"], "x-circle": ["cancel", "close", "delete", "remove", "times", "clear"], "x-octagon": ["delete", "stop", "alert", "warning", "times", "clear"], "x-square": ["cancel", "close", "delete", "remove", "times", "clear"], "x": ["cancel", "close", "delete", "remove", "times", "clear"], "youtube": ["logo", "video", "play"], "zap-off": ["flash", "camera", "lightning"], "zap": ["flash", "camera", "lightning"], "zoom-in": ["magnifying glass"], "zoom-out": ["magnifying glass"] };
},
"./src/to-svg.js": function(module3, exports2, __webpack_require__) {
"use strict";
Object.defineProperty(exports2, "__esModule", {
value: true
});
var _icons = __webpack_require__("./src/icons.js");
var _icons2 = _interopRequireDefault(_icons);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
}
function toSvg(name) {
var attrs = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
console.warn("feather.toSvg() is deprecated. Please use feather.icons[name].toSvg() instead.");
if (!name) {
throw new Error("The required `key` (icon name) parameter is missing.");
}
if (!_icons2.default[name]) {
throw new Error("No icon matching '" + name + "'. See the complete list of icons at https://feathericons.com");
}
return _icons2.default[name].toSvg(attrs);
}
exports2.default = toSvg;
},
0: function(module3, exports2, __webpack_require__) {
__webpack_require__("./node_modules/core-js/es/array/from.js");
module3.exports = __webpack_require__("./src/index.js");
}
});
});
}
});
// node_modules/ts-md5/dist/md5.js
var require_md5 = __commonJS({
"node_modules/ts-md5/dist/md5.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var Md54 = function() {
function Md55() {
this._state = new Int32Array(4);
this._buffer = new ArrayBuffer(68);
this._buffer8 = new Uint8Array(this._buffer, 0, 68);
this._buffer32 = new Uint32Array(this._buffer, 0, 17);
this.start();
}
Md55.hashStr = function(str, raw) {
if (raw === void 0) {
raw = false;
}
return this.onePassHasher.start().appendStr(str).end(raw);
};
Md55.hashAsciiStr = function(str, raw) {
if (raw === void 0) {
raw = false;
}
return this.onePassHasher.start().appendAsciiStr(str).end(raw);
};
Md55._hex = function(x) {
var hc = Md55.hexChars;
var ho = Md55.hexOut;
var n;
var offset2;
var j;
var i;
for (i = 0; i < 4; i += 1) {
offset2 = i * 8;
n = x[i];
for (j = 0; j < 8; j += 2) {
ho[offset2 + 1 + j] = hc.charAt(n & 15);
n >>>= 4;
ho[offset2 + 0 + j] = hc.charAt(n & 15);
n >>>= 4;
}
}
return ho.join("");
};
Md55._md5cycle = function(x, k) {
var a = x[0];
var b = x[1];
var c = x[2];
var d = x[3];
a += (b & c | ~b & d) + k[0] - 680876936 | 0;
a = (a << 7 | a >>> 25) + b | 0;
d += (a & b | ~a & c) + k[1] - 389564586 | 0;
d = (d << 12 | d >>> 20) + a | 0;
c += (d & a | ~d & b) + k[2] + 606105819 | 0;
c = (c << 17 | c >>> 15) + d | 0;
b += (c & d | ~c & a) + k[3] - 1044525330 | 0;
b = (b << 22 | b >>> 10) + c | 0;
a += (b & c | ~b & d) + k[4] - 176418897 | 0;
a = (a << 7 | a >>> 25) + b | 0;
d += (a & b | ~a & c) + k[5] + 1200080426 | 0;
d = (d << 12 | d >>> 20) + a | 0;
c += (d & a | ~d & b) + k[6] - 1473231341 | 0;
c = (c << 17 | c >>> 15) + d | 0;
b += (c & d | ~c & a) + k[7] - 45705983 | 0;
b = (b << 22 | b >>> 10) + c | 0;
a += (b & c | ~b & d) + k[8] + 1770035416 | 0;
a = (a << 7 | a >>> 25) + b | 0;
d += (a & b | ~a & c) + k[9] - 1958414417 | 0;
d = (d << 12 | d >>> 20) + a | 0;
c += (d & a | ~d & b) + k[10] - 42063 | 0;
c = (c << 17 | c >>> 15) + d | 0;
b += (c & d | ~c & a) + k[11] - 1990404162 | 0;
b = (b << 22 | b >>> 10) + c | 0;
a += (b & c | ~b & d) + k[12] + 1804603682 | 0;
a = (a << 7 | a >>> 25) + b | 0;
d += (a & b | ~a & c) + k[13] - 40341101 | 0;
d = (d << 12 | d >>> 20) + a | 0;
c += (d & a | ~d & b) + k[14] - 1502002290 | 0;
c = (c << 17 | c >>> 15) + d | 0;
b += (c & d | ~c & a) + k[15] + 1236535329 | 0;
b = (b << 22 | b >>> 10) + c | 0;
a += (b & d | c & ~d) + k[1] - 165796510 | 0;
a = (a << 5 | a >>> 27) + b | 0;
d += (a & c | b & ~c) + k[6] - 1069501632 | 0;
d = (d << 9 | d >>> 23) + a | 0;
c += (d & b | a & ~b) + k[11] + 643717713 | 0;
c = (c << 14 | c >>> 18) + d | 0;
b += (c & a | d & ~a) + k[0] - 373897302 | 0;
b = (b << 20 | b >>> 12) + c | 0;
a += (b & d | c & ~d) + k[5] - 701558691 | 0;
a = (a << 5 | a >>> 27) + b | 0;
d += (a & c | b & ~c) + k[10] + 38016083 | 0;
d = (d << 9 | d >>> 23) + a | 0;
c += (d & b | a & ~b) + k[15] - 660478335 | 0;
c = (c << 14 | c >>> 18) + d | 0;
b += (c & a | d & ~a) + k[4] - 405537848 | 0;
b = (b << 20 | b >>> 12) + c | 0;
a += (b & d | c & ~d) + k[9] + 568446438 | 0;
a = (a << 5 | a >>> 27) + b | 0;
d += (a & c | b & ~c) + k[14] - 1019803690 | 0;
d = (d << 9 | d >>> 23) + a | 0;
c += (d & b | a & ~b) + k[3] - 187363961 | 0;
c = (c << 14 | c >>> 18) + d | 0;
b += (c & a | d & ~a) + k[8] + 1163531501 | 0;
b = (b << 20 | b >>> 12) + c | 0;
a += (b & d | c & ~d) + k[13] - 1444681467 | 0;
a = (a << 5 | a >>> 27) + b | 0;
d += (a & c | b & ~c) + k[2] - 51403784 | 0;
d = (d << 9 | d >>> 23) + a | 0;
c += (d & b | a & ~b) + k[7] + 1735328473 | 0;
c = (c << 14 | c >>> 18) + d | 0;
b += (c & a | d & ~a) + k[12] - 1926607734 | 0;
b = (b << 20 | b >>> 12) + c | 0;
a += (b ^ c ^ d) + k[5] - 378558 | 0;
a = (a << 4 | a >>> 28) + b | 0;
d += (a ^ b ^ c) + k[8] - 2022574463 | 0;
d = (d << 11 | d >>> 21) + a | 0;
c += (d ^ a ^ b) + k[11] + 1839030562 | 0;
c = (c << 16 | c >>> 16) + d | 0;
b += (c ^ d ^ a) + k[14] - 35309556 | 0;
b = (b << 23 | b >>> 9) + c | 0;
a += (b ^ c ^ d) + k[1] - 1530992060 | 0;
a = (a << 4 | a >>> 28) + b | 0;
d += (a ^ b ^ c) + k[4] + 1272893353 | 0;
d = (d << 11 | d >>> 21) + a | 0;
c += (d ^ a ^ b) + k[7] - 155497632 | 0;
c = (c << 16 | c >>> 16) + d | 0;
b += (c ^ d ^ a) + k[10] - 1094730640 | 0;
b = (b << 23 | b >>> 9) + c | 0;
a += (b ^ c ^ d) + k[13] + 681279174 | 0;
a = (a << 4 | a >>> 28) + b | 0;
d += (a ^ b ^ c) + k[0] - 358537222 | 0;
d = (d << 11 | d >>> 21) + a | 0;
c += (d ^ a ^ b) + k[3] - 722521979 | 0;
c = (c << 16 | c >>> 16) + d | 0;
b += (c ^ d ^ a) + k[6] + 76029189 | 0;
b = (b << 23 | b >>> 9) + c | 0;
a += (b ^ c ^ d) + k[9] - 640364487 | 0;
a = (a << 4 | a >>> 28) + b | 0;
d += (a ^ b ^ c) + k[12] - 421815835 | 0;
d = (d << 11 | d >>> 21) + a | 0;
c += (d ^ a ^ b) + k[15] + 530742520 | 0;
c = (c << 16 | c >>> 16) + d | 0;
b += (c ^ d ^ a) + k[2] - 995338651 | 0;
b = (b << 23 | b >>> 9) + c | 0;
a += (c ^ (b | ~d)) + k[0] - 198630844 | 0;
a = (a << 6 | a >>> 26) + b | 0;
d += (b ^ (a | ~c)) + k[7] + 1126891415 | 0;
d = (d << 10 | d >>> 22) + a | 0;
c += (a ^ (d | ~b)) + k[14] - 1416354905 | 0;
c = (c << 15 | c >>> 17) + d | 0;
b += (d ^ (c | ~a)) + k[5] - 57434055 | 0;
b = (b << 21 | b >>> 11) + c | 0;
a += (c ^ (b | ~d)) + k[12] + 1700485571 | 0;
a = (a << 6 | a >>> 26) + b | 0;
d += (b ^ (a | ~c)) + k[3] - 1894986606 | 0;
d = (d << 10 | d >>> 22) + a | 0;
c += (a ^ (d | ~b)) + k[10] - 1051523 | 0;
c = (c << 15 | c >>> 17) + d | 0;
b += (d ^ (c | ~a)) + k[1] - 2054922799 | 0;
b = (b << 21 | b >>> 11) + c | 0;
a += (c ^ (b | ~d)) + k[8] + 1873313359 | 0;
a = (a << 6 | a >>> 26) + b | 0;
d += (b ^ (a | ~c)) + k[15] - 30611744 | 0;
d = (d << 10 | d >>> 22) + a | 0;
c += (a ^ (d | ~b)) + k[6] - 1560198380 | 0;
c = (c << 15 | c >>> 17) + d | 0;
b += (d ^ (c | ~a)) + k[13] + 1309151649 | 0;
b = (b << 21 | b >>> 11) + c | 0;
a += (c ^ (b | ~d)) + k[4] - 145523070 | 0;
a = (a << 6 | a >>> 26) + b | 0;
d += (b ^ (a | ~c)) + k[11] - 1120210379 | 0;
d = (d << 10 | d >>> 22) + a | 0;
c += (a ^ (d | ~b)) + k[2] + 718787259 | 0;
c = (c << 15 | c >>> 17) + d | 0;
b += (d ^ (c | ~a)) + k[9] - 343485551 | 0;
b = (b << 21 | b >>> 11) + c | 0;
x[0] = a + x[0] | 0;
x[1] = b + x[1] | 0;
x[2] = c + x[2] | 0;
x[3] = d + x[3] | 0;
};
Md55.prototype.start = function() {
this._dataLength = 0;
this._bufferLength = 0;
this._state.set(Md55.stateIdentity);
return this;
};
Md55.prototype.appendStr = function(str) {
var buf8 = this._buffer8;
var buf32 = this._buffer32;
var bufLen = this._bufferLength;
var code;
var i;
for (i = 0; i < str.length; i += 1) {
code = str.charCodeAt(i);
if (code < 128) {
buf8[bufLen++] = code;
} else if (code < 2048) {
buf8[bufLen++] = (code >>> 6) + 192;
buf8[bufLen++] = code & 63 | 128;
} else if (code < 55296 || code > 56319) {
buf8[bufLen++] = (code >>> 12) + 224;
buf8[bufLen++] = code >>> 6 & 63 | 128;
buf8[bufLen++] = code & 63 | 128;
} else {
code = (code - 55296) * 1024 + (str.charCodeAt(++i) - 56320) + 65536;
if (code > 1114111) {
throw new Error("Unicode standard supports code points up to U+10FFFF");
}
buf8[bufLen++] = (code >>> 18) + 240;
buf8[bufLen++] = code >>> 12 & 63 | 128;
buf8[bufLen++] = code >>> 6 & 63 | 128;
buf8[bufLen++] = code & 63 | 128;
}
if (bufLen >= 64) {
this._dataLength += 64;
Md55._md5cycle(this._state, buf32);
bufLen -= 64;
buf32[0] = buf32[16];
}
}
this._bufferLength = bufLen;
return this;
};
Md55.prototype.appendAsciiStr = function(str) {
var buf8 = this._buffer8;
var buf32 = this._buffer32;
var bufLen = this._bufferLength;
var i;
var j = 0;
for (; ; ) {
i = Math.min(str.length - j, 64 - bufLen);
while (i--) {
buf8[bufLen++] = str.charCodeAt(j++);
}
if (bufLen < 64) {
break;
}
this._dataLength += 64;
Md55._md5cycle(this._state, buf32);
bufLen = 0;
}
this._bufferLength = bufLen;
return this;
};
Md55.prototype.appendByteArray = function(input) {
var buf8 = this._buffer8;
var buf32 = this._buffer32;
var bufLen = this._bufferLength;
var i;
var j = 0;
for (; ; ) {
i = Math.min(input.length - j, 64 - bufLen);
while (i--) {
buf8[bufLen++] = input[j++];
}
if (bufLen < 64) {
break;
}
this._dataLength += 64;
Md55._md5cycle(this._state, buf32);
bufLen = 0;
}
this._bufferLength = bufLen;
return this;
};
Md55.prototype.getState = function() {
var self2 = this;
var s = self2._state;
return {
buffer: String.fromCharCode.apply(null, self2._buffer8),
buflen: self2._bufferLength,
length: self2._dataLength,
state: [s[0], s[1], s[2], s[3]]
};
};
Md55.prototype.setState = function(state) {
var buf = state.buffer;
var x = state.state;
var s = this._state;
var i;
this._dataLength = state.length;
this._bufferLength = state.buflen;
s[0] = x[0];
s[1] = x[1];
s[2] = x[2];
s[3] = x[3];
for (i = 0; i < buf.length; i += 1) {
this._buffer8[i] = buf.charCodeAt(i);
}
};
Md55.prototype.end = function(raw) {
if (raw === void 0) {
raw = false;
}
var bufLen = this._bufferLength;
var buf8 = this._buffer8;
var buf32 = this._buffer32;
var i = (bufLen >> 2) + 1;
var dataBitsLen;
this._dataLength += bufLen;
buf8[bufLen] = 128;
buf8[bufLen + 1] = buf8[bufLen + 2] = buf8[bufLen + 3] = 0;
buf32.set(Md55.buffer32Identity.subarray(i), i);
if (bufLen > 55) {
Md55._md5cycle(this._state, buf32);
buf32.set(Md55.buffer32Identity);
}
dataBitsLen = this._dataLength * 8;
if (dataBitsLen <= 4294967295) {
buf32[14] = dataBitsLen;
} else {
var matches = dataBitsLen.toString(16).match(/(.*?)(.{0,8})$/);
if (matches === null) {
return;
}
var lo = parseInt(matches[2], 16);
var hi = parseInt(matches[1], 16) || 0;
buf32[14] = lo;
buf32[15] = hi;
}
Md55._md5cycle(this._state, buf32);
return raw ? this._state : Md55._hex(this._state);
};
Md55.stateIdentity = new Int32Array([1732584193, -271733879, -1732584194, 271733878]);
Md55.buffer32Identity = new Int32Array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]);
Md55.hexChars = "0123456789abcdef";
Md55.hexOut = [];
Md55.onePassHasher = new Md55();
return Md55;
}();
exports.Md5 = Md54;
if (Md54.hashStr("hello") !== "5d41402abc4b2a76b9719d911017c592") {
console.error("Md5 self test failed.");
}
}
});
// node_modules/lodash.groupby/index.js
var require_lodash = __commonJS({
"node_modules/lodash.groupby/index.js"(exports, module2) {
var LARGE_ARRAY_SIZE = 200;
var FUNC_ERROR_TEXT = "Expected a function";
var HASH_UNDEFINED = "__lodash_hash_undefined__";
var UNORDERED_COMPARE_FLAG = 1;
var PARTIAL_COMPARE_FLAG = 2;
var INFINITY = 1 / 0;
var MAX_SAFE_INTEGER = 9007199254740991;
var argsTag = "[object Arguments]";
var arrayTag = "[object Array]";
var boolTag = "[object Boolean]";
var dateTag = "[object Date]";
var errorTag = "[object Error]";
var funcTag = "[object Function]";
var genTag = "[object GeneratorFunction]";
var mapTag = "[object Map]";
var numberTag = "[object Number]";
var objectTag = "[object Object]";
var promiseTag = "[object Promise]";
var regexpTag = "[object RegExp]";
var setTag = "[object Set]";
var stringTag = "[object String]";
var symbolTag = "[object Symbol]";
var weakMapTag = "[object WeakMap]";
var arrayBufferTag = "[object ArrayBuffer]";
var dataViewTag = "[object DataView]";
var float32Tag = "[object Float32Array]";
var float64Tag = "[object Float64Array]";
var int8Tag = "[object Int8Array]";
var int16Tag = "[object Int16Array]";
var int32Tag = "[object Int32Array]";
var uint8Tag = "[object Uint8Array]";
var uint8ClampedTag = "[object Uint8ClampedArray]";
var uint16Tag = "[object Uint16Array]";
var uint32Tag = "[object Uint32Array]";
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/;
var reIsPlainProp = /^\w*$/;
var reLeadingDot = /^\./;
var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
var reEscapeChar = /\\(\\)?/g;
var reIsHostCtor = /^\[object .+?Constructor\]$/;
var reIsUint = /^(?:0|[1-9]\d*)$/;
var typedArrayTags = {};
typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true;
typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;
var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
var freeSelf = typeof self == "object" && self && self.Object === Object && self;
var root = freeGlobal || freeSelf || Function("return this")();
var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
var freeModule = freeExports && typeof module2 == "object" && module2 && !module2.nodeType && module2;
var moduleExports = freeModule && freeModule.exports === freeExports;
var freeProcess = moduleExports && freeGlobal.process;
var nodeUtil = function() {
try {
return freeProcess && freeProcess.binding("util");
} catch (e) {
}
}();
var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
function arrayAggregator(array, setter, iteratee, accumulator) {
var index = -1, length = array ? array.length : 0;
while (++index < length) {
var value = array[index];
setter(accumulator, value, iteratee(value), array);
}
return accumulator;
}
function arraySome(array, predicate) {
var index = -1, length = array ? array.length : 0;
while (++index < length) {
if (predicate(array[index], index, array)) {
return true;
}
}
return false;
}
function baseProperty(key) {
return function(object) {
return object == null ? void 0 : object[key];
};
}
function baseTimes(n, iteratee) {
var index = -1, result = Array(n);
while (++index < n) {
result[index] = iteratee(index);
}
return result;
}
function baseUnary(func) {
return function(value) {
return func(value);
};
}
function getValue(object, key) {
return object == null ? void 0 : object[key];
}
function isHostObject(value) {
var result = false;
if (value != null && typeof value.toString != "function") {
try {
result = !!(value + "");
} catch (e) {
}
}
return result;
}
function mapToArray(map) {
var index = -1, result = Array(map.size);
map.forEach(function(value, key) {
result[++index] = [key, value];
});
return result;
}
function overArg(func, transform) {
return function(arg) {
return func(transform(arg));
};
}
function setToArray(set) {
var index = -1, result = Array(set.size);
set.forEach(function(value) {
result[++index] = value;
});
return result;
}
var arrayProto = Array.prototype;
var funcProto = Function.prototype;
var objectProto = Object.prototype;
var coreJsData = root["__core-js_shared__"];
var maskSrcKey = function() {
var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
return uid ? "Symbol(src)_1." + uid : "";
}();
var funcToString = funcProto.toString;
var hasOwnProperty = objectProto.hasOwnProperty;
var objectToString = objectProto.toString;
var reIsNative = RegExp("^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
var Symbol2 = root.Symbol;
var Uint8Array2 = root.Uint8Array;
var propertyIsEnumerable = objectProto.propertyIsEnumerable;
var splice = arrayProto.splice;
var nativeKeys = overArg(Object.keys, Object);
var DataView = getNative(root, "DataView");
var Map2 = getNative(root, "Map");
var Promise2 = getNative(root, "Promise");
var Set2 = getNative(root, "Set");
var WeakMap = getNative(root, "WeakMap");
var nativeCreate = getNative(Object, "create");
var dataViewCtorString = toSource(DataView);
var mapCtorString = toSource(Map2);
var promiseCtorString = toSource(Promise2);
var setCtorString = toSource(Set2);
var weakMapCtorString = toSource(WeakMap);
var symbolProto = Symbol2 ? Symbol2.prototype : void 0;
var symbolValueOf = symbolProto ? symbolProto.valueOf : void 0;
var symbolToString = symbolProto ? symbolProto.toString : void 0;
function Hash(entries) {
var index = -1, length = entries ? entries.length : 0;
this.clear();
while (++index < length) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
}
function hashClear() {
this.__data__ = nativeCreate ? nativeCreate(null) : {};
}
function hashDelete(key) {
return this.has(key) && delete this.__data__[key];
}
function hashGet(key) {
var data = this.__data__;
if (nativeCreate) {
var result = data[key];
return result === HASH_UNDEFINED ? void 0 : result;
}
return hasOwnProperty.call(data, key) ? data[key] : void 0;
}
function hashHas(key) {
var data = this.__data__;
return nativeCreate ? data[key] !== void 0 : hasOwnProperty.call(data, key);
}
function hashSet(key, value) {
var data = this.__data__;
data[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED : value;
return this;
}
Hash.prototype.clear = hashClear;
Hash.prototype["delete"] = hashDelete;
Hash.prototype.get = hashGet;
Hash.prototype.has = hashHas;
Hash.prototype.set = hashSet;
function ListCache(entries) {
var index = -1, length = entries ? entries.length : 0;
this.clear();
while (++index < length) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
}
function listCacheClear() {
this.__data__ = [];
}
function listCacheDelete(key) {
var data = this.__data__, index = assocIndexOf(data, key);
if (index < 0) {
return false;
}
var lastIndex = data.length - 1;
if (index == lastIndex) {
data.pop();
} else {
splice.call(data, index, 1);
}
return true;
}
function listCacheGet(key) {
var data = this.__data__, index = assocIndexOf(data, key);
return index < 0 ? void 0 : data[index][1];
}
function listCacheHas(key) {
return assocIndexOf(this.__data__, key) > -1;
}
function listCacheSet(key, value) {
var data = this.__data__, index = assocIndexOf(data, key);
if (index < 0) {
data.push([key, value]);
} else {
data[index][1] = value;
}
return this;
}
ListCache.prototype.clear = listCacheClear;
ListCache.prototype["delete"] = listCacheDelete;
ListCache.prototype.get = listCacheGet;
ListCache.prototype.has = listCacheHas;
ListCache.prototype.set = listCacheSet;
function MapCache(entries) {
var index = -1, length = entries ? entries.length : 0;
this.clear();
while (++index < length) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
}
function mapCacheClear() {
this.__data__ = {
"hash": new Hash(),
"map": new (Map2 || ListCache)(),
"string": new Hash()
};
}
function mapCacheDelete(key) {
return getMapData(this, key)["delete"](key);
}
function mapCacheGet(key) {
return getMapData(this, key).get(key);
}
function mapCacheHas(key) {
return getMapData(this, key).has(key);
}
function mapCacheSet(key, value) {
getMapData(this, key).set(key, value);
return this;
}
MapCache.prototype.clear = mapCacheClear;
MapCache.prototype["delete"] = mapCacheDelete;
MapCache.prototype.get = mapCacheGet;
MapCache.prototype.has = mapCacheHas;
MapCache.prototype.set = mapCacheSet;
function SetCache(values2) {
var index = -1, length = values2 ? values2.length : 0;
this.__data__ = new MapCache();
while (++index < length) {
this.add(values2[index]);
}
}
function setCacheAdd(value) {
this.__data__.set(value, HASH_UNDEFINED);
return this;
}
function setCacheHas(value) {
return this.__data__.has(value);
}
SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
SetCache.prototype.has = setCacheHas;
function Stack(entries) {
this.__data__ = new ListCache(entries);
}
function stackClear() {
this.__data__ = new ListCache();
}
function stackDelete(key) {
return this.__data__["delete"](key);
}
function stackGet(key) {
return this.__data__.get(key);
}
function stackHas(key) {
return this.__data__.has(key);
}
function stackSet(key, value) {
var cache = this.__data__;
if (cache instanceof ListCache) {
var pairs = cache.__data__;
if (!Map2 || pairs.length < LARGE_ARRAY_SIZE - 1) {
pairs.push([key, value]);
return this;
}
cache = this.__data__ = new MapCache(pairs);
}
cache.set(key, value);
return this;
}
Stack.prototype.clear = stackClear;
Stack.prototype["delete"] = stackDelete;
Stack.prototype.get = stackGet;
Stack.prototype.has = stackHas;
Stack.prototype.set = stackSet;
function arrayLikeKeys(value, inherited) {
var result = isArray(value) || isArguments(value) ? baseTimes(value.length, String) : [];
var length = result.length, skipIndexes = !!length;
for (var key in value) {
if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && (key == "length" || isIndex(key, length)))) {
result.push(key);
}
}
return result;
}
function assocIndexOf(array, key) {
var length = array.length;
while (length--) {
if (eq(array[length][0], key)) {
return length;
}
}
return -1;
}
function baseAggregator(collection, setter, iteratee, accumulator) {
baseEach(collection, function(value, key, collection2) {
setter(accumulator, value, iteratee(value), collection2);
});
return accumulator;
}
var baseEach = createBaseEach(baseForOwn);
var baseFor = createBaseFor();
function baseForOwn(object, iteratee) {
return object && baseFor(object, iteratee, keys);
}
function baseGet(object, path) {
path = isKey(path, object) ? [path] : castPath(path);
var index = 0, length = path.length;
while (object != null && index < length) {
object = object[toKey(path[index++])];
}
return index && index == length ? object : void 0;
}
function baseGetTag(value) {
return objectToString.call(value);
}
function baseHasIn(object, key) {
return object != null && key in Object(object);
}
function baseIsEqual(value, other, customizer, bitmask, stack) {
if (value === other) {
return true;
}
if (value == null || other == null || !isObject(value) && !isObjectLike(other)) {
return value !== value && other !== other;
}
return baseIsEqualDeep(value, other, baseIsEqual, customizer, bitmask, stack);
}
function baseIsEqualDeep(object, other, equalFunc, customizer, bitmask, stack) {
var objIsArr = isArray(object), othIsArr = isArray(other), objTag = arrayTag, othTag = arrayTag;
if (!objIsArr) {
objTag = getTag(object);
objTag = objTag == argsTag ? objectTag : objTag;
}
if (!othIsArr) {
othTag = getTag(other);
othTag = othTag == argsTag ? objectTag : othTag;
}
var objIsObj = objTag == objectTag && !isHostObject(object), othIsObj = othTag == objectTag && !isHostObject(other), isSameTag = objTag == othTag;
if (isSameTag && !objIsObj) {
stack || (stack = new Stack());
return objIsArr || isTypedArray(object) ? equalArrays(object, other, equalFunc, customizer, bitmask, stack) : equalByTag(object, other, objTag, equalFunc, customizer, bitmask, stack);
}
if (!(bitmask & PARTIAL_COMPARE_FLAG)) {
var objIsWrapped = objIsObj && hasOwnProperty.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty.call(other, "__wrapped__");
if (objIsWrapped || othIsWrapped) {
var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other;
stack || (stack = new Stack());
return equalFunc(objUnwrapped, othUnwrapped, customizer, bitmask, stack);
}
}
if (!isSameTag) {
return false;
}
stack || (stack = new Stack());
return equalObjects(object, other, equalFunc, customizer, bitmask, stack);
}
function baseIsMatch(object, source, matchData, customizer) {
var index = matchData.length, length = index, noCustomizer = !customizer;
if (object == null) {
return !length;
}
object = Object(object);
while (index--) {
var data = matchData[index];
if (noCustomizer && data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) {
return false;
}
}
while (++index < length) {
data = matchData[index];
var key = data[0], objValue = object[key], srcValue = data[1];
if (noCustomizer && data[2]) {
if (objValue === void 0 && !(key in object)) {
return false;
}
} else {
var stack = new Stack();
if (customizer) {
var result = customizer(objValue, srcValue, key, object, source, stack);
}
if (!(result === void 0 ? baseIsEqual(srcValue, objValue, customizer, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG, stack) : result)) {
return false;
}
}
}
return true;
}
function baseIsNative(value) {
if (!isObject(value) || isMasked(value)) {
return false;
}
var pattern = isFunction(value) || isHostObject(value) ? reIsNative : reIsHostCtor;
return pattern.test(toSource(value));
}
function baseIsTypedArray(value) {
return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[objectToString.call(value)];
}
function baseIteratee(value) {
if (typeof value == "function") {
return value;
}
if (value == null) {
return identity;
}
if (typeof value == "object") {
return isArray(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value);
}
return property(value);
}
function baseKeys(object) {
if (!isPrototype(object)) {
return nativeKeys(object);
}
var result = [];
for (var key in Object(object)) {
if (hasOwnProperty.call(object, key) && key != "constructor") {
result.push(key);
}
}
return result;
}
function baseMatches(source) {
var matchData = getMatchData(source);
if (matchData.length == 1 && matchData[0][2]) {
return matchesStrictComparable(matchData[0][0], matchData[0][1]);
}
return function(object) {
return object === source || baseIsMatch(object, source, matchData);
};
}
function baseMatchesProperty(path, srcValue) {
if (isKey(path) && isStrictComparable(srcValue)) {
return matchesStrictComparable(toKey(path), srcValue);
}
return function(object) {
var objValue = get(object, path);
return objValue === void 0 && objValue === srcValue ? hasIn(object, path) : baseIsEqual(srcValue, objValue, void 0, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG);
};
}
function basePropertyDeep(path) {
return function(object) {
return baseGet(object, path);
};
}
function baseToString(value) {
if (typeof value == "string") {
return value;
}
if (isSymbol(value)) {
return symbolToString ? symbolToString.call(value) : "";
}
var result = value + "";
return result == "0" && 1 / value == -INFINITY ? "-0" : result;
}
function castPath(value) {
return isArray(value) ? value : stringToPath(value);
}
function createAggregator(setter, initializer) {
return function(collection, iteratee) {
var func = isArray(collection) ? arrayAggregator : baseAggregator, accumulator = initializer ? initializer() : {};
return func(collection, setter, baseIteratee(iteratee, 2), accumulator);
};
}
function createBaseEach(eachFunc, fromRight) {
return function(collection, iteratee) {
if (collection == null) {
return collection;
}
if (!isArrayLike(collection)) {
return eachFunc(collection, iteratee);
}
var length = collection.length, index = fromRight ? length : -1, iterable = Object(collection);
while (fromRight ? index-- : ++index < length) {
if (iteratee(iterable[index], index, iterable) === false) {
break;
}
}
return collection;
};
}
function createBaseFor(fromRight) {
return function(object, iteratee, keysFunc) {
var index = -1, iterable = Object(object), props = keysFunc(object), length = props.length;
while (length--) {
var key = props[fromRight ? length : ++index];
if (iteratee(iterable[key], key, iterable) === false) {
break;
}
}
return object;
};
}
function equalArrays(array, other, equalFunc, customizer, bitmask, stack) {
var isPartial = bitmask & PARTIAL_COMPARE_FLAG, arrLength = array.length, othLength = other.length;
if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
return false;
}
var stacked = stack.get(array);
if (stacked && stack.get(other)) {
return stacked == other;
}
var index = -1, result = true, seen = bitmask & UNORDERED_COMPARE_FLAG ? new SetCache() : void 0;
stack.set(array, other);
stack.set(other, array);
while (++index < arrLength) {
var arrValue = array[index], othValue = other[index];
if (customizer) {
var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack);
}
if (compared !== void 0) {
if (compared) {
continue;
}
result = false;
break;
}
if (seen) {
if (!arraySome(other, function(othValue2, othIndex) {
if (!seen.has(othIndex) && (arrValue === othValue2 || equalFunc(arrValue, othValue2, customizer, bitmask, stack))) {
return seen.add(othIndex);
}
})) {
result = false;
break;
}
} else if (!(arrValue === othValue || equalFunc(arrValue, othValue, customizer, bitmask, stack))) {
result = false;
break;
}
}
stack["delete"](array);
stack["delete"](other);
return result;
}
function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) {
switch (tag) {
case dataViewTag:
if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) {
return false;
}
object = object.buffer;
other = other.buffer;
case arrayBufferTag:
if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array2(object), new Uint8Array2(other))) {
return false;
}
return true;
case boolTag:
case dateTag:
case numberTag:
return eq(+object, +other);
case errorTag:
return object.name == other.name && object.message == other.message;
case regexpTag:
case stringTag:
return object == other + "";
case mapTag:
var convert = mapToArray;
case setTag:
var isPartial = bitmask & PARTIAL_COMPARE_FLAG;
convert || (convert = setToArray);
if (object.size != other.size && !isPartial) {
return false;
}
var stacked = stack.get(object);
if (stacked) {
return stacked == other;
}
bitmask |= UNORDERED_COMPARE_FLAG;
stack.set(object, other);
var result = equalArrays(convert(object), convert(other), equalFunc, customizer, bitmask, stack);
stack["delete"](object);
return result;
case symbolTag:
if (symbolValueOf) {
return symbolValueOf.call(object) == symbolValueOf.call(other);
}
}
return false;
}
function equalObjects(object, other, equalFunc, customizer, bitmask, stack) {
var isPartial = bitmask & PARTIAL_COMPARE_FLAG, objProps = keys(object), objLength = objProps.length, othProps = keys(other), othLength = othProps.length;
if (objLength != othLength && !isPartial) {
return false;
}
var index = objLength;
while (index--) {
var key = objProps[index];
if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
return false;
}
}
var stacked = stack.get(object);
if (stacked && stack.get(other)) {
return stacked == other;
}
var result = true;
stack.set(object, other);
stack.set(other, object);
var skipCtor = isPartial;
while (++index < objLength) {
key = objProps[index];
var objValue = object[key], othValue = other[key];
if (customizer) {
var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack);
}
if (!(compared === void 0 ? objValue === othValue || equalFunc(objValue, othValue, customizer, bitmask, stack) : compared)) {
result = false;
break;
}
skipCtor || (skipCtor = key == "constructor");
}
if (result && !skipCtor) {
var objCtor = object.constructor, othCtor = other.constructor;
if (objCtor != othCtor && ("constructor" in object && "constructor" in other) && !(typeof objCtor == "function" && objCtor instanceof objCtor && typeof othCtor == "function" && othCtor instanceof othCtor)) {
result = false;
}
}
stack["delete"](object);
stack["delete"](other);
return result;
}
function getMapData(map, key) {
var data = map.__data__;
return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
}
function getMatchData(object) {
var result = keys(object), length = result.length;
while (length--) {
var key = result[length], value = object[key];
result[length] = [key, value, isStrictComparable(value)];
}
return result;
}
function getNative(object, key) {
var value = getValue(object, key);
return baseIsNative(value) ? value : void 0;
}
var getTag = baseGetTag;
if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map2 && getTag(new Map2()) != mapTag || Promise2 && getTag(Promise2.resolve()) != promiseTag || Set2 && getTag(new Set2()) != setTag || WeakMap && getTag(new WeakMap()) != weakMapTag) {
getTag = function(value) {
var result = objectToString.call(value), Ctor = result == objectTag ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : void 0;
if (ctorString) {
switch (ctorString) {
case dataViewCtorString:
return dataViewTag;
case mapCtorString:
return mapTag;
case promiseCtorString:
return promiseTag;
case setCtorString:
return setTag;
case weakMapCtorString:
return weakMapTag;
}
}
return result;
};
}
function hasPath(object, path, hasFunc) {
path = isKey(path, object) ? [path] : castPath(path);
var result, index = -1, length = path.length;
while (++index < length) {
var key = toKey(path[index]);
if (!(result = object != null && hasFunc(object, key))) {
break;
}
object = object[key];
}
if (result) {
return result;
}
var length = object ? object.length : 0;
return !!length && isLength(length) && isIndex(key, length) && (isArray(object) || isArguments(object));
}
function isIndex(value, length) {
length = length == null ? MAX_SAFE_INTEGER : length;
return !!length && (typeof value == "number" || reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
}
function isKey(value, object) {
if (isArray(value)) {
return false;
}
var type = typeof value;
if (type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol(value)) {
return true;
}
return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object);
}
function isKeyable(value) {
var type = typeof value;
return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
}
function isMasked(func) {
return !!maskSrcKey && maskSrcKey in func;
}
function isPrototype(value) {
var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto;
return value === proto;
}
function isStrictComparable(value) {
return value === value && !isObject(value);
}
function matchesStrictComparable(key, srcValue) {
return function(object) {
if (object == null) {
return false;
}
return object[key] === srcValue && (srcValue !== void 0 || key in Object(object));
};
}
var stringToPath = memoize(function(string) {
string = toString(string);
var result = [];
if (reLeadingDot.test(string)) {
result.push("");
}
string.replace(rePropName, function(match, number, quote, string2) {
result.push(quote ? string2.replace(reEscapeChar, "$1") : number || match);
});
return result;
});
function toKey(value) {
if (typeof value == "string" || isSymbol(value)) {
return value;
}
var result = value + "";
return result == "0" && 1 / value == -INFINITY ? "-0" : result;
}
function toSource(func) {
if (func != null) {
try {
return funcToString.call(func);
} catch (e) {
}
try {
return func + "";
} catch (e) {
}
}
return "";
}
var groupBy5 = createAggregator(function(result, value, key) {
if (hasOwnProperty.call(result, key)) {
result[key].push(value);
} else {
result[key] = [value];
}
});
function memoize(func, resolver) {
if (typeof func != "function" || resolver && typeof resolver != "function") {
throw new TypeError(FUNC_ERROR_TEXT);
}
var memoized = function() {
var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache;
if (cache.has(key)) {
return cache.get(key);
}
var result = func.apply(this, args);
memoized.cache = cache.set(key, result);
return result;
};
memoized.cache = new (memoize.Cache || MapCache)();
return memoized;
}
memoize.Cache = MapCache;
function eq(value, other) {
return value === other || value !== value && other !== other;
}
function isArguments(value) {
return isArrayLikeObject(value) && hasOwnProperty.call(value, "callee") && (!propertyIsEnumerable.call(value, "callee") || objectToString.call(value) == argsTag);
}
var isArray = Array.isArray;
function isArrayLike(value) {
return value != null && isLength(value.length) && !isFunction(value);
}
function isArrayLikeObject(value) {
return isObjectLike(value) && isArrayLike(value);
}
function isFunction(value) {
var tag = isObject(value) ? objectToString.call(value) : "";
return tag == funcTag || tag == genTag;
}
function isLength(value) {
return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
}
function isObject(value) {
var type = typeof value;
return !!value && (type == "object" || type == "function");
}
function isObjectLike(value) {
return !!value && typeof value == "object";
}
function isSymbol(value) {
return typeof value == "symbol" || isObjectLike(value) && objectToString.call(value) == symbolTag;
}
var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
function toString(value) {
return value == null ? "" : baseToString(value);
}
function get(object, path, defaultValue) {
var result = object == null ? void 0 : baseGet(object, path);
return result === void 0 ? defaultValue : result;
}
function hasIn(object, path) {
return object != null && hasPath(object, path, baseHasIn);
}
function keys(object) {
return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
}
function identity(value) {
return value;
}
function property(path) {
return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
}
module2.exports = groupBy5;
}
});
// node_modules/lodash.mergewith/index.js
var require_lodash2 = __commonJS({
"node_modules/lodash.mergewith/index.js"(exports, module2) {
var LARGE_ARRAY_SIZE = 200;
var HASH_UNDEFINED = "__lodash_hash_undefined__";
var HOT_COUNT = 800;
var HOT_SPAN = 16;
var MAX_SAFE_INTEGER = 9007199254740991;
var argsTag = "[object Arguments]";
var arrayTag = "[object Array]";
var asyncTag = "[object AsyncFunction]";
var boolTag = "[object Boolean]";
var dateTag = "[object Date]";
var errorTag = "[object Error]";
var funcTag = "[object Function]";
var genTag = "[object GeneratorFunction]";
var mapTag = "[object Map]";
var numberTag = "[object Number]";
var nullTag = "[object Null]";
var objectTag = "[object Object]";
var proxyTag = "[object Proxy]";
var regexpTag = "[object RegExp]";
var setTag = "[object Set]";
var stringTag = "[object String]";
var undefinedTag = "[object Undefined]";
var weakMapTag = "[object WeakMap]";
var arrayBufferTag = "[object ArrayBuffer]";
var dataViewTag = "[object DataView]";
var float32Tag = "[object Float32Array]";
var float64Tag = "[object Float64Array]";
var int8Tag = "[object Int8Array]";
var int16Tag = "[object Int16Array]";
var int32Tag = "[object Int32Array]";
var uint8Tag = "[object Uint8Array]";
var uint8ClampedTag = "[object Uint8ClampedArray]";
var uint16Tag = "[object Uint16Array]";
var uint32Tag = "[object Uint32Array]";
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
var reIsHostCtor = /^\[object .+?Constructor\]$/;
var reIsUint = /^(?:0|[1-9]\d*)$/;
var typedArrayTags = {};
typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true;
typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;
var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
var freeSelf = typeof self == "object" && self && self.Object === Object && self;
var root = freeGlobal || freeSelf || Function("return this")();
var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
var freeModule = freeExports && typeof module2 == "object" && module2 && !module2.nodeType && module2;
var moduleExports = freeModule && freeModule.exports === freeExports;
var freeProcess = moduleExports && freeGlobal.process;
var nodeUtil = function() {
try {
var types = freeModule && freeModule.require && freeModule.require("util").types;
if (types) {
return types;
}
return freeProcess && freeProcess.binding && freeProcess.binding("util");
} catch (e) {
}
}();
var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
function apply(func, thisArg, args) {
switch (args.length) {
case 0:
return func.call(thisArg);
case 1:
return func.call(thisArg, args[0]);
case 2:
return func.call(thisArg, args[0], args[1]);
case 3:
return func.call(thisArg, args[0], args[1], args[2]);
}
return func.apply(thisArg, args);
}
function baseTimes(n, iteratee) {
var index = -1, result = Array(n);
while (++index < n) {
result[index] = iteratee(index);
}
return result;
}
function baseUnary(func) {
return function(value) {
return func(value);
};
}
function getValue(object, key) {
return object == null ? void 0 : object[key];
}
function overArg(func, transform) {
return function(arg) {
return func(transform(arg));
};
}
var arrayProto = Array.prototype;
var funcProto = Function.prototype;
var objectProto = Object.prototype;
var coreJsData = root["__core-js_shared__"];
var funcToString = funcProto.toString;
var hasOwnProperty = objectProto.hasOwnProperty;
var maskSrcKey = function() {
var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
return uid ? "Symbol(src)_1." + uid : "";
}();
var nativeObjectToString = objectProto.toString;
var objectCtorString = funcToString.call(Object);
var reIsNative = RegExp("^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
var Buffer2 = moduleExports ? root.Buffer : void 0;
var Symbol2 = root.Symbol;
var Uint8Array2 = root.Uint8Array;
var allocUnsafe = Buffer2 ? Buffer2.allocUnsafe : void 0;
var getPrototype = overArg(Object.getPrototypeOf, Object);
var objectCreate = Object.create;
var propertyIsEnumerable = objectProto.propertyIsEnumerable;
var splice = arrayProto.splice;
var symToStringTag = Symbol2 ? Symbol2.toStringTag : void 0;
var defineProperty = function() {
try {
var func = getNative(Object, "defineProperty");
func({}, "", {});
return func;
} catch (e) {
}
}();
var nativeIsBuffer = Buffer2 ? Buffer2.isBuffer : void 0;
var nativeMax = Math.max;
var nativeNow = Date.now;
var Map2 = getNative(root, "Map");
var nativeCreate = getNative(Object, "create");
var baseCreate = function() {
function object() {
}
return function(proto) {
if (!isObject(proto)) {
return {};
}
if (objectCreate) {
return objectCreate(proto);
}
object.prototype = proto;
var result = new object();
object.prototype = void 0;
return result;
};
}();
function Hash(entries) {
var index = -1, length = entries == null ? 0 : entries.length;
this.clear();
while (++index < length) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
}
function hashClear() {
this.__data__ = nativeCreate ? nativeCreate(null) : {};
this.size = 0;
}
function hashDelete(key) {
var result = this.has(key) && delete this.__data__[key];
this.size -= result ? 1 : 0;
return result;
}
function hashGet(key) {
var data = this.__data__;
if (nativeCreate) {
var result = data[key];
return result === HASH_UNDEFINED ? void 0 : result;
}
return hasOwnProperty.call(data, key) ? data[key] : void 0;
}
function hashHas(key) {
var data = this.__data__;
return nativeCreate ? data[key] !== void 0 : hasOwnProperty.call(data, key);
}
function hashSet(key, value) {
var data = this.__data__;
this.size += this.has(key) ? 0 : 1;
data[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED : value;
return this;
}
Hash.prototype.clear = hashClear;
Hash.prototype["delete"] = hashDelete;
Hash.prototype.get = hashGet;
Hash.prototype.has = hashHas;
Hash.prototype.set = hashSet;
function ListCache(entries) {
var index = -1, length = entries == null ? 0 : entries.length;
this.clear();
while (++index < length) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
}
function listCacheClear() {
this.__data__ = [];
this.size = 0;
}
function listCacheDelete(key) {
var data = this.__data__, index = assocIndexOf(data, key);
if (index < 0) {
return false;
}
var lastIndex = data.length - 1;
if (index == lastIndex) {
data.pop();
} else {
splice.call(data, index, 1);
}
--this.size;
return true;
}
function listCacheGet(key) {
var data = this.__data__, index = assocIndexOf(data, key);
return index < 0 ? void 0 : data[index][1];
}
function listCacheHas(key) {
return assocIndexOf(this.__data__, key) > -1;
}
function listCacheSet(key, value) {
var data = this.__data__, index = assocIndexOf(data, key);
if (index < 0) {
++this.size;
data.push([key, value]);
} else {
data[index][1] = value;
}
return this;
}
ListCache.prototype.clear = listCacheClear;
ListCache.prototype["delete"] = listCacheDelete;
ListCache.prototype.get = listCacheGet;
ListCache.prototype.has = listCacheHas;
ListCache.prototype.set = listCacheSet;
function MapCache(entries) {
var index = -1, length = entries == null ? 0 : entries.length;
this.clear();
while (++index < length) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
}
function mapCacheClear() {
this.size = 0;
this.__data__ = {
"hash": new Hash(),
"map": new (Map2 || ListCache)(),
"string": new Hash()
};
}
function mapCacheDelete(key) {
var result = getMapData(this, key)["delete"](key);
this.size -= result ? 1 : 0;
return result;
}
function mapCacheGet(key) {
return getMapData(this, key).get(key);
}
function mapCacheHas(key) {
return getMapData(this, key).has(key);
}
function mapCacheSet(key, value) {
var data = getMapData(this, key), size = data.size;
data.set(key, value);
this.size += data.size == size ? 0 : 1;
return this;
}
MapCache.prototype.clear = mapCacheClear;
MapCache.prototype["delete"] = mapCacheDelete;
MapCache.prototype.get = mapCacheGet;
MapCache.prototype.has = mapCacheHas;
MapCache.prototype.set = mapCacheSet;
function Stack(entries) {
var data = this.__data__ = new ListCache(entries);
this.size = data.size;
}
function stackClear() {
this.__data__ = new ListCache();
this.size = 0;
}
function stackDelete(key) {
var data = this.__data__, result = data["delete"](key);
this.size = data.size;
return result;
}
function stackGet(key) {
return this.__data__.get(key);
}
function stackHas(key) {
return this.__data__.has(key);
}
function stackSet(key, value) {
var data = this.__data__;
if (data instanceof ListCache) {
var pairs = data.__data__;
if (!Map2 || pairs.length < LARGE_ARRAY_SIZE - 1) {
pairs.push([key, value]);
this.size = ++data.size;
return this;
}
data = this.__data__ = new MapCache(pairs);
}
data.set(key, value);
this.size = data.size;
return this;
}
Stack.prototype.clear = stackClear;
Stack.prototype["delete"] = stackDelete;
Stack.prototype.get = stackGet;
Stack.prototype.has = stackHas;
Stack.prototype.set = stackSet;
function arrayLikeKeys(value, inherited) {
var isArr = isArray(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length;
for (var key in value) {
if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && (key == "length" || isBuff && (key == "offset" || key == "parent") || isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || isIndex(key, length)))) {
result.push(key);
}
}
return result;
}
function assignMergeValue(object, key, value) {
if (value !== void 0 && !eq(object[key], value) || value === void 0 && !(key in object)) {
baseAssignValue(object, key, value);
}
}
function assignValue(object, key, value) {
var objValue = object[key];
if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || value === void 0 && !(key in object)) {
baseAssignValue(object, key, value);
}
}
function assocIndexOf(array, key) {
var length = array.length;
while (length--) {
if (eq(array[length][0], key)) {
return length;
}
}
return -1;
}
function baseAssignValue(object, key, value) {
if (key == "__proto__" && defineProperty) {
defineProperty(object, key, {
"configurable": true,
"enumerable": true,
"value": value,
"writable": true
});
} else {
object[key] = value;
}
}
var baseFor = createBaseFor();
function baseGetTag(value) {
if (value == null) {
return value === void 0 ? undefinedTag : nullTag;
}
return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
}
function baseIsArguments(value) {
return isObjectLike(value) && baseGetTag(value) == argsTag;
}
function baseIsNative(value) {
if (!isObject(value) || isMasked(value)) {
return false;
}
var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
return pattern.test(toSource(value));
}
function baseIsTypedArray(value) {
return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
}
function baseKeysIn(object) {
if (!isObject(object)) {
return nativeKeysIn(object);
}
var isProto = isPrototype(object), result = [];
for (var key in object) {
if (!(key == "constructor" && (isProto || !hasOwnProperty.call(object, key)))) {
result.push(key);
}
}
return result;
}
function baseMerge(object, source, srcIndex, customizer, stack) {
if (object === source) {
return;
}
baseFor(source, function(srcValue, key) {
stack || (stack = new Stack());
if (isObject(srcValue)) {
baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
} else {
var newValue = customizer ? customizer(safeGet(object, key), srcValue, key + "", object, source, stack) : void 0;
if (newValue === void 0) {
newValue = srcValue;
}
assignMergeValue(object, key, newValue);
}
}, keysIn);
}
function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
var objValue = safeGet(object, key), srcValue = safeGet(source, key), stacked = stack.get(srcValue);
if (stacked) {
assignMergeValue(object, key, stacked);
return;
}
var newValue = customizer ? customizer(objValue, srcValue, key + "", object, source, stack) : void 0;
var isCommon = newValue === void 0;
if (isCommon) {
var isArr = isArray(srcValue), isBuff = !isArr && isBuffer(srcValue), isTyped = !isArr && !isBuff && isTypedArray(srcValue);
newValue = srcValue;
if (isArr || isBuff || isTyped) {
if (isArray(objValue)) {
newValue = objValue;
} else if (isArrayLikeObject(objValue)) {
newValue = copyArray(objValue);
} else if (isBuff) {
isCommon = false;
newValue = cloneBuffer(srcValue, true);
} else if (isTyped) {
isCommon = false;
newValue = cloneTypedArray(srcValue, true);
} else {
newValue = [];
}
} else if (isPlainObject(srcValue) || isArguments(srcValue)) {
newValue = objValue;
if (isArguments(objValue)) {
newValue = toPlainObject(objValue);
} else if (!isObject(objValue) || isFunction(objValue)) {
newValue = initCloneObject(srcValue);
}
} else {
isCommon = false;
}
}
if (isCommon) {
stack.set(srcValue, newValue);
mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
stack["delete"](srcValue);
}
assignMergeValue(object, key, newValue);
}
function baseRest(func, start2) {
return setToString(overRest(func, start2, identity), func + "");
}
var baseSetToString = !defineProperty ? identity : function(func, string) {
return defineProperty(func, "toString", {
"configurable": true,
"enumerable": false,
"value": constant(string),
"writable": true
});
};
function cloneBuffer(buffer, isDeep) {
if (isDeep) {
return buffer.slice();
}
var length = buffer.length, result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
buffer.copy(result);
return result;
}
function cloneArrayBuffer(arrayBuffer) {
var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
new Uint8Array2(result).set(new Uint8Array2(arrayBuffer));
return result;
}
function cloneTypedArray(typedArray, isDeep) {
var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
}
function copyArray(source, array) {
var index = -1, length = source.length;
array || (array = Array(length));
while (++index < length) {
array[index] = source[index];
}
return array;
}
function copyObject(source, props, object, customizer) {
var isNew = !object;
object || (object = {});
var index = -1, length = props.length;
while (++index < length) {
var key = props[index];
var newValue = customizer ? customizer(object[key], source[key], key, object, source) : void 0;
if (newValue === void 0) {
newValue = source[key];
}
if (isNew) {
baseAssignValue(object, key, newValue);
} else {
assignValue(object, key, newValue);
}
}
return object;
}
function createAssigner(assigner) {
return baseRest(function(object, sources) {
var index = -1, length = sources.length, customizer = length > 1 ? sources[length - 1] : void 0, guard = length > 2 ? sources[2] : void 0;
customizer = assigner.length > 3 && typeof customizer == "function" ? (length--, customizer) : void 0;
if (guard && isIterateeCall(sources[0], sources[1], guard)) {
customizer = length < 3 ? void 0 : customizer;
length = 1;
}
object = Object(object);
while (++index < length) {
var source = sources[index];
if (source) {
assigner(object, source, index, customizer);
}
}
return object;
});
}
function createBaseFor(fromRight) {
return function(object, iteratee, keysFunc) {
var index = -1, iterable = Object(object), props = keysFunc(object), length = props.length;
while (length--) {
var key = props[fromRight ? length : ++index];
if (iteratee(iterable[key], key, iterable) === false) {
break;
}
}
return object;
};
}
function getMapData(map, key) {
var data = map.__data__;
return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
}
function getNative(object, key) {
var value = getValue(object, key);
return baseIsNative(value) ? value : void 0;
}
function getRawTag(value) {
var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag];
try {
value[symToStringTag] = void 0;
var unmasked = true;
} catch (e) {
}
var result = nativeObjectToString.call(value);
if (unmasked) {
if (isOwn) {
value[symToStringTag] = tag;
} else {
delete value[symToStringTag];
}
}
return result;
}
function initCloneObject(object) {
return typeof object.constructor == "function" && !isPrototype(object) ? baseCreate(getPrototype(object)) : {};
}
function isIndex(value, length) {
var type = typeof value;
length = length == null ? MAX_SAFE_INTEGER : length;
return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
}
function isIterateeCall(value, index, object) {
if (!isObject(object)) {
return false;
}
var type = typeof index;
if (type == "number" ? isArrayLike(object) && isIndex(index, object.length) : type == "string" && index in object) {
return eq(object[index], value);
}
return false;
}
function isKeyable(value) {
var type = typeof value;
return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
}
function isMasked(func) {
return !!maskSrcKey && maskSrcKey in func;
}
function isPrototype(value) {
var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto;
return value === proto;
}
function nativeKeysIn(object) {
var result = [];
if (object != null) {
for (var key in Object(object)) {
result.push(key);
}
}
return result;
}
function objectToString(value) {
return nativeObjectToString.call(value);
}
function overRest(func, start2, transform) {
start2 = nativeMax(start2 === void 0 ? func.length - 1 : start2, 0);
return function() {
var args = arguments, index = -1, length = nativeMax(args.length - start2, 0), array = Array(length);
while (++index < length) {
array[index] = args[start2 + index];
}
index = -1;
var otherArgs = Array(start2 + 1);
while (++index < start2) {
otherArgs[index] = args[index];
}
otherArgs[start2] = transform(array);
return apply(func, this, otherArgs);
};
}
function safeGet(object, key) {
if (key === "constructor" && typeof object[key] === "function") {
return;
}
if (key == "__proto__") {
return;
}
return object[key];
}
var setToString = shortOut(baseSetToString);
function shortOut(func) {
var count = 0, lastCalled = 0;
return function() {
var stamp = nativeNow(), remaining = HOT_SPAN - (stamp - lastCalled);
lastCalled = stamp;
if (remaining > 0) {
if (++count >= HOT_COUNT) {
return arguments[0];
}
} else {
count = 0;
}
return func.apply(void 0, arguments);
};
}
function toSource(func) {
if (func != null) {
try {
return funcToString.call(func);
} catch (e) {
}
try {
return func + "";
} catch (e) {
}
}
return "";
}
function eq(value, other) {
return value === other || value !== value && other !== other;
}
var isArguments = baseIsArguments(function() {
return arguments;
}()) ? baseIsArguments : function(value) {
return isObjectLike(value) && hasOwnProperty.call(value, "callee") && !propertyIsEnumerable.call(value, "callee");
};
var isArray = Array.isArray;
function isArrayLike(value) {
return value != null && isLength(value.length) && !isFunction(value);
}
function isArrayLikeObject(value) {
return isObjectLike(value) && isArrayLike(value);
}
var isBuffer = nativeIsBuffer || stubFalse;
function isFunction(value) {
if (!isObject(value)) {
return false;
}
var tag = baseGetTag(value);
return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
}
function isLength(value) {
return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
}
function isObject(value) {
var type = typeof value;
return value != null && (type == "object" || type == "function");
}
function isObjectLike(value) {
return value != null && typeof value == "object";
}
function isPlainObject(value) {
if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
return false;
}
var proto = getPrototype(value);
if (proto === null) {
return true;
}
var Ctor = hasOwnProperty.call(proto, "constructor") && proto.constructor;
return typeof Ctor == "function" && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString;
}
var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
function toPlainObject(value) {
return copyObject(value, keysIn(value));
}
function keysIn(object) {
return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
}
var mergeWith2 = createAssigner(function(object, source, srcIndex, customizer) {
baseMerge(object, source, srcIndex, customizer);
});
function constant(value) {
return function() {
return value;
};
}
function identity(value) {
return value;
}
function stubFalse() {
return false;
}
module2.exports = mergeWith2;
}
});
// node_modules/lodash.keyby/index.js
var require_lodash3 = __commonJS({
"node_modules/lodash.keyby/index.js"(exports, module2) {
var LARGE_ARRAY_SIZE = 200;
var FUNC_ERROR_TEXT = "Expected a function";
var HASH_UNDEFINED = "__lodash_hash_undefined__";
var UNORDERED_COMPARE_FLAG = 1;
var PARTIAL_COMPARE_FLAG = 2;
var INFINITY = 1 / 0;
var MAX_SAFE_INTEGER = 9007199254740991;
var argsTag = "[object Arguments]";
var arrayTag = "[object Array]";
var boolTag = "[object Boolean]";
var dateTag = "[object Date]";
var errorTag = "[object Error]";
var funcTag = "[object Function]";
var genTag = "[object GeneratorFunction]";
var mapTag = "[object Map]";
var numberTag = "[object Number]";
var objectTag = "[object Object]";
var promiseTag = "[object Promise]";
var regexpTag = "[object RegExp]";
var setTag = "[object Set]";
var stringTag = "[object String]";
var symbolTag = "[object Symbol]";
var weakMapTag = "[object WeakMap]";
var arrayBufferTag = "[object ArrayBuffer]";
var dataViewTag = "[object DataView]";
var float32Tag = "[object Float32Array]";
var float64Tag = "[object Float64Array]";
var int8Tag = "[object Int8Array]";
var int16Tag = "[object Int16Array]";
var int32Tag = "[object Int32Array]";
var uint8Tag = "[object Uint8Array]";
var uint8ClampedTag = "[object Uint8ClampedArray]";
var uint16Tag = "[object Uint16Array]";
var uint32Tag = "[object Uint32Array]";
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/;
var reIsPlainProp = /^\w*$/;
var reLeadingDot = /^\./;
var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
var reEscapeChar = /\\(\\)?/g;
var reIsHostCtor = /^\[object .+?Constructor\]$/;
var reIsUint = /^(?:0|[1-9]\d*)$/;
var typedArrayTags = {};
typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true;
typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;
var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
var freeSelf = typeof self == "object" && self && self.Object === Object && self;
var root = freeGlobal || freeSelf || Function("return this")();
var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
var freeModule = freeExports && typeof module2 == "object" && module2 && !module2.nodeType && module2;
var moduleExports = freeModule && freeModule.exports === freeExports;
var freeProcess = moduleExports && freeGlobal.process;
var nodeUtil = function() {
try {
return freeProcess && freeProcess.binding("util");
} catch (e) {
}
}();
var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
function arrayAggregator(array, setter, iteratee, accumulator) {
var index = -1, length = array ? array.length : 0;
while (++index < length) {
var value = array[index];
setter(accumulator, value, iteratee(value), array);
}
return accumulator;
}
function arraySome(array, predicate) {
var index = -1, length = array ? array.length : 0;
while (++index < length) {
if (predicate(array[index], index, array)) {
return true;
}
}
return false;
}
function baseProperty(key) {
return function(object) {
return object == null ? void 0 : object[key];
};
}
function baseTimes(n, iteratee) {
var index = -1, result = Array(n);
while (++index < n) {
result[index] = iteratee(index);
}
return result;
}
function baseUnary(func) {
return function(value) {
return func(value);
};
}
function getValue(object, key) {
return object == null ? void 0 : object[key];
}
function isHostObject(value) {
var result = false;
if (value != null && typeof value.toString != "function") {
try {
result = !!(value + "");
} catch (e) {
}
}
return result;
}
function mapToArray(map) {
var index = -1, result = Array(map.size);
map.forEach(function(value, key) {
result[++index] = [key, value];
});
return result;
}
function overArg(func, transform) {
return function(arg) {
return func(transform(arg));
};
}
function setToArray(set) {
var index = -1, result = Array(set.size);
set.forEach(function(value) {
result[++index] = value;
});
return result;
}
var arrayProto = Array.prototype;
var funcProto = Function.prototype;
var objectProto = Object.prototype;
var coreJsData = root["__core-js_shared__"];
var maskSrcKey = function() {
var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
return uid ? "Symbol(src)_1." + uid : "";
}();
var funcToString = funcProto.toString;
var hasOwnProperty = objectProto.hasOwnProperty;
var objectToString = objectProto.toString;
var reIsNative = RegExp("^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
var Symbol2 = root.Symbol;
var Uint8Array2 = root.Uint8Array;
var propertyIsEnumerable = objectProto.propertyIsEnumerable;
var splice = arrayProto.splice;
var nativeKeys = overArg(Object.keys, Object);
var DataView = getNative(root, "DataView");
var Map2 = getNative(root, "Map");
var Promise2 = getNative(root, "Promise");
var Set2 = getNative(root, "Set");
var WeakMap = getNative(root, "WeakMap");
var nativeCreate = getNative(Object, "create");
var dataViewCtorString = toSource(DataView);
var mapCtorString = toSource(Map2);
var promiseCtorString = toSource(Promise2);
var setCtorString = toSource(Set2);
var weakMapCtorString = toSource(WeakMap);
var symbolProto = Symbol2 ? Symbol2.prototype : void 0;
var symbolValueOf = symbolProto ? symbolProto.valueOf : void 0;
var symbolToString = symbolProto ? symbolProto.toString : void 0;
function Hash(entries) {
var index = -1, length = entries ? entries.length : 0;
this.clear();
while (++index < length) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
}
function hashClear() {
this.__data__ = nativeCreate ? nativeCreate(null) : {};
}
function hashDelete(key) {
return this.has(key) && delete this.__data__[key];
}
function hashGet(key) {
var data = this.__data__;
if (nativeCreate) {
var result = data[key];
return result === HASH_UNDEFINED ? void 0 : result;
}
return hasOwnProperty.call(data, key) ? data[key] : void 0;
}
function hashHas(key) {
var data = this.__data__;
return nativeCreate ? data[key] !== void 0 : hasOwnProperty.call(data, key);
}
function hashSet(key, value) {
var data = this.__data__;
data[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED : value;
return this;
}
Hash.prototype.clear = hashClear;
Hash.prototype["delete"] = hashDelete;
Hash.prototype.get = hashGet;
Hash.prototype.has = hashHas;
Hash.prototype.set = hashSet;
function ListCache(entries) {
var index = -1, length = entries ? entries.length : 0;
this.clear();
while (++index < length) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
}
function listCacheClear() {
this.__data__ = [];
}
function listCacheDelete(key) {
var data = this.__data__, index = assocIndexOf(data, key);
if (index < 0) {
return false;
}
var lastIndex = data.length - 1;
if (index == lastIndex) {
data.pop();
} else {
splice.call(data, index, 1);
}
return true;
}
function listCacheGet(key) {
var data = this.__data__, index = assocIndexOf(data, key);
return index < 0 ? void 0 : data[index][1];
}
function listCacheHas(key) {
return assocIndexOf(this.__data__, key) > -1;
}
function listCacheSet(key, value) {
var data = this.__data__, index = assocIndexOf(data, key);
if (index < 0) {
data.push([key, value]);
} else {
data[index][1] = value;
}
return this;
}
ListCache.prototype.clear = listCacheClear;
ListCache.prototype["delete"] = listCacheDelete;
ListCache.prototype.get = listCacheGet;
ListCache.prototype.has = listCacheHas;
ListCache.prototype.set = listCacheSet;
function MapCache(entries) {
var index = -1, length = entries ? entries.length : 0;
this.clear();
while (++index < length) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
}
function mapCacheClear() {
this.__data__ = {
"hash": new Hash(),
"map": new (Map2 || ListCache)(),
"string": new Hash()
};
}
function mapCacheDelete(key) {
return getMapData(this, key)["delete"](key);
}
function mapCacheGet(key) {
return getMapData(this, key).get(key);
}
function mapCacheHas(key) {
return getMapData(this, key).has(key);
}
function mapCacheSet(key, value) {
getMapData(this, key).set(key, value);
return this;
}
MapCache.prototype.clear = mapCacheClear;
MapCache.prototype["delete"] = mapCacheDelete;
MapCache.prototype.get = mapCacheGet;
MapCache.prototype.has = mapCacheHas;
MapCache.prototype.set = mapCacheSet;
function SetCache(values2) {
var index = -1, length = values2 ? values2.length : 0;
this.__data__ = new MapCache();
while (++index < length) {
this.add(values2[index]);
}
}
function setCacheAdd(value) {
this.__data__.set(value, HASH_UNDEFINED);
return this;
}
function setCacheHas(value) {
return this.__data__.has(value);
}
SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
SetCache.prototype.has = setCacheHas;
function Stack(entries) {
this.__data__ = new ListCache(entries);
}
function stackClear() {
this.__data__ = new ListCache();
}
function stackDelete(key) {
return this.__data__["delete"](key);
}
function stackGet(key) {
return this.__data__.get(key);
}
function stackHas(key) {
return this.__data__.has(key);
}
function stackSet(key, value) {
var cache = this.__data__;
if (cache instanceof ListCache) {
var pairs = cache.__data__;
if (!Map2 || pairs.length < LARGE_ARRAY_SIZE - 1) {
pairs.push([key, value]);
return this;
}
cache = this.__data__ = new MapCache(pairs);
}
cache.set(key, value);
return this;
}
Stack.prototype.clear = stackClear;
Stack.prototype["delete"] = stackDelete;
Stack.prototype.get = stackGet;
Stack.prototype.has = stackHas;
Stack.prototype.set = stackSet;
function arrayLikeKeys(value, inherited) {
var result = isArray(value) || isArguments(value) ? baseTimes(value.length, String) : [];
var length = result.length, skipIndexes = !!length;
for (var key in value) {
if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && (key == "length" || isIndex(key, length)))) {
result.push(key);
}
}
return result;
}
function assocIndexOf(array, key) {
var length = array.length;
while (length--) {
if (eq(array[length][0], key)) {
return length;
}
}
return -1;
}
function baseAggregator(collection, setter, iteratee, accumulator) {
baseEach(collection, function(value, key, collection2) {
setter(accumulator, value, iteratee(value), collection2);
});
return accumulator;
}
var baseEach = createBaseEach(baseForOwn);
var baseFor = createBaseFor();
function baseForOwn(object, iteratee) {
return object && baseFor(object, iteratee, keys);
}
function baseGet(object, path) {
path = isKey(path, object) ? [path] : castPath(path);
var index = 0, length = path.length;
while (object != null && index < length) {
object = object[toKey(path[index++])];
}
return index && index == length ? object : void 0;
}
function baseGetTag(value) {
return objectToString.call(value);
}
function baseHasIn(object, key) {
return object != null && key in Object(object);
}
function baseIsEqual(value, other, customizer, bitmask, stack) {
if (value === other) {
return true;
}
if (value == null || other == null || !isObject(value) && !isObjectLike(other)) {
return value !== value && other !== other;
}
return baseIsEqualDeep(value, other, baseIsEqual, customizer, bitmask, stack);
}
function baseIsEqualDeep(object, other, equalFunc, customizer, bitmask, stack) {
var objIsArr = isArray(object), othIsArr = isArray(other), objTag = arrayTag, othTag = arrayTag;
if (!objIsArr) {
objTag = getTag(object);
objTag = objTag == argsTag ? objectTag : objTag;
}
if (!othIsArr) {
othTag = getTag(other);
othTag = othTag == argsTag ? objectTag : othTag;
}
var objIsObj = objTag == objectTag && !isHostObject(object), othIsObj = othTag == objectTag && !isHostObject(other), isSameTag = objTag == othTag;
if (isSameTag && !objIsObj) {
stack || (stack = new Stack());
return objIsArr || isTypedArray(object) ? equalArrays(object, other, equalFunc, customizer, bitmask, stack) : equalByTag(object, other, objTag, equalFunc, customizer, bitmask, stack);
}
if (!(bitmask & PARTIAL_COMPARE_FLAG)) {
var objIsWrapped = objIsObj && hasOwnProperty.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty.call(other, "__wrapped__");
if (objIsWrapped || othIsWrapped) {
var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other;
stack || (stack = new Stack());
return equalFunc(objUnwrapped, othUnwrapped, customizer, bitmask, stack);
}
}
if (!isSameTag) {
return false;
}
stack || (stack = new Stack());
return equalObjects(object, other, equalFunc, customizer, bitmask, stack);
}
function baseIsMatch(object, source, matchData, customizer) {
var index = matchData.length, length = index, noCustomizer = !customizer;
if (object == null) {
return !length;
}
object = Object(object);
while (index--) {
var data = matchData[index];
if (noCustomizer && data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) {
return false;
}
}
while (++index < length) {
data = matchData[index];
var key = data[0], objValue = object[key], srcValue = data[1];
if (noCustomizer && data[2]) {
if (objValue === void 0 && !(key in object)) {
return false;
}
} else {
var stack = new Stack();
if (customizer) {
var result = customizer(objValue, srcValue, key, object, source, stack);
}
if (!(result === void 0 ? baseIsEqual(srcValue, objValue, customizer, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG, stack) : result)) {
return false;
}
}
}
return true;
}
function baseIsNative(value) {
if (!isObject(value) || isMasked(value)) {
return false;
}
var pattern = isFunction(value) || isHostObject(value) ? reIsNative : reIsHostCtor;
return pattern.test(toSource(value));
}
function baseIsTypedArray(value) {
return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[objectToString.call(value)];
}
function baseIteratee(value) {
if (typeof value == "function") {
return value;
}
if (value == null) {
return identity;
}
if (typeof value == "object") {
return isArray(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value);
}
return property(value);
}
function baseKeys(object) {
if (!isPrototype(object)) {
return nativeKeys(object);
}
var result = [];
for (var key in Object(object)) {
if (hasOwnProperty.call(object, key) && key != "constructor") {
result.push(key);
}
}
return result;
}
function baseMatches(source) {
var matchData = getMatchData(source);
if (matchData.length == 1 && matchData[0][2]) {
return matchesStrictComparable(matchData[0][0], matchData[0][1]);
}
return function(object) {
return object === source || baseIsMatch(object, source, matchData);
};
}
function baseMatchesProperty(path, srcValue) {
if (isKey(path) && isStrictComparable(srcValue)) {
return matchesStrictComparable(toKey(path), srcValue);
}
return function(object) {
var objValue = get(object, path);
return objValue === void 0 && objValue === srcValue ? hasIn(object, path) : baseIsEqual(srcValue, objValue, void 0, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG);
};
}
function basePropertyDeep(path) {
return function(object) {
return baseGet(object, path);
};
}
function baseToString(value) {
if (typeof value == "string") {
return value;
}
if (isSymbol(value)) {
return symbolToString ? symbolToString.call(value) : "";
}
var result = value + "";
return result == "0" && 1 / value == -INFINITY ? "-0" : result;
}
function castPath(value) {
return isArray(value) ? value : stringToPath(value);
}
function createAggregator(setter, initializer) {
return function(collection, iteratee) {
var func = isArray(collection) ? arrayAggregator : baseAggregator, accumulator = initializer ? initializer() : {};
return func(collection, setter, baseIteratee(iteratee, 2), accumulator);
};
}
function createBaseEach(eachFunc, fromRight) {
return function(collection, iteratee) {
if (collection == null) {
return collection;
}
if (!isArrayLike(collection)) {
return eachFunc(collection, iteratee);
}
var length = collection.length, index = fromRight ? length : -1, iterable = Object(collection);
while (fromRight ? index-- : ++index < length) {
if (iteratee(iterable[index], index, iterable) === false) {
break;
}
}
return collection;
};
}
function createBaseFor(fromRight) {
return function(object, iteratee, keysFunc) {
var index = -1, iterable = Object(object), props = keysFunc(object), length = props.length;
while (length--) {
var key = props[fromRight ? length : ++index];
if (iteratee(iterable[key], key, iterable) === false) {
break;
}
}
return object;
};
}
function equalArrays(array, other, equalFunc, customizer, bitmask, stack) {
var isPartial = bitmask & PARTIAL_COMPARE_FLAG, arrLength = array.length, othLength = other.length;
if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
return false;
}
var stacked = stack.get(array);
if (stacked && stack.get(other)) {
return stacked == other;
}
var index = -1, result = true, seen = bitmask & UNORDERED_COMPARE_FLAG ? new SetCache() : void 0;
stack.set(array, other);
stack.set(other, array);
while (++index < arrLength) {
var arrValue = array[index], othValue = other[index];
if (customizer) {
var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack);
}
if (compared !== void 0) {
if (compared) {
continue;
}
result = false;
break;
}
if (seen) {
if (!arraySome(other, function(othValue2, othIndex) {
if (!seen.has(othIndex) && (arrValue === othValue2 || equalFunc(arrValue, othValue2, customizer, bitmask, stack))) {
return seen.add(othIndex);
}
})) {
result = false;
break;
}
} else if (!(arrValue === othValue || equalFunc(arrValue, othValue, customizer, bitmask, stack))) {
result = false;
break;
}
}
stack["delete"](array);
stack["delete"](other);
return result;
}
function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) {
switch (tag) {
case dataViewTag:
if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) {
return false;
}
object = object.buffer;
other = other.buffer;
case arrayBufferTag:
if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array2(object), new Uint8Array2(other))) {
return false;
}
return true;
case boolTag:
case dateTag:
case numberTag:
return eq(+object, +other);
case errorTag:
return object.name == other.name && object.message == other.message;
case regexpTag:
case stringTag:
return object == other + "";
case mapTag:
var convert = mapToArray;
case setTag:
var isPartial = bitmask & PARTIAL_COMPARE_FLAG;
convert || (convert = setToArray);
if (object.size != other.size && !isPartial) {
return false;
}
var stacked = stack.get(object);
if (stacked) {
return stacked == other;
}
bitmask |= UNORDERED_COMPARE_FLAG;
stack.set(object, other);
var result = equalArrays(convert(object), convert(other), equalFunc, customizer, bitmask, stack);
stack["delete"](object);
return result;
case symbolTag:
if (symbolValueOf) {
return symbolValueOf.call(object) == symbolValueOf.call(other);
}
}
return false;
}
function equalObjects(object, other, equalFunc, customizer, bitmask, stack) {
var isPartial = bitmask & PARTIAL_COMPARE_FLAG, objProps = keys(object), objLength = objProps.length, othProps = keys(other), othLength = othProps.length;
if (objLength != othLength && !isPartial) {
return false;
}
var index = objLength;
while (index--) {
var key = objProps[index];
if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
return false;
}
}
var stacked = stack.get(object);
if (stacked && stack.get(other)) {
return stacked == other;
}
var result = true;
stack.set(object, other);
stack.set(other, object);
var skipCtor = isPartial;
while (++index < objLength) {
key = objProps[index];
var objValue = object[key], othValue = other[key];
if (customizer) {
var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack);
}
if (!(compared === void 0 ? objValue === othValue || equalFunc(objValue, othValue, customizer, bitmask, stack) : compared)) {
result = false;
break;
}
skipCtor || (skipCtor = key == "constructor");
}
if (result && !skipCtor) {
var objCtor = object.constructor, othCtor = other.constructor;
if (objCtor != othCtor && ("constructor" in object && "constructor" in other) && !(typeof objCtor == "function" && objCtor instanceof objCtor && typeof othCtor == "function" && othCtor instanceof othCtor)) {
result = false;
}
}
stack["delete"](object);
stack["delete"](other);
return result;
}
function getMapData(map, key) {
var data = map.__data__;
return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
}
function getMatchData(object) {
var result = keys(object), length = result.length;
while (length--) {
var key = result[length], value = object[key];
result[length] = [key, value, isStrictComparable(value)];
}
return result;
}
function getNative(object, key) {
var value = getValue(object, key);
return baseIsNative(value) ? value : void 0;
}
var getTag = baseGetTag;
if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map2 && getTag(new Map2()) != mapTag || Promise2 && getTag(Promise2.resolve()) != promiseTag || Set2 && getTag(new Set2()) != setTag || WeakMap && getTag(new WeakMap()) != weakMapTag) {
getTag = function(value) {
var result = objectToString.call(value), Ctor = result == objectTag ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : void 0;
if (ctorString) {
switch (ctorString) {
case dataViewCtorString:
return dataViewTag;
case mapCtorString:
return mapTag;
case promiseCtorString:
return promiseTag;
case setCtorString:
return setTag;
case weakMapCtorString:
return weakMapTag;
}
}
return result;
};
}
function hasPath(object, path, hasFunc) {
path = isKey(path, object) ? [path] : castPath(path);
var result, index = -1, length = path.length;
while (++index < length) {
var key = toKey(path[index]);
if (!(result = object != null && hasFunc(object, key))) {
break;
}
object = object[key];
}
if (result) {
return result;
}
var length = object ? object.length : 0;
return !!length && isLength(length) && isIndex(key, length) && (isArray(object) || isArguments(object));
}
function isIndex(value, length) {
length = length == null ? MAX_SAFE_INTEGER : length;
return !!length && (typeof value == "number" || reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
}
function isKey(value, object) {
if (isArray(value)) {
return false;
}
var type = typeof value;
if (type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol(value)) {
return true;
}
return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object);
}
function isKeyable(value) {
var type = typeof value;
return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
}
function isMasked(func) {
return !!maskSrcKey && maskSrcKey in func;
}
function isPrototype(value) {
var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto;
return value === proto;
}
function isStrictComparable(value) {
return value === value && !isObject(value);
}
function matchesStrictComparable(key, srcValue) {
return function(object) {
if (object == null) {
return false;
}
return object[key] === srcValue && (srcValue !== void 0 || key in Object(object));
};
}
var stringToPath = memoize(function(string) {
string = toString(string);
var result = [];
if (reLeadingDot.test(string)) {
result.push("");
}
string.replace(rePropName, function(match, number, quote, string2) {
result.push(quote ? string2.replace(reEscapeChar, "$1") : number || match);
});
return result;
});
function toKey(value) {
if (typeof value == "string" || isSymbol(value)) {
return value;
}
var result = value + "";
return result == "0" && 1 / value == -INFINITY ? "-0" : result;
}
function toSource(func) {
if (func != null) {
try {
return funcToString.call(func);
} catch (e) {
}
try {
return func + "";
} catch (e) {
}
}
return "";
}
var keyBy2 = createAggregator(function(result, value, key) {
result[key] = value;
});
function memoize(func, resolver) {
if (typeof func != "function" || resolver && typeof resolver != "function") {
throw new TypeError(FUNC_ERROR_TEXT);
}
var memoized = function() {
var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache;
if (cache.has(key)) {
return cache.get(key);
}
var result = func.apply(this, args);
memoized.cache = cache.set(key, result);
return result;
};
memoized.cache = new (memoize.Cache || MapCache)();
return memoized;
}
memoize.Cache = MapCache;
function eq(value, other) {
return value === other || value !== value && other !== other;
}
function isArguments(value) {
return isArrayLikeObject(value) && hasOwnProperty.call(value, "callee") && (!propertyIsEnumerable.call(value, "callee") || objectToString.call(value) == argsTag);
}
var isArray = Array.isArray;
function isArrayLike(value) {
return value != null && isLength(value.length) && !isFunction(value);
}
function isArrayLikeObject(value) {
return isObjectLike(value) && isArrayLike(value);
}
function isFunction(value) {
var tag = isObject(value) ? objectToString.call(value) : "";
return tag == funcTag || tag == genTag;
}
function isLength(value) {
return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
}
function isObject(value) {
var type = typeof value;
return !!value && (type == "object" || type == "function");
}
function isObjectLike(value) {
return !!value && typeof value == "object";
}
function isSymbol(value) {
return typeof value == "symbol" || isObjectLike(value) && objectToString.call(value) == symbolTag;
}
var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
function toString(value) {
return value == null ? "" : baseToString(value);
}
function get(object, path, defaultValue) {
var result = object == null ? void 0 : baseGet(object, path);
return result === void 0 ? defaultValue : result;
}
function hasIn(object, path) {
return object != null && hasPath(object, path, baseHasIn);
}
function keys(object) {
return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
}
function identity(value) {
return value;
}
function property(path) {
return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
}
module2.exports = keyBy2;
}
});
// node_modules/lodash.values/index.js
var require_lodash4 = __commonJS({
"node_modules/lodash.values/index.js"(exports, module2) {
var MAX_SAFE_INTEGER = 9007199254740991;
var argsTag = "[object Arguments]";
var funcTag = "[object Function]";
var genTag = "[object GeneratorFunction]";
var reIsUint = /^(?:0|[1-9]\d*)$/;
function arrayMap(array, iteratee) {
var index = -1, length = array ? array.length : 0, result = Array(length);
while (++index < length) {
result[index] = iteratee(array[index], index, array);
}
return result;
}
function baseTimes(n, iteratee) {
var index = -1, result = Array(n);
while (++index < n) {
result[index] = iteratee(index);
}
return result;
}
function baseValues(object, props) {
return arrayMap(props, function(key) {
return object[key];
});
}
function overArg(func, transform) {
return function(arg) {
return func(transform(arg));
};
}
var objectProto = Object.prototype;
var hasOwnProperty = objectProto.hasOwnProperty;
var objectToString = objectProto.toString;
var propertyIsEnumerable = objectProto.propertyIsEnumerable;
var nativeKeys = overArg(Object.keys, Object);
function arrayLikeKeys(value, inherited) {
var result = isArray(value) || isArguments(value) ? baseTimes(value.length, String) : [];
var length = result.length, skipIndexes = !!length;
for (var key in value) {
if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && (key == "length" || isIndex(key, length)))) {
result.push(key);
}
}
return result;
}
function baseKeys(object) {
if (!isPrototype(object)) {
return nativeKeys(object);
}
var result = [];
for (var key in Object(object)) {
if (hasOwnProperty.call(object, key) && key != "constructor") {
result.push(key);
}
}
return result;
}
function isIndex(value, length) {
length = length == null ? MAX_SAFE_INTEGER : length;
return !!length && (typeof value == "number" || reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
}
function isPrototype(value) {
var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto;
return value === proto;
}
function isArguments(value) {
return isArrayLikeObject(value) && hasOwnProperty.call(value, "callee") && (!propertyIsEnumerable.call(value, "callee") || objectToString.call(value) == argsTag);
}
var isArray = Array.isArray;
function isArrayLike(value) {
return value != null && isLength(value.length) && !isFunction(value);
}
function isArrayLikeObject(value) {
return isObjectLike(value) && isArrayLike(value);
}
function isFunction(value) {
var tag = isObject(value) ? objectToString.call(value) : "";
return tag == funcTag || tag == genTag;
}
function isLength(value) {
return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
}
function isObject(value) {
var type = typeof value;
return !!value && (type == "object" || type == "function");
}
function isObjectLike(value) {
return !!value && typeof value == "object";
}
function keys(object) {
return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
}
function values2(object) {
return object ? baseValues(object, keys(object)) : [];
}
module2.exports = values2;
}
});
// node_modules/lodash.sortby/index.js
var require_lodash5 = __commonJS({
"node_modules/lodash.sortby/index.js"(exports, module2) {
var LARGE_ARRAY_SIZE = 200;
var FUNC_ERROR_TEXT = "Expected a function";
var HASH_UNDEFINED = "__lodash_hash_undefined__";
var UNORDERED_COMPARE_FLAG = 1;
var PARTIAL_COMPARE_FLAG = 2;
var INFINITY = 1 / 0;
var MAX_SAFE_INTEGER = 9007199254740991;
var argsTag = "[object Arguments]";
var arrayTag = "[object Array]";
var boolTag = "[object Boolean]";
var dateTag = "[object Date]";
var errorTag = "[object Error]";
var funcTag = "[object Function]";
var genTag = "[object GeneratorFunction]";
var mapTag = "[object Map]";
var numberTag = "[object Number]";
var objectTag = "[object Object]";
var promiseTag = "[object Promise]";
var regexpTag = "[object RegExp]";
var setTag = "[object Set]";
var stringTag = "[object String]";
var symbolTag = "[object Symbol]";
var weakMapTag = "[object WeakMap]";
var arrayBufferTag = "[object ArrayBuffer]";
var dataViewTag = "[object DataView]";
var float32Tag = "[object Float32Array]";
var float64Tag = "[object Float64Array]";
var int8Tag = "[object Int8Array]";
var int16Tag = "[object Int16Array]";
var int32Tag = "[object Int32Array]";
var uint8Tag = "[object Uint8Array]";
var uint8ClampedTag = "[object Uint8ClampedArray]";
var uint16Tag = "[object Uint16Array]";
var uint32Tag = "[object Uint32Array]";
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/;
var reIsPlainProp = /^\w*$/;
var reLeadingDot = /^\./;
var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
var reEscapeChar = /\\(\\)?/g;
var reIsHostCtor = /^\[object .+?Constructor\]$/;
var reIsUint = /^(?:0|[1-9]\d*)$/;
var typedArrayTags = {};
typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true;
typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;
var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
var freeSelf = typeof self == "object" && self && self.Object === Object && self;
var root = freeGlobal || freeSelf || Function("return this")();
var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
var freeModule = freeExports && typeof module2 == "object" && module2 && !module2.nodeType && module2;
var moduleExports = freeModule && freeModule.exports === freeExports;
var freeProcess = moduleExports && freeGlobal.process;
var nodeUtil = function() {
try {
return freeProcess && freeProcess.binding("util");
} catch (e) {
}
}();
var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
function apply(func, thisArg, args) {
switch (args.length) {
case 0:
return func.call(thisArg);
case 1:
return func.call(thisArg, args[0]);
case 2:
return func.call(thisArg, args[0], args[1]);
case 3:
return func.call(thisArg, args[0], args[1], args[2]);
}
return func.apply(thisArg, args);
}
function arrayMap(array, iteratee) {
var index = -1, length = array ? array.length : 0, result = Array(length);
while (++index < length) {
result[index] = iteratee(array[index], index, array);
}
return result;
}
function arrayPush(array, values2) {
var index = -1, length = values2.length, offset2 = array.length;
while (++index < length) {
array[offset2 + index] = values2[index];
}
return array;
}
function arraySome(array, predicate) {
var index = -1, length = array ? array.length : 0;
while (++index < length) {
if (predicate(array[index], index, array)) {
return true;
}
}
return false;
}
function baseProperty(key) {
return function(object) {
return object == null ? void 0 : object[key];
};
}
function baseSortBy(array, comparer) {
var length = array.length;
array.sort(comparer);
while (length--) {
array[length] = array[length].value;
}
return array;
}
function baseTimes(n, iteratee) {
var index = -1, result = Array(n);
while (++index < n) {
result[index] = iteratee(index);
}
return result;
}
function baseUnary(func) {
return function(value) {
return func(value);
};
}
function getValue(object, key) {
return object == null ? void 0 : object[key];
}
function isHostObject(value) {
var result = false;
if (value != null && typeof value.toString != "function") {
try {
result = !!(value + "");
} catch (e) {
}
}
return result;
}
function mapToArray(map) {
var index = -1, result = Array(map.size);
map.forEach(function(value, key) {
result[++index] = [key, value];
});
return result;
}
function overArg(func, transform) {
return function(arg) {
return func(transform(arg));
};
}
function setToArray(set) {
var index = -1, result = Array(set.size);
set.forEach(function(value) {
result[++index] = value;
});
return result;
}
var arrayProto = Array.prototype;
var funcProto = Function.prototype;
var objectProto = Object.prototype;
var coreJsData = root["__core-js_shared__"];
var maskSrcKey = function() {
var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
return uid ? "Symbol(src)_1." + uid : "";
}();
var funcToString = funcProto.toString;
var hasOwnProperty = objectProto.hasOwnProperty;
var objectToString = objectProto.toString;
var reIsNative = RegExp("^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
var Symbol2 = root.Symbol;
var Uint8Array2 = root.Uint8Array;
var propertyIsEnumerable = objectProto.propertyIsEnumerable;
var splice = arrayProto.splice;
var spreadableSymbol = Symbol2 ? Symbol2.isConcatSpreadable : void 0;
var nativeKeys = overArg(Object.keys, Object);
var nativeMax = Math.max;
var DataView = getNative(root, "DataView");
var Map2 = getNative(root, "Map");
var Promise2 = getNative(root, "Promise");
var Set2 = getNative(root, "Set");
var WeakMap = getNative(root, "WeakMap");
var nativeCreate = getNative(Object, "create");
var dataViewCtorString = toSource(DataView);
var mapCtorString = toSource(Map2);
var promiseCtorString = toSource(Promise2);
var setCtorString = toSource(Set2);
var weakMapCtorString = toSource(WeakMap);
var symbolProto = Symbol2 ? Symbol2.prototype : void 0;
var symbolValueOf = symbolProto ? symbolProto.valueOf : void 0;
var symbolToString = symbolProto ? symbolProto.toString : void 0;
function Hash(entries) {
var index = -1, length = entries ? entries.length : 0;
this.clear();
while (++index < length) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
}
function hashClear() {
this.__data__ = nativeCreate ? nativeCreate(null) : {};
}
function hashDelete(key) {
return this.has(key) && delete this.__data__[key];
}
function hashGet(key) {
var data = this.__data__;
if (nativeCreate) {
var result = data[key];
return result === HASH_UNDEFINED ? void 0 : result;
}
return hasOwnProperty.call(data, key) ? data[key] : void 0;
}
function hashHas(key) {
var data = this.__data__;
return nativeCreate ? data[key] !== void 0 : hasOwnProperty.call(data, key);
}
function hashSet(key, value) {
var data = this.__data__;
data[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED : value;
return this;
}
Hash.prototype.clear = hashClear;
Hash.prototype["delete"] = hashDelete;
Hash.prototype.get = hashGet;
Hash.prototype.has = hashHas;
Hash.prototype.set = hashSet;
function ListCache(entries) {
var index = -1, length = entries ? entries.length : 0;
this.clear();
while (++index < length) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
}
function listCacheClear() {
this.__data__ = [];
}
function listCacheDelete(key) {
var data = this.__data__, index = assocIndexOf(data, key);
if (index < 0) {
return false;
}
var lastIndex = data.length - 1;
if (index == lastIndex) {
data.pop();
} else {
splice.call(data, index, 1);
}
return true;
}
function listCacheGet(key) {
var data = this.__data__, index = assocIndexOf(data, key);
return index < 0 ? void 0 : data[index][1];
}
function listCacheHas(key) {
return assocIndexOf(this.__data__, key) > -1;
}
function listCacheSet(key, value) {
var data = this.__data__, index = assocIndexOf(data, key);
if (index < 0) {
data.push([key, value]);
} else {
data[index][1] = value;
}
return this;
}
ListCache.prototype.clear = listCacheClear;
ListCache.prototype["delete"] = listCacheDelete;
ListCache.prototype.get = listCacheGet;
ListCache.prototype.has = listCacheHas;
ListCache.prototype.set = listCacheSet;
function MapCache(entries) {
var index = -1, length = entries ? entries.length : 0;
this.clear();
while (++index < length) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
}
function mapCacheClear() {
this.__data__ = {
"hash": new Hash(),
"map": new (Map2 || ListCache)(),
"string": new Hash()
};
}
function mapCacheDelete(key) {
return getMapData(this, key)["delete"](key);
}
function mapCacheGet(key) {
return getMapData(this, key).get(key);
}
function mapCacheHas(key) {
return getMapData(this, key).has(key);
}
function mapCacheSet(key, value) {
getMapData(this, key).set(key, value);
return this;
}
MapCache.prototype.clear = mapCacheClear;
MapCache.prototype["delete"] = mapCacheDelete;
MapCache.prototype.get = mapCacheGet;
MapCache.prototype.has = mapCacheHas;
MapCache.prototype.set = mapCacheSet;
function SetCache(values2) {
var index = -1, length = values2 ? values2.length : 0;
this.__data__ = new MapCache();
while (++index < length) {
this.add(values2[index]);
}
}
function setCacheAdd(value) {
this.__data__.set(value, HASH_UNDEFINED);
return this;
}
function setCacheHas(value) {
return this.__data__.has(value);
}
SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
SetCache.prototype.has = setCacheHas;
function Stack(entries) {
this.__data__ = new ListCache(entries);
}
function stackClear() {
this.__data__ = new ListCache();
}
function stackDelete(key) {
return this.__data__["delete"](key);
}
function stackGet(key) {
return this.__data__.get(key);
}
function stackHas(key) {
return this.__data__.has(key);
}
function stackSet(key, value) {
var cache = this.__data__;
if (cache instanceof ListCache) {
var pairs = cache.__data__;
if (!Map2 || pairs.length < LARGE_ARRAY_SIZE - 1) {
pairs.push([key, value]);
return this;
}
cache = this.__data__ = new MapCache(pairs);
}
cache.set(key, value);
return this;
}
Stack.prototype.clear = stackClear;
Stack.prototype["delete"] = stackDelete;
Stack.prototype.get = stackGet;
Stack.prototype.has = stackHas;
Stack.prototype.set = stackSet;
function arrayLikeKeys(value, inherited) {
var result = isArray(value) || isArguments(value) ? baseTimes(value.length, String) : [];
var length = result.length, skipIndexes = !!length;
for (var key in value) {
if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && (key == "length" || isIndex(key, length)))) {
result.push(key);
}
}
return result;
}
function assocIndexOf(array, key) {
var length = array.length;
while (length--) {
if (eq(array[length][0], key)) {
return length;
}
}
return -1;
}
var baseEach = createBaseEach(baseForOwn);
function baseFlatten(array, depth, predicate, isStrict, result) {
var index = -1, length = array.length;
predicate || (predicate = isFlattenable);
result || (result = []);
while (++index < length) {
var value = array[index];
if (depth > 0 && predicate(value)) {
if (depth > 1) {
baseFlatten(value, depth - 1, predicate, isStrict, result);
} else {
arrayPush(result, value);
}
} else if (!isStrict) {
result[result.length] = value;
}
}
return result;
}
var baseFor = createBaseFor();
function baseForOwn(object, iteratee) {
return object && baseFor(object, iteratee, keys);
}
function baseGet(object, path) {
path = isKey(path, object) ? [path] : castPath(path);
var index = 0, length = path.length;
while (object != null && index < length) {
object = object[toKey(path[index++])];
}
return index && index == length ? object : void 0;
}
function baseGetTag(value) {
return objectToString.call(value);
}
function baseHasIn(object, key) {
return object != null && key in Object(object);
}
function baseIsEqual(value, other, customizer, bitmask, stack) {
if (value === other) {
return true;
}
if (value == null || other == null || !isObject(value) && !isObjectLike(other)) {
return value !== value && other !== other;
}
return baseIsEqualDeep(value, other, baseIsEqual, customizer, bitmask, stack);
}
function baseIsEqualDeep(object, other, equalFunc, customizer, bitmask, stack) {
var objIsArr = isArray(object), othIsArr = isArray(other), objTag = arrayTag, othTag = arrayTag;
if (!objIsArr) {
objTag = getTag(object);
objTag = objTag == argsTag ? objectTag : objTag;
}
if (!othIsArr) {
othTag = getTag(other);
othTag = othTag == argsTag ? objectTag : othTag;
}
var objIsObj = objTag == objectTag && !isHostObject(object), othIsObj = othTag == objectTag && !isHostObject(other), isSameTag = objTag == othTag;
if (isSameTag && !objIsObj) {
stack || (stack = new Stack());
return objIsArr || isTypedArray(object) ? equalArrays(object, other, equalFunc, customizer, bitmask, stack) : equalByTag(object, other, objTag, equalFunc, customizer, bitmask, stack);
}
if (!(bitmask & PARTIAL_COMPARE_FLAG)) {
var objIsWrapped = objIsObj && hasOwnProperty.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty.call(other, "__wrapped__");
if (objIsWrapped || othIsWrapped) {
var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other;
stack || (stack = new Stack());
return equalFunc(objUnwrapped, othUnwrapped, customizer, bitmask, stack);
}
}
if (!isSameTag) {
return false;
}
stack || (stack = new Stack());
return equalObjects(object, other, equalFunc, customizer, bitmask, stack);
}
function baseIsMatch(object, source, matchData, customizer) {
var index = matchData.length, length = index, noCustomizer = !customizer;
if (object == null) {
return !length;
}
object = Object(object);
while (index--) {
var data = matchData[index];
if (noCustomizer && data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) {
return false;
}
}
while (++index < length) {
data = matchData[index];
var key = data[0], objValue = object[key], srcValue = data[1];
if (noCustomizer && data[2]) {
if (objValue === void 0 && !(key in object)) {
return false;
}
} else {
var stack = new Stack();
if (customizer) {
var result = customizer(objValue, srcValue, key, object, source, stack);
}
if (!(result === void 0 ? baseIsEqual(srcValue, objValue, customizer, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG, stack) : result)) {
return false;
}
}
}
return true;
}
function baseIsNative(value) {
if (!isObject(value) || isMasked(value)) {
return false;
}
var pattern = isFunction(value) || isHostObject(value) ? reIsNative : reIsHostCtor;
return pattern.test(toSource(value));
}
function baseIsTypedArray(value) {
return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[objectToString.call(value)];
}
function baseIteratee(value) {
if (typeof value == "function") {
return value;
}
if (value == null) {
return identity;
}
if (typeof value == "object") {
return isArray(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value);
}
return property(value);
}
function baseKeys(object) {
if (!isPrototype(object)) {
return nativeKeys(object);
}
var result = [];
for (var key in Object(object)) {
if (hasOwnProperty.call(object, key) && key != "constructor") {
result.push(key);
}
}
return result;
}
function baseMap(collection, iteratee) {
var index = -1, result = isArrayLike(collection) ? Array(collection.length) : [];
baseEach(collection, function(value, key, collection2) {
result[++index] = iteratee(value, key, collection2);
});
return result;
}
function baseMatches(source) {
var matchData = getMatchData(source);
if (matchData.length == 1 && matchData[0][2]) {
return matchesStrictComparable(matchData[0][0], matchData[0][1]);
}
return function(object) {
return object === source || baseIsMatch(object, source, matchData);
};
}
function baseMatchesProperty(path, srcValue) {
if (isKey(path) && isStrictComparable(srcValue)) {
return matchesStrictComparable(toKey(path), srcValue);
}
return function(object) {
var objValue = get(object, path);
return objValue === void 0 && objValue === srcValue ? hasIn(object, path) : baseIsEqual(srcValue, objValue, void 0, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG);
};
}
function baseOrderBy(collection, iteratees, orders) {
var index = -1;
iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(baseIteratee));
var result = baseMap(collection, function(value, key, collection2) {
var criteria = arrayMap(iteratees, function(iteratee) {
return iteratee(value);
});
return { "criteria": criteria, "index": ++index, "value": value };
});
return baseSortBy(result, function(object, other) {
return compareMultiple(object, other, orders);
});
}
function basePropertyDeep(path) {
return function(object) {
return baseGet(object, path);
};
}
function baseRest(func, start2) {
start2 = nativeMax(start2 === void 0 ? func.length - 1 : start2, 0);
return function() {
var args = arguments, index = -1, length = nativeMax(args.length - start2, 0), array = Array(length);
while (++index < length) {
array[index] = args[start2 + index];
}
index = -1;
var otherArgs = Array(start2 + 1);
while (++index < start2) {
otherArgs[index] = args[index];
}
otherArgs[start2] = array;
return apply(func, this, otherArgs);
};
}
function baseToString(value) {
if (typeof value == "string") {
return value;
}
if (isSymbol(value)) {
return symbolToString ? symbolToString.call(value) : "";
}
var result = value + "";
return result == "0" && 1 / value == -INFINITY ? "-0" : result;
}
function castPath(value) {
return isArray(value) ? value : stringToPath(value);
}
function compareAscending(value, other) {
if (value !== other) {
var valIsDefined = value !== void 0, valIsNull = value === null, valIsReflexive = value === value, valIsSymbol = isSymbol(value);
var othIsDefined = other !== void 0, othIsNull = other === null, othIsReflexive = other === other, othIsSymbol = isSymbol(other);
if (!othIsNull && !othIsSymbol && !valIsSymbol && value > other || valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol || valIsNull && othIsDefined && othIsReflexive || !valIsDefined && othIsReflexive || !valIsReflexive) {
return 1;
}
if (!valIsNull && !valIsSymbol && !othIsSymbol && value < other || othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol || othIsNull && valIsDefined && valIsReflexive || !othIsDefined && valIsReflexive || !othIsReflexive) {
return -1;
}
}
return 0;
}
function compareMultiple(object, other, orders) {
var index = -1, objCriteria = object.criteria, othCriteria = other.criteria, length = objCriteria.length, ordersLength = orders.length;
while (++index < length) {
var result = compareAscending(objCriteria[index], othCriteria[index]);
if (result) {
if (index >= ordersLength) {
return result;
}
var order2 = orders[index];
return result * (order2 == "desc" ? -1 : 1);
}
}
return object.index - other.index;
}
function createBaseEach(eachFunc, fromRight) {
return function(collection, iteratee) {
if (collection == null) {
return collection;
}
if (!isArrayLike(collection)) {
return eachFunc(collection, iteratee);
}
var length = collection.length, index = fromRight ? length : -1, iterable = Object(collection);
while (fromRight ? index-- : ++index < length) {
if (iteratee(iterable[index], index, iterable) === false) {
break;
}
}
return collection;
};
}
function createBaseFor(fromRight) {
return function(object, iteratee, keysFunc) {
var index = -1, iterable = Object(object), props = keysFunc(object), length = props.length;
while (length--) {
var key = props[fromRight ? length : ++index];
if (iteratee(iterable[key], key, iterable) === false) {
break;
}
}
return object;
};
}
function equalArrays(array, other, equalFunc, customizer, bitmask, stack) {
var isPartial = bitmask & PARTIAL_COMPARE_FLAG, arrLength = array.length, othLength = other.length;
if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
return false;
}
var stacked = stack.get(array);
if (stacked && stack.get(other)) {
return stacked == other;
}
var index = -1, result = true, seen = bitmask & UNORDERED_COMPARE_FLAG ? new SetCache() : void 0;
stack.set(array, other);
stack.set(other, array);
while (++index < arrLength) {
var arrValue = array[index], othValue = other[index];
if (customizer) {
var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack);
}
if (compared !== void 0) {
if (compared) {
continue;
}
result = false;
break;
}
if (seen) {
if (!arraySome(other, function(othValue2, othIndex) {
if (!seen.has(othIndex) && (arrValue === othValue2 || equalFunc(arrValue, othValue2, customizer, bitmask, stack))) {
return seen.add(othIndex);
}
})) {
result = false;
break;
}
} else if (!(arrValue === othValue || equalFunc(arrValue, othValue, customizer, bitmask, stack))) {
result = false;
break;
}
}
stack["delete"](array);
stack["delete"](other);
return result;
}
function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) {
switch (tag) {
case dataViewTag:
if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) {
return false;
}
object = object.buffer;
other = other.buffer;
case arrayBufferTag:
if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array2(object), new Uint8Array2(other))) {
return false;
}
return true;
case boolTag:
case dateTag:
case numberTag:
return eq(+object, +other);
case errorTag:
return object.name == other.name && object.message == other.message;
case regexpTag:
case stringTag:
return object == other + "";
case mapTag:
var convert = mapToArray;
case setTag:
var isPartial = bitmask & PARTIAL_COMPARE_FLAG;
convert || (convert = setToArray);
if (object.size != other.size && !isPartial) {
return false;
}
var stacked = stack.get(object);
if (stacked) {
return stacked == other;
}
bitmask |= UNORDERED_COMPARE_FLAG;
stack.set(object, other);
var result = equalArrays(convert(object), convert(other), equalFunc, customizer, bitmask, stack);
stack["delete"](object);
return result;
case symbolTag:
if (symbolValueOf) {
return symbolValueOf.call(object) == symbolValueOf.call(other);
}
}
return false;
}
function equalObjects(object, other, equalFunc, customizer, bitmask, stack) {
var isPartial = bitmask & PARTIAL_COMPARE_FLAG, objProps = keys(object), objLength = objProps.length, othProps = keys(other), othLength = othProps.length;
if (objLength != othLength && !isPartial) {
return false;
}
var index = objLength;
while (index--) {
var key = objProps[index];
if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
return false;
}
}
var stacked = stack.get(object);
if (stacked && stack.get(other)) {
return stacked == other;
}
var result = true;
stack.set(object, other);
stack.set(other, object);
var skipCtor = isPartial;
while (++index < objLength) {
key = objProps[index];
var objValue = object[key], othValue = other[key];
if (customizer) {
var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack);
}
if (!(compared === void 0 ? objValue === othValue || equalFunc(objValue, othValue, customizer, bitmask, stack) : compared)) {
result = false;
break;
}
skipCtor || (skipCtor = key == "constructor");
}
if (result && !skipCtor) {
var objCtor = object.constructor, othCtor = other.constructor;
if (objCtor != othCtor && ("constructor" in object && "constructor" in other) && !(typeof objCtor == "function" && objCtor instanceof objCtor && typeof othCtor == "function" && othCtor instanceof othCtor)) {
result = false;
}
}
stack["delete"](object);
stack["delete"](other);
return result;
}
function getMapData(map, key) {
var data = map.__data__;
return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
}
function getMatchData(object) {
var result = keys(object), length = result.length;
while (length--) {
var key = result[length], value = object[key];
result[length] = [key, value, isStrictComparable(value)];
}
return result;
}
function getNative(object, key) {
var value = getValue(object, key);
return baseIsNative(value) ? value : void 0;
}
var getTag = baseGetTag;
if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map2 && getTag(new Map2()) != mapTag || Promise2 && getTag(Promise2.resolve()) != promiseTag || Set2 && getTag(new Set2()) != setTag || WeakMap && getTag(new WeakMap()) != weakMapTag) {
getTag = function(value) {
var result = objectToString.call(value), Ctor = result == objectTag ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : void 0;
if (ctorString) {
switch (ctorString) {
case dataViewCtorString:
return dataViewTag;
case mapCtorString:
return mapTag;
case promiseCtorString:
return promiseTag;
case setCtorString:
return setTag;
case weakMapCtorString:
return weakMapTag;
}
}
return result;
};
}
function hasPath(object, path, hasFunc) {
path = isKey(path, object) ? [path] : castPath(path);
var result, index = -1, length = path.length;
while (++index < length) {
var key = toKey(path[index]);
if (!(result = object != null && hasFunc(object, key))) {
break;
}
object = object[key];
}
if (result) {
return result;
}
var length = object ? object.length : 0;
return !!length && isLength(length) && isIndex(key, length) && (isArray(object) || isArguments(object));
}
function isFlattenable(value) {
return isArray(value) || isArguments(value) || !!(spreadableSymbol && value && value[spreadableSymbol]);
}
function isIndex(value, length) {
length = length == null ? MAX_SAFE_INTEGER : length;
return !!length && (typeof value == "number" || reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
}
function isIterateeCall(value, index, object) {
if (!isObject(object)) {
return false;
}
var type = typeof index;
if (type == "number" ? isArrayLike(object) && isIndex(index, object.length) : type == "string" && index in object) {
return eq(object[index], value);
}
return false;
}
function isKey(value, object) {
if (isArray(value)) {
return false;
}
var type = typeof value;
if (type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol(value)) {
return true;
}
return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object);
}
function isKeyable(value) {
var type = typeof value;
return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
}
function isMasked(func) {
return !!maskSrcKey && maskSrcKey in func;
}
function isPrototype(value) {
var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto;
return value === proto;
}
function isStrictComparable(value) {
return value === value && !isObject(value);
}
function matchesStrictComparable(key, srcValue) {
return function(object) {
if (object == null) {
return false;
}
return object[key] === srcValue && (srcValue !== void 0 || key in Object(object));
};
}
var stringToPath = memoize(function(string) {
string = toString(string);
var result = [];
if (reLeadingDot.test(string)) {
result.push("");
}
string.replace(rePropName, function(match, number, quote, string2) {
result.push(quote ? string2.replace(reEscapeChar, "$1") : number || match);
});
return result;
});
function toKey(value) {
if (typeof value == "string" || isSymbol(value)) {
return value;
}
var result = value + "";
return result == "0" && 1 / value == -INFINITY ? "-0" : result;
}
function toSource(func) {
if (func != null) {
try {
return funcToString.call(func);
} catch (e) {
}
try {
return func + "";
} catch (e) {
}
}
return "";
}
var sortBy3 = baseRest(function(collection, iteratees) {
if (collection == null) {
return [];
}
var length = iteratees.length;
if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {
iteratees = [];
} else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {
iteratees = [iteratees[0]];
}
return baseOrderBy(collection, baseFlatten(iteratees, 1), []);
});
function memoize(func, resolver) {
if (typeof func != "function" || resolver && typeof resolver != "function") {
throw new TypeError(FUNC_ERROR_TEXT);
}
var memoized = function() {
var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache;
if (cache.has(key)) {
return cache.get(key);
}
var result = func.apply(this, args);
memoized.cache = cache.set(key, result);
return result;
};
memoized.cache = new (memoize.Cache || MapCache)();
return memoized;
}
memoize.Cache = MapCache;
function eq(value, other) {
return value === other || value !== value && other !== other;
}
function isArguments(value) {
return isArrayLikeObject(value) && hasOwnProperty.call(value, "callee") && (!propertyIsEnumerable.call(value, "callee") || objectToString.call(value) == argsTag);
}
var isArray = Array.isArray;
function isArrayLike(value) {
return value != null && isLength(value.length) && !isFunction(value);
}
function isArrayLikeObject(value) {
return isObjectLike(value) && isArrayLike(value);
}
function isFunction(value) {
var tag = isObject(value) ? objectToString.call(value) : "";
return tag == funcTag || tag == genTag;
}
function isLength(value) {
return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
}
function isObject(value) {
var type = typeof value;
return !!value && (type == "object" || type == "function");
}
function isObjectLike(value) {
return !!value && typeof value == "object";
}
function isSymbol(value) {
return typeof value == "symbol" || isObjectLike(value) && objectToString.call(value) == symbolTag;
}
var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
function toString(value) {
return value == null ? "" : baseToString(value);
}
function get(object, path, defaultValue) {
var result = object == null ? void 0 : baseGet(object, path);
return result === void 0 ? defaultValue : result;
}
function hasIn(object, path) {
return object != null && hasPath(object, path, baseHasIn);
}
function keys(object) {
return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
}
function identity(value) {
return value;
}
function property(path) {
return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
}
module2.exports = sortBy3;
}
});
// src/main.ts
__export(exports, {
default: () => RssReaderPlugin
});
var import_obsidian25 = __toModule(require("obsidian"));
// src/settings/settings.ts
var DEFAULT_SETTINGS = Object.freeze({
feeds: [],
updateTime: 60,
filtered: [{
name: "Favorites",
read: true,
unread: true,
filterTags: [],
filterFolders: [],
filterFeeds: [],
favorites: true,
sortOrder: "ALPHABET_NORMAL"
}],
saveLocation: "default",
saveLocationFolder: "",
items: [],
dateFormat: "YYYY-MM-DDTHH:mm:SS",
template: "---\nlink: {{link}}\nauthor: {{author}}\npublished: {{published}}\ntags: [{{tags:,}}]\n---\n{{title}}\n{{content}}",
pasteTemplate: "## {{title}}\n{{content}}",
askForFilename: true,
defaultFilename: "{{title}}",
autoSync: false,
hotkeys: {
create: "n",
paste: "v",
copy: "c",
favorite: "f",
read: "r",
tags: "t",
open: "o",
tts: "s",
previous: "ArrowLeft",
next: "ArrowRight"
},
folded: []
});
// src/view/ViewLoader.ts
var import_obsidian14 = __toModule(require("obsidian"));
// node_modules/svelte/internal/index.mjs
function noop() {
}
function run(fn2) {
return fn2();
}
function blank_object() {
return Object.create(null);
}
function run_all(fns) {
fns.forEach(run);
}
function is_function(thing) {
return typeof thing === "function";
}
function safe_not_equal(a, b) {
return a != a ? b == b : a !== b || (a && typeof a === "object" || typeof a === "function");
}
var src_url_equal_anchor;
function src_url_equal(element_src, url) {
if (!src_url_equal_anchor) {
src_url_equal_anchor = document.createElement("a");
}
src_url_equal_anchor.href = url;
return element_src === src_url_equal_anchor.href;
}
function is_empty(obj) {
return Object.keys(obj).length === 0;
}
function subscribe(store, ...callbacks) {
if (store == null) {
return noop;
}
const unsub = store.subscribe(...callbacks);
return unsub.unsubscribe ? () => unsub.unsubscribe() : unsub;
}
function get_store_value(store) {
let value;
subscribe(store, (_) => value = _)();
return value;
}
function component_subscribe(component, store, callback) {
component.$$.on_destroy.push(subscribe(store, callback));
}
function action_destroyer(action_result) {
return action_result && is_function(action_result.destroy) ? action_result.destroy : noop;
}
var is_hydrating = false;
function start_hydrating() {
is_hydrating = true;
}
function end_hydrating() {
is_hydrating = false;
}
function append(target, node) {
target.appendChild(node);
}
function insert(target, node, anchor) {
target.insertBefore(node, anchor || null);
}
function detach(node) {
node.parentNode.removeChild(node);
}
function destroy_each(iterations, detaching) {
for (let i = 0; i < iterations.length; i += 1) {
if (iterations[i])
iterations[i].d(detaching);
}
}
function element(name) {
return document.createElement(name);
}
function text(data) {
return document.createTextNode(data);
}
function space() {
return text(" ");
}
function empty() {
return text("");
}
function listen(node, event, handler, options) {
node.addEventListener(event, handler, options);
return () => node.removeEventListener(event, handler, options);
}
function attr(node, attribute, value) {
if (value == null)
node.removeAttribute(attribute);
else if (node.getAttribute(attribute) !== value)
node.setAttribute(attribute, value);
}
function children(element2) {
return Array.from(element2.childNodes);
}
function set_data(text2, data) {
data = "" + data;
if (text2.wholeText !== data)
text2.data = data;
}
function set_style(node, key, value, important) {
node.style.setProperty(key, value, important ? "important" : "");
}
var current_component;
function set_current_component(component) {
current_component = component;
}
var dirty_components = [];
var binding_callbacks = [];
var render_callbacks = [];
var flush_callbacks = [];
var resolved_promise = Promise.resolve();
var update_scheduled = false;
function schedule_update() {
if (!update_scheduled) {
update_scheduled = true;
resolved_promise.then(flush);
}
}
function add_render_callback(fn2) {
render_callbacks.push(fn2);
}
var flushing = false;
var seen_callbacks = /* @__PURE__ */ new Set();
function flush() {
if (flushing)
return;
flushing = true;
do {
for (let i = 0; i < dirty_components.length; i += 1) {
const component = dirty_components[i];
set_current_component(component);
update(component.$$);
}
set_current_component(null);
dirty_components.length = 0;
while (binding_callbacks.length)
binding_callbacks.pop()();
for (let i = 0; i < render_callbacks.length; i += 1) {
const callback = render_callbacks[i];
if (!seen_callbacks.has(callback)) {
seen_callbacks.add(callback);
callback();
}
}
render_callbacks.length = 0;
} while (dirty_components.length);
while (flush_callbacks.length) {
flush_callbacks.pop()();
}
update_scheduled = false;
flushing = false;
seen_callbacks.clear();
}
function update($$) {
if ($$.fragment !== null) {
$$.update();
run_all($$.before_update);
const dirty = $$.dirty;
$$.dirty = [-1];
$$.fragment && $$.fragment.p($$.ctx, dirty);
$$.after_update.forEach(add_render_callback);
}
}
var outroing = /* @__PURE__ */ new Set();
var outros;
function group_outros() {
outros = {
r: 0,
c: [],
p: outros
};
}
function check_outros() {
if (!outros.r) {
run_all(outros.c);
}
outros = outros.p;
}
function transition_in(block, local) {
if (block && block.i) {
outroing.delete(block);
block.i(local);
}
}
function transition_out(block, local, detach2, callback) {
if (block && block.o) {
if (outroing.has(block))
return;
outroing.add(block);
outros.c.push(() => {
outroing.delete(block);
if (callback) {
if (detach2)
block.d(1);
callback();
}
});
block.o(local);
}
}
var globals = typeof window !== "undefined" ? window : typeof globalThis !== "undefined" ? globalThis : global;
function create_component(block) {
block && block.c();
}
function mount_component(component, target, anchor, customElement) {
const { fragment, on_mount, on_destroy, after_update } = component.$$;
fragment && fragment.m(target, anchor);
if (!customElement) {
add_render_callback(() => {
const new_on_destroy = on_mount.map(run).filter(is_function);
if (on_destroy) {
on_destroy.push(...new_on_destroy);
} else {
run_all(new_on_destroy);
}
component.$$.on_mount = [];
});
}
after_update.forEach(add_render_callback);
}
function destroy_component(component, detaching) {
const $$ = component.$$;
if ($$.fragment !== null) {
run_all($$.on_destroy);
$$.fragment && $$.fragment.d(detaching);
$$.on_destroy = $$.fragment = null;
$$.ctx = [];
}
}
function make_dirty(component, i) {
if (component.$$.dirty[0] === -1) {
dirty_components.push(component);
schedule_update();
component.$$.dirty.fill(0);
}
component.$$.dirty[i / 31 | 0] |= 1 << i % 31;
}
function init(component, options, instance6, create_fragment6, not_equal, props, append_styles, dirty = [-1]) {
const parent_component = current_component;
set_current_component(component);
const $$ = component.$$ = {
fragment: null,
ctx: null,
props,
update: noop,
not_equal,
bound: blank_object(),
on_mount: [],
on_destroy: [],
on_disconnect: [],
before_update: [],
after_update: [],
context: new Map(options.context || (parent_component ? parent_component.$$.context : [])),
callbacks: blank_object(),
dirty,
skip_bound: false,
root: options.target || parent_component.$$.root
};
append_styles && append_styles($$.root);
let ready = false;
$$.ctx = instance6 ? instance6(component, options.props || {}, (i, ret, ...rest) => {
const value = rest.length ? rest[0] : ret;
if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) {
if (!$$.skip_bound && $$.bound[i])
$$.bound[i](value);
if (ready)
make_dirty(component, i);
}
return ret;
}) : [];
$$.update();
ready = true;
run_all($$.before_update);
$$.fragment = create_fragment6 ? create_fragment6($$.ctx) : false;
if (options.target) {
if (options.hydrate) {
start_hydrating();
const nodes = children(options.target);
$$.fragment && $$.fragment.l(nodes);
nodes.forEach(detach);
} else {
$$.fragment && $$.fragment.c();
}
if (options.intro)
transition_in(component.$$.fragment);
mount_component(component, options.target, options.anchor, options.customElement);
end_hydrating();
flush();
}
set_current_component(parent_component);
}
var SvelteElement;
if (typeof HTMLElement === "function") {
SvelteElement = class extends HTMLElement {
constructor() {
super();
this.attachShadow({ mode: "open" });
}
connectedCallback() {
const { on_mount } = this.$$;
this.$$.on_disconnect = on_mount.map(run).filter(is_function);
for (const key in this.$$.slotted) {
this.appendChild(this.$$.slotted[key]);
}
}
attributeChangedCallback(attr2, _oldValue, newValue) {
this[attr2] = newValue;
}
disconnectedCallback() {
run_all(this.$$.on_disconnect);
}
$destroy() {
destroy_component(this, 1);
this.$destroy = noop;
}
$on(type, callback) {
const callbacks = this.$$.callbacks[type] || (this.$$.callbacks[type] = []);
callbacks.push(callback);
return () => {
const index = callbacks.indexOf(callback);
if (index !== -1)
callbacks.splice(index, 1);
};
}
$set($$props) {
if (this.$$set && !is_empty($$props)) {
this.$$.skip_bound = true;
this.$$set($$props);
this.$$.skip_bound = false;
}
}
};
}
var SvelteComponent = class {
$destroy() {
destroy_component(this, 1);
this.$destroy = noop;
}
$on(type, callback) {
const callbacks = this.$$.callbacks[type] || (this.$$.callbacks[type] = []);
callbacks.push(callback);
return () => {
const index = callbacks.indexOf(callback);
if (index !== -1)
callbacks.splice(index, 1);
};
}
$set($$props) {
if (this.$$set && !is_empty($$props)) {
this.$$.skip_bound = true;
this.$$set($$props);
this.$$.skip_bound = false;
}
}
};
// node_modules/tslib/modules/index.js
var import_tslib = __toModule(require_tslib());
var {
__extends,
__assign,
__rest,
__decorate,
__param,
__metadata,
__awaiter,
__generator,
__exportStar,
__createBinding,
__values,
__read,
__spread,
__spreadArrays,
__spreadArray,
__await,
__asyncGenerator,
__asyncDelegator,
__asyncValues,
__makeTemplateObject,
__importStar,
__importDefault,
__classPrivateFieldGet,
__classPrivateFieldSet
} = import_tslib.default;
// node_modules/svelte/store/index.mjs
var subscriber_queue = [];
function writable(value, start2 = noop) {
let stop;
const subscribers = /* @__PURE__ */ new Set();
function set(new_value) {
if (safe_not_equal(value, new_value)) {
value = new_value;
if (stop) {
const run_queue = !subscriber_queue.length;
for (const subscriber of subscribers) {
subscriber[1]();
subscriber_queue.push(subscriber, value);
}
if (run_queue) {
for (let i = 0; i < subscriber_queue.length; i += 2) {
subscriber_queue[i][0](subscriber_queue[i + 1]);
}
subscriber_queue.length = 0;
}
}
}
}
function update2(fn2) {
set(fn2(value));
}
function subscribe2(run2, invalidate = noop) {
const subscriber = [run2, invalidate];
subscribers.add(subscriber);
if (subscribers.size === 1) {
stop = start2(set) || noop;
}
run2(value);
return () => {
subscribers.delete(subscriber);
if (subscribers.size === 0) {
stop();
stop = null;
}
};
}
return { set, update: update2, subscribe: subscribe2 };
}
// src/stores.ts
var configuredFeedsStore = writable([]);
var filteredStore = writable([]);
var settingsStore = writable(DEFAULT_SETTINGS);
var feedsStore = writable([]);
var sortedFeedsStore = writable();
var filteredItemsStore = writable();
var foldedState = writable();
var tagsStore = writable();
var folderStore = writable();
// src/view/IconComponent.svelte
var import_obsidian = __toModule(require("obsidian"));
function create_if_block(ctx) {
let span;
let icon_action;
let mounted;
let dispose;
return {
c() {
span = element("span");
},
m(target, anchor) {
insert(target, span, anchor);
if (!mounted) {
dispose = action_destroyer(icon_action = ctx[1].call(null, span, ctx[0]));
mounted = true;
}
},
p(ctx2, dirty) {
if (icon_action && is_function(icon_action.update) && dirty & 1)
icon_action.update.call(null, ctx2[0]);
},
d(detaching) {
if (detaching)
detach(span);
mounted = false;
dispose();
}
};
}
function create_fragment(ctx) {
let if_block_anchor;
let if_block = ctx[0].length > 0 && create_if_block(ctx);
return {
c() {
if (if_block)
if_block.c();
if_block_anchor = empty();
},
m(target, anchor) {
if (if_block)
if_block.m(target, anchor);
insert(target, if_block_anchor, anchor);
},
p(ctx2, [dirty]) {
if (ctx2[0].length > 0) {
if (if_block) {
if_block.p(ctx2, dirty);
} else {
if_block = create_if_block(ctx2);
if_block.c();
if_block.m(if_block_anchor.parentNode, if_block_anchor);
}
} else if (if_block) {
if_block.d(1);
if_block = null;
}
},
i: noop,
o: noop,
d(detaching) {
if (if_block)
if_block.d(detaching);
if (detaching)
detach(if_block_anchor);
}
};
}
function instance($$self, $$props, $$invalidate) {
let { iconName = "" } = $$props;
const icon = (node, icon2) => {
(0, import_obsidian.setIcon)(node, icon2);
};
$$self.$$set = ($$props2) => {
if ("iconName" in $$props2)
$$invalidate(0, iconName = $$props2.iconName);
};
return [iconName, icon];
}
var IconComponent = class extends SvelteComponent {
constructor(options) {
super();
init(this, options, instance, create_fragment, safe_not_equal, { iconName: 0 });
}
};
var IconComponent_default = IconComponent;
// src/modals/ItemModal.ts
var import_obsidian9 = __toModule(require("obsidian"));
// src/functions.ts
var import_obsidian5 = __toModule(require("obsidian"));
// src/modals/TextInputPrompt.ts
var import_obsidian3 = __toModule(require("obsidian"));
// src/modals/BaseModal.ts
var import_obsidian2 = __toModule(require("obsidian"));
var BaseModal = class extends import_obsidian2.Modal {
setValidationError(input, message) {
input.inputEl.addClass("is-invalid");
if (message) {
input.inputEl.parentElement.addClasses([
"has-invalid-message",
"unset-align-items"
]);
input.inputEl.parentElement.parentElement.addClass(".unset-align-items");
let mDiv = input.inputEl.parentElement.querySelector(".invalid-feedback");
if (!mDiv) {
mDiv = createDiv({ cls: "invalid-feedback" });
}
mDiv.innerText = message;
mDiv.insertAfter(input.inputEl);
}
}
removeValidationError(input) {
input.inputEl.removeClass("is-invalid");
input.inputEl.parentElement.removeClasses([
"has-invalid-message",
"unset-align-items"
]);
input.inputEl.parentElement.parentElement.removeClass(".unset-align-items");
if (input.inputEl.parentElement.querySelector(".invalid-feedback")) {
input.inputEl.parentElement.removeChild(input.inputEl.parentElement.querySelector(".invalid-feedback"));
}
}
};
// src/l10n/locales/en.ts
var en_default = {
RSS_Reader: "RSS Reader",
RSS_Feeds: "RSS Feeds",
open: "Open",
refresh_feeds: "Refresh feeds",
create_all: "Create all",
mark_all_as_read: "Mark all as read",
add_tags_to_all: "Add tags to all entries",
filtered_folders: "Filtered Folders",
folders: "Folders",
folder: "Folder",
feeds: "Feeds",
create_note: "create new note",
paste_to_note: "paste to current note",
copy_to_clipboard: "copy to clipboard",
open_browser: "open in browser",
edit_tags: "edit tags",
mark_as_read: "Mark as read",
mark_as_unread: "Mark as unread",
mark_as_favorite: "mark as favorite",
remove_from_favorites: "remove from favorites",
read_article_tts: "read article with TTS",
next: "next",
previous: "previous",
mark_as_read_unread: "mark as read/unread",
mark_as_favorite_remove: "mark as favorite/remove from favorites",
marked_as_read: "marked item as read",
marked_as_unread: "marked item as unread",
removed_from_favorites: "removed item from favorites",
added_to_favorites: "marked item as favorite",
read: "read",
unread: "unread",
favorites: "Favorites",
favorite: "Favorite",
tags: "Tags",
tag: "Tag",
save: "Save",
cancel: "Cancel",
delete: "Delete",
edit: "Edit",
reset: "restore default",
fix_errors: "Please fix errors before saving.",
add_new: "Add new",
add_new_feed: "Add new feed",
feed_already_configured: "you already have a feed configured with that url",
no_folder: "No folder",
name: "Name",
name_help: "What do you want this feed to show up as?",
url_help: "What is the URL to the feed?",
folder_help: "What do you categorize this feed as?",
invalid_name: "you need to specify a name",
invalid_url: "this url is not valid",
invalid_feed: "This feed does not have any entries",
filter_tags: "all articles with tags",
filter_unread: "All unread articles(from folders)",
filter_read: "All read articles(from folders)",
filter_favorites: "Favorites(from folders)",
sort_date_newest: "Publication date (new to old)",
sort_date_oldest: "Publication date (old to new)",
sort_alphabet_normal: "Name (A to Z)",
sort_alphabet_inverted: "Name (Z to A)",
sort: "Order by",
filter_name_help: "What do you want this filter to show up as?",
filter_type: "Type",
filter_type_help: "Type of filter",
filter: "Filter",
filter_help: "Folders/Tags to filter on, split by ,",
only_favorites: "Show only favorites",
show_read: "Show read",
show_unread: "Show unread",
filter_folder_help: "Only show articles from the following folders",
filter_feed_help: "Only show articles from the following feeds",
filter_tags_help: "Only show articles with the following tags",
from_folders: "from folders: ",
from_feeds: "from feeds: ",
with_tags: "with tags: ",
invalid_tag: "This is not a valid tag",
note_exists: "there is already a note with that name",
invalid_filename: "that filename is not valid",
specify_name: "Please specify a filename",
cannot_contain: "cannot contain:",
created_note: "Created note from article",
inserted_article: "inserted article into note",
no_file_active: "no file active",
settings: "Settings",
file_creation: "File creation",
template_new: "new file template",
template_new_help: "When creating a note from a article this gets processed.",
template_paste: "paste article template",
template_paste_help: "When pasting/copying an article this gets processed.",
available_variables: "Available variables are:",
file_location: "Default location for new notes",
file_location_help: "Where newly created notes are placed",
file_location_default: "In the default folder",
file_location_custom: "In the folder specified below",
file_location_folder: "Folder to create new articles in",
file_location_folder_help: "newly created articles will appear in this folder",
date_format: "Date format",
syntax_reference: "Syntax Reference",
syntax_looks: "Your current syntax looks like this: ",
ask_filename: "Ask for filename",
ask_filename_help: "Disable to use title as filename(with invalid symbols removed)",
refresh_time: "Refresh time",
refresh_time_help: "How often should the feeds be refreshed, in minutes, use 0 to disable",
specify_positive_number: "please specify a positive number",
multi_device_usage: "Multi device usage",
multi_device_usage_help: "Keep article status synced when using multiple devices at the same time\n(Requires a restart to become effective)",
add_new_filter: "Add new filtered folder",
filter_exists: "you already have a filter configured with that name",
hotkeys: "Hotkeys",
hotkeys_reading: "when reading a article",
press_key: "press a key",
customize_hotkey: "customize this hotkey",
refreshed_feeds: "Feeds refreshed",
import: "Import",
import_opml: "Import from OPML",
imported_x_feeds: "Imported %1 feeds",
choose_file: "Choose file",
choose_file_help: "Choose file to import",
export_opml: "Export as OPML",
default_filename: "Template for filename",
default_filename_help: "All variables from the paste template are available",
cleanup: "Cleanup articles",
cleanup_help: "Removes all entries which fit the criteria specified below.",
cleanup_help2: "Keep in mind that all articles that still exist in the feed will reappear on the next refresh",
perform_cleanup: "Perform cleanup",
all: "all",
from_feed: "from feed",
older_than: "older than X Days",
older_than_help: "keep empty for all, will be ignored if there is no publishing date associated with entry",
advanced: "Advanced",
remove_wrong_feed: "Remove all articles that are in the incorrect feed",
remove_wrong_feed_help: "This might have happened due to a bug in versions pre 0.8",
scanning_items: "Scanning Articles (%1 / %2)",
created_export: "Created OPML file in your Vaults root folder",
add: "Add",
from_archive: "Get old articles from archive.org",
reading_archive: "Reading data from archive",
scanning_duplicates: "Scanning for duplicates",
do_not_close: "Please do not close this window"
};
// src/l10n/locales/de.ts
var de_default = {
RSS_Reader: "RSS Reader",
RSS_Feeds: "RSS Feeds",
open: "\xD6ffnen",
refresh_feeds: "Feeds neu laden",
create_all: "Alle erstellen",
mark_all_as_read: "Alle als gelesen markieren",
add_tags_to_all: "Tags zu allen hinzuf\xFCgen",
filtered_folders: "Gefilterte Ordner",
folders: "Ordner",
folder: "Ordner",
feeds: "Feeds",
create_note: "Neue Notiz erstellen",
paste_to_note: "In aktuelle Notiz einf\xFCgen",
copy_to_clipboard: "In die Zwischenablage kopieren",
open_browser: "Im Webbrowser \xF6ffnen",
edit_tags: "Tags bearbeiten",
mark_as_read: "Als gelesen markieren",
mark_as_unread: "Als ungelesen markieren",
mark_as_favorite: "As Favorit markieren",
remove_from_favorites: "Aus den Favoriten entfernen",
read_article_tts: "Vorlesen",
next: "n\xE4chster",
previous: "vorheriger",
mark_as_read_unread: "Als gelesen/ungelesen markieren",
mark_as_favorite_remove: "Als Favorit markieren/Aus den Favoriten entfernen",
marked_as_read: "Als gelesen markiert",
marked_as_unread: "Als ungelesen markiert",
removed_from_favorites: "Von den Favoriten entfernt",
added_to_favorites: "Als Favorit markiert",
read: "gelesen",
unread: "ungelesen",
favorites: "Favoriten",
favorite: "Favorit",
tags: "Tags",
tag: "Tag",
save: "Speichern",
cancel: "Abbrechen",
delete: "L\xF6schen",
edit: "Bearbeiten",
reset: "zur\xFCcksetzen",
fix_errors: "Bitte behebe die Fehler vor dem speichern.",
add_new: "neu hinzuf\xFCgen",
add_new_feed: "neuen Feed hinzuf\xFCgen",
feed_already_configured: "Es existiert bereits ein Feed mit dieser URL",
no_folder: "Kein Ordner",
name: "Name",
name_help: "Unter welchem Namen soll dieser Feed angezeigt werden?",
url_help: "Wie lautet die URL zu diesem Feed?",
folder_help: "Als was kategorisierst du diesen Feed?",
invalid_name: "Du must einen g\xFCltigen Namen vergeben",
invalid_url: "diese URL ist nicht g\xFCltig",
invalid_feed: "Dieser Feed hat keine Eintr\xE4ge",
filter_tags: "Alle Artikel mit Tags",
filter_unread: "Alle ungelesenen Artikel(aus Ordnern)",
filter_read: "Alle gelesenen Artikel(aus Ordnern)",
filter_favorites: "Favoriten(aus Ordnern)",
sort_date_newest: "Ver\xF6ffentlichungsdatum (neu - alt)",
sort_date_oldest: "Ver\xF6ffentlichungsdatum (alt - neu)",
sort_alphabet_normal: "Name (A - Z)",
sort_alphabet_inverted: "Name (Z - A)",
sort: "Ordnen nach",
filter_name_help: "Wie soll der Filter angezeigt werden?",
filter_type: "Typ",
filter_type_help: "Typ des Filters",
filter: "Filter",
filter_help: "Order/Tags die gefiltert werden sollen, getrennt durch ,",
only_favorites: "Zeige nur Favoriten",
show_read: "Zeige gelesene",
show_unread: "Zeige ungelesene",
filter_folder_help: "Zeige nur Artikel aus den folgenden Ordnern",
filter_feed_help: "Zeige nur Artikel aus den folgenden Feeds",
filter_tags_help: "Zeige nur Artikel mit den folgenden Tags",
from_folders: "Aus Ordnern: ",
from_feeds: "Aus Feeds: ",
with_tags: "Mit Tags: ",
invalid_tag: "Dieser Tag ist nicht g\xFCltig",
note_exists: "Es existiert bereits eine Notiz mit diesem Namen",
invalid_filename: "Der Dateiname ist nicht g\xFCltig",
specify_name: "Bitte einen Dateinamen angeben",
cannot_contain: "kann nicht enhalten:",
created_note: "Notiz erstellt",
inserted_article: "in Notiz eingef\xFCgt",
no_file_active: "Keine Datei ge\xF6ffnet",
settings: "Einstellungen",
file_creation: "Dateierstellung",
template_new: "Vorlage f\xFCr neue Dateien",
template_new_help: "Beim erstellen einer Notiz wird dies verarbeitet.",
template_paste: "Vorlage beim Einf\xFCgen in eine Datei",
template_paste_help: "Beim einf\xFCgen/in die Zwischenablage kopieren wird dies verarbeitet.",
available_variables: "M\xF6gliche Variablen sind:",
file_location: "Speicherort f\xFCr neue Notizen",
file_location_help: "Wo sollen neue Notizen gespeichert werden?",
file_location_default: "In Standardordner",
file_location_custom: "Eigenen Ordner festlegen",
file_location_folder: "Ordner f\xFCr neue Notizen",
file_location_folder_help: "Speichert neue Notizen an diesem Ort",
date_format: "Datumsformat",
syntax_reference: "Syntax Referenz",
syntax_looks: "So wird es aussehen: ",
ask_filename: "Nach Dateiname fragen",
ask_filename_help: "Deaktivieren um Titel als Dateinamen zu verwenden(ohne ung\xFCltige Zeichen)",
refresh_time: "Aktualisierungsintervall",
refresh_time_help: "Wie h\xE4ufig soll auf neue Eintr\xE4ge \xFCberpr\xFCft werden(in Minuten), 0 zu deaktivieren",
specify_positive_number: "Bitte eine positive Zahl angeben",
multi_device_usage: "Mit mehreren Ger\xE4ten nutzen",
multi_device_usage_help: "Syncronisiere Lesestatus & Tags zwischen mehreren gleichzeitig genutzten Ger\xE4ten\n(Ben\xF6tigt einen Neustart der App)",
add_new_filter: "Neuen gefilterten Ordner erstellen",
filter_exists: "Es exisitiert bereits ein Feed mit diesem Namen",
hotkeys: "Tastenk\xFCrzel",
hotkeys_reading: "in der Leseansicht",
press_key: "dr\xFCcke eine Taste",
customize_hotkey: "dieses Tastenk\xFCrzel anpassen",
refreshed_feeds: "Feeds aktualisiert",
import: "Importieren",
import_opml: "Aus OPML importieren",
imported_x_feeds: "%1 Feeds importiert",
choose_file: "Datei ausw\xE4hlen",
choose_file_help: "W\xE4hle eine Datei aus der importiert werden soll",
export_opml: "Als OPML exportieren",
default_filename: "Vorlage f\xFCr Dateinamen",
default_filename_help: "Alle Variablen aus der einf\xFCgen Vorlage k\xF6nnen verwendet werden",
cleanup: "Artikel aufr\xE4umen",
cleanup_help: "Entfernt alle Artikel auf die folgende Kriterien zutreffen",
cleanup_help2: "Alle Artikel die noch im Feed vorhanden sind werden beim n\xE4chsten aktualisieren wieder erscheinen",
perform_cleanup: "ausf\xFChren",
all: "Alle",
from_feed: "von Feed",
older_than: "\xE4lter als X Tage",
older_than_help: "Leerlassen f\xFCr alle, wird ignoriert wenn Artikel kein Ver\xF6ffentlichungsdatum hat",
advanced: "Erweitert",
remove_wrong_feed: "Alle Artikel entfernen die im falschen Feed gelandet sind",
remove_wrong_feed_help: "Aufgrund eines Fehlers in Versionen vor 0.8 k\xF6nnte dies passiert sein",
scanning_items: "Verarbeite Artikel (%1 / %2)",
created_export: "OPML Export in Vault erstellt",
add: "Hinzuf\xFCgen",
from_archive: "Alte Artikel von archive.org lesen",
reading_archive: "Daten werden aus Archiv geladen",
scanning_duplicates: "Entferne Duplikate",
do_not_close: "Bitte dieses Fenster nicht schliesen"
};
// src/l10n/locale.ts
var locale = window.moment.locale;
var localeMap = {
en: en_default,
de: de_default
};
var userLocale = localeMap[locale()];
function t(str, ...inserts) {
var _a;
let localeStr = (_a = userLocale && userLocale[str]) != null ? _a : en_default[str];
for (let i = 0; i < inserts.length; i++) {
localeStr = localeStr.replace(`%${i + 1}`, inserts[i]);
}
return localeStr;
}
// src/modals/TextInputPrompt.ts
var TextInputPrompt = class extends BaseModal {
constructor(app, promptText, hint, defaultValue, placeholder, buttonText = t("save")) {
super(app);
this.promptText = promptText;
this.hint = hint;
this.defaultValue = defaultValue;
this.placeholder = placeholder;
this.buttonText = buttonText;
}
onOpen() {
this.titleEl.setText(this.promptText);
this.createForm();
}
onClose() {
this.contentEl.empty();
}
createForm() {
const div = this.contentEl.createDiv();
const text2 = new import_obsidian3.Setting(div).setName(this.promptText).setDesc(this.hint).addText((textComponent) => {
textComponent.setValue(this.defaultValue).setPlaceholder(this.placeholder).onChange(() => {
this.removeValidationError(textComponent);
}).inputEl.setAttribute("size", "50");
this.textComponent = textComponent;
});
text2.controlEl.addClass("rss-setting-input");
new import_obsidian3.Setting(div).addButton((b) => {
b.setButtonText(this.buttonText).onClick(() => __async(this, null, function* () {
this.resolve(this.textComponent);
}));
return b;
});
}
openAndGetValue(resolve) {
return __async(this, null, function* () {
this.resolve = resolve;
yield this.open();
});
}
};
// src/consts.ts
var VIEW_ID = "RSS_FEED";
var FILE_NAME_REGEX = /["\/<>:|?]/gm;
var TAG_REGEX = /([\p{Letter}\p{Emoji_Presentation}\p{Number}\/_-]+)/u;
var NUMBER_REGEX = /^[0-9]*$/gm;
function sanitizeHTMLToDom(html) {
return window.DOMPurify.sanitize(html, {
ALLOW_UNKNOWN_PROTOCOLS: true,
RETURN_DOM_FRAGMENT: true,
RETURN_DOM_IMPORT: true,
FORBID_TAGS: ["style"],
ADD_TAGS: ["iframe"],
ADD_ATTR: ["frameborder", "allowfullscreen", "allow", "aria-label-position"]
});
}
function isValidHttpUrl(string) {
let url;
try {
url = new URL(string);
} catch (_) {
return false;
}
return url.protocol === "http:" || url.protocol === "https:";
}
// node_modules/obsidian-community-lib/dist/utils.js
var feather = __toModule(require_feather());
var import_obsidian4 = __toModule(require("obsidian"));
function addFeatherIcon(name, attr2 = { viewBox: "0 0 24 24", width: "100", height: "100" }) {
if (feather.icons[name]) {
const iconName = `feather-${name}`;
(0, import_obsidian4.addIcon)(iconName, feather.icons[name].toSvg(attr2));
return iconName;
} else {
throw Error(`This Icon (${name}) doesn't exist in the Feather Library.`);
}
}
function copy(content, success = () => new import_obsidian4.Notice("Copied to clipboard"), failure = (reason) => {
new import_obsidian4.Notice("Could not copy to clipboard");
console.log({ reason });
}) {
return __async(this, null, function* () {
yield navigator.clipboard.writeText(content).then(success, failure);
});
}
var isInVault = (app, noteName, sourcePath = "") => !!app.metadataCache.getFirstLinkpathDest(noteName, sourcePath);
// src/functions.ts
function createNewNote(plugin, item) {
return __async(this, null, function* () {
const activeFile = plugin.app.workspace.getActiveFile();
let dir = plugin.app.fileManager.getNewFileParent(activeFile ? activeFile.path : "").path;
if (plugin.settings.saveLocation === "custom") {
dir = plugin.settings.saveLocationFolder;
}
let filename = applyTemplate(item, plugin.settings.defaultFilename, plugin.settings);
filename = filename.replace(/[\/\\:]/g, " ");
if (plugin.settings.askForFilename) {
const inputPrompt = new TextInputPrompt(plugin.app, t("specify_name"), t("cannot_contain") + ' * " \\ / < > : | ?', filename, filename);
yield inputPrompt.openAndGetValue((text2) => __async(this, null, function* () {
const value = text2.getValue();
if (value.match(FILE_NAME_REGEX)) {
inputPrompt.setValidationError(text2, t("invalid_filename"));
return;
}
const filePath = (0, import_obsidian5.normalizePath)([dir, `${value}.md`].join("/"));
if (isInVault(plugin.app, filePath, "")) {
inputPrompt.setValidationError(text2, t("note_exists"));
return;
}
inputPrompt.close();
yield createNewFile(plugin, item, filePath, value);
}));
} else {
const replacedTitle = filename.replace(FILE_NAME_REGEX, "");
const filePath = (0, import_obsidian5.normalizePath)([dir, `${replacedTitle}.md`].join("/"));
yield createNewFile(plugin, item, filePath, item.title);
}
});
}
function createNewFile(plugin, item, path, title) {
return __async(this, null, function* () {
if (isInVault(plugin.app, path, "")) {
new import_obsidian5.Notice(t("note_exists"));
return;
}
const appliedTemplate = applyTemplate(item, plugin.settings.template, plugin.settings, title);
const file = yield plugin.app.vault.create(path, appliedTemplate);
yield plugin.app.workspace.activeLeaf.openFile(file, {
state: { mode: "edit" }
});
item.created = true;
const items = plugin.settings.items;
yield plugin.writeFeedContent(() => {
return items;
});
new import_obsidian5.Notice(t("created_note"));
});
}
function pasteToNote(plugin, item) {
return __async(this, null, function* () {
const file = plugin.app.workspace.getActiveFile();
if (file === null) {
new import_obsidian5.Notice(t("no_file_active"));
return;
}
const view = plugin.app.workspace.getActiveViewOfType(import_obsidian5.MarkdownView);
if (view) {
const appliedTemplate = applyTemplate(item, plugin.settings.pasteTemplate, plugin.settings);
const editor = view.editor;
editor.replaceRange(appliedTemplate, editor.getCursor());
item.created = true;
const items = plugin.settings.items;
yield plugin.writeFeedContent(() => {
return items;
});
new import_obsidian5.Notice(t("RSS_Reader") + t("inserted_article"));
}
});
}
function applyTemplate(item, template, settings, filename) {
let result = template.replace(/{{title}}/g, item.title);
result = result.replace(/{{link}}/g, item.link);
result = result.replace(/{{author}}/g, item.creator);
result = result.replace(/{{published}}/g, (0, import_obsidian5.moment)(item.pubDate).format(settings.dateFormat));
result = result.replace(/{{created}}/g, (0, import_obsidian5.moment)().format(settings.dateFormat));
result = result.replace(/{{date}}/g, (0, import_obsidian5.moment)().format(settings.dateFormat));
result = result.replace(/{{feed}}/g, item.feed);
result = result.replace(/{{folder}}/g, item.folder);
result = result.replace(/{{description}}/g, item.description);
result = result.replace(/{{media}}/g, item.enclosure);
result = result.replace(/({{published:).*(}})/g, function(k) {
const value = k.split(":")[1];
const format2 = value.substring(0, value.indexOf("}"));
return (0, import_obsidian5.moment)(item.pubDate).format(format2);
});
result = result.replace(/({{created:).*(}})/g, function(k) {
const value = k.split(":")[1];
const format2 = value.substring(0, value.indexOf("}"));
return (0, import_obsidian5.moment)().format(format2);
});
result = result.replace(/({{tags:).*(}})/g, function(k) {
const value = k.split(":")[1];
const separator = value.substring(0, value.indexOf("}"));
return item.tags.join(separator);
});
result = result.replace(/({{#tags:).*(}})/g, function(k) {
const value = k.split(":")[1];
const separator = value.substring(0, value.indexOf("}"));
return item.tags.map((i) => "#" + i).join(separator);
});
result = result.replace(/{{tags}}/, item.tags.join(", "));
result = result.replace(/{{#tags}}/, item.tags.map((i) => "#" + i).join(", "));
if (filename) {
result = result.replace(/{{filename}}/g, filename);
}
let content = (0, import_obsidian5.htmlToMarkdown)(item.content);
content = content.replace(/\$/g, "$$$");
result = result.replace(/{{content}}/g, content);
return result;
}
function openInBrowser(item) {
if (typeof item.link === "string") {
window.open(item.link, "_blank");
}
}
// src/actions/Action.ts
var import_obsidian8 = __toModule(require("obsidian"));
// src/modals/TagModal.ts
var import_obsidian7 = __toModule(require("obsidian"));
// src/settings/suggest.ts
var import_obsidian6 = __toModule(require("obsidian"));
// node_modules/@popperjs/core/lib/enums.js
var top = "top";
var bottom = "bottom";
var right = "right";
var left = "left";
var auto = "auto";
var basePlacements = [top, bottom, right, left];
var start = "start";
var end = "end";
var clippingParents = "clippingParents";
var viewport = "viewport";
var popper = "popper";
var reference = "reference";
var variationPlacements = /* @__PURE__ */ basePlacements.reduce(function(acc, placement) {
return acc.concat([placement + "-" + start, placement + "-" + end]);
}, []);
var placements = /* @__PURE__ */ [].concat(basePlacements, [auto]).reduce(function(acc, placement) {
return acc.concat([placement, placement + "-" + start, placement + "-" + end]);
}, []);
var beforeRead = "beforeRead";
var read = "read";
var afterRead = "afterRead";
var beforeMain = "beforeMain";
var main = "main";
var afterMain = "afterMain";
var beforeWrite = "beforeWrite";
var write = "write";
var afterWrite = "afterWrite";
var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];
// node_modules/@popperjs/core/lib/dom-utils/getNodeName.js
function getNodeName(element2) {
return element2 ? (element2.nodeName || "").toLowerCase() : null;
}
// node_modules/@popperjs/core/lib/dom-utils/getWindow.js
function getWindow(node) {
if (node == null) {
return window;
}
if (node.toString() !== "[object Window]") {
var ownerDocument = node.ownerDocument;
return ownerDocument ? ownerDocument.defaultView || window : window;
}
return node;
}
// node_modules/@popperjs/core/lib/dom-utils/instanceOf.js
function isElement(node) {
var OwnElement = getWindow(node).Element;
return node instanceof OwnElement || node instanceof Element;
}
function isHTMLElement(node) {
var OwnElement = getWindow(node).HTMLElement;
return node instanceof OwnElement || node instanceof HTMLElement;
}
function isShadowRoot(node) {
if (typeof ShadowRoot === "undefined") {
return false;
}
var OwnElement = getWindow(node).ShadowRoot;
return node instanceof OwnElement || node instanceof ShadowRoot;
}
// node_modules/@popperjs/core/lib/modifiers/applyStyles.js
function applyStyles(_ref) {
var state = _ref.state;
Object.keys(state.elements).forEach(function(name) {
var style = state.styles[name] || {};
var attributes = state.attributes[name] || {};
var element2 = state.elements[name];
if (!isHTMLElement(element2) || !getNodeName(element2)) {
return;
}
Object.assign(element2.style, style);
Object.keys(attributes).forEach(function(name2) {
var value = attributes[name2];
if (value === false) {
element2.removeAttribute(name2);
} else {
element2.setAttribute(name2, value === true ? "" : value);
}
});
});
}
function effect(_ref2) {
var state = _ref2.state;
var initialStyles = {
popper: {
position: state.options.strategy,
left: "0",
top: "0",
margin: "0"
},
arrow: {
position: "absolute"
},
reference: {}
};
Object.assign(state.elements.popper.style, initialStyles.popper);
state.styles = initialStyles;
if (state.elements.arrow) {
Object.assign(state.elements.arrow.style, initialStyles.arrow);
}
return function() {
Object.keys(state.elements).forEach(function(name) {
var element2 = state.elements[name];
var attributes = state.attributes[name] || {};
var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]);
var style = styleProperties.reduce(function(style2, property) {
style2[property] = "";
return style2;
}, {});
if (!isHTMLElement(element2) || !getNodeName(element2)) {
return;
}
Object.assign(element2.style, style);
Object.keys(attributes).forEach(function(attribute) {
element2.removeAttribute(attribute);
});
});
};
}
var applyStyles_default = {
name: "applyStyles",
enabled: true,
phase: "write",
fn: applyStyles,
effect,
requires: ["computeStyles"]
};
// node_modules/@popperjs/core/lib/utils/getBasePlacement.js
function getBasePlacement(placement) {
return placement.split("-")[0];
}
// node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js
function getBoundingClientRect(element2, includeScale) {
if (includeScale === void 0) {
includeScale = false;
}
var rect = element2.getBoundingClientRect();
var scaleX = 1;
var scaleY = 1;
return {
width: rect.width / scaleX,
height: rect.height / scaleY,
top: rect.top / scaleY,
right: rect.right / scaleX,
bottom: rect.bottom / scaleY,
left: rect.left / scaleX,
x: rect.left / scaleX,
y: rect.top / scaleY
};
}
// node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js
function getLayoutRect(element2) {
var clientRect = getBoundingClientRect(element2);
var width = element2.offsetWidth;
var height = element2.offsetHeight;
if (Math.abs(clientRect.width - width) <= 1) {
width = clientRect.width;
}
if (Math.abs(clientRect.height - height) <= 1) {
height = clientRect.height;
}
return {
x: element2.offsetLeft,
y: element2.offsetTop,
width,
height
};
}
// node_modules/@popperjs/core/lib/dom-utils/contains.js
function contains(parent, child) {
var rootNode = child.getRootNode && child.getRootNode();
if (parent.contains(child)) {
return true;
} else if (rootNode && isShadowRoot(rootNode)) {
var next = child;
do {
if (next && parent.isSameNode(next)) {
return true;
}
next = next.parentNode || next.host;
} while (next);
}
return false;
}
// node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js
function getComputedStyle2(element2) {
return getWindow(element2).getComputedStyle(element2);
}
// node_modules/@popperjs/core/lib/dom-utils/isTableElement.js
function isTableElement(element2) {
return ["table", "td", "th"].indexOf(getNodeName(element2)) >= 0;
}
// node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js
function getDocumentElement(element2) {
return ((isElement(element2) ? element2.ownerDocument : element2.document) || window.document).documentElement;
}
// node_modules/@popperjs/core/lib/dom-utils/getParentNode.js
function getParentNode(element2) {
if (getNodeName(element2) === "html") {
return element2;
}
return element2.assignedSlot || element2.parentNode || (isShadowRoot(element2) ? element2.host : null) || getDocumentElement(element2);
}
// node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js
function getTrueOffsetParent(element2) {
if (!isHTMLElement(element2) || getComputedStyle2(element2).position === "fixed") {
return null;
}
return element2.offsetParent;
}
function getContainingBlock(element2) {
var isFirefox = navigator.userAgent.toLowerCase().indexOf("firefox") !== -1;
var isIE = navigator.userAgent.indexOf("Trident") !== -1;
if (isIE && isHTMLElement(element2)) {
var elementCss = getComputedStyle2(element2);
if (elementCss.position === "fixed") {
return null;
}
}
var currentNode = getParentNode(element2);
while (isHTMLElement(currentNode) && ["html", "body"].indexOf(getNodeName(currentNode)) < 0) {
var css = getComputedStyle2(currentNode);
if (css.transform !== "none" || css.perspective !== "none" || css.contain === "paint" || ["transform", "perspective"].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === "filter" || isFirefox && css.filter && css.filter !== "none") {
return currentNode;
} else {
currentNode = currentNode.parentNode;
}
}
return null;
}
function getOffsetParent(element2) {
var window2 = getWindow(element2);
var offsetParent = getTrueOffsetParent(element2);
while (offsetParent && isTableElement(offsetParent) && getComputedStyle2(offsetParent).position === "static") {
offsetParent = getTrueOffsetParent(offsetParent);
}
if (offsetParent && (getNodeName(offsetParent) === "html" || getNodeName(offsetParent) === "body" && getComputedStyle2(offsetParent).position === "static")) {
return window2;
}
return offsetParent || getContainingBlock(element2) || window2;
}
// node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js
function getMainAxisFromPlacement(placement) {
return ["top", "bottom"].indexOf(placement) >= 0 ? "x" : "y";
}
// node_modules/@popperjs/core/lib/utils/math.js
var max = Math.max;
var min = Math.min;
var round = Math.round;
// node_modules/@popperjs/core/lib/utils/within.js
function within(min2, value, max2) {
return max(min2, min(value, max2));
}
// node_modules/@popperjs/core/lib/utils/getFreshSideObject.js
function getFreshSideObject() {
return {
top: 0,
right: 0,
bottom: 0,
left: 0
};
}
// node_modules/@popperjs/core/lib/utils/mergePaddingObject.js
function mergePaddingObject(paddingObject) {
return Object.assign({}, getFreshSideObject(), paddingObject);
}
// node_modules/@popperjs/core/lib/utils/expandToHashMap.js
function expandToHashMap(value, keys) {
return keys.reduce(function(hashMap, key) {
hashMap[key] = value;
return hashMap;
}, {});
}
// node_modules/@popperjs/core/lib/modifiers/arrow.js
var toPaddingObject = function toPaddingObject2(padding, state) {
padding = typeof padding === "function" ? padding(Object.assign({}, state.rects, {
placement: state.placement
})) : padding;
return mergePaddingObject(typeof padding !== "number" ? padding : expandToHashMap(padding, basePlacements));
};
function arrow(_ref) {
var _state$modifiersData$;
var state = _ref.state, name = _ref.name, options = _ref.options;
var arrowElement = state.elements.arrow;
var popperOffsets2 = state.modifiersData.popperOffsets;
var basePlacement = getBasePlacement(state.placement);
var axis = getMainAxisFromPlacement(basePlacement);
var isVertical = [left, right].indexOf(basePlacement) >= 0;
var len = isVertical ? "height" : "width";
if (!arrowElement || !popperOffsets2) {
return;
}
var paddingObject = toPaddingObject(options.padding, state);
var arrowRect = getLayoutRect(arrowElement);
var minProp = axis === "y" ? top : left;
var maxProp = axis === "y" ? bottom : right;
var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets2[axis] - state.rects.popper[len];
var startDiff = popperOffsets2[axis] - state.rects.reference[axis];
var arrowOffsetParent = getOffsetParent(arrowElement);
var clientSize = arrowOffsetParent ? axis === "y" ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;
var centerToReference = endDiff / 2 - startDiff / 2;
var min2 = paddingObject[minProp];
var max2 = clientSize - arrowRect[len] - paddingObject[maxProp];
var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;
var offset2 = within(min2, center, max2);
var axisProp = axis;
state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset2, _state$modifiersData$.centerOffset = offset2 - center, _state$modifiersData$);
}
function effect2(_ref2) {
var state = _ref2.state, options = _ref2.options;
var _options$element = options.element, arrowElement = _options$element === void 0 ? "[data-popper-arrow]" : _options$element;
if (arrowElement == null) {
return;
}
if (typeof arrowElement === "string") {
arrowElement = state.elements.popper.querySelector(arrowElement);
if (!arrowElement) {
return;
}
}
if (true) {
if (!isHTMLElement(arrowElement)) {
console.error(['Popper: "arrow" element must be an HTMLElement (not an SVGElement).', "To use an SVG arrow, wrap it in an HTMLElement that will be used as", "the arrow."].join(" "));
}
}
if (!contains(state.elements.popper, arrowElement)) {
if (true) {
console.error(['Popper: "arrow" modifier\'s `element` must be a child of the popper', "element."].join(" "));
}
return;
}
state.elements.arrow = arrowElement;
}
var arrow_default = {
name: "arrow",
enabled: true,
phase: "main",
fn: arrow,
effect: effect2,
requires: ["popperOffsets"],
requiresIfExists: ["preventOverflow"]
};
// node_modules/@popperjs/core/lib/utils/getVariation.js
function getVariation(placement) {
return placement.split("-")[1];
}
// node_modules/@popperjs/core/lib/modifiers/computeStyles.js
var unsetSides = {
top: "auto",
right: "auto",
bottom: "auto",
left: "auto"
};
function roundOffsetsByDPR(_ref) {
var x = _ref.x, y = _ref.y;
var win = window;
var dpr = win.devicePixelRatio || 1;
return {
x: round(round(x * dpr) / dpr) || 0,
y: round(round(y * dpr) / dpr) || 0
};
}
function mapToStyles(_ref2) {
var _Object$assign2;
var popper2 = _ref2.popper, popperRect = _ref2.popperRect, placement = _ref2.placement, variation = _ref2.variation, offsets = _ref2.offsets, position = _ref2.position, gpuAcceleration = _ref2.gpuAcceleration, adaptive = _ref2.adaptive, roundOffsets = _ref2.roundOffsets;
var _ref3 = roundOffsets === true ? roundOffsetsByDPR(offsets) : typeof roundOffsets === "function" ? roundOffsets(offsets) : offsets, _ref3$x = _ref3.x, x = _ref3$x === void 0 ? 0 : _ref3$x, _ref3$y = _ref3.y, y = _ref3$y === void 0 ? 0 : _ref3$y;
var hasX = offsets.hasOwnProperty("x");
var hasY = offsets.hasOwnProperty("y");
var sideX = left;
var sideY = top;
var win = window;
if (adaptive) {
var offsetParent = getOffsetParent(popper2);
var heightProp = "clientHeight";
var widthProp = "clientWidth";
if (offsetParent === getWindow(popper2)) {
offsetParent = getDocumentElement(popper2);
if (getComputedStyle2(offsetParent).position !== "static" && position === "absolute") {
heightProp = "scrollHeight";
widthProp = "scrollWidth";
}
}
offsetParent = offsetParent;
if (placement === top || (placement === left || placement === right) && variation === end) {
sideY = bottom;
y -= offsetParent[heightProp] - popperRect.height;
y *= gpuAcceleration ? 1 : -1;
}
if (placement === left || (placement === top || placement === bottom) && variation === end) {
sideX = right;
x -= offsetParent[widthProp] - popperRect.width;
x *= gpuAcceleration ? 1 : -1;
}
}
var commonStyles = Object.assign({
position
}, adaptive && unsetSides);
if (gpuAcceleration) {
var _Object$assign;
return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? "0" : "", _Object$assign[sideX] = hasX ? "0" : "", _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? "translate(" + x + "px, " + y + "px)" : "translate3d(" + x + "px, " + y + "px, 0)", _Object$assign));
}
return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : "", _Object$assign2[sideX] = hasX ? x + "px" : "", _Object$assign2.transform = "", _Object$assign2));
}
function computeStyles(_ref4) {
var state = _ref4.state, options = _ref4.options;
var _options$gpuAccelerat = options.gpuAcceleration, gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat, _options$adaptive = options.adaptive, adaptive = _options$adaptive === void 0 ? true : _options$adaptive, _options$roundOffsets = options.roundOffsets, roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;
if (true) {
var transitionProperty = getComputedStyle2(state.elements.popper).transitionProperty || "";
if (adaptive && ["transform", "top", "right", "bottom", "left"].some(function(property) {
return transitionProperty.indexOf(property) >= 0;
})) {
console.warn(["Popper: Detected CSS transitions on at least one of the following", 'CSS properties: "transform", "top", "right", "bottom", "left".', "\n\n", 'Disable the "computeStyles" modifier\'s `adaptive` option to allow', "for smooth transitions, or remove these properties from the CSS", "transition declaration on the popper element if only transitioning", "opacity or background-color for example.", "\n\n", "We recommend using the popper element as a wrapper around an inner", "element that can have any CSS property transitioned for animations."].join(" "));
}
}
var commonStyles = {
placement: getBasePlacement(state.placement),
variation: getVariation(state.placement),
popper: state.elements.popper,
popperRect: state.rects.popper,
gpuAcceleration
};
if (state.modifiersData.popperOffsets != null) {
state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, {
offsets: state.modifiersData.popperOffsets,
position: state.options.strategy,
adaptive,
roundOffsets
})));
}
if (state.modifiersData.arrow != null) {
state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, {
offsets: state.modifiersData.arrow,
position: "absolute",
adaptive: false,
roundOffsets
})));
}
state.attributes.popper = Object.assign({}, state.attributes.popper, {
"data-popper-placement": state.placement
});
}
var computeStyles_default = {
name: "computeStyles",
enabled: true,
phase: "beforeWrite",
fn: computeStyles,
data: {}
};
// node_modules/@popperjs/core/lib/modifiers/eventListeners.js
var passive = {
passive: true
};
function effect3(_ref) {
var state = _ref.state, instance6 = _ref.instance, options = _ref.options;
var _options$scroll = options.scroll, scroll = _options$scroll === void 0 ? true : _options$scroll, _options$resize = options.resize, resize = _options$resize === void 0 ? true : _options$resize;
var window2 = getWindow(state.elements.popper);
var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);
if (scroll) {
scrollParents.forEach(function(scrollParent) {
scrollParent.addEventListener("scroll", instance6.update, passive);
});
}
if (resize) {
window2.addEventListener("resize", instance6.update, passive);
}
return function() {
if (scroll) {
scrollParents.forEach(function(scrollParent) {
scrollParent.removeEventListener("scroll", instance6.update, passive);
});
}
if (resize) {
window2.removeEventListener("resize", instance6.update, passive);
}
};
}
var eventListeners_default = {
name: "eventListeners",
enabled: true,
phase: "write",
fn: function fn() {
},
effect: effect3,
data: {}
};
// node_modules/@popperjs/core/lib/utils/getOppositePlacement.js
var hash = {
left: "right",
right: "left",
bottom: "top",
top: "bottom"
};
function getOppositePlacement(placement) {
return placement.replace(/left|right|bottom|top/g, function(matched) {
return hash[matched];
});
}
// node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js
var hash2 = {
start: "end",
end: "start"
};
function getOppositeVariationPlacement(placement) {
return placement.replace(/start|end/g, function(matched) {
return hash2[matched];
});
}
// node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js
function getWindowScroll(node) {
var win = getWindow(node);
var scrollLeft = win.pageXOffset;
var scrollTop = win.pageYOffset;
return {
scrollLeft,
scrollTop
};
}
// node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js
function getWindowScrollBarX(element2) {
return getBoundingClientRect(getDocumentElement(element2)).left + getWindowScroll(element2).scrollLeft;
}
// node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js
function getViewportRect(element2) {
var win = getWindow(element2);
var html = getDocumentElement(element2);
var visualViewport = win.visualViewport;
var width = html.clientWidth;
var height = html.clientHeight;
var x = 0;
var y = 0;
if (visualViewport) {
width = visualViewport.width;
height = visualViewport.height;
if (!/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) {
x = visualViewport.offsetLeft;
y = visualViewport.offsetTop;
}
}
return {
width,
height,
x: x + getWindowScrollBarX(element2),
y
};
}
// node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js
function getDocumentRect(element2) {
var _element$ownerDocumen;
var html = getDocumentElement(element2);
var winScroll = getWindowScroll(element2);
var body = (_element$ownerDocumen = element2.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;
var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);
var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);
var x = -winScroll.scrollLeft + getWindowScrollBarX(element2);
var y = -winScroll.scrollTop;
if (getComputedStyle2(body || html).direction === "rtl") {
x += max(html.clientWidth, body ? body.clientWidth : 0) - width;
}
return {
width,
height,
x,
y
};
}
// node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js
function isScrollParent(element2) {
var _getComputedStyle = getComputedStyle2(element2), overflow = _getComputedStyle.overflow, overflowX = _getComputedStyle.overflowX, overflowY = _getComputedStyle.overflowY;
return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);
}
// node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js
function getScrollParent(node) {
if (["html", "body", "#document"].indexOf(getNodeName(node)) >= 0) {
return node.ownerDocument.body;
}
if (isHTMLElement(node) && isScrollParent(node)) {
return node;
}
return getScrollParent(getParentNode(node));
}
// node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js
function listScrollParents(element2, list) {
var _element$ownerDocumen;
if (list === void 0) {
list = [];
}
var scrollParent = getScrollParent(element2);
var isBody = scrollParent === ((_element$ownerDocumen = element2.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);
var win = getWindow(scrollParent);
var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;
var updatedList = list.concat(target);
return isBody ? updatedList : updatedList.concat(listScrollParents(getParentNode(target)));
}
// node_modules/@popperjs/core/lib/utils/rectToClientRect.js
function rectToClientRect(rect) {
return Object.assign({}, rect, {
left: rect.x,
top: rect.y,
right: rect.x + rect.width,
bottom: rect.y + rect.height
});
}
// node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js
function getInnerBoundingClientRect(element2) {
var rect = getBoundingClientRect(element2);
rect.top = rect.top + element2.clientTop;
rect.left = rect.left + element2.clientLeft;
rect.bottom = rect.top + element2.clientHeight;
rect.right = rect.left + element2.clientWidth;
rect.width = element2.clientWidth;
rect.height = element2.clientHeight;
rect.x = rect.left;
rect.y = rect.top;
return rect;
}
function getClientRectFromMixedType(element2, clippingParent) {
return clippingParent === viewport ? rectToClientRect(getViewportRect(element2)) : isHTMLElement(clippingParent) ? getInnerBoundingClientRect(clippingParent) : rectToClientRect(getDocumentRect(getDocumentElement(element2)));
}
function getClippingParents(element2) {
var clippingParents2 = listScrollParents(getParentNode(element2));
var canEscapeClipping = ["absolute", "fixed"].indexOf(getComputedStyle2(element2).position) >= 0;
var clipperElement = canEscapeClipping && isHTMLElement(element2) ? getOffsetParent(element2) : element2;
if (!isElement(clipperElement)) {
return [];
}
return clippingParents2.filter(function(clippingParent) {
return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== "body";
});
}
function getClippingRect(element2, boundary, rootBoundary) {
var mainClippingParents = boundary === "clippingParents" ? getClippingParents(element2) : [].concat(boundary);
var clippingParents2 = [].concat(mainClippingParents, [rootBoundary]);
var firstClippingParent = clippingParents2[0];
var clippingRect = clippingParents2.reduce(function(accRect, clippingParent) {
var rect = getClientRectFromMixedType(element2, clippingParent);
accRect.top = max(rect.top, accRect.top);
accRect.right = min(rect.right, accRect.right);
accRect.bottom = min(rect.bottom, accRect.bottom);
accRect.left = max(rect.left, accRect.left);
return accRect;
}, getClientRectFromMixedType(element2, firstClippingParent));
clippingRect.width = clippingRect.right - clippingRect.left;
clippingRect.height = clippingRect.bottom - clippingRect.top;
clippingRect.x = clippingRect.left;
clippingRect.y = clippingRect.top;
return clippingRect;
}
// node_modules/@popperjs/core/lib/utils/computeOffsets.js
function computeOffsets(_ref) {
var reference2 = _ref.reference, element2 = _ref.element, placement = _ref.placement;
var basePlacement = placement ? getBasePlacement(placement) : null;
var variation = placement ? getVariation(placement) : null;
var commonX = reference2.x + reference2.width / 2 - element2.width / 2;
var commonY = reference2.y + reference2.height / 2 - element2.height / 2;
var offsets;
switch (basePlacement) {
case top:
offsets = {
x: commonX,
y: reference2.y - element2.height
};
break;
case bottom:
offsets = {
x: commonX,
y: reference2.y + reference2.height
};
break;
case right:
offsets = {
x: reference2.x + reference2.width,
y: commonY
};
break;
case left:
offsets = {
x: reference2.x - element2.width,
y: commonY
};
break;
default:
offsets = {
x: reference2.x,
y: reference2.y
};
}
var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;
if (mainAxis != null) {
var len = mainAxis === "y" ? "height" : "width";
switch (variation) {
case start:
offsets[mainAxis] = offsets[mainAxis] - (reference2[len] / 2 - element2[len] / 2);
break;
case end:
offsets[mainAxis] = offsets[mainAxis] + (reference2[len] / 2 - element2[len] / 2);
break;
default:
}
}
return offsets;
}
// node_modules/@popperjs/core/lib/utils/detectOverflow.js
function detectOverflow(state, options) {
if (options === void 0) {
options = {};
}
var _options = options, _options$placement = _options.placement, placement = _options$placement === void 0 ? state.placement : _options$placement, _options$boundary = _options.boundary, boundary = _options$boundary === void 0 ? clippingParents : _options$boundary, _options$rootBoundary = _options.rootBoundary, rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary, _options$elementConte = _options.elementContext, elementContext = _options$elementConte === void 0 ? popper : _options$elementConte, _options$altBoundary = _options.altBoundary, altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary, _options$padding = _options.padding, padding = _options$padding === void 0 ? 0 : _options$padding;
var paddingObject = mergePaddingObject(typeof padding !== "number" ? padding : expandToHashMap(padding, basePlacements));
var altContext = elementContext === popper ? reference : popper;
var popperRect = state.rects.popper;
var element2 = state.elements[altBoundary ? altContext : elementContext];
var clippingClientRect = getClippingRect(isElement(element2) ? element2 : element2.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary);
var referenceClientRect = getBoundingClientRect(state.elements.reference);
var popperOffsets2 = computeOffsets({
reference: referenceClientRect,
element: popperRect,
strategy: "absolute",
placement
});
var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets2));
var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect;
var overflowOffsets = {
top: clippingClientRect.top - elementClientRect.top + paddingObject.top,
bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,
left: clippingClientRect.left - elementClientRect.left + paddingObject.left,
right: elementClientRect.right - clippingClientRect.right + paddingObject.right
};
var offsetData = state.modifiersData.offset;
if (elementContext === popper && offsetData) {
var offset2 = offsetData[placement];
Object.keys(overflowOffsets).forEach(function(key) {
var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;
var axis = [top, bottom].indexOf(key) >= 0 ? "y" : "x";
overflowOffsets[key] += offset2[axis] * multiply;
});
}
return overflowOffsets;
}
// node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js
function computeAutoPlacement(state, options) {
if (options === void 0) {
options = {};
}
var _options = options, placement = _options.placement, boundary = _options.boundary, rootBoundary = _options.rootBoundary, padding = _options.padding, flipVariations = _options.flipVariations, _options$allowedAutoP = _options.allowedAutoPlacements, allowedAutoPlacements = _options$allowedAutoP === void 0 ? placements : _options$allowedAutoP;
var variation = getVariation(placement);
var placements2 = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function(placement2) {
return getVariation(placement2) === variation;
}) : basePlacements;
var allowedPlacements = placements2.filter(function(placement2) {
return allowedAutoPlacements.indexOf(placement2) >= 0;
});
if (allowedPlacements.length === 0) {
allowedPlacements = placements2;
if (true) {
console.error(["Popper: The `allowedAutoPlacements` option did not allow any", "placements. Ensure the `placement` option matches the variation", "of the allowed placements.", 'For example, "auto" cannot be used to allow "bottom-start".', 'Use "auto-start" instead.'].join(" "));
}
}
var overflows = allowedPlacements.reduce(function(acc, placement2) {
acc[placement2] = detectOverflow(state, {
placement: placement2,
boundary,
rootBoundary,
padding
})[getBasePlacement(placement2)];
return acc;
}, {});
return Object.keys(overflows).sort(function(a, b) {
return overflows[a] - overflows[b];
});
}
// node_modules/@popperjs/core/lib/modifiers/flip.js
function getExpandedFallbackPlacements(placement) {
if (getBasePlacement(placement) === auto) {
return [];
}
var oppositePlacement = getOppositePlacement(placement);
return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];
}
function flip(_ref) {
var state = _ref.state, options = _ref.options, name = _ref.name;
if (state.modifiersData[name]._skip) {
return;
}
var _options$mainAxis = options.mainAxis, checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis, _options$altAxis = options.altAxis, checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis, specifiedFallbackPlacements = options.fallbackPlacements, padding = options.padding, boundary = options.boundary, rootBoundary = options.rootBoundary, altBoundary = options.altBoundary, _options$flipVariatio = options.flipVariations, flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio, allowedAutoPlacements = options.allowedAutoPlacements;
var preferredPlacement = state.options.placement;
var basePlacement = getBasePlacement(preferredPlacement);
var isBasePlacement = basePlacement === preferredPlacement;
var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement));
var placements2 = [preferredPlacement].concat(fallbackPlacements).reduce(function(acc, placement2) {
return acc.concat(getBasePlacement(placement2) === auto ? computeAutoPlacement(state, {
placement: placement2,
boundary,
rootBoundary,
padding,
flipVariations,
allowedAutoPlacements
}) : placement2);
}, []);
var referenceRect = state.rects.reference;
var popperRect = state.rects.popper;
var checksMap = /* @__PURE__ */ new Map();
var makeFallbackChecks = true;
var firstFittingPlacement = placements2[0];
for (var i = 0; i < placements2.length; i++) {
var placement = placements2[i];
var _basePlacement = getBasePlacement(placement);
var isStartVariation = getVariation(placement) === start;
var isVertical = [top, bottom].indexOf(_basePlacement) >= 0;
var len = isVertical ? "width" : "height";
var overflow = detectOverflow(state, {
placement,
boundary,
rootBoundary,
altBoundary,
padding
});
var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top;
if (referenceRect[len] > popperRect[len]) {
mainVariationSide = getOppositePlacement(mainVariationSide);
}
var altVariationSide = getOppositePlacement(mainVariationSide);
var checks = [];
if (checkMainAxis) {
checks.push(overflow[_basePlacement] <= 0);
}
if (checkAltAxis) {
checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0);
}
if (checks.every(function(check) {
return check;
})) {
firstFittingPlacement = placement;
makeFallbackChecks = false;
break;
}
checksMap.set(placement, checks);
}
if (makeFallbackChecks) {
var numberOfChecks = flipVariations ? 3 : 1;
var _loop = function _loop2(_i2) {
var fittingPlacement = placements2.find(function(placement2) {
var checks2 = checksMap.get(placement2);
if (checks2) {
return checks2.slice(0, _i2).every(function(check) {
return check;
});
}
});
if (fittingPlacement) {
firstFittingPlacement = fittingPlacement;
return "break";
}
};
for (var _i = numberOfChecks; _i > 0; _i--) {
var _ret = _loop(_i);
if (_ret === "break")
break;
}
}
if (state.placement !== firstFittingPlacement) {
state.modifiersData[name]._skip = true;
state.placement = firstFittingPlacement;
state.reset = true;
}
}
var flip_default = {
name: "flip",
enabled: true,
phase: "main",
fn: flip,
requiresIfExists: ["offset"],
data: {
_skip: false
}
};
// node_modules/@popperjs/core/lib/modifiers/hide.js
function getSideOffsets(overflow, rect, preventedOffsets) {
if (preventedOffsets === void 0) {
preventedOffsets = {
x: 0,
y: 0
};
}
return {
top: overflow.top - rect.height - preventedOffsets.y,
right: overflow.right - rect.width + preventedOffsets.x,
bottom: overflow.bottom - rect.height + preventedOffsets.y,
left: overflow.left - rect.width - preventedOffsets.x
};
}
function isAnySideFullyClipped(overflow) {
return [top, right, bottom, left].some(function(side) {
return overflow[side] >= 0;
});
}
function hide(_ref) {
var state = _ref.state, name = _ref.name;
var referenceRect = state.rects.reference;
var popperRect = state.rects.popper;
var preventedOffsets = state.modifiersData.preventOverflow;
var referenceOverflow = detectOverflow(state, {
elementContext: "reference"
});
var popperAltOverflow = detectOverflow(state, {
altBoundary: true
});
var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect);
var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets);
var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets);
var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);
state.modifiersData[name] = {
referenceClippingOffsets,
popperEscapeOffsets,
isReferenceHidden,
hasPopperEscaped
};
state.attributes.popper = Object.assign({}, state.attributes.popper, {
"data-popper-reference-hidden": isReferenceHidden,
"data-popper-escaped": hasPopperEscaped
});
}
var hide_default = {
name: "hide",
enabled: true,
phase: "main",
requiresIfExists: ["preventOverflow"],
fn: hide
};
// node_modules/@popperjs/core/lib/modifiers/offset.js
function distanceAndSkiddingToXY(placement, rects, offset2) {
var basePlacement = getBasePlacement(placement);
var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1;
var _ref = typeof offset2 === "function" ? offset2(Object.assign({}, rects, {
placement
})) : offset2, skidding = _ref[0], distance = _ref[1];
skidding = skidding || 0;
distance = (distance || 0) * invertDistance;
return [left, right].indexOf(basePlacement) >= 0 ? {
x: distance,
y: skidding
} : {
x: skidding,
y: distance
};
}
function offset(_ref2) {
var state = _ref2.state, options = _ref2.options, name = _ref2.name;
var _options$offset = options.offset, offset2 = _options$offset === void 0 ? [0, 0] : _options$offset;
var data = placements.reduce(function(acc, placement) {
acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset2);
return acc;
}, {});
var _data$state$placement = data[state.placement], x = _data$state$placement.x, y = _data$state$placement.y;
if (state.modifiersData.popperOffsets != null) {
state.modifiersData.popperOffsets.x += x;
state.modifiersData.popperOffsets.y += y;
}
state.modifiersData[name] = data;
}
var offset_default = {
name: "offset",
enabled: true,
phase: "main",
requires: ["popperOffsets"],
fn: offset
};
// node_modules/@popperjs/core/lib/modifiers/popperOffsets.js
function popperOffsets(_ref) {
var state = _ref.state, name = _ref.name;
state.modifiersData[name] = computeOffsets({
reference: state.rects.reference,
element: state.rects.popper,
strategy: "absolute",
placement: state.placement
});
}
var popperOffsets_default = {
name: "popperOffsets",
enabled: true,
phase: "read",
fn: popperOffsets,
data: {}
};
// node_modules/@popperjs/core/lib/utils/getAltAxis.js
function getAltAxis(axis) {
return axis === "x" ? "y" : "x";
}
// node_modules/@popperjs/core/lib/modifiers/preventOverflow.js
function preventOverflow(_ref) {
var state = _ref.state, options = _ref.options, name = _ref.name;
var _options$mainAxis = options.mainAxis, checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis, _options$altAxis = options.altAxis, checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis, boundary = options.boundary, rootBoundary = options.rootBoundary, altBoundary = options.altBoundary, padding = options.padding, _options$tether = options.tether, tether = _options$tether === void 0 ? true : _options$tether, _options$tetherOffset = options.tetherOffset, tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;
var overflow = detectOverflow(state, {
boundary,
rootBoundary,
padding,
altBoundary
});
var basePlacement = getBasePlacement(state.placement);
var variation = getVariation(state.placement);
var isBasePlacement = !variation;
var mainAxis = getMainAxisFromPlacement(basePlacement);
var altAxis = getAltAxis(mainAxis);
var popperOffsets2 = state.modifiersData.popperOffsets;
var referenceRect = state.rects.reference;
var popperRect = state.rects.popper;
var tetherOffsetValue = typeof tetherOffset === "function" ? tetherOffset(Object.assign({}, state.rects, {
placement: state.placement
})) : tetherOffset;
var data = {
x: 0,
y: 0
};
if (!popperOffsets2) {
return;
}
if (checkMainAxis || checkAltAxis) {
var mainSide = mainAxis === "y" ? top : left;
var altSide = mainAxis === "y" ? bottom : right;
var len = mainAxis === "y" ? "height" : "width";
var offset2 = popperOffsets2[mainAxis];
var min2 = popperOffsets2[mainAxis] + overflow[mainSide];
var max2 = popperOffsets2[mainAxis] - overflow[altSide];
var additive = tether ? -popperRect[len] / 2 : 0;
var minLen = variation === start ? referenceRect[len] : popperRect[len];
var maxLen = variation === start ? -popperRect[len] : -referenceRect[len];
var arrowElement = state.elements.arrow;
var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : {
width: 0,
height: 0
};
var arrowPaddingObject = state.modifiersData["arrow#persistent"] ? state.modifiersData["arrow#persistent"].padding : getFreshSideObject();
var arrowPaddingMin = arrowPaddingObject[mainSide];
var arrowPaddingMax = arrowPaddingObject[altSide];
var arrowLen = within(0, referenceRect[len], arrowRect[len]);
var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - tetherOffsetValue : minLen - arrowLen - arrowPaddingMin - tetherOffsetValue;
var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + tetherOffsetValue : maxLen + arrowLen + arrowPaddingMax + tetherOffsetValue;
var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);
var clientOffset = arrowOffsetParent ? mainAxis === "y" ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;
var offsetModifierValue = state.modifiersData.offset ? state.modifiersData.offset[state.placement][mainAxis] : 0;
var tetherMin = popperOffsets2[mainAxis] + minOffset - offsetModifierValue - clientOffset;
var tetherMax = popperOffsets2[mainAxis] + maxOffset - offsetModifierValue;
if (checkMainAxis) {
var preventedOffset = within(tether ? min(min2, tetherMin) : min2, offset2, tether ? max(max2, tetherMax) : max2);
popperOffsets2[mainAxis] = preventedOffset;
data[mainAxis] = preventedOffset - offset2;
}
if (checkAltAxis) {
var _mainSide = mainAxis === "x" ? top : left;
var _altSide = mainAxis === "x" ? bottom : right;
var _offset = popperOffsets2[altAxis];
var _min = _offset + overflow[_mainSide];
var _max = _offset - overflow[_altSide];
var _preventedOffset = within(tether ? min(_min, tetherMin) : _min, _offset, tether ? max(_max, tetherMax) : _max);
popperOffsets2[altAxis] = _preventedOffset;
data[altAxis] = _preventedOffset - _offset;
}
}
state.modifiersData[name] = data;
}
var preventOverflow_default = {
name: "preventOverflow",
enabled: true,
phase: "main",
fn: preventOverflow,
requiresIfExists: ["offset"]
};
// node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js
function getHTMLElementScroll(element2) {
return {
scrollLeft: element2.scrollLeft,
scrollTop: element2.scrollTop
};
}
// node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js
function getNodeScroll(node) {
if (node === getWindow(node) || !isHTMLElement(node)) {
return getWindowScroll(node);
} else {
return getHTMLElementScroll(node);
}
}
// node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js
function isElementScaled(element2) {
var rect = element2.getBoundingClientRect();
var scaleX = rect.width / element2.offsetWidth || 1;
var scaleY = rect.height / element2.offsetHeight || 1;
return scaleX !== 1 || scaleY !== 1;
}
function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
if (isFixed === void 0) {
isFixed = false;
}
var isOffsetParentAnElement = isHTMLElement(offsetParent);
var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);
var documentElement = getDocumentElement(offsetParent);
var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled);
var scroll = {
scrollLeft: 0,
scrollTop: 0
};
var offsets = {
x: 0,
y: 0
};
if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
if (getNodeName(offsetParent) !== "body" || isScrollParent(documentElement)) {
scroll = getNodeScroll(offsetParent);
}
if (isHTMLElement(offsetParent)) {
offsets = getBoundingClientRect(offsetParent, true);
offsets.x += offsetParent.clientLeft;
offsets.y += offsetParent.clientTop;
} else if (documentElement) {
offsets.x = getWindowScrollBarX(documentElement);
}
}
return {
x: rect.left + scroll.scrollLeft - offsets.x,
y: rect.top + scroll.scrollTop - offsets.y,
width: rect.width,
height: rect.height
};
}
// node_modules/@popperjs/core/lib/utils/orderModifiers.js
function order(modifiers) {
var map = /* @__PURE__ */ new Map();
var visited = /* @__PURE__ */ new Set();
var result = [];
modifiers.forEach(function(modifier) {
map.set(modifier.name, modifier);
});
function sort(modifier) {
visited.add(modifier.name);
var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);
requires.forEach(function(dep) {
if (!visited.has(dep)) {
var depModifier = map.get(dep);
if (depModifier) {
sort(depModifier);
}
}
});
result.push(modifier);
}
modifiers.forEach(function(modifier) {
if (!visited.has(modifier.name)) {
sort(modifier);
}
});
return result;
}
function orderModifiers(modifiers) {
var orderedModifiers = order(modifiers);
return modifierPhases.reduce(function(acc, phase) {
return acc.concat(orderedModifiers.filter(function(modifier) {
return modifier.phase === phase;
}));
}, []);
}
// node_modules/@popperjs/core/lib/utils/debounce.js
function debounce(fn2) {
var pending;
return function() {
if (!pending) {
pending = new Promise(function(resolve) {
Promise.resolve().then(function() {
pending = void 0;
resolve(fn2());
});
});
}
return pending;
};
}
// node_modules/@popperjs/core/lib/utils/format.js
function format(str) {
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
args[_key - 1] = arguments[_key];
}
return [].concat(args).reduce(function(p, c) {
return p.replace(/%s/, c);
}, str);
}
// node_modules/@popperjs/core/lib/utils/validateModifiers.js
var INVALID_MODIFIER_ERROR = 'Popper: modifier "%s" provided an invalid %s property, expected %s but got %s';
var MISSING_DEPENDENCY_ERROR = 'Popper: modifier "%s" requires "%s", but "%s" modifier is not available';
var VALID_PROPERTIES = ["name", "enabled", "phase", "fn", "effect", "requires", "options"];
function validateModifiers(modifiers) {
modifiers.forEach(function(modifier) {
[].concat(Object.keys(modifier), VALID_PROPERTIES).filter(function(value, index, self2) {
return self2.indexOf(value) === index;
}).forEach(function(key) {
switch (key) {
case "name":
if (typeof modifier.name !== "string") {
console.error(format(INVALID_MODIFIER_ERROR, String(modifier.name), '"name"', '"string"', '"' + String(modifier.name) + '"'));
}
break;
case "enabled":
if (typeof modifier.enabled !== "boolean") {
console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"enabled"', '"boolean"', '"' + String(modifier.enabled) + '"'));
}
break;
case "phase":
if (modifierPhases.indexOf(modifier.phase) < 0) {
console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"phase"', "either " + modifierPhases.join(", "), '"' + String(modifier.phase) + '"'));
}
break;
case "fn":
if (typeof modifier.fn !== "function") {
console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"fn"', '"function"', '"' + String(modifier.fn) + '"'));
}
break;
case "effect":
if (modifier.effect != null && typeof modifier.effect !== "function") {
console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"effect"', '"function"', '"' + String(modifier.fn) + '"'));
}
break;
case "requires":
if (modifier.requires != null && !Array.isArray(modifier.requires)) {
console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"requires"', '"array"', '"' + String(modifier.requires) + '"'));
}
break;
case "requiresIfExists":
if (!Array.isArray(modifier.requiresIfExists)) {
console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"requiresIfExists"', '"array"', '"' + String(modifier.requiresIfExists) + '"'));
}
break;
case "options":
case "data":
break;
default:
console.error('PopperJS: an invalid property has been provided to the "' + modifier.name + '" modifier, valid properties are ' + VALID_PROPERTIES.map(function(s) {
return '"' + s + '"';
}).join(", ") + '; but "' + key + '" was provided.');
}
modifier.requires && modifier.requires.forEach(function(requirement) {
if (modifiers.find(function(mod) {
return mod.name === requirement;
}) == null) {
console.error(format(MISSING_DEPENDENCY_ERROR, String(modifier.name), requirement, requirement));
}
});
});
});
}
// node_modules/@popperjs/core/lib/utils/uniqueBy.js
function uniqueBy(arr, fn2) {
var identifiers = /* @__PURE__ */ new Set();
return arr.filter(function(item) {
var identifier = fn2(item);
if (!identifiers.has(identifier)) {
identifiers.add(identifier);
return true;
}
});
}
// node_modules/@popperjs/core/lib/utils/mergeByName.js
function mergeByName(modifiers) {
var merged = modifiers.reduce(function(merged2, current) {
var existing = merged2[current.name];
merged2[current.name] = existing ? Object.assign({}, existing, current, {
options: Object.assign({}, existing.options, current.options),
data: Object.assign({}, existing.data, current.data)
}) : current;
return merged2;
}, {});
return Object.keys(merged).map(function(key) {
return merged[key];
});
}
// node_modules/@popperjs/core/lib/createPopper.js
var INVALID_ELEMENT_ERROR = "Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.";
var INFINITE_LOOP_ERROR = "Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.";
var DEFAULT_OPTIONS = {
placement: "bottom",
modifiers: [],
strategy: "absolute"
};
function areValidElements() {
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return !args.some(function(element2) {
return !(element2 && typeof element2.getBoundingClientRect === "function");
});
}
function popperGenerator(generatorOptions) {
if (generatorOptions === void 0) {
generatorOptions = {};
}
var _generatorOptions = generatorOptions, _generatorOptions$def = _generatorOptions.defaultModifiers, defaultModifiers2 = _generatorOptions$def === void 0 ? [] : _generatorOptions$def, _generatorOptions$def2 = _generatorOptions.defaultOptions, defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;
return function createPopper2(reference2, popper2, options) {
if (options === void 0) {
options = defaultOptions;
}
var state = {
placement: "bottom",
orderedModifiers: [],
options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions),
modifiersData: {},
elements: {
reference: reference2,
popper: popper2
},
attributes: {},
styles: {}
};
var effectCleanupFns = [];
var isDestroyed = false;
var instance6 = {
state,
setOptions: function setOptions(setOptionsAction) {
var options2 = typeof setOptionsAction === "function" ? setOptionsAction(state.options) : setOptionsAction;
cleanupModifierEffects();
state.options = Object.assign({}, defaultOptions, state.options, options2);
state.scrollParents = {
reference: isElement(reference2) ? listScrollParents(reference2) : reference2.contextElement ? listScrollParents(reference2.contextElement) : [],
popper: listScrollParents(popper2)
};
var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers2, state.options.modifiers)));
state.orderedModifiers = orderedModifiers.filter(function(m) {
return m.enabled;
});
if (true) {
var modifiers = uniqueBy([].concat(orderedModifiers, state.options.modifiers), function(_ref) {
var name = _ref.name;
return name;
});
validateModifiers(modifiers);
if (getBasePlacement(state.options.placement) === auto) {
var flipModifier = state.orderedModifiers.find(function(_ref2) {
var name = _ref2.name;
return name === "flip";
});
if (!flipModifier) {
console.error(['Popper: "auto" placements require the "flip" modifier be', "present and enabled to work."].join(" "));
}
}
var _getComputedStyle = getComputedStyle2(popper2), marginTop = _getComputedStyle.marginTop, marginRight = _getComputedStyle.marginRight, marginBottom = _getComputedStyle.marginBottom, marginLeft = _getComputedStyle.marginLeft;
if ([marginTop, marginRight, marginBottom, marginLeft].some(function(margin) {
return parseFloat(margin);
})) {
console.warn(['Popper: CSS "margin" styles cannot be used to apply padding', "between the popper and its reference element or boundary.", "To replicate margin, use the `offset` modifier, as well as", "the `padding` option in the `preventOverflow` and `flip`", "modifiers."].join(" "));
}
}
runModifierEffects();
return instance6.update();
},
forceUpdate: function forceUpdate() {
if (isDestroyed) {
return;
}
var _state$elements = state.elements, reference3 = _state$elements.reference, popper3 = _state$elements.popper;
if (!areValidElements(reference3, popper3)) {
if (true) {
console.error(INVALID_ELEMENT_ERROR);
}
return;
}
state.rects = {
reference: getCompositeRect(reference3, getOffsetParent(popper3), state.options.strategy === "fixed"),
popper: getLayoutRect(popper3)
};
state.reset = false;
state.placement = state.options.placement;
state.orderedModifiers.forEach(function(modifier) {
return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);
});
var __debug_loops__ = 0;
for (var index = 0; index < state.orderedModifiers.length; index++) {
if (true) {
__debug_loops__ += 1;
if (__debug_loops__ > 100) {
console.error(INFINITE_LOOP_ERROR);
break;
}
}
if (state.reset === true) {
state.reset = false;
index = -1;
continue;
}
var _state$orderedModifie = state.orderedModifiers[index], fn2 = _state$orderedModifie.fn, _state$orderedModifie2 = _state$orderedModifie.options, _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2, name = _state$orderedModifie.name;
if (typeof fn2 === "function") {
state = fn2({
state,
options: _options,
name,
instance: instance6
}) || state;
}
}
},
update: debounce(function() {
return new Promise(function(resolve) {
instance6.forceUpdate();
resolve(state);
});
}),
destroy: function destroy() {
cleanupModifierEffects();
isDestroyed = true;
}
};
if (!areValidElements(reference2, popper2)) {
if (true) {
console.error(INVALID_ELEMENT_ERROR);
}
return instance6;
}
instance6.setOptions(options).then(function(state2) {
if (!isDestroyed && options.onFirstUpdate) {
options.onFirstUpdate(state2);
}
});
function runModifierEffects() {
state.orderedModifiers.forEach(function(_ref3) {
var name = _ref3.name, _ref3$options = _ref3.options, options2 = _ref3$options === void 0 ? {} : _ref3$options, effect4 = _ref3.effect;
if (typeof effect4 === "function") {
var cleanupFn = effect4({
state,
name,
instance: instance6,
options: options2
});
var noopFn = function noopFn2() {
};
effectCleanupFns.push(cleanupFn || noopFn);
}
});
}
function cleanupModifierEffects() {
effectCleanupFns.forEach(function(fn2) {
return fn2();
});
effectCleanupFns = [];
}
return instance6;
};
}
// node_modules/@popperjs/core/lib/popper.js
var defaultModifiers = [eventListeners_default, popperOffsets_default, computeStyles_default, applyStyles_default, offset_default, flip_default, preventOverflow_default, arrow_default, hide_default];
var createPopper = /* @__PURE__ */ popperGenerator({
defaultModifiers
});
// src/settings/suggest.ts
var wrapAround = (value, size) => {
return (value % size + size) % size;
};
var Suggest = class {
constructor(owner, containerEl, scope) {
this.owner = owner;
this.containerEl = containerEl;
containerEl.on("click", ".suggestion-item", this.onSuggestionClick.bind(this));
containerEl.on("mousemove", ".suggestion-item", this.onSuggestionMouseover.bind(this));
scope.register([], "ArrowUp", (event) => {
if (!event.isComposing) {
this.setSelectedItem(this.selectedItem - 1, true);
return false;
}
});
scope.register([], "ArrowDown", (event) => {
if (!event.isComposing) {
this.setSelectedItem(this.selectedItem + 1, true);
return false;
}
});
scope.register([], "Enter", (event) => {
if (!event.isComposing) {
this.useSelectedItem(event);
return false;
}
});
}
onSuggestionClick(event, el) {
event.preventDefault();
const item = this.suggestions.indexOf(el);
this.setSelectedItem(item, false);
this.useSelectedItem(event);
}
onSuggestionMouseover(_event, el) {
const item = this.suggestions.indexOf(el);
this.setSelectedItem(item, false);
}
setSuggestions(values2) {
this.containerEl.empty();
const suggestionEls = [];
values2.forEach((value) => {
const suggestionEl = this.containerEl.createDiv("suggestion-item");
this.owner.renderSuggestion(value, suggestionEl);
suggestionEls.push(suggestionEl);
});
this.values = values2;
this.suggestions = suggestionEls;
this.setSelectedItem(0, false);
}
useSelectedItem(event) {
const currentValue = this.values[this.selectedItem];
if (currentValue) {
this.owner.selectSuggestion(currentValue, event);
}
}
setSelectedItem(selectedIndex, scrollIntoView) {
const normalizedIndex = wrapAround(selectedIndex, this.suggestions.length);
const prevSelectedSuggestion = this.suggestions[this.selectedItem];
const selectedSuggestion = this.suggestions[normalizedIndex];
prevSelectedSuggestion == null ? void 0 : prevSelectedSuggestion.removeClass("is-selected");
selectedSuggestion == null ? void 0 : selectedSuggestion.addClass("is-selected");
this.selectedItem = normalizedIndex;
if (scrollIntoView) {
selectedSuggestion.scrollIntoView(false);
}
}
};
var TextInputSuggest = class {
constructor(app, inputEl) {
this.app = app;
this.inputEl = inputEl;
this.scope = new import_obsidian6.Scope();
this.suggestEl = createDiv("suggestion-container");
const suggestion = this.suggestEl.createDiv("suggestion");
this.suggest = new Suggest(this, suggestion, this.scope);
this.scope.register([], "Escape", this.close.bind(this));
this.inputEl.addEventListener("input", this.onInputChanged.bind(this));
this.inputEl.addEventListener("focus", this.onInputChanged.bind(this));
this.inputEl.addEventListener("blur", this.close.bind(this));
this.suggestEl.on("mousedown", ".suggestion-container", (event) => {
event.preventDefault();
});
}
onInputChanged() {
const inputStr = this.inputEl.value;
const suggestions = this.getSuggestions(inputStr);
if (!suggestions) {
this.close();
return;
}
if (suggestions.length > 0) {
this.suggest.setSuggestions(suggestions);
this.open(this.app.dom.appContainerEl, this.inputEl);
} else {
this.close();
}
}
open(container, inputEl) {
this.app.keymap.pushScope(this.scope);
container.appendChild(this.suggestEl);
this.popper = createPopper(inputEl, this.suggestEl, {
placement: "bottom-start",
modifiers: [
{
name: "sameWidth",
enabled: true,
fn: ({ state, instance: instance6 }) => {
const targetWidth = `${state.rects.reference.width}px`;
if (state.styles.popper.width === targetWidth) {
return;
}
state.styles.popper.width = targetWidth;
instance6.update();
},
phase: "beforeWrite",
requires: ["computeStyles"]
}
]
});
}
close() {
this.app.keymap.popScope(this.scope);
this.suggest.setSuggestions([]);
if (this.popper)
this.popper.destroy();
this.suggestEl.detach();
}
};
// src/view/ArraySuggest.ts
var ArraySuggest = class extends TextInputSuggest {
constructor(app, input, content) {
super(app, input);
this.content = content;
}
getSuggestions(inputStr) {
const lowerCaseInputStr = inputStr.toLowerCase();
return [...this.content].filter((content) => content.contains(lowerCaseInputStr));
}
renderSuggestion(content, el) {
el.setText(content);
}
selectSuggestion(content) {
this.inputEl.value = content;
this.inputEl.trigger("input");
this.close();
}
};
// src/modals/TagModal.ts
var TagModal = class extends BaseModal {
constructor(plugin, tags) {
super(plugin.app);
this.plugin = plugin;
this.tags = tags;
}
display() {
const { contentEl } = this;
contentEl.empty();
contentEl.createEl("h1", { text: t("edit_tags") });
const tagDiv = contentEl.createDiv("tags");
for (const tag in this.tags) {
new import_obsidian7.Setting(tagDiv).addSearch((search) => __async(this, null, function* () {
new ArraySuggest(this.app, search.inputEl, get_store_value(tagsStore));
search.setValue(this.tags[tag]).onChange((value) => __async(this, null, function* () {
this.removeValidationError(search);
if (!value.match(TAG_REGEX) || value.match(NUMBER_REGEX) || value.contains(" ") || value.contains("#")) {
this.setValidationError(search, t("invalid_tag"));
return;
}
this.tags = this.tags.filter((e) => e !== this.tags[tag]);
this.tags.push(value);
}));
})).addExtraButton((button) => {
button.setTooltip(t("delete")).setIcon("feather-trash").onClick(() => {
this.tags = this.tags.filter((e) => e !== this.tags[tag]);
this.display();
});
});
}
let tagValue = "";
let tagComponent;
const newTag = new import_obsidian7.Setting(tagDiv).addSearch((search) => __async(this, null, function* () {
tagComponent = search;
new ArraySuggest(this.app, search.inputEl, get_store_value(tagsStore));
search.onChange((value) => __async(this, null, function* () {
if (!value.match(TAG_REGEX) || value.match(NUMBER_REGEX) || value.contains(" ") || value.contains("#")) {
this.setValidationError(search, t("invalid_tag"));
return;
}
tagValue = value;
}));
})).addExtraButton((button) => {
button.setTooltip(t("add")).setIcon("feather-plus").onClick(() => {
if (!tagValue.match(TAG_REGEX) || tagValue.match(NUMBER_REGEX) || tagValue.contains(" ") || tagValue.contains("#")) {
this.setValidationError(tagComponent, t("invalid_tag"));
return;
}
this.tags.push(tagValue);
this.display();
});
});
newTag.controlEl.addClass("rss-setting-input");
const buttonEl = contentEl.createSpan("actionButtons");
new import_obsidian7.Setting(buttonEl).addExtraButton((btn) => btn.setTooltip(t("save")).setIcon("checkmark").onClick(() => __async(this, null, function* () {
this.close();
})));
}
onClose() {
const { contentEl } = this;
contentEl.empty();
}
onOpen() {
return __async(this, null, function* () {
yield this.display();
});
}
};
// src/actions/Action.ts
var _Action = class {
constructor(name, icon, processor) {
this.name = name;
this.icon = icon;
this.processor = processor;
}
};
var Action = _Action;
Action.CREATE_NOTE = new _Action(t("create_note"), "create-new", (plugin, item) => {
return createNewNote(plugin, item);
});
Action.PASTE = new _Action(t("paste_to_note"), "paste", (plugin, item) => {
return pasteToNote(plugin, item);
});
Action.COPY = new _Action(t("copy_to_clipboard"), "feather-clipboard", (_, item) => {
return copy((0, import_obsidian8.htmlToMarkdown)(item.content));
});
Action.OPEN = new _Action(t("open_browser"), "open-elsewhere-glyph", (_, item) => {
openInBrowser(item);
return Promise.resolve();
});
Action.TAGS = new _Action(t("edit_tags"), "tag-glyph", (plugin, item) => {
const modal = new TagModal(plugin, item.tags);
modal.onClose = () => __async(_Action, null, function* () {
item.tags = modal.tags;
const items = plugin.settings.items;
yield plugin.writeFeedContent(() => {
return items;
});
});
modal.open();
return Promise.resolve();
});
Action.READ = new _Action(t("mark_as_read_unread"), "feather-eye", (plugin, item) => __async(_Action, null, function* () {
if (item.read) {
item.read = false;
new import_obsidian8.Notice(t("marked_as_unread"));
} else {
item.read = true;
new import_obsidian8.Notice(t("marked_as_read"));
}
const items = plugin.settings.items;
yield plugin.writeFeedContent(() => {
return items;
});
return Promise.resolve();
}));
Action.FAVORITE = new _Action(t("mark_as_favorite_remove"), "star", (plugin, item) => __async(_Action, null, function* () {
if (item.favorite) {
item.favorite = false;
new import_obsidian8.Notice(t("removed_from_favorites"));
} else {
item.favorite = true;
new import_obsidian8.Notice(t("added_to_favorites"));
}
const items = plugin.settings.items;
yield plugin.writeFeedContent(() => {
return items;
});
return Promise.resolve();
}));
Action.actions = Array.of(_Action.FAVORITE, _Action.READ, _Action.TAGS, _Action.CREATE_NOTE, _Action.PASTE, _Action.COPY, _Action.OPEN);
// src/modals/ItemModal.ts
var ItemModal = class extends import_obsidian9.Modal {
constructor(plugin, item, items, save = true) {
super(plugin.app);
this.plugin = plugin;
this.items = items;
this.item = item;
this.save = save;
if (this.save) {
this.item.read = true;
const feedContents = this.plugin.settings.items;
this.plugin.writeFeedContent(() => {
return feedContents;
});
if (this.plugin.settings.hotkeys.read) {
this.scope.register([], this.plugin.settings.hotkeys.read, () => {
this.markAsRead();
});
}
if (this.plugin.settings.hotkeys.favorite) {
this.scope.register([], this.plugin.settings.hotkeys.favorite, () => {
this.markAsFavorite();
});
}
if (this.plugin.settings.hotkeys.tags) {
this.scope.register([], this.plugin.settings.hotkeys.tags, () => {
Action.TAGS.processor(this.plugin, this.item);
});
}
}
if (this.plugin.settings.hotkeys.create) {
this.scope.register([], this.plugin.settings.hotkeys.create, () => {
Action.CREATE_NOTE.processor(this.plugin, this.item);
});
}
if (this.plugin.settings.hotkeys.paste) {
this.scope.register([], this.plugin.settings.hotkeys.paste, () => {
Action.PASTE.processor(this.plugin, this.item);
});
}
if (this.plugin.settings.hotkeys.copy) {
this.scope.register([], this.plugin.settings.hotkeys.copy, () => {
Action.COPY.processor(this.plugin, this.item);
});
}
if (this.plugin.settings.hotkeys.open) {
this.scope.register([], this.plugin.settings.hotkeys.open, () => {
Action.OPEN.processor(this.plugin, this.item);
});
}
if (this.plugin.settings.hotkeys.next) {
this.scope.register([], this.plugin.settings.hotkeys.next, () => {
this.next();
});
}
if (this.plugin.settings.hotkeys.previous) {
this.scope.register([], this.plugin.settings.hotkeys.previous, () => {
this.previous();
});
}
if (this.app.plugins.plugins["obsidian-tts"] && this.plugin.settings.hotkeys.tts) {
this.scope.register([], this.plugin.settings.hotkeys.tts, () => {
const tts = this.app.plugins.plugins["obsidian-tts"].ttsService;
if (tts.isSpeaking()) {
if (tts.isPaused()) {
tts.resume();
} else {
tts.pause();
}
return;
}
const content = (0, import_obsidian9.htmlToMarkdown)(this.item.content);
tts.say(this.item.title, content, this.item.language);
});
}
}
previous() {
let index = this.items.findIndex((item2) => {
return item2 === this.item;
});
index++;
const item = this.items[index];
if (item !== void 0) {
this.close();
new ItemModal(this.plugin, item, this.items, this.save).open();
}
}
next() {
let index = this.items.findIndex((item2) => {
return item2 === this.item;
});
index--;
const item = this.items[index];
if (item !== void 0) {
this.close();
new ItemModal(this.plugin, item, this.items, this.save).open();
}
}
markAsFavorite() {
return __async(this, null, function* () {
yield Action.FAVORITE.processor(this.plugin, this.item);
this.favoriteButton.setIcon(this.item.favorite ? "star-glyph" : "star");
this.favoriteButton.setTooltip(this.item.favorite ? t("remove_from_favorites") : t("mark_as_favorite"));
});
}
markAsRead() {
return __async(this, null, function* () {
yield Action.READ.processor(this.plugin, this.item);
this.readButton.setIcon(this.item.read ? "feather-eye-off" : "feather-eye");
this.readButton.setTooltip(this.item.read ? t("mark_as_unread") : t("mark_as_unread"));
});
}
display() {
return __async(this, null, function* () {
const { contentEl } = this;
contentEl.empty();
contentEl.style.height = "100%";
contentEl.style.overflowY = "hidden";
const topButtons = contentEl.createDiv("topButtons");
let actions = Array.of(Action.CREATE_NOTE, Action.PASTE, Action.COPY, Action.OPEN);
if (this.save) {
this.readButton = new import_obsidian9.ButtonComponent(topButtons).setIcon(this.item.read ? "feather-eye-off" : "feather-eye").setTooltip(this.item.read ? t("mark_as_unread") : t("mark_as_read")).onClick(() => __async(this, null, function* () {
yield this.markAsRead();
}));
this.readButton.buttonEl.setAttribute("tabindex", "-1");
this.readButton.buttonEl.addClass("rss-button");
this.favoriteButton = new import_obsidian9.ButtonComponent(topButtons).setIcon(this.item.favorite ? "star-glyph" : "star").setTooltip(this.item.favorite ? t("remove_from_favorites") : t("mark_as_favorite")).onClick(() => __async(this, null, function* () {
yield this.markAsFavorite();
}));
this.favoriteButton.buttonEl.setAttribute("tabindex", "-1");
this.favoriteButton.buttonEl.addClass("rss-button");
actions = Array.of(Action.TAGS, ...actions);
}
actions.forEach((action) => {
const button = new import_obsidian9.ButtonComponent(topButtons).setIcon(action.icon).setTooltip(action.name).onClick(() => __async(this, null, function* () {
yield action.processor(this.plugin, this.item);
}));
button.buttonEl.setAttribute("tabindex", "-1");
button.buttonEl.addClass("rss-button");
});
if (this.app.plugins.plugins["obsidian-tts"]) {
const ttsButton = new import_obsidian9.ButtonComponent(topButtons).setIcon("feather-headphones").setTooltip(t("read_article_tts")).onClick(() => __async(this, null, function* () {
const content2 = (0, import_obsidian9.htmlToMarkdown)(this.item.content);
yield this.app.plugins.plugins["obsidian-tts"].ttsService.say(this.item.title, content2, this.item.language);
}));
ttsButton.buttonEl.addClass("rss-button");
}
const prevButton = new import_obsidian9.ButtonComponent(topButtons).setIcon("left-arrow-with-tail").setTooltip(t("previous")).onClick(() => {
this.previous();
});
prevButton.buttonEl.addClass("rss-button");
const nextButton = new import_obsidian9.ButtonComponent(topButtons).setIcon("right-arrow-with-tail").setTooltip(t("next")).onClick(() => {
this.next();
});
nextButton.buttonEl.addClass("rss-button");
const title = contentEl.createEl("h1", "rss-title");
title.setText(this.item.title);
const subtitle = contentEl.createEl("h3", "rss-subtitle");
if (this.item.creator) {
subtitle.appendText(this.item.creator);
}
if (this.item.pubDate) {
subtitle.appendText(" - " + window.moment(this.item.pubDate).format(this.plugin.settings.dateFormat));
}
const tagEl = contentEl.createSpan("tags");
this.item.tags.forEach((tag) => {
const tagA = tagEl.createEl("a");
tagA.setText(tag);
tagA.addClass("tag", "rss-tag");
});
const content = contentEl.createDiv("rss-content");
content.addClass("scrollable-content");
if (this.item.enclosure) {
if (this.item.enclosureType.toLowerCase().contains("audio")) {
const audio = content.createEl("audio", { attr: { controls: "controls" } });
audio.createEl("source", { attr: { src: this.item.enclosure, type: this.item.enclosureType } });
}
if (this.item.enclosureType.toLowerCase().contains("video")) {
const video = content.createEl("video", { attr: { controls: "controls", width: "100%", height: "100%" } });
video.createEl("source", { attr: { src: this.item.enclosure, type: this.item.enclosureType } });
}
if (this.item.enclosure && this.item.id.startsWith("yt:")) {
content.createEl("iframe", {
attr: {
type: "text/html",
src: "http://www.youtube.com/embed/" + this.item.enclosure,
width: "100%",
height: "100%",
allowFullscreen: "true"
}
});
}
}
if (this.item.content) {
yield import_obsidian9.MarkdownRenderer.renderMarkdown((0, import_obsidian9.htmlToMarkdown)(this.item.content), content, "", this.plugin);
}
});
}
onClose() {
const { contentEl } = this;
contentEl.empty();
}
onOpen() {
return __async(this, null, function* () {
yield this.display();
});
}
};
// src/parser/rssParser.ts
var import_obsidian10 = __toModule(require("obsidian"));
var import_ts_md5 = __toModule(require_md5());
function getElementByName(element2, name) {
let value;
if (typeof element2.getElementsByTagName !== "function") {
return;
}
if (name.contains(":")) {
const [namespace, tag] = name.split(":");
const namespaceUri = element2.lookupNamespaceURI(namespace);
if (element2.getElementsByTagNameNS(namespaceUri, tag).length > 0) {
value = element2.getElementsByTagNameNS(namespaceUri, tag)[0].childNodes[0];
}
} else if (name.contains(".")) {
const [prefix, tag] = name.split(".");
if (element2.getElementsByTagName(prefix).length > 0) {
const nodes = Array.from(element2.getElementsByTagName(prefix)[0].childNodes);
nodes.forEach((node) => {
if (node.nodeName == tag) {
value = node;
}
});
}
} else {
if (element2.getElementsByTagName(name).length > 0) {
if (element2.getElementsByTagName(name)[0].childNodes.length == 0) {
value = element2.getElementsByTagName(name)[0];
} else {
const node = element2.getElementsByTagName(name)[0].childNodes[0];
if (node !== void 0)
value = node;
}
}
}
return value;
}
function getContent(element2, names) {
let value;
names.forEach((name) => {
if (name.contains("#")) {
const [elementName, attr2] = name.split("#");
const data2 = getElementByName(element2, elementName);
if (data2) {
if (data2.nodeName === elementName) {
const tmp = data2.getAttr(attr2);
if (tmp.length > 0) {
value = tmp;
}
}
}
}
const data = getElementByName(element2, name);
if (data) {
if (data.nodeValue && data.nodeValue.length > 0) {
value = data.nodeValue;
}
if (data.innerHTML && data.innerHTML.length > 0) {
value = data.innerHTML;
}
}
});
if (value === void 0) {
return "";
}
return value;
}
function buildItem(element2) {
return {
title: getContent(element2, ["title"]),
description: getContent(element2, ["description"]),
content: getContent(element2, ["itunes:summary", "description", "summary", "media:description", "content", "content:encoded"]),
category: getContent(element2, ["category"]),
link: getContent(element2, ["link", "link#href"]),
creator: getContent(element2, ["creator", "dc:creator", "author", "author.name"]),
pubDate: getContent(element2, ["pubDate", "published", "updated", "dc:date"]),
enclosure: getContent(element2, ["enclosure#url", "yt:videoId"]),
enclosureType: getContent(element2, ["enclosure#type"]),
image: getContent(element2, ["itunes:image#href"]),
id: getContent(element2, ["id"]),
language: null,
folder: null,
feed: null,
read: null,
favorite: null,
created: null,
tags: [],
hash: null
};
}
function getAllItems(doc) {
const items = [];
if (doc.getElementsByTagName("item")) {
for (const elementsByTagNameKey in doc.getElementsByTagName("item")) {
const entry = doc.getElementsByTagName("item")[elementsByTagNameKey];
items.push(entry);
}
}
if (doc.getElementsByTagName("entry")) {
for (const elementsByTagNameKey in doc.getElementsByTagName("entry")) {
const entry = doc.getElementsByTagName("entry")[elementsByTagNameKey];
items.push(entry);
}
}
return items;
}
function getFeedItems(feed) {
return __async(this, null, function* () {
const rawData = yield (0, import_obsidian10.request)({ url: feed.url });
const data = new window.DOMParser().parseFromString(rawData, "text/xml");
const items = [];
const rawItems = getAllItems(data);
const language = getContent(data, ["language"]).substr(0, 2);
rawItems.forEach((rawItem) => {
const item = buildItem(rawItem);
if (item.title !== void 0 && item.title.length !== 0) {
item.folder = feed.folder;
item.feed = feed.name;
item.read = false;
item.favorite = false;
item.created = false;
item.language = language;
item.hash = new import_ts_md5.Md5().appendStr(item.title).appendStr(item.folder).appendStr(item.link).end();
items.push(item);
}
});
const image = getContent(data, ["image", "image.url", "icon"]);
const content = {
title: getContent(data, ["title"]),
subtitle: getContent(data, ["subtitle"]),
link: getContent(data, ["link"]),
image: image ? image.replace(/^\/|\/$/g, "") : null,
description: getContent(data, ["description"]),
items,
folder: feed.folder,
name: feed.name,
language,
hash: ""
};
return Promise.resolve(content);
});
}
// src/view/ItemView.svelte
var import_obsidian11 = __toModule(require("obsidian"));
// src/view/HtmlTooltip.svelte
function create_if_block2(ctx) {
let p;
let html_action;
let mounted;
let dispose;
return {
c() {
p = element("p");
attr(p, "class", "tooltiptext");
},
m(target, anchor) {
insert(target, p, anchor);
if (!mounted) {
dispose = action_destroyer(html_action = ctx[1].call(null, p, ctx[0]));
mounted = true;
}
},
p(ctx2, dirty) {
if (html_action && is_function(html_action.update) && dirty & 1)
html_action.update.call(null, ctx2[0]);
},
d(detaching) {
if (detaching)
detach(p);
mounted = false;
dispose();
}
};
}
function create_fragment2(ctx) {
let if_block_anchor;
let if_block = ctx[0].length > 0 && create_if_block2(ctx);
return {
c() {
if (if_block)
if_block.c();
if_block_anchor = empty();
},
m(target, anchor) {
if (if_block)
if_block.m(target, anchor);
insert(target, if_block_anchor, anchor);
},
p(ctx2, [dirty]) {
if (ctx2[0].length > 0) {
if (if_block) {
if_block.p(ctx2, dirty);
} else {
if_block = create_if_block2(ctx2);
if_block.c();
if_block.m(if_block_anchor.parentNode, if_block_anchor);
}
} else if (if_block) {
if_block.d(1);
if_block = null;
}
},
i: noop,
o: noop,
d(detaching) {
if (if_block)
if_block.d(detaching);
if (detaching)
detach(if_block_anchor);
}
};
}
function instance2($$self, $$props, $$invalidate) {
let { content = "" } = $$props;
const html = (node, content2) => {
node.append(sanitizeHTMLToDom(content2));
};
$$self.$$set = ($$props2) => {
if ("content" in $$props2)
$$invalidate(0, content = $$props2.content);
};
return [content, html];
}
var HtmlTooltip = class extends SvelteComponent {
constructor(options) {
super();
init(this, options, instance2, create_fragment2, safe_not_equal, { content: 0 });
}
};
var HtmlTooltip_default = HtmlTooltip;
// src/view/ItemView.svelte
function get_each_context(ctx, list, i) {
const child_ctx = ctx.slice();
child_ctx[7] = list[i];
return child_ctx;
}
function create_if_block3(ctx) {
let div;
let t0;
let t1;
let a;
let t2_value = ctx[1].title + "";
let t2;
let t3;
let t4;
let div_class_value;
let current;
let mounted;
let dispose;
let if_block0 = ctx[1].favorite && create_if_block_5(ctx);
let if_block1 = ctx[1].created && create_if_block_4(ctx);
let if_block2 = ctx[1].tags.length > 0 && create_if_block_3(ctx);
let if_block3 = ctx[3] && create_if_block_1(ctx);
return {
c() {
div = element("div");
if (if_block0)
if_block0.c();
t0 = space();
if (if_block1)
if_block1.c();
t1 = space();
a = element("a");
t2 = text(t2_value);
t3 = space();
if (if_block2)
if_block2.c();
t4 = space();
if (if_block3)
if_block3.c();
attr(a, "href", "/");
attr(div, "class", div_class_value = "is-clickable rss-tooltip rss-feed-item " + (ctx[1].read ? "rss-read" : "rss-not-read"));
},
m(target, anchor) {
insert(target, div, anchor);
if (if_block0)
if_block0.m(div, null);
append(div, t0);
if (if_block1)
if_block1.m(div, null);
append(div, t1);
append(div, a);
append(a, t2);
append(div, t3);
if (if_block2)
if_block2.m(div, null);
append(div, t4);
if (if_block3)
if_block3.m(div, null);
current = true;
if (!mounted) {
dispose = [
listen(a, "click", ctx[6]),
listen(a, "contextmenu", ctx[5]),
listen(a, "mouseover", ctx[4]),
listen(a, "mouseleave", ctx[4]),
listen(a, "focus", ctx[4])
];
mounted = true;
}
},
p(ctx2, dirty) {
if (ctx2[1].favorite) {
if (if_block0) {
if (dirty & 2) {
transition_in(if_block0, 1);
}
} else {
if_block0 = create_if_block_5(ctx2);
if_block0.c();
transition_in(if_block0, 1);
if_block0.m(div, t0);
}
} else if (if_block0) {
group_outros();
transition_out(if_block0, 1, 1, () => {
if_block0 = null;
});
check_outros();
}
if (ctx2[1].created) {
if (if_block1) {
if (dirty & 2) {
transition_in(if_block1, 1);
}
} else {
if_block1 = create_if_block_4(ctx2);
if_block1.c();
transition_in(if_block1, 1);
if_block1.m(div, t1);
}
} else if (if_block1) {
group_outros();
transition_out(if_block1, 1, 1, () => {
if_block1 = null;
});
check_outros();
}
if ((!current || dirty & 2) && t2_value !== (t2_value = ctx2[1].title + ""))
set_data(t2, t2_value);
if (ctx2[1].tags.length > 0) {
if (if_block2) {
if_block2.p(ctx2, dirty);
} else {
if_block2 = create_if_block_3(ctx2);
if_block2.c();
if_block2.m(div, t4);
}
} else if (if_block2) {
if_block2.d(1);
if_block2 = null;
}
if (ctx2[3]) {
if (if_block3) {
if_block3.p(ctx2, dirty);
if (dirty & 8) {
transition_in(if_block3, 1);
}
} else {
if_block3 = create_if_block_1(ctx2);
if_block3.c();
transition_in(if_block3, 1);
if_block3.m(div, null);
}
} else if (if_block3) {
group_outros();
transition_out(if_block3, 1, 1, () => {
if_block3 = null;
});
check_outros();
}
if (!current || dirty & 2 && div_class_value !== (div_class_value = "is-clickable rss-tooltip rss-feed-item " + (ctx2[1].read ? "rss-read" : "rss-not-read"))) {
attr(div, "class", div_class_value);
}
},
i(local) {
if (current)
return;
transition_in(if_block0);
transition_in(if_block1);
transition_in(if_block3);
current = true;
},
o(local) {
transition_out(if_block0);
transition_out(if_block1);
transition_out(if_block3);
current = false;
},
d(detaching) {
if (detaching)
detach(div);
if (if_block0)
if_block0.d();
if (if_block1)
if_block1.d();
if (if_block2)
if_block2.d();
if (if_block3)
if_block3.d();
mounted = false;
run_all(dispose);
}
};
}
function create_if_block_5(ctx) {
let iconcomponent;
let current;
iconcomponent = new IconComponent_default({ props: { iconName: "star" } });
return {
c() {
create_component(iconcomponent.$$.fragment);
},
m(target, anchor) {
mount_component(iconcomponent, target, anchor);
current = true;
},
i(local) {
if (current)
return;
transition_in(iconcomponent.$$.fragment, local);
current = true;
},
o(local) {
transition_out(iconcomponent.$$.fragment, local);
current = false;
},
d(detaching) {
destroy_component(iconcomponent, detaching);
}
};
}
function create_if_block_4(ctx) {
let iconcomponent;
let current;
iconcomponent = new IconComponent_default({ props: { iconName: "document" } });
return {
c() {
create_component(iconcomponent.$$.fragment);
},
m(target, anchor) {
mount_component(iconcomponent, target, anchor);
current = true;
},
i(local) {
if (current)
return;
transition_in(iconcomponent.$$.fragment, local);
current = true;
},
o(local) {
transition_out(iconcomponent.$$.fragment, local);
current = false;
},
d(detaching) {
destroy_component(iconcomponent, detaching);
}
};
}
function create_if_block_3(ctx) {
let span;
let each_value = ctx[1].tags;
let each_blocks = [];
for (let i = 0; i < each_value.length; i += 1) {
each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i));
}
return {
c() {
span = element("span");
for (let i = 0; i < each_blocks.length; i += 1) {
each_blocks[i].c();
}
},
m(target, anchor) {
insert(target, span, anchor);
for (let i = 0; i < each_blocks.length; i += 1) {
each_blocks[i].m(span, null);
}
},
p(ctx2, dirty) {
if (dirty & 2) {
each_value = ctx2[1].tags;
let i;
for (i = 0; i < each_value.length; i += 1) {
const child_ctx = get_each_context(ctx2, each_value, i);
if (each_blocks[i]) {
each_blocks[i].p(child_ctx, dirty);
} else {
each_blocks[i] = create_each_block(child_ctx);
each_blocks[i].c();
each_blocks[i].m(span, null);
}
}
for (; i < each_blocks.length; i += 1) {
each_blocks[i].d(1);
}
each_blocks.length = each_value.length;
}
},
d(detaching) {
if (detaching)
detach(span);
destroy_each(each_blocks, detaching);
}
};
}
function create_each_block(ctx) {
let t0;
let a;
let t1_value = ctx[7] + "";
let t1;
let a_href_value;
return {
c() {
t0 = text("\xA0");
a = element("a");
t1 = text(t1_value);
attr(a, "class", "tag rss-tag");
attr(a, "href", a_href_value = "#" + ctx[7]);
},
m(target, anchor) {
insert(target, t0, anchor);
insert(target, a, anchor);
append(a, t1);
},
p(ctx2, dirty) {
if (dirty & 2 && t1_value !== (t1_value = ctx2[7] + ""))
set_data(t1, t1_value);
if (dirty & 2 && a_href_value !== (a_href_value = "#" + ctx2[7])) {
attr(a, "href", a_href_value);
}
},
d(detaching) {
if (detaching)
detach(t0);
if (detaching)
detach(a);
}
};
}
function create_if_block_1(ctx) {
let if_block_anchor;
let current;
let if_block = ctx[1].description !== ctx[1].content && create_if_block_2(ctx);
return {
c() {
if (if_block)
if_block.c();
if_block_anchor = empty();
},
m(target, anchor) {
if (if_block)
if_block.m(target, anchor);
insert(target, if_block_anchor, anchor);
current = true;
},
p(ctx2, dirty) {
if (ctx2[1].description !== ctx2[1].content) {
if (if_block) {
if_block.p(ctx2, dirty);
if (dirty & 2) {
transition_in(if_block, 1);
}
} else {
if_block = create_if_block_2(ctx2);
if_block.c();
transition_in(if_block, 1);
if_block.m(if_block_anchor.parentNode, if_block_anchor);
}
} else if (if_block) {
group_outros();
transition_out(if_block, 1, 1, () => {
if_block = null;
});
check_outros();
}
},
i(local) {
if (current)
return;
transition_in(if_block);
current = true;
},
o(local) {
transition_out(if_block);
current = false;
},
d(detaching) {
if (if_block)
if_block.d(detaching);
if (detaching)
detach(if_block_anchor);
}
};
}
function create_if_block_2(ctx) {
let htmltooltip;
let current;
htmltooltip = new HtmlTooltip_default({
props: { content: ctx[1].description }
});
return {
c() {
create_component(htmltooltip.$$.fragment);
},
m(target, anchor) {
mount_component(htmltooltip, target, anchor);
current = true;
},
p(ctx2, dirty) {
const htmltooltip_changes = {};
if (dirty & 2)
htmltooltip_changes.content = ctx2[1].description;
htmltooltip.$set(htmltooltip_changes);
},
i(local) {
if (current)
return;
transition_in(htmltooltip.$$.fragment, local);
current = true;
},
o(local) {
transition_out(htmltooltip.$$.fragment, local);
current = false;
},
d(detaching) {
destroy_component(htmltooltip, detaching);
}
};
}
function create_fragment3(ctx) {
let if_block_anchor;
let current;
let if_block = ctx[1] && create_if_block3(ctx);
return {
c() {
if (if_block)
if_block.c();
if_block_anchor = empty();
},
m(target, anchor) {
if (if_block)
if_block.m(target, anchor);
insert(target, if_block_anchor, anchor);
current = true;
},
p(ctx2, [dirty]) {
if (ctx2[1]) {
if (if_block) {
if_block.p(ctx2, dirty);
if (dirty & 2) {
transition_in(if_block, 1);
}
} else {
if_block = create_if_block3(ctx2);
if_block.c();
transition_in(if_block, 1);
if_block.m(if_block_anchor.parentNode, if_block_anchor);
}
} else if (if_block) {
group_outros();
transition_out(if_block, 1, 1, () => {
if_block = null;
});
check_outros();
}
},
i(local) {
if (current)
return;
transition_in(if_block);
current = true;
},
o(local) {
transition_out(if_block);
current = false;
},
d(detaching) {
if (if_block)
if_block.d(detaching);
if (detaching)
detach(if_block_anchor);
}
};
}
function instance3($$self, $$props, $$invalidate) {
let { plugin = null } = $$props;
let { item = null } = $$props;
let { items = null } = $$props;
let hover = false;
function toggleHover() {
$$invalidate(3, hover = !hover);
}
function openMenu(e) {
return __awaiter(this, void 0, void 0, function* () {
if (e.ctrlKey && e.altKey) {
openInBrowser(item);
return;
}
if (e.ctrlKey) {
yield createNewNote(plugin, item);
return;
}
if (e.altKey) {
yield pasteToNote(plugin, item);
return;
}
const menu = new import_obsidian11.Menu(plugin.app);
Action.actions.forEach((action) => {
menu.addItem((menuItem) => {
menuItem.setIcon(action.icon).setTitle(action.name).onClick(() => __awaiter(this, void 0, void 0, function* () {
yield action.processor(plugin, item);
}));
});
});
menu.showAtPosition({ x: e.x, y: e.y });
});
}
const click_handler = () => {
new ItemModal(plugin, item, items).open();
};
$$self.$$set = ($$props2) => {
if ("plugin" in $$props2)
$$invalidate(0, plugin = $$props2.plugin);
if ("item" in $$props2)
$$invalidate(1, item = $$props2.item);
if ("items" in $$props2)
$$invalidate(2, items = $$props2.items);
};
return [plugin, item, items, hover, toggleHover, openMenu, click_handler];
}
var ItemView = class extends SvelteComponent {
constructor(options) {
super();
init(this, options, instance3, create_fragment3, safe_not_equal, { plugin: 0, item: 1, items: 2 });
}
};
var ItemView_default = ItemView;
// src/view/FeedView.svelte
var import_obsidian12 = __toModule(require("obsidian"));
function get_each_context2(ctx, list, i) {
const child_ctx = ctx.slice();
child_ctx[6] = list[i];
return child_ctx;
}
function create_else_block(ctx) {
let div3;
let div1;
let div0;
let show_if_1;
let current_block_type_index;
let if_block0;
let t0;
let span;
let t1_value = ctx[0].name + "";
let t1;
let t2;
let div1_class_value;
let t3;
let div2;
let show_if = !ctx[2].contains(ctx[0].name);
let current;
let mounted;
let dispose;
const if_block_creators = [create_if_block_32, create_else_block_1];
const if_blocks = [];
function select_block_type_1(ctx2, dirty) {
if (show_if_1 == null || dirty & 5)
show_if_1 = !!ctx2[2].contains(ctx2[0].name);
if (show_if_1)
return 0;
return 1;
}
current_block_type_index = select_block_type_1(ctx, -1);
if_block0 = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
let if_block1 = ctx[0].image && create_if_block_22(ctx);
let if_block2 = show_if && create_if_block_12(ctx);
return {
c() {
div3 = element("div");
div1 = element("div");
div0 = element("div");
if_block0.c();
t0 = space();
span = element("span");
t1 = text(t1_value);
t2 = space();
if (if_block1)
if_block1.c();
t3 = space();
div2 = element("div");
if (if_block2)
if_block2.c();
attr(div0, "class", "rss-feed-title");
set_style(div0, "overflow", "hidden");
attr(div1, "class", div1_class_value = "" + ((ctx[2].contains(ctx[0].name) ? "is-collapsed" : "") + " tree-item-self is-clickable"));
attr(div2, "class", "rss-feed-items");
attr(div3, "class", "rss-feed");
},
m(target, anchor) {
insert(target, div3, anchor);
append(div3, div1);
append(div1, div0);
if_blocks[current_block_type_index].m(div0, null);
append(div0, t0);
append(div0, span);
append(span, t1);
append(span, t2);
if (if_block1)
if_block1.m(span, null);
append(div3, t3);
append(div3, div2);
if (if_block2)
if_block2.m(div2, null);
current = true;
if (!mounted) {
dispose = [
listen(div1, "click", ctx[5]),
listen(div1, "contextmenu", ctx[4])
];
mounted = true;
}
},
p(ctx2, dirty) {
let previous_block_index = current_block_type_index;
current_block_type_index = select_block_type_1(ctx2, dirty);
if (current_block_type_index !== previous_block_index) {
group_outros();
transition_out(if_blocks[previous_block_index], 1, 1, () => {
if_blocks[previous_block_index] = null;
});
check_outros();
if_block0 = if_blocks[current_block_type_index];
if (!if_block0) {
if_block0 = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx2);
if_block0.c();
} else {
}
transition_in(if_block0, 1);
if_block0.m(div0, t0);
}
if ((!current || dirty & 1) && t1_value !== (t1_value = ctx2[0].name + ""))
set_data(t1, t1_value);
if (ctx2[0].image) {
if (if_block1) {
if_block1.p(ctx2, dirty);
} else {
if_block1 = create_if_block_22(ctx2);
if_block1.c();
if_block1.m(span, null);
}
} else if (if_block1) {
if_block1.d(1);
if_block1 = null;
}
if (!current || dirty & 5 && div1_class_value !== (div1_class_value = "" + ((ctx2[2].contains(ctx2[0].name) ? "is-collapsed" : "") + " tree-item-self is-clickable"))) {
attr(div1, "class", div1_class_value);
}
if (dirty & 5)
show_if = !ctx2[2].contains(ctx2[0].name);
if (show_if) {
if (if_block2) {
if_block2.p(ctx2, dirty);
if (dirty & 5) {
transition_in(if_block2, 1);
}
} else {
if_block2 = create_if_block_12(ctx2);
if_block2.c();
transition_in(if_block2, 1);
if_block2.m(div2, null);
}
} else if (if_block2) {
group_outros();
transition_out(if_block2, 1, 1, () => {
if_block2 = null;
});
check_outros();
}
},
i(local) {
if (current)
return;
transition_in(if_block0);
transition_in(if_block2);
current = true;
},
o(local) {
transition_out(if_block0);
transition_out(if_block2);
current = false;
},
d(detaching) {
if (detaching)
detach(div3);
if_blocks[current_block_type_index].d();
if (if_block1)
if_block1.d();
if (if_block2)
if_block2.d();
mounted = false;
run_all(dispose);
}
};
}
function create_if_block4(ctx) {
let p;
return {
c() {
p = element("p");
p.textContent = "...loading";
},
m(target, anchor) {
insert(target, p, anchor);
},
p: noop,
i: noop,
o: noop,
d(detaching) {
if (detaching)
detach(p);
}
};
}
function create_else_block_1(ctx) {
let iconcomponent;
let current;
iconcomponent = new IconComponent_default({
props: { iconName: "down-chevron-glyph" }
});
return {
c() {
create_component(iconcomponent.$$.fragment);
},
m(target, anchor) {
mount_component(iconcomponent, target, anchor);
current = true;
},
i(local) {
if (current)
return;
transition_in(iconcomponent.$$.fragment, local);
current = true;
},
o(local) {
transition_out(iconcomponent.$$.fragment, local);
current = false;
},
d(detaching) {
destroy_component(iconcomponent, detaching);
}
};
}
function create_if_block_32(ctx) {
let iconcomponent;
let current;
iconcomponent = new IconComponent_default({
props: { iconName: "right-chevron-glyph" }
});
return {
c() {
create_component(iconcomponent.$$.fragment);
},
m(target, anchor) {
mount_component(iconcomponent, target, anchor);
current = true;
},
i(local) {
if (current)
return;
transition_in(iconcomponent.$$.fragment, local);
current = true;
},
o(local) {
transition_out(iconcomponent.$$.fragment, local);
current = false;
},
d(detaching) {
destroy_component(iconcomponent, detaching);
}
};
}
function create_if_block_22(ctx) {
let img;
let img_src_value;
let img_alt_value;
return {
c() {
img = element("img");
if (!src_url_equal(img.src, img_src_value = ctx[0].image))
attr(img, "src", img_src_value);
attr(img, "alt", img_alt_value = ctx[0].title);
set_style(img, "height", "1em");
},
m(target, anchor) {
insert(target, img, anchor);
},
p(ctx2, dirty) {
if (dirty & 1 && !src_url_equal(img.src, img_src_value = ctx2[0].image)) {
attr(img, "src", img_src_value);
}
if (dirty & 1 && img_alt_value !== (img_alt_value = ctx2[0].title)) {
attr(img, "alt", img_alt_value);
}
},
d(detaching) {
if (detaching)
detach(img);
}
};
}
function create_if_block_12(ctx) {
let div;
let current;
let each_value = ctx[0].items;
let each_blocks = [];
for (let i = 0; i < each_value.length; i += 1) {
each_blocks[i] = create_each_block2(get_each_context2(ctx, each_value, i));
}
const out = (i) => transition_out(each_blocks[i], 1, 1, () => {
each_blocks[i] = null;
});
return {
c() {
div = element("div");
for (let i = 0; i < each_blocks.length; i += 1) {
each_blocks[i].c();
}
attr(div, "class", "tree-item-children");
},
m(target, anchor) {
insert(target, div, anchor);
for (let i = 0; i < each_blocks.length; i += 1) {
each_blocks[i].m(div, null);
}
current = true;
},
p(ctx2, dirty) {
if (dirty & 3) {
each_value = ctx2[0].items;
let i;
for (i = 0; i < each_value.length; i += 1) {
const child_ctx = get_each_context2(ctx2, each_value, i);
if (each_blocks[i]) {
each_blocks[i].p(child_ctx, dirty);
transition_in(each_blocks[i], 1);
} else {
each_blocks[i] = create_each_block2(child_ctx);
each_blocks[i].c();
transition_in(each_blocks[i], 1);
each_blocks[i].m(div, null);
}
}
group_outros();
for (i = each_value.length; i < each_blocks.length; i += 1) {
out(i);
}
check_outros();
}
},
i(local) {
if (current)
return;
for (let i = 0; i < each_value.length; i += 1) {
transition_in(each_blocks[i]);
}
current = true;
},
o(local) {
each_blocks = each_blocks.filter(Boolean);
for (let i = 0; i < each_blocks.length; i += 1) {
transition_out(each_blocks[i]);
}
current = false;
},
d(detaching) {
if (detaching)
detach(div);
destroy_each(each_blocks, detaching);
}
};
}
function create_each_block2(ctx) {
let div1;
let div0;
let itemview;
let t_1;
let current;
itemview = new ItemView_default({
props: {
item: ctx[6],
plugin: ctx[1],
items: ctx[0].items
}
});
return {
c() {
div1 = element("div");
div0 = element("div");
create_component(itemview.$$.fragment);
t_1 = space();
attr(div0, "class", "tree-item-self");
attr(div1, "class", "tree-item");
},
m(target, anchor) {
insert(target, div1, anchor);
append(div1, div0);
mount_component(itemview, div0, null);
append(div1, t_1);
current = true;
},
p(ctx2, dirty) {
const itemview_changes = {};
if (dirty & 1)
itemview_changes.item = ctx2[6];
if (dirty & 2)
itemview_changes.plugin = ctx2[1];
if (dirty & 1)
itemview_changes.items = ctx2[0].items;
itemview.$set(itemview_changes);
},
i(local) {
if (current)
return;
transition_in(itemview.$$.fragment, local);
current = true;
},
o(local) {
transition_out(itemview.$$.fragment, local);
current = false;
},
d(detaching) {
if (detaching)
detach(div1);
destroy_component(itemview);
}
};
}
function create_fragment4(ctx) {
let current_block_type_index;
let if_block;
let if_block_anchor;
let current;
const if_block_creators = [create_if_block4, create_else_block];
const if_blocks = [];
function select_block_type(ctx2, dirty) {
if (!ctx2[0])
return 0;
return 1;
}
current_block_type_index = select_block_type(ctx, -1);
if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
return {
c() {
if_block.c();
if_block_anchor = empty();
},
m(target, anchor) {
if_blocks[current_block_type_index].m(target, anchor);
insert(target, if_block_anchor, anchor);
current = true;
},
p(ctx2, [dirty]) {
let previous_block_index = current_block_type_index;
current_block_type_index = select_block_type(ctx2, dirty);
if (current_block_type_index === previous_block_index) {
if_blocks[current_block_type_index].p(ctx2, dirty);
} else {
group_outros();
transition_out(if_blocks[previous_block_index], 1, 1, () => {
if_blocks[previous_block_index] = null;
});
check_outros();
if_block = if_blocks[current_block_type_index];
if (!if_block) {
if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx2);
if_block.c();
} else {
if_block.p(ctx2, dirty);
}
transition_in(if_block, 1);
if_block.m(if_block_anchor.parentNode, if_block_anchor);
}
},
i(local) {
if (current)
return;
transition_in(if_block);
current = true;
},
o(local) {
transition_out(if_block);
current = false;
},
d(detaching) {
if_blocks[current_block_type_index].d(detaching);
if (detaching)
detach(if_block_anchor);
}
};
}
function instance4($$self, $$props, $$invalidate) {
let { feed = null } = $$props;
let { plugin } = $$props;
let folded = [];
foldedState.subscribe((value) => {
$$invalidate(2, folded = value);
});
function toggleFold(feed2) {
if (!folded) {
$$invalidate(2, folded = []);
}
if (folded.contains(feed2)) {
folded.remove(feed2);
} else
folded.push(feed2);
plugin.writeFolded(folded);
}
function openMenu(e) {
return __awaiter(this, void 0, void 0, function* () {
const menu = new import_obsidian12.Menu(plugin.app);
menu.addItem((menuItem) => {
menuItem.setIcon("create-new").setTitle(t("create_all")).onClick(() => __awaiter(this, void 0, void 0, function* () {
for (let item of feed.items) {
yield Action.CREATE_NOTE.processor(plugin, item);
}
}));
});
menu.addItem((menuItem) => {
menuItem.setIcon("feather-eye").setTitle(t("mark_all_as_read")).onClick(() => __awaiter(this, void 0, void 0, function* () {
for (let item of feed.items) {
item.read = true;
}
const items = plugin.settings.items;
yield plugin.writeFeedContent(() => {
return items;
});
}));
});
menu.addItem((menuItem) => {
menuItem.setIcon("tag-glyph").setTitle(t("add_tags_to_all")).onClick(() => __awaiter(this, void 0, void 0, function* () {
const tagModal = new TagModal(plugin, []);
tagModal.onClose = () => __awaiter(this, void 0, void 0, function* () {
for (let item of feed.items) {
item.tags.push(...tagModal.tags);
}
const items = plugin.settings.items;
yield plugin.writeFeedContent(() => {
return items;
});
});
tagModal.open();
}));
});
menu.showAtPosition({ x: e.x, y: e.y });
});
}
const click_handler = () => toggleFold(feed.name);
$$self.$$set = ($$props2) => {
if ("feed" in $$props2)
$$invalidate(0, feed = $$props2.feed);
if ("plugin" in $$props2)
$$invalidate(1, plugin = $$props2.plugin);
};
return [feed, plugin, folded, toggleFold, openMenu, click_handler];
}
var FeedView = class extends SvelteComponent {
constructor(options) {
super();
init(this, options, instance4, create_fragment4, safe_not_equal, { feed: 0, plugin: 1 });
}
};
var FeedView_default = FeedView;
// src/view/FolderView.svelte
var import_obsidian13 = __toModule(require("obsidian"));
function get_each_context3(ctx, list, i) {
const child_ctx = ctx.slice();
child_ctx[13] = list[i];
return child_ctx;
}
function get_each_context_1(ctx, list, i) {
const child_ctx = ctx.slice();
child_ctx[16] = list[i];
return child_ctx;
}
function get_each_context_2(ctx, list, i) {
const child_ctx = ctx.slice();
child_ctx[13] = list[i];
return child_ctx;
}
function get_each_context_3(ctx, list, i) {
const child_ctx = ctx.slice();
child_ctx[21] = list[i];
return child_ctx;
}
function get_each_context_4(ctx, list, i) {
const child_ctx = ctx.slice();
child_ctx[24] = list[i];
return child_ctx;
}
function get_each_context_5(ctx, list, i) {
const child_ctx = ctx.slice();
child_ctx[24] = list[i];
return child_ctx;
}
function create_else_block2(ctx) {
let div;
let t0;
let t1;
let current;
let if_block0 = ctx[3] && create_if_block_7(ctx);
let if_block1 = !ctx[2] && create_if_block_6(ctx);
let if_block2 = ctx[2] && create_if_block_18(ctx);
return {
c() {
div = element("div");
if (if_block0)
if_block0.c();
t0 = space();
if (if_block1)
if_block1.c();
t1 = space();
if (if_block2)
if_block2.c();
},
m(target, anchor) {
insert(target, div, anchor);
if (if_block0)
if_block0.m(div, null);
append(div, t0);
if (if_block1)
if_block1.m(div, null);
append(div, t1);
if (if_block2)
if_block2.m(div, null);
current = true;
},
p(ctx2, dirty) {
if (ctx2[3]) {
if (if_block0) {
if_block0.p(ctx2, dirty);
if (dirty & 8) {
transition_in(if_block0, 1);
}
} else {
if_block0 = create_if_block_7(ctx2);
if_block0.c();
transition_in(if_block0, 1);
if_block0.m(div, t0);
}
} else if (if_block0) {
group_outros();
transition_out(if_block0, 1, 1, () => {
if_block0 = null;
});
check_outros();
}
if (!ctx2[2]) {
if (if_block1) {
} else {
if_block1 = create_if_block_6(ctx2);
if_block1.c();
if_block1.m(div, t1);
}
} else if (if_block1) {
if_block1.d(1);
if_block1 = null;
}
if (ctx2[2]) {
if (if_block2) {
if_block2.p(ctx2, dirty);
if (dirty & 4) {
transition_in(if_block2, 1);
}
} else {
if_block2 = create_if_block_18(ctx2);
if_block2.c();
transition_in(if_block2, 1);
if_block2.m(div, null);
}
} else if (if_block2) {
group_outros();
transition_out(if_block2, 1, 1, () => {
if_block2 = null;
});
check_outros();
}
},
i(local) {
if (current)
return;
transition_in(if_block0);
transition_in(if_block2);
current = true;
},
o(local) {
transition_out(if_block0);
transition_out(if_block2);
current = false;
},
d(detaching) {
if (detaching)
detach(div);
if (if_block0)
if_block0.d();
if (if_block1)
if_block1.d();
if (if_block2)
if_block2.d();
}
};
}
function create_if_block5(ctx) {
let p;
return {
c() {
p = element("p");
p.textContent = "Loading";
},
m(target, anchor) {
insert(target, p, anchor);
},
p: noop,
i: noop,
o: noop,
d(detaching) {
if (detaching)
detach(p);
}
};
}
function create_if_block_7(ctx) {
let div2;
let div1;
let span;
let show_if_1;
let current_block_type_index;
let if_block0;
let t0;
let div0;
let div1_class_value;
let t2;
let show_if = !ctx[1].contains("rss-filters");
let current;
let mounted;
let dispose;
const if_block_creators = [create_if_block_17, create_else_block_5];
const if_blocks = [];
function select_block_type_1(ctx2, dirty) {
if (show_if_1 == null || dirty & 2)
show_if_1 = !!ctx2[1].contains("rss-filters");
if (show_if_1)
return 0;
return 1;
}
current_block_type_index = select_block_type_1(ctx, -1);
if_block0 = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
let if_block1 = show_if && create_if_block_8(ctx);
return {
c() {
div2 = element("div");
div1 = element("div");
span = element("span");
if_block0.c();
t0 = space();
div0 = element("div");
div0.textContent = `${t("filtered_folders")}`;
t2 = space();
if (if_block1)
if_block1.c();
attr(span, "class", "tree-item-self is-clickable");
attr(div1, "class", div1_class_value = "" + ((ctx[1].contains("rss-filters") ? "is-collapsed" : "") + " tree-item is-clickable"));
attr(div2, "class", "rss-filtered-folders");
},
m(target, anchor) {
insert(target, div2, anchor);
append(div2, div1);
append(div1, span);
if_blocks[current_block_type_index].m(span, null);
append(span, t0);
append(span, div0);
append(div2, t2);
if (if_block1)
if_block1.m(div2, null);
current = true;
if (!mounted) {
dispose = listen(div1, "click", ctx[6]);
mounted = true;
}
},
p(ctx2, dirty) {
let previous_block_index = current_block_type_index;
current_block_type_index = select_block_type_1(ctx2, dirty);
if (current_block_type_index !== previous_block_index) {
group_outros();
transition_out(if_blocks[previous_block_index], 1, 1, () => {
if_blocks[previous_block_index] = null;
});
check_outros();
if_block0 = if_blocks[current_block_type_index];
if (!if_block0) {
if_block0 = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx2);
if_block0.c();
} else {
}
transition_in(if_block0, 1);
if_block0.m(span, t0);
}
if (!current || dirty & 2 && div1_class_value !== (div1_class_value = "" + ((ctx2[1].contains("rss-filters") ? "is-collapsed" : "") + " tree-item is-clickable"))) {
attr(div1, "class", div1_class_value);
}
if (dirty & 2)
show_if = !ctx2[1].contains("rss-filters");
if (show_if) {
if (if_block1) {
if_block1.p(ctx2, dirty);
if (dirty & 2) {
transition_in(if_block1, 1);
}
} else {
if_block1 = create_if_block_8(ctx2);
if_block1.c();
transition_in(if_block1, 1);
if_block1.m(div2, null);
}
} else if (if_block1) {
group_outros();
transition_out(if_block1, 1, 1, () => {
if_block1 = null;
});
check_outros();
}
},
i(local) {
if (current)
return;
transition_in(if_block0);
transition_in(if_block1);
current = true;
},
o(local) {
transition_out(if_block0);
transition_out(if_block1);
current = false;
},
d(detaching) {
if (detaching)
detach(div2);
if_blocks[current_block_type_index].d();
if (if_block1)
if_block1.d();
mounted = false;
dispose();
}
};
}
function create_else_block_5(ctx) {
let iconcomponent;
let current;
iconcomponent = new IconComponent_default({
props: { iconName: "down-chevron-glyph" }
});
return {
c() {
create_component(iconcomponent.$$.fragment);
},
m(target, anchor) {
mount_component(iconcomponent, target, anchor);
current = true;
},
i(local) {
if (current)
return;
transition_in(iconcomponent.$$.fragment, local);
current = true;
},
o(local) {
transition_out(iconcomponent.$$.fragment, local);
current = false;
},
d(detaching) {
destroy_component(iconcomponent, detaching);
}
};
}
function create_if_block_17(ctx) {
let iconcomponent;
let current;
iconcomponent = new IconComponent_default({
props: { iconName: "right-chevron-glyph" }
});
return {
c() {
create_component(iconcomponent.$$.fragment);
},
m(target, anchor) {
mount_component(iconcomponent, target, anchor);
current = true;
},
i(local) {
if (current)
return;
transition_in(iconcomponent.$$.fragment, local);
current = true;
},
o(local) {
transition_out(iconcomponent.$$.fragment, local);
current = false;
},
d(detaching) {
destroy_component(iconcomponent, detaching);
}
};
}
function create_if_block_8(ctx) {
let span;
let current;
let each_value_2 = buildTreeStructure(ctx[3]);
let each_blocks = [];
for (let i = 0; i < each_value_2.length; i += 1) {
each_blocks[i] = create_each_block_2(get_each_context_2(ctx, each_value_2, i));
}
const out = (i) => transition_out(each_blocks[i], 1, 1, () => {
each_blocks[i] = null;
});
return {
c() {
span = element("span");
for (let i = 0; i < each_blocks.length; i += 1) {
each_blocks[i].c();
}
},
m(target, anchor) {
insert(target, span, anchor);
for (let i = 0; i < each_blocks.length; i += 1) {
each_blocks[i].m(span, null);
}
current = true;
},
p(ctx2, dirty) {
if (dirty & 27) {
each_value_2 = buildTreeStructure(ctx2[3]);
let i;
for (i = 0; i < each_value_2.length; i += 1) {
const child_ctx = get_each_context_2(ctx2, each_value_2, i);
if (each_blocks[i]) {
each_blocks[i].p(child_ctx, dirty);
transition_in(each_blocks[i], 1);
} else {
each_blocks[i] = create_each_block_2(child_ctx);
each_blocks[i].c();
transition_in(each_blocks[i], 1);
each_blocks[i].m(span, null);
}
}
group_outros();
for (i = each_value_2.length; i < each_blocks.length; i += 1) {
out(i);
}
check_outros();
}
},
i(local) {
if (current)
return;
for (let i = 0; i < each_value_2.length; i += 1) {
transition_in(each_blocks[i]);
}
current = true;
},
o(local) {
each_blocks = each_blocks.filter(Boolean);
for (let i = 0; i < each_blocks.length; i += 1) {
transition_out(each_blocks[i]);
}
current = false;
},
d(detaching) {
if (detaching)
detach(span);
destroy_each(each_blocks, detaching);
}
};
}
function create_else_block_4(ctx) {
let iconcomponent;
let current;
iconcomponent = new IconComponent_default({
props: { iconName: "down-chevron-glyph" }
});
return {
c() {
create_component(iconcomponent.$$.fragment);
},
m(target, anchor) {
mount_component(iconcomponent, target, anchor);
current = true;
},
i(local) {
if (current)
return;
transition_in(iconcomponent.$$.fragment, local);
current = true;
},
o(local) {
transition_out(iconcomponent.$$.fragment, local);
current = false;
},
d(detaching) {
destroy_component(iconcomponent, detaching);
}
};
}
function create_if_block_16(ctx) {
let iconcomponent;
let current;
iconcomponent = new IconComponent_default({
props: { iconName: "right-chevron-glyph" }
});
return {
c() {
create_component(iconcomponent.$$.fragment);
},
m(target, anchor) {
mount_component(iconcomponent, target, anchor);
current = true;
},
i(local) {
if (current)
return;
transition_in(iconcomponent.$$.fragment, local);
current = true;
},
o(local) {
transition_out(iconcomponent.$$.fragment, local);
current = false;
},
d(detaching) {
destroy_component(iconcomponent, detaching);
}
};
}
function create_if_block_14(ctx) {
let show_if = !ctx[1].contains("rss-filters-" + ctx[13].name);
let if_block_anchor;
let current;
let if_block = show_if && create_if_block_15(ctx);
return {
c() {
if (if_block)
if_block.c();
if_block_anchor = empty();
},
m(target, anchor) {
if (if_block)
if_block.m(target, anchor);
insert(target, if_block_anchor, anchor);
current = true;
},
p(ctx2, dirty) {
if (dirty & 10)
show_if = !ctx2[1].contains("rss-filters-" + ctx2[13].name);
if (show_if) {
if (if_block) {
if_block.p(ctx2, dirty);
if (dirty & 10) {
transition_in(if_block, 1);
}
} else {
if_block = create_if_block_15(ctx2);
if_block.c();
transition_in(if_block, 1);
if_block.m(if_block_anchor.parentNode, if_block_anchor);
}
} else if (if_block) {
group_outros();
transition_out(if_block, 1, 1, () => {
if_block = null;
});
check_outros();
}
},
i(local) {
if (current)
return;
transition_in(if_block);
current = true;
},
o(local) {
transition_out(if_block);
current = false;
},
d(detaching) {
if (if_block)
if_block.d(detaching);
if (detaching)
detach(if_block_anchor);
}
};
}
function create_if_block_15(ctx) {
let div;
let current;
let each_value_5 = ctx[13].filter.items.items;
let each_blocks = [];
for (let i = 0; i < each_value_5.length; i += 1) {
each_blocks[i] = create_each_block_5(get_each_context_5(ctx, each_value_5, i));
}
const out = (i) => transition_out(each_blocks[i], 1, 1, () => {
each_blocks[i] = null;
});
return {
c() {
div = element("div");
for (let i = 0; i < each_blocks.length; i += 1) {
each_blocks[i].c();
}
attr(div, "class", "tree-item-children");
},
m(target, anchor) {
insert(target, div, anchor);
for (let i = 0; i < each_blocks.length; i += 1) {
each_blocks[i].m(div, null);
}
current = true;
},
p(ctx2, dirty) {
if (dirty & 9) {
each_value_5 = ctx2[13].filter.items.items;
let i;
for (i = 0; i < each_value_5.length; i += 1) {
const child_ctx = get_each_context_5(ctx2, each_value_5, i);
if (each_blocks[i]) {
each_blocks[i].p(child_ctx, dirty);
transition_in(each_blocks[i], 1);
} else {
each_blocks[i] = create_each_block_5(child_ctx);
each_blocks[i].c();
transition_in(each_blocks[i], 1);
each_blocks[i].m(div, null);
}
}
group_outros();
for (i = each_value_5.length; i < each_blocks.length; i += 1) {
out(i);
}
check_outros();
}
},
i(local) {
if (current)
return;
for (let i = 0; i < each_value_5.length; i += 1) {
transition_in(each_blocks[i]);
}
current = true;
},
o(local) {
each_blocks = each_blocks.filter(Boolean);
for (let i = 0; i < each_blocks.length; i += 1) {
transition_out(each_blocks[i]);
}
current = false;
},
d(detaching) {
if (detaching)
detach(div);
destroy_each(each_blocks, detaching);
}
};
}
function create_each_block_5(ctx) {
let div1;
let div0;
let itemview;
let t_1;
let current;
itemview = new ItemView_default({
props: {
item: ctx[24],
plugin: ctx[0],
items: ctx[13].filter.items.items
}
});
return {
c() {
div1 = element("div");
div0 = element("div");
create_component(itemview.$$.fragment);
t_1 = space();
attr(div0, "class", "tree-item-self");
attr(div1, "class", "tree-item");
},
m(target, anchor) {
insert(target, div1, anchor);
append(div1, div0);
mount_component(itemview, div0, null);
append(div1, t_1);
current = true;
},
p(ctx2, dirty) {
const itemview_changes = {};
if (dirty & 8)
itemview_changes.item = ctx2[24];
if (dirty & 1)
itemview_changes.plugin = ctx2[0];
if (dirty & 8)
itemview_changes.items = ctx2[13].filter.items.items;
itemview.$set(itemview_changes);
},
i(local) {
if (current)
return;
transition_in(itemview.$$.fragment, local);
current = true;
},
o(local) {
transition_out(itemview.$$.fragment, local);
current = false;
},
d(detaching) {
if (detaching)
detach(div1);
destroy_component(itemview);
}
};
}
function create_if_block_9(ctx) {
let show_if = !ctx[1].contains("rss-filters-" + ctx[13].name);
let if_block_anchor;
let current;
let if_block = show_if && create_if_block_10(ctx);
return {
c() {
if (if_block)
if_block.c();
if_block_anchor = empty();
},
m(target, anchor) {
if (if_block)
if_block.m(target, anchor);
insert(target, if_block_anchor, anchor);
current = true;
},
p(ctx2, dirty) {
if (dirty & 10)
show_if = !ctx2[1].contains("rss-filters-" + ctx2[13].name);
if (show_if) {
if (if_block) {
if_block.p(ctx2, dirty);
if (dirty & 10) {
transition_in(if_block, 1);
}
} else {
if_block = create_if_block_10(ctx2);
if_block.c();
transition_in(if_block, 1);
if_block.m(if_block_anchor.parentNode, if_block_anchor);
}
} else if (if_block) {
group_outros();
transition_out(if_block, 1, 1, () => {
if_block = null;
});
check_outros();
}
},
i(local) {
if (current)
return;
transition_in(if_block);
current = true;
},
o(local) {
transition_out(if_block);
current = false;
},
d(detaching) {
if (if_block)
if_block.d(detaching);
if (detaching)
detach(if_block_anchor);
}
};
}
function create_if_block_10(ctx) {
let each_1_anchor;
let current;
let each_value_3 = ctx[13].children;
let each_blocks = [];
for (let i = 0; i < each_value_3.length; i += 1) {
each_blocks[i] = create_each_block_3(get_each_context_3(ctx, each_value_3, i));
}
const out = (i) => transition_out(each_blocks[i], 1, 1, () => {
each_blocks[i] = null;
});
return {
c() {
for (let i = 0; i < each_blocks.length; i += 1) {
each_blocks[i].c();
}
each_1_anchor = empty();
},
m(target, anchor) {
for (let i = 0; i < each_blocks.length; i += 1) {
each_blocks[i].m(target, anchor);
}
insert(target, each_1_anchor, anchor);
current = true;
},
p(ctx2, dirty) {
if (dirty & 27) {
each_value_3 = ctx2[13].children;
let i;
for (i = 0; i < each_value_3.length; i += 1) {
const child_ctx = get_each_context_3(ctx2, each_value_3, i);
if (each_blocks[i]) {
each_blocks[i].p(child_ctx, dirty);
transition_in(each_blocks[i], 1);
} else {
each_blocks[i] = create_each_block_3(child_ctx);
each_blocks[i].c();
transition_in(each_blocks[i], 1);
each_blocks[i].m(each_1_anchor.parentNode, each_1_anchor);
}
}
group_outros();
for (i = each_value_3.length; i < each_blocks.length; i += 1) {
out(i);
}
check_outros();
}
},
i(local) {
if (current)
return;
for (let i = 0; i < each_value_3.length; i += 1) {
transition_in(each_blocks[i]);
}
current = true;
},
o(local) {
each_blocks = each_blocks.filter(Boolean);
for (let i = 0; i < each_blocks.length; i += 1) {
transition_out(each_blocks[i]);
}
current = false;
},
d(detaching) {
destroy_each(each_blocks, detaching);
if (detaching)
detach(each_1_anchor);
}
};
}
function create_else_block_3(ctx) {
let iconcomponent;
let current;
iconcomponent = new IconComponent_default({
props: { iconName: "down-chevron-glyph" }
});
return {
c() {
create_component(iconcomponent.$$.fragment);
},
m(target, anchor) {
mount_component(iconcomponent, target, anchor);
current = true;
},
i(local) {
if (current)
return;
transition_in(iconcomponent.$$.fragment, local);
current = true;
},
o(local) {
transition_out(iconcomponent.$$.fragment, local);
current = false;
},
d(detaching) {
destroy_component(iconcomponent, detaching);
}
};
}
function create_if_block_13(ctx) {
let iconcomponent;
let current;
iconcomponent = new IconComponent_default({
props: { iconName: "right-chevron-glyph" }
});
return {
c() {
create_component(iconcomponent.$$.fragment);
},
m(target, anchor) {
mount_component(iconcomponent, target, anchor);
current = true;
},
i(local) {
if (current)
return;
transition_in(iconcomponent.$$.fragment, local);
current = true;
},
o(local) {
transition_out(iconcomponent.$$.fragment, local);
current = false;
},
d(detaching) {
destroy_component(iconcomponent, detaching);
}
};
}
function create_if_block_11(ctx) {
let show_if = !ctx[1].contains("rss-filters-" + ctx[21].filter.filter.name);
let if_block_anchor;
let current;
let if_block = show_if && create_if_block_122(ctx);
return {
c() {
if (if_block)
if_block.c();
if_block_anchor = empty();
},
m(target, anchor) {
if (if_block)
if_block.m(target, anchor);
insert(target, if_block_anchor, anchor);
current = true;
},
p(ctx2, dirty) {
if (dirty & 10)
show_if = !ctx2[1].contains("rss-filters-" + ctx2[21].filter.filter.name);
if (show_if) {
if (if_block) {
if_block.p(ctx2, dirty);
if (dirty & 10) {
transition_in(if_block, 1);
}
} else {
if_block = create_if_block_122(ctx2);
if_block.c();
transition_in(if_block, 1);
if_block.m(if_block_anchor.parentNode, if_block_anchor);
}
} else if (if_block) {
group_outros();
transition_out(if_block, 1, 1, () => {
if_block = null;
});
check_outros();
}
},
i(local) {
if (current)
return;
transition_in(if_block);
current = true;
},
o(local) {
transition_out(if_block);
current = false;
},
d(detaching) {
if (if_block)
if_block.d(detaching);
if (detaching)
detach(if_block_anchor);
}
};
}
function create_if_block_122(ctx) {
let div;
let current;
let each_value_4 = ctx[21].filter.items.items;
let each_blocks = [];
for (let i = 0; i < each_value_4.length; i += 1) {
each_blocks[i] = create_each_block_4(get_each_context_4(ctx, each_value_4, i));
}
const out = (i) => transition_out(each_blocks[i], 1, 1, () => {
each_blocks[i] = null;
});
return {
c() {
div = element("div");
for (let i = 0; i < each_blocks.length; i += 1) {
each_blocks[i].c();
}
attr(div, "class", "tree-item-children");
},
m(target, anchor) {
insert(target, div, anchor);
for (let i = 0; i < each_blocks.length; i += 1) {
each_blocks[i].m(div, null);
}
current = true;
},
p(ctx2, dirty) {
if (dirty & 9) {
each_value_4 = ctx2[21].filter.items.items;
let i;
for (i = 0; i < each_value_4.length; i += 1) {
const child_ctx = get_each_context_4(ctx2, each_value_4, i);
if (each_blocks[i]) {
each_blocks[i].p(child_ctx, dirty);
transition_in(each_blocks[i], 1);
} else {
each_blocks[i] = create_each_block_4(child_ctx);
each_blocks[i].c();
transition_in(each_blocks[i], 1);
each_blocks[i].m(div, null);
}
}
group_outros();
for (i = each_value_4.length; i < each_blocks.length; i += 1) {
out(i);
}
check_outros();
}
},
i(local) {
if (current)
return;
for (let i = 0; i < each_value_4.length; i += 1) {
transition_in(each_blocks[i]);
}
current = true;
},
o(local) {
each_blocks = each_blocks.filter(Boolean);
for (let i = 0; i < each_blocks.length; i += 1) {
transition_out(each_blocks[i]);
}
current = false;
},
d(detaching) {
if (detaching)
detach(div);
destroy_each(each_blocks, detaching);
}
};
}
function create_each_block_4(ctx) {
let div1;
let div0;
let itemview;
let t_1;
let current;
itemview = new ItemView_default({
props: {
item: ctx[24],
plugin: ctx[0],
items: ctx[21].filter.items.items
}
});
return {
c() {
div1 = element("div");
div0 = element("div");
create_component(itemview.$$.fragment);
t_1 = space();
attr(div0, "class", "tree-item-self");
attr(div1, "class", "tree-item");
},
m(target, anchor) {
insert(target, div1, anchor);
append(div1, div0);
mount_component(itemview, div0, null);
append(div1, t_1);
current = true;
},
p(ctx2, dirty) {
const itemview_changes = {};
if (dirty & 8)
itemview_changes.item = ctx2[24];
if (dirty & 1)
itemview_changes.plugin = ctx2[0];
if (dirty & 8)
itemview_changes.items = ctx2[21].filter.items.items;
itemview.$set(itemview_changes);
},
i(local) {
if (current)
return;
transition_in(itemview.$$.fragment, local);
current = true;
},
o(local) {
transition_out(itemview.$$.fragment, local);
current = false;
},
d(detaching) {
if (detaching)
detach(div1);
destroy_component(itemview);
}
};
}
function create_each_block_3(ctx) {
let div1;
let div0;
let show_if;
let current_block_type_index;
let if_block0;
let t0;
let span;
let t1_value = ctx[21].name + "";
let t1;
let div0_class_value;
let t2;
let t3;
let current;
let mounted;
let dispose;
const if_block_creators = [create_if_block_13, create_else_block_3];
const if_blocks = [];
function select_block_type_3(ctx2, dirty) {
if (show_if == null || dirty & 10)
show_if = !!ctx2[1].contains("rss-filters-" + ctx2[21].filter.filter.name);
if (show_if)
return 0;
return 1;
}
current_block_type_index = select_block_type_3(ctx, -1);
if_block0 = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
function click_handler_2() {
return ctx[8](ctx[21]);
}
let if_block1 = ctx[21].filter !== void 0 && create_if_block_11(ctx);
return {
c() {
div1 = element("div");
div0 = element("div");
if_block0.c();
t0 = space();
span = element("span");
t1 = text(t1_value);
t2 = space();
if (if_block1)
if_block1.c();
t3 = space();
attr(div0, "class", div0_class_value = "" + ((ctx[1].contains("rss-filters-" + ctx[21].filter.filter.name) ? "is-collapsed" : "") + " tree-item-self is-clickable"));
attr(div1, "class", "tree-item-children");
},
m(target, anchor) {
insert(target, div1, anchor);
append(div1, div0);
if_blocks[current_block_type_index].m(div0, null);
append(div0, t0);
append(div0, span);
append(span, t1);
append(div1, t2);
if (if_block1)
if_block1.m(div1, null);
append(div1, t3);
current = true;
if (!mounted) {
dispose = listen(div0, "click", click_handler_2);
mounted = true;
}
},
p(new_ctx, dirty) {
ctx = new_ctx;
let previous_block_index = current_block_type_index;
current_block_type_index = select_block_type_3(ctx, dirty);
if (current_block_type_index !== previous_block_index) {
group_outros();
transition_out(if_blocks[previous_block_index], 1, 1, () => {
if_blocks[previous_block_index] = null;
});
check_outros();
if_block0 = if_blocks[current_block_type_index];
if (!if_block0) {
if_block0 = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
if_block0.c();
} else {
}
transition_in(if_block0, 1);
if_block0.m(div0, t0);
}
if ((!current || dirty & 8) && t1_value !== (t1_value = ctx[21].name + ""))
set_data(t1, t1_value);
if (!current || dirty & 10 && div0_class_value !== (div0_class_value = "" + ((ctx[1].contains("rss-filters-" + ctx[21].filter.filter.name) ? "is-collapsed" : "") + " tree-item-self is-clickable"))) {
attr(div0, "class", div0_class_value);
}
if (ctx[21].filter !== void 0) {
if (if_block1) {
if_block1.p(ctx, dirty);
if (dirty & 8) {
transition_in(if_block1, 1);
}
} else {
if_block1 = create_if_block_11(ctx);
if_block1.c();
transition_in(if_block1, 1);
if_block1.m(div1, t3);
}
} else if (if_block1) {
group_outros();
transition_out(if_block1, 1, 1, () => {
if_block1 = null;
});
check_outros();
}
},
i(local) {
if (current)
return;
transition_in(if_block0);
transition_in(if_block1);
current = true;
},
o(local) {
transition_out(if_block0);
transition_out(if_block1);
current = false;
},
d(detaching) {
if (detaching)
detach(div1);
if_blocks[current_block_type_index].d();
if (if_block1)
if_block1.d();
mounted = false;
dispose();
}
};
}
function create_each_block_2(ctx) {
let div1;
let div0;
let span1;
let show_if;
let current_block_type_index;
let if_block0;
let t0;
let span0;
let t1_value = ctx[13].name + "";
let t1;
let div0_class_value;
let t2;
let t3;
let t4;
let current;
let mounted;
let dispose;
const if_block_creators = [create_if_block_16, create_else_block_4];
const if_blocks = [];
function select_block_type_2(ctx2, dirty) {
if (show_if == null || dirty & 10)
show_if = !!ctx2[1].contains("rss-filters-" + ctx2[13].name);
if (show_if)
return 0;
return 1;
}
current_block_type_index = select_block_type_2(ctx, -1);
if_block0 = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
function click_handler_1() {
return ctx[7](ctx[13]);
}
let if_block1 = ctx[13].filter !== void 0 && create_if_block_14(ctx);
let if_block2 = ctx[13].children && create_if_block_9(ctx);
return {
c() {
div1 = element("div");
div0 = element("div");
span1 = element("span");
if_block0.c();
t0 = space();
span0 = element("span");
t1 = text(t1_value);
t2 = space();
if (if_block1)
if_block1.c();
t3 = space();
if (if_block2)
if_block2.c();
t4 = space();
attr(span1, "class", "tree-item-self is-clickable");
attr(div0, "class", div0_class_value = "" + ((ctx[1].contains("rss-filters-" + ctx[13].name) ? "is-collapsed" : "") + " tree-item is-clickable"));
attr(div1, "class", "tree-item-children");
},
m(target, anchor) {
insert(target, div1, anchor);
append(div1, div0);
append(div0, span1);
if_blocks[current_block_type_index].m(span1, null);
append(span1, t0);
append(span1, span0);
append(span0, t1);
append(div1, t2);
if (if_block1)
if_block1.m(div1, null);
append(div1, t3);
if (if_block2)
if_block2.m(div1, null);
append(div1, t4);
current = true;
if (!mounted) {
dispose = listen(div0, "click", click_handler_1);
mounted = true;
}
},
p(new_ctx, dirty) {
ctx = new_ctx;
let previous_block_index = current_block_type_index;
current_block_type_index = select_block_type_2(ctx, dirty);
if (current_block_type_index !== previous_block_index) {
group_outros();
transition_out(if_blocks[previous_block_index], 1, 1, () => {
if_blocks[previous_block_index] = null;
});
check_outros();
if_block0 = if_blocks[current_block_type_index];
if (!if_block0) {
if_block0 = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
if_block0.c();
} else {
}
transition_in(if_block0, 1);
if_block0.m(span1, t0);
}
if ((!current || dirty & 8) && t1_value !== (t1_value = ctx[13].name + ""))
set_data(t1, t1_value);
if (!current || dirty & 10 && div0_class_value !== (div0_class_value = "" + ((ctx[1].contains("rss-filters-" + ctx[13].name) ? "is-collapsed" : "") + " tree-item is-clickable"))) {
attr(div0, "class", div0_class_value);
}
if (ctx[13].filter !== void 0) {
if (if_block1) {
if_block1.p(ctx, dirty);
if (dirty & 8) {
transition_in(if_block1, 1);
}
} else {
if_block1 = create_if_block_14(ctx);
if_block1.c();
transition_in(if_block1, 1);
if_block1.m(div1, t3);
}
} else if (if_block1) {
group_outros();
transition_out(if_block1, 1, 1, () => {
if_block1 = null;
});
check_outros();
}
if (ctx[13].children) {
if (if_block2) {
if_block2.p(ctx, dirty);
if (dirty & 8) {
transition_in(if_block2, 1);
}
} else {
if_block2 = create_if_block_9(ctx);
if_block2.c();
transition_in(if_block2, 1);
if_block2.m(div1, t4);
}
} else if (if_block2) {
group_outros();
transition_out(if_block2, 1, 1, () => {
if_block2 = null;
});
check_outros();
}
},
i(local) {
if (current)
return;
transition_in(if_block0);
transition_in(if_block1);
transition_in(if_block2);
current = true;
},
o(local) {
transition_out(if_block0);
transition_out(if_block1);
transition_out(if_block2);
current = false;
},
d(detaching) {
if (detaching)
detach(div1);
if_blocks[current_block_type_index].d();
if (if_block1)
if_block1.d();
if (if_block2)
if_block2.d();
mounted = false;
dispose();
}
};
}
function create_if_block_6(ctx) {
let h1;
return {
c() {
h1 = element("h1");
h1.textContent = "No feeds configured";
},
m(target, anchor) {
insert(target, h1, anchor);
},
d(detaching) {
if (detaching)
detach(h1);
}
};
}
function create_if_block_18(ctx) {
let div1;
let div0;
let span1;
let show_if_1;
let current_block_type_index;
let if_block0;
let t0;
let span0;
let div0_class_value;
let t2;
let show_if = !ctx[1].contains("rss-folders");
let current;
let mounted;
let dispose;
const if_block_creators = [create_if_block_52, create_else_block_2];
const if_blocks = [];
function select_block_type_4(ctx2, dirty) {
if (show_if_1 == null || dirty & 2)
show_if_1 = !!ctx2[1].contains("rss-folders");
if (show_if_1)
return 0;
return 1;
}
current_block_type_index = select_block_type_4(ctx, -1);
if_block0 = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
let if_block1 = show_if && create_if_block_23(ctx);
return {
c() {
div1 = element("div");
div0 = element("div");
span1 = element("span");
if_block0.c();
t0 = space();
span0 = element("span");
span0.textContent = `${t("folders")}`;
t2 = space();
if (if_block1)
if_block1.c();
attr(span1, "class", "tree-item-self is-clickable");
attr(div0, "class", div0_class_value = "" + ((ctx[1].contains("rss-folders") ? "is-collapsed" : "") + " tree-item is-clickable"));
attr(div1, "class", "rss-feeds-folders");
},
m(target, anchor) {
insert(target, div1, anchor);
append(div1, div0);
append(div0, span1);
if_blocks[current_block_type_index].m(span1, null);
append(span1, t0);
append(span1, span0);
append(div1, t2);
if (if_block1)
if_block1.m(div1, null);
current = true;
if (!mounted) {
dispose = listen(div0, "click", ctx[9]);
mounted = true;
}
},
p(ctx2, dirty) {
let previous_block_index = current_block_type_index;
current_block_type_index = select_block_type_4(ctx2, dirty);
if (current_block_type_index !== previous_block_index) {
group_outros();
transition_out(if_blocks[previous_block_index], 1, 1, () => {
if_blocks[previous_block_index] = null;
});
check_outros();
if_block0 = if_blocks[current_block_type_index];
if (!if_block0) {
if_block0 = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx2);
if_block0.c();
} else {
}
transition_in(if_block0, 1);
if_block0.m(span1, t0);
}
if (!current || dirty & 2 && div0_class_value !== (div0_class_value = "" + ((ctx2[1].contains("rss-folders") ? "is-collapsed" : "") + " tree-item is-clickable"))) {
attr(div0, "class", div0_class_value);
}
if (dirty & 2)
show_if = !ctx2[1].contains("rss-folders");
if (show_if) {
if (if_block1) {
if_block1.p(ctx2, dirty);
if (dirty & 2) {
transition_in(if_block1, 1);
}
} else {
if_block1 = create_if_block_23(ctx2);
if_block1.c();
transition_in(if_block1, 1);
if_block1.m(div1, null);
}
} else if (if_block1) {
group_outros();
transition_out(if_block1, 1, 1, () => {
if_block1 = null;
});
check_outros();
}
},
i(local) {
if (current)
return;
transition_in(if_block0);
transition_in(if_block1);
current = true;
},
o(local) {
transition_out(if_block0);
transition_out(if_block1);
current = false;
},
d(detaching) {
if (detaching)
detach(div1);
if_blocks[current_block_type_index].d();
if (if_block1)
if_block1.d();
mounted = false;
dispose();
}
};
}
function create_else_block_2(ctx) {
let iconcomponent;
let current;
iconcomponent = new IconComponent_default({
props: { iconName: "down-chevron-glyph" }
});
return {
c() {
create_component(iconcomponent.$$.fragment);
},
m(target, anchor) {
mount_component(iconcomponent, target, anchor);
current = true;
},
i(local) {
if (current)
return;
transition_in(iconcomponent.$$.fragment, local);
current = true;
},
o(local) {
transition_out(iconcomponent.$$.fragment, local);
current = false;
},
d(detaching) {
destroy_component(iconcomponent, detaching);
}
};
}
function create_if_block_52(ctx) {
let iconcomponent;
let current;
iconcomponent = new IconComponent_default({
props: { iconName: "right-chevron-glyph" }
});
return {
c() {
create_component(iconcomponent.$$.fragment);
},
m(target, anchor) {
mount_component(iconcomponent, target, anchor);
current = true;
},
i(local) {
if (current)
return;
transition_in(iconcomponent.$$.fragment, local);
current = true;
},
o(local) {
transition_out(iconcomponent.$$.fragment, local);
current = false;
},
d(detaching) {
destroy_component(iconcomponent, detaching);
}
};
}
function create_if_block_23(ctx) {
let div;
let current;
let each_value = Object.keys(ctx[2]);
let each_blocks = [];
for (let i = 0; i < each_value.length; i += 1) {
each_blocks[i] = create_each_block3(get_each_context3(ctx, each_value, i));
}
const out = (i) => transition_out(each_blocks[i], 1, 1, () => {
each_blocks[i] = null;
});
return {
c() {
div = element("div");
for (let i = 0; i < each_blocks.length; i += 1) {
each_blocks[i].c();
}
attr(div, "class", "tree-item-children");
},
m(target, anchor) {
insert(target, div, anchor);
for (let i = 0; i < each_blocks.length; i += 1) {
each_blocks[i].m(div, null);
}
current = true;
},
p(ctx2, dirty) {
if (dirty & 55) {
each_value = Object.keys(ctx2[2]);
let i;
for (i = 0; i < each_value.length; i += 1) {
const child_ctx = get_each_context3(ctx2, each_value, i);
if (each_blocks[i]) {
each_blocks[i].p(child_ctx, dirty);
transition_in(each_blocks[i], 1);
} else {
each_blocks[i] = create_each_block3(child_ctx);
each_blocks[i].c();
transition_in(each_blocks[i], 1);
each_blocks[i].m(div, null);
}
}
group_outros();
for (i = each_value.length; i < each_blocks.length; i += 1) {
out(i);
}
check_outros();
}
},
i(local) {
if (current)
return;
for (let i = 0; i < each_value.length; i += 1) {
transition_in(each_blocks[i]);
}
current = true;
},
o(local) {
each_blocks = each_blocks.filter(Boolean);
for (let i = 0; i < each_blocks.length; i += 1) {
transition_out(each_blocks[i]);
}
current = false;
},
d(detaching) {
if (detaching)
detach(div);
destroy_each(each_blocks, detaching);
}
};
}
function create_else_block_12(ctx) {
let iconcomponent;
let current;
iconcomponent = new IconComponent_default({
props: { iconName: "down-chevron-glyph" }
});
return {
c() {
create_component(iconcomponent.$$.fragment);
},
m(target, anchor) {
mount_component(iconcomponent, target, anchor);
current = true;
},
i(local) {
if (current)
return;
transition_in(iconcomponent.$$.fragment, local);
current = true;
},
o(local) {
transition_out(iconcomponent.$$.fragment, local);
current = false;
},
d(detaching) {
destroy_component(iconcomponent, detaching);
}
};
}
function create_if_block_42(ctx) {
let iconcomponent;
let current;
iconcomponent = new IconComponent_default({
props: { iconName: "right-chevron-glyph" }
});
return {
c() {
create_component(iconcomponent.$$.fragment);
},
m(target, anchor) {
mount_component(iconcomponent, target, anchor);
current = true;
},
i(local) {
if (current)
return;
transition_in(iconcomponent.$$.fragment, local);
current = true;
},
o(local) {
transition_out(iconcomponent.$$.fragment, local);
current = false;
},
d(detaching) {
destroy_component(iconcomponent, detaching);
}
};
}
function create_if_block_33(ctx) {
let each_1_anchor;
let current;
let each_value_1 = ctx[2][ctx[13]];
let each_blocks = [];
for (let i = 0; i < each_value_1.length; i += 1) {
each_blocks[i] = create_each_block_1(get_each_context_1(ctx, each_value_1, i));
}
const out = (i) => transition_out(each_blocks[i], 1, 1, () => {
each_blocks[i] = null;
});
return {
c() {
for (let i = 0; i < each_blocks.length; i += 1) {
each_blocks[i].c();
}
each_1_anchor = empty();
},
m(target, anchor) {
for (let i = 0; i < each_blocks.length; i += 1) {
each_blocks[i].m(target, anchor);
}
insert(target, each_1_anchor, anchor);
current = true;
},
p(ctx2, dirty) {
if (dirty & 5) {
each_value_1 = ctx2[2][ctx2[13]];
let i;
for (i = 0; i < each_value_1.length; i += 1) {
const child_ctx = get_each_context_1(ctx2, each_value_1, i);
if (each_blocks[i]) {
each_blocks[i].p(child_ctx, dirty);
transition_in(each_blocks[i], 1);
} else {
each_blocks[i] = create_each_block_1(child_ctx);
each_blocks[i].c();
transition_in(each_blocks[i], 1);
each_blocks[i].m(each_1_anchor.parentNode, each_1_anchor);
}
}
group_outros();
for (i = each_value_1.length; i < each_blocks.length; i += 1) {
out(i);
}
check_outros();
}
},
i(local) {
if (current)
return;
for (let i = 0; i < each_value_1.length; i += 1) {
transition_in(each_blocks[i]);
}
current = true;
},
o(local) {
each_blocks = each_blocks.filter(Boolean);
for (let i = 0; i < each_blocks.length; i += 1) {
transition_out(each_blocks[i]);
}
current = false;
},
d(detaching) {
destroy_each(each_blocks, detaching);
if (detaching)
detach(each_1_anchor);
}
};
}
function create_each_block_1(ctx) {
let feedview;
let current;
feedview = new FeedView_default({
props: {
feed: ctx[16],
plugin: ctx[0]
}
});
return {
c() {
create_component(feedview.$$.fragment);
},
m(target, anchor) {
mount_component(feedview, target, anchor);
current = true;
},
p(ctx2, dirty) {
const feedview_changes = {};
if (dirty & 4)
feedview_changes.feed = ctx2[16];
if (dirty & 1)
feedview_changes.plugin = ctx2[0];
feedview.$set(feedview_changes);
},
i(local) {
if (current)
return;
transition_in(feedview.$$.fragment, local);
current = true;
},
o(local) {
transition_out(feedview.$$.fragment, local);
current = false;
},
d(detaching) {
destroy_component(feedview, detaching);
}
};
}
function create_each_block3(ctx) {
let div1;
let span1;
let show_if_1;
let current_block_type_index;
let if_block0;
let t0;
let span0;
let t1_value = (ctx[13] ? ctx[13] : t("no_folder")) + "";
let t1;
let span1_class_value;
let t2;
let div0;
let show_if = !ctx[1].contains(ctx[13]);
let t3;
let current;
let mounted;
let dispose;
const if_block_creators = [create_if_block_42, create_else_block_12];
const if_blocks = [];
function select_block_type_5(ctx2, dirty) {
if (show_if_1 == null || dirty & 6)
show_if_1 = !!ctx2[1].contains(ctx2[13]);
if (show_if_1)
return 0;
return 1;
}
current_block_type_index = select_block_type_5(ctx, -1);
if_block0 = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
function click_handler_4() {
return ctx[10](ctx[13]);
}
function contextmenu_handler(...args) {
return ctx[11](ctx[13], ...args);
}
let if_block1 = show_if && create_if_block_33(ctx);
return {
c() {
div1 = element("div");
span1 = element("span");
if_block0.c();
t0 = space();
span0 = element("span");
t1 = text(t1_value);
t2 = space();
div0 = element("div");
if (if_block1)
if_block1.c();
t3 = space();
attr(span1, "class", span1_class_value = "" + ((ctx[1].contains(ctx[13]) ? "is-collapsed" : "") + " tree-item-self is-clickable"));
attr(div0, "class", "tree-item-children");
attr(div1, "class", "rss-folder tree-item");
},
m(target, anchor) {
insert(target, div1, anchor);
append(div1, span1);
if_blocks[current_block_type_index].m(span1, null);
append(span1, t0);
append(span1, span0);
append(span0, t1);
append(div1, t2);
append(div1, div0);
if (if_block1)
if_block1.m(div0, null);
append(div1, t3);
current = true;
if (!mounted) {
dispose = [
listen(span1, "click", click_handler_4),
listen(span1, "contextmenu", contextmenu_handler)
];
mounted = true;
}
},
p(new_ctx, dirty) {
ctx = new_ctx;
let previous_block_index = current_block_type_index;
current_block_type_index = select_block_type_5(ctx, dirty);
if (current_block_type_index !== previous_block_index) {
group_outros();
transition_out(if_blocks[previous_block_index], 1, 1, () => {
if_blocks[previous_block_index] = null;
});
check_outros();
if_block0 = if_blocks[current_block_type_index];
if (!if_block0) {
if_block0 = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
if_block0.c();
} else {
}
transition_in(if_block0, 1);
if_block0.m(span1, t0);
}
if ((!current || dirty & 4) && t1_value !== (t1_value = (ctx[13] ? ctx[13] : t("no_folder")) + ""))
set_data(t1, t1_value);
if (!current || dirty & 6 && span1_class_value !== (span1_class_value = "" + ((ctx[1].contains(ctx[13]) ? "is-collapsed" : "") + " tree-item-self is-clickable"))) {
attr(span1, "class", span1_class_value);
}
if (dirty & 6)
show_if = !ctx[1].contains(ctx[13]);
if (show_if) {
if (if_block1) {
if_block1.p(ctx, dirty);
if (dirty & 6) {
transition_in(if_block1, 1);
}
} else {
if_block1 = create_if_block_33(ctx);
if_block1.c();
transition_in(if_block1, 1);
if_block1.m(div0, null);
}
} else if (if_block1) {
group_outros();
transition_out(if_block1, 1, 1, () => {
if_block1 = null;
});
check_outros();
}
},
i(local) {
if (current)
return;
transition_in(if_block0);
transition_in(if_block1);
current = true;
},
o(local) {
transition_out(if_block0);
transition_out(if_block1);
current = false;
},
d(detaching) {
if (detaching)
detach(div1);
if_blocks[current_block_type_index].d();
if (if_block1)
if_block1.d();
mounted = false;
run_all(dispose);
}
};
}
function create_fragment5(ctx) {
let current_block_type_index;
let if_block;
let if_block_anchor;
let current;
const if_block_creators = [create_if_block5, create_else_block2];
const if_blocks = [];
function select_block_type(ctx2, dirty) {
if (!ctx2[1])
return 0;
return 1;
}
current_block_type_index = select_block_type(ctx, -1);
if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
return {
c() {
if_block.c();
if_block_anchor = empty();
},
m(target, anchor) {
if_blocks[current_block_type_index].m(target, anchor);
insert(target, if_block_anchor, anchor);
current = true;
},
p(ctx2, [dirty]) {
let previous_block_index = current_block_type_index;
current_block_type_index = select_block_type(ctx2, dirty);
if (current_block_type_index === previous_block_index) {
if_blocks[current_block_type_index].p(ctx2, dirty);
} else {
group_outros();
transition_out(if_blocks[previous_block_index], 1, 1, () => {
if_blocks[previous_block_index] = null;
});
check_outros();
if_block = if_blocks[current_block_type_index];
if (!if_block) {
if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx2);
if_block.c();
} else {
if_block.p(ctx2, dirty);
}
transition_in(if_block, 1);
if_block.m(if_block_anchor.parentNode, if_block_anchor);
}
},
i(local) {
if (current)
return;
transition_in(if_block);
current = true;
},
o(local) {
transition_out(if_block);
current = false;
},
d(detaching) {
if_blocks[current_block_type_index].d(detaching);
if (detaching)
detach(if_block_anchor);
}
};
}
function buildTreeStructure(filteredContent) {
let result = [];
let level = { result };
filteredContent.forEach((filter) => {
filter.filter.name.split("/").reduce((r, name, i, a) => {
if (!r[name]) {
r[name] = { result: [] };
if (filter.filter.name.endsWith(name)) {
r.result.push({ name, children: r[name].result, filter });
} else {
r.result.push({ name, children: r[name].result });
}
}
return r[name];
}, level);
});
return result;
}
function instance5($$self, $$props, $$invalidate) {
let $sortedFeedsStore;
let $filteredItemsStore;
component_subscribe($$self, sortedFeedsStore, ($$value) => $$invalidate(2, $sortedFeedsStore = $$value));
component_subscribe($$self, filteredItemsStore, ($$value) => $$invalidate(3, $filteredItemsStore = $$value));
let { plugin } = $$props;
let folded = [];
foldedState.subscribe((value) => {
$$invalidate(1, folded = value);
});
function toggleFold(folder) {
if (!folded) {
$$invalidate(1, folded = []);
}
if (folded.contains(folder)) {
folded.remove(folder);
} else
folded.push(folder);
plugin.writeFolded(folded);
}
function openMenuForFolder(e, folder) {
return __awaiter(this, void 0, void 0, function* () {
const items = [];
for (const feed of $sortedFeedsStore[folder]) {
for (let item of feed.items) {
items.push(item);
}
}
yield openMenu(e, items);
});
}
function openMenu(e, feedItems) {
return __awaiter(this, void 0, void 0, function* () {
const menu = new import_obsidian13.Menu(plugin.app);
menu.addItem((menuItem) => {
menuItem.setIcon("create-new").setTitle(t("create_all")).onClick(() => __awaiter(this, void 0, void 0, function* () {
for (const item of feedItems) {
yield Action.CREATE_NOTE.processor(plugin, item);
}
}));
});
menu.addItem((menuItem) => {
menuItem.setIcon("feather-eye").setTitle(t("mark_all_as_read")).onClick(() => __awaiter(this, void 0, void 0, function* () {
for (const item of feedItems) {
item.read = true;
}
const items = plugin.settings.items;
yield plugin.writeFeedContent(() => {
return items;
});
}));
});
menu.showAtPosition({ x: e.x, y: e.y });
});
}
const click_handler = () => toggleFold("rss-filters");
const click_handler_1 = (folder) => toggleFold("rss-filters-" + folder.name);
const click_handler_2 = (child) => toggleFold("rss-filters-" + child.filter.filter.name);
const click_handler_3 = () => toggleFold("rss-folders");
const click_handler_4 = (folder) => toggleFold(folder);
const contextmenu_handler = (folder, e) => openMenuForFolder(e, folder);
$$self.$$set = ($$props2) => {
if ("plugin" in $$props2)
$$invalidate(0, plugin = $$props2.plugin);
};
return [
plugin,
folded,
$sortedFeedsStore,
$filteredItemsStore,
toggleFold,
openMenuForFolder,
click_handler,
click_handler_1,
click_handler_2,
click_handler_3,
click_handler_4,
contextmenu_handler
];
}
var FolderView = class extends SvelteComponent {
constructor(options) {
super();
init(this, options, instance5, create_fragment5, safe_not_equal, { plugin: 0 });
}
};
var FolderView_default = FolderView;
// src/view/ViewLoader.ts
var ViewLoader = class extends import_obsidian14.ItemView {
constructor(leaf, plugin) {
super(leaf);
this.plugin = plugin;
}
getDisplayText() {
return t("RSS_Feeds");
}
getViewType() {
return VIEW_ID;
}
getIcon() {
return "feather-rss";
}
onOpen() {
return __async(this, null, function* () {
this.feed = new FolderView_default({
target: this.contentEl,
props: {
plugin: this.plugin
}
});
});
}
onClose() {
if (this.feed) {
this.feed.$destroy();
}
return Promise.resolve();
}
};
// src/main.ts
var import_lodash6 = __toModule(require_lodash());
var import_lodash7 = __toModule(require_lodash2());
var import_lodash8 = __toModule(require_lodash3());
var import_lodash9 = __toModule(require_lodash4());
// src/modals/FilteredFolderModal.ts
var import_obsidian15 = __toModule(require("obsidian"));
var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
SortOrder2[SortOrder2["DATE_NEWEST"] = 0] = "DATE_NEWEST";
SortOrder2[SortOrder2["DATE_OLDEST"] = 1] = "DATE_OLDEST";
SortOrder2[SortOrder2["ALPHABET_NORMAL"] = 2] = "ALPHABET_NORMAL";
SortOrder2[SortOrder2["ALPHABET_INVERTED"] = 3] = "ALPHABET_INVERTED";
return SortOrder2;
})(SortOrder || {});
var FilteredFolderModal = class extends BaseModal {
constructor(plugin, folder) {
super(plugin.app);
this.filterFolders = [];
this.filterTags = [];
this.filterFeeds = [];
this.saved = false;
this.plugin = plugin;
if (folder) {
this.name = folder.name;
this.sortOrder = folder.sortOrder;
this.filterTags = folder.filterTags;
this.filterFolders = folder.filterFolders;
this.filterFeeds = folder.filterFeeds;
this.read = folder.read;
this.unread = folder.unread;
this.favorites = folder.favorites;
}
}
display() {
return __async(this, null, function* () {
const { contentEl } = this;
contentEl.empty();
let nameText;
const name = new import_obsidian15.Setting(contentEl).setName(t("name")).setDesc(t("filter_name_help")).addText((text2) => {
nameText = text2;
text2.setValue(this.name).onChange((value) => {
this.removeValidationError(text2);
this.name = value;
});
});
name.controlEl.addClass("rss-setting-input");
new import_obsidian15.Setting(contentEl).setName(t("only_favorites")).addToggle((toggle) => {
toggle.setValue(this.favorites).onChange((value) => {
this.favorites = value;
});
});
new import_obsidian15.Setting(contentEl).setName(t("show_read")).addToggle((toggle) => {
toggle.setValue(this.read).onChange((value) => {
this.read = value;
});
});
new import_obsidian15.Setting(contentEl).setName(t("show_unread")).addToggle((toggle) => {
toggle.setValue(this.unread).onChange((value) => {
this.unread = value;
});
});
const sorting = new import_obsidian15.Setting(contentEl).setName(t("sort")).addDropdown((dropdown) => {
for (const order2 in SortOrder) {
if (order2.length > 1) {
dropdown.addOption(order2, t("sort_" + order2.toLowerCase()));
}
}
dropdown.setValue(this.sortOrder).onChange((value) => __async(this, null, function* () {
this.sortOrder = value;
}));
});
sorting.controlEl.addClass("rss-setting-input");
const foldersDiv = contentEl.createDiv("folders");
foldersDiv.createEl("h2", { text: t("folders") });
foldersDiv.createEl("p", { text: t("filter_folder_help") });
for (const folder in this.filterFolders) {
new import_obsidian15.Setting(foldersDiv).addSearch((search) => __async(this, null, function* () {
new ArraySuggest(this.app, search.inputEl, get_store_value(folderStore));
search.setValue(this.filterFolders[folder]).onChange((value) => __async(this, null, function* () {
this.removeValidationError(search);
this.filterFolders = this.filterFolders.filter((e) => e !== this.filterFolders[folder]);
this.filterFolders.push(value);
}));
})).addExtraButton((button) => {
button.setTooltip(t("delete")).setIcon("feather-trash").onClick(() => {
this.filterFolders = this.filterFolders.filter((e) => e !== this.filterFolders[folder]);
this.display();
});
});
}
let folderValue = "";
const newFolder = new import_obsidian15.Setting(foldersDiv).addSearch((search) => __async(this, null, function* () {
new ArraySuggest(this.app, search.inputEl, get_store_value(folderStore));
search.onChange((value) => __async(this, null, function* () {
folderValue = value;
}));
})).addExtraButton((button) => {
button.setTooltip(t("add")).setIcon("feather-plus").onClick(() => {
this.filterFolders.push(folderValue);
this.display();
});
});
newFolder.controlEl.addClass("rss-setting-input");
const feedsDiv = contentEl.createDiv("feeds");
feedsDiv.createEl("h2", { text: t("feeds") });
feedsDiv.createEl("p", { text: t("filter_feed_help") });
const feeds = this.plugin.settings.feeds.filter((feed) => {
if (this.filterFolders.length === 0)
return true;
return this.filterFolders.contains(feed.folder);
}).map((feed) => feed.name);
for (const feed in this.filterFeeds) {
new import_obsidian15.Setting(feedsDiv).addSearch((search) => __async(this, null, function* () {
new ArraySuggest(this.app, search.inputEl, new Set(feeds));
search.setValue(this.filterFeeds[feed]).onChange((value) => __async(this, null, function* () {
this.removeValidationError(search);
this.filterFeeds = this.filterFeeds.filter((e) => e !== this.filterFeeds[feed]);
this.filterFeeds.push(value);
}));
})).addExtraButton((button) => {
button.setTooltip(t("delete")).setIcon("feather-trash").onClick(() => {
this.filterFeeds = this.filterFeeds.filter((e) => e !== this.filterFeeds[feed]);
this.display();
});
});
}
let feedValue = "";
const newFeed = new import_obsidian15.Setting(feedsDiv).addSearch((search) => __async(this, null, function* () {
new ArraySuggest(this.app, search.inputEl, new Set(feeds));
search.onChange((value) => __async(this, null, function* () {
feedValue = value;
}));
})).addExtraButton((button) => {
button.setTooltip(t("add")).setIcon("feather-plus").onClick(() => {
this.filterFeeds.push(feedValue);
this.display();
});
});
newFeed.controlEl.addClass("rss-setting-input");
const tagDiv = contentEl.createDiv("tags");
tagDiv.createEl("h2", { text: t("tags") });
tagDiv.createEl("p", { text: t("filter_tags_help") });
for (const tag in this.filterTags) {
new import_obsidian15.Setting(tagDiv).addSearch((search) => __async(this, null, function* () {
new ArraySuggest(this.app, search.inputEl, get_store_value(tagsStore));
search.setValue(this.filterTags[tag]).onChange((value) => __async(this, null, function* () {
this.removeValidationError(search);
if (!value.match(TAG_REGEX) || value.match(NUMBER_REGEX) || value.contains(" ") || value.contains("#")) {
this.setValidationError(search, t("invalid_tag"));
return;
}
this.filterTags = this.filterTags.filter((e) => e !== this.filterTags[tag]);
this.filterTags.push(value);
}));
})).addExtraButton((button) => {
button.setTooltip(t("delete")).setIcon("feather-trash").onClick(() => {
this.filterTags = this.filterTags.filter((e) => e !== this.filterTags[tag]);
this.display();
});
});
}
let tagValue = "";
let tagComponent;
const newTag = new import_obsidian15.Setting(tagDiv).addSearch((search) => __async(this, null, function* () {
tagComponent = search;
new ArraySuggest(this.app, search.inputEl, get_store_value(tagsStore));
search.onChange((value) => __async(this, null, function* () {
if (!value.match(TAG_REGEX) || value.match(NUMBER_REGEX) || value.contains(" ") || value.contains("#")) {
this.setValidationError(search, t("invalid_tag"));
return;
}
tagValue = value;
}));
})).addExtraButton((button) => {
button.setTooltip(t("add")).setIcon("feather-plus").onClick(() => {
if (!tagValue.match(TAG_REGEX) || tagValue.match(NUMBER_REGEX) || tagValue.contains(" ") || tagValue.contains("#")) {
this.setValidationError(tagComponent, t("invalid_tag"));
return;
}
this.filterTags.push(tagValue);
this.display();
});
});
newTag.controlEl.addClass("rss-setting-input");
const footerEl = contentEl.createDiv();
const footerButtons = new import_obsidian15.Setting(footerEl);
footerButtons.addButton((b) => {
b.setTooltip(t("save")).setIcon("checkmark").onClick(() => __async(this, null, function* () {
let error = false;
if (!nameText.getValue().length) {
this.setValidationError(nameText, t("invalid_name"));
error = true;
}
if (error) {
new import_obsidian15.Notice(t("fix_errors"));
return;
}
this.saved = true;
this.close();
}));
return b;
});
footerButtons.addExtraButton((b) => {
b.setIcon("cross").setTooltip(t("cancel")).onClick(() => {
this.saved = false;
this.close();
});
return b;
});
});
}
onOpen() {
return __async(this, null, function* () {
yield this.display();
});
}
};
// src/main.ts
var import_ts_md53 = __toModule(require_md5());
// src/settings/SettingsTab.ts
var import_obsidian23 = __toModule(require("obsidian"));
// src/settings/FolderSuggestor.ts
var import_obsidian16 = __toModule(require("obsidian"));
var FolderSuggest = class extends TextInputSuggest {
getSuggestions(inputStr) {
const abstractFiles = this.app.vault.getAllLoadedFiles();
const folders = [];
const lowerCaseInputStr = inputStr.toLowerCase();
abstractFiles.forEach((folder) => {
if (folder instanceof import_obsidian16.TFolder && folder.path.toLowerCase().contains(lowerCaseInputStr)) {
folders.push(folder);
}
});
return folders;
}
renderSuggestion(file, el) {
el.setText(file.path);
}
selectSuggestion(file) {
this.inputEl.value = file.path;
this.inputEl.trigger("input");
this.close();
}
};
// src/settings/FeedSettings.ts
var import_lodash4 = __toModule(require_lodash5());
var import_lodash5 = __toModule(require_lodash());
var import_obsidian21 = __toModule(require("obsidian"));
// src/modals/FeedModal.ts
var import_obsidian17 = __toModule(require("obsidian"));
// src/view/FeedFolderSuggest.ts
var FeedFolderSuggest = class extends TextInputSuggest {
getSuggestions(inputStr) {
const folders = get_store_value(folderStore);
const lowerCaseInputStr = inputStr.toLowerCase();
return [...folders].filter((folder) => folder.contains(lowerCaseInputStr));
}
renderSuggestion(folder, el) {
el.setText(folder);
}
selectSuggestion(folder) {
this.inputEl.value = folder;
this.inputEl.trigger("input");
this.close();
}
};
// src/modals/FeedModal.ts
var FeedModal = class extends BaseModal {
constructor(plugin, feed) {
super(plugin.app);
this.saved = false;
if (feed) {
this.name = feed.name;
this.url = feed.url;
this.folder = feed.folder;
}
}
display() {
return __async(this, null, function* () {
const { contentEl } = this;
contentEl.empty();
let nameText;
const name = new import_obsidian17.Setting(contentEl).setName(t("name")).setDesc(t("name_help")).addText((text2) => {
nameText = text2;
text2.setValue(this.name).onChange((value) => {
this.removeValidationError(text2);
this.name = value;
});
});
name.controlEl.addClass("rss-setting-input");
let urlText;
const url = new import_obsidian17.Setting(contentEl).setName("URL").setDesc(t("url_help")).addText((text2) => {
urlText = text2;
text2.setValue(this.url).onChange((value) => __async(this, null, function* () {
this.removeValidationError(text2);
this.url = value;
}));
});
url.controlEl.addClass("rss-setting-input");
new import_obsidian17.Setting(contentEl).setName(t("folder")).setDesc(t("folder_help")).addSearch((search) => __async(this, null, function* () {
new FeedFolderSuggest(this.app, search.inputEl);
search.setValue(this.folder).setPlaceholder(t("no_folder")).onChange((value) => __async(this, null, function* () {
this.folder = value;
}));
}));
const footerEl = contentEl.createDiv();
const footerButtons = new import_obsidian17.Setting(footerEl);
footerButtons.addButton((b) => {
b.setTooltip(t("save")).setIcon("checkmark").onClick(() => __async(this, null, function* () {
let error = false;
if (!nameText.getValue().length) {
this.setValidationError(nameText, t("invalid_name"));
error = true;
}
if (!urlText.getValue().length) {
this.setValidationError(urlText, t("invalid_url"));
error = true;
}
if (!isValidHttpUrl(urlText.getValue())) {
this.setValidationError(urlText, t("invalid_url"));
error = true;
} else {
const items = yield getFeedItems({ name: "test", url: urlText.getValue(), folder: "" });
if (items.items.length == 0) {
this.setValidationError(urlText, t("invalid_feed"));
error = true;
}
}
if (error) {
new import_obsidian17.Notice(t("fix_errors"));
return;
}
this.saved = true;
this.close();
}));
return b;
});
footerButtons.addExtraButton((b) => {
b.setIcon("cross").setTooltip(t("cancel")).onClick(() => {
this.saved = false;
this.close();
});
return b;
});
});
}
onOpen() {
return __async(this, null, function* () {
yield this.display();
});
}
};
// src/modals/ImportModal.ts
var import_obsidian18 = __toModule(require("obsidian"));
// src/parser/opmlParser.ts
function loadFeedsFromString(importData) {
return __async(this, null, function* () {
const rawData = new window.DOMParser().parseFromString(importData, "text/xml");
const feeds = [];
const outlines = rawData.getElementsByTagName("outline");
for (let i = 0, max2 = outlines.length; i < max2; i++) {
const current = outlines[i];
if (!current.hasChildNodes()) {
const title = current.getAttribute("title");
const xmlUrl = current.getAttribute("xmlUrl");
if (current.parentElement.hasAttribute("title")) {
feeds.push({
name: title,
url: xmlUrl,
folder: current.parentElement.getAttribute("title")
});
} else {
feeds.push({
name: title,
url: xmlUrl,
folder: ""
});
}
}
}
return feeds;
});
}
// src/modals/ImportModal.ts
var ImportModal = class extends import_obsidian18.Modal {
constructor(plugin) {
super(plugin.app);
this.importData = "";
this.plugin = plugin;
}
onOpen() {
return __async(this, null, function* () {
const setting = new import_obsidian18.Setting(this.contentEl).setName(t("choose_file")).setDesc(t("choose_file_help"));
const input = setting.controlEl.createEl("input", {
attr: {
type: "file",
accept: ".xml,.opml"
}
});
input.onchange = () => __async(this, null, function* () {
const { files } = input;
if (!files.length)
return;
for (const id in files) {
const file = files[id];
const reader = new FileReader();
reader.onload = () => {
this.importData = reader.result;
};
reader.readAsText(file);
}
});
new import_obsidian18.Setting(this.contentEl).addButton((button) => {
button.setIcon("import-glyph").setTooltip(t("import")).onClick(() => __async(this, null, function* () {
if (this.importData) {
const feeds = yield loadFeedsFromString(this.importData);
yield this.plugin.writeFeeds(() => this.plugin.settings.feeds.concat(feeds));
new import_obsidian18.Notice(t("imported_x_feeds", String(feeds.length)));
this.close();
} else {
new import_obsidian18.Notice(t("fix_errors"));
}
}));
}).addExtraButton((button) => {
button.setIcon("cross").setTooltip(t("cancel")).onClick(() => {
this.close();
});
});
});
}
};
// src/settings/FeedSettings.ts
var import_ts_md52 = __toModule(require_md5());
// src/modals/CleanupModal.ts
var import_obsidian19 = __toModule(require("obsidian"));
var import_lodash = __toModule(require_lodash5());
var import_lodash2 = __toModule(require_lodash());
var CleanupModal = class extends BaseModal {
constructor(plugin) {
super(plugin.app);
this.tag = "";
this.feed = "all-option-id";
this.plugin = plugin;
}
onOpen() {
return __async(this, null, function* () {
const { contentEl } = this;
contentEl.empty();
contentEl.createEl("h1", { text: t("cleanup") });
contentEl.createEl("p", { text: t("cleanup_help") });
contentEl.createEl("p", { text: t("cleanup_help2") });
new import_obsidian19.Setting(contentEl).setName(t("unread")).addToggle((toggle) => {
toggle.onChange((value) => {
this.unread = value;
});
});
new import_obsidian19.Setting(contentEl).setName(t("read")).addToggle((toggle) => {
toggle.onChange((value) => {
this.read = value;
});
});
new import_obsidian19.Setting(contentEl).setName(t("favorite")).addToggle((toggle) => {
toggle.onChange((value) => {
this.favorite = value;
});
});
new import_obsidian19.Setting(contentEl).setName(t("tag")).addSearch((search) => {
const tags = [];
for (const feed of this.plugin.settings.items) {
for (const item of feed.items) {
if (item !== void 0)
tags.push(...item.tags);
}
}
new ArraySuggest(this.app, search.inputEl, new Set(tags));
search.onChange((value) => __async(this, null, function* () {
this.tag = value;
}));
});
let older_than_setting;
new import_obsidian19.Setting(contentEl).setName(t("older_than")).setDesc(t("older_than_help")).addText((text2) => {
older_than_setting = text2;
text2.setPlaceholder("5").onChange((value) => {
this.removeValidationError(text2);
if (Number(value)) {
this.older_than = Number(value);
}
});
}).controlEl.addClass("rss-setting-input");
older_than_setting.inputEl.setAttr("onkeypress", "return event.charCode >= 48 && event.charCode <= 57");
new import_obsidian19.Setting(contentEl).setName(t("from_feed")).addDropdown((dropdown) => {
dropdown.addOption("all-option-id", t("all"));
const sorted = (0, import_lodash.default)((0, import_lodash2.default)(this.plugin.settings.feeds, "folder"), function(o) {
return o[0].folder;
});
for (const [, feeds] of Object.entries(sorted)) {
for (const id in feeds) {
const feed = feeds[id];
dropdown.addOption(feed.folder + "-" + feed.name, feed.folder + " - " + feed.name);
}
dropdown.setValue(this.feed);
}
dropdown.onChange((value) => {
this.feed = value;
});
});
const details = contentEl.createEl("details");
const summary = details.createEl("summary");
summary.setText(t("advanced"));
const advanced = details.createDiv("advanced");
new import_obsidian19.Setting(advanced).setName(t("remove_wrong_feed")).setDesc(t("remove_wrong_feed_help")).addToggle((toggle) => {
toggle.onChange((value) => {
this.wrong_feed = value;
});
});
new import_obsidian19.Setting(contentEl).addButton((button) => {
button.setIcon("feather-trash").setTooltip(t("perform_cleanup")).onClick(() => __async(this, null, function* () {
let items = this.plugin.settings.items;
let date = (0, import_obsidian19.moment)();
if (this.older_than) {
date = (0, import_obsidian19.moment)().subtract(this.older_than, "days");
}
let count = 0;
const itemsCount = items.reduce((count2, current) => count2 + current.items.length, 0);
const notice = new import_obsidian19.Notice(t("scanning_items", "0", itemsCount.toString()));
for (const feed of items) {
for (const item of feed.items) {
if (item !== void 0) {
let toRemove = 0;
if (item.pubDate === void 0 || (0, import_obsidian19.moment)(item.pubDate).isBefore(date)) {
if (this.feed === "all-option-id" || this.feed === item.folder + "-" + item.feed) {
if (this.read && item.read || !this.read && !item.read || this.read && !item.read) {
toRemove++;
}
if (this.unread && !item.read || !this.unread && item.read) {
toRemove++;
}
if (this.favorite && item.favorite || !this.favorite && !item.favorite || this.favorite && !item.favorite) {
toRemove++;
}
if (this.tag === "" || item.tags.includes(this.tag)) {
toRemove++;
}
}
}
if (toRemove == 4) {
feed.items = feed.items.filter((value) => value.hash !== item.hash);
}
}
count++;
notice.setMessage(t("scanning_items", count.toString(), itemsCount.toString()));
}
}
if (this.wrong_feed) {
console.log("removing invalid feeds");
const feeds = this.plugin.settings.feeds.map((feed) => {
return feed.name;
});
items = items.filter((item) => {
return feeds.includes(item.name);
});
const folders = get_store_value(folderStore);
items = items.filter((item) => {
return folders.has(item.folder);
});
items.forEach((feed) => {
feed.items = feed.items.filter((item) => {
return feed.name === item.feed && feed.folder === item.folder;
});
});
}
yield this.plugin.writeFeedContent(() => {
return items;
});
this.close();
}));
}).addExtraButton((button) => {
button.setIcon("cross").setTooltip(t("cancel")).onClick(() => {
this.close();
});
});
});
}
};
// src/parser/opmlExport.ts
var import_lodash3 = __toModule(require_lodash());
function generateOPML(feeds) {
const doc = document.implementation.createDocument("", "opml");
const head = doc.createElement("head");
const title = doc.createElement("title");
head.appendChild(title);
title.setText("Obsidian RSS Export");
doc.documentElement.appendChild(head);
const body = doc.createElement("body");
doc.documentElement.appendChild(body);
const sorted = (0, import_lodash3.default)(feeds, "folder");
for (const id of Object.keys(sorted)) {
const folder = sorted[id];
const outline = doc.createElement("outline");
body.appendChild(outline);
outline.setAttribute("title", folder[0].folder);
for (const feed of folder) {
const exportFeed = doc.createElement("outline");
exportFeed.setAttribute("title", feed.name);
exportFeed.setAttribute("xmlUrl", feed.url);
outline.append(exportFeed);
}
}
return new XMLSerializer().serializeToString(doc.documentElement);
}
// src/modals/MessageModal.ts
var import_obsidian20 = __toModule(require("obsidian"));
var MessageModal = class extends import_obsidian20.Modal {
constructor(plugin, message) {
super(plugin.app);
this.message = message;
}
onOpen() {
this.display();
}
display() {
const { contentEl } = this;
contentEl.empty();
contentEl.createEl("h1", { text: this.message });
contentEl.createEl("p", { text: t("do_not_close") });
}
setMessage(message) {
this.message = message;
this.display();
}
};
// src/settings/FeedSettings.ts
function displayFeedSettings(plugin, container) {
container.empty();
container.createEl("h3", { text: t("feeds") });
new import_obsidian21.Setting(container).setName(t("add_new")).setDesc(t("add_new_feed")).addButton((button) => {
return button.setTooltip(t("add_new_feed")).setIcon("feather-plus").onClick(() => __async(this, null, function* () {
const modal = new FeedModal(plugin);
modal.onClose = () => __async(this, null, function* () {
if (modal.saved) {
if (plugin.settings.feeds.some((item) => item.url === modal.url)) {
new import_obsidian21.Notice(t("feed_already_configured"));
return;
}
yield plugin.writeFeeds(() => plugin.settings.feeds.concat({
name: modal.name,
url: modal.url,
folder: modal.folder
}));
displayFeedSettings(plugin, container);
}
});
modal.open();
}));
}).addExtraButton((button) => __async(this, null, function* () {
button.setTooltip(t("import_opml")).setIcon("feather-download").onClick(() => {
const modal = new ImportModal(plugin);
modal.onClose = () => {
displayFeedSettings(plugin, container);
};
modal.open();
});
})).addExtraButton((button) => __async(this, null, function* () {
button.setTooltip(t("export_opml")).setIcon("feather-upload").onClick(() => {
if (plugin.app.vault.adapter.exists("rss-feeds-export.opml")) {
plugin.app.vault.adapter.remove("rss-feeds-export.opml");
}
plugin.app.vault.create("rss-feeds-export.opml", generateOPML(plugin.settings.feeds));
new import_obsidian21.Notice(t("created_export"));
});
})).addExtraButton((button) => __async(this, null, function* () {
button.setTooltip(t("perform_cleanup")).setIcon("feather-trash").onClick(() => {
new CleanupModal(plugin).open();
});
}));
const feedsDiv = container.createDiv("feeds");
displayFeedList(plugin, feedsDiv);
}
function displayFeedList(plugin, container, disabled = false) {
container.empty();
const sorted = (0, import_lodash4.default)((0, import_lodash5.default)(plugin.settings.feeds, "folder"), function(o) {
return o[0].folder;
});
for (const [, feeds] of Object.entries(sorted)) {
for (const id in feeds) {
const feed = feeds[id];
const setting = new import_obsidian21.Setting(container);
setting.setName((feed.folder ? feed.folder : t("no_folder")) + " - " + feed.name);
setting.setDesc(feed.url);
setting.addExtraButton((b) => {
b.setDisabled(disabled).setIcon("feather-edit").setTooltip(t("edit")).onClick(() => {
const modal = new FeedModal(plugin, feed);
const oldFeed = feed;
modal.onClose = () => __async(this, null, function* () {
if (modal.saved) {
const feeds2 = plugin.settings.feeds;
feeds2.remove(oldFeed);
feeds2.push({ name: modal.name, url: modal.url, folder: modal.folder });
const items = plugin.settings.items;
items.filter((content) => {
return content.name === oldFeed.name && content.folder === oldFeed.folder;
}).forEach((content) => {
content.name = modal.name;
content.folder = modal.folder;
content.hash = new import_ts_md52.Md5().appendStr(modal.name).appendStr(modal.folder).end();
content.items.forEach((item) => {
item.feed = modal.name;
item.folder = modal.folder;
item.hash = new import_ts_md52.Md5().appendStr(item.title).appendStr(item.folder).appendStr(item.link).end();
});
});
yield plugin.writeFeedContent(() => {
return items;
});
yield plugin.writeFeeds(() => feeds2);
displayFeedList(plugin, container);
}
});
modal.open();
});
}).addExtraButton((button) => {
button.setDisabled(disabled).setTooltip(t("from_archive")).setIcon("feather-archive").onClick(() => __async(this, null, function* () {
const modal = new MessageModal(plugin, t("reading_archive"));
modal.open();
displayFeedList(plugin, container, true);
const timemap = yield (0, import_obsidian21.request)({
method: "GET",
url: "https://web.archive.org/web/timemap/link/" + feed.url
});
const items = [];
const lines = timemap.split("\n");
for (const line of lines) {
if (line.contains("memento")) {
const link = line.slice(1, line.indexOf(">"));
const first = link.substring(0, 41);
const second = link.substring(42);
items.push(yield getFeedItems({
name: feed.name,
url: first + "id_" + second,
folder: feed.folder
}));
}
}
modal.setMessage(t("scanning_duplicates"));
for (const feed2 of plugin.settings.items) {
for (const content of items) {
if (feed2.folder === content.folder && feed2.name === content.name) {
const sortedItems = content.items.sort((a, b) => {
return (0, import_obsidian21.moment)(b.pubDate).diff((0, import_obsidian21.moment)(a.pubDate));
});
for (const item of sortedItems) {
const filter = feed2.items.filter((filterItem) => {
return filterItem.folder === item.folder && filterItem.title === item.title;
});
if (filter.length === 0) {
feed2.items.push(item);
}
}
}
}
}
yield plugin.writeFeedContent(() => {
return plugin.settings.items;
});
displayFeedList(plugin, container, false);
modal.setMessage(t("refreshed_feeds"));
modal.close();
}));
}).addExtraButton((b) => {
b.setDisabled(disabled).setIcon("feather-trash").setTooltip(t("delete")).onClick(() => __async(this, null, function* () {
const feeds2 = plugin.settings.feeds;
feeds2.remove(feed);
yield plugin.writeFeeds(() => feeds2);
let content = plugin.settings.items;
content = content.filter((content2) => {
return content2.name !== feed.name;
});
yield plugin.writeFeedContent(() => content);
displayFeedList(plugin, container);
}));
});
}
}
}
// src/settings/HotkeySettings.ts
var import_obsidian22 = __toModule(require("obsidian"));
function displayHotkeys(plugin, containerEl) {
containerEl.empty();
containerEl.createEl("h2", { text: t("hotkeys") });
containerEl.createEl("h3", { text: t("hotkeys_reading") });
new import_obsidian22.Setting(containerEl).setName(t("create_note")).addButton((button) => {
button.setButtonText(plugin.settings.hotkeys.create).setTooltip(t("customize_hotkey")).onClick(() => {
button.setButtonText(t("press_key"));
const listener = (e) => __async(this, null, function* () {
window.removeEventListener("keyup", listener);
yield plugin.writeSettings(() => ({
hotkeys: __spreadProps(__spreadValues({}, plugin.settings.hotkeys), {
create: e.key
})
}));
displayHotkeys(plugin, containerEl);
});
window.addEventListener("keyup", listener);
});
});
new import_obsidian22.Setting(containerEl).setName(t("paste_to_note")).addButton((button) => {
button.setButtonText(plugin.settings.hotkeys.paste).setTooltip(t("customize_hotkey")).onClick(() => {
button.setButtonText(t("press_key"));
const listener = (e) => __async(this, null, function* () {
window.removeEventListener("keyup", listener);
yield plugin.writeSettings(() => ({
hotkeys: __spreadProps(__spreadValues({}, plugin.settings.hotkeys), {
paste: e.key
})
}));
displayHotkeys(plugin, containerEl);
});
window.addEventListener("keyup", listener);
});
});
new import_obsidian22.Setting(containerEl).setName(t("open_browser")).addButton((button) => {
button.setButtonText(plugin.settings.hotkeys.open).setTooltip(t("customize_hotkey")).onClick(() => {
button.setButtonText(t("press_key"));
const listener = (e) => __async(this, null, function* () {
window.removeEventListener("keyup", listener);
yield plugin.writeSettings(() => ({
hotkeys: __spreadProps(__spreadValues({}, plugin.settings.hotkeys), {
open: e.key
})
}));
displayHotkeys(plugin, containerEl);
});
window.addEventListener("keyup", listener);
});
});
new import_obsidian22.Setting(containerEl).setName(t("copy_to_clipboard")).addButton((button) => {
button.setButtonText(plugin.settings.hotkeys.copy).setTooltip(t("customize_hotkey")).onClick(() => {
button.setButtonText(t("press_key"));
const listener = (e) => __async(this, null, function* () {
window.removeEventListener("keyup", listener);
yield plugin.writeSettings(() => ({
hotkeys: __spreadProps(__spreadValues({}, plugin.settings.hotkeys), {
copy: e.key
})
}));
displayHotkeys(plugin, containerEl);
});
window.addEventListener("keyup", listener);
});
});
new import_obsidian22.Setting(containerEl).setName(t("mark_as_favorite_remove")).addButton((button) => {
button.setButtonText(plugin.settings.hotkeys.favorite).setTooltip(t("customize_hotkey")).onClick(() => {
button.setButtonText(t("press_key"));
const listener = (e) => __async(this, null, function* () {
window.removeEventListener("keyup", listener);
yield plugin.writeSettings(() => ({
hotkeys: __spreadProps(__spreadValues({}, plugin.settings.hotkeys), {
favorite: e.key
})
}));
displayHotkeys(plugin, containerEl);
});
window.addEventListener("keyup", listener);
});
});
new import_obsidian22.Setting(containerEl).setName(t("mark_as_read_unread")).addButton((button) => {
button.setButtonText(plugin.settings.hotkeys.read).setTooltip(t("customize_hotkey")).onClick(() => {
button.setButtonText(t("press_key"));
const listener = (e) => __async(this, null, function* () {
window.removeEventListener("keyup", listener);
yield plugin.writeSettings(() => ({
hotkeys: __spreadProps(__spreadValues({}, this.plugin.settings.hotkeys), {
read: e.key
})
}));
displayHotkeys(plugin, containerEl);
});
window.addEventListener("keyup", listener);
});
});
new import_obsidian22.Setting(containerEl).setName(t("edit_tags")).addButton((button) => {
button.setButtonText(plugin.settings.hotkeys.tags).setTooltip(t("customize_hotkey")).onClick(() => {
button.setButtonText(t("press_key"));
const listener = (e) => __async(this, null, function* () {
window.removeEventListener("keyup", listener);
yield plugin.writeSettings(() => ({
hotkeys: __spreadProps(__spreadValues({}, plugin.settings.hotkeys), {
tags: e.key
})
}));
displayHotkeys(plugin, containerEl);
});
window.addEventListener("keyup", listener);
});
});
new import_obsidian22.Setting(containerEl).setName(t("next")).addButton((button) => {
button.setButtonText(plugin.settings.hotkeys.next).setTooltip(t("customize_hotkey")).onClick(() => {
button.setButtonText(t("press_key"));
const listener = (e) => __async(this, null, function* () {
window.removeEventListener("keyup", listener);
yield plugin.writeSettings(() => ({
hotkeys: __spreadProps(__spreadValues({}, plugin.settings.hotkeys), {
next: e.key
})
}));
displayHotkeys(plugin, containerEl);
});
window.addEventListener("keyup", listener);
});
});
new import_obsidian22.Setting(containerEl).setName(t("previous")).addButton((button) => {
button.setButtonText(plugin.settings.hotkeys.previous).setTooltip(t("customize_hotkey")).onClick(() => {
button.setButtonText(t("press_key"));
const listener = (e) => __async(this, null, function* () {
window.removeEventListener("keyup", listener);
yield plugin.writeSettings(() => ({
hotkeys: __spreadProps(__spreadValues({}, plugin.settings.hotkeys), {
previous: e.key
})
}));
displayHotkeys(plugin, containerEl);
});
window.addEventListener("keyup", listener);
});
});
if (plugin.app.plugins.plugins["obsidian-tts"]) {
new import_obsidian22.Setting(containerEl).setName(t("read_article_tts")).setTooltip(t("customize_hotkey")).addButton((button) => {
button.setButtonText(plugin.settings.hotkeys.tts).onClick(() => {
button.setButtonText(t("press_key"));
const listener = (e) => __async(this, null, function* () {
window.removeEventListener("keyup", listener);
yield plugin.writeSettings(() => ({
hotkeys: __spreadProps(__spreadValues({}, plugin.settings.hotkeys), {
tts: e.key
})
}));
displayHotkeys(plugin, containerEl);
});
window.addEventListener("keyup", listener);
});
});
}
}
// src/settings/SettingsTab.ts
var RSSReaderSettingsTab = class extends import_obsidian23.PluginSettingTab {
constructor(app, plugin) {
super(app, plugin);
this.plugin = plugin;
}
display() {
const { containerEl } = this;
containerEl.empty();
containerEl.createEl("h2", { text: t("RSS_Reader") + " " + t("settings") });
containerEl.createEl("h3", { text: t("file_creation") });
const templateDesc = new DocumentFragment();
templateDesc.createDiv().innerHTML = t("template_new_help") + "
" + t("available_variables") + `
{{title}} \u2192 Title
{{link}} \u2192 Link to article
{{author}} \u2192 Author of article
{{published}} \u2192 Date published
{{created}} \u2192 Note creation date
{{description}} \u2192 Short article description
{{content}} \u2192 article content
{{folder}} \u2192 Folder of feed
{{feed}} \u2192 Title of feed
{{filename}} \u2192 Filename
{{tags}} \u2192 Tags split by comma
{{media}} \u2192 Link to video/audio file`;
new import_obsidian23.Setting(containerEl).setName(t("template_new")).setDesc(templateDesc).addTextArea((textArea) => {
textArea.setValue(this.plugin.settings.template).setPlaceholder(DEFAULT_SETTINGS.template).onChange((value) => __async(this, null, function* () {
yield this.plugin.writeSettings(() => ({
template: value
}));
}));
textArea.inputEl.setAttr("rows", 15);
textArea.inputEl.setAttr("cols", 50);
});
const pasteTemplateDesc = new DocumentFragment();
pasteTemplateDesc.createDiv().innerHTML = t("template_new_help") + "
" + t("available_variables") + `
{{title}} \u2192 Title
{{link}} \u2192 Link to article
{{author}} \u2192 Author of article
{{published}} \u2192 Date published
{{created}} \u2192 Note creation date
{{description}} \u2192 Short article description
{{content}} \u2192 article content
{{folder}} \u2192 Folder of feed
{{feed}} \u2192 Title of feed
{{tags}} \u2192 Tags split by comma
{{media}} \u2192 Link to video/audio file`;
new import_obsidian23.Setting(containerEl).setName(t("template_paste")).setDesc(pasteTemplateDesc).addTextArea((textArea) => {
textArea.setValue(this.plugin.settings.pasteTemplate).setPlaceholder(DEFAULT_SETTINGS.pasteTemplate).onChange((value) => __async(this, null, function* () {
yield this.plugin.writeSettings(() => ({
pasteTemplate: value
}));
}));
textArea.inputEl.setAttr("rows", 15);
textArea.inputEl.setAttr("cols", 50);
});
new import_obsidian23.Setting(containerEl).setName(t("file_location")).setDesc(t("file_location_help")).addDropdown((dropdown) => __async(this, null, function* () {
dropdown.addOption("default", t("file_location_default")).addOption("custom", t("file_location_custom")).setValue(this.plugin.settings.saveLocation).onChange((value) => __async(this, null, function* () {
yield this.plugin.writeSettings(() => ({ saveLocation: value }));
this.display();
}));
}));
if (this.plugin.settings.saveLocation == "custom") {
new import_obsidian23.Setting(containerEl).setName(t("file_location_folder")).setDesc(t("file_location_folder_help")).addSearch((search) => __async(this, null, function* () {
new FolderSuggest(this.app, search.inputEl);
search.setValue(this.plugin.settings.saveLocationFolder).setPlaceholder(DEFAULT_SETTINGS.saveLocationFolder).onChange((value) => __async(this, null, function* () {
yield this.plugin.writeSettings(() => ({ saveLocationFolder: value }));
}));
}));
}
let dateFormatSampleEl;
const dateFormat = new import_obsidian23.Setting(containerEl).setName(t("date_format")).addMomentFormat((format2) => {
dateFormatSampleEl = format2.setDefaultFormat(DEFAULT_SETTINGS.dateFormat).setPlaceholder(DEFAULT_SETTINGS.dateFormat).setValue(this.plugin.settings.dateFormat).onChange((value) => __async(this, null, function* () {
yield this.plugin.writeSettings(() => ({ dateFormat: value }));
}));
});
const referenceLink = dateFormat.descEl.createEl("a");
referenceLink.setAttr("href", "https://momentjs.com/docs/#/displaying/format/");
referenceLink.setText(t("syntax_reference"));
const text2 = dateFormat.descEl.createDiv("text");
text2.setText(t("syntax_looks"));
const sampleEl = text2.createSpan("sample");
dateFormatSampleEl.setSampleEl(sampleEl);
dateFormat.addExtraButton((button) => {
button.setIcon("reset").setTooltip(t("reset")).onClick(() => __async(this, null, function* () {
yield this.plugin.writeSettings(() => ({
dateFormat: DEFAULT_SETTINGS.dateFormat
}));
this.display();
}));
});
new import_obsidian23.Setting(containerEl).setName(t("ask_filename")).setDesc(t("ask_filename_help")).addToggle((toggle) => {
toggle.setValue(this.plugin.settings.askForFilename).onChange((value) => __async(this, null, function* () {
yield this.plugin.writeSettings(() => ({
askForFilename: value
}));
}));
});
new import_obsidian23.Setting(containerEl).setName(t("default_filename")).setDesc(t("default_filename_help")).addText((text3) => {
text3.setPlaceholder(DEFAULT_SETTINGS.defaultFilename).setValue(this.plugin.settings.defaultFilename).onChange((value) => __async(this, null, function* () {
if (value.length > 0) {
yield this.plugin.writeSettings(() => ({
defaultFilename: value
}));
} else {
new import_obsidian23.Notice(t("fix_errors"));
}
}));
});
containerEl.createEl("hr", { attr: { style: "border-top: 5px solid var(--background-modifier-border);" } });
containerEl.createEl("h3", { text: "Misc" });
const refresh = new import_obsidian23.Setting(containerEl).setName(t("refresh_time")).setDesc(t("refresh_time_help")).addText((text3) => {
text3.setPlaceholder(String(DEFAULT_SETTINGS.updateTime)).setValue(String(this.plugin.settings.updateTime)).onChange((value) => __async(this, null, function* () {
if (value.length === 0) {
new import_obsidian23.Notice(t("specify_positive_number"));
return;
}
if (Number(value) < 0) {
new import_obsidian23.Notice(t("specify_positive_number"));
return;
}
yield this.plugin.writeSettings(() => ({ updateTime: Number(value) }));
}));
text3.inputEl.setAttr("type", "number");
text3.inputEl.setAttr("min", "1");
text3.inputEl.setAttr("onkeypress", "return event.charCode >= 48 && event.charCode <= 57");
});
refresh.addExtraButton((button) => {
button.setIcon("reset").setTooltip("restore default").onClick(() => __async(this, null, function* () {
yield this.plugin.writeSettings(() => ({
updateTime: DEFAULT_SETTINGS.updateTime
}));
this.display();
}));
});
new import_obsidian23.Setting(containerEl).setName(t("multi_device_usage")).setDesc(t("multi_device_usage_help")).addToggle((toggle) => {
return toggle.setValue(this.plugin.settings.autoSync).onChange((value) => __async(this, null, function* () {
yield this.plugin.writeSettings(() => ({
autoSync: value
}));
}));
});
containerEl.createEl("hr", { attr: { style: "border-top: 5px solid var(--background-modifier-border);" } });
containerEl.createEl("h3", { text: t("filtered_folders") });
new import_obsidian23.Setting(containerEl).setName(t("add_new")).setDesc(t("add_new_filter")).addButton((button) => {
return button.setTooltip(t("add_new_filter")).setIcon("feather-plus").onClick(() => __async(this, null, function* () {
const modal = new FilteredFolderModal(this.plugin);
modal.onClose = () => __async(this, null, function* () {
if (modal.saved) {
if (this.plugin.settings.filtered.some((folder) => folder.name === modal.name)) {
new import_obsidian23.Notice(t("filter_exists"));
return;
}
yield this.plugin.writeFiltered(() => this.plugin.settings.filtered.concat({
name: modal.name,
sortOrder: modal.sortOrder,
filterFeeds: modal.filterFeeds,
filterFolders: modal.filterFolders,
filterTags: modal.filterTags,
favorites: modal.favorites,
read: modal.read,
unread: modal.unread
}));
this.display();
}
});
modal.open();
}));
});
const filterContainer = containerEl.createDiv("filter-container");
const filtersDiv = filterContainer.createDiv("filters");
for (const id in this.plugin.settings.filtered.sort((a, b) => a.name.localeCompare(b.name))) {
const filter = this.plugin.settings.filtered[id];
if (filter === void 0) {
continue;
}
const setting = new import_obsidian23.Setting(filtersDiv);
setting.setName(filter.name);
const description = [];
if (filter.read)
description.push(t("read"));
if (filter.unread)
description.push(t("unread"));
if (filter.favorites)
description.push(t("favorites"));
let message = "";
if (filter.filterFolders !== void 0 && filter.filterFolders.length > 0) {
const folders = filter.filterFolders.join(",");
message += "; " + t("from_folders") + folders;
}
if (filter.filterFeeds.length > 0) {
const feeds = filter.filterFeeds.join(",");
message += "; " + t("from_feeds") + feeds;
}
if (filter.filterTags.length > 0) {
const tags = filter.filterTags.join(",");
message += "; " + t("with_tags") + tags;
}
setting.setDesc(description.join(",") + message);
setting.addExtraButton((b) => {
b.setIcon("feather-edit").setTooltip(t("edit")).onClick(() => {
const modal = new FilteredFolderModal(this.plugin, filter);
const oldFilter = filter;
modal.onClose = () => __async(this, null, function* () {
if (modal.saved) {
const filters = this.plugin.settings.filtered;
filters.remove(oldFilter);
filters.push({
name: modal.name,
sortOrder: modal.sortOrder,
filterFeeds: modal.filterFeeds,
filterFolders: modal.filterFolders,
filterTags: modal.filterTags,
favorites: modal.favorites,
read: modal.read,
unread: modal.unread
});
yield this.plugin.writeFiltered(() => filters);
this.display();
}
});
modal.open();
});
}).addExtraButton((b) => {
b.setIcon("feather-trash").setTooltip(t("delete")).onClick(() => __async(this, null, function* () {
const filters = this.plugin.settings.filtered;
filters.remove(filter);
yield this.plugin.writeFiltered(() => filters);
this.display();
}));
});
}
containerEl.createEl("hr", { attr: { style: "border-top: 5px solid var(--background-modifier-border);" } });
const feedsContainer = containerEl.createDiv("feed-container");
displayFeedSettings(this.plugin, feedsContainer);
containerEl.createEl("hr", { attr: { style: "border-top: 5px solid var(--background-modifier-border);" } });
const hotkeyContainer = containerEl.createDiv("hotkey-container");
displayHotkeys(this.plugin, hotkeyContainer);
}
};
// src/modals/ArticleSuggestModal.ts
var import_obsidian24 = __toModule(require("obsidian"));
var ArticleSuggestModal = class extends import_obsidian24.SuggestModal {
constructor(plugin, items) {
super(plugin.app);
this.plugin = plugin;
this.items = items;
}
getItems() {
return this.items;
}
onChooseSuggestion(item, _) {
this.close();
new ItemModal(this.plugin, item, this.items, false).open();
}
getSuggestions(query) {
return this.items.filter((item) => {
return item.title.toLowerCase().includes(query.toLowerCase()) || item.content.toLowerCase().includes(query.toLowerCase());
});
}
renderSuggestion(item, el) {
el.createEl("div", { text: item.title });
el.createEl("small", { text: (0, import_obsidian24.moment)(item.pubDate).format(this.plugin.settings.dateFormat) + " " + item.creator });
}
};
// src/main.ts
var RssReaderPlugin = class extends import_obsidian25.Plugin {
onload() {
return __async(this, null, function* () {
console.log("loading plugin rss reader");
new import_obsidian25.Notice(t("RSS_Reader") + ": Please check your settings, the default value for the date format had an error, the correct format for minutes is mm not MM", 1e5);
addFeatherIcon("rss");
addFeatherIcon("eye");
addFeatherIcon("eye-off");
addFeatherIcon("star");
addFeatherIcon("clipboard");
addFeatherIcon("headphones");
addFeatherIcon("upload");
addFeatherIcon("trash");
addFeatherIcon("plus");
addFeatherIcon("edit");
addFeatherIcon("download");
addFeatherIcon("archive");
this.register(settingsStore.subscribe((value) => {
this.settings = value;
}));
yield this.loadSettings();
this.addCommand({
id: "rss-open",
name: t("open"),
checkCallback: (checking) => {
if (checking) {
return this.app.workspace.getLeavesOfType(VIEW_ID).length === 0;
}
this.initLeaf();
}
});
this.addCommand({
id: "rss-refresh",
name: t("refresh_feeds"),
callback: () => __async(this, null, function* () {
yield this.updateFeeds();
})
});
this.addCommand({
id: "rss-cleanup",
name: t("cleanup"),
callback: () => __async(this, null, function* () {
new CleanupModal(this).open();
})
});
this.addCommand({
id: "rss-open-feed",
name: "Open Feed from URL",
callback: () => __async(this, null, function* () {
const input = new TextInputPrompt(this.app, "URL", "URL", "", "", t("open"));
yield input.openAndGetValue((text2) => __async(this, null, function* () {
const items = yield getFeedItems({ name: "", folder: "", url: text2.getValue() });
if (!items || items.items.length === 0) {
input.setValidationError(text2, t("invalid_feed"));
return;
}
input.close();
new ArticleSuggestModal(this, items.items).open();
}));
})
});
this.registerView(VIEW_ID, (leaf) => new ViewLoader(leaf, this));
this.addSettingTab(new RSSReaderSettingsTab(this.app, this));
let interval;
if (this.settings.updateTime !== 0) {
interval = window.setInterval(() => __async(this, null, function* () {
yield this.updateFeeds();
}), this.settings.updateTime * 60 * 1e3);
this.registerInterval(interval);
}
if (this.settings.autoSync) {
this.registerInterval(window.setInterval(() => __async(this, null, function* () {
yield this.loadSettings();
}), 1e3 * 60));
}
settingsStore.subscribe((settings) => {
if (interval !== void 0)
clearInterval(interval);
if (settings.updateTime != 0) {
interval = window.setInterval(() => __async(this, null, function* () {
yield this.updateFeeds();
}), settings.updateTime * 60 * 1e3);
this.registerInterval(interval);
}
this.settings = settings;
this.saveSettings();
});
this.app.workspace.onLayoutReady(() => __async(this, null, function* () {
yield this.migrateData();
yield this.initLeaf();
yield this.updateFeeds();
feedsStore.subscribe((feeds) => {
const sorted = (0, import_lodash6.default)(feeds, "folder");
sortedFeedsStore.update(() => sorted);
let items = [];
for (const feed in Object.keys(feeds)) {
const feedItems = feeds[feed].items;
items = items.concat(feedItems);
}
const tags = [];
for (const item of items) {
if (item !== void 0)
tags.push(...item.tags);
}
const fileTags = this.app.metadataCache.getTags();
for (const tag of Object.keys(fileTags)) {
tags.push(tag.replace("#", ""));
}
tagsStore.update(() => new Set(tags.filter((tag) => tag.length > 0)));
const folders = [];
for (const item of items) {
if (item !== void 0)
folders.push(item.folder);
}
folderStore.update(() => new Set(folders.filter((folder) => folder.length > 0)));
this.filterItems(items);
});
}));
});
}
filterItems(items) {
const filtered = new Array();
for (const filter of this.settings.filtered) {
const sortOrder = SortOrder[filter.sortOrder];
let filteredItems;
filteredItems = items.filter((item) => {
return item.read === filter.read || item.read !== filter.unread;
});
if (filter.favorites) {
filteredItems = filteredItems.filter((item) => {
return item.favorite === filter.favorites;
});
}
if (filter.filterFolders.length > 0) {
filteredItems = filteredItems.filter((item) => {
filter.filterFolders.includes(item.folder);
});
}
if (filter.filterFeeds.length > 0) {
filteredItems = filteredItems.filter((item) => {
filter.filterFeeds.includes(item.feed);
});
}
if (filter.filterTags.length > 0) {
filteredItems = filteredItems.filter((item) => {
for (const tag of filter.filterTags) {
if (!item.tags.contains(tag))
return false;
}
return true;
});
}
const sortedItems = this.sortItems(filteredItems, sortOrder);
filtered.push({ filter, items: { items: sortedItems } });
}
filteredItemsStore.update(() => filtered);
}
sortItems(items, sortOrder) {
if (!items)
return items;
if (sortOrder === SortOrder.ALPHABET_NORMAL) {
return items.sort((a, b) => a.title.localeCompare(b.title));
}
if (sortOrder === SortOrder.ALPHABET_INVERTED) {
return items.sort((a, b) => b.title.localeCompare(a.title));
}
if (sortOrder === SortOrder.DATE_NEWEST) {
return items.sort((a, b) => window.moment(b.pubDate) - window.moment(a.pubDate));
}
if (sortOrder === SortOrder.DATE_OLDEST) {
return items.sort((a, b) => window.moment(a.pubDate) - window.moment(b.pubDate));
}
return items;
}
updateFeeds() {
return __async(this, null, function* () {
function mergeArrayById(array1, array2) {
const mergedObjectMap = (0, import_lodash8.default)(array1, "hash");
const finalArray = [];
for (const object of array2) {
mergedObjectMap[object.hash] = __spreadValues(__spreadValues({}, mergedObjectMap[object.hash]), object);
}
(0, import_lodash9.default)(mergedObjectMap).forEach((object) => {
finalArray.push(object);
});
return finalArray;
}
function customizer(objValue, srcValue) {
if (Array.isArray(objValue)) {
return mergeArrayById(objValue, srcValue);
}
}
let result = [];
for (const feed of this.settings.feeds) {
const items2 = yield getFeedItems(feed);
result.push(items2);
}
const items = this.settings.items;
for (const feed of items) {
if (feed.hash === void 0 || feed.hash === "") {
feed.hash = new import_ts_md53.Md5().appendStr(feed.name).appendStr(feed.folder).end();
}
for (const item of feed.items) {
if (item.folder !== feed.folder || item.feed !== feed.name) {
feed.items.remove(item);
}
if (item.hash === void 0) {
item.hash = new import_ts_md53.Md5().appendStr(item.title).appendStr(item.folder).appendStr(item.link).end();
}
}
}
result = (0, import_lodash7.default)(result, items, customizer);
new import_obsidian25.Notice(t("refreshed_feeds"));
yield this.writeFeedContent(() => result);
});
}
onunload() {
console.log("unloading plugin rss reader");
this.app.workspace.getLeavesOfType(VIEW_ID).forEach((leaf) => leaf.detach());
}
initLeaf() {
return __async(this, null, function* () {
if (this.app.workspace.getLeavesOfType(VIEW_ID).length > 0) {
return;
}
yield this.app.workspace.getRightLeaf(false).setViewState({
type: VIEW_ID
});
});
}
migrateData() {
return __async(this, null, function* () {
console.log("migrating");
const configPath = this.app.vault.configDir + "/plugins/rss-reader/data.json";
const config = JSON.parse(yield this.app.vault.adapter.read(configPath));
console.log(config);
if (config.filtered.length === 0)
return;
console.log(config.filtered[0]);
if (config.filtered[0].filterType === void 0)
return;
new import_obsidian25.Notice("RSS Reader: migrating data");
for (const filter of config.filtered) {
const newFilter = {
filterFolders: [],
filterTags: [],
filterFeeds: [],
favorites: false,
read: false,
unread: false,
sortOrder: filter.sortOrder,
name: filter.name
};
if (filter.filterType === "FAVORITES")
newFilter.favorites = true;
if (filter.filterType === "READ")
newFilter.read = true;
if (filter.filterType === "UNREAD")
newFilter.unread = true;
if (filter.filterType === "TAGS") {
if (filter.filterContent !== "") {
newFilter.filterTags = filter.filterContent.split(",");
}
} else {
if (filter.filterContent !== "") {
newFilter.filterFolders = filter.filterContent.split(",");
}
}
newFilter.read = true;
newFilter.unread = true;
config.filtered = config.filtered.filter((item) => item.name !== filter.name);
config.filtered.push(newFilter);
}
yield this.app.vault.adapter.write(configPath, JSON.stringify(config));
yield this.loadSettings();
new import_obsidian25.Notice("RSS Reader: data has been migrated");
if (config.read === void 0)
return;
new import_obsidian25.Notice("RSS Reader: migrating data");
for (const content of Object.values(config.items)) {
for (const item of content.items) {
if (config.read.items.some((readItem) => {
return item.title == readItem.title && item.link == readItem.link && item.content == readItem.content;
})) {
item.read = true;
}
}
for (const item of content.items) {
if (config.favorites.items.some((favItem) => {
return item.title == favItem.title && item.link == favItem.link && item.content == favItem.content;
})) {
item.favorite = true;
}
}
}
delete config.read;
delete config.favorites;
yield this.app.vault.adapter.write(configPath, JSON.stringify(config));
yield this.loadSettings();
new import_obsidian25.Notice("RSS Reader: data has been migrated");
});
}
loadSettings() {
return __async(this, null, function* () {
const configPath = this.app.vault.configDir + "/plugins/rss-reader/data.json";
try {
JSON.parse(yield this.app.vault.adapter.read(configPath));
} catch (e) {
console.log("RSS Reader: could not parse json, check if the plugins data.json is valid.");
console.error(e);
new import_obsidian25.Notice(t("RSS_Reader") + " could not parse plugin data. If this message keeps showing up, check the console");
return Promise.resolve();
}
const data = yield this.loadData();
this.settings = Object.assign({}, DEFAULT_SETTINGS, data);
this.settings.hotkeys = Object.assign({}, DEFAULT_SETTINGS.hotkeys, data.hotkeys);
settingsStore.set(this.settings);
configuredFeedsStore.set(this.settings.feeds);
feedsStore.set(this.settings.items);
foldedState.set(this.settings.folded);
});
}
saveSettings() {
return __async(this, null, function* () {
yield this.saveData(this.settings);
});
}
writeFeeds(changeOpts) {
return __async(this, null, function* () {
yield configuredFeedsStore.update((old) => __spreadValues(__spreadValues({}, old), changeOpts(old)));
yield this.writeSettings((old) => ({
feeds: changeOpts(old.feeds)
}));
yield this.updateFeeds();
});
}
writeFeedContent(changeOpts) {
return __async(this, null, function* () {
yield feedsStore.update((old) => __spreadValues({}, changeOpts(old)));
yield this.writeSettings((old) => ({
items: changeOpts(old.items)
}));
});
}
writeFiltered(changeOpts) {
return __async(this, null, function* () {
yield filteredStore.update((old) => __spreadValues(__spreadValues({}, old), changeOpts(old)));
yield this.writeSettings((old) => ({
filtered: changeOpts(old.filtered)
}));
yield this.updateFeeds();
});
}
writeFolded(folded) {
return __async(this, null, function* () {
yield foldedState.update(() => folded);
yield this.writeSettings(() => ({
folded
}));
});
}
writeSettings(changeOpts) {
return __async(this, null, function* () {
yield settingsStore.update((old) => __spreadValues(__spreadValues({}, old), changeOpts(old)));
});
}
};
/*!
Copyright (c) 2016 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */