diff --git a/.obsidian/community-plugins.json b/.obsidian/community-plugins.json index 84379c24..5f2c578b 100644 --- a/.obsidian/community-plugins.json +++ b/.obsidian/community-plugins.json @@ -58,9 +58,7 @@ "obsidian-account-linker", "cmdr", "obsidian-snippet-downloader", - "obsidian-react-components", "obsidian-tasks-plugin", - "obsidian-full-calendar", "obsidian-lineup-builder", "email-block-plugin", "better-word-count", @@ -68,6 +66,5 @@ "obsidian-bulk-rename-plugin", "recent-files-obsidian", "msg-handler", - "pdf-to-markdown-plugin", "obsidian-timelines" ] \ No newline at end of file diff --git a/.obsidian/graph.json b/.obsidian/graph.json index b82ea366..d28fd1a3 100644 --- a/.obsidian/graph.json +++ b/.obsidian/graph.json @@ -78,7 +78,7 @@ } }, { - "query": "line:(DocTyepe: \"Person\") path:", + "query": "line:(DocType: \"Person\") path:", "color": { "a": 1, "rgb": 14725458 @@ -95,6 +95,6 @@ "repelStrength": 10, "linkStrength": 1, "linkDistance": 250, - "scale": 0.28688258799735933, + "scale": 0.1661354152177926, "close": true } \ No newline at end of file diff --git a/.obsidian/plugins/emoji-shortcodes/data.json b/.obsidian/plugins/emoji-shortcodes/data.json index 4d17cc2d..e13c7009 100644 --- a/.obsidian/plugins/emoji-shortcodes/data.json +++ b/.obsidian/plugins/emoji-shortcodes/data.json @@ -4,11 +4,11 @@ "historyPriority": true, "historyLimit": 100, "history": [ + ":tv:", + ":plate_with_cutlery:", ":book:", ":fork_and_knife:", - ":plate_with_cutlery:", ":broken_heart:", - ":tv:", ":warning:", ":musical_score:", ":clapper:", diff --git a/.obsidian/plugins/find-unlinked-files/main.js b/.obsidian/plugins/find-unlinked-files/main.js index cd63474e..3a1f47ac 100644 --- a/.obsidian/plugins/find-unlinked-files/main.js +++ b/.obsidian/plugins/find-unlinked-files/main.js @@ -49,7 +49,7 @@ function __generator(thisArg, body) { function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); - while (_) try { + while (g && (g = 0, op[0] && (_ = 0)), _) try { if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; if (y = 0, t) op = [op[0] & 2, t.value]; switch (op[0]) { @@ -90,16 +90,15 @@ var DeleteFilesModal = /** @class */ (function (_super) { DeleteFilesModal.prototype.onOpen = function () { var _this = this; var _a = this, contentEl = _a.contentEl, titleEl = _a.titleEl; - titleEl.setText('Move ' + this.filesToDelete.length + ' files to system trash?'); + titleEl.setText("Move " + this.filesToDelete.length + " files to system trash?"); contentEl .createEl("button", { text: "Cancel" }) .addEventListener("click", function () { return _this.close(); }); - contentEl - .setAttr("margin", "auto"); + contentEl.setAttr("margin", "auto"); contentEl .createEl("button", { cls: "mod-cta", - text: "Confirm" + text: "Confirm", }) .addEventListener("click", function () { return __awaiter(_this, void 0, void 0, function () { var _i, _a, file; @@ -155,40 +154,51 @@ var SettingsTab = /** @class */ (function (_super) { var containerEl = this.containerEl; containerEl.empty(); containerEl.createEl("h2", { text: this.plugin.manifest.name }); - containerEl.createEl("h4", { text: "Settings for finding orphaned files" }); - new obsidian.Setting(containerEl) - .setName("Open output file") - .addToggle(function (cb) { - return cb.setValue(_this.plugin.settings.openOutputFile) + containerEl.createEl("h4", { + text: "Settings for finding orphaned files", + }); + new obsidian.Setting(containerEl).setName("Open output file").addToggle(function (cb) { + return cb + .setValue(_this.plugin.settings.openOutputFile) .onChange(function (value) { _this.plugin.settings.openOutputFile = value; _this.plugin.saveSettings(); }); }); new obsidian.Setting(containerEl) - .setName('Output file name') - .setDesc('Set name of output file (without file extension). Make sure no file exists with this name because it will be overwritten! If the name is empty, the default name is set.') - .addText(function (cb) { return cb.onChange(function (value) { - if (value.length == 0) { - _this.plugin.settings.outputFileName = _this.defaultSettings.outputFileName; - } - else { - _this.plugin.settings.outputFileName = value; - } - _this.plugin.saveSettings(); - }).setValue(_this.plugin.settings.outputFileName); }); + .setName("Output file name") + .setDesc("Set name of output file (without file extension). Make sure no file exists with this name because it will be overwritten! If the name is empty, the default name is set.") + .addText(function (cb) { + return cb + .onChange(function (value) { + if (value.length == 0) { + _this.plugin.settings.outputFileName = + _this.defaultSettings.outputFileName; + } + else { + _this.plugin.settings.outputFileName = value; + } + _this.plugin.saveSettings(); + }) + .setValue(_this.plugin.settings.outputFileName); + }); new obsidian.Setting(containerEl) - .setName('Disable working links') - .setDesc('Indent lines to disable the link and to clean up the graph view') - .addToggle(function (cb) { return cb.onChange(function (value) { - _this.plugin.settings.disableWorkingLinks = value; - _this.plugin.saveSettings(); - }).setValue(_this.plugin.settings.disableWorkingLinks); }); + .setName("Disable working links") + .setDesc("Indent lines to disable the link and to clean up the graph view") + .addToggle(function (cb) { + return cb + .onChange(function (value) { + _this.plugin.settings.disableWorkingLinks = value; + _this.plugin.saveSettings(); + }) + .setValue(_this.plugin.settings.disableWorkingLinks); + }); new obsidian.Setting(containerEl) .setName("Exclude files in the given directories") .setDesc("Enable to exclude files in the given directories. Disable to only include files in the given directories") .addToggle(function (cb) { - return cb.setValue(_this.plugin.settings.ignoreDirectories) + return cb + .setValue(_this.plugin.settings.ignoreDirectories) .onChange(function (value) { _this.plugin.settings.ignoreDirectories = value; _this.plugin.saveSettings(); @@ -197,41 +207,57 @@ var SettingsTab = /** @class */ (function (_super) { new obsidian.Setting(containerEl) .setName("Directories") .setDesc("Add each directory path in a new line") - .addTextArea(function (cb) { return cb - .setPlaceholder("Directory/Subdirectory") - .setValue(_this.plugin.settings.directoriesToIgnore.join("\n")) - .onChange(function (value) { - var paths = value.trim().split("\n").map(function (value) { return _this.formatPath(value, true); }); - _this.plugin.settings.directoriesToIgnore = paths; - _this.plugin.saveSettings(); - }); }); + .addTextArea(function (cb) { + return cb + .setPlaceholder("Directory/Subdirectory") + .setValue(_this.plugin.settings.directoriesToIgnore.join("\n")) + .onChange(function (value) { + var paths = value + .trim() + .split("\n") + .map(function (value) { return _this.formatPath(value, true); }); + _this.plugin.settings.directoriesToIgnore = paths; + _this.plugin.saveSettings(); + }); + }); new obsidian.Setting(containerEl) .setName("Exclude files") .setDesc("Add each file path in a new line (with file extension!)") - .addTextArea(function (cb) { return cb - .setPlaceholder("Directory/file.md") - .setValue(_this.plugin.settings.filesToIgnore.join("\n")) - .onChange(function (value) { - var paths = value.trim().split("\n").map(function (value) { return _this.formatPath(value, false); }); - _this.plugin.settings.filesToIgnore = paths; - _this.plugin.saveSettings(); - }); }); + .addTextArea(function (cb) { + return cb + .setPlaceholder("Directory/file.md") + .setValue(_this.plugin.settings.filesToIgnore.join("\n")) + .onChange(function (value) { + var paths = value + .trim() + .split("\n") + .map(function (value) { return _this.formatPath(value, false); }); + _this.plugin.settings.filesToIgnore = paths; + _this.plugin.saveSettings(); + }); + }); new obsidian.Setting(containerEl) .setName("Exclude links") .setDesc("Exclude files, which contain the given file as link. Add each file path in a new line (with file extension!). Set it to `*` to exclude files with links.") - .addTextArea(function (cb) { return cb - .setPlaceholder("Directory/file.md") - .setValue(_this.plugin.settings.linksToIgnore.join("\n")) - .onChange(function (value) { - var paths = value.trim().split("\n").map(function (value) { return _this.formatPath(value, false); }); - _this.plugin.settings.linksToIgnore = paths; - _this.plugin.saveSettings(); - }); }); + .addTextArea(function (cb) { + return cb + .setPlaceholder("Directory/file.md") + .setValue(_this.plugin.settings.linksToIgnore.join("\n")) + .onChange(function (value) { + var paths = value + .trim() + .split("\n") + .map(function (value) { return _this.formatPath(value, false); }); + _this.plugin.settings.linksToIgnore = paths; + _this.plugin.saveSettings(); + }); + }); new obsidian.Setting(containerEl) .setName("Exclude files with the given filetypes") .setDesc("Enable to exclude files with the given filetypes. Disable to only include files with the given filetypes") .addToggle(function (cb) { - return cb.setValue(_this.plugin.settings.ignoreFileTypes) + return cb + .setValue(_this.plugin.settings.ignoreFileTypes) .onChange(function (value) { _this.plugin.settings.ignoreFileTypes = value; _this.plugin.saveSettings(); @@ -240,189 +266,280 @@ var SettingsTab = /** @class */ (function (_super) { new obsidian.Setting(containerEl) .setName("File types") .setDesc("Effect depends on toggle above") - .addTextArea(function (cb) { return cb - .setPlaceholder("docx,txt") - .setValue(_this.plugin.settings.fileTypesToIgnore.join(",")) - .onChange(function (value) { - var extensions = value.trim().split(","); - _this.plugin.settings.fileTypesToIgnore = extensions; - _this.plugin.saveSettings(); - }); }); + .addTextArea(function (cb) { + return cb + .setPlaceholder("docx,txt") + .setValue(_this.plugin.settings.fileTypesToIgnore.join(",")) + .onChange(function (value) { + var extensions = value.trim().split(","); + _this.plugin.settings.fileTypesToIgnore = extensions; + _this.plugin.saveSettings(); + }); + }); new obsidian.Setting(containerEl) .setName("Exclude tags") .setDesc("Exclude files, which contain the given tag. Add each tag separated by comma (without `#`)") - .addTextArea(function (cb) { return cb - .setPlaceholder("todo,unfinished") - .setValue(_this.plugin.settings.tagsToIgnore.join(",")) - .onChange(function (value) { - var tags = value.trim().split(","); - _this.plugin.settings.tagsToIgnore = tags; - _this.plugin.saveSettings(); - }); }); + .addTextArea(function (cb) { + return cb + .setPlaceholder("todo,unfinished") + .setValue(_this.plugin.settings.tagsToIgnore.join(",")) + .onChange(function (value) { + var tags = value.trim().split(","); + _this.plugin.settings.tagsToIgnore = tags; + _this.plugin.saveSettings(); + }); + }); new obsidian.Setting(containerEl) .setName("Filetypes to delete per command. See README.") .setDesc("Add each filetype separated by comma. Set to `*` to delete all files.") - .addTextArea(function (cb) { return cb - .setPlaceholder("jpg,png") - .setValue(_this.plugin.settings.fileTypesToDelete.join(",")) - .onChange(function (value) { - var extensions = value.trim().split(","); - _this.plugin.settings.fileTypesToDelete = extensions; - _this.plugin.saveSettings(); - }); }); + .addTextArea(function (cb) { + return cb + .setPlaceholder("jpg,png") + .setValue(_this.plugin.settings.fileTypesToDelete.join(",")) + .onChange(function (value) { + var extensions = value.trim().split(","); + _this.plugin.settings.fileTypesToDelete = extensions; + _this.plugin.saveSettings(); + }); + }); /// Settings for find brokenLinks - containerEl.createEl("h4", { text: "Settings for finding broken links" }); + containerEl.createEl("h4", { + text: "Settings for finding broken links", + }); new obsidian.Setting(containerEl) - .setName('Output file name') - .setDesc('Set name of output file (without file extension). Make sure no file exists with this name because it will be overwritten! If the name is empty, the default name is set.') - .addText(function (cb) { return cb.onChange(function (value) { - if (value.length == 0) { - _this.plugin.settings.unresolvedLinksOutputFileName = _this.defaultSettings.unresolvedLinksOutputFileName; - } - else { - _this.plugin.settings.unresolvedLinksOutputFileName = value; - } - _this.plugin.saveSettings(); - }).setValue(_this.plugin.settings.unresolvedLinksOutputFileName); }); + .setName("Output file name") + .setDesc("Set name of output file (without file extension). Make sure no file exists with this name because it will be overwritten! If the name is empty, the default name is set.") + .addText(function (cb) { + return cb + .onChange(function (value) { + if (value.length == 0) { + _this.plugin.settings.unresolvedLinksOutputFileName = + _this.defaultSettings.unresolvedLinksOutputFileName; + } + else { + _this.plugin.settings.unresolvedLinksOutputFileName = + value; + } + _this.plugin.saveSettings(); + }) + .setValue(_this.plugin.settings.unresolvedLinksOutputFileName); + }); new obsidian.Setting(containerEl) .setName("Exclude files in the given directories") .setDesc("Enable to exclude files in the given directories. Disable to only include files in the given directories") .addToggle(function (cb) { - return cb.setValue(_this.plugin.settings.unresolvedLinksIgnoreDirectories) + return cb + .setValue(_this.plugin.settings.unresolvedLinksIgnoreDirectories) .onChange(function (value) { - _this.plugin.settings.unresolvedLinksIgnoreDirectories = value; + _this.plugin.settings.unresolvedLinksIgnoreDirectories = + value; _this.plugin.saveSettings(); }); }); new obsidian.Setting(containerEl) .setName("Directories") .setDesc("Add each directory path in a new line") - .addTextArea(function (cb) { return cb - .setPlaceholder("Directory/Subdirectory") - .setValue(_this.plugin.settings.unresolvedLinksDirectoriesToIgnore.join("\n")) - .onChange(function (value) { - var paths = value.trim().split("\n").map(function (value) { return _this.formatPath(value, true); }); - _this.plugin.settings.unresolvedLinksDirectoriesToIgnore = paths; - _this.plugin.saveSettings(); - }); }); + .addTextArea(function (cb) { + return cb + .setPlaceholder("Directory/Subdirectory") + .setValue(_this.plugin.settings.unresolvedLinksDirectoriesToIgnore.join("\n")) + .onChange(function (value) { + var paths = value + .trim() + .split("\n") + .map(function (value) { return _this.formatPath(value, true); }); + _this.plugin.settings.unresolvedLinksDirectoriesToIgnore = + paths; + _this.plugin.saveSettings(); + }); + }); new obsidian.Setting(containerEl) .setName("Exclude files") .setDesc("Exclude links in the specified file. Add each file path in a new line (with file extension!)") - .addTextArea(function (cb) { return cb - .setPlaceholder("Directory/file.md") - .setValue(_this.plugin.settings.unresolvedLinksFilesToIgnore.join("\n")) - .onChange(function (value) { - var paths = value.trim().split("\n").map(function (value) { return _this.formatPath(value, false); }); - _this.plugin.settings.unresolvedLinksFilesToIgnore = paths; - _this.plugin.saveSettings(); - }); }); + .addTextArea(function (cb) { + return cb + .setPlaceholder("Directory/file.md") + .setValue(_this.plugin.settings.unresolvedLinksFilesToIgnore.join("\n")) + .onChange(function (value) { + var paths = value + .trim() + .split("\n") + .map(function (value) { return _this.formatPath(value, false); }); + _this.plugin.settings.unresolvedLinksFilesToIgnore = + paths; + _this.plugin.saveSettings(); + }); + }); new obsidian.Setting(containerEl) .setName("Exclude links") .setDesc("Exclude files, which contain the given file as link. Add each file path in a new line (with file extension!). Set it to `*` to exclude files with links.") - .addTextArea(function (cb) { return cb - .setPlaceholder("Directory/file.md") - .setValue(_this.plugin.settings.unresolvedLinksLinksToIgnore.join("\n")) - .onChange(function (value) { - var paths = value.trim().split("\n").map(function (value) { return _this.formatPath(value, false); }); - _this.plugin.settings.unresolvedLinksLinksToIgnore = paths; - _this.plugin.saveSettings(); - }); }); + .addTextArea(function (cb) { + return cb + .setPlaceholder("Directory/file.md") + .setValue(_this.plugin.settings.unresolvedLinksLinksToIgnore.join("\n")) + .onChange(function (value) { + var paths = value + .trim() + .split("\n") + .map(function (value) { return _this.formatPath(value, false); }); + _this.plugin.settings.unresolvedLinksLinksToIgnore = + paths; + _this.plugin.saveSettings(); + }); + }); new obsidian.Setting(containerEl) .setName("Exclude filetypes") .setDesc("Exclude links with the specified filetype. Add each filetype separated by comma") - .addTextArea(function (cb) { return cb - .setPlaceholder("docx,txt") - .setValue(_this.plugin.settings.unresolvedLinksFileTypesToIgnore.join(",")) - .onChange(function (value) { - var extensions = value.trim().split(","); - _this.plugin.settings.unresolvedLinksFileTypesToIgnore = extensions; - _this.plugin.saveSettings(); - }); }); + .addTextArea(function (cb) { + return cb + .setPlaceholder("docx,txt") + .setValue(_this.plugin.settings.unresolvedLinksFileTypesToIgnore.join(",")) + .onChange(function (value) { + var extensions = value.trim().split(","); + _this.plugin.settings.unresolvedLinksFileTypesToIgnore = + extensions; + _this.plugin.saveSettings(); + }); + }); new obsidian.Setting(containerEl) .setName("Exclude tags") .setDesc("Exclude links in files, which contain the given tag. Add each tag separated by comma (without `#`)") - .addTextArea(function (cb) { return cb - .setPlaceholder("todo,unfinished") - .setValue(_this.plugin.settings.unresolvedLinksTagsToIgnore.join(",")) - .onChange(function (value) { - var tags = value.trim().split(","); - _this.plugin.settings.unresolvedLinksTagsToIgnore = tags; - _this.plugin.saveSettings(); - }); }); - containerEl.createEl("h4", { text: "Settings for finding files without tags" }); + .addTextArea(function (cb) { + return cb + .setPlaceholder("todo,unfinished") + .setValue(_this.plugin.settings.unresolvedLinksTagsToIgnore.join(",")) + .onChange(function (value) { + var tags = value.trim().split(","); + _this.plugin.settings.unresolvedLinksTagsToIgnore = tags; + _this.plugin.saveSettings(); + }); + }); + containerEl.createEl("h4", { + text: "Settings for finding files without tags", + }); new obsidian.Setting(containerEl) - .setName('Output file name') - .setDesc('Set name of output file (without file extension). Make sure no file exists with this name because it will be overwritten! If the name is empty, the default name is set.') - .addText(function (cb) { return cb.onChange(function (value) { - if (value.length == 0) { - _this.plugin.settings.withoutTagsOutputFileName = _this.defaultSettings.withoutTagsOutputFileName; - } - else { - _this.plugin.settings.withoutTagsOutputFileName = value; - } - _this.plugin.saveSettings(); - }).setValue(_this.plugin.settings.withoutTagsOutputFileName); }); + .setName("Output file name") + .setDesc("Set name of output file (without file extension). Make sure no file exists with this name because it will be overwritten! If the name is empty, the default name is set.") + .addText(function (cb) { + return cb + .onChange(function (value) { + if (value.length == 0) { + _this.plugin.settings.withoutTagsOutputFileName = + _this.defaultSettings.withoutTagsOutputFileName; + } + else { + _this.plugin.settings.withoutTagsOutputFileName = + value; + } + _this.plugin.saveSettings(); + }) + .setValue(_this.plugin.settings.withoutTagsOutputFileName); + }); new obsidian.Setting(containerEl) .setName("Exclude files") .setDesc("Exclude the specific files. Add each file path in a new line (with file extension!)") - .addTextArea(function (cb) { return cb - .setPlaceholder("Directory/file.md") - .setValue(_this.plugin.settings.withoutTagsFilesToIgnore.join("\n")) - .onChange(function (value) { - var paths = value.trim().split("\n").map(function (value) { return _this.formatPath(value, false); }); - _this.plugin.settings.withoutTagsFilesToIgnore = paths; - _this.plugin.saveSettings(); - }); }); + .addTextArea(function (cb) { + return cb + .setPlaceholder("Directory/file.md") + .setValue(_this.plugin.settings.withoutTagsFilesToIgnore.join("\n")) + .onChange(function (value) { + var paths = value + .trim() + .split("\n") + .map(function (value) { return _this.formatPath(value, false); }); + _this.plugin.settings.withoutTagsFilesToIgnore = paths; + _this.plugin.saveSettings(); + }); + }); new obsidian.Setting(containerEl) .setName("Exclude directories") .setDesc("Exclude files in the specified directories. Add each directory path in a new line") - .addTextArea(function (cb) { return cb - .setPlaceholder("Directory/Subdirectory") - .setValue(_this.plugin.settings.withoutTagsDirectoriesToIgnore.join("\n")) - .onChange(function (value) { - var paths = value.trim().split("\n").map(function (value) { return _this.formatPath(value, true); }); - _this.plugin.settings.withoutTagsDirectoriesToIgnore = paths; - _this.plugin.saveSettings(); - }); }); + .addTextArea(function (cb) { + return cb + .setPlaceholder("Directory/Subdirectory") + .setValue(_this.plugin.settings.withoutTagsDirectoriesToIgnore.join("\n")) + .onChange(function (value) { + var paths = value + .trim() + .split("\n") + .map(function (value) { return _this.formatPath(value, true); }); + _this.plugin.settings.withoutTagsDirectoriesToIgnore = + paths; + _this.plugin.saveSettings(); + }); + }); /// Settings for empty files - containerEl.createEl("h4", { text: "Settings for finding empty files" }); + containerEl.createEl("h4", { + text: "Settings for finding empty files", + }); + new obsidian.Setting(containerEl) + .setName("Output file name") + .setDesc("Set name of output file (without file extension). Make sure no file exists with this name because it will be overwritten! If the name is empty, the default name is set.") + .addText(function (cb) { + return cb + .onChange(function (value) { + if (value.length == 0) { + _this.plugin.settings.emptyFilesOutputFileName = + _this.defaultSettings.emptyFilesOutputFileName; + } + else { + _this.plugin.settings.emptyFilesOutputFileName = + value; + } + _this.plugin.saveSettings(); + }) + .setValue(_this.plugin.settings.emptyFilesOutputFileName); + }); new obsidian.Setting(containerEl) .setName("Exclude files in the given directories") .setDesc("Enable to exclude files in the given directories. Disable to only include files in the given directories") .addToggle(function (cb) { - return cb.setValue(_this.plugin.settings.emptyFilesIgnoreDirectories) + return cb + .setValue(_this.plugin.settings.emptyFilesIgnoreDirectories) .onChange(function (value) { - _this.plugin.settings.emptyFilesIgnoreDirectories = value; + _this.plugin.settings.emptyFilesIgnoreDirectories = + value; _this.plugin.saveSettings(); }); }); new obsidian.Setting(containerEl) .setName("Directories") .setDesc("Add each directory path in a new line") - .addTextArea(function (cb) { return cb - .setPlaceholder("Directory/Subdirectory") - .setValue(_this.plugin.settings.emptyFilesDirectories.join("\n")) - .onChange(function (value) { - var paths = value.trim().split("\n").map(function (value) { return _this.formatPath(value, true); }); - _this.plugin.settings.emptyFilesDirectories = paths; - _this.plugin.saveSettings(); - }); }); + .addTextArea(function (cb) { + return cb + .setPlaceholder("Directory/Subdirectory") + .setValue(_this.plugin.settings.emptyFilesDirectories.join("\n")) + .onChange(function (value) { + var paths = value + .trim() + .split("\n") + .map(function (value) { return _this.formatPath(value, true); }); + _this.plugin.settings.emptyFilesDirectories = paths; + _this.plugin.saveSettings(); + }); + }); new obsidian.Setting(containerEl) .setName("Exclude files") .setDesc("Add each file path in a new line (with file extension!)") - .addTextArea(function (cb) { return cb - .setPlaceholder("Directory/file.md") - .setValue(_this.plugin.settings.emptyFilesFilesToIgnore.join("\n")) - .onChange(function (value) { - var paths = value.trim().split("\n").map(function (value) { return _this.formatPath(value, false); }); - _this.plugin.settings.emptyFilesFilesToIgnore = paths; - _this.plugin.saveSettings(); - }); }); + .addTextArea(function (cb) { + return cb + .setPlaceholder("Directory/file.md") + .setValue(_this.plugin.settings.emptyFilesFilesToIgnore.join("\n")) + .onChange(function (value) { + var paths = value + .trim() + .split("\n") + .map(function (value) { return _this.formatPath(value, false); }); + _this.plugin.settings.emptyFilesFilesToIgnore = paths; + _this.plugin.saveSettings(); + }); + }); new obsidian.Setting(containerEl) - .setName('Donate') - .setDesc('If you like this Plugin, consider donating to support continued development.') + .setName("Donate") + .setDesc("If you like this Plugin, consider donating to support continued development.") .addButton(function (bt) { - bt.buttonEl.outerHTML = "Buy Me a Coffee at ko-fi.com"; + bt.buttonEl.outerHTML = + "Buy Me a Coffee at ko-fi.com"; }); }; return SettingsTab; @@ -454,12 +571,15 @@ var Utils = /** @class */ (function () { Utils.prototype.hasTagsToIgnore = function () { var _this = this; var tags = obsidian.getAllTags(this.fileCache); - return (tags === null || tags === void 0 ? void 0 : tags.find(function (tag) { return _this.tagsToIgnore.contains(tag.substring(1)); })) !== undefined; + return ((tags === null || tags === void 0 ? void 0 : tags.find(function (tag) { + return _this.tagsToIgnore.contains(tag.substring(1)); + })) !== undefined); }; Utils.prototype.hasLinksToIgnore = function () { var _this = this; var _a, _b; - if ((((_a = this.fileCache) === null || _a === void 0 ? void 0 : _a.embeds) != null || ((_b = this.fileCache) === null || _b === void 0 ? void 0 : _b.links) != null) && this.linksToIgnore[0] == "*") { + if ((((_a = this.fileCache) === null || _a === void 0 ? void 0 : _a.embeds) != null || ((_b = this.fileCache) === null || _b === void 0 ? void 0 : _b.links) != null) && + this.linksToIgnore[0] == "*") { return true; } return obsidian.iterateCacheRefs(this.fileCache, function (cb) { @@ -487,7 +607,10 @@ var Utils = /** @class */ (function () { return this.filesToIgnore.contains(this.filePath); }; Utils.prototype.isValid = function () { - return !this.hasTagsToIgnore() && !this.hasLinksToIgnore() && !this.checkDirectory() && !this.isFileToIgnore(); + return (!this.hasTagsToIgnore() && + !this.hasLinksToIgnore() && + !this.checkDirectory() && + !this.isFileToIgnore()); }; /** * Writes the text to the file and opens the file in a new pane if it is not opened yet @@ -507,7 +630,8 @@ var Utils = /** @class */ (function () { return [2 /*return*/]; fileIsAlreadyOpened = false; app.workspace.iterateAllLeaves(function (leaf) { - if (leaf.getDisplayText() != "" && outputFileName.startsWith(leaf.getDisplayText())) { + if (leaf.getDisplayText() != "" && + outputFileName.startsWith(leaf.getDisplayText())) { fileIsAlreadyOpened = true; } }); @@ -519,7 +643,9 @@ var Utils = /** @class */ (function () { case 2: file = app.vault.getAbstractFileByPath(outputFileName); if (!(file instanceof obsidian.TFile)) return [3 /*break*/, 4]; - return [4 /*yield*/, app.workspace.getLeavesOfType("empty")[0].openFile(file)]; + return [4 /*yield*/, app.workspace + .getLeavesOfType("empty")[0] + .openFile(file)]; case 3: _a.sent(); return [3 /*break*/, 5]; @@ -574,44 +700,44 @@ var FindOrphanedFilesPlugin = /** @class */ (function (_super) { return __generator(this, function (_a) { switch (_a.label) { case 0: - console.log('loading ' + this.manifest.name + " plugin"); + console.log("loading " + this.manifest.name + " plugin"); return [4 /*yield*/, this.loadSettings()]; case 1: _a.sent(); this.addCommand({ - id: 'find-unlinked-files', - name: 'Find orphaned files', + id: "find-unlinked-files", + name: "Find orphaned files", callback: function () { return _this.findOrphanedFiles(); }, }); this.addCommand({ - id: 'find-unresolved-link', - name: 'Find broken links', + id: "find-unresolved-link", + name: "Find broken links", callback: function () { return _this.findBrokenLinks(); }, }); this.addCommand({ id: "delete-unlinked-files", name: "Delete orphaned files with certain extension. See README", - callback: function () { return _this.deleteOrphanedFiles(); } + callback: function () { return _this.deleteOrphanedFiles(); }, }); this.addCommand({ id: "create-files-of-broken-links", name: "Create files of broken links", - callback: function () { return _this.createFilesOfBrokenLinks(); } + callback: function () { return _this.createFilesOfBrokenLinks(); }, }); this.addCommand({ id: "find-files-without-tags", name: "Find files without tags", - callback: function () { return _this.findFilesWithoutTags(); } + callback: function () { return _this.findFilesWithoutTags(); }, }); this.addCommand({ id: "find-empty-files", name: "Find empty files", - callback: function () { return _this.findEmptyFiles(); } + callback: function () { return _this.findEmptyFiles(); }, }); this.addCommand({ id: "delete-empty-files", name: "Delete empty files", - callback: function () { return _this.deleteEmptyFiles(); } + callback: function () { return _this.deleteEmptyFiles(); }, }); this.addSettingTab(new SettingsTab(this.app, this, DEFAULT_SETTINGS)); this.app.workspace.on("file-menu", function (menu, file, source, leaf) { @@ -620,7 +746,9 @@ var FindOrphanedFilesPlugin = /** @class */ (function (_super) { cb.setIcon("search"); cb.setTitle("Find orphaned files"); // Add trailing slash to catch files named like the directory. See https://github.com/Vinzent03/find-unlinked-files/issues/24 - cb.onClick(function (e) { _this.findOrphanedFiles(file.path + "/"); }); + cb.onClick(function (e) { + _this.findOrphanedFiles(file.path + "/"); + }); }); } }); @@ -716,12 +844,13 @@ var FindOrphanedFilesPlugin = /** @class */ (function (_super) { _i++; return [3 /*break*/, 1]; case 4: - console.log(emptyFiles); if (this.settings.disableWorkingLinks) prefix = " "; else prefix = ""; - text = emptyFiles.map(function (file) { return prefix + "- [[" + file.path + "]]"; }).join("\n"); + text = emptyFiles + .map(function (file) { return prefix + "- [[" + file.path + "]]"; }) + .join("\n"); Utils.writeAndOpenFile(this.app, this.settings.emptyFilesOutputFileName + ".md", text, this.settings.openOutputFile); return [2 /*return*/]; } @@ -746,7 +875,9 @@ var FindOrphanedFilesPlugin = /** @class */ (function (_super) { links.push(txt.path); }); }); - var notLinkedFiles = files.filter(function (file) { return _this.isValid(file, links, dir); }); + var notLinkedFiles = files.filter(function (file) { + return _this.isValid(file, links, dir); + }); notLinkedFiles.remove(outFile); var text = ""; var prefix; @@ -755,7 +886,11 @@ var FindOrphanedFilesPlugin = /** @class */ (function (_super) { else prefix = ""; notLinkedFiles.forEach(function (file) { - text += prefix + "- [[" + _this.app.metadataCache.fileToLinktext(file, "/", false) + "]]\n"; + text += + prefix + + "- [[" + + _this.app.metadataCache.fileToLinktext(file, "/", false) + + "]]\n"; }); Utils.writeAndOpenFile(this.app, outFileName, text, this.settings.openOutputFile); }; @@ -778,7 +913,8 @@ var FindOrphanedFilesPlugin = /** @class */ (function (_super) { var file = _this.app.metadataCache.getFirstLinkpathDest(link.link, "/"); if (!file) return; - if (_this.settings.fileTypesToDelete[0] == "*" || _this.settings.fileTypesToDelete.contains(file.extension)) { + if (_this.settings.fileTypesToDelete[0] == "*" || + _this.settings.fileTypesToDelete.contains(file.extension)) { filesToDelete.push(file); } }); @@ -822,7 +958,8 @@ var FindOrphanedFilesPlugin = /** @class */ (function (_super) { var links = []; var brokenLinks = this.app.metadataCache.unresolvedLinks; for (var sourceFilepath in brokenLinks) { - if (sourceFilepath == this.settings.unresolvedLinksOutputFileName + ".md") + if (sourceFilepath == + this.settings.unresolvedLinksOutputFileName + ".md") continue; var fileType = sourceFilepath.substring(sourceFilepath.lastIndexOf(".") + 1); var utils = new Utils(this.app, sourceFilepath, this.settings.unresolvedLinksTagsToIgnore, this.settings.unresolvedLinksLinksToIgnore, this.settings.unresolvedLinksDirectoriesToIgnore, this.settings.unresolvedLinksFilesToIgnore, this.settings.unresolvedLinksIgnoreDirectories); @@ -836,7 +973,10 @@ var FindOrphanedFilesPlugin = /** @class */ (function (_super) { if (fileType == "md") { formattedFilePath = sourceFilepath.substring(0, sourceFilepath.lastIndexOf(".md")); } - var brokenLink = { files: [formattedFilePath], link: link }; + var brokenLink = { + files: [formattedFilePath], + link: link, + }; if (links.contains(brokenLink)) return "continue"; var duplication = links.find(function (e) { return e.link == link; }); @@ -864,7 +1004,8 @@ var FindOrphanedFilesPlugin = /** @class */ (function (_super) { var withoutFiles = files.filter(function (file) { var _a; if (new Utils(_this.app, file.path, [], [], _this.settings.withoutTagsDirectoriesToIgnore, _this.settings.withoutTagsFilesToIgnore, true).isValid()) { - return ((_a = obsidian.getAllTags(_this.app.metadataCache.getFileCache(file)).length) !== null && _a !== void 0 ? _a : 0) <= 0; + return (((_a = obsidian.getAllTags(_this.app.metadataCache.getFileCache(file)) + .length) !== null && _a !== void 0 ? _a : 0) <= 0); } else { return false; @@ -876,7 +1017,9 @@ var FindOrphanedFilesPlugin = /** @class */ (function (_super) { prefix = " "; else prefix = ""; - var text = withoutFiles.map(function (file) { return prefix + "- [[" + file.path + "]]"; }).join("\n"); + var text = withoutFiles + .map(function (file) { return prefix + "- [[" + file.path + "]]"; }) + .join("\n"); Utils.writeAndOpenFile(this.app, outFileName, text, this.settings.openOutputFile); }; /** @@ -908,7 +1051,7 @@ var FindOrphanedFilesPlugin = /** @class */ (function (_super) { return true; }; FindOrphanedFilesPlugin.prototype.onunload = function () { - console.log('unloading ' + this.manifest.name + " plugin"); + console.log("unloading " + this.manifest.name + " plugin"); }; FindOrphanedFilesPlugin.prototype.loadSettings = function () { return __awaiter(this, void 0, void 0, function () { @@ -943,4 +1086,4 @@ var FindOrphanedFilesPlugin = /** @class */ (function (_super) { }(obsidian.Plugin)); module.exports = FindOrphanedFilesPlugin; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFpbi5qcyIsInNvdXJjZXMiOlsibm9kZV9tb2R1bGVzL3RzbGliL3RzbGliLmVzNi5qcyIsInNyYy9kZWxldGVGaWxlc01vZGFsLnRzIiwic3JjL3NldHRpbmdzVGFiLnRzIiwic3JjL3V0aWxzLnRzIiwic3JjL21haW4udHMiXSwic291cmNlc0NvbnRlbnQiOlsiLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKlxyXG5Db3B5cmlnaHQgKGMpIE1pY3Jvc29mdCBDb3Jwb3JhdGlvbi5cclxuXHJcblBlcm1pc3Npb24gdG8gdXNlLCBjb3B5LCBtb2RpZnksIGFuZC9vciBkaXN0cmlidXRlIHRoaXMg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SWdub3JlID0gcGF0aHM7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMucGx1Z2luLnNhdmVTZXR0aW5ncygpO1xuICAgICAgICAgICAgICAgIH0pKTtcbiAgICAgICAgbmV3IFNldHRpbmcoY29udGFpbmVyRWwpXG4gICAgICAgICAgICAuc2V0TmFtZShcIkV4Y2x1ZGUgZmlsZXNcIilcbiAgICAgICAgICAgIC5zZXREZXNjKFwiQWRkIGVhY2ggZmlsZSBwYXRoIGluIGEgbmV3IGxpbmUgKHdpdGggZmlsZSBleHRlbnNpb24hKVwiKVxuICAgICAgICAgICAgLmFkZFRleHRBcmVhKGNiID0+IGNiXG4gICAgICAgICAgICAgICAgLnNldFBsYWNlaG9sZGVyKFwiRGlyZWN0b3J5L2ZpbGUubWRcIilcbiAgICAgICAgICAgICAgICAuc2V0VmFsdWUodGhpcy5wbHVnaW4uc2V0dGluZ3MuZmlsZXNUb0lnbm9yZS5qb2luKFwiXFxuXCIpKVxuICAgICAgICAgICAgICAgIC5vbkNoYW5nZSgodmFsdWUpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgbGV0IHBhdGhzID0gdmFsdWUudHJpbSgpLnNwbGl0KFwiXFxuXCIpLm1hcCh2YWx1ZSA9PiB0aGlzLmZvcm1hdFBhdGgodmFsdWUsIGZhbHNlKSk7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMucGx1Z2luLnNldHRpbmdzLmZpbGVzVG9JZ25vcmUgPSBwYXRocztcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5wbHVnaW4uc2F2ZVNldHRpbmdzKCk7XG4gICAgICAgICAgICAgICAgfSkpO1xuICAgICAgICBuZXcgU2V0dGluZyhjb250YWluZXJFbClcbiAgICAgICAgICAgIC5zZXROYW1lKFwiRXhjbHVkZSBsaW5rc1wiKVxuICAgICAgICAgICAgLnNldERlc2MoXCJFeGNsdWRlIGZpbGVzLCB3aGljaCBjb250YWluIHRoZSBnaXZlbiBmaWxlIGFzIGxpbmsuIEFkZC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zZXRWYWx1ZSh0aGlzLnBsdWdpbi5zZXR0aW5ncy5pZ25vcmVGaWxlVHlwZXMpXG4gICAgICAgICAgICAgICAgICAgIC5vbkNoYW5nZSh2YWx1ZSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnBsdWdpbi5zZXR0aW5ncy5pZ25vcmVGaWxlVHlwZXMgPSB2YWx1ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMucGx1Z2luLnNhdmVTZXR0aW5ncygpO1xuICAgICAgICAgICAgICAgICAgICB9KSk7XG4gICAgICAgIG5ldyBTZXR0aW5nKGNvbnRhaW5lckVsKVxuICAgICAgICAgICAgLnNldE5hbWUoXCJGaWxlIHR5cGVzXCIpXG4gICAgICAgICAgICAuc2V0RGVzYyhcIkVmZmVjdCBkZXBlbmRzIG9uIHRvZ2dsZSBhYm92ZVwiKVxuICAgICAgICAgICAgLmFkZFRleHRBcmVhKGNiID0+IGNiXG4gICAgICAgICAgICAgICAgLnNldFBsYWNlaG9sZGVyKFwiZG9jeCx0eHRcIilcbiAgICAgICAgICAgICAgICAuc2V0VmFsdWUodGhpcy5wbHVnaW4uc2V0dGluZ3MuZmlsZVR5cGVzVG9JZ25vcmUuam9pbihcIixcIikpXG4gICAgICAgICAgICAgICAgLm9uQ2hhbmdlKCh2YWx1ZSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBsZXQgZXh0ZW5zaW9ucyA9IHZhbHVlLnRyaW0oKS5zcGxpdChcIixcIik7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMucGx1Z2luLnNldHRpbmdzLmZpbGVUeXBlc1RvSWdub3JlID0gZXh0ZW5zaW9ucztcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5wbHVnaW4uc2F2ZVNldHRpbmdzKCk7XG4gICAgICAgICAgICAgICAgfSkpO1xuICAgICAgICBuZXcgU2V0dGluZyhjb250YWluZXJFbClcbiAgICAgICAgICAgIC5zZXROYW1lKFwiRXhjbHVkZSB0Y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gICAgICAgICAgICAgICAgICAgbGV0IGV4dGVuc2lvbnMgPSB2YWx1ZS50cmltKCkuc3BsaXQoXCIsXCIpO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnBsdWdpbi5zZXR0aW5ncy51bnJlc29sdmVkTGlua3NGaWxlVHlwZXNUb0lnbm9yZSA9IGV4dGVuc2lvbnM7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMucGx1Z2luLnNhdmVTZXR0aW5ncygpO1xuICAgICAgICAgICAgICAgIH0pKTtcbiAgICAgICAgbmV3IFNldHRpbmcoY29udGFpbmVyRWwpXG4gICAgICAgICAgICAuc2V0TmFtZShcIkV4Y2x1ZGUgdGFnc1wiKVxuICAgICAgICAgICAgLnNldERlc2MoXCJFeGNsdWRlIGxpbmtzIGluIGZpbGVzLCB3aGljaCBjb250YWluIHRoZSBnaXZlbiB0YWcuIEFkZCBlYWNoIHRhZyBzZXBhcmF0ZWQgYnkgY29tbWEgKHdpdGhvdXQgYCNgKVwiKVxuICAgICAgICAgICAgLmFkZFRleHRBcmVhKGNiID0+IGNiXG4gICAgICAgICAgICAgICAgLnNldFBsYWNlaG9sZGVyKFwidG9kbyx1bmZpbmlzaGVkXCIpXG4gICAgICAgICAgICAgICAgLnNldFZhbHVlKHRoaXMucGx1Z2luLnNldHRpbmdzLnVucmVzb2x2ZWRMaW5rc1RhZ3NUb0lnbm9yZS5qb2luKFwiLFwiKSlcbiAgICAgICAgICAgICAgICAub25DaGFuZ2UoKHZhbHVlKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGxldCB0YWdzID0gdmFsdWUudHJpbSgpLnNwbGl0KFwiLFwiKTtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5wbHVnaW4uc2V0dGluZ3MudW5yZXNvbHZlZExpbmtzVGFnc1RvSWdub3JlID0gdGFncztcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5wbHVnaW4uc2F2ZVNldHRpbmdzKCk7XG4gICAgICAgICAgICAgICAgfSkpO1x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uICAgICAgICAgICAgICAgIGNhc2UgNzogb3AgPSBfLm9wcy5wb3AoKTsgXy50cnlzLnBvcCgpOyBjb250aW51ZTtcclxuICAgICAgICAgICAgICAgIGRlZmF1bHQ6XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKCEodCA9IF8udHJ5cywgdCA9IHQubGVuZ3RoID4gMCAmJiB0W3QubGVuZ3RoIC0gMV0pICYmIChvcFswXSA9PT0gNiB8fCBvcFswXSA9PT0gMikpIHsgXyA9IDA7IGNvbnRpbnVlOyB9XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKG9wWzBdID09PSAzICYmICghdCB8fCAob3BbMV0gPiB0WzBdICYmIG9wWzFdIDwgdFszXSkpKSB7IF8ubGFiZWwgPSBvcFsxXTsgYnJlYWs7IH1cclxuICAgICAgICAgICAgICAgICAgICBpZiAob3BbMF0gPT09IDYgJiYgXy5sYWJlbCA8IHRbMV0pIHsgXy5sYWJlbCA9IHRbMV07IHQgPSBvcDsgYnJlYWs7IH1cclxuICAgICAgICAgICAgICAgICAgICBpZiAodCAmJiBfLmxhYmVsIDwgdFsyXSkgeyBfLmxhYmVsID0gdFsyXTsgXy5vcHMucHVzaChvcCk7IGJyZWFrOyB9XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRbMl0pIF8ub3BzLnBvcCgpO1xyXG4gICAgICAgICAgICAgICAgICAgIF8udHJ5cy5wb3AoKTsgY29udGludWU7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgb3AgPSBib2R5LmNhbGwodGhpc0FyZywgXyk7XHJcbiAgICAgICAgfSBjYXRjaCAoZSkgeyBvcCA9IFs2LCBlXTsgeSA9IDA7IH0gZmluYWxseSB7IGYgPSB0ID0gMDsgfVxyXG4gICAgICAgIGlmIChvcFswXSAmIDUpIHRocm93IG9wWzFdOyByZXR1cm4geyB2YWx1ZTogb3BbMF0gPyBvcFsxXSA6IHZvaWQgMCwgZG9uZTogdHJ1ZSB9O1xyXG4gICAgfVx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lIH0pO1xuXG4gICAgICAgIGNvbnRhaW5lckVsLmNyZWF0ZUVsKFwiaDRcIiwge1xuICAgICAgICAgICAgdGV4dDogXCJTZXR0aW5ncyBmb3IgZmluZGluZyBvcnBoYW5lZCBmaWxlc1wiLFxuICAgICAgICB9KTtcblxuICAgICAgICBuZXcgU2V0dGluZyhjb250YWluZXJFbCkuc2V0TmFtZShcIk9wZW4gb3V0cHV0IGZpbGVcIikuYWRkVG9nZ2xlKChjYikgPT5cbiAgICAgICAgICAgIGNiXG4gICAgICAgICAgICAgICAgLnNldFZhbHVlKHRoaXMucGx1Z2luLnNldHRpbmdzLm9wZW5PdXRwdXRGaWxlKVxuICAgICAgICAgICAgICAgIC5vbkNoYW5nZSgodmFsdWUpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5wbHVnaW4uc2V0dGluZ3Mub3Blbk91dHB1dEZpbGUgPSB2YWx1ZTtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5wbHVnaW4uc2F2ZVNldHRpbmdzKCk7XG4gICAgICAgICAgICAgICAgfSlcbiAgICAgICAgKTtcblxuICAgICAgICBuZXcgU2V0dGluZyhjb250YWluZXJFbClcbiAgICAgICAgICAgIC5zZXROYW1lKFwiT3V0cHV0IGZpbGUgbmFtZVwiKVxuICAgICAgICAgICAgLnNldERlc2MoXG4gICAgICAgICAgICAgICAgXCJTZXQgbmFtZSBvZiBvdXRwdXQgZmlsZSAod2l0aG91dCBmaWxlIGV4dGVuc2lvbikuIE1ha2Ugc3VyZSBubyBmaWxlIGV4aXN0cyB3aXRoIHRoaXMgbmFtZSBiZWNhdXNlIGl0IHdpbGwgYmUgb3ZlcndyaXR0ZW4hIElmIHRoZSBuYW1lIGlzIGVtcHR5LCB0aGUgZGVmYXVsdCBuYW1lIGlzIHNldC5cIlxuICAgICAgICAgICAgKVxuICAgICAgICAgICAgLmFkZFRleHQoKGNiKSA9PlxuICAgICAgICAgICAgICAgIGNiXG4gICAgICAgICAgICAgICAgICAgIC5vbkNoYW5nZSgodmFsdWUpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh2YWx1ZS5sZW5ndGggPT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMucGx1Z2luLnNldHRpbmdzLm91dHB1dEZpbGVOYW1lID1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5kZWZhdWx0U2V0dGluZ3Mub3V0cHV0RmlsZU5hbWU7XG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMucGx1Z2luLnNldHRpbmdzLm91dHB1dEZpbGVOYW1lID0gdmFsdWU7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnBsdWdpbi5zYXZlU2V0dGluZ3MoKTtcbiAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAgICAgLnNldFZhbHVlKHRoaXMucGx1Z2luLnNldHRpbmdzLm91dHB1dEZpbGVOYW1lKVxuICAgICAgICAgICAgKTtcblxuICAgICAgICBuZXcgU2V0dGluZyhjb250YWluZXJFbClcbiAgICAgICAgICAgIC5zZXROYW1lKFwiRGlzYWJsZSB3b3JraW5nIGxpbmtzXCIpXG4gICAgICAgICAgICAuc2V0RGVzYyhcbiAgICAgICAgICAgICAgICBcIkluZGVudCBsaW5lcyB0byBkaXNhYmxlIHRoZSBsaW5rIGFuZCB0byBjbGVhbiB1cCB0aGUgZ3JhcGggdmlld1wiXG4gICAgICAgICAgICApXG4gICAgICAgICAgICAuYWRkVG9nZ2xlKChjYikgPT5cbiAgICAgICAgICAgICAgICBjYlxuICAgICAgICAgICAgICAgICAgICAub25DaGFuZ2UoKHZhbHVlKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnBsdWdpbi5zZXR0aW5ncy5kaXNhYmxlV29ya2luZ0xpbmtzID0gdmFsdWU7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnBsdWdpbi5zYXZlU2V0dGluZ3MoKTtcbiAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAgICAgLnNldFZhbHVlKHRoaXMucGx1Z2luLnNldHRpbmdzLmRpc2FibGVXb3JraW5nTGlua3MpXG4gICAgICAgICAgICApO1xuXG4gICAgICAgIG5ldyBTZXR0aW5nKGNvbnRhaW5lckVsKVxuICAgICAgICAgICAgLnNldE5hbWUoXCJFeGNsdWRlIGZpbGVzIGluIHRoZSBnaXZlbiBkaXJlY3Rvcmllc1wiKVxuICAgICAgICAgICAgLnNldERlc2MoXG4gICAgICAgICAgICAgICAgXCJFbmFibGUgdG8gZXhjbHVkZSBmaWxlcyBpbiB0aGUgZ2l2ZW4gZGlyZWN0b3JpZXMuIERpc2FibGUgdG8gb25seSBpbmNsdWRlIGZpbGVzIGluIHRoZSBnaXZlbiBkaXJlY3Rvcmllc1wiXG4gICAgICAgICAgICApXG4gICAgICAgICAgICAuYWRkVG9nZ2xlKChjYikgPT5cbiAgICAgICAgICAgICAgICBjYlxuICAgICAgICAgICAgICAgICAgICAuc2V0VmFsdWUodGhpcy5wbHVnaW4uc2V0dGluZ3MuaWdub3JlRGlyZWN0b3JpZXMpXG4gICAgICAgICAgICAgICAgICAgIC5vbkNoYW5nZSgodmFsdWUpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMucGx1Z2luLnNldHRpbmdzLmlnbm9yZURpcmVjdG9yaWVzID0gdmFsdWU7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnBsdWdpbi5zYXZlU2V0dGluZ3MoKTtcbiAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICk7XG5cbiAgICAgICAgbmV3IFNldHRpbmcoY29udGFpbmVyRWwpXG4gICAgICAgICAgICAuc2V0TmFtZShcIkRpcmVjdG9yaWVzXCIpXG4gICAgICAgICAgICAuc2V0RGVzYyhcIkFkZCBlYWNoIGRpcmVjdG9yeSBwYXRoIGluIGEgbmV3IGxpbmVcIilcbiAgICAgICAgICAgIC5hZGRUZXh0QXJlYSgoY2IpID0+XG4gICAgICAgICAgICAgICAgY2JcbiAgICAgICAgICAgICAgICAgICAgLnNldFBsYWNlaG9sZGVyKFwiRGlyZWN0b3J5L1N1YmRpcmVjdG9yeVwiKVxuICAgICAgICAgICAgICAgICAgICAuc2V0VmFsdWUoXG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnBsdWdpbi5zZXR0aW5ncy5kaXJlY3Rvcmllc1RvSWdub3JlLmpvaW4oXCJcXG5cIilcbiAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICAub25DaGFuZ2UoKHZhbHVlKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgcGF0aHMgPSB2YWx1ZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC50cmltKClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAuc3BsaXQoXCJcXG5cIilcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAubWFwKCh2YWx1ZSkgPT4gdGhpcy5mb3JtYXRQYXRoKHZhbHVlLCB0cnVlKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnBsdWdpbi5zZXR0aW5ncy5kaXJlY3Rvcmllc1RvSWdub3JlID0gcGF0aHM7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnBsdWdpbi5zYXZlU2V0dGluZ3MoKTtcbiAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICk7XG4gICAgICAgIG5ldyBTZXR0aW5nKGNvbnRhaW5lckVsKVxuICAgICAgICAgICAgLnNldE5hbWUoXCJFeGNsdWRlIGZpbGVzXCIpXG4gICAgICAgICAgICAuc2V0RGVzYyhcIkFkZCBlYWNoIGZpbGUgcGF0aCBpbiBhIG5ldyBsaW5lICh3aXRoIGZpbGUgZXh0ZW5zaW9uISlcIilcbiAgICAgICAgICAgIC5hZGRUZXh0QXJlYSgoY2IpID0+XG4gICAgICAgICAgICAgICAgY2JcbiAgICAgICAgICAgICAgICAgICAgLnNldFBsYWNlaG9sZGVyKFwiRGlyZWN0b3J5L2ZpbGUubWRcIilcbiAgICAgICAgICAgICAgICAgICAgLnNldFZhbHVlKHRoaXMucGx1Z2luLnNldHRpbmdzLmZpbGVzVG9JZ25vcmUuam9pbihcIlxcblwiKSlcbiAgICAgICAgICAgICAgICAgICAgLm9uQ2hhbmdlKCh2YWx1ZSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHBhdGhzID0gdmFsdWVcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAudHJpbSgpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLnNwbGl0KFwiXFxuXCIpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLm1hcCgodmFsdWUpID0+IHRoaXMuZm9ybWF0UGF0aCh2YWx1ZSwgZmFsc2UpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMucGx1Z2luLnNldHRpbmdzLmZpbGVzVG9JZ25vcmUgPSBwYXRocztcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMucGx1Z2luLnNhdmVTZXR0aW5ncygpO1xuICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgKTtcbiAgICAgICAgbmV3IFNldHRpbmcoY29udGFpbmVyRWwpXG4gICAgICAgICAgICAuc2V0TmFtZShcIkV4Y2x1ZGUgbGlua3NcIilcbiAgICAgICAgICAgIC5zZXREZXNjKFxuICAgICAgICAgICAgICAgIFwiRXhjbHVkZSBmaWxlcywgd2hpY2ggY29udGFpbiB0aGUgZ2l2ZW4gZmlsZSBhcyBsaW5rLiBBZGQgZWFjaCBmaWxlIHBhdGggaW4gYSBuZXcgbGluZSAod2l0aCBmaWxlIGV4dGVuc2lvbiEpLiBTZXQgaXQgdG8gYCpgIHRvIGV4Y2x1ZGUgZmlsZXMgd2l0aCBsaW5rcy5cIlxuICAgICAgICAgICAgKVxuICAgICAgICAgICAgLmFkZFRleHRBcmVhKChjYikgPT5cbiAgICAgICAgICAgICAgICBjYlxuICAgICAgICAgICAgICAgICAgICAuc2V0UGxhY2Vob2xkZXIoXCJEaXJlY3RvcnkvZmlsZS5tZFwiKVxuICAgICAgICAgICAgICAgICAgICAuc2V0VmFsdWUodGhpcy5wbHVnaW4uc2V0dGluZ3MubGlua3NUb0lnbm9yZS5qb2luKFwiXFxuXCIpKVxuICAgICAgICAgICAgICAgICAgICAub25DaGFuZ2UoKHZhbHVlKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgcGF0aHMgPSB2YWx1ZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC50cmltKClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAuc3BsaXQoXCJcXG5cIilcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAubWFwKCh2YWx1ZSkgPT4gdGhpcy5mb3JtYXRQYXRoKHZhbHVlLCBmYWxzZSkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5wbHVnaW4uc2V0dGluZ3MubGlua3NUb0lnbm9yZSA9IHBhdGhzO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5wbHVnaW4uc2F2ZVNldHRpbmdzKCk7XG4gICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICApO1xuICAgICAgICBuZXcgU2V0dGluZyhjb250YWluZXJFbClcbiAgICAgICAgICAgIC5zZXROYW1lKFwiRXhjbHVkZSBmaWxlcyB3aXRoIHRoZSBnaXZlbiBmaWxldHlwZXNcIilcbiAgICAgICAgICAgIC5zZXREZXNjKFxuICAgICAgICAgICAgICAgIFwiRW5hYmxlIHRvIGV4Y2x1ZGUgZmlsZXMgd2l0aCB0aGUgZ2l2ZW4gZmlsZXR5cGVzLiBEaXNhYmxlIHRvIG9ubHkgaW5jbHVkZSBmaWxlcyB3aXRoIHRoZSBnaXZlbiBmaWxldHlwZXNcIlxuICAgICAgICAgICAgKVxuICAgICAgICAgICAgLmFkZFRvZ2dsZSgoY2IpID0+XG4gICAgICAgICAgICAgICAgY2JcbiAgICAgICAgICAgICAgICAgICAgLnNldFZhbHVlKHRoaXMucGx1Z2luLnNldHRpbmdzLmlnbm9yZUZpbGVUeXBlcylcbiAgICAgICAgICAgICAgICAgICAgLm9uQ2hhbmdlKCh2YWx1ZSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5wbHVnaW4uc2V0dGluZ3MuaWdub3JlRmlsZVR5cGVzID0gdmFsdWU7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnBsdWdpbi5zYXZlU2V0dGluZ3MoKTtcbiAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICk7XG4gICAgICAgIG5ldyBTZXR0aW5nKGNvbnRhaW5lckVsKVxuICAgICAgICAgICAgLnNldE5hbWUoXCJGaWxlIHR5cGVzXCIpXG4gICAgICAgICAgICAuc2V0RGVzYyhcIkVmZmVjdCBkZXBlbmRzIG9uIHRvZ2dsZSBhYm92ZVwiKVxuICAgICAgICAgICAgLmFkZFRleHRBcmVhKChjYikgPT5cbiAgICAgICAgICAgICAgICBjYlxuICAgICAgICAgICAgICAgICAgICAuc2V0UGxhY2Vob2xkZXIoXCJkb2N4LHR4dFwiKVxuICAgICAgICAgICAgICAgICAgICAuc2V0VmFsdWUodGhpcy5wbHVnaW4uc2V0dGluZ3MuZmlsZVR5cGVzVG9JZ25vcmUuam9pbihcIixcIikpXG4gICAgICAgICAgICAgICAgICAgIC5vbkNoYW5nZSgodmFsdWUpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBleHRlbnNpb25zID0gdmFsdWUudHJpbSgpLnNwbGl0KFwiLFwiKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMucGx1Z2luLnNldHRpbmdzLmZpbGVUeXBlc1RvSWdub3JlID0gZXh0ZW5zaW9ucztcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMucGx1Z2luLnNhdmVTZXR0aW5ncygpO1xuICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgKTtcbiAgICAgICAgbmV3IFNldHRpbmcoY29udGFpbmVyRWwpXG4gICAgICAgICAgICAuc2V0TmFtZShcIkV4Y2x1ZGUgdGFnc1wiKVxuICAgICAgICAgICAgLnNldERlc2MoXG4gICAgICAgICAgICAgICAgXCJFeGNsdWRlIGZpbGVzLCB3aGljaCBjb250YWluIHRoZSBnaXZlbiB0YWcuIEFkZCBlYWNoIHRhZyBzZXBhcmF0ZWQgYnkgY29tbWEgKHdpdGhvdXQgYCNgKVwiXG4gICAgICAgICAgICApXG4gICAgICAgICAgICAuYWRkVGV4dEFyZWEoKGNiKSA9PlxuICAgICAgICAgICAgICAgIGNiXG4gICAgICAgICAgICAgICAgICAgIC5zZXRQbGFjZWhvbGRlcihcInRvZG8sdW5maW5pc2hlZFwiKVxuICAgICAgICAgICAgICAgICAgICAuc2V0VmFsdWUodGhpcy5wbHVnaW4uc2V0dGluZ3MudGFnc1RvSWdub3JlLmpvaW4oXCIsXCIpKVxuICAgICAgICAgICAgICAgICAgICAub25DaGFuZ2UoKHZhbHVlKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgdGFncyA9IHZhbHVlLnRyaW0oKS5zcGxpdChcIixcIik7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnBsdWdpbi5zZXR0aW5ncy50YWdzVG9JZ25vcmUgPSB0YWdzO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5wbHVnaW4uc2F2ZVNldHRpbmdzKCk7XG4gICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICApO1xuICAgICAgICBuZXcgU2V0dGluZyhjb250YWluZXJFbClcbiAgICAgICAgICAgIC5zZXROYW1lKFwiRmlsZXR5cGVzIHRvIGRlbGV0ZSBwZXIgY29tbWFuZC4gU2VlIFJFQURNRS5cIilcbiAgICAgICAgICAgIC5zZXREZXNjKFxuICAgICAgICAgICAgICAgIFwiQWRkIGVhY2ggZmlsZXR5cGUgc2VwYXJhdGVkIGJ5IGNvbW1hLiBTZXQgdG8gYCpgIHRvIGRlbGV0ZSBhbGwgZmlsZXMuXCJcbiAgICAgICAgICAgIClcbiAgICAgICAgICAgIC5hZGRUZXh0QXJlYSgoY2IpID0+XG4gICAgICAgICAgICAgICAgY2JcbiAgICAgICAgICAgICAgICAgICAgLnNldFBsYWNlaG9sZGVyKFwianBnLHBuZ1wiKVxuICAgICAgICAgICAgICAgICAgICAuc2V0VmFsdWUodGhpcy5wbHVnaW4uc2V0dGluZ3MuZmlsZVR5cGVzVG9EZWxldGUuam9pbihcIixcIikpXG4gICAgICAgICAgICAgICAgICAgIC5vbkNoYW5nZSgodmFsdWUpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBleHRlbnNpb25zID0gdmFsdWUudHJpbSgpLnNwbGl0KFwiLFwiKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMucGx1Z2luLnNldHRpbmdzLmZpbGVUeXBlc1RvRGVsZXRlID0gZXh0ZW5zaW9ucztcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMucGx1Z2luLnNhdmVTZXR0aW5ncygpO1xuICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgKTtcblxuICAgICAgICAvLy8gU2V0dGluZ3MgZm9yIGZpbmQgYnJva2VuTGlua3NcbiAgICAgICAgY29udGFpbmVyRWwuY3JlYXRlRWwoXCJoNFwiLCB7XG4gICAgICAgICAgICB0ZXh0OiBcIlNldHRpbmdzIGZvciBmaW5kaW5nIGJyb2tlbiBsaW5rc1wiLFxuICAgICAgICB9KTtcblxuICAgICAgICBuZXcgU2V0dGluZyhjb250YWluZXJFbClcbiAgICAgICAgICAgIC5zZXROYW1lKFwiT3V0cHV0IGZpbGUgbmFtZVwiKVxuICAgICAgICAgICAgLnNldERlc2MoXG4gICAgICAgICAgICAgICAgXCJTZXQgbmFtZSBvZiBvdXRwdXQgZmlsZSAod2l0aG91dCBmaWxlIGV4dGVuc2lvbikuIE1ha2Ugc3VyZSBubyBmaWxlIGV4aXN0cyB3aXRoIHRoaXMgbmFtZSBiZWNhdXNlIGl0IHdpbGwgYmUgb3ZlcndyaXR0ZW4hIElmIHRoZSBuYW1lIGlzIGVtcHR5LCB0aGUgZGVmYXVsdCBuYW1lIGlzIHNldC5cIlxuICAgICAgICAgICAgKVxuICAgICAgICAgICAgLmFkZFRleHQoKGNiKSA9PlxuICAgICAgICAgICAgICAgIGNiXG4gICAgICAgICAgICAgICAgICAgIC5vbkNoYW5nZSgodmFsdWUpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh2YWx1ZS5sZW5ndGggPT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMucGx1Z2luLnNldHRpbmdzLnVucmVzb2x2ZWRMaW5rc091dHB1dEZpbGVOYW1lID1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5kZWZhdWx0U2V0dGluZ3MudW5yZXNvbHZlZExpbmtzT3V0cHV0RmlsZU5hbWU7XG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMucGx1Z2luLnNldHRpbmdzLnVucmVzb2x2ZWRMaW5rc091dHB1dEZpbGVOYW1lID1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWU7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnBsdWdpbi5zYXZlU2V0dGluZ3MoKTtcbiAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAgICAgLnNldFZhbHVlKFxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5wbHVnaW4uc2V0dGluZ3MudW5yZXNvbHZlZExpbmtzT3V0cHV0RmlsZU5hbWVcbiAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgKTtcblxuICAgICAgICBuZXcgU2V0dGluZyhjb250YWluZXJFbClcbiAgICAgICAgICAgIC5zZXROYW1lKFwiRXhjbHVkZSBmaWxlcyBpbiB0aGUgZ2l2ZW4gZGlyZWN0b3JpZXNcIilcbiAgICAgICAgICAgIC5zZXREZXNjKFxuICAgICAgICAgICAgICAgIFwiRW5hYmxlIHRvIGV4Y2x1ZGUgZmlsZXMgaW4gdGhlIGdpdmVuIGRpcmVjdG9yaWVzLiBEaXNhYmxlIHRvIG9ubHkgaW5jbHVkZSBmaWxlcyBpbiB0aGUgZ2l2ZW4gZGlyZWN0b3JpZXNcIlxuICAgICAgICAgICAgKVxuICAgICAgICAgICAgLmFkZFRvZ2dsZSgoY2IpID0+XG4gICAgICAgICAgICAgICAgY2JcbiAgICAgICAgICAgICAgICAgICAgLnNldFZhbHVlKFxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5wbHVnaW4uc2V0dGluZ3MudW5yZXNvbHZlZExpbmtzSWdub3JlRGlyZWN0b3JpZXNcbiAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICAub25DaGFuZ2UoKHZhbHVlKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnBsdWdpbi5zZXR0aW5ncy51bnJlc29sdmVkTGlua3NJZ25vcmVEaXJlY3RvcmllcyA9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWU7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnBsdWdpbi5zYXZlU2V0dGluZ3MoKTtcbiAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICk7XG5cbiAgICAgICAgbmV3IFNldHRpbmcoY29udGFpbmVyRWwpXG4gICAgICAgICAgICAuc2V0TmFtZShcIkRpcmVjdG9yaWVzXCIpXG4gICAgICAgICAgICAuc2V0RGVzYyhcIkFkZCBlYWNoIGRpcmVjdG9yeSBwYXRoIGluIGEgbmV3IGxpbmVcIilcbiAgICAgICAgICAgIC5hZGRUZXh0QXJlYSgoY2IpID0+XG4gICAgICAgICAgICAgICAgY2JcbiAgICAgICAgICAgICAgICAgICAgLnNldFBsYWNlaG9sZGVyKFwiRGlyZWN0b3J5L1N1YmRpcmVjdG9yeVwiKVxuICAgICAgICAgICAgICAgICAgICAuc2V0VmFsdWUoXG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnBsdWdpbi5zZXR0aW5ncy51bnJlc29sdmVkTGlua3NEaXJlY3Rvcmllc1RvSWdub3JlLmpvaW4oXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXCJcXG5cIlxuICAgICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgIC5vbkNoYW5nZSgodmFsdWUpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBwYXRocyA9IHZhbHVlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLnRyaW0oKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5zcGxpdChcIlxcblwiKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5tYXAoKHZhbHVlKSA9PiB0aGlzLmZvcm1hdFBhdGgodmFsdWUsIHRydWUpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMucGx1Z2luLnNldHRpbmdzLnVucmVzb2x2ZWRMaW5rc0RpcmVjdG9yaWVzVG9JZ25vcmUgPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhdGhzO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5wbHVnaW4uc2F2ZVNldHRpbmdzKCk7XG4gICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICApO1xuXG4gICAgICAgIG5ldyBTZXR0aW5nKGNvbnRhaW5lckVsKVxuICAgICAgICAgICAgLnNldE5hbWUoXCJFeGNsdWRlIGZpbGVzXCIpXG4gICAgICAgICAgICAuc2V0RGVzYyhcbiAgICAgICAgICAgICAgICBcIkV4Y2x1ZGUgbGlua3MgaW4gdGhlIHNwZWNpZmllZCBmaWxlLiBBZGQgZWFjaCBmaWxlIHBhdGggaW4gYSBuZXcgbGluZSAod2l0aCBmaWxlIGV4dGVuc2lvbiEpXCJcbiAgICAgICAgICAgIClcbiAgICAgICAgICAgIC5hZGRUZXh0QXJlYSgoY2IpID0+XG4gICAgICAgICAgICAgICAgY2JcbiAgICAgICAgICAgICAgICAgICAgLnNldFBsYWNlaG9sZGVyKFwiRGlyZWN0b3J5L2ZpbGUubWRcIilcbiAgICAgICAgICAgICAgICAgICAgLnNldFZhbHVlKFxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5wbHVnaW4uc2V0dGluZ3MudW5yZXNvbHZlZExpbmtzRmlsZXNUb0lnbm9yZS5qb2luKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwiXFxuXCJcbiAgICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICAub25DaGFuZ2UoKHZhbHVlKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgcGF0aHMgPSB2YWx1ZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC50cmltKClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAuc3BsaXQoXCJcXG5cIilcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAubWFwKCh2YWx1ZSkgPT4gdGhpcy5mb3JtYXRQYXRoKHZhbHVlLCBmYWxzZSkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5wbHVnaW4uc2V0dGluZ3MudW5yZXNvbHZlZExpbmtzRmlsZXNUb0lnbm9yZSA9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGF0aHM7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnBsdWdpbi5zYXZlU2V0dGluZ3MoKTtcbiAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICk7XG4gICAgICAgIG5ldyBTZXR0aW5nKGNvbnRhaW5lckVsKVxuICAgICAgICAgICAgLnNldE5hbWUoXCJFeGNsdWRlIGxpbmtzXCIpXG4gICAgICAgICAgICAuc2V0RGVzYyhcbiAgICAgICAgICAgICAgICBcIkV4Y2x1ZGUgZmlsZXMsIHdoaWNoIGNvbnRhaW4gdGhlIGdpdmVuIGZpbGUgYXMgbGluay4gQWRkIGVhY2ggZmlsZSBwYXRoIGluIGEgbmV3IGxpbmUgKHdpdGggZmlsZSBleHRlbnNpb24hKS4gU2V0IGl0IHRvIGAqYCB0byBleGNsdWRlIGZpbGVzIHdpdGggbGlua3MuXCJcbiAgICAgICAgICAgIClcbiAgICAgICAgICAgIC5hZGRUZXh0QXJlYSgoY2IpID0+XG4gICAgICAgICAgICAgICAgY2JcbiAgICAgICAgICAgICAgICAgICAgLnNldFBsYWNlaG9sZGVyKFwiRGlyZWN0b3J5L2ZpbGUubWRcIilcbiAgICAgICAgICAgICAgICAgICAgLnNldFZhbHVlKFxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5wbHVnaW4uc2V0dGluZ3MudW5yZXNvbHZlZExpbmtzTGlua3NUb0lnbm9yZS5qb2luKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwiXFxuXCJcbiAgICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICAub25DaGFuZ2UoKHZhbHVlKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgcGF0aHMgPSB2YWx1ZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC50cmltKClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAuc3BsaXQoXCJcXG5cIilcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAubWFwKCh2YWx1ZSkgPT4gdGhpcy5mb3JtYXRQYXRoKHZhbHVlLCBmYWxzZSkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5wbHVnaW4uc2V0dGluZ3MudW5yZXNvbHZlZExpbmtzTGlua3NUb0lnbm9yZSA9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGF0aHM7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnBsdWdpbi5zYXZlU2V0dGluZ3MoKTtcbiAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICk7XG4gICAgICAgIG5ldyBTZXR0aW5nKGNvbnRhaW5lckVsKVxuICAgICAgICAgICAgLnNldE5hbWUoXCJFeGNsdWRlIGZpbGV0eXBlc1wiKVxuICAgICAgICAgICAgLnNldERlc2MoXG4gICAgICAgICAgICAgICAgXCJFeGNsdWRlIGxpbmtzIHdpdGggdGhlIHNwZWNpZmllZCBmaWxldHlwZS4gQWRkIGVhY2ggZmlsZXR5cGUgc2VwYXJhdGVkIGJ5IGNvbW1hXCJcbiAgICAgICAgICAgIClcbiAgICAgICAgICAgIC5hZGRUZXh0QXJlYSgoY2IpID0+XG4gICAgICAgICAgICAgICAgY2JcbiAgICAgICAgICAgICAgICAgICAgLnNldFBsYWNlaG9sZGVyKFwiZG9jeCx0eHRcIilcbiAgICAgICAgICAgICAgICAgICAgLnNldFZhbHVlKFxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5wbHVnaW4uc2V0dGluZ3MudW5yZXNvbHZlZExpbmtzRmlsZVR5cGVzVG9JZ25vcmUuam9pbihcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBcIixcIlxuICAgICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgIC5vbkNoYW5nZSgodmFsdWUpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBleHRlbnNpb25zID0gdmFsdWUudHJpbSgpLnNwbGl0KFwiLFwiKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMucGx1Z2luLnNldHRpbmdzLnVucmVzb2x2ZWRMaW5rc0ZpbGVUeXBlc1RvSWdub3JlID1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRlbnNpb25zO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5wbHVnaW4uc2F2ZVNldHRpbmdzKCk7XG4gICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICApO1xuICAgICAgICBuZXcgU2V0dGluZyhjb250YWluZXJFbClcbiAgICAgICAgICAgIC5zZXROYW1lKFwiRXhjbHVkZSB0YWdzXCIpXG4gICAgICAgICAgICAuc2V0RGVzYyhcbiAgICAgICAgICAgICAgICBcIkV4Y2x1ZGUgbGlua3MgaW4gZmlsZXMsIHdoaWNoIGNvbnRhaW4gdGhlIGdpdmVuIHRhZy4gQWRkIGVhY2ggdGFnIHNlcGFyYXRlZCBieSBjb21tYSAod2l0aG91dCBgI2ApXCJcbiAgICAgICAgICAgIClcbiAgICAgICAgICAgIC5hZGRUZXh0QXJlYSgoY2IpID0+XG4gICAgICAgICAgICAgICAgY2JcbiAgICAgICAgICAgICAgICAgICAgLnNldFBsYWNlaG9sZGVyKFwidG9kbyx1bmZpbmlzaGVkXCIpXG4gICAgICAgICAgICAgICAgICAgIC5zZXRWYWx1ZShcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMucGx1Z2luLnNldHRpbmdzLnVucmVzb2x2ZWRMaW5rc1RhZ3NUb0lnbm9yZS5qb2luKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwiLFwiXG4gICAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgLm9uQ2hhbmdlKCh2YWx1ZSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHRhZ3MgPSB2YWx1ZS50cmltKCkuc3BsaXQoXCIsXCIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5wbHVnaW4uc2V0dGluZ3MudW5yZXNvbHZlZExpbmtzVGFnc1RvSWdub3JlID0gdGFncztcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMucGx1Z2luLnNhdmVTZXR0aW5ncygpO1xuICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgKTtcblxuICAgICAgICBjb250YWluZXJFbC5jcmVhdGVFbChcImg0XCIsIHtcbiAgICAgICAgICAgIHRleHQ6IFwiU2V0dGluZ3MgZm9yIGZpbmRpbmcgZmlsZXMgd2l0aG91dCB0YWdzXCIsXG4gICAgICAgIH0pO1xuXG4gICAgICAgIG5ldyBTZXR0aW5nKGNvbnRhaW5lckVsKVxuICAgICAgICAgICAgLnNldE5hbWUoXCJPdXRwdXQgZmlsZSBuYW1lXCIpXG4gICAgICAgICAgICAuc2V0RGVzYyhcbiAgICAgICAgICAgICAgICBcIlNldCBuYW1lIG9mIG91dHB1dCBmaWxlICh3aXRob3V0IGZpbGUgZXh0ZW5zaW9uKS4gTWFrZSBzdXJlIG5vIGZpbGUgZXhpc3RzIHdpdGggdGhpcyBuYW1lIGJlY2F1c2UgaXQgd2lsbCBiZSBvdmVyd3JpdHRlbiEgSWYgdGhlIG5hbWUgaXMgZW1wdHksIHRoZSBkZWZhdWx0IG5hbWUgaXMgc2V0LlwiXG4gICAgICAgICAgICApXG4gICAgICAgICAgICAuYWRkVGV4dCgoY2IpID0+XG4gICAgICAgICAgICAgICAgY2JcbiAgICAgICAgICAgICAgICAgICAgLm9uQ2hhbmdlKCh2YWx1ZSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHZhbHVlLmxlbmd0aCA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5wbHVnaW4uc2V0dGluZ3Mud2l0aG91dFRhZ3NPdXRwdXRGaWxlTmFtZSA9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuZGVmYXVsdFNldHRpbmdzLndpdGhvdXRUYWdzT3V0cHV0RmlsZU5hbWU7XG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMucGx1Z2luLnNldHRpbmdzLndpdGhvdXRUYWdzT3V0cHV0RmlsZU5hbWUgPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMucGx1Z2luLnNhdmVTZXR0aW5ncygpO1xuICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgICAgICAuc2V0VmFsdWUodGhpcy5wbHVnaW4uc2V0dGluZ3Mud2l0aG91dFRhZ3NPdXRwdXRGaWxlTmFtZSlcbiAgICAgICAgICAgICk7XG5cbiAgICAgICAgbmV3IFNldHRpbmcoY29udGFpbmVyRWwpXG4gICAgICAgICAgICAuc2V0TmFtZShcIkV4Y2x1ZGUgZmlsZXNcIilcbiAgICAgICAgICAgIC5zZXREZXNjKFxuICAgICAgICAgICAgICAgIFwiRXhjbHVkZSB0aGUgc3BlY2lmaWMgZmlsZXMuIEFkZCBlYWNoIGZpbGUgcGF0aCBpbiBhIG5ldyBsaW5lICh3aXRoIGZpbGUgZXh0ZW5zaW9uISlcIlxuICAgICAgICAgICAgKVxuICAgICAgICAgICAgLmFkZFRleHRBcmVhKChjYikgPT5cbiAgICAgICAgICAgICAgICBjYlxuICAgICAgICAgICAgICAgICAgICAuc2V0UGxhY2Vob2xkZXIoXCJEaXJlY3RvcnkvZmlsZS5tZFwiKVxuICAgICAgICAgICAgICAgICAgICAuc2V0VmFsdWUoXG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnBsdWdpbi5zZXR0aW5ncy53aXRob3V0VGFnc0ZpbGVzVG9JZ25vcmUuam9pbihcIlxcblwiKVxuICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgIC5vbkNoYW5nZSgodmFsdWUpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBwYXRocyA9IHZhbHVlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLnRyaW0oKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5zcGxpdChcIlxcblwiKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5tYXAoKHZhbHVlKSA9PiB0aGlzLmZvcm1hdFBhdGgodmFsdWUsIGZhbHNlKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnBsdWdpbi5zZXR0aW5ncy53aXRob3V0VGFnc0ZpbGVzVG9JZ25vcmUgPSBwYXRocztcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMucGx1Z2luLnNhdmVTZXR0aW5ncygpO1xuICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgKTtcblxuICAgICAgICBuZXcgU2V0dGluZyhjb250YWluZXJFbClcbiAgICAgICAgICAgIC5zZXROYW1lKFwiRXhjbHVkZSBkaXJlY3Rvcmllc1wiKVxuICAgICAgICAgICAgLnNldERlc2MoXG4gICAgICAgICAgICAgICAgXCJFeGNsdWRlIGZpbGVzIGluIHRoZSBzcGVjaWZpZWQgZGlyZWN0b3JpZXMuIEFkZCBlYWNoIGRpcmVjdG9yeSBwYXRoIGluIGEgbmV3IGxpbmVcIlxuICAgICAgICAgICAgKVxuICAgICAgICAgICAgLmFkZFRleHRBcmVhKChjYikgPT5cbiAgICAgICAgICAgICAgICBjYlxuICAgICAgICAgICAgICAgICAgICAuc2V0UGxhY2Vob2xkZXIoXCJEaXJlY3RvcnkvU3ViZGlyZWN0b3J5XCIpXG4gICAgICAgICAgICAgICAgICAgIC5zZXRWYWx1ZShcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMucGx1Z2luLnNldHRpbmdzLndpdGhvdXRUYWdzRGlyZWN0b3JpZXNUb0lnbm9yZS5qb2luKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwiXFxuXCJcbiAgICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICAub25DaGFuZ2UoKHZhbHVlKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgcGF0aHMgPSB2YWx1ZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC50cmltKClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAuc3BsaXQoXCJcXG5cIilcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAubWFwKCh2YWx1ZSkgPT4gdGhpcy5mb3JtYXRQYXRoKHZhbHVlLCB0cnVlKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnBsdWdpbi5zZXR0aW5ncy53aXRob3V0VGFnc0RpcmVjdG9yaWVzVG9JZ25vcmUgPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhdGhzO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5wbHVnaW4uc2F2ZVNldHRpbmdzKCk7XG4gICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICApO1xuXG4gICAgICAgIC8vLyBTZXR0aW5ncyBmb3IgZW1wdHkgZmlsZXNcbiAgICAgICAgY29udGFpbmVyRWwuY3JlYXRlRWwoXCJoNFwiLCB7XG4gICAgICAgICAgICB0ZXh0OiBcIlNldHRpbmdzIGZvciBmaW5kaW5nIGVtcHR5IGZpbGVzXCIsXG4gICAgICAgIH0pO1xuXG4gICAgICAgIG5ldyBTZXR0aW5nKGNvbnRhaW5lckVsKVxuICAgICAgICAgICAgLnNldE5hbWUoXCJPdXRwdXQgZmlsZSBuYW1lXCIpXG4gICAgICAgICAgICAuc2V0RGVzYyhcbiAgICAgICAgICAgICAgICBcIlNldCBuYW1lIG9mIG91dHB1dCBmaWxlICh3aXRob3V0IGZpbGUgZXh0ZW5zaW9uKS4gTWFrZSBzdXJlIG5vIGZpbGUgZXhpc3RzIHdpdGggdGhpcyBuYW1lIGJlY2F1c2UgaXQgd2lsbCBiZSBvdmVyd3JpdHRlbiEgSWYgdGhlIG5hbWUgaXMgZW1wdHksIHRoZSBkZWZhdWx0IG5hbWUgaXMgc2V0LlwiXG4gICAgICAgICAgICApXG4gICAgICAgICAgICAuYWRkVGV4dCgoY2IpID0+XG4gICAgICAgICAgICAgICAgY2JcbiAgICAgICAgICAgICAgICAgICAgLm9uQ2hhbmdlKCh2YWx1ZSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHZhbHVlLmxlbmd0aCA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5wbHVnaW4uc2V0dGluZ3MuZW1wdHlGaWxlc091dHB1dEZpbGVOYW1lID1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5kZWZhdWx0U2V0dGluZ3MuZW1wdHlGaWxlc091dHB1dEZpbGVOYW1lO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnBsdWdpbi5zZXR0aW5ncy5lbXB0eUZpbGVzT3V0cHV0RmlsZU5hbWUgPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMucGx1Z2luLnNhdmVTZXR0aW5ncygpO1xuICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgICAgICAuc2V0VmFsdWUodGhpcy5wbHVnaW4uc2V0dGluZ3MuZW1wdHlGaWxlc091dHB1dEZpbGVOYW1lKVxuICAgICAgICAgICAgKTtcblxuICAgICAgICBuZXcgU2V0dGluZyhjb250YWluZXJFbClcbiAgICAgICAgICAgIC5zZXROYW1lKFwiRXhjbHVkZSBmaWxlcyBpbiB0aGUgZ2l2ZW4gZGlyZWN0b3JpZXNcIilcbiAgICAgICAgICAgIC5zZXREZXNjKFxuICAgICAgICAgICAgICAgIFwiRW5hYmxlIHRvIGV4Y2x1ZGUgZmlsZXMgaW4gdGhlIGdpdmVuIGRpcmVjdG9yaWVzLiBEaXNhYmxlIHRvIG9ubHkgaW5jbHVkZSBmaWxlcyBpbiB0aGUgZ2l2ZW4gZGlyZWN0b3JpZXNcIlxuICAgICAgICAgICAgKVxuICAgICAgICAgICAgLmFkZFRvZ2dsZSgoY2IpID0+XG4gICAgICAgICAgICAgICAgY2JcbiAgICAgICAgICAgICAgICAgICAgLnNldFZhbHVlKHRoaXMucGx1Z2luLnNldHRpbmdzLmVtcHR5RmlsZXNJZ25vcmVEaXJlY3RvcmllcylcbiAgICAgICAgICAgICAgICAgICAgLm9uQ2hhbmdlKCh2YWx1ZSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5wbHVnaW4uc2V0dGluZ3MuZW1wdHlGaWxlc0lnbm9yZURpcmVjdG9yaWVzID1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMucGx1Z2luLnNhdmVTZXR0aW5ncygpO1xuICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgKTtcblxuICAgICAgICBuZXcgU2V0dGluZyhjb250YWluZXJFbClcbiAgICAgICAgICAgIC5zZXROYW1lKFwiRGlyZWN0b3JpZXNcIilcbiAgICAgICAgICAgIC5zZXREZXNjKFwiQWRkIGVhY2ggZGlyZWN0b3J5IHBhdGggaW4gYSBuZXcgbGluZVwiKVxuICAgICAgICAgICAgLmFkZFRleHRBcmVhKChjYikgPT5cbiAgICAgICAgICAgICAgICBjYlxuICAgICAgICAgICAgICAgICAgICAuc2V0UGxhY2Vob2xkZXIoXCJEaXJlY3RvcnkvU3ViZGlyZWN0b3J5XCIpXG4gICAgICAgICAgICAgICAgICAgIC5zZXRWYWx1ZShcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMucGx1Z2luLnNldHRpbmdzLmVtcHR5RmlsZXNEaXJlY3Rvcmllcy5qb2luKFwiXFxuXCIpXG4gICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgLm9uQ2hhbmdlKCh2YWx1ZSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHBhdGhzID0gdmFsdWVcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAudHJpbSgpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLnNwbGl0KFwiXFxuXCIpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLm1hcCgodmFsdWUpID0+IHRoaXMuZm9ybWF0UGF0aCh2YWx1ZSwgdHJ1ZSkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5wbHVnaW4uc2V0dGluZ3MuZW1wdHlGaWxlc0RpcmVjdG9yaWVzID0gcGF0aHM7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnBsdWdpbi5zYXZlU2V0dGluZ3MoKTtcbiAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICk7XG4gICAgICAgIG5ldyBTZXR0aW5nKGNvbnRhaW5lckVsKVxuICAgICAgICAgICAgLnNldE5hbWUoXCJFeGNsdWRlIGZpbGVzXCIpXG4gICAgICAgICAgICAuc2V0RGVzYyhcIkFkZCBlYWNoIGZpbGUgcGF0aCBpbiBhIG5ldyBsaW5lICh3aXRoIGZpbGUgZXh0ZW5zaW9uISlcIilcbiAgICAgICAgICAgIC5hZGRUZXh0QXJlYSgoY2IpID0+XG4gICAgICAgICAgICAgICAgY2JcbiAgICAgICAgICAgICAgICAgICAgLnNldFBsYWNlaG9sZGVyKFwiRGlyZWN0b3J5L2ZpbGUubWRcIilcbiAgICAgICAgICAgICAgICAgICAgLnNldFZhbHVlKFxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5wbHVnaW4uc2V0dGluZ3MuZW1wdHlGaWxlc0ZpbGVzVG9JZ25vcmUuam9pbihcIlxcblwiKVxuICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgIC5vbkNoYW5nZSgodmFsdWUpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBwYXRocyA9IHZhbHVlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLnRyaW0oKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5zcGxpdChcIlxcblwiKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5tYXAoKHZhbHVlKSA9PiB0aGlzLmZvcm1hdFBhdGgodmFsdWUsIGZhbHNlKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnBsdWdpbi5zZXR0aW5ncy5lbXB0eUZpbGVzRmlsZXNUb0lnbm9yZSA9IHBhdGhzO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5wbHVnaW4uc2F2ZVNldHRpbmdzKCk7XG4gICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICApO1xuXG4gICAgICAgIG5ldyBTZXR0aW5nKGNvbnRhaW5lckVsKVxuICAgICAgICAgICAgLnNldE5hbWUoXCJEb25hdGVcIilcbiAgICAgICAgICAgIC5zZXREZXNjKFxuICAgICAgICAgICAgICAgIFwiSWYgeW91IGxpa2UgdGhpcyBQbHVnaW4sIGNvbnNpZGVyIGRvbmF0aW5nIHRvIHN1cHBvcnQgY29udGludWVkIGRldmVsb3BtZW50LlwiXG4gICAgICAgICAgICApXG4gICAgICAgICAgICAuYWRkQnV0dG9uKChidCkgPT4ge1xuICAgICAgICAgICAgICAgIGJ0LmJ1dHRvbkVsLm91dGVySFRNTCA9XG4gICAgICAgICAgICAgICAgICAgIFwiPGEgaHJlZj0naHR0cHM6Ly9rby1maS5jb20vRjFGMTk1SVE1JyB0YXJnZXQ9J19ibGFuayc+PGltZyBoZWlnaHQ9JzM2JyBzdHlsZT0nYm9yZGVyOjBweDto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lLmdldEZpcnN0TGlua3BhdGhEZXN0KFxuICAgICAgICAgICAgICAgIGNiLmxpbmssXG4gICAgICAgICAgICAgICAgdGhpcy5maWxlUGF0aFxuICAgICAgICAgICAgKT8ucGF0aDtcbiAgICAgICAgICAgIHJldHVybiB0aGlzLmxpbmtzVG9JZ25vcmUuY29udGFpbnMobGluayk7XG4gICAgICAgIH0pO1xuICAgIH1cblxuICAgIHByaXZhdGUgY2hlY2tEaXJlY3RvcnkoKTogYm9vbGVhbiB7XG4gICAgICAgIGlmICh0aGlzLmRpcikge1xuICAgICAgICAgICAgaWYgKCF0aGlzLmZpbGVQYXRoLnN0YXJ0c1dpdGgodGhpcy5kaXIpKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBjb250YWlucyA9XG4gICAgICAgICAgICB0aGlzLmRpcmVjdG9yaWVzVG9JZ25vcmUuZmluZChcbiAgICAgICAgICAgICAgICAodmFsdWUpID0+IHZhbHVlLmxlbmd0aCAhPSAwICYmIHRoaXMuZmlsZVBhdGguc3RhcnRzV2l0aCh2YWx1ZSlcbiAgICAgICAgICAgICkgIT09IHVuZGVmaW5lZDtcbiAgICAgICAgaWYgKHRoaXMuaWdub3JlRGlyZWN0b3JpZXMpIHtcbiAgICAgICAgICAgIHJldHVybiBjb250YWlucztcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHJldHVybiAhY29udGFpbnM7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBwcml2YXRlIGlzRmlsZVRvSWdub3JlKCkge1xuICAgICAgICByZXR1cm4gdGhpcy5maWxlc1RvSWdub3JlLmNvbnRhaW5zKHRoaXMuZmlsZVBhdGgpO1xuICAgIH1cblxuICAgIHB1YmxpYyBpc1ZhbGlkKCkge1xuICAgICAgICByZXR1cm4gKFxuICAgICAgICAgICAgIXRoaXMuaGFzVGFnc1RvSWdub3JlKCkgJiZcbiAg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2V0RGlzcGxheVRleHQoKSlcbiAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgIGZpbGVJc0FscmVhZHlPcGVuZWQgPSB0cnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICAgICAgaWYgKCFmaWxlSXNBbHJlYWR5T3BlbmVkKSB7XG4gICAgICAgICAgICBjb25zdCBuZXdQYW5lID0gYXBwLndvcmtzcGFjZS5nZXRMZWF2ZXNPZlR5cGUoXCJlbXB0eVwiKS5sZW5ndGggPT0gMDtcbiAgICAgICAgICAgIGlmIChuZXdQYW5lKSB7XG4gICAgICAgICAgICAgICAgYXBwLndvcmtzcGFjZS5vcGVuTGlua1RleHQob3V0cHV0RmlsZU5hbWUsIFwiL1wiLCB0cnVlKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgY29uc3QgZmlsZSA9IGFwcC52YXVsdC5nZXRBYnN0cmFjdEZpbGVCeVBhdGgob3V0cHV0RmlsZU5hbWUpO1xuXG4gICAgICAgICAgICAgICAgaWYgKGZpbGUgaW5zdGFuY2VvZiBURmlsZSkge1xuICAgICAgICAgICAgICAgICAgICBhd2FpdCBhcHAud29ya3NwYWNlXG4gICAgICAgICAgICAgICAgICAgICAgICAuZ2V0TGVhdmVzT2ZUeXBlKFwiZW1wdHlcIilbMF1cbiAgICAgICAgICAgICAgICAgICAgICAgIC5vcGVuRmlsZShmaWxlKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBhcHAud29ya3NwYWNlLm9wZW5MaW5rVGV4dChvdXRwdXRGaWxlTmFtZSwgXCIvXCIsIHRydWUpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cbn1cbiIsImltcG9ydCB7XHJcbiAgICBnZXRBbGxUYWdzLFxyXG4gICAgZ2V0TGlua3BhdGgsXHJcbiAgICBpdGVyYXRlQ2FjaGVSZWZzLFxy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VRUSU5HUykpO1xyXG5cclxuICAgICAgICB0aGlzLmFwcC53b3Jrc3BhY2Uub24oXCJmaWxlLW1lbnVcIiwgKG1lbnUsIGZpbGUsIHNvdXJjZSwgbGVhZikgPT4ge1xyXG4gICAgICAgICAgICBpZiAoZmlsZSBpbnN0YW5jZW9mIFRGb2xkZXIpIHtcclxuICAgICAgICAgICAgICAgIG1lbnUuYWRkSXRlbSgoY2IpID0+IHtcclxuICAgICAgICAgICAgICAgICAgICBjYi5zZXRJY29uKFwic2VhcmNoXCIpO1xyXG4gICAgICAgICAgICAgICAgICAgIGNiLnNldFRpdGxlKFwiRmluZCBvcnBoYW5lZCBmaWxlc1wiKTtcclxuICAgICAgICAgICAgICAgICAgICAvLyBBZGQgdHJhaWxpbmcgc2xhc2ggdG8gY2F0Y2ggZmlsZXMgbmFtZWQgbGlrZSB0aGUgZGlyZWN0b3J5LiBTZWUgaHR0cHM6Ly9naXRodWIuY29tL1ZpbnplbnQwMy9maW5kLXVubGlua2VkLWZpbGVzL2lzc3Vlcy8yNFxyXG4gICAgICAgICAgICAgICAgICAgIGNiLm9uQ2xpY2soKGUpID0+IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5maW5kT3JwaGFuZWRGaWxlcyhmaWxlLnBhdGggKyBcIi9cIik7XHJcbiAgICAgICAgICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgICAgICAgICB9KTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH0pO1xyXG4gICAgfVxyXG5cclxuICAgIGFzeW5jIGNyZWF0ZUZpbGVzT2ZCcm9rZW5MaW5rcygpIHtcclxuICAgICAgICBpZiAoXHJcbiAgICAgICAgICAgICEoYXdhaXQgdGhpcy5hcHAudmF1bHQuYWRhcHRlci5leGlzdHMoXHJcbiAgICAgICAgICAgICAgICB0aGlzLnNldHRpbmdzLnVucmVzb2x2ZWRMaW5rc091dHB1dEZpbGVOYW1lICsgXCIubWRcIlxyXG4gICAgICAgICAgICApKVxyXG4gICAgICAgICkge1xyXG4gICAgICAgICAgICBuZXcgTm90aWNlKFxyXG4gICAgICAgICAgICAgICAgXCJDYW4ndCBmaW5kIGZpbGUgLSBQbGVhc2UgcnVuIHRoZSBgRmluZCBicm9rZW4gZmlsZXMnIGNvbW1hbmQgYmVmb3JlXCJcclxuICAgICAgICAgICAgKTtcclxuICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgIH1cclxuICAgICAgICBjb25zdCBsaW5rcyA9IHRoaXMuYXBwLm1ldGFkYXRhQ2FjaGUuZ2V0Q2FjaGUoXHJcbiAgICAgICAgICAgIHRoaXMuc2V0dGluZ3MudW5yZXNvbHZlZExpbmtzT3V0cHV0RmlsZU5hbWUgKyBcIi5tZFwiXHJcbiAgICAgICAgKT8ubGlua3M7XHJcbiAgICAgICAgaWYgKCFsaW5rcykge1xyXG4gICAgICAgICAgICBuZXcgTm90aWNlKFwiTm8gYnJva2VuIGxpbmtzIGZvdW5kXCIpO1xyXG4gICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgfVxyXG4gICAgICAgIGNvbnN0IGZpbGVzVG9DcmVhdGU6IHN0cmluZ1tdID0gW107XHJcblxyXG4gICAgICAgIGZvciAoY29uc3QgbGluayBvZiBsaW5rcykge1xyXG4gICAgICAgICAgICBjb25zdCBmaWxlID0gdGhpcy5hcHAubWV0YWRhdGFDYWNoZS5nZXRGaXJzdExpbmtwYXRoRGVzdChcclxuICAgICAgICAgICAgICAgIGxpbmsubGluayxcclxuICAgICAgICAgICAgICAgIFwiL1wiXHJcbiAgICAgICAgICAgICk7XHJcbiAgICAgICAgICAgIGlmIChmaWxlKSBjb250aW51ZTtcclxuICAgICAgICAgICAgY29uc3QgZm91bmRUeXBlID0gdGhpcy5maW5kRXh0ZW5zaW9uUmVnZXguZXhlYyhsaW5rLmxpbmspPy5bMF07XHJcbiAgICAgICAgICAgIGlmICgoZm91bmRUeXBlID8/IFwiLm1kXCIpID09IFwiLm1kXCIpIHtcclxuICAgICAgICAgICAgICAgIGlmIChmb3VuZFR5cGUpIHtcclxuICAgICAgICAgICAgICAgICAgICBmaWxlc1RvQ3JlYXRlLnB1c2gobGluay5saW5rKTtcclxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgZmlsZXNUb0NyZWF0ZS5wdXNoKGxpbmsubGluayArIFwiLm1kXCIpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBpZiAoZmlsZXNUb0NyZWF0ZSkge1xyXG4gICAgICAgICAgICBmb3IgKGNvbnN0IGZpbGUgb2YgZmlsZXNUb0NyZWF0ZSkge1xyXG4gICAgICAgICAgICAgICAgYXdhaXQgdGhpcy5hcHAudmF1bHQuY3JlYXRlKGZpbGUsIFwiXCIpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIGFzeW5jIGZpbmRFbXB0eUZpbGVzKCkge1xyXG4gICAgICAgIGNvbnN0IGZpbGVzID0gdGhpcy5hcHAudmF1bHQuZ2V0RmlsZXMoKTtcclxuICAgICAgICBjb25zdCBlbXB0eUZpbGVzOiBURmlsZVtdID0gW107XHJcbiAgICAgICAgZm9yIChjb25zdCBmaWxlIG9mIGZpbGVzKSB7XHJcbiAgICAgICAgICAgIGlmIChcclxuICAgICAgICAgICAgICAgICFuZXcgVXRpbHMoXHJcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5hcHAsXHJcbiAgICAgICAgICAgICAgICAgICAgZmlsZS5wYXRoLFxyXG4gICAgICAgICAgICAgICAgICAgIFtdLFxyXG4gICAgICAgICAgICAgICAgICAgIFtdLFxyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuc2V0dGluZ3MuZW1wdHlGaWxlc0RpcmVjdG9yaWVzLFxyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuc2V0dGluZ3MuZW1wdHlGaWxlc0ZpbGVzVG9JZ25vcmUsXHJcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5zZXR0aW5ncy5lbXB0eUZpbGVzSWdub3JlRGlyZWN0b3JpZXNcclxuICAgICAgICAgICAgICAgICkuaXNWYWxpZCgpXHJcbiAgICAgICAgICAgICkge1xyXG4gICAgICAgICAgICAgICAgY29udGludWU7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgY29uc3QgY29udGVudCA9IGF3YWl0IHRoaXMuYXBwLnZhdWx0LnJlYWQoZmlsZSk7XHJcbiAgICAgICAgICAgIGNvbnN0IHRyaW1tZWRDb250ZW50ID0gY29udGVudC50cmltKCk7XHJcbiAgICAgICAgICAgIGlmICghdHJpbW1lZENvbnRlbnQpIHtcclxuICAgICAgICAgICAgICAgIGVtcHR5RmlsZXMucHVzaChmaWxlKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBjb25zdCBjYWNoZSA9IGFwcC5tZXRhZGF0YUNhY2hlLmdldEZpbGVDYWNoZShmaWxlKTtcclxuICAgICAgICAgICAgY29uc3QgZnJvbnRtYXR0ZXIgPSBjYWNoZT8uZnJvbnRtYXR0ZXI7XHJcbiAgICAgICAgICAgIGlmIChmcm9udG1hdHRlcikge1xyXG4gICAgICAgICAgICAgICAgY29uc3QgbGluZXMgPSBjb250ZW50LnRyaW1SaWdodCgpLnNwbGl0KFwiXFxuXCIpLmxlbmd0aDtcclxuICAgICAgICAgICAgICAgIGlmIChmcm9udG1hdHRlci5wb3NpdGlvbi5lbmQubGluZSA9PSBsaW5lcyAtIDEpIHtcclxuICAgICAgICAgICAgICAgICAgICBlbXB0eUZpbGVzLnB1c2goZmlsZSk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICAgICAgbGV0IHByZWZpeDogc3RyaW5nO1xyXG4gICAgICAgIGlmICh0aGlzLnNldHRpbmdzLmRpc2FibGVXb3JraW5nTGlua3MpIHByZWZpeCA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G4gICAgICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIGl0ZXJhdGVDYWNoZVJlZnMoXHJcbiAgICAgICAgICAgICAgICB0aGlzLmFwcC5tZXRhZGF0YUNhY2hlLmdldEZpbGVDYWNoZShtYXJrRmlsZSksXHJcbiAgICAgICAgICAgICAgICAoY2IpID0+IHtcclxuICAgICAgICAgICAgICAgICAgICBjb25zdCB0eHQgPSB0aGlzLmFwcC5tZXRhZGF0YUNhY2hlLmdldEZpcnN0TGlua3BhdGhEZXN0KFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBnZXRMaW5rcGF0aChjYi5saW5rKSxcclxuICAgICAgICAgICAgICAgICAgICAgICAgbWFya0ZpbGUucGF0aFxyXG4gICAgICAgICAgICAgICAgICAgICk7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKHR4dCAhPSBudWxsKSBsaW5rcy5wdXNoKHR4dC5wYXRoKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgKTtcclxuICAgICAgICB9KTtcclxuICAgICAgICBjb25zdCBub3RMaW5rZWRGaWxlcyA9IGZpbGVzLmZpbHRlcigoZmlsZSkgPT5cclxuICAgICAgICAgICAgdGhpcy5pc1ZhbGlkKGZpbGUsIGxpbmtzLCBkaXIpXHJcbiAgICAgICAgKTtcclxuICAgICAgICBub3RMaW5rZWRGaWxlcy5yZW1vdmUob3V0RmlsZSk7XHJcblxyXG4gICAgICAgIGxldCB0ZXh0ID0gXCJcIjtcclxuICAgICAgICBsZXQgcHJlZml4OiBzdHJpbmc7XHJcbiAgICAgICAgaWYgKHRoaXMuc2V0dGluZ3MuZGlzYWJsZVdvcmtpbmdMaW5rcykgcHJlZml4ID0gXCJcdFwiO1xyXG4gICAgICAgIGVsc2UgcHJlZml4ID0gXCJcIjtcclxuICAgICAgICBub3RMaW5rZWRGaWxlcy5mb3JFYWNoKChmaWxlKSA9PiB7XHJcbiAgICAgICAgICAgIHRleHQgKz1cclxuICAgICAgICAgICAgICAgIHByZWZpeCArXHJcbiAgICAgICAgICAgICAgICBcIi0gW1tcIiArXHJcbiAgICAgICAgICAgICAgICB0aGlzLmFwcC5tZXRhZGF0YUNhY2hlLmZpbGVUb0xpbmt0ZXh0KGZpbGUsIFwiL1wiLCBmYWxzZSkgK1xyXG4gICAgICAgICAgICAgICAgXCJdXVxcblwiO1xyXG4gICAgICAgIH0pO1xyXG4gICAgICAgIFV0aWxzLndyaXRlQW5kT3BlbkZpbGUoXHJcbiAgICAgICAgICAgIHRoaXMuYXBwLFxyXG4gICAgICAgICAgICBvdXRGaWxlTmFtZSxcclxuICAgICAgICAgICAgdGV4dCxcclxuICAgICAgICAgICAgdGhpcy5zZXR0aW5ncy5vcGVuT3V0cHV0RmlsZVxyXG4gICAgICAgICk7XHJcbiAgICB9XHJcbiAgICBhc3luYyBkZWxldGVPcnBoYW5lZEZpbGVzKCkge1xyXG4gICAgICAgIGlmIChcclxuICAgICAgICAgICAgIShhd2FpdCB0aGlzLmFwcC52YXVsdC5hZGFwdGVyLmV4aXN0cyhcclxuICAgICAgICAgICAgICAgIHRoaXMuc2V0dGluZ3Mub3V0cHV0RmlsZU5hbWUgKyBcIi5tZFwiXHJcbiAgICAgICAgICAgICkpXHJcbiAgICAgICAgKSB7XHJcbiAgICAgICAgICAgIG5ldyBOb3RpY2UoXHJcbiAgICAgICAgICAgICAgICBcIkNhbid0IGZpbmQgZmlsZSAtIFBsZWFzZSBydW4gdGhlIGBGaW5kIG9ycGhhbmVkIGZpbGVzJyBjb21tYW5kIGJlZm9yZVwiXHJcbiAgICAgICAgICAgICk7XHJcbiAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICB9XHJcbiAgICAgICAgY29uc3QgbGlua3MgPVxyXG4gICAgICAgICAgICB0aGlzLmFwcC5tZXRhZGF0YUNhY2hlLmdldENhY2hlKFxyXG4gICAgICAgICAgICAgICAgdGhpcy5zZXR0aW5ncy5vdXRwdXRGaWxlTmFtZSArIFwiLm1kXCJcclxuICAgICAgICAgICAgKT8ubGlua3MgPz8gW107XHJcbiAgICAgICAgY29uc3QgZmlsZXNUb0RlbGV0ZTogVEZpbGVbXSA9IFtdO1xyXG4gICAgICAgIGxpbmtzLmZvckVhY2goKGxpbmspID0+IHtcclxuICAgICAgICAgICAgY29uc3QgZmlsZSA9IHRoaXMuYXBwLm1ldGFkYXRhQ2FjaGUuZ2V0Rmlyc3RMaW5rcGF0aERlc3QoXHJcbiAgICAgICAgICAgICAgICBsaW5rLmxpbmssXHJcbiAgICAgICAgICAgICAgICBcIi9cIlxyXG4gICAgICAgICAgICApO1xyXG4gICAgICAgICAgICBpZiAoIWZpbGUpIHJldHVybjtcclxuXHJcbiAgICAgICAgICAgIGlmIChcclxuICAgICAgICAgICAgICAgIHRoaXMuc2V0dGluZ3MuZmlsZVR5cGVzVG9EZWxldGVbMF0gPT0gXCIqXCIgfHxcclxuICAgICAgICAgICAgICAgIHRoaXMuc2V0dGluZ3MuZmlsZVR5cGVzVG9EZWxldGUuY29udGFpbnMoZmlsZS5leHRlbnNpb24pXHJcbiAgICAgICAgICAgICkge1xyXG4gICAgICAgICAgICAgICAgZmlsZXNUb0RlbGV0ZS5wdXNoKGZpbGUpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfSk7XHJcbiAgICAgICAgaWYgKGZpbGVzVG9EZWxldGUubGVuZ3RoID4gMClcclxuICAgICAgICAgICAgbmV3IERlbGV0ZUZpbGVzTW9kYWwodGhpcy5hcHAsIGZpbGVzVG9EZWxldGUpLm9wZW4oKTtcclxuICAgIH1cclxuXHJcbiAgICBhc3luYyBkZWxldGVFbXB0eUZpbGVzKCkge1xyXG4gICAgICAgIGlmIChcclxuICAgICAgICAgICAgIShhd2FpdCB0aGlzLmFwcC52YXVsdC5hZGFwdGVyLmV4aXN0cyhcclxuICAgICAgICAgICAgICAgIHRoaXMuc2V0dGluZ3MuZW1wdHlGaWxlc091dHB1dEZpbGVOYW1lICsgXCIubWRcIlxyXG4gICAgICAgICAgICApKVxyXG4gICAgICAgICkge1xyXG4gICAgICAgICAgICBuZXcgTm90aWNlKFxyXG4gICAgICAgICAgICAgICAgXCJDYW4ndCBmaW5kIGZpbGUgLSBQbGVhc2UgcnVuIHRoZSBgRmluZCBvcnBoYW5lZCBmaWxlcycgY29tbWFuZCBiZWZvcmVcIlxyXG4gICAgICAgICAgICApO1xyXG4gICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgfVxyXG4gICAgICAgIGNvbnN0IGxpbmtzID1cclxuICAgICAgICAgICAgdGhpcy5hcHAubWV0YWRhdGFDYWNoZS5nZXRDYWNoZShcclxuICAgICAgICAgICAgICAgIHRoaXMuc2V0dGluZ3MuZW1wdHlGaWxlc091dHB1dEZpbGVOYW1lICsgXCIubWRcIlxyXG4gICAgICAgICAgICApPy5saW5rcyA/PyBbXTtcclxuICAgICAgICBjb25zdCBmaWxlc1RvRGVsZXRlOiBURmlsZVtdID0gW107XHJcbiAgICAgICAgZm9yIChjb25zdCBsaW5rIG9mIGxpbmtzKSB7XHJcbiAgICAgICAgICAgIGNvbnN0IGZpbGUgPSB0aGlzLmFwcC5tZXRhZGF0YUNhY2hlLmdldEZpcnN0TGlua3BhdGhEZXN0KFxyXG4gICAgICAgICAgICAgICAgbGluay5saW5rLFxyXG4gICAgICAgICAgICAgICAgXCIvXCJcclxuICAgICAgICAgICAgKTtcclxuICAgICAgICAgICAgaWYgKCFmaWxlKSByZXR1cm47XHJcblxyXG4gICAgICAgICAgICBmaWxlc1RvRGVsZXRlLnB1c2goZmlsZSk7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIGlmIChmaWxlc1RvRGVsZXRlLmxlbmd0aCA+IDApXHJcbiAgICAgICAgICAgIG5ldyBEZWxldGVGaWxlc01vZGFsKHRoaXMuYXBwLCBmaWxlc1RvRGVsZXRlKS5vcGVuKCk7XHJcbiAgICB9XHJcblxyXG4gICAgZmluZEJyb2tlbkxpbmtzKCkge1xyXG4gICAgICAgIGNvbnN0IG91dEZpbGVOYW1lID0gdGhpcy5zZXR0aW5ncy51bnJlc29sdmVkTGlua3NPdXRwdXRGaWxlTmFtZSArIFwiLm1kXCI7XHJcbiAgICAgICAgY29uc3QgbGlua3M6IEJyb2tlbkxpbmtbXSA9IFtdO1xyXG4gICAgICAgIGNvbnN0IGJyb2tlbkxpbmtzID0gdGhpcy5hcHAubWV0YWRhdGFDYWNoZS51bnJlc29sdmVkTGlua3M7XHJcblxyXG4gICAgICAgIGZvciAoY29uc3Qgc291cmNlRmlsZXBhdGggaW4gYnJva2VuTGlua3MpIHtcclxuICAgICAgICAgICAgaWYgKFxyXG4gICAgICAgICAgICAgICAgc291cmNlRmlsZXBhdGggPT1cclxuICAgICAgICAgICAgICAgIHRoaXMuc2V0dGluZ3MudW5yZXNvbHZlZExpbmtzT3V0cHV0RmlsZU5hbWUgKyBcIi5tZFwiXHJcbiAgICAgICAgICAgIClcclxuICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xyXG5cclxuICAgICAgICAgICAgY29uc3QgZmlsZVR5cGUgPSBzb3VyY2VGaWxlcGF0aC5zdWJzdHJpbmcoXHJcbiAgICAgICAgICAgICAgICBzb3VyY2VGaWxlcGF0aC5sYXN0SW5kZXhPZihcIi5cIikgKyAxXHJcbiAgICAgICAgICAgICk7XHJcblxyXG4gICAgICAgICAgICBjb25zdCB1dGlscyA9IG5ldyBVdGlscyhcclxuICAgICAgICAgICAgICAgIHRoaXMuYXBwLFxyXG4gICAgICAgICAgICAgICAgc291cmNlRmlsZXBhdGgsXHJcbiAgICAgICAgICAgICAgICB0aGlzLnNldHRpbmdzLnVucmVzb2x2ZWRMaW5rc1RhZ3NUb0lnbm9yZSxcclxuICAgICAgICAgICAgICAgIHRoaXMuc2V0dGluZ3MudW5yZXNvbHZlZExpbmtzTGlua3NUb0lnbm9yZSxcclxuICAgICAgICAgICAgICAgIHRoaXMuc2V0dGluZ3MudW5yZXNvbHZlZExpbmtzRGlyZWN0b3JpZXNUb0lnbm9yZSxcclxuICAgICAgICAgICAgICAgIHRoaXMuc2V0dGluZ3MudW5yZXNvbHZlZExpbmtzRmlsZXNUb0lnbm9yZSxcclxuICAgICAgICAgICAgICAgIHRoaXMuc2V0dGluZ3MudW5yZXNvbHZlZExpbmtzSWdub3JlRGlyZWN0b3JpZXNcclxuICAgICAgICAgICAgKTtcclxuICAgICAgICAgICAgaWYgKCF1dGlscy5pc1ZhbGlkKCkpIGNvbnRpbnVlO1xyXG5cclxuICAgICAgICAgICAgZm9yIChjb25zdCBsaW5rIGluIGJyb2tlbkxpbmtzW3NvdXJjZUZpbGVwYXRoXSkge1xyXG4gICAgICAgICAgICAgICAgY29uc3QgbGlua0ZpbGVUeXBlID0gbGluay5zdWJzdHJpbmcobGluay5sYXN0SW5kZXhPZihcIi5cIikgKyAxKTtcclxuXHJcbiAgICAgICAgICAgICAgICBpZiAoXHJcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5zZXR0aW5ncy51bnJlc29sdmVkTGlua3NGaWxlVHlwZXNUb0lnbm9yZS5jb250YWlucyhcclxuICAgICAgICAgICAgICAgICAgICAgICAgbGlua0ZpbGVUeXBlXHJcbiAgICAgICAgICAgICAgICAgICAgKVxyXG4gICAgICAgICAgICAgICAgKVxyXG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xyXG5cclxuICAgICAgICAgICAgICAgIGxldCBmb3JtYXR0ZWRGaWxlUGF0aCA9IHNvdXJjZUZpbGVwYXRoO1xyXG4gICAgICAgICAgICAgICAgaWYgKGZpbGVUeXBlID09IFwibWRcIikge1xyXG4gICAgICAgICAgICAgICAgICAgIGZvcm1hdHRlZEZpbGVQYXRoID0gc291cmNlRmlsZXBhdGguc3Vic3RyaW5nKFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAwLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBzb3VyY2VGaWxlcGF0aC5sYXN0SW5kZXhPZihcIi5tZFwiKVxyXG4gICAgICAgICAgICAgICAgICAgICk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBjb25zdCBicm9rZW5MaW5rOiBCcm9rZW5MaW5rID0ge1xyXG4gICAgICAgICAgICAgICAgICAgIGZpbGVzOiBbZm9ybWF0dGVkRmlsZVBhdGhdLFxyXG4gICAgICAgICAgICAgICAgICAgIGxpbms6IGxpbmssXHJcbiAgICAgICAgICAgICAgICB9O1xyXG4gICAgICAgICAgICAgICAgaWYgKGxpbmtzLmNvbnRhaW5zKGJyb2tlbkxpbmspKSBjb250aW51ZTtcclxuICAgICAgICAgICAgICAgIGNvbnN0IGR1cGxpY2F0aW9uID0gbGlua3MuZmluZCgoZSkgPT4gZS5saW5rID09IGxpbmspO1xyXG4gICAgICAgICAgICAgICAgaWYgKGR1cGxpY2F0aW9uKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgZHVwbGljYXRpb24uZmlsZXMucHVzaChmb3JtYXR0ZWRGaWxlUGF0aCk7XHJcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgIGxpbmtzLnB1c2goYnJva2VuTGluayk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICAgICAgVXRpbHMud3JpdGVBbmRPcGVuRmlsZShcclxuICAgICAgICAgICAgdGhpcy5hcHAsXHJcbiAgICAgICAgICAgIG91dEZpbGVOYW1lLFxyXG4gICAgICAgICAgICBbXHJcbiAgICAgICAgICAgICAgICBcIkRvbid0IGZvcmdldCB0aGF0IGNyZWF0aW5nIHRoZSBmaWxlIGZyb20gaGVyZSBtYXkgY3JlYXRlIHRoZSBmaWxlIGluIHRoZSB3cm9uZyBkaXJlY3RvcnkhXCIsXHJcbiAgICAgICAgICAgICAgICAuLi5saW5rcy5tYXAoXHJcbiAgICAgICAgICAgICAgICAgICAgKGUpID0+IGAtIFtbJHtlLmxpbmt9XV0gaW4gW1ske2UuZmlsZXMuam9pbihcIl1dLCBbW1wiKX1dXWBcclxuICAgICAgICAgICAgICAgICksXHJcbiAgICAgICAgICAgIF0uam9pbihcIlxcblwiKSxcclxuICAgICAgICAgICAgdGhpcy5zZXR0aW5ncy5vcGVuT3V0cHV0RmlsZVxyXG4gICAgICAgICk7XHJcbiAgICB9XHJcblxyXG4gICAgZmluZEZpbGVzV2l0aG91dFRhZ3MoKSB7XHJcbiAgICAgICAgY29uc3Qgb3V0RmlsZU5hbWUgPSB0aGlzLnNldHRpbmdzLndpdGhvdXRUYWdzT3V0cHV0RmlsZU5hbWUgKyBcIi5tZFwiO1xyXG4gICAgICAgIGxldCBvdXRGaWxlOiBURmlsZTtcclxuICAgICAgICBjb25zdCBmaWxlcyA9IHRoaXMuYXBwLnZhdWx0LmdldE1hcmtkb3duRmlsZXMoKTtcclxuICAgICAgICBsZXQgd2l0aG91dEZpbGVzID0gZmlsZXMuZmlsdGVyKChmaWxlKSA9PiB7XHJcbiAgICAgICAgICAgIGlmIChcclxuICAgICAgICAgICAgICAgIG5ldyBVdGlscyhcclxuICAgICAgICAgICAgICAgICAgICB0aGlzLmFwcCxcclxuICAgICAgICAgICAgICAgICAgICBmaWxlLnBhdGgsXHJcbiAgICAgICAgICAgICAgICAgICAgW10sXHJcbiAgICAgICAgICAgICAgICAgICAgW10sXHJcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5zZXR0aW5ncy53aXRob3V0VGFnc0RpcmVjdG9yaWVzVG9JZ25vcmUsXHJcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5zZXR0aW5ncy53aXRob3V0VGFnc0ZpbGVzVG9JZ25vcmUsXHJcbiAgICAgICAgICAgICAgICAgICAgdHJ1ZVxyXG4gICAgICAgICAgICAgICAgKS5pc1ZhbGlkKClcclxuICAgICAgICAgICAgKSB7XHJcbiAgICAgICAgICAgICAgICByZXR1cm4gKFxyXG4gICAgICAgICAgICAgICAgICAgIChnZXRBbGxUYWdzKHRoaXMuYXBwLm1ldGFkYXRhQ2FjaGUuZ2V0RmlsZUNhY2hlKGZpbGUpKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAubGVuZ3RoID8/IDApIDw9IDBcclxuICAgICAgICAgICAgICAgICk7XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9KTtcclxuICAgICAgICB3aXRob3V0RmlsZXMucmVtb3ZlKG91dEZpbGUpO1xyXG5cclxuICAgICAgICBsZXQgcHJlZml4OiBzdHJpbmc7XHJcbiAgICAgICAgaWYgKHRoaXMuc2V0dGluZ3MuZGlzYWJsZVdvcmtpbmdMaW5rcykgcHJlZml4ID0gXCJcdFwiO1xyXG4gICAgICAgIGVsc2UgcHJlZml4ID0gXCJcIjtcclxuICAgICAgICBjb25zdCB0ZXh0ID0gd2l0aG91dEZpbGVzXHJcbiAgICAgICAgICAgIC5tYXAoKGZpbGUpID0+IGAke3ByZWZpeH0tIFtbJHtmaWxlLnBhdGh9XV1gKVxyXG4gICAgICAgICAgICAuam9pbihcIlxcblwiKTtcclxuICAgICAgICBVdGlscy53cml0ZUFuZE9wZW5GaWxlKFxyXG4gICAgICAgICAgICB0aGlzLmFwcCxcclxuICAgICAgICAgICAgb3V0RmlsZU5hbWUsXHJcbiAgICAgICAgICAgIHRleHQsXHJcbiAgICAgICAgICAgIHRoaXMuc2V0dGluZ3Mub3Blbk91dHB1dEZpbGVcclxuICAgICAgICApO1xyXG4gICAgfVxyXG5cclxuICAgIC8qKlxyXG4gICAgICogQ2hlY2tzIGlmIHRoZSBnaXZlbiBmaWxlIGluIGFuIG9ycGhhbmVkIGZpbGVcclxuICAgICAqXHJcbiAgICAgKiBAcGFyYW0gZmlsZSBmaWxlIHRvIGNoZWNrXHJcbiAgICAgKiBAcGFyYW0gbGlua3MgYWxsIGxpbmtzIGluIHRoZSB2YXVsdFxyXG4gICAgICovXHJcbiAgICBpc1ZhbGlkKGZpbGU6IFRGaWxlLCBsaW5rczogc3RyaW5nW10sIGRpcjogc3RyaW5nKTogYm9vbGVhbiB7XHJcbiAgICAgICAgaWYgKGxpbmtzLmNvbnRhaW5zKGZpbGUucGF0aCkpIHJldHVybiBmYWxzZTtcclxuXHJcbiAgICAgICAgLy9maWxldHlwZXMgdG8gaWdub3JlIGJ5IGRlZmF1bHRcclxuICAgICAgICBpZiAoZmlsZS5leHRlbnNpb24gPT0gXCJjc3NcIikgcmV0dXJuIGZhbHNlO1xyXG5cclxuICAgICAgICBpZiAodGhpcy5zZXR0aW5ncy5maWxlVHlwZXNUb0lnbm9yZVswXSAhPT0gXCJcIikge1xyXG4gICAgICAgICAgICBjb25zdCBjb250YWluc0ZpbGVUeXBlID0gdGhpcy5zZXR0aW5ncy5maWxlVHlwZXNUb0lnbm9yZS5jb250YWlucyhcclxuICAgICAgICAgICAgICAgIGZpbGUuZXh0ZW5zaW9uXHJcbiAgICAgICAgICAgICk7XHJcbiAgICAgICAgICAgIGlmICh0aGlzLnNldHRpbmdzLmlnbm9yZUZpbGVUeXBlcykge1xyXG4gICAgICAgICAgICAgICAgaWYgKGNvbnRhaW5zRmlsZVR5cGUpIHJldHVybjtcclxuICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgIGlmICghY29udGFpbnNGaWxlVHlwZSkgcmV0dXJuO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBjb25zdCB1dGlscyA9IG5ldyBVdGlscyhcclxuICAgICAgICAgICAgdGhpcy5hcHAsXHJcbiAgICAgICAgICAgIGZpbGUucGF0aCxcclxuICAgICAgICAgICAgdGhpcy5zZXR0aW5ncy50YWdzVG9JZ25vcmUsXHJcbiAgICAgICAgICAgIHRoaXMuc2V0dGluZ3MubGlua3NUb0lnbm9yZSxcclxuICAgICAgICAgICAgdGhpcy5zZXR0aW5ncy5kaXJlY3Rvcmllc1RvSWdub3JlLFxyXG4gICAgICAgICAgICB0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USxDQUFDLElBQUksQ0FBQyxRQUFRLENBQUMsQ0FBQSxDQUFBOztBQUFsQyx3QkFBQSxFQUFBLENBQUEsSUFBQSxFQUFrQyxDQUFDOzs7OztBQUN0QyxLQUFBLENBQUE7SUFDTCxPQUFDLHVCQUFBLENBQUE7QUFBRCxDQTVaQSxDQUFxRE0sZUFBTSxDQTRaMUQ7Ozs7In0= diff --git a/.obsidian/plugins/find-unlinked-files/manifest.json b/.obsidian/plugins/find-unlinked-files/manifest.json index 9b3fb574..746a3883 100644 --- a/.obsidian/plugins/find-unlinked-files/manifest.json +++ b/.obsidian/plugins/find-unlinked-files/manifest.json @@ -1,9 +1,10 @@ { "id": "find-unlinked-files", "name": "Find orphaned files and broken links", - "version": "1.8.0", + "version": "1.8.1", "description": "Find files that are not linked anywhere and would otherwise be lost in your vault. In other words: files with no backlinks.", "author": "Vinzent", + "fundingUrl": "https://ko-fi.com/vinzent", "authorUrl": "https://github.com/Vinzent03", "isDesktopOnly": false -} +} \ No newline at end of file diff --git a/.obsidian/plugins/obsidian-activity-history/data.json b/.obsidian/plugins/obsidian-activity-history/data.json index efdea971..2df5235c 100644 --- a/.obsidian/plugins/obsidian-activity-history/data.json +++ b/.obsidian/plugins/obsidian-activity-history/data.json @@ -12,8 +12,8 @@ "checkpointList": [ { "path": "/", - "date": "2023-03-17", - "size": 13822360 + "date": "2023-03-23", + "size": 14124674 } ], "activityHistory": [ @@ -1746,7 +1746,31 @@ }, { "date": "2023-03-17", - "value": 4917 + "value": 27248 + }, + { + "date": "2023-03-18", + "value": 65941 + }, + { + "date": "2023-03-19", + "value": 1386 + }, + { + "date": "2023-03-20", + "value": 4445 + }, + { + "date": "2023-03-21", + "value": 3964 + }, + { + "date": "2023-03-22", + "value": 193934 + }, + { + "date": "2023-03-23", + "value": 11381 } ] } diff --git a/.obsidian/plugins/obsidian-advanced-uri/main.js b/.obsidian/plugins/obsidian-advanced-uri/main.js index 6c52c4e7..bcf56e84 100644 --- a/.obsidian/plugins/obsidian-advanced-uri/main.js +++ b/.obsidian/plugins/obsidian-advanced-uri/main.js @@ -3449,17 +3449,17 @@ var EnterDataModal = /** @class */ (function (_super) { _this.plugin.tools.copyURI({ filepath: _this.file, data: query, - mode: mode + mode: mode, }); } else { _this.plugin.tools.copyURI({ daily: "true", data: query, - mode: mode + mode: mode, }); } - } + }, }); } }; @@ -3492,24 +3492,35 @@ var FileModal = /** @class */ (function (_super) { FileModal.prototype.getItems = function () { var specialItems = []; if (this.allowNoFile) { - specialItems.push({ display: "", source: undefined }); + specialItems.push({ + display: "", + source: undefined, + }); } var file = this.app.workspace.getActiveFile(); if (file) { specialItems.push({ display: "", source: file.path }); } - return __spreadArray(__spreadArray([], specialItems), this.app.vault.getFiles().map(function (e) { return { display: e.path, source: e.path }; })); + return __spreadArray(__spreadArray([], specialItems), this.app.vault.getFiles().map(function (e) { + return { display: e.path, source: e.path }; + })); }; FileModal.prototype.getItemText = function (item) { return item.display; }; - FileModal.prototype.onChooseItem = function (item, evt) { - }; + FileModal.prototype.onChooseItem = function (item, evt) { }; return FileModal; }(obsidian.FuzzySuggestModal)); function getViewStateFromMode(parameters) { - return parameters.viewmode ? { state: { mode: parameters.viewmode } } : undefined; + return parameters.viewmode + ? { + state: { + mode: parameters.viewmode, + source: parameters.viewmode == "source", + }, + } + : undefined; } function copyText(text) { return navigator.clipboard.writeText(text); @@ -3521,7 +3532,10 @@ function getAlternativeFilePath(file) { var name = file.name; for (var index = 1; index < 100; index++) { var base = stripMD(name); - var alternative = formattedDir + (formattedDir == "" ? "" : "/") + base + (" " + index + ".md"); + var alternative = formattedDir + + (formattedDir == "" ? "" : "/") + + base + + (" " + index + ".md"); var exists = app.vault.getAbstractFileByPath(alternative) !== null; if (!exists) { return alternative; @@ -3543,12 +3557,20 @@ function getEndAndBeginningOfHeading(file, heading) { var sections = cache.sections; var foundHeading = (_a = cache.headings) === null || _a === void 0 ? void 0 : _a.find(function (e) { return e.heading === heading; }); if (foundHeading) { - var foundSectionIndex = sections.findIndex(function (section) { return section.type === "heading" && section.position.start.line === foundHeading.position.start.line; }); + var foundSectionIndex = sections.findIndex(function (section) { + return section.type === "heading" && + section.position.start.line === foundHeading.position.start.line; + }); var restSections = sections.slice(foundSectionIndex + 1); var nextHeadingIndex = restSections === null || restSections === void 0 ? void 0 : restSections.findIndex(function (e) { return e.type === "heading"; }); - var lastSection = (_b = restSections[(nextHeadingIndex !== -1 ? nextHeadingIndex : restSections.length) - 1]) !== null && _b !== void 0 ? _b : sections[foundSectionIndex]; + var lastSection = (_b = restSections[(nextHeadingIndex !== -1 + ? nextHeadingIndex + : restSections.length) - 1]) !== null && _b !== void 0 ? _b : sections[foundSectionIndex]; var lastLine = lastSection.position.end.line + 1; - return { "lastLine": lastLine, "firstLine": sections[foundSectionIndex].position.end.line + 1 }; + return { + lastLine: lastLine, + firstLine: sections[foundSectionIndex].position.end.line + 1, + }; } else { new obsidian.Notice("Can't find heading"); @@ -3646,7 +3668,11 @@ var Handlers = /** @class */ (function () { parameters.filepath = getAlternativeFilePath(file); } } - return [4 /*yield*/, this.plugin.open({ file: parameters.filepath, mode: "source", parameters: parameters })]; + return [4 /*yield*/, this.plugin.open({ + file: parameters.filepath, + mode: "source", + parameters: parameters, + })]; case 1: _a.sent(); view = app.workspace.getActiveViewOfType(obsidian.MarkdownView); @@ -3669,12 +3695,20 @@ var Handlers = /** @class */ (function () { return [3 /*break*/, 6]; case 2: if (!parameters.line) return [3 /*break*/, 4]; - return [4 /*yield*/, this.plugin.open({ file: parameters.filepath, mode: "source", parameters: parameters })]; + return [4 /*yield*/, this.plugin.open({ + file: parameters.filepath, + mode: "source", + parameters: parameters, + })]; case 3: _a.sent(); this.plugin.setCursorInLine(parameters.line); return [3 /*break*/, 6]; - case 4: return [4 /*yield*/, this.plugin.open({ file: parameters.filepath, setting: this.plugin.settings.openFileWithoutWriteInNewPane, parameters: parameters })]; + case 4: return [4 /*yield*/, this.plugin.open({ + file: parameters.filepath, + setting: this.plugin.settings.openFileWithoutWriteInNewPane, + parameters: parameters, + })]; case 5: _a.sent(); _a.label = 6; @@ -3716,7 +3750,11 @@ var Handlers = /** @class */ (function () { parameters.filepath = getAlternativeFilePath(file); } } - return [4 /*yield*/, this.plugin.open({ file: parameters.filepath, mode: "source", parameters: parameters })]; + return [4 /*yield*/, this.plugin.open({ + file: parameters.filepath, + mode: "source", + parameters: parameters, + })]; case 1: _a.sent(); view = app.workspace.getActiveViewOfType(obsidian.MarkdownView); @@ -3739,12 +3777,20 @@ var Handlers = /** @class */ (function () { return [3 /*break*/, 6]; case 2: if (!parameters.line) return [3 /*break*/, 4]; - return [4 /*yield*/, this.plugin.open({ file: parameters.filepath, mode: "source", parameters: parameters })]; + return [4 /*yield*/, this.plugin.open({ + file: parameters.filepath, + mode: "source", + parameters: parameters, + })]; case 3: _a.sent(); this.plugin.setCursorInLine(parameters.line); return [3 /*break*/, 6]; - case 4: return [4 /*yield*/, this.plugin.open({ file: parameters.filepath, setting: this.plugin.settings.openFileWithoutWriteInNewPane, parameters: parameters })]; + case 4: return [4 /*yield*/, this.plugin.open({ + file: parameters.filepath, + setting: this.plugin.settings.openFileWithoutWriteInNewPane, + parameters: parameters, + })]; case 5: _a.sent(); _a.label = 6; @@ -3833,7 +3879,10 @@ var Handlers = /** @class */ (function () { switch (_a.label) { case 0: if (!parameters.filepath) return [3 /*break*/, 2]; - return [4 /*yield*/, this.plugin.open({ file: parameters.filepath, parameters: parameters })]; + return [4 /*yield*/, this.plugin.open({ + file: parameters.filepath, + parameters: parameters, + })]; case 1: _a.sent(); _a.label = 2; @@ -3940,40 +3989,18 @@ var Handlers = /** @class */ (function () { }; Handlers.prototype.handleOpen = function (parameters) { return __awaiter(this, void 0, void 0, function () { - var fileIsAlreadyOpened, leaf, viewState, view, cache, heading, view, cache, block, view; + var view, cache, heading, view, cache, block, view; return __generator(this, function (_a) { switch (_a.label) { case 0: - fileIsAlreadyOpened = false; - app.workspace.iterateAllLeaves(function (leaf) { - var _a; - if (((_a = leaf.view.file) === null || _a === void 0 ? void 0 : _a.path) === parameters.filepath) { - if (fileIsAlreadyOpened && leaf.width == 0) - return; - fileIsAlreadyOpened = true; - app.workspace.setActiveLeaf(leaf, { focus: true }); - } - }); - if (!fileIsAlreadyOpened) return [3 /*break*/, 2]; - leaf = app.workspace.activeLeaf; - if (!(parameters.viewmode != undefined)) return [3 /*break*/, 2]; - viewState = leaf.getViewState(); - viewState.state.mode = parameters.viewmode; - if (viewState.state.source != undefined) - viewState.state.source = parameters.viewmode == "source"; - return [4 /*yield*/, leaf.setViewState(viewState)]; - case 1: - _a.sent(); - _a.label = 2; - case 2: - if (!(parameters.heading != undefined)) return [3 /*break*/, 4]; + if (!(parameters.heading != undefined)) return [3 /*break*/, 2]; return [4 /*yield*/, this.plugin.open({ file: parameters.filepath + "#" + parameters.heading, setting: this.plugin.settings.openFileWithoutWriteInNewPane, parameters: parameters, supportPopover: false, })]; - case 3: + case 1: _a.sent(); view = app.workspace.getActiveViewOfType(obsidian.MarkdownView); if (!view) @@ -3981,17 +4008,20 @@ var Handlers = /** @class */ (function () { cache = app.metadataCache.getFileCache(view.file); heading = cache.headings.find(function (e) { return e.heading === parameters.heading; }); view.editor.focus(); - view.editor.setCursor({ line: heading.position.start.line + 1, ch: 0 }); - return [3 /*break*/, 9]; - case 4: - if (!(parameters.block != undefined)) return [3 /*break*/, 6]; + view.editor.setCursor({ + line: heading.position.start.line + 1, + ch: 0, + }); + return [3 /*break*/, 6]; + case 2: + if (!(parameters.block != undefined)) return [3 /*break*/, 4]; return [4 /*yield*/, this.plugin.open({ file: parameters.filepath + "#^" + parameters.block, setting: this.plugin.settings.openFileWithoutWriteInNewPane, parameters: parameters, supportPopover: false, })]; - case 5: + case 3: _a.sent(); view = app.workspace.getActiveViewOfType(obsidian.MarkdownView); if (!view) @@ -4000,30 +4030,26 @@ var Handlers = /** @class */ (function () { block = cache.blocks[parameters.block]; view.editor.focus(); view.editor.setCursor({ line: block.position.start.line, ch: 0 }); - return [3 /*break*/, 9]; - case 6: - if (!!fileIsAlreadyOpened) return [3 /*break*/, 8]; - return [4 /*yield*/, this.plugin.open({ - file: parameters.filepath, - setting: this.plugin.settings.openFileWithoutWriteInNewPane, - parameters: parameters, - mode: parameters.line != undefined ? "source" : undefined - })]; - case 7: + return [3 /*break*/, 6]; + case 4: return [4 /*yield*/, this.plugin.open({ + file: parameters.filepath, + setting: this.plugin.settings.openFileWithoutWriteInNewPane, + parameters: parameters, + mode: parameters.line != undefined ? "source" : undefined, + })]; + case 5: _a.sent(); - _a.label = 8; - case 8: if (parameters.line != undefined) { this.plugin.setCursorInLine(parameters.line); } - _a.label = 9; - case 9: - if (!(parameters.mode != undefined)) return [3 /*break*/, 11]; + _a.label = 6; + case 6: + if (!(parameters.mode != undefined)) return [3 /*break*/, 8]; return [4 /*yield*/, this.plugin.setCursor(parameters.mode)]; - case 10: + case 7: _a.sent(); - _a.label = 11; - case 11: + _a.label = 8; + case 8: if (parameters.uid) { view = app.workspace.getActiveViewOfType(obsidian.MarkdownView); this.tools.writeUIDToFile(view.file, parameters.uid); @@ -4045,10 +4071,11 @@ var Handlers = /** @class */ (function () { if (cache.headings) { for (var _i = 0, _a = cache.headings; _i < _a.length; _i++) { var heading = _a[_i]; - if (heading.position.start.line <= pos.line && heading.position.end.line >= pos.line) { + if (heading.position.start.line <= pos.line && + heading.position.end.line >= pos.line) { this.tools.copyURI({ filepath: view.file.path, - heading: heading.heading + heading: heading.heading, }); return; } @@ -4058,10 +4085,11 @@ var Handlers = /** @class */ (function () { for (var _b = 0, _c = Object.keys(cache.blocks); _b < _c.length; _b++) { var blockID = _c[_b]; var block = cache.blocks[blockID]; - if (block.position.start.line <= pos.line && block.position.end.line >= pos.line) { + if (block.position.start.line <= pos.line && + block.position.end.line >= pos.line) { this.tools.copyURI({ filepath: view.file.path, - block: blockID + block: blockID, }); return; } @@ -4123,7 +4151,10 @@ var Handlers = /** @class */ (function () { case 1: _a.sent(); if (Object.keys(app.plugins.updates).length !== 0) { - app.setting.activeTab.containerEl.findAll(".mod-cta").last().click(); + app.setting.activeTab.containerEl + .findAll(".mod-cta") + .last() + .click(); } this.plugin.success(parameters); return [2 /*return*/]; @@ -4155,7 +4186,7 @@ var CommandModal = /** @class */ (function (_super) { CommandModal.prototype.onChooseItem = function (item, _) { this.plugin.tools.copyURI({ filepath: this.file, - commandid: item.id + commandid: item.id, }); }; return CommandModal; @@ -4186,14 +4217,14 @@ var ReplaceModal = /** @class */ (function (_super) { this.plugin.tools.copyURI({ filepath: this.filepath, searchregex: this.search.source, - replace: item == this.emptyText ? "" : item + replace: item == this.emptyText ? "" : item, }); } else { this.plugin.tools.copyURI({ filepath: this.filepath, search: this.search.source, - replace: item == this.emptyText ? "" : item + replace: item == this.emptyText ? "" : item, }); } }; @@ -4221,20 +4252,19 @@ var SearchModal = /** @class */ (function (_super) { { source: query, isRegEx: false, - display: query + display: query, }, { source: query, display: regex ? "As RegEx: " + query : "Can't parse RegEx", - isRegEx: true - } + isRegEx: true, + }, ]; }; SearchModal.prototype.renderSuggestion = function (value, el) { el.innerText = value.display; }; - SearchModal.prototype.onChooseSuggestion = function (item, _) { - }; + SearchModal.prototype.onChooseSuggestion = function (item, _) { }; return SearchModal; }(obsidian.SuggestModal)); @@ -4250,81 +4280,94 @@ var SettingsTab = /** @class */ (function (_super) { var containerEl = this.containerEl; containerEl.empty(); containerEl.createEl("h2", { text: this.plugin.manifest.name }); - new obsidian.Setting(containerEl) - .setName("Open file on write") - .addToggle(function (cb) { return cb - .setValue(_this.plugin.settings.openFileOnWrite) - .onChange(function (value) { - _this.plugin.settings.openFileOnWrite = value; - _this.plugin.saveSettings(); - }); }); + new obsidian.Setting(containerEl).setName("Open file on write").addToggle(function (cb) { + return cb + .setValue(_this.plugin.settings.openFileOnWrite) + .onChange(function (value) { + _this.plugin.settings.openFileOnWrite = value; + _this.plugin.saveSettings(); + }); + }); new obsidian.Setting(containerEl) .setName("Open file on write in a new pane") .setDisabled(this.plugin.settings.openFileOnWrite) - .addToggle(function (cb) { return cb - .setValue(_this.plugin.settings.openFileOnWriteInNewPane) - .onChange(function (value) { - _this.plugin.settings.openFileOnWriteInNewPane = value; - _this.plugin.saveSettings(); - }); }); + .addToggle(function (cb) { + return cb + .setValue(_this.plugin.settings.openFileOnWriteInNewPane) + .onChange(function (value) { + _this.plugin.settings.openFileOnWriteInNewPane = value; + _this.plugin.saveSettings(); + }); + }); new obsidian.Setting(containerEl) .setName("Open daily note in a new pane") - .addToggle(function (cb) { return cb - .setValue(_this.plugin.settings.openDailyInNewPane) - .onChange(function (value) { - _this.plugin.settings.openDailyInNewPane = value; - _this.plugin.saveSettings(); - }); }); + .addToggle(function (cb) { + return cb + .setValue(_this.plugin.settings.openDailyInNewPane) + .onChange(function (value) { + _this.plugin.settings.openDailyInNewPane = value; + _this.plugin.saveSettings(); + }); + }); new obsidian.Setting(containerEl) .setName("Open file without write in new pane") - .addToggle(function (cb) { return cb - .setValue(_this.plugin.settings.openFileWithoutWriteInNewPane) - .onChange(function (value) { - _this.plugin.settings.openFileWithoutWriteInNewPane = value; - _this.plugin.saveSettings(); - }); }); + .addToggle(function (cb) { + return cb + .setValue(_this.plugin.settings.openFileWithoutWriteInNewPane) + .onChange(function (value) { + _this.plugin.settings.openFileWithoutWriteInNewPane = + value; + _this.plugin.saveSettings(); + }); + }); new obsidian.Setting(containerEl) .setName("Use UID instead of file paths") - .addToggle(function (cb) { return cb - .setValue(_this.plugin.settings.useUID) - .onChange(function (value) { - _this.plugin.settings.useUID = value; - _this.plugin.saveSettings(); - _this.display(); - }); }); + .addToggle(function (cb) { + return cb.setValue(_this.plugin.settings.useUID).onChange(function (value) { + _this.plugin.settings.useUID = value; + _this.plugin.saveSettings(); + _this.display(); + }); + }); if (this.plugin.settings.useUID) { new obsidian.Setting(containerEl) .setName("Add filepath parameter") .setDesc("When using UID instead of file paths, you can still add the filepath parameter to know what this URI is about. It's NOT actually used.") - .addToggle(function (cb) { return cb - .setValue(_this.plugin.settings.addFilepathWhenUsingUID) - .onChange(function (value) { - _this.plugin.settings.addFilepathWhenUsingUID = value; - _this.plugin.saveSettings(); - }); }); + .addToggle(function (cb) { + return cb + .setValue(_this.plugin.settings.addFilepathWhenUsingUID) + .onChange(function (value) { + _this.plugin.settings.addFilepathWhenUsingUID = + value; + _this.plugin.saveSettings(); + }); + }); } new obsidian.Setting(containerEl) .setName("UID field in frontmatter") - .addText(function (cb) { return cb - .setValue(_this.plugin.settings.idField) - .onChange(function (value) { - _this.plugin.settings.idField = value; - _this.plugin.saveSettings(); - }); }); + .addText(function (cb) { + return cb.setValue(_this.plugin.settings.idField).onChange(function (value) { + _this.plugin.settings.idField = value; + _this.plugin.saveSettings(); + }); + }); new obsidian.Setting(containerEl) .setName("Allow executing arbitrary code via eval") .setDesc("⚠️ This can be dangerous as it allows executing arbitrary code. Only enable this if you trust the source of the URIs you are using and know what you are doing. ⚠️") - .addToggle(function (cb) { return cb - .setValue(_this.plugin.settings.allowEval) - .onChange(function (value) { - _this.plugin.settings.allowEval = value; - _this.plugin.saveSettings(); - }); }); + .addToggle(function (cb) { + return cb + .setValue(_this.plugin.settings.allowEval) + .onChange(function (value) { + _this.plugin.settings.allowEval = value; + _this.plugin.saveSettings(); + }); + }); new obsidian.Setting(containerEl) - .setName('Donate') - .setDesc('If you like this Plugin, consider donating to support continued development.') + .setName("Donate") + .setDesc("If you like this Plugin, consider donating to support continued development.") .addButton(function (bt) { - bt.buttonEl.outerHTML = "Buy Me a Coffee at ko-fi.com"; + bt.buttonEl.outerHTML = + "Buy Me a Coffee at ko-fi.com"; }); }; return SettingsTab; @@ -4429,7 +4472,8 @@ var Tools = /** @class */ (function () { return [4 /*yield*/, app.vault.read(file)]; case 1: fileContent = _b.sent(); - isYamlEmpty = ((!frontmatter || frontmatter.length === 0) && !fileContent.match(/^-{3}\s*\n*\r*-{3}/)); + isYamlEmpty = (!frontmatter || frontmatter.length === 0) && + !fileContent.match(/^-{3}\s*\n*\r*-{3}/); splitContent = fileContent.split("\n"); if (isYamlEmpty) { splitContent.unshift("---"); @@ -4498,7 +4542,9 @@ var Tools = /** @class */ (function () { case 2: for (parameter in parameters) { if (parameters[parameter] != undefined) { - suffix = suffix + ("&" + parameter + "=" + encodeURIComponent(parameters[parameter])); + suffix = + suffix + + ("&" + parameter + "=" + encodeURIComponent(parameters[parameter])); } } if (doubleEncode) { @@ -4551,17 +4597,17 @@ var AdvancedURI = /** @class */ (function (_super) { this.addCommand({ id: "copy-uri-current-file", name: "copy URI for file with options", - callback: function () { return _this.handlers.handleCopyFileURI(false); } + callback: function () { return _this.handlers.handleCopyFileURI(false); }, }); this.addCommand({ id: "copy-uri-current-file-simple", name: "copy URI for current file", - callback: function () { return _this.handlers.handleCopyFileURI(true); } + callback: function () { return _this.handlers.handleCopyFileURI(true); }, }); this.addCommand({ id: "copy-uri-daily", name: "copy URI for daily note", - callback: function () { return new EnterDataModal(_this).open(); } + callback: function () { return new EnterDataModal(_this).open(); }, }); this.addCommand({ id: "copy-uri-search-and-replace", @@ -4587,7 +4633,7 @@ var AdvancedURI = /** @class */ (function (_super) { fileModal.onChooseItem = function (item) { new CommandModal(_this, item === null || item === void 0 ? void 0 : item.source).open(); }; - } + }, }); this.addCommand({ id: "copy-uri-block", @@ -4600,10 +4646,10 @@ var AdvancedURI = /** @class */ (function (_super) { if (id) { _this.tools.copyURI({ filepath: view.file.path, - block: id + block: id, }); } - } + }, }); this.registerObsidianProtocolHandler("advanced-uri", function (e) { return __awaiter(_this, void 0, void 0, function () { var parameters, createdDailyNote, parameter, res, file, parentFolder, parentFolderPath, index, extension, moment_1, allDailyNotes, dailyNote, _a, _b; @@ -4628,11 +4674,20 @@ var AdvancedURI = /** @class */ (function (_super) { else if (parameters.filename) { file = this.app.metadataCache.getFirstLinkpathDest(parameters.filename, ""); if (!file) { - file = this.app.vault.getMarkdownFiles().find(function (file) { var _a; return (_a = obsidian.parseFrontMatterAliases(_this.app.metadataCache.getFileCache(file).frontmatter)) === null || _a === void 0 ? void 0 : _a.includes(parameters.filename); }); + file = this.app.vault + .getMarkdownFiles() + .find(function (file) { + var _a; + return (_a = obsidian.parseFrontMatterAliases(_this.app.metadataCache.getFileCache(file) + .frontmatter)) === null || _a === void 0 ? void 0 : _a.includes(parameters.filename); + }); } parentFolder = this.app.fileManager.getNewFileParent((_d = this.app.workspace.activeLeaf.view.file) === null || _d === void 0 ? void 0 : _d.path); - parentFolderPath = parentFolder.isRoot() ? "" : parentFolder.path + "/"; - parameters.filepath = (_e = file === null || file === void 0 ? void 0 : file.path) !== null && _e !== void 0 ? _e : (parentFolderPath + obsidian.normalizePath(parameters.filename)); + parentFolderPath = parentFolder.isRoot() + ? "" + : parentFolder.path + "/"; + parameters.filepath = + (_e = file === null || file === void 0 ? void 0 : file.path) !== null && _e !== void 0 ? _e : parentFolderPath + obsidian.normalizePath(parameters.filename); } if (!parameters.filepath) return [3 /*break*/, 1]; parameters.filepath = obsidian.normalizePath(parameters.filepath); @@ -4687,7 +4742,8 @@ var AdvancedURI = /** @class */ (function (_super) { else if (parameters.frontmatterkey) { this.handlers.handleFrontmatterKey(parameters); } - else if (parameters.workspace || parameters.saveworkspace == "true") { + else if (parameters.workspace || + parameters.saveworkspace == "true") { this.handlers.handleWorkspace(parameters); } else if (parameters.commandname || parameters.commandid) { @@ -4708,7 +4764,8 @@ var AdvancedURI = /** @class */ (function (_super) { else if (parameters.filepath && parameters.block) { this.handlers.handleOpen(parameters); } - else if ((parameters.search || parameters.searchregex) && parameters.replace != undefined) { + else if ((parameters.search || parameters.searchregex) && + parameters.replace != undefined) { this.handlers.handleSearchAndReplace(parameters); } else if (parameters.search) { @@ -4740,25 +4797,30 @@ var AdvancedURI = /** @class */ (function (_super) { this.hookSuccess(parameters, file); } else { - this.failure(parameters, { errorMessage: "No file opened" }); + this.failure(parameters, { + errorMessage: "No file opened", + }); } return [2 /*return*/]; }); }); }); - this.registerEvent(this.app.workspace.on('file-menu', function (menu, file, source) { + this.registerEvent(this.app.workspace.on("file-menu", function (menu, file, source) { console.log(source); - if (!(source === "more-options" || source === "tab-header" || source == "file-explorer-context-menu")) { + if (!(source === "more-options" || + source === "tab-header" || + source == "file-explorer-context-menu")) { return; } if (!(file instanceof obsidian.TFile)) { return; } menu.addItem(function (item) { - item - .setTitle("Copy Advanced URI") - .setIcon('link') + item.setTitle("Copy Advanced URI") + .setIcon("link") .setSection("info") - .onClick(function (_) { return _this.handlers.handleCopyFileURI(true, file); }); + .onClick(function (_) { + return _this.handlers.handleCopyFileURI(true, file); + }); }); })); return [2 /*return*/]; @@ -4812,7 +4874,10 @@ var AdvancedURI = /** @class */ (function (_super) { var _this = this; var files = this.app.vault.getFiles(); var idKey = this.settings.idField; - return files.find(function (file) { var _a; return obsidian.parseFrontMatterEntry((_a = _this.app.metadataCache.getFileCache(file)) === null || _a === void 0 ? void 0 : _a.frontmatter, idKey) == uid; }); + return files.find(function (file) { + var _a; + return obsidian.parseFrontMatterEntry((_a = _this.app.metadataCache.getFileCache(file)) === null || _a === void 0 ? void 0 : _a.frontmatter, idKey) == uid; + }); }; AdvancedURI.prototype.append = function (file, parameters) { var _a; @@ -4884,8 +4949,14 @@ var AdvancedURI = /** @class */ (function (_super) { cache = this.app.metadataCache.getFileCache(file); if (cache.frontmatter) { line = cache.frontmatter.position.end.line; - first = fileData.split("\n").slice(0, line + 1).join("\n"); - last = fileData.split("\n").slice(line + 1).join("\n"); + first = fileData + .split("\n") + .slice(0, line + 1) + .join("\n"); + last = fileData + .split("\n") + .slice(line + 1) + .join("\n"); dataToWrite = first + "\n" + parameters.data + "\n" + last; } else { @@ -4917,7 +4988,8 @@ var AdvancedURI = /** @class */ (function (_super) { case 2: parts = outputFileName.split("/"); dir = parts.slice(0, parts.length - 1).join("/"); - if (!(parts.length > 1 && !(this.app.vault.getAbstractFileByPath(dir) instanceof obsidian.TFolder))) return [3 /*break*/, 4]; + if (!(parts.length > 1 && + !(this.app.vault.getAbstractFileByPath(dir) instanceof obsidian.TFolder))) return [3 /*break*/, 4]; return [4 /*yield*/, this.app.vault.createFolder(dir)]; case 3: _a.sent(); @@ -4942,73 +5014,87 @@ var AdvancedURI = /** @class */ (function (_super) { }; AdvancedURI.prototype.openExistingFileAndSetCursor = function (file, parameters) { return __awaiter(this, void 0, void 0, function () { - var fileIsAlreadyOpened_1; - var _this = this; return __generator(this, function (_a) { switch (_a.label) { case 0: if (parameters.openmode == "silent") return [2 /*return*/]; - if (!this.settings.openFileOnWrite) return [3 /*break*/, 3]; - fileIsAlreadyOpened_1 = false; - this.app.workspace.iterateAllLeaves(function (leaf) { - var _a; - if (((_a = leaf.view.file) === null || _a === void 0 ? void 0 : _a.path) === file) { - fileIsAlreadyOpened_1 = true; - _this.app.workspace.setActiveLeaf(leaf, { focus: true }); - } - }); - if (!!fileIsAlreadyOpened_1) return [3 /*break*/, 2]; - return [4 /*yield*/, this.open({ file: file, setting: this.settings.openFileOnWriteInNewPane, parameters: parameters })]; + if (!this.settings.openFileOnWrite) return [3 /*break*/, 2]; + return [4 /*yield*/, this.open({ + file: file, + setting: this.settings.openFileOnWriteInNewPane, + parameters: parameters, + })]; case 1: _a.sent(); - _a.label = 2; - case 2: if (parameters.line != undefined) { this.setCursorInLine(parameters.line); } - _a.label = 3; - case 3: return [2 /*return*/]; + _a.label = 2; + case 2: return [2 /*return*/]; } }); }); }; AdvancedURI.prototype.open = function (_a) { - var _this = this; var file = _a.file, setting = _a.setting, parameters = _a.parameters, supportPopover = _a.supportPopover, mode = _a.mode; - if (parameters.openmode == "popover" && (supportPopover !== null && supportPopover !== void 0 ? supportPopover : true)) { - var hoverEditor = this.app.plugins.plugins["obsidian-hover-editor"]; - if (!hoverEditor) { - new obsidian.Notice("Cannot find Hover Editor plugin. Please file an issue."); - this.failure(parameters); - } - var leaf_1 = hoverEditor.spawnPopover(undefined, function () { - _this.app.workspace.setActiveLeaf(leaf_1, { focus: true }); - }); - var tfile = file instanceof obsidian.TFile ? file : this.app.vault.getAbstractFileByPath(file); - leaf_1.openFile(tfile); - } - else { - var openMode = setting; - if (parameters.newpane !== undefined) { - openMode = parameters.newpane == "true"; - } - if (parameters.openmode !== undefined) { - if (parameters.openmode == "true" || parameters.openmode == "false") { - openMode = parameters.openmode == "true"; - } - else if (parameters.openmode == "popover") { - openMode = false; + return __awaiter(this, void 0, void 0, function () { + var hoverEditor, leaf_1, tfile, openMode, fileIsAlreadyOpened_1; + var _this = this; + return __generator(this, function (_b) { + if (parameters.openmode == "popover" && (supportPopover !== null && supportPopover !== void 0 ? supportPopover : true)) { + hoverEditor = this.app.plugins.plugins["obsidian-hover-editor"]; + if (!hoverEditor) { + new obsidian.Notice("Cannot find Hover Editor plugin. Please file an issue."); + this.failure(parameters); + } + leaf_1 = hoverEditor.spawnPopover(undefined, function () { + _this.app.workspace.setActiveLeaf(leaf_1, { focus: true }); + }); + tfile = file instanceof obsidian.TFile + ? file + : this.app.vault.getAbstractFileByPath(file); + leaf_1.openFile(tfile); } else { - openMode = parameters.openmode; + openMode = setting; + if (parameters.newpane !== undefined) { + openMode = parameters.newpane == "true"; + } + if (parameters.openmode !== undefined) { + if (parameters.openmode == "true" || + parameters.openmode == "false") { + openMode = parameters.openmode == "true"; + } + else if (parameters.openmode == "popover") { + openMode = false; + } + else { + openMode = parameters.openmode; + } + } + if (openMode == "silent") { + return [2 /*return*/]; + } + fileIsAlreadyOpened_1 = false; + if (isBoolean(openMode)) { + app.workspace.iterateAllLeaves(function (leaf) { + var _a; + if (((_a = leaf.view.file) === null || _a === void 0 ? void 0 : _a.path) === parameters.filepath) { + if (fileIsAlreadyOpened_1 && leaf.width == 0) + return; + fileIsAlreadyOpened_1 = true; + app.workspace.setActiveLeaf(leaf, { focus: true }); + } + }); + } + return [2 /*return*/, this.app.workspace.openLinkText(file instanceof obsidian.TFile ? file.path : file, "/", fileIsAlreadyOpened_1 ? false : openMode, mode != undefined + ? { state: { mode: mode } } + : getViewStateFromMode(parameters))]; } - } - if (openMode == "silent") { - return; - } - return this.app.workspace.openLinkText(file instanceof obsidian.TFile ? file.path : file, "", openMode, mode != undefined ? { state: { mode: mode } } : getViewStateFromMode(parameters)); - } + return [2 /*return*/]; + }); + }); }; AdvancedURI.prototype.setCursor = function (mode) { return __awaiter(this, void 0, void 0, function () { @@ -5052,7 +5138,10 @@ var AdvancedURI = /** @class */ (function (_super) { } var line = Math.min(rawLine - 1, view.editor.lineCount() - 1); view.editor.focus(); - view.editor.setCursor({ line: line, ch: view.editor.getLine(line).length }); + view.editor.setCursor({ + line: line, + ch: view.editor.getLine(line).length, + }); }; AdvancedURI.prototype.loadSettings = function () { return __awaiter(this, void 0, void 0, function () { @@ -5087,4 +5176,4 @@ var AdvancedURI = /** @class */ (function (_super) { }(obsidian.Plugin)); module.exports = AdvancedURI; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFpbi5qcyIsInNvdXJjZXMiOlsibm9kZV9tb2R1bGVzL3RzbGliL3RzbGliLmVzNi5qcyIsIm5vZGVfbW9kdWxlcy9mZWF0aGVyLWljb25zL2Rpc3QvZmVhdGhlci5qcyIsIm5vZGVfbW9kdWxlcy9vYnNpZGlhbi1jb21tdW5pdHktbGliL2Rpc3QvdXRpbHMuanMiLCJub2RlX21vZHVsZXMvb2JzaWRpYW4tZGFpbHktbm90ZXMtaW50ZXJmYWNlL2Rpc3QvbWFpbi5qcyIsInNyYy9ibG9ja191dGlscy50cyIsInNyYy9jb25zdGFudHMudHMiLCJzcmMvZGFpbHlfbm90ZV91dGlscy50cyIsInNyYy9tb2RhbHMvZW50ZXJfZGF0YV9tb2RhbC50cyIsInNyYy9tb2RhbHMvZmlsZV9tb2RhbC50cyIsInNyYy91dGlscy50cyIsInNyYy9oYW5kbGVycy50cyIsInNyYy9tb2RhbHMvY29tbWFuZF9tb2RhbC50cyIsInNyYy9tb2RhbHMvcmVwbGFjZV9tb2RhbC50cyIsInNyYy9tb2RhbHMvc2VhcmNoX21vZGFsLnRzIiwic3JjL3NldHRpbmdzLnRzIiwibm9kZ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IGRlZmluZVByb3BlcnR5ID0gZGVmaW5lUHJvcGVydHlNb2R1bGUuZjtcbiAgdmFyIGdldE93blByb3BlcnR5RGVzY3JpcHRvciA9IGdldE93blByb3BlcnR5RGVzY3JpcHRvck1vZHVsZS5mO1xuICBmb3IgKHZhciBpID0gMDsgaSA8IGtleXMubGVuZ3RoOyBpKyspIHtcbiAgICB2YXIga2V5ID0ga2V5c1tpXTtcbiAgICBpZiAoIWhhcyh0YXJnZXQsIGtleSkpIGRlZmluZVByb3BlcnR5KHRhcmdldCwga2V5LCBnZXRPd25Qcm9wZXJ0eURlc2NyaXB0b3Ioc291cmNlLCBrZXkpKTtcbiAgfVxufTtcblxuXG4vKioqLyB9KSxcblxuLyoqKi8gXCIuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9jb3JyZWN0LXByb3RvdHlwZS1nZXR0ZXIuanNcIjpcbi8qISoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqISpcXFxuICAhKioqIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvaW50ZXJuYWxzL2NvcnJlY3QtcHJvdG90eXBlLWdldHRlci5qcyAqKiohXG4gIFxcKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovXG4vKiEgbm8gc3RhdGljIGV4cG9ydHMgZm91bmQgKi9cbi8qKiovIChmdW5jdGlvbihtb2R1bGUsIGV4cG9ydHMsIF9fd2VicGFja19yZXF1aXJlX18pIHtcblxudmFyIGZhaWxzID0gX193ZWJwYWNrX3JlcXVpcmVfXygvKiEgLi4vaW50ZXJuYWxzL2ZhaWxzICovIFwiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvZmFpbHMuanNcIik7XG5cbm1vZHVsZS5leHBvcnRzID0gIWZhaWxzKGZ1bmN0aW9uICgpIHtcbiAgZnVuY3Rpb24gRigp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4gSXRlcmF0b3JDb25zdHJ1Y3Rvcjtcbn07XG5cblxuLyoqKi8gfSksXG5cbi8qKiovIFwiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvY3JlYXRlLXByb3BlcnR5LWRlc2NyaXB0b3IuanNcIjpcbi8qISoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiohKlxcXG4gICEqKiogLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvY3JlYXRlLXByb3BlcnR5LWRlc2NyaXB0b3IuanMgKioqIVxuICBcXCoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovXG4vKiEgbm8gc3RhdGljIGV4cG9ydHMgZm91bmQgKi9cbi8qKiovIChmdW5jdGlvbihtb2R1bGUsIGV4cG9ydHMpIHtcblxubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoYml0bWFwLCB2YWx1ZSkge1xuICByZXR1cm4ge1xuICAgIGVudW1lcmFibGU6ICEoYml0bWFwICYgMSksXG4gICAgY29uZmlndXJhYmxlOiAhKGJpdG1hcCAmIDIpLFxuICAgIHdyaXRhYmxlOiAhKGJpdG1hcCAmIDQpLFxuICAgIHZhbHVlOiB2YWx1ZVxuICB9O1xufTtcblxuXG4vKioqLyB9KSxcblxuLyoqKi8gXCIuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9jcmVhdGUtcHJvcGVydHkuanNcIjpcbi8qISoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqISpcXFxuICAhKioqIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvaW50ZXJuYWxzL2NyZWF0ZS1wcm9wZXJ0eS5qcyAqKiohXG4gIFxcKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq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bn07XG5cblxuLyoqKi8gfSksXG5cbi8qKiovIFwiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvZGVmaW5lLWl0ZXJhdG9yLmpzXCI6XG4vKiEqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiEqXFxcbiAgISoqKiAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9kZWZpbmUtaXRlcmF0b3IuanMgKioqIVxuICBcXCoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqL1xuLyohIG5vIHN0YXRpYyBleHBvcnRzIGZvdW5kICovXG4vKioqLyAoZnVuY3Rpb24obW9kdWxlLCBleHBvcnRzLCBfX3dlYnBhY2tfcmVxdWlyZV9fKSB7XG5cblwidXNlIHN0cmljdFwiO1xuXG52YXIgJCA9IF9fd2VicGFja19yZXF1aXJlX18oLyohIC4uL2ludGVybmFscy9leHBvcnQgKi8gXCIuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9leHBvcnQuanNcIik7XG52YXIgY3JlYXRlSXRlcmF0b3JDb25zdHJ1Y3RvciA9IF9fd2VicGFja19yZXF1aXJlX18oLyohIC4uL2ludGVybmFscy9jcmVhdGUtaXRlcmF0b3ItY29uc3RydWN0b3IgKi8gXCIuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9jcmVhdGUtaXRlcmF0b3ItY29uc3RydWN0b3IuanNcIik7XG52YXIgZ2V0UHJvdG90eXBlT2YgPSBfX3dlYnBhY2tfcmVxdWlyZV9fKC8qISAuLi9pbnRlcm5hbHMvb2JqZWN0LWdldC1wcm90b3R5cGUtb2YgKi8gXCIuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9vYmplY3QtZ2V0LXByb3RvdHlwZS1vZi5qc1wiKTtcbnZhciBzZXRQcm90b3R5cGVPZiA9IF9fd2Vic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tcbiAgcmV0dXJuIE9iamVjdC5kZWZpbmVQcm9wZXJ0eSh7fSwgJ2EnLCB7IGdldDogZnVuY3Rpb24gKCkgeyByZXR1cm4gNzsgfSB9KS5hICE9IDc7XG59KTtcblxuXG4vKioqLyB9KSxcblxuLyoqKi8gXCIuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9kb2N1bWVudC1jcmVhdGUtZWxlbWVudC5qc1wiOlxuLyohKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiEqXFxcbiAgISoqKiAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9kb2N1bWVudC1jcmVhdGUtZWxlbWVudC5qcyAqKiohXG4gIFxcKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi9cbi8qISBubyBzdGF0aWMgZXhwb3J0cyBmb3VuZCAqL1xuLyoqKi8gKGZ1bmN0aW9uKG1vZHVsZSwgZXhwb3J0cywgX193ZWJwYWNrX3JlcXVpcmVfXykge1xuXG52YXIgZ2xvYmFsID0gX193ZWJwYWNrX3JlcXVpcmVfXygvKiEgLi4vaW50ZXJuYWxzL2dsb2JhbCAqLyBcIi4vbm9kZV9tb2R1bGVzL2NvcmUtanMvaW50ZXJuYWxzL2dsb2JhbC5qc1wiKTtcbnZhciBpc09iamVjdCA9IF9fd2VicGFja19yZXF1aXJlX18oLyohIC4uL2ludGVybmFscy9pcy1vYmplY3QgKi8gXCIuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9pcy1vYmplY3QuanNcIik7XG5cbnZhciBkb2N1bWVudCA9IGdsb2JhbC5kb2N1bWVudDtcbi8vIHR5cGVvZiBkb2N1bWVudC5jcmVhdGVFbGVtZW50IGlzICdvYmplY3QnIGluIG9sZCBJRVxudmFyIGV4aXN0ID0gaXNPYmplY3QoZG9jdW1lbnQpICY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ioqKioqKioqKioqKioqKiEqXFxcbiAgISoqKiAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9mYWlscy5qcyAqKiohXG4gIFxcKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi9cbi8qISBubyBzdGF0aWMgZXhwb3J0cyBmb3VuZCAqL1xuLyoqKi8gKGZ1bmN0aW9uKG1vZHVsZSwgZXhwb3J0cykge1xuXG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChleGVjKSB7XG4gIHRyeSB7XG4gICAgcmV0dXJuICEhZXhlYygpO1xuICB9IGNhdGNoIChlcnJvcikge1xuICAgIHJldHVybiB0cnVlO1xuICB9XG59O1xuXG5cbi8qKiovIH0pLFxuXG4vKioqLyBcIi4vbm9kZV9tb2R1bGVzL2NvcmUtanMvaW50ZXJuYWxzL2Z1bmN0aW9uLXRvLXN0cmluZy5qc1wiOlxuLyohKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiohKlxcXG4gICEqKiogLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvZnVuY3Rpb24tdG8tc3RyaW5nLmpzICoqKiFcbiAgXFwqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi9cbi8qISBubyBzdGF0aWMgZXhwb3J0cyBmb3VuZCAqL1xuLyoqKi8gKGZ1bmN0aW9uKG1vZHVsZSwgZXhwb3J0cywgX193ZWJwYWNrX3JlcXVpcmVfXykge1xuXG52YXIgc2hhcmVkID0gX193ZWJwYWNrX3JlcXVpcmVfXygvKiEgLi4vaW50ZXJuYWxzL3NoYXJlZCAqLyBcIi4vbm9kZV9tb2R1bGVzL2NvcmUtanMvaW50ZXJuYWxzL3NoYXJlZC5qc1wiKTtcblxubW9kdWxlLmV4cG9ydHMgPSBzaGFyZWQoJ25hdGl2ZS1mdW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qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiohKlxcXG4gICEqKiogLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvaGlkZGVuLWtleXMuanMgKioqIVxuICBcXCoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovXG4vKiEgbm8gc3RhdGljIGV4cG9ydHMgZm91bmQgKi9cbi8qKiovIChmdW5jdGlvbihtb2R1bGUsIGV4cG9ydHMpIHtcblxubW9kdWxlLmV4cG9ydHMgPSB7fTtcblxuXG4vKioqLyB9KSxcblxuLyoqKi8gXCIuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9oaWRlLmpzXCI6XG4vKiEqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiohKlxcXG4gICEqKiogLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvaGlkZS5qcyAqKiohXG4gIFxcKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqL1xuLyohIG5vIHN0YXRpYyBleHBvcnRzIGZvdW5kICovXG4vKioqLyAoZnVuY3Rpb24obW9kdWxlLCBleHBvcnRzLCBfX3dlYnBhY2tfcmVxdWlyZV9fKSB7XG5cbnZhciBERVNDUklQVE9SUyA9IF9fd2VicGFja19yZXF1aXJlX18oLyohIC4uL2ludGVybmFscy9kZXNjcmlwdG9ycyAqLyBcIi4vbm9kZV9tb2R1bGVzL2NvcmUtanMvaW50ZXJuYWxzL2Rlc2NyaXB0b3JzLmpzXCIpO1xudmFyIGRlZmluZVByb3BlcnR5TW9kdWxlID0gX193ZWJwYWNrX3JlcXVpcmVfXygvKiEgLi4vaW50ZXJuYWxzL29iamVjdC1kZWZpbmUtcHJvcGVydHkgKi8gXCIuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9vYmplY3QtZGVmaW5lLXByb3BlcnR5LmpzXCIp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ZvdW5kICovXG4vKioqLyAoZnVuY3Rpb24obW9kdWxlLCBleHBvcnRzKSB7XG5cbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKGl0KSB7XG4gIHJldHVybiB0eXBlb2YgaXQgPT09ICdvYmplY3QnID8gaXQgIT09IG51bGwgOiB0eXBlb2YgaXQgPT09ICdmdW5jdGlvbic7XG59O1xuXG5cbi8qKiovIH0pLFxuXG4vKioqLyBcIi4vbm9kZV9tb2R1bGVzL2NvcmUtanMvaW50ZXJuYWxzL2lzLXB1cmUuanNcIjpcbi8qISoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiEqXFxcbiAgISoqKiAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9pcy1wdXJlLmpzICoqKiFcbiAgXFwqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovXG4vKiEgbm8gc3RhdGljIGV4cG9ydHMgZm91bmQgKi9cbi8qKiovIChmdW5jdGlvbihtb2R1bGUsIGV4cG9ydHMpIHtcblxubW9kdWxlLmV4cG9ydHMgPSBmYWxzZTtcblxuXG4vKioqLyB9KSxcblxuLyoqKi8gXCIuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9pdGVyYXRvcnMtY29yZS5qc1wiOlxuLyohKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiEqXFxcbiAgISoqKiAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9pdGVyYXRvcnMtY29yZS5qcyAqKiohXG4gIFxcKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi9cbi8qISBubyBzdGF0aWMgZXhwb3J0cyBmb3VuZCAqL1xuLyoqKi8gKGZ1bmN0aW9uKG1vZHVsZSwgZXhwb3J0cywgX193ZWJwYWNrX3JlcXVpcmV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VRPUlM6IEJVR0dZX1NBRkFSSV9JVEVSQVRPUlNcbn07XG5cblxuLyoqKi8gfSksXG5cbi8qKiovIFwiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvaXRlcmF0b3JzLmpzXCI6XG4vKiEqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiEqXFxcbiAgISoqKiAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9pdGVyYXRvcnMuanMgKioqIVxuICBcXCoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqL1xuLyohIG5vIHN0YXRpYyBleHBvcnRzIGZvdW5kICovXG4vKioqLyAoZnVuY3Rpb24obW9kdWxlLCBleHBvcnRzKSB7XG5cbm1vZHVsZS5leHBvcnRzID0ge307XG5cblxuLyoqKi8gfSksXG5cbi8qKiovIFwiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvbmF0aXZlLXN5bWJvbC5qc1wiOlxuLyohKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqISpcXFxuICAhKioqIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvaW50ZXJuYWxzL25hdGl2ZS1zeW1ib2wuanMgKioqIVxuICBcXCoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi9cbi8qISBubyBzdGF0aWMgZXhwb3J0cyBmb3VuZCAqL1xuLyoqKi8gKGZ1bmN0aW9uKG1vZHVsZSwgZXhwb3J0cywgX193ZWJwYWNrX3JlcXVpcmVfXykge1xuXG52YXIgZmFpbHMgPSBfX3dlYnBhY2tfcmVxdWlyZV9fKC8qISAuLi9pbnRlcm5hbHMvZmFpbHMgKi8gXCIuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9mYWlscy5qc1wiKTtcblxubW9kdWxl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5qc1wiKTtcblxudmFyIFdlYWtNYXAgPSBnbG9iYWwuV2Vha01hcDtcblxubW9kdWxlLmV4cG9ydHMgPSB0eXBlb2YgV2Vha01hcCA9PT0gJ2Z1bmN0aW9uJyAmJiAvbmF0aXZlIGNvZGUvLnRlc3QobmF0aXZlRnVuY3Rpb25Ub1N0cmluZy5jYWxsKFdlYWtNYXApKTtcblxuXG4vKioqLyB9KSxcblxuLyoqKi8gXCIuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9vYmplY3QtY3JlYXRlLmpzXCI6XG4vKiEqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiohKlxcXG4gICEqKiogLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvb2JqZWN0LWNyZWF0ZS5qcyAqKiohXG4gIFxcKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqL1xuLyohIG5vIHN0YXRpYyBleHBvcnRzIGZvdW5kICovXG4vKioqLyAoZnVuY3Rpb24obW9kdWxlLCBleHBvcnRzLCBfX3dlYnBhY2tfcmVxdWlyZV9fKSB7XG5cbnZhciBhbk9iamVjdCA9IF9fd2VicGFja19yZXF1aXJlX18oLyohIC4uL2ludGVybmFscy9hbi1vYmplY3QgKi8gXCIuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9hbi1vYmplY3QuanNcIik7XG52YXIgZGVmaW5lUHJvcGVydGllcyA9IF9fd2VicGFja19yZXF1aXJlX18oLyohIC4uL2ludGVybmFscy9vYmplY3QtZGVmaW5lLXByb3BlcnRpZXMgKi8gXCIuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9vYmplY3QtZGVmaW5lLXByb3BlcnRpZXMuanNcIik7XG52YXIgZW51bUJ1Z0tleXMgPSBfX3dlYnBhY2tfcmVxdWlyZV9fKC8qISAuLi9pbnRlcm5hbHMvZW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VzdWx0O1xuICBpZiAoTyAhPT0gbnVsbCkge1xuICAgIEVtcHR5W1BST1RPVFlQRV0gPSBhbk9iamVjdChPKTtcbiAgICByZXN1bHQgPSBuZXcgRW1wdHkoKTtcbiAgICBFbXB0eVtQUk9UT1RZUEVdID0gbnVsbDtcbiAgICAvLyBhZGQgXCJfX3Byb3RvX19cIiBmb3IgT2JqZWN0LmdldFByb3RvdHlwZU9mIHBvbHlmaWxsXG4gICAgcmVzdWx0W0lFX1BST1RPXSA9IE87XG4gIH0gZWxzZSByZXN1bHQgPSBjcmVhdGVEaWN0KCk7XG4gIHJldHVybiBQcm9wZXJ0aWVzID09PSB1bmRlZmluZWQgPyByZXN1bHQgOiBkZWZpbmVQcm9wZXJ0aWVzKHJlc3VsdCwgUHJvcGVydGllcyk7XG59O1xuXG5oaWRkZW5LZXlzW0lFX1BST1RPXSA9IHRydWU7XG5cblxuLyoqKi8gfSksXG5cbi8qKiovIFwiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvb2JqZWN0LWRlZmluZS1wcm9wZXJ0aWVzLmpzXCI6XG4vKiEqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiEqXFxcbiAgISoqKiAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9vYmplY3QtZGVmaW5lLXByb3BlcnRpZXMuanMgKioqIVxuICBcXCoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqL1xuLyohIG5vIHN0YXRpYyBleHBvcnRzIGZvdW5kICovXG4vKioqLyAoZnVuY3Rpb24obW9kdWxlLCBleHBvcnRzLCBfX3dlYnBhY2tfcmVxdWlyZV9fKSB7XG5cbnZhciBERVNDUklQVE9SUyA9IF9fd2VicGFja19yZXF1aXJlX18oLyohIC4uL2ludGVybmFscy9kZXNjcmlwdG9ycyAqLyBcIi4vbm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ZWN0LWRlZmluZS1wcm9wZXJ0eS5qc1wiOlxuLyohKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqISpcXFxuICAhKioqIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvaW50ZXJuYWxzL29iamVjdC1kZWZpbmUtcHJvcGVydHkuanMgKioqIVxuICBcXCoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi9cbi8qISBubyBzdGF0aWMgZXhwb3J0cyBmb3VuZCAqL1xuLyoqKi8gKGZ1bmN0aW9uKG1vZHVsZSwgZXhwb3J0cywgX193ZWJwYWNrX3JlcXVpcmVfXykge1xuXG52YXIgREVTQ1JJUFRPUlMgPSBfX3dlYnBhY2tfcmVxdWlyZV9fKC8qISAuLi9pbnRlcm5hbHMvZGVzY3JpcHRvcnMgKi8gXCIuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9kZXNjcmlwdG9ycy5qc1wiKTtcbnZhciBJRThfRE9NX0RFRklORSA9IF9fd2VicGFja19yZXF1aXJlX18oLyohIC4uL2ludGVybmFscy9pZTgtZG9tLWRlZmluZSAqLyBcIi4vbm9kZV9tb2R1bGVzL2NvcmUtanMvaW50ZXJuYWxzL2llOC1kb20tZGVmaW5lLmpzXCIpO1xudmFyIGFuT2JqZWN0ID0gX193ZWJwYWNrX3JlcXVpcmVfXygvKiEgLi4vaW50ZXJuYWxzL2FuLW9iamVjdCAqLyBcIi4vbm9kZV9tb2R1bGVzL2NvcmUtanMvaW50ZXJuYWxzL2FuLW9iamVjdC5qc1wiKTtcbnZhciB0b1ByaW1pdGl2ZSA9IF9fd2VicGFja19yZXF1aXJlX18oLyohIC4uL2ludGVybmFscy90by1wcmltaXRpdmUgKi8gXCIuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy90by1wcmltaXRpdmUuanNcIik7XG5cbnZhciBu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KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqISpcXFxuICAhKioqIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvaW50ZXJuYWxzL29iamVjdC1nZXQtb3duLXByb3BlcnR5LW5hbWVzLmpzICoqKiFcbiAgXFwqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqL1xuLyohIG5vIHN0YXRpYyBleHBvcnRzIGZvdW5kICovXG4vKioqLyAoZnVuY3Rpb24obW9kdWxlLCBleHBvcnRzLCBfX3dlYnBhY2tfcmVxdWlyZV9fKSB7XG5cbi8vIDE5LjEuMi43IC8gMTUuMi4zLjQgT2JqZWN0LmdldE93blByb3BlcnR5TmFtZXMoTylcbnZhciBpbnRlcm5hbE9iamVjdEtleXMgPSBfX3dlYnBhY2tfcmVxdWlyZV9fKC8qISAuLi9pbnRlcm5hbHMvb2JqZWN0LWtleXMtaW50ZXJuYWwgKi8gXCIuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9vYmplY3Qta2V5cy1pbnRlcm5hbC5qc1wiKTtcbnZhciBlbnVtQnVnS2V5cyA9IF9fd2VicGFja19yZXF1aXJlX18oLyohIC4uL2ludGVybmFscy9lbnVtLWJ1Zy1rZXlzICovIFwiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvZW51bS1idWcta2V5cy5qc1wiKTtcblxudmFyIGhpZGRlbktleXMgPSBlbnVtQnVnS2V5cy5jb25jYXQoJ2xlbmd0aCcsICdwcm90b3R5cGUnKTtcblxuZXhwb3J0cy5mID0gT2JqZWN0LmdldE93blByb3BlcnR5TmFtZXMgfHwgZnVuY3Rpb24gZ2V0T3duUHJvcGVydHlOYW1lcyhPKSB7XG4gIHJldHVybiBpbnRlcm5hbE9iamVjdEtleXMoTywgaGlkZGVuS2V5cyk7XG59O1xuXG5cbi8qKiovIH0pLFxuXG4vKioqLyBcIi4vbm9kZV9tb2R1bGVzL2NvcmUtanMvaW50ZXJuYWxzL29iamVjdC1nZXQtb3duLXByb3BlcnR5LXN5bWJvbHMuanNcIjpcbi8qISoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiEqXFxcbiAgISoqKiAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9vYmplY3QtZ2V0LW93bi1wcm9wZXJ0eS1zeW1ib2xzLmpzICoqKiFcbiAgXFwqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovXG4vKiEgbm8gc3RhdGljIGV4cG9ydHMgZm91bmQgKi9cbi8qKiovIChmdW5jdGlvbihtb2R1bGUsIGV4cG9ydHMpIHtcblxuZXhwb3J0cy5mID0gT2JqZWN0LmdldE93blByb3BlcnR5U3ltYm9scztcblxuXG4vKioqLyB9KSxcblxuLyoqKi8gXCIuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9vYmplY3QtZ2V0LXByb3RvdHlwZS1vZi5qc1wiOlxuLyohKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiEqXFxcbiAgISoqKiAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9vYmplY3QtZ2V0LXByb3RvdHlwZS1vZi5qcyAqKiohXG4gIFxcKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi9cbi8qISBubyBzdGF0aWMgZXhwb3J0cyBmb3VuZCAqL1xuLyoqKi8gKGZ1bmN0aW9uKG1vZHVsZSwgZXhwb3J0cywgX193ZWJwYWNrX3JlcXVpcmVfXykge1xuXG52YXIgaGFzID0gX193ZWJwYWNrX3JlcXVpcm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nVjdG9yKSB7XG4gICAgcmV0dXJuIE8uY29uc3RydWN0b3IucHJvdG90eXBlO1xuICB9IHJldHVybiBPIGluc3RhbmNlb2YgT2JqZWN0ID8gT2JqZWN0UHJvdG90eXBlIDogbnVsbDtcbn07XG5cblxuLyoqKi8gfSksXG5cbi8qKiovIFwiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvb2JqZWN0LWtleXMtaW50ZXJuYWwuanNcIjpcbi8qISoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiohKlxcXG4gICEqKiogLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvb2JqZWN0LWtleXMtaW50ZXJuYWwuanMgKioqIVxuICBcXCoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovXG4vKiEgbm8gc3RhdGljIGV4cG9ydHMgZm91bmQgKi9cbi8qKiovIChmdW5jdGlvbihtb2R1bGUsIGV4cG9ydHMsIF9fd2VicGFja19yZXF1aXJlX18pIHtcblxudmFyIGhhcyA9IF9fd2VicGFja19yZXF1aXJlX18oLyohIC4uL2ludGVybmFscy9oYXMgKi8gXCIuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9oYXMuanNcIik7XG52YXIgdG9JbmRleGVkT2JqZWN0ID0gX193ZWJwYWNrX3JlcXVpcmVfXygvKiEgLi4vaW50ZXJuYWxzL3RvLWluZGV4ZWQtb2JqZWN0ICovIFwiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvdG8taW5kZXhlZC1vYmplY3QuanNcIik7XG52YXIgYXJyYXlJbmNsdWRlcyA9IF9fd2VicGFja19yZXF1aXJlX18oLyohIC4uL2ludGVybmFscy9hcnJheS1pbmNsdWRlcyAqLyBcIi4vbm9kZV9tb2R1bGVzL2NvcmUtanMvaW50ZXJuYWxzL2FycmF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c3RhdGljIGV4cG9ydHMgZm91bmQgKi9cbi8qKiovIChmdW5jdGlvbihtb2R1bGUsIGV4cG9ydHMsIF9fd2VicGFja19yZXF1aXJlX18pIHtcblxudmFyIGludGVybmFsT2JqZWN0S2V5cyA9IF9fd2VicGFja19yZXF1aXJlX18oLyohIC4uL2ludGVybmFscy9vYmplY3Qta2V5cy1pbnRlcm5hbCAqLyBcIi4vbm9kZV9tb2R1bGVzL2NvcmUtanMvaW50ZXJuYWxzL29iamVjdC1rZXlzLWludGVybmFsLmpzXCIpO1xudmFyIGVudW1CdWdLZXlzID0gX193ZWJwYWNrX3JlcXVpcmVfXygvKiEgLi4vaW50ZXJuYWxzL2VudW0tYnVnLWtleXMgKi8gXCIuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9lbnVtLWJ1Zy1rZXlzLmpzXCIpO1xuXG4vLyAxOS4xLjIuMTQgLyAxNS4yLjMuMTQgT2JqZWN0LmtleXMoTylcbm1vZHVsZS5leHBvcnRzID0gT2JqZWN0LmtleXMgfHwgZnVuY3Rpb24ga2V5cyhPKSB7XG4gIHJldHVybiBpbnRlcm5hbE9iamVjdEtleXMoTywgZW51bUJ1Z0tleXMpO1xufTtcblxuXG4vKioqLyB9KSxcblxuLyoqKi8gXCIuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9vYmplY3QtcHJvcGVydHktaXMtZW51bWVyYWJsZS5qc1wiOlxuLyohKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiEqXFxcbiAgISoqKiAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9vYmplY3QtcHJvcGVydHktaXMtZW51bWVyYWJsZS5qcyAqKiohXG4gIFxcKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi9cbi8qISBubyBzdGF0aWMgZ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qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqISpcXFxuICAhKioqIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvaW50ZXJuYWxzL3NldC10by1zdHJpbmctdGFnLmpzICoqKiFcbiAgXFwqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqL1xuLyohIG5vIHN0YXRpYyBleHBvcnRzIGZvdW5kICovXG4vKioqLyAoZnVuY3Rpb24obW9kdWxlLCBleHBvcnRzLCBfX3dlYnBhY2tfcmVxdWlyZV9fKSB7XG5cbnZhciBkZWZpbmVQcm9wZXJ0eSA9IF9fd2VicGFja19yZXF1aXJlX18oLyohIC4uL2ludGVybmFscy9vYmplY3QtZGVmaW5lLXByb3BlcnR5ICovIFwiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvb2JqZWN0LWRlZmluZS1wcm9wZXJ0eS5qc1wiKS5mO1xudmFyIGhhcyA9IF9fd2VicGFja19yZXF1aXJlX18oLyohIC4uL2ludGVybmFscy9oYXMgKi8gXCIuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9oYXMuanNcIik7XG52YXIgd2VsbEtub3duU3ltYm9sID0gX193ZWJwYWNrX3JlcXVpcmVfXygvKiEgLi4vaW50ZXJuYWxzL3dlbGwta25vd24tc3ltYm9sICovIFwiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvd2VsbC1rbm93bi1zeW1ib2wuanNcIik7XG5cbnZhciBUT19TVFJJTkdfVEFHID0gd2VsbEtub3duU3ltYm9sKCd0b1N0cmluZ1RhZycpO1xuXG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChpdCwgVEFHLCBTVEFUSUMpIHtcbiAgaWYgKGl0ICYmICFoYXMoaXQgPSBTVEFUSUMgPyBpdCA6IGl0LnByb3RvdHlwZSwgVE9fU1RSSU5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VsZXMvY29yZS1qcy9pbnRlcm5hbHMvdG8tYWJzb2x1dGUtaW5kZXguanMgKioqIVxuICBcXCoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovXG4vKiEgbm8gc3RhdGljIGV4cG9ydHMgZm91bmQgKi9cbi8qKiovIChmdW5jdGlvbihtb2R1bGUsIGV4cG9ydHMsIF9fd2VicGFja19yZXF1aXJlX18pIHtcblxudmFyIHRvSW50ZWdlciA9IF9fd2VicGFja19yZXF1aXJlX18oLyohIC4uL2ludGVybmFscy90by1pbnRlZ2VyICovIFwiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvdG8taW50ZWdlci5qc1wiKTtcblxudmFyIG1heCA9IE1hdGgubWF4O1xudmFyIG1pbiA9IE1hdGgubWluO1xuXG4vLyBIZWxwZXIgZm9yIGEgcG9wdWxhciByZXBlYXRpbmcgY2FzZSBvZiB0aGUgc3BlYzpcbi8vIExldCBpbnRlZ2VyIGJlID8gVG9JbnRlZ2VyKGluZGV4KS5cbi8vIElmIGludGVnZXIgPCAwLCBsZXQgcmVzdWx0IGJlIG1heCgobGVuZ3RoICsgaW50ZWdlciksIDApOyBlbHNlIGxldCByZXN1bHQgYmUgbWluKGxlbmd0aCwgbGVuZ3RoKS5cbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKGluZGV4LCBsZW5ndGgpIHtcbiAgdmFyIGludGVnZXIgPSB0b0ludGVnZXIoaW5kZXgpO1xuICByZXR1cm4gaW50ZWdlciA8IDAgPyBtYXgoaW50ZWdlciArIGxlbmd0aCwgMCkgOiBtaW4oaW50ZWdlciwgbGVuZ3RoKTtcbn07XG5cblxuLyoqKi8gfSksXG5cbi8qKiovIFwiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvdG8taW5kZXhlZC1vYmplY3QuanNcIjpcbi8qISoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiohKlxcXG4gICEqKiogLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvdG8taW5kZXhlZC1vYmplY3QuanMgKioqIVxuICBcXCoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovXG4vKiEgbm8gc3RhdGljIGV4cG9ydHMgZm91bmQgKi9cbi8qKiovIChmdW5jdGlvbihtb2R1bGUsIGV4cG9ydHMsIF9fd2VicGFja19yZXF1aXJlX18pIHtcblxuLy8gdG9PYmplY3Qgd2l0aCBmYWxsYmFjayBmb3Igbm9uLWFycmF5LWxpa2UgRVMzIHN0cmluZ3NcbnZhciBJbmRleGVkT2JqZWN0ID0gX193ZWJwYWNrX3JlcXVpcmVfXygvKiEgLi4vaW50ZXJuYWxzL2luZGV4ZWQtb2JqZWN0ICovIFwiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvaW5kZXhlZC1vYmplY3QuanNcIik7XG52YXIgcmVxdWlyZU9iamVjdENvZXJjaWJsZSA9IF9fd2VicGFja19yZXF1aXJlX18oLyohIC4uL2ludGVybmFscy9yZXF1aXJlLW9iamVjdC1jb2VyY2libGUgKi8gXCIuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9yZXF1aXJlLW9iamVjdC1jb2VyY2libGUuanNcIik7XG5cbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKGl0KSB7XG4gIHJldHVybiBJbmRleGVkT2JqZWN0KHJlcXVpcmVPYmplY3RDb2VyY2libGUoaXQpKTtcbn07XG5cblxuLyoqKi8gfSksXG5cbi8qKiovIFwiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvdG8taW50ZWdlci5qc1wiOlxuLyohKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqISpcXFxuICAhKioqIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvaW50ZXJuYWxzL3RvLWludGVnZXIuanMgKioqIVxuICBcXCoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi9cbi8qISBubyBzdGF0aWMgZXhwb3J0cyBmb3VuZCAqL1xuLyoqKi8gKGZ1bmN0aW9uKG1vZHVsZSwgZXhwb3J0cykge1xuXG52YXIgY2VpbCA9IE1hdGguY2VpbDtcbnZhciBmbG9vciA9IE1hdGguZmxvb3I7XG5cbi8vIGBUb0ludGVnZXJgIGFic3RyYWN0IG9wZXJhdGlvblxuLy8gaHR0cHM6Ly90YzM5LmdpdGh1Yi5pby9lY21hMjYyLyNzZWMtdG9pbnRlZ2VyXG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChhcmd1bWVudCkge1xuICByZXR1cm4gaXNOYU4oYXJndW1lbnQgPSArYXJndW1lbnQpID8gMCA6IChhcmd1bWVudCA+IDAgPyBmbG9vciA6IGNlaWwpKGFyZ3VtZW50KTtcbn07XG5cblxuLyoqKi8gfSksXG5cbi8qKiovIFwiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvdG8tbGVuZ3RoLmpzXCI6XG4vKiEqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiEqXFxcbiAgISoqKiAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy90by1sZW5ndGguanMgKioqIVxuICBcXCoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqL1xuLyohIG5vIHN0YXRpYyBleHBvcnRzIGZvdW5kICovXG4vKioqLyAoZnVuY3Rpb24obW9kdWxlLCBleHBvcnRzLCBfX3dlYnBhY2tfcmVxdWlyZV9fKSB7XG5cbnZhciB0b0ludGVnZXIgPSBfX3dlYnBhY2tfcmVxdWlyZV9fKC8qISAuLi9pbnRlcm5hbHMvdG8taW50ZW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U3ltYm9sKCcuY29uY2F0KGtleSA9PT0gdW5kZWZpbmVkID8gJycgOiBrZXksICcpXycsICgrK2lkICsgcG9zdGZpeCkudG9TdHJpbmcoMzYpKTtcbn07XG5cblxuLyoqKi8gfSksXG5cbi8qKiovIFwiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvdmFsaWRhdGUtc2V0LXByb3RvdHlwZS1vZi1hcmd1bWVudHMuanNcIjpcbi8qISoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiohKlxcXG4gICEqKiogLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvdmFsaWRhdGUtc2V0LXByb3RvdHlwZS1vZi1hcmd1bWVudHMuanMgKioqIVxuICBcXCoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovXG4vKiEgbm8gc3RhdGljIGV4cG9ydHMgZm91bmQgKi9cbi8qKiovIChmdW5jdGlvbihtb2R1bGUsIGV4cG9ydHMsIF9fd2VicGFja19yZXF1aXJlX18pIHtcblxudmFyIGlzT2JqZWN0ID0gX193ZWJwYWNrX3JlcXVpcmVfXygvKiEgLi4vaW50ZXJuYWxzL2lzLW9iamVjdCAqLyBcIi4vbm9kZV9tb2R1bGVzL2NvcmUtanMvaW50ZXJuYWxzL2lzLW9iamVjdC5qc1wiKTtcbnZhciBhbk9iamVjdCA9IF9fd2VicGFja19yZXF1aXJlX18oLyohIC4uL2ludGVybmFscy9hbi1vYmplY3QgKi8gXCIuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9hbi1vYmplY3QuanNcIik7XG5cbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKE8sIHByb3RvKSB7XG4gIGFuT2JqZWN0KE8pO1xuICBpZiAoIWlzT2JqZWN0KHByb3RvKSAmJiBwcm90byAhPT0gbnVsbCkge1xuICAgIHRocm93IFR5cGVFcnJvcihcIkNhbid0IHNldCBcIiArIFN0cmluZyhwcm90bykgKyAnIGFzIGEgcHJvdG90eXBlJyk7XG4gIH1cbn07XG5cblxuLyoqKi8gfSksXG5cbi8qKiovIFwiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvd2VsbC1rbm93bi1zeW1ib2wuanNcIjpcbi8qISoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiohKlxcXG4gICEqKiogLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvd2VsbC1rbm93bi1zeW1ib2wuanMgKioqIVxuICBcXCoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovXG4vKiEgbm8gc3RhdGljIGV4cG9ydHMgZm91bmQgKi9cbi8qKiovIChmdW5jdGlvbihtb2R1bGUsIGV4cG9ydHMsIF9fd2VicGFja19yZXF1aXJlX18pIHtcblxudmFyIGdsb2JhbCA9IF9fd2VicGFja19yZXF1aXJlX18oLyohIC4uL2ludGVybmFscy9nbG9iYWwgKi8gXCIuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9nbG9iYWwuanNcIik7XG52YXIgc2hhcmVkID0gX193ZWJwYWNrX3JlcXVpcmVfXygvKiEgLi4vaW50ZXJuYWxzL3NoYXJlZCAqLyBcIi4vbm9kZV9tb2R1bGVzL2NvcmUtanMvaW50ZXJuYWxzL3NoYXJlZC5qc1wiKTtcbnZhciB1aWQgPSBfX3dlYnBhY2tfcmVxdWlyZV9fKC8qISAuLi9pbnRlcm5hbHMvdWlkICovIFwiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvdWlkLmpzXCIpO1xudmFyIE5BVElWRV9TWU1CT0wgPSBfX3dlYnBhY2tfcmVxdWlyZV9fKC8qISAuLi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VQYXRoKGZvbGRlciwgZmlsZW5hbWUpO1xuICAgIHRyeSB7XG4gICAgICAgIGNvbnN0IGNyZWF0ZWRGaWxlID0gYXdhaXQgdmF1bHQuY3JlYXRlKG5vcm1hbGl6ZWRQYXRoLCB0ZW1wbGF0ZUNvbnRlbnRzXG4gICAgICAgICAgICAucmVwbGFjZSgve3tcXHMqZGF0ZVxccyp9fS9naSwgZmlsZW5hbWUpXG4gICAgICAgICAgICAucmVwbGFjZSgve3tcXHMqdGltZVxccyp9fS9naSwgbW9tZW50KCkuZm9ybWF0KFwiSEg6bW1cIikpXG4gICAgICAgICAgICAucmVwbGFjZSgve3tcXHMqdGl0bGVcXHMqfX0vZ2ksIGZpbGVuYW1lKVxuICAgICAgICAgICAgLnJlcGxhY2UoL3t7XFxzKihkYXRlfHRpbWUpXFxzKigoWystXVxcZCspKFt5cW13ZGhzXSkpP1xccyooOi4rPyk/fX0vZ2ksIChfLCBfdGltZU9yRGF0ZSwgY2FsYywgdGltZURlbHRhLCB1bml0LCBtb21lbnRGb3JtYXQpID0+IHtcbiAgICAgICAgICAgIGNvbnN0IG5vdyA9IG1vbWVudCgpO1xuICAgICAgICAgICAgY29uc3QgY3VycmVudERhdGUgPSBkYXRlLmNsb25lKCkuc2V0KHtcbiAgICAgICAgICAgICAgICBob3VyOiBub3cuZ2V0KFwiaG91clwiKSxcbiAgICAgICAgICAgICAgICBtaW51dGU6IG5vdy5nZXQoXCJtaW51dGVcIiksXG4gICAgICAgICAgICAgICAgc2Vjb25kOiBub3cuZ2V0KFwic2Vjb25kXCIpLFxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBpZiAoY2FsYykge1xuICAgICAgICAgICAgICAgIGN1cnJlbnREYXRlLmFkZChwYXJzZUludCh0aW1lRGVsdGEsIDEwKSwgdW5pdCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAobW9tZW50Rm9ybWF0KSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGN1cnJlbnRE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tZSA9IGRhdGUuZm9ybWF0KGZvcm1hdCk7XG4gICAgY29uc3Qgbm9ybWFsaXplZFBhdGggPSBhd2FpdCBnZXROb3RlUGF0aChmb2xkZXIsIGZpbGVuYW1lKTtcbiAgICB0cnkge1xuICAgICAgICBjb25zdCBjcmVhdGVkRmlsZSA9IGF3YWl0IHZhdWx0LmNyZWF0ZShub3JtYWxpemVkUGF0aCwgdGVtcGxhdGVDb250ZW50c1xuICAgICAgICAgICAgLnJlcGxhY2UoL3t7XFxzKihkYXRlfHRpbWUpXFxzKigoWystXVxcZCspKFt5cW13ZGhzXSkpP1xccyooOi4rPyk/fX0vZ2ksIChfLCBfdGltZU9yRGF0ZSwgY2FsYywgdGltZURlbHRhLCB1bml0LCBtb21lbnRGb3JtYXQpID0+IHtcbiAgICAgICAgICAgIGNvbnN0IG5vdyA9IHdpbmRvdy5tb21lbnQoKTtcbiAgICAgICAgICAgIGNvbnN0IGN1cnJlbnREYXRlID0gZGF0ZS5jbG9uZSgpLnNldCh7XG4gICAgICAgICAgICAgICAgaG91cjogbm93LmdldChcImhvdXJcIiksXG4gICAgICAgICAgICAgICAgbWludXRlOiBub3cuZ2V0KFwibWludXRlXCIpLFxuICAgICAgICAgICAgICAgIHNlY29uZDogbm93LmdldChcInNlY29uZFwiKSxcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgaWYgKGNhbGMpIHtcbiAgICAgICAgICAgICAgICBjdXJyZW50RGF0ZS5hZGQocGFyc2VJbnQodGltZURlbHRhLCAxMCksIHVuaXQpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKG1vbWVudEZvcm1hdCkge1xuICAgICAgICAgICAgICAgIHJldHVybiBjdXJyZW50RGF0ZS5mb3JtYXQobW9tZW50Rm9ybWF0LnN1YnN0cmluZygxKS50cmltKCkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIGN1cnJlbnREYXRlLmZvcm1hdChmb3JtYXQpO1xuICAgICAgICB9KV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LV1cXGQrKShbeXFtd2Roc10pKT9cXHMqKDouKz8pP319L2dpLCAoXywgX3RpbWVPckRhdGUsIGNhbGMsIHRpbWVEZWx0YSwgdW5pdCwgbW9tZW50Rm9ybWF0KSA9PiB7XG4gICAgICAgICAgICBjb25zdCBub3cgPSB3aW5kb3cubW9tZW50KCk7XG4gICAgICAgICAgICBjb25zdCBjdXJyZW50RGF0ZSA9IGRhdGUuY2xvbmUoKS5zZXQoe1xuICAgICAgICAgICAgICAgIGhvdXI6IG5vdy5nZXQoXCJob3VyXCIpLFxuICAgICAgICAgICAgICAgIG1pbnV0ZTogbm93LmdldChcIm1pbnV0ZVwiKSxcbiAgICAgICAgICAgICAgICBzZWNvbmQ6IG5vdy5nZXQoXCJzZWNvbmRcIiksXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIGlmIChjYWxjKSB7XG4gICAgICAgICAgICAgICAgY3VycmVudERhdGUuYWRkKHBhcnNlSW50KHRpbWVEZWx0YSwgMTApLCB1bml0KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChtb21lbnRGb3JtYXQpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gY3VycmVudERhdGUuZm9ybWF0KG1vbWVudEZvcm1hdC5zdWJzdHJpbmcoMSkudHJpbSgpKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBjdXJyZW50RGF0ZS5mb3JtYXQoZm9ybWF0KTtcbiAgICAgICAgfSlcbiAgICAgICAgICAgIC5yZXBsYWNlKC97e1xccypkYXRlXFxzKn19L2dpLCBmaWxlbmFtZSlcbiAgICAgICAgICAgIC5yZXBsYWNlKC97e1xccyp0aW1lXFxzKn19L2dpLCB3aW5kb3cubW9tZW50KCkuZm9ybWF0KFwiSEg6bW1cIikpXG4gICAgICAgICAgICAucmVwbGFjZSgve3tcXHMqdGl0bGVcXHMqfX0vZ2ksIGZpbGVuYW1lKSk7XG4gICAgICAgIC8vIGVzbGludC1kaXNhYmxlLW5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sIF90aW1lT3JEYXRlLCBjYWxjLCB0aW1lRGVsdGEsIHVuaXQsIG1vbWVudEZvcm1hdCkgPT4ge1xuICAgICAgICAgICAgY29uc3Qgbm93ID0gd2luZG93Lm1vbWVudCgpO1xuICAgICAgICAgICAgY29uc3QgY3VycmVudERhdGUgPSBkYXRlLmNsb25lKCkuc2V0KHtcbiAgICAgICAgICAgICAgICBob3VyOiBub3cuZ2V0KFwiaG91clwiKSxcbiAgICAgICAgICAgICAgICBtaW51dGU6IG5vdy5nZXQoXCJtaW51dGVcIiksXG4gICAgICAgICAgICAgICAgc2Vjb25kOiBub3cuZ2V0KFwic2Vjb25kXCIpLFxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBpZiAoY2FsYykge1xuICAgICAgICAgICAgICAgIGN1cnJlbnREYXRlLmFkZChwYXJzZUludCh0aW1lRGVsdGEsIDEwKSwgdW5pdCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAobW9tZW50Rm9ybWF0KSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGN1cnJlbnREYXRlLmZvcm1hdChtb21lbnRGb3JtYXQuc3Vic3RyaW5nKDEpLnRyaW0oKSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gY3VycmVudERhdGUuZm9ybWF0KGZvcm1hdCk7XG4gICAgICAgIH0pXG4gICAgICAgICAgICAucmVwbGFjZSgve3tcXHMqZGF0ZVxccyp9fS9naSwgZmlsZW5hbWUpXG4gICAgICAgICAgICAucmVwbGFjZSgve3tcXHMqdGltZVxccyp9fS9naSwgd2luZG93Lm1vbWVudCgpLmZvcm1hdChcIkhIOm1tXCIpKVxuICAgICAgICAgICAgLnJlcGxhY2UoL3t7XFxzKnRpdGxlXFxzKn19L2dpLCBmaWxlbmFtZSkpO1xuICAgICAgICAvLyBlc2xpbnQtZGlzYWJsZS1uZXh0LWxpbmUgQHR5cGVzY3JpcHQtZXNsaW50L25vLWV4cGxpY2l0LWFueVxuICAg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Y3Vyc29yLmxpbmUgJiZcbiAgICAgICAgICAgICAgICAgICAgbGlzdC5wb3NpdGlvbi5lbmQubGluZSA+PSBjdXJzb3IubGluZSkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gbGlzdDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gY3VycmVudEJsb2NrO1xuICAgIH1cblxuICAgIHByaXZhdGUgc3RhdGljIGdldElkT2ZCbG9jayhcbiAgICAgICAgZWRpdG9yOiBFZGl0b3IsXG4gICAgICAgIGJsb2NrOiBTZWN0aW9uQ2FjaGUgfCBMaXN0SXRlbUNhY2hlLFxuICAgICk6IHN0cmluZyB7XG4gICAgICAgIGNvbnN0IGJsb2NrSWQgPSBibG9jay5pZDtcblxuICAgICAgICBpZiAoYmxvY2tJZCkge1xuICAgICAgICAgICAgcmV0dXJuIGJsb2NrSWQ7XG4gICAgICAgIH1cblxuICAgICAgICAvLyBBZGQgYSBibG9jayBpZFxuICAgICAgICBjb25zdCBzZWN0aW9uRW5kID0gYmxvY2sucG9zaXRpb24uZW5kO1xuICAgICAgICBjb25zdCBwb3MgPSB7XG4gICAgICAgICAgICBjaDogc2VjdGlvbkVuZC5jb2wsXG4gICAgICAgICAgICBsaW5lOiBzZWN0aW9uRW5kLmxpbmUsXG4gICAgICAgIH07XG5cbiAgICAgICAgY29uc3QgbmV3SWQgPSBNYXRoLnJhbmRvbSgpLnRvU3RyaW5nKDM2KS5zdWJzdHJpbmcoMiwgOCk7XG4gICAgICAgIGNvbnN0IHNwYWNlciA9IEJsb2NrVXRpbHMuc2hvdWxkSW5zZXJ0QWZ0ZXIoYmxvY2spID8gXCJcXG5cXG5cIiA6IFwiIFwiO1xuXG4gICAgICAgIGVkaXRvci5yZXBsYWNlUmFuZ2UoYCR7c3BhY2VyfV4ke25ld0lkfWAsIHBvcyk7XG4gICAgICAgIHJldHVybiBuZXdJZDtcbiAgICB9XG5cbiAgICBwcml2YXRlIHN0YXRpYyBzaG91bGRJbnNlcnRBZnRlcihibG9jazogU2VjdGlvbkNhY2hlIHwgTGlzdEl0ZW1DYWNoZSk6IGJvb2xlYW4ge1xuICAgICAgICBpZiAoKGJsb2NrIGFzIGFueSkudHlwZSkge1xuICAgICAgICAgICAgcmV0dXJuIFtcbiAgICAgICAgICAgICAgICBcImJsb2NrcXVvdGVcIixcbiAgICAgICAgICAgICAgICBcImNvZGVcIixcbiAgICAgICAgICAgICAgICBcInRhYmxlXCIsXG4gICAgICAgICAgICAgICAgXCJoZWFkaW5nXCIsXG4gICAgICAgICAgICAgICAgXCJjb21tZW50XCIsXG4gICAgICAgICAgICAgICAgXCJmb290bm90ZURlZmluaXRpb25cIixcbiAgICAgICAgICAgIF0uaW5jbHVkZXMoKGJsb2NrIGFzIGFueSkudHlwZSk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBwdWJsaWMgc3RhdGljIGdldEJsb2NrSWQoKTogc3RyaW5nIHwgdW5kZWZpbmVkIHtcbiAgICAgICAgY29uc3QgdmlldyA9IGFwcC53b3Jrc3BhY2UuZ2V0QWN0aXZlVmlld09mVHlwZShNYXJrZG93blZpZXcpO1xuICAgICAgICBpZiAodmlldykge1xuICAgICAgICAgICAgY29uc3QgZWRpdG9yID0gdmlldy5lZGl0b3I7XG4gICAgICAgICAgICBjb25zdCBmaWxlID0gdmlldy5maWxlO1xuICAgICAgICAgICAgY29uc3QgYmxvY2sgPSB0aGlzLmdldEJsb2NrKGVkaXRvciwgZmlsZSk7XG4gICAgICAgICAgICBpZiAoYmxvY2spXG4gICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuZ2V0SWRPZkJsb2NrKGVkaXRvciwgYmxvY2spO1xuICAgICAgICB9XG4gICAgfVxuXG59IiwiaW1wb3J0IHsgQWR2YW5jZWRVUklTZXR0aW5ncyB9IGZyb20gXCIuL3R5cGVzXCI7XG5cbmV4cG9ydCBjb25zdCBERUZBVUxUX1NFVFRJTkdTO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XG4gICAgICAgICAgICAgICAgICAgIGlmIChtb2RlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBkaXNwbGF5ID0gYFdyaXRlIFwiJHtxdWVyeX1cIiBpbiAke21vZGV9IG1vZGVgO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgZGlzcGxheSA9IGBXcml0ZSBcIiR7cXVlcnl9XCJgO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKG1vZGUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGRpc3BsYXkgPSBgT3BlbiBpbiAke21vZGV9IG1vZGVgO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgZGlzcGxheSA9IGBPcGVuYDtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBzdWdnZXN0aW9ucy5wdXNoKHtcbiAgICAgICAgICAgICAgICAgICAgZGF0YTogcXVlcnksXG4gICAgICAgICAgICAgICAgICAgIGRpc3BsYXk6IGRpc3BsYXksXG4gICAgICAgICAgICAgICAgICAgIG1vZGU6IG1vZGUsXG4gICAgICAgICAgICAgICAgICAgIGZ1bmM6ICgpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLmZpbGUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnBsdWdpbi50b29scy5jb3B5VVJJKHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZmlsZXBhdGg6IHRoaXMuZmlsZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGF0YTogcXVlcnksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1vZGU6IG1vZGUgYXMgUGFyYW1ldGVyc1tcIm1vZGVcIl1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5wbHVnaW4udG9vbHMuY29weVVSSSh7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRhaWx5OiBcInRydWVcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGF0YTogcXVlcnksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1vZGU6IG1vZGUgYXMgUGFyYW1ldGVyc1tcIm1vZGVcIl1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIHN1Z2dlc3Rpb25zO1xuICAgIH1cblxuICAgIHJlbmRlclN1Z2dlc3Rpb24odmFsdWU6IEVudGVyRGF0YSwgZWw6IEhUTUxFbGVtZW50KTogdm9pZCB7XG4gICAgICAgIGVsLmlubmVyVGV4dCA9IHZhbHVlLmRpc3BsYXk7XG4gICAgfTtcblxuICAgIG9uQ2hvb3NlU3VnZ2VzdGlvbihpdGVtOiBFbnRlckRhdGEsIF86IE1vdXNlRXZlbnQgfCBLZXlib2FyZEV2ZW50KTogdm9pZCB7XG4gICAgICAgIGl0ZW0uZnVuYygpO1xuICAgIH07XG59XG4iLCJpbXBvcnQgeyBGdXp6eVN1Z2dlc3RNb2RhbCB9IGZyb20gXCJvYnNpZGlhblwiO1xuaW1wb3J0IEFkdmFuY2VkVVJJIGZyb20gXCIuLi9tYWluXCI7XG5pbXBvcnQgeyBGaWxlTW9kYWxEYXRhIH0gZnJvbSBcIi4uL3R5cGVzXCI7XG5cbmV4cG9ydCBjbGFzcyBGaWxlTW9kYWwgZXh0ZW5kcyBGdXp6eVN1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ICAgICAgICBjb25zdCBpbmRleCA9IHBhcnNlSW50KGl0ZW0pO1xuICAgICAgICAgICAgICAgICAgICBpZiAoTnVtYmVyLmlzTmFOKGluZGV4KSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgY2FjaGUgPSBjYWNoZS5maW5kKChlKSA9PiBlID09IGl0ZW0pO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGNhY2hlID0gY2FjaGVbcGFyc2VJbnQoaXRlbSldO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGNhY2hlID0gY2FjaGVbaXRlbV07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVzID0gY2FjaGU7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICByZXMgPSBmcm9udG1hdHRlcltrZXldO1xuICAgICAgICB9XG5cbiAgICAgICAgY29weVRleHQocmVzKTtcbiAgICB9XG5cbiAgICBoYW5kbGVXb3Jrc3BhY2UocGFyYW1ldGVyczogUGFyYW1ldGVycykge1xuICAgICAgICBjb25zdCB3b3Jrc3BhY2VzID0gYXBwLmludGVybmFsUGx1Z2lucz8ucGx1Z2lucz8ud29ya3NwYWNlcztcbiAgICAgICAgaWYgKCF3b3Jrc3BhY2VzKSB7XG4gICAgICAgICAgICBuZXcgTm90aWNlKFwiQ2Fubm90IGZpbmQgV29ya3NwYWNlcyBwbHVnaW4uIFBsZWFzZSBmaWxlIGFuIGlzc3VlLlwiKTtcbiAgICAgICAgICAgIHRoaXMucGx1Z2luLmZhaWx1cmUocGFyYW1ldGVycyk7XG4gICAgICAgIH0gZWxzZSBpZiAod29ya3NwYWNlcy5lbmFibGVkKSB7XG4gICAgICAgICAgICBpZiAocGFyYW1ldGVycy5zYXZld29ya3NwYWNlID09IFwidHJ1ZVwiKSB7XG4gICAgICAgICAgICAgICAgY29uc3QgYWN0aXZlID0gd29ya3NwYWNlcy5pb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AgICAgICAgICAgICAgICAgICAgIHBhcmFtZXRlcnMuZmlsZXBhdGggPSBnZXRBbHRlcm5hdGl2ZUZpbGVQYXRoKGZpbGUpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGF3YWl0IHRoaXMucGx1Z2luLm9wZW4oeyBmaWxlOiBwYXJhbWV0ZXJzLmZpbGVwYXRoLCBtb2RlOiBcInNvdXJjZVwiLCBwYXJhbWV0ZXJzOiBwYXJhbWV0ZXJzIH0pO1xuICAgICAgICAgICAgICAgIGNvbnN0IHZpZXcgPSBhcHAud29ya3NwYWNlLmdldEFjdGl2ZVZpZXdPZlR5cGUoTWFya2Rvd25WaWV3KTtcbiAgICAgICAgICAgICAgICBpZiAodmlldykge1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBlZGl0b3IgPSB2aWV3LmVkaXRvcjtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgZGF0YSA9IGVkaXRvci5nZXRWYWx1ZSgpO1xuICAgICAgICAgICAgICAgICAgICBpZiAocGFyYW1ldGVycy5tb2RlID09PSBcImFwcGVuZFwiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBlZGl0b3Iuc2V0VmFsdWUoZGF0YSArIFwiXFxuXCIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgbGluZXMgPSBlZGl0b3IubGluZUNvdW50KCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBlZGl0b3Iuc2V0Q3Vyc29yKHsgY2g6IDAsIGxpbmU6IGxpbmVzIH0pO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHBhcmFtZXRlcnMubW9kZSA9PT0gXCJwcmVwZW5kXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGVkaXRvci5zZXRWYWx1ZShcIlxcblwiICsgZGF0YSk7XG4gICAgICAgICAgICAgICAgICAgICAgICBlZGl0b3Iuc2V0Q3Vyc29yKHsgY2g6IDA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5kIGluIHJhd0NvbW1hbmRzKSB7XG4gICAgICAgICAgICAgICAgaWYgKHJhd0NvbW1hbmRzW2NvbW1hbmRdLm5hbWUgPT09IHBhcmFtZXRlcnMuY29tbWFuZG5hbWUpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHJhd0NvbW1hbmRzW2NvbW1hbmRdLmNhbGxiYWNrKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByYXdDb21tYW5kc1tjb21tYW5kXS5jYWxsYmFjaygpO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmF3Q29tbWFuZHNbY29tbWFuZF0uY2hlY2tDYWxsYmFjayhmYWxzZSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHRoaXMucGx1Z2luLnN1Y2Nlc3MocGFyYW1ldGVycyk7XG4gICAgfVxuXG4gICAgYXN5bmMgaGFuZGxlRXZhbChwYXJhbWV0ZXJzOiBQYXJhbWV0ZXJzKSB7XG4gICAgICAgIGlmIChwYXJhbWV0ZXJzLmZpbGVwYXRoKSB7XG4gICAgICAgICAgICBpZiAocGFyYW1ldGVycy5tb2RlKSB7XG4gICAgICAgICAgICAgICAgaWYgKHBhcmFtZXRlcnMubW9kZSA9PSBcIm5ld1wiKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IGZpbGUgPSBhcHAubWV0YWRhdGFDYWNoZS5nZXRGaXJzdExpbmtwYXRoRGVzdChwYXJhbWV0ZXJzLmZpbGVwYXRoLCBcIi9cIik7XG4gICAgICAgICAgICAgICAgICAgIGlmIChmaWxlIGluc3RhbmNlb2YgVEZpbGUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhcmFtZXRlcnMuZmlsZXBhdGggPSBnZXRBbHRlcm5hdGl2ZUZpbGVQYXRoKGZpbGUpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGF3YWl0IHRoaXMucGx1Z2luLm9wZW4oeyBmaWxlOiBwYXJhbWV0ZXJzLmZpbGVwYXRoLCBtb2RlOiBcInNvdXJjZVwiLCBwYXJhbWV0ZXJzOiBwYXJhbWV0ZXJzIH0pO1xuICAgICAgICAgICAgICAgIGNvbnN0IHZpZXcgPSBhcHAud29ya3NwYWNlLmdldEFjdGl2ZVZpZXdPZlR5cGUoTWFya2Rvd25WaWV3KTtcbiAgICAgICAgICAgICAgICBpZiAodmlldykge1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBlZGl0b3IgPSB2aWV3LmVkaXRvcjtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgZGF0YSA9IGVkaXRvci5nZXRWYWx1ZSgpO1xuICAgICAgICAgICAgICAgICAgICBpZiAocGFyYW1ldGVycy5tb2RlID09PSBcImFwcGVuZFwiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBlZGl0b3Iuc2V0VmFsdWUoZGF0YSArIFwiXFxuXCIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgbGluZXMgPSBlZGl0b3IubGluZUNvdW50KCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBlZGl0b3Iuc2V0Q3Vyc29yKHsgY2g6IDAsIGxpbmU6IGxpbmVzIH0pO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHBhcmFtZXRlcnMubW9kZSA9PT0gXCJwcmVwZW5kXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGVkaXRvci5zZXRWYWx1ZShcIlxcblwiICsgZGF0YSk7XG4gICAgICAgICAgICAgICAgICAgICAgICBlZGl0b3Iuc2V0Q3Vyc29yKHsgY2g6IDAsIGxpbmU6IDAgfSk7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAocGFyYW1ldGVycy5tb2RlID09PSBc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BpZiAocGFyYW1ldGVycy5maWxlcGF0aCB8fCBmaWxlKSB7XG4gICAgICAgICAgICBsZXQgb3V0RmlsZTogVEZpbGU7XG4gICAgICAgICAgICBsZXQgcGF0aCA9IHBhcmFtZXRlcnMuZmlsZXBhdGggPz8gZmlsZS5wYXRoO1xuICAgICAgICAgICAgaWYgKHBhcmFtZXRlcnMubW9kZSA9PT0gXCJvdmVyd3JpdGVcIikge1xuICAgICAgICAgICAgICAgIG91dEZpbGUgPSBhd2FpdCB0aGlzLnBsdWdpbi53cml0ZUFuZE9wZW5GaWxlKHBhdGgsIHBhcmFtZXRlcnMuZGF0YSwgcGFyYW1ldGVycyk7XG4gICAgICAgICAgICAgICAgdGhpcy5wbHVnaW4uc3VjY2VzcyhwYXJhbWV0ZXJzKTtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAocGFyYW1ldGVycy5tb2RlID09PSBcInByZXBlbmRcIikge1xuICAgICAgICAgICAgICAgIGlmIChmaWxlIGluc3RhbmNlb2YgVEZpbGUpIHtcbiAgICAgICAgICAgICAgICAgICAgb3V0RmlsZSA9IGF3YWl0IHRoaXMucGx1Z2luLnByZXBlbmQoZmlsZSwgcGFyYW1ldGVycyk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgb3V0RmlsZSA9IGF3YWl0IHRoaXMucGx1Z2luLnByZXBlbmQocGF0aCwgcGFyYW1ldGVycyk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHRoaXMucGx1Z2luLnN1Y2Nlc3MocGFyYW1ldGVycyk7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKHBhcmFtZXRlcnMubW9kZSA9PT0gXCJhcHBlbmRcIikge1xuICAgICAgICAgICAgICAgIGlmIChmaWxlIGluc3RhbmNlb2YgVEZpbGUpIHtcbiAgICAgICAgICAgICAgICAgICAgb3V0RmlsZSA9IGF3YWl0IHRoaXMucGx1Z2luLmFwcGVuZChmaWxlLCBwY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4gICAgICAgICAgICAgICAgcGFyYW1ldGVyczogcGFyYW1ldGVycyxcbiAgICAgICAgICAgICAgICBzdXBwb3J0UG9wb3ZlcjogZmFsc2UsXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIGNvbnN0IHZpZXcgPSBhcHAud29ya3NwYWNlLmdldEFjdGl2ZVZpZXdPZlR5cGUoTWFya2Rvd25WaWV3KTtcbiAgICAgICAgICAgIGlmICghdmlldykgcmV0dXJuO1xuICAgICAgICAgICAgY29uc3QgY2FjaGUgPSBhcHAubWV0YWRhdGFDYWNoZS5nZXRGaWxlQ2FjaGUodmlldy5maWxlKTtcbiAgICAgICAgICAgIGNvbnN0IGhlYWRpbmcgPSBjYWNoZS5oZWFkaW5ncy5maW5kKChlKSA9PiBlLmhlYWRpbmcgPT09IHBhcmFtZXRlcnMuaGVhZGluZyk7XG4gICAgICAgICAgICB2aWV3LmVkaXRvci5mb2N1cygpO1xuICAgICAgICAgICAgdmlldy5lZGl0b3Iuc2V0Q3Vyc29yKHsgbGluZTogaGVhZGluZy5wb3NpdGlvbi5zdGFydC5saW5lICsgMSwgY2g6IDAgfSk7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSBpZiAocGFyYW1ldGVycy5ibG9jayAhPSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIGF3YWl0IHRoaXMucGx1Z2luLm9wZW4oe1xuICAgICAgICAgICAgICAgIGZpbGU6IHBhcmFtZXRlcnMuZmlsZXBhdGggKyBcIiNeXCIgKyBwYXJhbWV0ZXJzLmJsb2NrLFxuICAgICAgICAgICAgICAgIHNldHRpbmc6IHRoaXMucGx1Z2luLnNldHRpbmdzLm9wZW5GaWxlV2l0aG91dFdyaXRlSW5OZXdQYW5lLFxuICAgICAgICAgICAgICAgIHBhcmFtZXRlcnM6IHBhcmFtZXRlcnMsXG4gICAgICAgICAgICAgICAgc3VwcG9ydFBvcG92ZXI6IGZhbHNlLFxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBjb25zdCB2aWV3ID0gYXBwLndvcmtzcGFjZS5nZXRBY3RpdmVWaWV3T2ZUeXBlKE1hcmtkb3duVmlldyk7XG4gICAgICAgICAgICBpZiAoIXZpZXcpIHJldHVybjtcbiAgICAgICAgICAgIGNvbnN0IGNhY2hlID0gYXBwLm1ldGFkYXRhQ2FjaGUuZ2V0RmlsZUNhY2hlKHZpZXcuZmlsZSk7XG4gICAgICAgICAgICBjb25zdCBibG9jayA9IGNhY2hlLmJsb2Nrc1twYXJhbWV0ZXJzLmJsb2NrXTtcbiAgICAgICAgICAgIHZpZXcuZWRpdG9yLmZvY3VzKCk7XG4gICAgICAgICAgICB2aWV3LmVkaXRvci5zZXRDdXJzb3IoeyBsaW5lOiBibG9jay5wb3NpdGlvbi5zdGFydC5saW5lLCBjaDogMCB9KTtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIGlmICghZmlsZUlzQWxyZWFkeU9wZW5lZClcbiAgICAgICAgICAgICAgICBhd2FpdCB0aGlzLnBsdWdpbi5vcGVuKHtcbiAgICAgICAgICAgICAgICAgICAgZmlsZTogcGFyYW1ldGVycy5maWxlcGF0aCxcbiAgICAgICAgICAgICAgICAgICAgc2V0dGluZzogdGhpcy5wbHVnaW4uc2V0dGluZ3Mub3BlbkZpbGVXaXRob3V0V3JpdGVJbk5ld1BhbmUsXG4gICAgICAgICAgICAgICAgICAgIHBhcmFtZXRlcnM6IHBhcmFtZXRlcnMsXG4gICAgICAgICAgICAgICAgICAgIG1vZGU6IHBhcmFtZXRlcnMubGluZSAhPSB1bmRlZmluZWQgPyBcInNvdXJjZVwiIDogdW5kZWZpbmVkXG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBpZiAocGFyYW1ldGVycy5saW5lICE9IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgICAgIHRoaXMucGx1Z2luLnNldEN1cnNvckluTGluZShwYXJhbWV0ZXJzLmxpbmUpO1xuICAgICAgICAgICAgfVx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Dw9IHBvcy5saW5lICYmIGhlYWRpbmcucG9zaXRpb24uZW5kLmxpbmUgPj0gcG9zLmxpbmUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMudG9vbHMuY29weVVSSSh7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZmlsZXBhdGg6IHZpZXcuZmlsZS5wYXRoLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlYWRpbmc6IGhlYWRpbmcuaGVhZGluZ1xuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoY2FjaGUuYmxvY2tzKSB7XG4gICAgICAgICAgICAgICAgZm9yIChjb25zdCBibG9ja0lEIG9mIE9iamVjdC5rZXlzKGNhY2hlLmJsb2NrcykpIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgYmxvY2sgPSBjYWNoZS5ibG9ja3NbYmxvY2tJRF07XG4gICAgICAgICAgICAgICAgICAgIGlmIChibG9jay5wb3NpdGlvbi5zdGFydC5saW5lIDw9IHBvcy5saW5lICYmIGJsb2NrLnBvc2l0aW9uLmVuZC5saW5lID49IHBvcy5saW5lKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnRvb2xzLmNvcHlVUkkoe1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZpbGVwYXRoOiB2aWV3LmZpbGUucGF0aCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBibG9jazogYmxvY2tJRFxuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBpZiAod2l0aG91dERhdGEpIHtcbiAgICAgICAgICAgIGNvbnN0IGZpbGUyID0gZmlsZSA/PyBhcHAud29ya3NwYWNlLmdldEFjdGl2ZUZpbGUoKTtcbiAgICAgICAgICAgIGlmICghZmlsZTIpIHtcbiAgICAgICAgICAgICAgICBuZXcgTm90aWNlKFwiTm8gZmlsZSBvcGVuZWRcIik7XG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdGhpcy50b29scy5jb3B5VVJJKHtcbiAgICAgICAgICAgICAgICBmaWxlcGF0aDogZmlsZTIucGF0aCxcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgY29uc3QgZmlsZU1vZGFsID0gbmV3IEZpbGVNb2RhbCh0aGlzLnBsdWdpbiwgXCJDaG9vc2UgYSBmaWxlXCIsIGZhbHNlKTtcbiAgICAgICAgICAgIGZpbGVNb2RhbC5vcGVuKCk7XG4gICAgICAgICAgICBmaWxlTW9kYWwub25DaG9vc2VJdGVtID0gKGl0ZW0sIF8pID0+IHtcblxuICAgICAgICAgICAgICAgIG5ldyBFbnRlckRhdGFNb2RhbCh0aGlzLnBsdWdpbiwgaXRlbS5zb3VyY2UpLm9wZW4oKTtcblxuICAgICAgICAgICAgfTtcbiAgICAgICAgfVxuXG4gICAgfVxuXG4gICAgaGFuZGxlT3BlblNldHRpbmdzKHBhcmFtZXRlcnM6IFBhcmFtZXRlcnMpIHtcbiAgICAgICAgaWYgKGFwcC5zZXR0aW5nLmNvbnRhaW5lckVsLnBhcmVudEVsZW1lbnQgPT09IG51bGwpIHtcbiAgICAgICAgICAgIGFwcC5zZXR0aW5nLm9wZW4oKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAocGFyYW1ldGVycy5zZXR0aW5naWQgPT0gXCJwbHVnaW4tYnJvd3NlclwiKSB7XG4gICAgICAgICAgICBhcHAuc2V0dGluZy5vcGVuVGFiQnlJZChcImNvbW11bml0eS1wbHVnaW5zXCIpO1xuIC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KVxuICAgICAgICAgICAgLmFkZFRvZ2dsZShjYiA9PiBjYlxuICAgICAgICAgICAgICAgIC5zZXRWYWx1ZSh0aGlzLnBsdWdpbi5zZXR0aW5ncy5vcGVuRmlsZU9uV3JpdGVJbk5ld1BhbmUpXG4gICAgICAgICAgICAgICAgLm9uQ2hhbmdlKHZhbHVlID0+IHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5wbHVnaW4uc2V0dGluZ3Mub3BlbkZpbGVPbldyaXRlSW5OZXdQYW5lID0gdmFsdWU7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMucGx1Z2luLnNhdmVTZXR0aW5ncygpO1xuICAgICAgICAgICAgICAgIH0pKTtcblxuICAgICAgICBuZXcgU2V0dGluZyhjb250YWluZXJFbClcbiAgICAgICAgICAgIC5zZXROYW1lKFwiT3BlbiBkYWlseSBub3RlIGluIGEgbmV3IHBhbmVcIilcbiAgICAgICAgICAgIC5hZGRUb2dnbGUoY2IgPT4gY2JcbiAgICAgICAgICAgICAgICAuc2V0VmFsdWUodGhpcy5wbHVnaW4uc2V0dGluZ3Mub3BlbkRhaWx5SW5OZXdQYW5lKVxuICAgICAgICAgICAgICAgIC5vbkNoYW5nZSh2YWx1ZSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMucGx1Z2luLnNldHRpbmdzLm9wZW5EYWlseUluTmV3UGFuZSA9IHZhbHVlO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnBsdWdpbi5zYXZlU2V0dGluZ3MoKTtcbiAgICAgICAgICAgICAgICB9KSk7XG5cbiAgICAgICAgbmV3IFNldHRpbmcoY29udGFpbmVyRWwpXG4gICAgICAgICAgICAuc2V0TmFtZShcIk9wZW4gZmlsZSB3aXRob3V0IHdyaXRlIGluIG5ldyBwYW5lXCIpXG4gICAgICAgICAgICAuYWRkVG9nZ2xlKGNiID0+IGNiXG4gICAgICAgICAgICAgICAgLnNldFZhbHVlKHRoaXMucGx1Z2luLnNldHRpbmdzLm9wZW5GaWxlV2l0aG91dFdyaXRlSW5OZXdQYW5lKVxuICAgICAgICAgICAgICAgIC5vbkNoYW5nZSh2YWx1ZSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMucGx1Z2luLnNldHRpbmdzLm9wZW5GaWxlV2l0aG91dFdyaXRlSW5OZXdQYW5lID0gdmFsdWU7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMucGx1Z2luLnNhdmVTZXR0aW5ncygpO1xuICAgICAgICAgICAgICAgIH0pKTtcblxuICAgICAgICBuZXcgU2V0dGluZyhjb250YWluZXJFbClcbiAgICAgICAgICAgIC5zZXROYW1lKFwiVXNlIFVJRCBpbnN0ZWFkIG9mIGZpbGUgcGF0aHNcIilcbiAgICAgICAgICAgIC5hZGRUb2dnbGUoY2IgPT4gY2JcbiAgICAgICAgICAgICAgICAuc2V0VmFsdWUodGhpcy5wbHVnaW4uc2V0dGluZ3MudXNlVUlEKVxuICAgICAgICAgICAgICAgIC5vbkNoYW5nZSh2YWx1ZSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMucGx1Z2luLnNldHRpbmdzLnVzZVVJRCA9IHZhbHVlO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnBsdWdpbi5zYXZlU2V0dGluZ3MoKTtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5kaXNwbGF5KCk7XG4gICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICk7XG5cbiAgICAgICAgaWYgKHRoaXMucGx1Z2luLnNldHRpbmdzLnVzZVVJRCkge1xuICAgICAgICAgICAgbmV3IFNldHRpbmcoY29udGFpbmVyRWwpXG4gICAgICAgICAgICAgICAgLnNldE5hbWUoXCJBZGQgZmlsZXBhdGggcGFyYW1ldGVyXCIpXG4gICAgICAgICAgICAgICAgLnNldERlc2MoXCJXaGVuIHVzaW5nIFVJRCBpbnN0ZWFkIG9mIGZpbGUgcGF0aHMsIHlvdSBjYW4gc3RpbGwgYWRkIHRoZSBmaWxlcGF0aCBwYXJhbWV0ZXIgdG8ga25vdyB3aGF0IHRoaXMgVVJJIGlzIGFib3V0LiBJdCdzIE5PVCBhY3R1YWxseSB1c2VkLlwiKVxuICAgICAgICAgICAgICAgIC5hZGRUb2dnbGUoY2IgPT4gY2JcbiAgICAgICAgICAgICAgICAgICAgLnNldFZhbHVlKHRoaXMucGx1Z2luLnNldHRpbmdzLmFkZEZpbGVwYXRoV2hlblVzaW5nVUlEKVxuICAgICAgICAgICAgICAgICAgICAub25DaGFuZ2UodmFsdWUgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5wbHVnaW4uc2V0dGluZ3MuYWRkRmlsZXBhdGhXaGVuVXNpbmdVSUQgPSB2YWx1ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMucGx1Z2luLnNhdmVTZXR0aW5ncygpO1xuICAgICAgICAgICAgICAgICAgICB9KSk7XG4gICAgICAgIH1cbiAgICAgICAgbmV3IFNldHRpbmcoY29udGFpbmVyRWwpXG4gICAgICAgICAgICAuc2V0TmFtZShcIlVJRCBmaWVsZCBpbiBmcm9udG1hdHRlclwiKVxuICAgICAgICAgICAgLmFkZFRleHQoY2IgPT4gY2JcbiAgICAgICAgICAgICAgICAuc2V0VmFsdWUodGhpcy5wbHVnaW4uc2V0dGluZ3MuaWRGaWVsZClcbiAgICAgICAgICAgICAgICAub25DaGFuZ2UodmFsdWUgPT4ge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnBsdWdpbi5zZXR0aW5ncy5pZEZpZWxkID0gdmFsdWU7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMucGx1Z2luLnNhdmVTZXR0aW5ncygpO1xuICAgICAgICAgICAgICAgIH0pKTtcblxuICAgICAgICBuZXcgU2V0dGluZyhjb250YWluZXJFbClcbiAgICAgICAgICAgIC5zZXROYW1lKFwiQWxsb3cgZXhlY3V0aW5nIGFyYml0cmFyeSBjb2RlIHZpYSBldmFsXCIpXG4gICAgICAgICAgICAuc2V0RG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CBhbmQgcmVwbGFjZVwiKTtcbiAgICAgICAgICAgICAgICBmaWxlTW9kYWwub3BlbigpO1xuICAgICAgICAgICAgICAgIGZpbGVNb2RhbC5vbkNob29zZUl0ZW0gPSAoZmlsZVBhdGg6IEZpbGVNb2RhbERhdGEpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3Qgc2VhcmNoTW9kYWwgPSBuZXcgU2VhcmNoTW9kYWwodGhpcyk7XG4gICAgICAgICAgICAgICAgICAgIHNlYXJjaE1vZGFsLm9wZW4oKTtcbiAgICAgICAgICAgICAgICAgICAgc2VhcmNoTW9kYWwub25DaG9vc2VTdWdnZXN0aW9uID0gKGl0ZW06IFNlYXJjaE1vZGFsRGF0YSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgbmV3IFJlcGxhY2VNb2RhbCh0aGlzLCBpdGVtLCBmaWxlUGF0aD8uc291cmNlKS5vcGVuKCk7XG4gICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIH0sXG4gICAgICAgIH0pO1xuXG4gICAgICAgIHRoaXMuYWRkQ29tbWFuZCh7XG4gICAgICAgICAgICBpZDogXCJjb3B5LXVyaS1jb21tYW5kXCIsXG4gICAgICAgICAgICBuYW1lOiBcImNvcHkgVVJJIGZvciBjb21tYW5kXCIsXG4gICAgICAgICAgICBjYWxsYmFjazogKCkgPT4ge1xuICAgICAgICAgICAgICAgIGNvbnN0IGZpbGVNb2RhbCA9IG5ldyBGaWxlTW9kYWwodGhpcywgXCJTZWxlY3QgYSBmaWxlIHRvIGJlIG9wZW5lZCBiZWZvcmUgZXhlY3V0aW5nIHRoZSBjb21tYW5kXCIpO1xuICAgICAgICAgICAgICAgIGZpbGVNb2RhbC5vcGVuKCk7XG4gICAgICAgICAgICAgICAgZmlsZU1vZGFsLm9uQ2hvb3NlSXRlbSA9IChpdGVtOiBGaWxlTW9kYWxEYXRhKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIG5ldyBDb21tYW5kTW9kYWwodGhpcywgaXRlbT8uc291cmNlKS5vcGVuKCk7XG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG5cbiAgICAgICAgdGhpcy5hZGRDb21tYW5kKHtcbiAgICAgICAgICAgIGlkOiBcImNvcHktdXJpLWJsb2NrXCIsXG4gICAgICAgICAgICBuYW1lOiBcImNvcHkgVVJJIGZvciBjdXJyZW50IGJsb2NrXCIsXG4gICAgICAgICAgICBjaGVja0NhbGxiYWNrOiAoY2hlY2tpbmcpID0+IHtcbiAgICAgICAgICAgICAgICBjb25zdCB2aWV3ID0gdGhpcy5hcHAud29ya3NwYWNlLmdldEFjdGl2ZVZpZXdPZlR5cGUoTWFya2Rvd25WaWV3KTtcbiAgICAgICAgICAgICAgICBpZiAoY2hlY2tpbmcpIHJldHVybiB2aWV3ICE9IHVuZGVmaW5lZDtcbiAgICAgICAgICAgICAgICBjb25zdCBpZCA9IEJsb2NrVXRpbHMuZ2V0QmxvY2tJZCgpO1xuICAgICAgICAgICAgICAgIGlmIChpZCkge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnRvb2xzLmNvcHlVUkkoe1xuICAgICAgICAgICAgICAgICAgICAgICAgZmlsZXBhdGg6IHZpZXcuZmlsZS5wYXRoLFxuICAgICAgICAgICAgICAgICAgICAgICAgYmxvY2s6IGlkXG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG5cbiAgICAgICAgdGhpcy5yZWdpc3Rlck9ic2lkaWFuUHJvdG9jb2xIYW5kbGVyKFwiYWR2YW5jZWQtdXJpXCIsIGFzeW5jIChlKSA9PiB7XG4gICAgICAgICAgICBjb25zdCBwYXJhbWV0ZXJzID0gZSBhcyB1bmtub3duIGFzIFBhcmFtZXRlcnM7XG5cbiAgICAgICAgICAgIC8qKiBBbGxvd3Mgd3JpdGluZyB0byBuZXcgY3JlYXRlZCBkYWlseSBub3RlIHdpdGhvdXQgYW55IGBQYXJhbWV0ZXJzLm1vZGVgICovXG4gICAgICAgICAgICBsZXQgY3JlYXRlZERhaWx5Tm90ZSA9IGZhbHNlO1xuICAgICAgICAgICAgZm9yIChjb25zdCBwYXJhbWV0ZXIgaW4gcGFyYW1ldGVycykge1xuICAgICAgICAgICAgICAgIChwYXJhbWV0ZXJzIGFzIGFueSlbcGFyYW1ldGVyXSA9IGRlY29kZVVSSUNvbXBvbmVudCgocGFyYW1ldGVycyBhcyBhbnkpW3BhcmFtZXRlcl0pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdGhpcy5sYXN0UGFyYW1ldGVycyA9IHsgLi4ucGFyYW1ldGVycyB9O1xuICAgICAgICAgICAgaWYgKHBhcmFtZXRlcnMudWlkKSB7XG4gICAgICAgICAgICAgICAgY29uc3QgcmVzID0gdGhpcy5nZXRGaWxlRnJvbVVJRChwYXJhbWV0ZXJzLnVpZCk/LnBhdGg7XG4gICAgICAgICAgICAgICAgaWYgKHJlcyAhPSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgcGFyYW1ldGVycy5maWxlcGF0aCA9IHJlcztcbiAgICAgICAgICAgICAgICAgICAgcGFyYW1ldGVycy51aWQgPSB1bmRlZmluZWQ7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB9IGVsc2UgaWYgKHBhcmFtZXRlcnMuZmlsZW5hbWUpIHtcbiAgICAgICAgICAgICAgICBsZXQgZmlsZSA9IHRoaXMuYXBwLm1ldGFkYXRhQ2FjaGUuZ2V0Rmlyc3RMaW5rcGF0aERlc3QocGFyYW1ldGVycy5maWxlbmFtZSwgXCJcIik7XG4gICAgICAgICAgICAgICAgaWYgKCFmaWxlKSB7XG4gICAgICAgICAgICAgICAgICAgIGZpbGUgPSB0aGlzLmFwcC52YXVsdC5nZXRNYXJrZG93bkZpbGVzKCkuZmluZChmaWxlID0+IHBhcnNlRn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gIHBhcmFtZXRlcnMuZmlsZXBhdGggPSBwYXJhbWV0ZXJzLmZpbGVwYXRoICsgXCIubWRcIjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2UgaWYgKHBhcmFtZXRlcnMuZGFpbHkgPT09IFwidHJ1ZVwiKSB7XG4gICAgICAgICAgICAgICAgaWYgKCFhcHBIYXNEYWlseU5vdGVzUGx1Z2luTG9hZGVkKCkpIHtcbiAgICAgICAgICAgICAgICAgICAgbmV3IE5vdGljZShcIkRhaWx5IG5vdGVzIHBsdWdpbiBpcyBub3QgbG9hZGVkXCIpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGNvbnN0IG1vbWVudCA9IHdpbmRvdy5tb21lbnQoRGF0ZS5ub3coKSk7XG4gICAgICAgICAgICAgICAgY29uc3QgYWxsRGFpbHlOb3RlcyA9IGdldEFsbERhaWx5Tm90ZXMoKTtcbiAgICAgICAgICAgICAgICBsZXQgZGFpbHlOb3RlID0gZ2V0RGFpbHlOb3RlKG1vbWVudCwgYWxsRGFpbHlOb3Rlcyk7XG4gICAgICAgICAgICAgICAgaWYgKCFkYWlseU5vdGUpIHtcbiAgICAgICAgICAgICAgICAgICAgLy8vIFByZXZlbnQgZGFpbHkgbm90ZSBmcm9tIGJlaW5nIGNyZWF0ZWQgb24gZXhpc3RpbmcgY2hlY2tcbiAgICAgICAgICAgICAgICAgICAgaWYgKHBhcmFtZXRlcnMuZXhpc3RzID09PSBcInRydWVcIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgcGFyYW1ldGVycy5maWxlcGF0aCA9IGF3YWl0IGdldERhaWx5Tm90ZVBhdGgobW9tZW50KTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGRhaWx5Tm90ZSA9IGF3YWl0IGNyZWF0ZURhaWx5Tm90ZShtb21lbnQpO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBkZWxheSB0byBsZXQgT2JzaWRpYW4gaW5kZXggYW5kIGdlbmVyYXRlIENhY2hlZE1ldGFkYXRhXG4gICAgICAgICAgICAgICAgICAgICAgICBhd2FpdCBuZXcgUHJvbWlzZShyID0+IHNldFRpbWVvdXQociwgNTAwKSk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIGNyZWF0ZWREYWlseU5vdGUgPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChkYWlseU5vdGUgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgICAgICAgICBwYXJhbWV0ZXJzLmZpbGVwYXRoID0gZGFpbHlOb3RlLnBhdGg7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKHBhcmFtZXRlcnMuY2xpcGJvYXJkID09PSBcInRydWVcIikge1xuICAgICAgICAgICAgICAgIHBhcmFtZXRlcnMuZGF0YSA9IGF3YWl0IG5hdmlnYXRvci5jbGlwYm9hcmQucmVhZFRleHQoKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKHBhcmFtZXRlcnNbXCJlbmFibGUtcGx1Z2luXCJdIHx8IHBhcmFtZXRlcnNbXCJkaXNhYmxlLXBsdWdpblwiXSkge1xuICAgICAgICAgICAgICAgIHRoaXMuaGFuZGxlcnMuaGFuZGxlUGx1Z2luTWFuYWdlbWVudChwYXJhbWV0ZXJzKTtcblxuICAgICAgICAgICAgfSBlbHNlIGlmIChwYXJhbWV0ZXJzLmZyb250bWF0dGVya2V5KSB7XG4gICAgICAgICAgICAgICAgdGhpcy5oYW5kbGVycy5oYW5kbGVGcm9udG1hdHRlcktleShwYXJhbWV0ZXJzKTtcblxuICAgICAgICAgICAgfSBlbHNlIGlmIChwYXJhbWV0ZXJzLndvcmtzcGFjZSB8fCBwYXJhbWV0ZXJzLnNh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V0ZXJzO1xuICAgICAgICAgICAgICAgIGZvciAoY29uc3QgcGFyYW1ldGVyIGluIHBhcmFtZXRlcnMpIHtcbiAgICAgICAgICAgICAgICAgICAgKHBhcmFtZXRlcnMgYXMgYW55KVtwYXJhbWV0ZXJdID0gZGVjb2RlVVJJQ29tcG9uZW50KChwYXJhbWV0ZXJzIGFzIGFueSlbcGFyYW1ldGVyXSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGNvbnN0IGFjdGl2ZUxlYWYgPSB0aGlzLmFwcC53b3Jrc3BhY2UuYWN0aXZlTGVhZjtcbiAgICAgICAgICAgICAgICBjb25zdCBmaWxlID0gYWN0aXZlTGVhZi52aWV3LmZpbGU7XG4gICAgICAgICAgICAgICAgaWYgKGFjdGl2ZUxlYWYgJiYgZmlsZSkge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmhvb2tTdWNjZXNzKHBhcmFtZXRlcnMsIGZpbGUpO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG5cbiAgICAgICAgICAgICAgICAgICAgdGhpcy5mYWlsdXJlKHBhcmFtZXRlcnMsIHsgZXJyb3JNZXNzYWdlOiBcIk5vIGZpbGUgb3BlbmVkXCIgfSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgdGhpcy5yZWdpc3RlckV2ZW50KFxuICAgICAgICAgICAgdGhpcy5hcHAud29ya3NwYWNlLm9uKCdmaWxlLW1lbnUnLCAobWVudSwgZmlsZSwgc291cmNlKSA9PiB7XG4gICAgICAgICAgICAgICAgY29uc29sZS5sb2coc291cmNlKTtcblxuICAgICAgICAgICAgICAgIGlmICghKHNvdXJjZSA9PT0gXCJtb3JlLW9wdGlvbnNcIiB8fCBzb3VyY2UgPT09IFwidGFiLWhlYWRlclwiIHx8IHNvdXJjZSA9PSBcImZpbGUtZXhwbG9yZXItY29udGV4dC1tZW51XCIpKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpZiAoIShmaWxlIGluc3RhbmNlb2YgVEZpbGUpKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBtZW51LmFkZEl0ZW0oKGl0ZW0pID0+IHtcbiAgICAgICAgICAgICAgICAgICAgaXRlbVxuICAgICAgICAgICAgICAgICAgICAgICAgLnNldFRpdGxlKGBDb3B5IEFkdmFuY2VkIFVSSWApXG4gICAgICAgICAgICAgICAgICAgICAgICAuc2V0SWNvbignbGluaycpXG4gICAgICAgICAgICAgICAgICAgICAgICAuc2V0U2VjdGlvbihcImluZm9cIilcbiAgICAgICAgICAgICAgICAgICAgICAgIC5vbkNsaWNrKChfKSA9PiB0aGlzLmhhbmRsZXJzLmhhbmRsZUNvcHlGaWxlVVJJKHRydWUsIGZpbGUpKTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0pKTtcbiAgICB9XG5cbiAgICBhc3luYyBob29rU3VjY2VzcyhwYXJhbWV0ZXJzOiBQYXJhbWV0ZXJzLCBmaWxlOiBURmlsZSk6IFByb21pc2U8dm9pZD4ge1xuICAgICAgICBpZiAoIXBhcmFtZXRlcnNbXCJ4LXN1Y2Nlc3NcIl0pIHJldHVybjtcblxuICAgICAgICBjb25zdCBvcHRpb25zID0ge1xuICAgICAgICAgICAgdGl0bGU6IHN0cmlwTUQoZmlsZS5uYW1lKSxcbiAgICAgICAgICAgIGFkdmFuY2VkdXJpOiBhd2FpdCB0aGlzLnRvb2xzLmdlbmVyYXRlVVJJKHsgZmlsZXBhdGg6IGZpbGUucGF0aCB9LCBmYWxzZSksXG4gICAgICAgICAgICB1cmxrZXk6IFwiYWR2YW5jZWR1cmlcIixcbiAgICAgICAgICAgIGZpbGV1cmk6IGdldEZpbGVVcmkoZmlsZSksXG4gICAgICAgIH07XG4gICAgICAgIHRoaXMuc3Vj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W5lO1xuICAgICAgICAgICAgICAgIGlmIChsaW5lID09PSB1bmRlZmluZWQpIHJldHVybjtcblxuICAgICAgICAgICAgICAgIGNvbnN0IGRhdGEgPSBhd2FpdCB0aGlzLmFwcC52YXVsdC5yZWFkKGZpbGUpO1xuICAgICAgICAgICAgICAgIGNvbnN0IGxpbmVzID0gZGF0YS5zcGxpdChcIlxcblwiKTtcblxuICAgICAgICAgICAgICAgIGxpbmVzLnNwbGljZShsaW5lLCAwLCAuLi5wYXJhbWV0ZXJzLmRhdGEuc3BsaXQoXCJcXG5cIikpO1xuICAgICAgICAgICAgICAgIGRhdGFUb1dyaXRlID0gbGluZXMuam9pbihcIlxcblwiKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgaWYgKGZpbGUgaW5zdGFuY2VvZiBURmlsZSkge1xuICAgICAgICAgICAgICAgIGNvbnN0IGZpbGVEYXRhID0gYXdhaXQgdGhpcy5hcHAudmF1bHQucmVhZChmaWxlKTtcbiAgICAgICAgICAgICAgICBjb25zdCBjYWNoZSA9IHRoaXMuYXBwLm1ldGFkYXRhQ2FjaGUuZ2V0RmlsZUNhY2hlKGZpbGUpO1xuXG4gICAgICAgICAgICAgICAgaWYgKGNhY2hlLmZyb250bWF0dGVyKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IGxpbmUgPSBjYWNoZS5mcm9udG1hdHRlci5wb3NpdGlvbi5lbmQubGluZTtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgZmlyc3QgPSBmaWxlRGF0YS5zcGxpdChcIlxcblwiKS5zbGljZSgwLCBsaW5lICsgMSkuam9pbihcIlxcblwiKTtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgbGFzdCA9IGZpbGVEYXRhLnNwbGl0KFwiXFxuXCIpLnNsaWNlKGxpbmUgKyAxKS5qb2luKFwiXFxuXCIpO1xuICAgICAgICAgICAgICAgICAgICBkYXRhVG9Xcml0ZSA9IGZpcnN0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cbiAgICBpZiAoIW0pIHJldHVybiBvO1xyXG4gICAgdmFyIGkgPSBtLmNhbGwobyksIHIsIGFyID0gW10sIGU7XHJcbiAgICB0cnkge1xyXG4gICAgICAgIHdoaWxlICgobiA9PT0gdm9pZCAwIHx8IG4tLSA+IDApICYmICEociA9IGkubmV4dCgpKS5kb25lKSBhci5wdXNoKHIudmFsdWUpO1xyXG4gICAgfVxyXG4gICAgY2F0Y2ggKGVycm9yKSB7IGUgPSB7IGVycm9yOiBlcnJvciB9OyB9XHJcbiAgICBmaW5hbGx5IHtcclxuICAgICAgICB0cnkge1xyXG4gICAgICAgICAgICBpZiAociAmJiAhci5kb25lICYmIChtID0gaVtcInJldHVyblwiXSkpIG0uY2FsbChpKTtcclxuICAgICAgICB9XHJcbiAgICAgICAgZmluYWxseSB7IGlmIChlKSB0aHJvdyBlLmVycm9yOyB9XHJcbiAgICB9XHJcbiAgICByZXR1cm4gYXI7XHJcbn1cclxuXHJcbi8qKiBAZGVwcmVjYXRlZCAqL1xyXG5leHBvcnQgZnVuY3Rpb24gX19zcHJlYWQoKSB7XHJcbiAgICBmb3IgKHZhciBhciA9IFtdLCBpID0gMDsgaSA8IGFyZ3VtZW50cy5sZW5ndGg7IGkrKylcclxuICAgICAgICBhciA9IGFyLmNvbmNhdChfX3JlYWQoYXJndW1lbnRzW2ldKSk7XHJcbiAgICByZXR1cm4gYXI7XHJcbn1cclxuXHJcbi8qKiBAZGVwcmVjYXRlZCAqL1xyXG5leHBvcnQgZnVuY3Rpb24gX19zcHJlYWRBcnJheXMoKSB7XHJcbiAgICBmb3IgKHZhciBzID0gMCwgaSA9IDAsIGlsID0gYXJndW1lbnRzLmxlbmd0aDsgaSA8IGlsOyBpKyspIHMgKz0gYXJndW1lbnRzW2ldLmxlbmd0aDtcclxuICAgIGZvciAodmFyIHIgPSBBcnJheShzKSwgayA9IDAsIGkgPSAwOyBpIDwgaWw7IGkrKylcclxuICAgICAgICBmb3IgKHZhciBhID0gYXJndW1lbnR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KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiohKlxcXG4gICEqKiogLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvYW4tb2JqZWN0LmpzICoqKiFcbiAgXFwqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi9cbi8qISBubyBzdGF0aWMgZXhwb3J0cyBmb3VuZCAqL1xuLyoqKi8gKGZ1bmN0aW9uKG1vZHVsZSwgZXhwb3J0cywgX193ZWJwYWNrX3JlcXVpcmVfXykge1xuXG52YXIgaXNPYmplY3QgPSBfX3dlYnBhY2tfcmVxdWlyZV9fKC8qISAuLi9pbnRlcm5hbHMvaXMtb2JqZWN0ICovIFwiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvaXMtb2JqZWN0LmpzXCIpO1xuXG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChpdCkge1xuICBpZiAoIWlzT2JqZWN0KGl0KSkge1xuICAgIHRocm93IFR5cGVFcnJvcihTdHJpbmcoaXQpICsgJyBpcyBub3QgYW4gb2JqZWN0Jyk7XG4gIH0gcmV0dXJuIGl0O1xufTtcblxuXG4vKioqLyB9KSxcblxuLyoqKi8gXCIuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9hcnJheS1mcm9tLmpzXCI6XG4vKiEqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiohKlxcXG4gICEqKiogLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvYXJyYXktZnJvbS5qcyAqKiohXG4gIFxcKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqL1xuLyohIG5vIHN0YXRpYyBleHBvcnRzIGZvdW5kICovXG4vKioqLyAoZnVuY3Rpb24obW9kdWxlLCBleHBvcnRzLCBfX3dlYnBhY2tfcmVxdW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XG4gICAgICByZXR1cm4ge1xuICAgICAgICBuZXh0OiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgcmV0dXJuIHsgZG9uZTogSVRFUkFUSU9OX1NVUFBPUlQgPSB0cnVlIH07XG4gICAgICAgIH1cbiAgICAgIH07XG4gICAgfTtcbiAgICBleGVjKG9iamVjdCk7XG4gIH0gY2F0Y2ggKGVycm9yKSB7IC8qIGVtcHR5ICovIH1cbiAgcmV0dXJuIElURVJBVElPTl9TVVBQT1JUO1xufTtcblxuXG4vKioqLyB9KSxcblxuLyoqKi8gXCIuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9jbGFzc29mLXJhdy5qc1wiOlxuLyohKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiEqXFxcbiAgISoqKiAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9jbGFzc29mLXJhdy5qcyAqKiohXG4gIFxcKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi9cbi8qISBubyBzdGF0aWMgZXhwb3J0cyBmb3VuZCAqL1xuLyoqKi8gKGZ1bmN0aW9uKG1vZHVsZSwgZXhwb3J0cykge1xuXG52YXIgdG9TdHJpbmcgPSB7fS50b1N0cmluZztcblxubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoaXQpIHtcbiAgcmV0dXJuIHRvU3RyaW5nLmNhbGwoaXQpLnNsaWNlKDgsIC0xKTtcbn07XG5cblxuLyoqKi8gfSksXG5cbi8qKiovIFwiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvY2xhc3NvZi5qc1wiOlxuLyohKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqISpcXFxuICAhKioqIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvaW50ZXJuYWxzL2NsYXNzb2YuanMgKioqIVxuICBc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b3BlcnR5KHRhcmdldCwga2V5LCBnZXRPd25Qcm9wZXJ0eURlc2NyaXB0b3Ioc291cmNlLCBrZXkpKTtcbiAgfVxufTtcblxuXG4vKioqLyB9KSxcblxuLyoqKi8gXCIuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9jb3JyZWN0LXByb3RvdHlwZS1nZXR0ZXIuanNcIjpcbi8qISoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqISpcXFxuICAhKioqIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvaW50ZXJuYWxzL2NvcnJlY3QtcHJvdG90eXBlLWdldHRlci5qcyAqKiohXG4gIFxcKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovXG4vKiEgbm8gc3RhdGljIGV4cG9ydHMgZm91bmQgKi9cbi8qKiovIChmdW5jdGlvbihtb2R1bGUsIGV4cG9ydHMsIF9fd2VicGFja19yZXF1aXJlX18pIHtcblxudmFyIGZhaWxzID0gX193ZWJwYWNrX3JlcXVpcmVfXygvKiEgLi4vaW50ZXJuYWxzL2ZhaWxzICovIFwiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvZmFpbHMuanNcIik7XG5cbm1vZHVsZS5leHBvcnRzID0gIWZhaWxzKGZ1bmN0aW9uICgpIHtcbiAgZnVuY3Rpb24gRigpIHsgLyogZW1wdHkgKi8gfVxuICBGLnByb3RvdHlwZS5jb25zdHJ1Y3RvciA9IG51bGw7XG4gIHJldHVybiBPYmplY3QuZ2V0UHJvdG90eXBlT2YobmV3IEYoKSkgIT09IEYucHJvdG90eXBlO1xufSk7XG5cblxuLyoqKi8gfSksXG5cbi8qKiovIFwiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvY3JlYXRlLWl0ZXJhdG9yLWNvbnN0cnVjdG9yLmpzXCI6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vY29yZS1qcy9pbnRlcm5hbHMvY3JlYXRlLXByb3BlcnR5LWRlc2NyaXB0b3IuanMgKioqIVxuICBcXCoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovXG4vKiEgbm8gc3RhdGljIGV4cG9ydHMgZm91bmQgKi9cbi8qKiovIChmdW5jdGlvbihtb2R1bGUsIGV4cG9ydHMpIHtcblxubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoYml0bWFwLCB2YWx1ZSkge1xuICByZXR1cm4ge1xuICAgIGVudW1lcmFibGU6ICEoYml0bWFwICYgMSksXG4gICAgY29uZmlndXJhYmxlOiAhKGJpdG1hcCAmIDIpLFxuICAgIHdyaXRhYmxlOiAhKGJpdG1hcCAmIDQpLFxuICAgIHZhbHVlOiB2YWx1ZVxuICB9O1xufTtcblxuXG4vKioqLyB9KSxcblxuLyoqKi8gXCIuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9jcmVhdGUtcHJvcGVydHkuanNcIjpcbi8qISoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqISpcXFxuICAhKioqIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvaW50ZXJuYWxzL2NyZWF0ZS1wcm9wZXJ0eS5qcyAqKiohXG4gIFxcKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovXG4vKiEgbm8gc3RhdGljIGV4cG9ydHMgZm91bmQgKi9cbi8qKiovIChmdW5jdGlvbihtb2R1bGUsIGV4cG9ydHMsIF9fd2VicGFja19yZXF1aXJlX18pIHtcblxuXCJ1c2Ugc3RyaWN0XCI7XG5cbnZhciB0b1ByaW1pdGl2ZSA9IF9fd2VicGFja19yZXF1aXJlX18oLyohIC4uL2ludGVybmFscy90by1wcmltaXRpdmUgKi8gXCIuL25vZGVfbW9kdWxlc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I6XG4vKiEqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiohKlxcXG4gICEqKiogLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvZW51bS1idWcta2V5cy5qcyAqKiohXG4gIFxcKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqL1xuLyohIG5vIHN0YXRpYyBleHBvcnRzIGZvdW5kICovXG4vKioqLyAoZnVuY3Rpb24obW9kdWxlLCBleHBvcnRzKSB7XG5cbi8vIElFOC0gZG9uJ3QgZW51bSBidWcga2V5c1xubW9kdWxlLmV4cG9ydHMgPSBbXG4gICdjb25zdHJ1Y3RvcicsXG4gICdoYXNPd25Qcm9wZXJ0eScsXG4gICdpc1Byb3RvdHlwZU9mJyxcbiAgJ3Byb3BlcnR5SXNFbnVtZXJhYmxlJyxcbiAgJ3RvTG9jYWxlU3RyaW5nJyxcbiAgJ3RvU3RyaW5nJyxcbiAgJ3ZhbHVlT2YnXG5dO1xuXG5cbi8qKiovIH0pLFxuXG4vKioqLyBcIi4vbm9kZV9tb2R1bGVzL2NvcmUtanMvaW50ZXJuYWxzL2V4cG9ydC5qc1wiOlxuLyohKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiohKlxcXG4gICEqKiogLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvZXhwb3J0LmpzICoqKiFcbiAgXFwqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi9cbi8qISBubyBzdGF0aWMgZXhwb3J0cyBmb3VuZCAqL1xuLyoqKi8gKGZ1bmN0aW9uKG1vZHVsZSwgZXhwb3J0cywgX193ZWJwYWNrX3JlcXVpcmVfXykge1xuXG52YXIgZ2xvYmFsID0gX193ZWJwYWNrX3JlcXVpcmVfXygvKiEgLi4vaW50ZXJuYWxzL2dsb2JhbCA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IGZ1bmN0aW9uIChleGVjKSB7XG4gIHRyeSB7XG4gICAgcmV0dXJuICEhZXhlYygpO1xuICB9IGNhdGNoIChlcnJvcikge1xuICAgIHJldHVybiB0cnVlO1xuICB9XG59O1xuXG5cbi8qKiovIH0pLFxuXG4vKioqLyBcIi4vbm9kZV9tb2R1bGVzL2NvcmUtanMvaW50ZXJuYWxzL2Z1bmN0aW9uLXRvLXN0cmluZy5qc1wiOlxuLyohKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiohKlxcXG4gICEqKiogLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvZnVuY3Rpb24tdG8tc3RyaW5nLmpzICoqKiFcbiAgXFwqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi9cbi8qISBubyBzdGF0aWMgZXhwb3J0cyBmb3VuZCAqL1xuLyoqKi8gKGZ1bmN0aW9uKG1vZHVsZSwgZXhwb3J0cywgX193ZWJwYWNrX3JlcXVpcmVfXykge1xuXG52YXIgc2hhcmVkID0gX193ZWJwYWNrX3JlcXVpcmVfXygvKiEgLi4vaW50ZXJuYWxzL3NoYXJlZCAqLyBcIi4vbm9kZV9tb2R1bGVzL2NvcmUtanMvaW50ZXJuYWxzL3NoYXJlZC5qc1wiKTtcblxubW9kdWxlLmV4cG9ydHMgPSBzaGFyZWQoJ25hdGl2ZS1mdW5jdGlvbi10by1zdHJpbmcnLCBGdW5jdGlvbi50b1N0cmluZyk7XG5cblxuLyoqKi8gfSksXG5cbi8qKiovIFwiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvZ2V0LWl0ZXJhdG9yLW1ldGhvZC5qc1wiOlxuLyohKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqISpcXFxuICAhKioqIC4vbm9kZV9tb2R1bGVzL2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WNrX3JlcXVpcmVfXygvKiEgLi8uLi8uLi93ZWJwYWNrL2J1aWxkaW4vZ2xvYmFsLmpzICovIFwiLi9ub2RlX21vZHVsZXMvd2VicGFjay9idWlsZGluL2dsb2JhbC5qc1wiKSkpXG5cbi8qKiovIH0pLFxuXG4vKioqLyBcIi4vbm9kZV9tb2R1bGVzL2NvcmUtanMvaW50ZXJuYWxzL2hhcy5qc1wiOlxuLyohKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiohKlxcXG4gICEqKiogLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvaGFzLmpzICoqKiFcbiAgXFwqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi9cbi8qISBubyBzdGF0aWMgZXhwb3J0cyBmb3VuZCAqL1xuLyoqKi8gKGZ1bmN0aW9uKG1vZHVsZSwgZXhwb3J0cykge1xuXG52YXIgaGFzT3duUHJvcGVydHkgPSB7fS5oYXNPd25Qcm9wZXJ0eTtcblxubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoaXQsIGtleSkge1xuICByZXR1cm4gaGFzT3duUHJvcGVydHkuY2FsbChpdCwga2V5KTtcbn07XG5cblxuLyoqKi8gfSksXG5cbi8qKiovIFwiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvaGlkZGVuLWtleXMuanNcIjpcbi8qISoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiohKlxcXG4gICEqKiogLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvaGlkZGVuLWtleXMuanMgKioqIVxuICBcXCoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovXG4vKiEgbm8gc3RhdGljIGV4cG9ydHMgZm91bmQgKi9cbi8qKiovIChmdW5jdGlvbihtb2R1bGUsIGV4cG9ydHMpI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WxzZVxuICAgIDogdHlwZW9mIGRldGVjdGlvbiA9PSAnZnVuY3Rpb24nID8gZmFpbHMoZGV0ZWN0aW9uKVxuICAgIDogISFkZXRlY3Rpb247XG59O1xuXG52YXIgbm9ybWFsaXplID0gaXNGb3JjZWQubm9ybWFsaXplID0gZnVuY3Rpb24gKHN0cmluZykge1xuICByZXR1cm4gU3RyaW5nKHN0cmluZykucmVwbGFjZShyZXBsYWNlbWVudCwgJy4nKS50b0xvd2VyQ2FzZSgpO1xufTtcblxudmFyIGRhdGEgPSBpc0ZvcmNlZC5kYXRhID0ge307XG52YXIgTkFUSVZFID0gaXNGb3JjZWQuTkFUSVZFID0gJ04nO1xudmFyIFBPTFlGSUxMID0gaXNGb3JjZWQuUE9MWUZJTEwgPSAnUCc7XG5cbm1vZHVsZS5leHBvcnRzID0gaXNGb3JjZWQ7XG5cblxuLyoqKi8gfSksXG5cbi8qKiovIFwiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvaXMtb2JqZWN0LmpzXCI6XG4vKiEqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiEqXFxcbiAgISoqKiAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9pcy1vYmplY3QuanMgKioqIVxuICBcXCoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqL1xuLyohIG5vIHN0YXRpYyBleHBvcnRzIGZvdW5kICovXG4vKioqLyAoZnVuY3Rpb24obW9kdWxlLCBleHBvcnRzKSB7XG5cbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKGl0KSB7XG4gIHJldHVybiB0eXBlb2YgaXQgPT09ICdvYmplY3QnID8gaXQgIT09IG51bGwgOiB0eXBlb2YgaXQgPT09ICdmdW5jdGlvbic7XG59O1xuXG5cbi8qKiovIH0pLFxuXG4vKioqLyBcIi4vbm9kZV9tb2R1bGVzL2NvcmUtanMvaW50ZXJuYWxzL2lzLXB1cmUuanNcIjpcbi8qISoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiEqXFxcbiAgISoqKiAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9pcy1wdXJlLmpzICoqKiFcbiAgXFwqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovXG4vKiEgbm8gc3RhdGljIGV4cG9ydHMgZm91bmQgKi9cbi8qKiovIChmdW5jdGlvbihtb2R1bGUsIGV4cG9ydHMpIHtcblxubW9kdWxlLmV4cG9ydHMgPSBmYWxzZTtcblxuXG4vKioqLyB9KSxcblxuLyoqKi8gXCIuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9pdGVyYXRvcnMtY29yZS5qc1wiOlxuLyohKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiEqXFxcbiAgISoqKiAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9pdGVyYXRvcnMtY29yZS5qcyAqKiohXG4gIFxcKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi9cbi8qISBubyBzdGF0aWMgZXhwb3J0cyBmb3VuZCAqL1xuLyoqKi8gKGZ1bmN0aW9uKG1vZHVsZSwgZXhwb3J0cywgX193ZWJwYWNrX3JlcXVpcmVfXykge1xuXG5cInVzZSBzdHJpY3RcIjtcblxudmFyIGdldFByb3RvdHlwZU9mID0gX193ZWJwYWNrX3JlcXVpcmVfXygvKiEgLi4vaW50ZXJuYWxzL29iamVjdC1nZXQtcHJvdG90eXBlLW9mICovIFwiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvb2JqZWN0LWdldC1wcm90b3R5cGUtb2YuanNcIik7XG52YXIgaGlkZSA9IF9fd2VicGFja19yZXF1aXJlX18oLyohIC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GVybmFscy9vYmplY3QtY3JlYXRlLmpzXCI6XG4vKiEqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiohKlxcXG4gICEqKiogLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvb2JqZWN0LWNyZWF0ZS5qcyAqKiohXG4gIFxcKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqL1xuLyohIG5vIHN0YXRpYyBleHBvcnRzIGZvdW5kICovXG4vKioqLyAoZnVuY3Rpb24obW9kdWxlLCBleHBvcnRzLCBfX3dlYnBhY2tfcmVxdWlyZV9fKSB7XG5cbnZhciBhbk9iamVjdCA9IF9fd2VicGFja19yZXF1aXJlX18oLyohIC4uL2ludGVybmFscy9hbi1vYmplY3QgKi8gXCIuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9hbi1vYmplY3QuanNcIik7XG52YXIgZGVmaW5lUHJvcGVydGllcyA9IF9fd2VicGFja19yZXF1aXJlX18oLyohIC4uL2ludGVybmFscy9vYmplY3QtZGVmaW5lLXByb3BlcnRpZXMgKi8gXCIuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9vYmplY3QtZGVmaW5lLXByb3BlcnRpZXMuanNcIik7XG52YXIgZW51bUJ1Z0tleXMgPSBfX3dlYnBhY2tfcmVxdWlyZV9fKC8qISAuLi9pbnRlcm5hbHMvZW51bS1idWcta2V5cyAqLyBcIi4vbm9kZV9tb2R1bGVzL2NvcmUtanMvaW50ZXJuYWxzL2VudW0tYnVnLWtleXMuanNcIik7XG52YXIgaGlkZGVuS2V5cyA9IF9fd2VicGFja19yZXF1aXJlX18oLyohIC4uL2ludGVybmFscy9oaWRkZW4ta2V5cyAqLyBcIi4vbm9kZV9tb2R1bGVzL2NvcmUtanMvaW50ZXJuYWxzL2hpZGRlbi1rZXlzLmpzXCIpO1xudmFyIGh0bWwgPSBfX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87XG4gIH0gZWxzZSByZXN1bHQgPSBjcmVhdGVEaWN0KCk7XG4gIHJldHVybiBQcm9wZXJ0aWVzID09PSB1bmRlZmluZWQgPyByZXN1bHQgOiBkZWZpbmVQcm9wZXJ0aWVzKHJlc3VsdCwgUHJvcGVydGllcyk7XG59O1xuXG5oaWRkZW5LZXlzW0lFX1BST1RPXSA9IHRydWU7XG5cblxuLyoqKi8gfSksXG5cbi8qKiovIFwiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvb2JqZWN0LWRlZmluZS1wcm9wZXJ0aWVzLmpzXCI6XG4vKiEqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiEqXFxcbiAgISoqKiAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9vYmplY3QtZGVmaW5lLXByb3BlcnRpZXMuanMgKioqIVxuICBcXCoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqL1xuLyohIG5vIHN0YXRpYyBleHBvcnRzIGZvdW5kICovXG4vKioqLyAoZnVuY3Rpb24obW9kdWxlLCBleHBvcnRzLCBfX3dlYnBhY2tfcmVxdWlyZV9fKSB7XG5cbnZhciBERVNDUklQVE9SUyA9IF9fd2VicGFja19yZXF1aXJlX18oLyohIC4uL2ludGVybmFscy9kZXNjcmlwdG9ycyAqLyBcIi4vbm9kZV9tb2R1bGVzL2NvcmUtanMvaW50ZXJuYWxzL2Rlc2NyaXB0b3JzLmpzXCIpO1xudmFyIGRlZmluZVByb3BlcnR5TW9kdWxlID0gX193ZWJwYWNrX3JlcXVpcmVfXygvKiEgLi4vaW50ZXJuYWxzL29iamVjdC1kZWZpbmUtcHJvcGVydHkgKi8gXCIuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9vYmplY3QtZGVmaW5lLXByb3BlcnR5LmpzXCIpO1xudmFyIGFuT2JqZWN0ID0gX193ZWJwYWNrX3JlcXVpcmVfXygvKiEgLi4vaW50ZXJuYWxzL2FuLW9iamVjdCAqLyBcIi4vbm9kZV9tb2R1bGVzL2NvcmUtanMvaW50ZXJuYWxzL2FuLW9iamVjdC5qc1wiKTtcbnZhciBvYmplY3RLZXlzID0gX193ZWJwYWNrX3JlcXVpcmVfXygvKiEgLi4vaW50ZXJuYWxzL29iamVjdC1rZXlzICovIFwiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvb2JqZWN0LWtleXMuanNcIik7XG5cbm1vZHVsZS5leHBvcnRzID0gREVTQ1JJUFRPUlMgPyBPYmplY3QuZGVmaW5lUHJvcGVydGllcyA6IGZ1bmN0aW9uIGRlZmluZVByb3BlcnRpZXMoTywgUHJvcGVydGllcykge1xuICBhbk9iamVjdChPKTtcbiAgdmFyIGtleXMgPSBvYmplY3RLZXlzKFByb3BlcnRpZXMpO1xuICB2YXIgbGVuZ3RoID0ga2V5cy5sZW5ndGg7XG4gIHZhciBpID0gMDtcbiAgdmFyIGtleTtcbiAgd2hpbGUgKGxlbmd0aCA+IGkpIGRlZmluZVByb3BlcnR5TW9kdWxlLmYoTywga2V5ID0ga2V5c1tpKytdLCBQcm9wZXJ0aWVzW2tleV0pO1xuICByZXR1cm4gTztcbn07XG5cblxuLyoqKi8gfSksXG5cbi8qKiovIFwiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvb2JqZWN0LWRlZmluZS1wcm9wZXJ0eS5qc1wiOlxuLyohKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqISpcXFxuICAhKioqIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvaW50ZXJuYWxzL29iamVjdC1kZWZpbmUtcHJvcGVydHkuanMgKioqIVxuICBcXCoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKio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bi1wcm9wZXJ0eS1zeW1ib2xzLmpzICoqKiFcbiAgXFwqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovXG4vKiEgbm8gc3RhdGljIGV4cG9ydHMgZm91bmQgKi9cbi8qKiovIChmdW5jdGlvbihtb2R1bGUsIGV4cG9ydHMpIHtcblxuZXhwb3J0cy5mID0gT2JqZWN0LmdldE93blByb3BlcnR5U3ltYm9scztcblxuXG4vKioqLyB9KSxcblxuLyoqKi8gXCIuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9vYmplY3QtZ2V0LXByb3RvdHlwZS1vZi5qc1wiOlxuLyohKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiEqXFxcbiAgISoqKiAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9vYmplY3QtZ2V0LXByb3RvdHlwZS1vZi5qcyAqKiohXG4gIFxcKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi9cbi8qISBubyBzdGF0aWMgZXhwb3J0cyBmb3VuZCAqL1xuLyoqKi8gKGZ1bmN0aW9uKG1vZHVsZSwgZXhwb3J0cywgX193ZWJwYWNrX3JlcXVpcmVfXykge1xuXG52YXIgaGFzID0gX193ZWJwYWNrX3JlcXVpcmVfXygvKiEgLi4vaW50ZXJuYWxzL2hhcyAqLyBcIi4vbm9kZV9tb2R1bGVzL2NvcmUtanMvaW50ZXJuYWxzL2hhcy5qc1wiKTtcbnZhciB0b09iamVjdCA9IF9fd2VicGFja19yZXF1aXJlX18oLyohIC4uL2ludGVybmFscy90by1vYmplY3QgKi8gXCIuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy90by1vYmplY3QuanNcIik7XG52YXIgc2hhcmVkS2V5ID0gX193ZWJwY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ioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiohKlxcXG4gICEqKiogLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvb2JqZWN0LWtleXMtaW50ZXJuYWwuanMgKioqIVxuICBcXCoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovXG4vKiEgbm8gc3RhdGljIGV4cG9ydHMgZm91bmQgKi9cbi8qKiovIChmdW5jdGlvbihtb2R1bGUsIGV4cG9ydHMsIF9fd2VicGFja19yZXF1aXJlX18pIHtcblxudmFyIGhhcyA9IF9fd2VicGFja19yZXF1aXJlX18oLyohIC4uL2ludGVybmFscy9oYXMgKi8gXCIuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9oYXMuanNcIik7XG52YXIgdG9JbmRleGVkT2JqZWN0ID0gX193ZWJwYWNrX3JlcXVpcmVfXygvKiEgLi4vaW50ZXJuYWxzL3RvLWluZGV4ZWQtb2JqZWN0ICovIFwiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvdG8taW5kZXhlZC1vYmplY3QuanNcIik7XG52YXIgYXJyYXlJbmNsdWRlcyA9IF9fd2VicGFja19yZXF1aXJlX18oLyohIC4uL2ludGVybmFscy9hcnJheS1pbmNsdWRlcyAqLyBcIi4vbm9kZV9tb2R1bGVzL2NvcmUtanMvaW50ZXJuYWxzL2FycmF5LWluY2x1ZGVzLmpzXCIpO1xudmFyIGhpZGRlbktleXMgPSBfX3dlYnBhY2tfcmVxdWlyZV9fKC8qISAuLi9pbnRlcm5hbHMvaGlkZGVuLWtleXMgKi8gXCIuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9oaWRkZW4ta2V5cy5qc1wiKTtcblxudmFyIGFycmF5SW5kZXhPZiA9IGFycmF5SW5jbHVkZXMoZmFsc2UpO1xuXG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChvYmplY3QsIG5hbWVzKSB7XG4gIHZhciBPID0gdG9JbmRleGVkT2JqZWN0KG9iamVjdCk7XG4gIHZhciBpID0gMDtcbiAgdmFyIHJlc3VsdCA9IFtdO1xuICB2YXIga2V5O1xuICBmb3IgKGtleSBpbiBPKSAhaGFzKGhpZGRlbktleXMsIGtleSkgJiYgaGFzKE8sIGtleSkgJiYgcmVzdWx0LnB1c2goa2V5KTtcbiAgLy8gRG9uJ3QgZW51bSBidWcgJiBoaWRkZW4ga2V5c1xuICB3aGlsZSAobmFtZXMubGVuZ3RoID4gaSkgaWYgKGhhcyhPLCBrZXkgPSBuYW1lc1tpKytdKSkge1xuICAgIH5hcnJheUluZGV4T2YocmVzdWx0LCBrZXkpIHx8IHJlc3VsdC5wdXNoKGtleSk7XG4gIH1cbiAgcmV0dXJuIHJlc3VsdDtcbn07XG5cblxuLyoqKi8gfSksXG5cbi8qKiovIFwiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvb2JqZWN0LWtleXMuanNcIjpcbi8qISoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiohKlxcXG4gICEqKiogLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvb2JqZWN0LWtleXMuanMgKioqIVxuICBcXCoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovXG4vKiEgbm8gc3RhdGljIGV4cG9ydHMgZm91bmQgKi9cbi8qKiovIChmdW5jdGlvbihtb2R1bGUsIGV4cG9ydHMsIF9fd2VicGFja19yZXF1aXJlX18pIHtcblxudmFyIGludGVybmFsT2JqZWN0S2V5cyA9IF9fd2VicGFja19yZXF1aXJlX18oLyohIC4uL2ludGVybmFscy9vYmplY3Qta2V5cy1pbnRlcm5hbCAqLyBcIi4vbm9kZV9tb2R1bGVzL2NvcmUtanMvaW50ZXJuYWxzL29iamVjdC1rZXlzLWludGVybmFsLmpzXCIpO1xudmFyIGVudW1CdWdLZXlzID0gX193ZWJwYWNrX3JlcXVpcmVfXygvKiEgLi4vaW50ZXJuYWxzL2VudW0tYnVnLWtleXMgKi8gXCIuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9lbnVtLWJ1Zy1rZXlzLmpzXCIpO1xuXG4vLyAxOS4xLjIuMTQgLyAxNS4yLjMuMTQgT2JqZWN0LmtleXMoTylcbm1vZHVsZS5leHBvcnRzID0gT2JqZWN0LmtleXMgfHwgZnVuY3Rpb24ga2V5cyhPKSB7XG4gIHJldHVybiBpbnRlcm5hbE9iamVjdEtleXMoTywgZW51bUJ1Z0tleXMpO1xufTtcblxuXG4vKioqLyB9KSxcblxuLyoqKi8gXCIuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9vYmplY3QtcHJvcGVydHktaXMtZW51bWVyYWJsZS5qc1wiOlxuLyohKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiEqXFxcbiAgISoqKiAuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9vYmplY3QtcHJvcGVydHktaXMtZW51bWVyYWJsZS5qcyAqKiohXG4gIFxcKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi9cbi8qISBubyBzdGF0aWMgZXhwb3J0cyBmb3VuZCAqL1xuLyoqKi8gKGZ1bmN0aW9uKG1vZHVsZSwgZXhwb3J0cywgX193ZWJwYWNrX3JlcXVpcmVfXykge1xuXG5cInVzZSBzdHJpY3RcIjtcblxudmFyIG5hdGl2ZVByb3BlcnR5SXNFbnVtZXJhYmxlID0ge30ucHJvcGVydHlJc0VudW1lcmFibGU7XG52YXIgZ2V0T3duUHJvcGVydHlEZXNjcmlwdG9yID0gT2JqZWN0LmdldE93blByb3BlcnR5RGV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KioqKioqKioqKioqISpcXFxuICAhKioqIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvaW50ZXJuYWxzL3NoYXJlZC1rZXkuanMgKioqIVxuICBcXCoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi9cbi8qISBubyBzdGF0aWMgZXhwb3J0cyBmb3VuZCAqL1xuLyoqKi8gKGZ1bmN0aW9uKG1vZHVsZSwgZXhwb3J0cywgX193ZWJwYWNrX3JlcXVpcmVfXykge1xuXG52YXIgc2hhcmVkID0gX193ZWJwYWNrX3JlcXVpcmVfXygvKiEgLi4vaW50ZXJuYWxzL3NoYXJlZCAqLyBcIi4vbm9kZV9tb2R1bGVzL2NvcmUtanMvaW50ZXJuYWxzL3NoYXJlZC5qc1wiKTtcbnZhciB1aWQgPSBfX3dlYnBhY2tfcmVxdWlyZV9fKC8qISAuLi9pbnRlcm5hbHMvdWlkICovIFwiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvdWlkLmpzXCIpO1xuXG52YXIga2V5cyA9IHNoYXJlZCgna2V5cycpO1xuXG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIChrZXkpIHtcbiAgcmV0dXJuIGtleXNba2V5XSB8fCAoa2V5c1trZXldID0gdWlkKGtleSkpO1xufTtcblxuXG4vKioqLyB9KSxcblxuLyoqKi8gXCIuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9zaGFyZWQuanNcIjpcbi8qISoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqISpcXFxuICAhKioqIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvaW50ZXJuYWxzL3NoYXJlZC5qcyAqKiohXG4gIFxcKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovXG4vKiEgbm8gc3RhdGljIGV4cG9ydHMgZm91bmQgKi9cbi8qKiovIChmdW5jdG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9IF9fd2VicGFja19yZXF1aXJlX18oLyohIC4uL2ludGVybmFscy90by1pbnRlZ2VyICovIFwiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvdG8taW50ZWdlci5qc1wiKTtcblxudmFyIG1heCA9IE1hdGgubWF4O1xudmFyIG1pbiA9IE1hdGgubWluO1xuXG4vLyBIZWxwZXIgZm9yIGEgcG9wdWxhciByZXBlYXRpbmcgY2FzZSBvZiB0aGUgc3BlYzpcbi8vIExldCBpbnRlZ2VyIGJlID8gVG9JbnRlZ2VyKGluZGV4KS5cbi8vIElmIGludGVnZXIgPCAwLCBsZXQgcmVzdWx0IGJlIG1heCgobGVuZ3RoICsgaW50ZWdlciksIDApOyBlbHNlIGxldCByZXN1bHQgYmUgbWluKGxlbmd0aCwgbGVuZ3RoKS5cbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKGluZGV4LCBsZW5ndGgpIHtcbiAgdmFyIGludGVnZXIgPSB0b0ludGVnZXIoaW5kZXgpO1xuICByZXR1cm4gaW50ZWdlciA8IDAgPyBtYXgoaW50ZWdlciArIGxlbmd0aCwgMCkgOiBtaW4oaW50ZWdlciwgbGVuZ3RoKTtcbn07XG5cblxuLyoqKi8gfSksXG5cbi8qKiovIFwiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvdG8taW5kZXhlZC1vYmplY3QuanNcIjpcbi8qISoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiohKlxcXG4gICEqKiogLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvdG8taW5kZXhlZC1vYmplY3QuanMgKioqIVxuICBcXCoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovXG4vKiEgbm8gc3RhdGljIGV4cG9ydHMgZm91bmQgKi9cbi8qKiovIChmdW5jdGlvbihtb2R1bGUsIGV4cG9ydHMsIF9fd2VicGFja19yZXF1aXJlX18pIHtcblxuLy8gdG9PYmplY3Qgd2l0aCBmYWxsYmFjayBmb3Igbm9uLWFycmF5LWxpa2UgRVMzIHN0cmluZ3NcbnZhciBJbmRleGVkT2JqZWN0ID0gX193ZWJwYWNrX3JlcXVpcmVfXygvKiEgLi4vaW50ZXJuYWxzL2luZGV4ZWQtb2JqZWN0ICovIFwiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvaW5kZXhlZC1vYmplY3QuanNcIik7XG52YXIgcmVxdWlyZU9iamVjdENvZXJjaWJsZSA9IF9fd2VicGFja19yZXF1aXJlX18oLyohIC4uL2ludGVybmFscy9yZXF1aXJlLW9iamVjdC1jb2VyY2libGUgKi8gXCIuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9yZXF1aXJlLW9iamVjdC1jb2VyY2libGUuanNcIik7XG5cbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKGl0KSB7XG4gIHJldHVybiBJbmRleGVkT2JqZWN0KHJlcXVpcmVPYmplY3RDb2VyY2libGUoaXQpKTtcbn07XG5cblxuLyoqKi8gfSksXG5cbi8qKiovIFwiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvdG8taW50ZWdlci5qc1wiOlxuLyohKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqISpcXFxuICAhKioqIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvaW50ZXJuYWxzL3RvLWludGVnZXIuanMgKioqIVxuICBcXCoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi9cbi8qISBubyBzdGF0aWMgZXhwb3J0cyBmb3VuZCAqL1xuLyoqKi8gKGZ1bmN0aW9uKG1vZHVsZSwgZXhwb3J0cykge1xuXG52YXIgY2VpbCA9IE1hdGguY2VpbDtcbnZhciBmbG9vciA9IE1hdGguZmx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VudCkge1xuICByZXR1cm4gYXJndW1lbnQgPiAwID8gbWluKHRvSW50ZWdlcihhcmd1bWVudCksIDB4MUZGRkZGRkZGRkZGRkYpIDogMDsgLy8gMiAqKiA1MyAtIDEgPT0gOTAwNzE5OTI1NDc0MDk5MVxufTtcblxuXG4vKioqLyB9KSxcblxuLyoqKi8gXCIuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy90by1vYmplY3QuanNcIjpcbi8qISoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqISpcXFxuICAhKioqIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvaW50ZXJuYWxzL3RvLW9iamVjdC5qcyAqKiohXG4gIFxcKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovXG4vKiEgbm8gc3RhdGljIGV4cG9ydHMgZm91bmQgKi9cbi8qKiovIChmdW5jdGlvbihtb2R1bGUsIGV4cG9ydHMsIF9fd2VicGFja19yZXF1aXJlX18pIHtcblxudmFyIHJlcXVpcmVPYmplY3RDb2VyY2libGUgPSBfX3dlYnBhY2tfcmVxdWlyZV9fKC8qISAuLi9pbnRlcm5hbHMvcmVxdWlyZS1vYmplY3QtY29lcmNpYmxlICovIFwiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvcmVxdWlyZS1vYmplY3QtY29lcmNpYmxlLmpzXCIpO1xuXG4vLyBgVG9PYmplY3RgIGFic3RyYWN0IG9wZXJhdGlvblxuLy8gaHR0cHM6Ly90YzM5LmdpdGh1Yi5pby9lY21hMjYyLyNzZWMtdG9vYmplY3Rcbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKGFyZ3VtZW50KSB7XG4gIHJldHVybiBPYmplY3QocmVxdWlyZU9iamVjdENvZXJjaWJsZShhcmd1bWVudCkpO1xufTtcblxuXG4vKioqLyB9KSxcblxuLyoqKi8gXCIuL25vZGVfbW9kdWxlc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pdC52YWx1ZU9mKSA9PSAnZnVuY3Rpb24nICYmICFpc09iamVjdCh2YWwgPSBmbi5jYWxsKGl0KSkpIHJldHVybiB2YWw7XG4gIGlmICghUyAmJiB0eXBlb2YgKGZuID0gaXQudG9TdHJpbmcpID09ICdmdW5jdGlvbicgJiYgIWlzT2JqZWN0KHZhbCA9IGZuLmNhbGwoaXQpKSkgcmV0dXJuIHZhbDtcbiAgdGhyb3cgVHlwZUVycm9yKFwiQ2FuJ3QgY29udmVydCBvYmplY3QgdG8gcHJpbWl0aXZlIHZhbHVlXCIpO1xufTtcblxuXG4vKioqLyB9KSxcblxuLyoqKi8gXCIuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy91aWQuanNcIjpcbi8qISoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqISpcXFxuICAhKioqIC4vbm9kZV9tb2R1bGVzL2NvcmUtanMvaW50ZXJuYWxzL3VpZC5qcyAqKiohXG4gIFxcKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovXG4vKiEgbm8gc3RhdGljIGV4cG9ydHMgZm91bmQgKi9cbi8qKiovIChmdW5jdGlvbihtb2R1bGUsIGV4cG9ydHMpIHtcblxudmFyIGlkID0gMDtcbnZhciBwb3N0Zml4ID0gTWF0aC5yYW5kb20oKTtcblxubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiAoa2V5KSB7XG4gIHJldHVybiAnU3ltYm9sKCcuY29uY2F0KGtleSA9PT0gdW5kZWZpbmVkID8gJycgOiBrZXksICcpXycsICgrK2lkICsgcG9zdGZpeCkudG9TdHJpbmcoMzYpKTtcbn07XG5cblxuLyoqKi8gfSksXG5cbi8qKiovIFwiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvdmFsaWRhdGUtc2V0LXByb3RvdHlwZS1vZi1hcmd1bWVudHMuanNcIjpcbi8qISoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiohKlxcXG4gICEqKiogLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvdmFsaWRhdGUtc2V0LXByb3RvdHlwZS1vZi1hcmd1bWVudHMuanMgKioqIVxuICBcXCoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovXG4vKiEgbm8gc3RhdGljIGV4cG9ydHMgZm91bmQgKi9cbi8qKiovIChmdW5jdGlvbihtb2R1bGUsIGV4cG9ydHMsIF9fd2VicGFja19yZXF1aXJlX18pIHtcblxudmFyIGlzT2JqZWN0ID0gX193ZWJwYWNrX3JlcXVpcmVfXygvKiEgLi4vaW50ZXJuYWxzL2lzLW9iamVjdCAqLyBcIi4vbm9kZV9tb2R1bGVzL2NvcmUtanMvaW50ZXJuYWxzL2lzLW9iamVjdC5qc1wiKTtcbnZhciBhbk9iamVjdCA9IF9fd2VicGFja19yZXF1aXJlX18oLyohIC4uL2ludGVybmFscy9hbi1vYmplY3QgKi8gXCIuL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9hbi1vYmplY3QuanNcIik7XG5cbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gKE8sIHByb3RvKSB7XG4gIGFuT2JqZWN0KE8pO1xuICBpZiAoIWlzT2JqZWN0KHByb3RvKSAmJiBwcm90byAhPT0gbnVsbCkge1xuICAgIHRocm93IFR5cGVFcnJvcihcIkNhbid0IHNldCBcIiArIFN0cmluZyhwcm90bykgKyAnIGFzIGEgcHJvdG90eXBlJyk7XG4gIH1cbn07XG5cblxuLyoqKi8gfSksXG5cbi8qKiovIFwiLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvd2VsbC1rbm93bi1zeW1ib2wuanNcIjpcbi8qISoqKioqKioqKioqKioqKioqKioqKioqKioqKioq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p9fS9naSwgbW9tZW50KCkuZm9ybWF0KFwiSEg6bW1cIikpXG4gICAgICAgICAgICAucmVwbGFjZSgve3tcXHMqdGl0bGVcXHMqfX0vZ2ksIGZpbGVuYW1lKVxuICAgICAgICAgICAgLnJlcGxhY2UoL3t7XFxzKihkYXRlfHRpbWUpXFxzKigoWystXVxcZCspKFt5cW13ZGhzXSkpP1xccyooOi4rPyk/fX0vZ2ksIChfLCBfdGltZU9yRGF0ZSwgY2FsYywgdGltZURlbHRhLCB1bml0LCBtb21lbnRGb3JtYXQpID0+IHtcbiAgICAgICAgICAgIGNvbnN0IG5vdyA9IG1vbWVudCgpO1xuICAgICAgICAgICAgY29uc3QgY3VycmVudERhdGUgPSBkYXRlLmNsb25lKCkuc2V0KHtcbiAgICAgICAgICAgICAgICBob3VyOiBub3cuZ2V0KFwiaG91clwiKSxcbiAgICAgICAgICAgICAgICBtaW51dGU6IG5vdy5nZXQoXCJtaW51dGVcIiksXG4gICAgICAgICAgICAgICAgc2Vjb25kOiBub3cuZ2V0KFwic2Vjb25kXCIpLFxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBpZiAoY2FsYykge1xuICAgICAgICAgICAgICAgIGN1cnJlbnREYXRlLmFkZChwYXJzZUludCh0aW1lRGVsdGEsIDEwKSwgdW5pdCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAobW9tZW50Rm9ybWF0KSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGN1cnJlbnREYXRlLmZvcm1hdChtb21lbnRGb3JtYXQuc3Vic3RyaW5nKDEpLnRyaW0oKSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gY3VycmVudERhdGUuZm9ybWF0KGZvcm1hdCk7XG4gICAgICAgIH0pXG4gICAgICAgICAgICAucmVwbGFjZSgve3tcXHMqeWVzdGVyZGF5XFxzKn19L2dpLCBkYXRlLmNsb25lKCkuc3VidHJhY3QoMSwgXCJkYXlcIikuZm9ybWF0KGZvcm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xzKihkYXRlfHRpbWUpXFxzKigoWystXVxcZCspKFt5cW13ZGhzXSkpP1xccyooOi4rPyk/fX0vZ2ksIChfLCBfdGltZU9yRGF0ZSwgY2FsYywgdGltZURlbHRhLCB1bml0LCBtb21lbnRGb3JtYXQpID0+IHtcbiAgICAgICAgICAgIGNvbnN0IG5vdyA9IHdpbmRvdy5tb21lbnQoKTtcbiAgICAgICAgICAgIGNvbnN0IGN1cnJlbnREYXRlID0gZGF0ZS5jbG9uZSgpLnNldCh7XG4gICAgICAgICAgICAgICAgaG91cjogbm93LmdldChcImhvdXJcIiksXG4gICAgICAgICAgICAgICAgbWludXRlOiBub3cuZ2V0KFwibWludXRlXCIpLFxuICAgICAgICAgICAgICAgIHNlY29uZDogbm93LmdldChcInNlY29uZFwiKSxcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgaWYgKGNhbGMpIHtcbiAgICAgICAgICAgICAgICBjdXJyZW50RGF0ZS5hZGQocGFyc2VJbnQodGltZURlbHRhLCAxMCksIHVuaXQpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKG1vbWVudEZvcm1hdCkge1xuICAgICAgICAgICAgICAgIHJldHVybiBjdXJyZW50RGF0ZS5mb3JtYXQobW9tZW50Rm9ybWF0LnN1YnN0cmluZygxKS50cmltKCkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIGN1cnJlbnREYXRlLmZvcm1hdChmb3JtYXQpO1xuICAgICAgICB9KVxuICAgICAgICAgICAgLnJlcGxhY2UoL3t7XFxzKnRpdGxlXFxzKn19L2dpLCBmaWxlbmFtZSlcbiAgICAgICAgICAgIC5yZXBsYWNlKC97e1xccyp0aW1lXFxzKn19L2dpLCB3aW5kb3cubW9tZW50KCkuZm9ybWF0KFwiSEg6bW1cIikpXG4gICAgICAgICAgICAucmVwbGFjZSgve3tcXHMqKHN1bmRheXxtb25kYXl8dHVlc2RheXx3ZWRuZXNkYXl8dGh1cnNkYXl8ZnJpZGF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qgbm9ybWFsaXplZFBhdGggPSBhd2FpdCBnZXROb3RlUGF0aChmb2xkZXIsIGZpbGVuYW1lKTtcbiAgICB0cnkge1xuICAgICAgICBjb25zdCBjcmVhdGVkRmlsZSA9IGF3YWl0IHZhdWx0LmNyZWF0ZShub3JtYWxpemVkUGF0aCwgdGVtcGxhdGVDb250ZW50c1xuICAgICAgICAgICAgLnJlcGxhY2UoL3t7XFxzKihkYXRlfHRpbWUpXFxzKigoWystXVxcZCspKFt5cW13ZGhzXSkpP1xccyooOi4rPyk/fX0vZ2ksIChfLCBfdGltZU9yRGF0ZSwgY2FsYywgdGltZURlbHRhLCB1bml0LCBtb21lbnRGb3JtYXQpID0+IHtcbiAgICAgICAgICAgIGNvbnN0IG5vdyA9IHdpbmRvdy5tb21lbnQoKTtcbiAgICAgICAgICAgIGNvbnN0IGN1cnJlbnREYXRlID0gZGF0ZS5jbG9uZSgpLnNldCh7XG4gICAgICAgICAgICAgICAgaG91cjogbm93LmdldChcImhvdXJcIiksXG4gICAgICAgICAgICAgICAgbWludXRlOiBub3cuZ2V0KFwibWludXRlXCIpLFxuICAgICAgICAgICAgICAgIHNlY29uZDogbm93LmdldChcInNlY29uZFwiKSxcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgaWYgKGNhbGMpIHtcbiAgICAgICAgICAgICAgICBjdXJyZW50RGF0ZS5hZGQocGFyc2VJbnQodGltZURlbHRhLCAxMCksIHVuaXQpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKG1vbWVudEZvcm1hdCkge1xuICAgICAgICAgICAgICAgIHJldHVybiBjdXJyZW50RGF0ZS5mb3JtYXQobW9tZW50Rm9ybWF0LnN1YnN0cmluZygxKS50cmltKCkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIGN1cnJlbnREYXRlLmZvcm1hdChmb3JtYXQpO1xuICAgICAgICB9KVxuICAgICAgICAgICAgLnJlcGxhY2UoL3t7XFxzKmRhdGVcXHMq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vdy5nZXQoXCJtaW51dGVcIiksXG4gICAgICAgICAgICAgICAgc2Vjb25kOiBub3cuZ2V0KFwic2Vjb25kXCIpLFxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBpZiAoY2FsYykge1xuICAgICAgICAgICAgICAgIGN1cnJlbnREYXRlLmFkZChwYXJzZUludCh0aW1lRGVsdGEsIDEwKSwgdW5pdCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAobW9tZW50Rm9ybWF0KSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGN1cnJlbnREYXRlLmZvcm1hdChtb21lbnRGb3JtYXQuc3Vic3RyaW5nKDEpLnRyaW0oKSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gY3VycmVudERhdGUuZm9ybWF0KGZvcm1hdCk7XG4gICAgICAgIH0pXG4gICAgICAgICAgICAucmVwbGFjZSgve3tcXHMqZGF0ZVxccyp9fS9naSwgZmlsZW5hbWUpXG4gICAgICAgICAgICAucmVwbGFjZSgve3tcXHMqdGltZVxccyp9fS9naSwgd2luZG93Lm1vbWVudCgpLmZvcm1hdChcIkhIOm1tXCIpKVxuICAgICAgICAgICAgLnJlcGxhY2UoL3t7XFxzKnRpdGxlXFxzKn19L2dpLCBmaWxlbmFtZSkpO1xuICAgICAgICAvLyBlc2xpbnQtZGlzYWJsZS1uZXh0LWxpbmUgQHR5cGVzY3JpcHQtZXNsaW50L25vLWV4cGxpY2l0LWFueVxuICAgICAgICB3aW5kb3cuYXBwLmZvbGRNYW5hZ2VyLnNhdmUoY3JlYXRlZEZpbGUsIElGb2xkSW5mbyk7XG4gICAgICAgIHJldHVybiBjcmVhdGVkRmlsZTtcbiAgICB9XG4gICAgY2F0Y2ggKGVycikge1xuICAgICAgICBjb25zb2xlLmVycm9yKGBGYWlsZWQgdG8gY3JlYXRlIGZpbGU6ICcke25vcm1hbGl6ZWRQYXRofSdgLCBlcnIpO1xuICAgICAgICBuZXcgb2JzaWRpYW4u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Jsb2NrVXRpbHMge1xuICAgIHByaXZhdGUgc3RhdGljIGdldEJsb2NrKFxuICAgICAgICBlZGl0b3I6IEVkaXRvcixcbiAgICAgICAgZmlsZTogVEZpbGVcbiAgICApOiAoU2VjdGlvbkNhY2hlIHwgTGlzdEl0ZW1DYWNoZSkgfCB1bmRlZmluZWQge1xuICAgICAgICBjb25zdCBjdXJzb3IgPSBlZGl0b3IuZ2V0Q3Vyc29yKFwidG9cIik7XG4gICAgICAgIGNvbnN0IGZpbGVDYWNoZSA9IGFwcC5tZXRhZGF0YUNhY2hlLmdldEZpbGVDYWNoZShmaWxlKTtcblxuICAgICAgICBsZXQgY3VycmVudEJsb2NrOiBTZWN0aW9uQ2FjaGUgfCBMaXN0SXRlbUNhY2hlID1cbiAgICAgICAgICAgIGZpbGVDYWNoZT8uc2VjdGlvbnM/LmZpbmQoXG4gICAgICAgICAgICAgICAgKHNlY3Rpb24pID0+XG4gICAgICAgICAgICAgICAgICAgIHNlY3Rpb24ucG9zaXRpb24uc3RhcnQubGluZSA8PSBjdXJzb3IubGluZSAmJlxuICAgICAgICAgICAgICAgICAgICBzZWN0aW9uLnBvc2l0aW9uLmVuZC5saW5lID49IGN1cnNvci5saW5lXG4gICAgICAgICAgICApO1xuXG4gICAgICAgIGlmIChjdXJyZW50QmxvY2sudHlwZSA9PSBcImxpc3RcIikge1xuICAgICAgICAgICAgY3VycmVudEJsb2NrID0gZmlsZUNhY2hlLmxpc3RJdGVtcz8uZmluZCgobGlzdCkgPT4ge1xuICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgbGlzdC5wb3NpdGlvbi5zdGFydC5saW5lIDw9IGN1cnNvci5saW5lICYmXG4gICAgICAgICAgICAgICAgICAgIGxpc3QucG9zaXRpb24uZW5kLmxpbmUgPj0gY3Vyc29yLmxpbmVcbiAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGxpc3Q7XG4gICAgICAgICAgICAgIC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nl9XCIgaW4gJHttb2RlfSBtb2RlYDtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGRpc3BsYXkgPSBgV3JpdGUgXCIke3F1ZXJ5fVwiYDtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChtb2RlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBkaXNwbGF5ID0gYE9wZW4gaW4gJHttb2RlfSBtb2RlYDtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGRpc3BsYXkgPSBgT3BlbmA7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgc3VnZ2VzdGlvbnMucHVzaCh7XG4gICAgICAgICAgICAgICAgICAgIGRhdGE6IHF1ZXJ5LFxuICAgICAgICAgICAgICAgICAgICBkaXNwbGF5OiBkaXNwbGF5LFxuICAgICAgICAgICAgICAgICAgICBtb2RlOiBtb2RlLFxuICAgICAgICAgICAgICAgICAgICBmdW5jOiAoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5maWxlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5wbHVnaW4udG9vbHMuY29weVVSSSh7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZpbGVwYXRoOiB0aGlzLmZpbGUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRhdGE6IHF1ZXJ5LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtb2RlOiBtb2RlIGFzIFBhcmFtZXRlcnNbXCJtb2RlXCJdLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnBsdWdpbi50b29scy5jb3B5VVJJKHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGFpbHk6IFwidHJ1ZVwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkYXRhOiBxdWVyeSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbW9kZTogbW9kZSBhcyBQYXJhbWV0ZXJzW1wibW9kZVwiXSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBzdWdnZXN0aW9ucztcbiAgICB9XG5cbiAgICByZW5kZXJTdWdnZXN0aW9uKHZhbHVlOiBFbnRlckRhdGEsIGVsOiBIVE1MRWxlbWVudCk6IHZvaWQge1xuICAgICAgICBlbC5pbm5lclRleHQgPSB2YWx1ZS5kaXNwbGF5O1xuICAgIH1cblxuICAgIG9uQ2hvb3NlU3VnZ2VzdGlvbihpdGVtOiBFbnRlckRhdGEsIF86IE1vdXNlRXZlbnQgfCBLZXlib2FyZEV2ZW50KTogdm9pZCB7XG4gICAgICAgIGl0ZW0uZnVuYygpO1xuICAgIH1cbn1cbiIsImltcG9ydCB7IEZ1enp5U3VnZ2VzdE1vZGFsIH0gZnJvbSBcIm9ic2lkaWFuXCI7XG5pbXBvcnQgQWR2YW5jZWRVUkkgZnJvbSBcIi4uL21haW5cIjtcbmltcG9ydCB7IEZpbGVNb2RhbERhdGEgfSBmcm9tIFwiLi4vdHlwZXNcIjtcblxuZXhwb3J0IGNsYXNzIEZpbGVNb2RhbCBleHRlbmRzIEZ1enp5U3VnZ2VzdE1vZGFsPEZpbGVNb2RhbERhdGE+IHtcbiAgICBwbHVnaW46IEFkdmFuY2VkVVJJO1xuICAgIGNvbnN0cnVj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250bWF0dGVyID0gYXBwLm1ldGFkYXRhQ2FjaGUuZ2V0Q2FjaGUoXG4gICAgICAgICAgICBwYXJhbWV0ZXJzLmZpbGVwYXRoID8/IGFwcC53b3Jrc3BhY2UuZ2V0QWN0aXZlRmlsZSgpLnBhdGhcbiAgICAgICAgKS5mcm9udG1hdHRlcjtcblxuICAgICAgICBsZXQgcmVzOiBzdHJpbmc7XG4gICAgICAgIGlmIChrZXkuc3RhcnRzV2l0aChcIltcIikgJiYga2V5LmVuZHNXaXRoKFwiXVwiKSkge1xuICAgICAgICAgICAgY29uc3QgbGlzdCA9IGtleS5zdWJzdHJpbmcoMSwga2V5Lmxlbmd0aCAtIDEpLnNwbGl0KFwiLFwiKTtcbiAgICAgICAgICAgIGxldCBjYWNoZTogYW55ID0gZnJvbnRtYXR0ZXI7XG4gICAgICAgICAgICBmb3IgKGNvbnN0IGl0ZW0gb2YgbGlzdCkge1xuICAgICAgICAgICAgICAgIGlmIChjYWNoZSBpbnN0YW5jZW9mIEFycmF5KSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IGluZGV4ID0gcGFyc2VJbnQoaXRlbSk7XG4gICAgICAgICAgICAgICAgICAgIGlmIChOdW1iZXIuaXNOYU4oaW5kZXgpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjYWNoZSA9IGNhY2hlLmZpbmQoKGUpID0+IGUgPT0gaXRlbSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgY2FjaGUgPSBjYWNoZVtwYXJzZUludChpdGVtKV07XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgY2FjaGUgPSBjYWNoZVtpdGVtXTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXMgPSBjYWNoZTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHJlcyA9IGZyb250bWF0dGVyW2tleV07XG4gICAgICAg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biAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIG5ldyBOb3RpY2UoXCJXb3Jrc3BhY2VzIHBsdWdpbiBpcyBub3QgZW5hYmxlZFwiKTtcbiAgICAgICAgICAgIHRoaXMucGx1Z2luLmZhaWx1cmUocGFyYW1ldGVycyk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBhc3luYyBoYW5kbGVDb21tYW5kKHBhcmFtZXRlcnM6IFBhcmFtZXRlcnMpIHtcbiAgICAgICAgaWYgKHBhcmFtZXRlcnMuZmlsZXBhdGgpIHtcbiAgICAgICAgICAgIGlmIChwYXJhbWV0ZXJzLm1vZGUpIHtcbiAgICAgICAgICAgICAgICBpZiAocGFyYW1ldGVycy5tb2RlID09IFwibmV3XCIpIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgZmlsZSA9IGFwcC5tZXRhZGF0YUNhY2hlLmdldEZpcnN0TGlua3BhdGhEZXN0KFxuICAgICAgICAgICAgICAgICAgICAgICAgcGFyYW1ldGVycy5maWxlcGF0aCxcbiAgICAgICAgICAgICAgICAgICAgICAgIFwiL1wiXG4gICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgIGlmIChmaWxlIGluc3RhbmNlb2YgVEZpbGUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhcmFtZXRlcnMuZmlsZXBhdGggPSBnZXRBbHRlcm5hdGl2ZUZpbGVQYXRoKGZpbGUpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGF3YWl0IHRoaXMucGx1Z2luLm9wZW4oe1xuICAgICAgICAgICAgICAgICAgICBmaWxlOiBwYXJhbWV0ZXJzLmZpbGVwYXRoLFxuICAgICAgICAgICAgICAgICAgICBtb2RlOiBcInNvdXJjZVwiLFxuICAgICAgICAgICAgICAgICAgICBwYXJhbWV0ZXJzOiBwYXJhbWV0ZXJzLFxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIGNvbnN0IHZpZXcgPSBhcHAud29ya3NwYWNlLmdldEFjdGl2ZVZpZXdPZlR5cGUoTWFya2Rvd25WaWV3KTtcbiAgICAgICAgICAgICAgICBpZiAodmlldykge1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBlZGl0b3IgPSB2aWV3LmVkaXRvcjtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgZGF0YSA9IGVkaXRvci5nZXRWYWx1ZSgpO1xuICAgICAgICAgICAgICAgICAgICBpZiAocGFyYW1ldGVycy5tb2RlID09PSBcImFwcGVuZFwiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBlZGl0b3Iuc2V0VmFsdWUoZGF0YSArIFwiXFxuXCIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgbGluZXMgPSBlZGl0b3IubGluZUNvdW50KCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBlZGl0b3Iuc2V0Q3Vyc29yKHsgY2g6IDAsIGxpbmU6IGxpbmVzIH0pO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHBhcmFtZXRlcnMubW9kZSA9PT0gXCJwcmVwZW5kXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGVkaXRvci5zZXRWYWx1ZShcIlxcblwiICsgZGF0YSk7XG4gICAgICAgICAgICAgICAgICAgICAgICBlZGl0b3Iuc2V0Q3Vyc29yKHsgY2g6IDAsIGxpbmU6IDAgfSk7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAocGFyYW1ldGVycy5tb2RlID09PSBcIm92ZXJ3cml0ZVwiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBlZGl0b3Iuc2V0VmFsdWUoXCJcIik7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2UgaWYgKHBhcmFtZXRlcnMubGluZSkge1xuICAgICAgICAgICAgICAgIGF3YWl0IHRoaXMucGx1Z2luLm9wZW4oe1xuICAgICAgICAgICAgICAgICAgICBmaWxlOiBwYXJhbWV0ZXJzLmZpbGVwYXRoLFxuICAgICAgICAgICAgICAgICAgICBtb2RlOiBcInNvdXJjZVwiLFxuICAgICAgICAgICAgICAgICAgICBwYXJhbWV0ZXJzOiBwYXJhbWV0ZXJzLFxuICAgICAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICAgICAgdGhpcy5wbHVnaW4uc2V0Q3Vyc29ySW5MaW5lKHBhcmFtZXRlcnMubGluZSk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGF3YWl0IHRoaXMucGx1Z2luLm9wZW4oe1xuICAgICAgICAgICAgICAgICAgICBmaWxlOiBwYXJhbWV0ZXJzLmZpbGVwYXRoLFxuICAgICAgICAgICAgICAgICAgICBzZXR0aW5nOiB0aGlzLnBsdWdpbi5zZXR0aW5ncy5vcGVuRmlsZVdpdGhvdXRXcml0ZUluTmV3UGFuZSxcbiAgICAgICAgICAgICAgICAgICAgcGFyYW1ldGVyczogcGFyYW1ldGVycyxcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBpZiAocGFyYW1ldGVycy5jb21tYW5kaWQpIHtcbiAgICAgICAgICAgIGFwcC5jb21tYW5kcy5leGVjdXRlQ29tbWFuZEJ5SWQocGFyYW1ldGVycy5jb21tYW5kaWQpO1xuICAgICAgICB9IGVsc2UgaWYgKHBhcmFtZXRlcnMuY29tbWFuZG5hbWUpIHtcbiAgICAgICAgICAgIGNvbnN0IHJhd0NvbW1hbmRzID0gYXBwLmNvbW1hbmRzLmNvbW1hbmRzO1xuICAgICAgICAgICAgZm9yIChjb25zdCBjb21tYW5kIGluIHJhd0NvbW1hbmRzKSB7XG4gICAgICAgICAgICAgICAgaWYgKHJhd0NvbW1hbmRzW2NvbW1hbmRdLm5hbWUgPT09IHBhcmFtZXRlcnMuY29tbWFuZG5hbWUpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHJhd0NvbW1hbmRzW2NvbW1hbmRdLmNhbGxiYWNrKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByYXdDb21tYW5kc1tjb21tYW5kXS5jYWxsYmFjaygpO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmF3Q29tbWFuZHNbY29tbWFuZF0uY2hlY2tDYWxsYmFjayhmYWxzZSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHRoaXMucGx1Z2luLnN1Y2Nlc3MocGFyYW1ldGVycyk7XG4gICAgfVxuXG4gICAgYXN5bmMgaGFuZGxlRXZhbChwYXJhbWV0ZXJzOiBQYXJhbWV0ZXJzKSB7XG4gICAgICAgIGlmIChwYXJhbWV0ZXJzLmZpbGVwYXRoKSB7XG4gICAgICAgICAgICBpZiAocGFyYW1ldGVycy5tb2RlKSB7XG4gICAgICAgICAgICAgICAgaWYgKHBhcmFtZXRlcnMubW9kZSA9PSBcIm5ld1wiKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IGZpbGUgPSBhcHAubWV0YWRhdGFDYWNoZS5nZXRGaXJzdExpbmtwYXRoRGVzdChcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhcmFtZXRlcnMuZmlsZXBhdGgsXG4gICAgICAgICAgICAgICAgICAgICAgICBcIi9cIlxuICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICBpZiAoZmlsZSBpbnN0YW5jZW9mIFRGaWxlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBwYXJhbWV0ZXJzLmZpbGVwYXRoID0gZ2V0QWx0ZXJuYXRpdmVGaWxlUGF0aChmaWxlKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBhd2FpdCB0aGlzLnBsdWdpbi5vcGVuKHtcbiAgICAgICAgICAgICAgICAgICAgZmlsZTogcGFyYW1ldGVycy5maWxlcGF0aCxcbiAgICAgICAgICAgICAgICAgICAgbW9kZTogXCJzb3VyY2VcIixcbiAgICAgICAgICAgICAgICAgICAgcGFyYW1ldGVyczogcGFyYW1ldGVycyxcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICBjb25zdCB2aWV3ID0gYXBwLndvcmtzcGFjZS5nZXRBY3RpdmVWaWV3T2ZUeXBlKE1hcmtkb3duVmlldyk7XG4gICAgICAgICAgICAgICAgaWYgKHZpZXcpIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgZWRpdG9yID0gdmlldy5lZGl0b3I7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IGRhdGEgPSBlZGl0b3IuZ2V0VmFsdWUoKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHBhcmFtZXRlcnMubW9kZSA9PT0gXCJhcHBlbmRcIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgZWRpdG9yLnNldFZhbHVlKGRhdGEgKyBcIlxcblwiKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGxpbmVzID0gZWRpdG9yLmxpbmVDb3VudCgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgZWRpdG9yLnNldEN1cnNvcih7IGNoOiAwLCBsaW5lOiBsaW5lcyB9KTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChwYXJhbWV0ZXJzLm1vZGUgPT09IFwicHJlcGVuZFwiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBlZGl0b3Iuc2V0VmFsdWUoXCJcXG5cIiArIGRhdGEpO1xuICAgICAgICAgICAgICAgICAgICAgICAgZWRpdG9yLnNldEN1cnNvcih7IGNoOiAwLCBsaW5lOiAwIH0pO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHBhcmFtZXRlcnMubW9kZSA9PT0gXCJvdmVyd3JpdGVcIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgZWRpdG9yLnNldFZhbHVlKFwiXCIpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIGlmIChwYXJhbWV0ZXJzLmxpbmUpIHtcbiAgICAgICAgICAgICAgICBhd2FpdCB0aGlzLnBsdWdpbi5vcGVuKHtcbiAgICAgICAgICAgICAgICAgICAgZmlsZTogcGFyYW1ldGVycy5maWxlcGF0aCxcbiAgICAgICAgICAgICAgICAgICAgbW9kZTogXCJzb3VyY2VcIixcbiAgICAgICAgICAgICAgICAgICAgcGFyYW1ldGVyczogcGFyYW1ldGVycyxcbiAgICAgICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgICAgIHRoaXMucGx1Z2luLnNldEN1cnNvckluTGluZShwYXJhbWV0ZXJzLmxpbmUpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBhd2FpdCB0aGlzLnBsdWdpbi5vcGVuKHtcbiAgICAgICAgICAgICAgICAgICAgZmlsZTogcGFyYW1ldGVycy5maWxlcGF0aCxcbiAgICAgICAgICAgICAgICAgICAgc2V0dGluZzogdGhpcy5wbHVnaW4uc2V0dGluZ3Mub3BlbkZpbGVXaXRob3V0V3JpdGVJbk5ld1BhbmUsXG4gICAgICAgICAgICAgICAgICAgIHBhcmFtZXRlcnM6IHBhcmFtZXRlcnMsXG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHRoaXMucGx1Z2luLnNldHRpbmdzLmFsbG93RXZhbCkge1xuICAgICAgICAgICAgLy9DYWxsIGV2YWwgaW4gYSBnbG9iYWwgc2NvcGVcbiAgICAgICAgICAgIGNvbnN0IGV2YWwyID0gZXZhbDtcbiAgICAgICAgICAgIGV2YWwyKHB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gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBmaWxlID0gYXBwLndvcmtzcGFjZS5nZXRBY3RpdmVGaWxlKCk7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoZmlsZSkge1xuICAgICAgICAgICAgbGV0IGRhdGEgPSBhd2FpdCBhcHAudmF1bHQucmVhZChmaWxlKTtcbiAgICAgICAgICAgIGlmIChwYXJhbWV0ZXJzLnNlYXJjaHJlZ2V4KSB7XG4gICAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgWywgLCBwYXR0ZXJuLCBmbGFnc10gPVxuICAgICAgICAgICAgICAgICAgICAgICAgcGFyYW1ldGVycy5zZWFyY2hyZWdleC5tYXRjaCgvKFxcLz8pKC4rKVxcMShbYS16XSopL2kpO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCByZWdleCA9IG5ldyBSZWdFeHAocGF0dGVybiwgZmxhZ3MpO1xuICAgICAgICAgICAgICAgICAgICBkYXRhID0gZGF0YS5yZXBsYWNlKHJlZ2V4LCBwYXJhbWV0ZXJzLnJlcGxhY2UpO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnBsdWdpbi5zdWNjZXNzKHBhcmFtZXRlcnMpO1xuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgICAgICAgICAgIG5ldyBOb3RpY2UoXG4gICAgICAgICAgICAgICAgICAgICAgICBgQ2FuJ3QgcGFyc2UgJHtwYXJhbWV0ZXJzLnNlYXJjaHJlZ2V4fSBhcyBSZWdFeGBcbiAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5wbHVnaW4uZmFpbHVyZShwYXJhbWV0ZXJzKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGRhdGEgPSBkYXRhLnJlcGxhY2VBbGwocGFyYW1ldGVycy5zZWFyY2g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FzeW5jIGhhbmRsZVdyaXRlKFxuICAgICAgICBwYXJhbWV0ZXJzOiBQYXJhbWV0ZXJzLFxuICAgICAgICBjcmVhdGVkRGFpbHlOb3RlOiBib29sZWFuID0gZmFsc2VcbiAgICApIHtcbiAgICAgICAgbGV0IGZpbGU6IFRBYnN0cmFjdEZpbGUgfCBudWxsO1xuICAgICAgICBpZiAocGFyYW1ldGVycy5maWxlcGF0aCkge1xuICAgICAgICAgICAgZmlsZSA9IGFwcC52YXVsdC5nZXRBYnN0cmFjdEZpbGVCeVBhdGgocGFyYW1ldGVycy5maWxlcGF0aCk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBmaWxlID0gYXBwLndvcmtzcGFjZS5nZXRBY3RpdmVGaWxlKCk7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAocGFyYW1ldGVycy5maWxlcGF0aCB8fCBmaWxlKSB7XG4gICAgICAgICAgICBsZXQgb3V0RmlsZTogVEZpbGU7XG4gICAgICAgICAgICBsZXQgcGF0aCA9IHBhcmFtZXRlcnMuZmlsZXBhdGggPz8gZmlsZS5wYXRoO1xuICAgICAgICAgICAgaWYgKHBhcmFtZXRlcnMubW9kZSA9PT0gXCJvdmVyd3JpdGVcIikge1xuICAgICAgICAgICAgICAgIG91dEZpbGUgPSBhd2FpdCB0aGlzLnBsdWdpbi53cml0ZUFuZE9wZW5GaWxlKFxuICAgICAgICAgICAgICAgICAgICBwYXRoLFxuICAgICAgICAgICAgICAgICAgICBwYXJhbWV0ZXJzLmRhdGEsXG4gICAgICAgICAgICAgICAgICAgIHBhcmFtZXRlcnNcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIHRoaXMucGx1Z2luLnN1Y2Nlc3MocGFyYW1ldGVycyk7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKHBhcmFtZXRlcnMubW9kZSA9PT0gXCJwcmVwZW5kXCIpIHtcbiAgICAgICAgICAgICAgICBpZiAoZmlsZSBpbnN0YW5jZW9mIFRGaWxlKSB7XG4gICAgICAgICAgICAgICAgICAgIG91dEZpbGUgPSBhd2FpdCB0aGlzLnBsdWdpbi5wcmVwZW5kKGZpbGUsIHBhcmFtZXRlcnMpO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIG91dEZpbGUgPSBhd2FpdCB0aGlzLnBsdWdpbi5wcmVwZW5kKHBhdGgsIHBhcmFtZXRlcnMpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB0aGlzLnBsdWdpbi5zdWNjZXNzKHBhcmFtZXRlcnMpO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChwYXJhbWV0ZXJzLm1vZGUgPT09IFwiYXBwZW5kXCIpIHtcbiAgICAgICAgICAgICAgICBpZiAoZmlsZSBpbnN0YW5jZW9mIFRGaWxlKSB7XG4gICAgICAgICAgICAgICAgICAgIG91dEZpbGUgPSBhd2FpdCB0aGlzLnBsdWdpbi5hcHBlbmQoZmlsZSwgcGFyYW1ldGVycyk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgb3V0RmlsZSA9IGF3YWl0IHRoaXMucGx1Z2luLmFwcGVuZChwYXRoLCBwYXJhbWV0ZXJzKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgdGhpcy5wbHVnaW4uc3VjY2VzcyhwYXJhbWV0ZXJzKTtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAocGFyYW1ldGVycy5tb2RlID09PSBcIm5ld1wiKSB7XG4gICAgICAgICAgICAgICAgaWYgKGZpbGUgaW5zdGFuY2VvZiBURmlsZSkge1xuICAgICAgICAgICAgICAgICAgICBvdXRGaWxlID0gYXdhaXQgdGhpcy5wbHVnaW4ud3JpdGVBbmRPcGVuRmlsZShcbiAgICAgICAgICAgICAgICAgICAgICAgIGdldEFsdGVybmF0aXZlRmlsZVBhdGgoZmlsZSksXG4gICAgICAgICAgICAgICAgICAgICAgICBwYXJhbWV0ZXJzLmRhdGEsXG4gICAgICAgICAgICAgICAgICAgICAgICBwYXJhbWV0ZXJzXG4gICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMucGx1Z2luLmhvb2tTdWNjZXNzKHBhcmFtZXRlcnMsIG91dEZpbGUpO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIG91dEZpbGUgPSBhd2FpdCB0aGlzLnBsdWdpbi53cml0ZUFuZE9wZW5GaWxlKFxuICAgICAgICAgICAgICAgICAgICAgICAgcGF0aCxcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhcmFtZXRlcnMuZGF0YSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhcmFtZXRlcnNcbiAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5wbHVnaW4uaG9va1N1Y2Nlc3MocGFyYW1ldGVycywgb3V0RmlsZSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIGlmICghY3JlYXRlZERhaWx5Tm90ZSAmJiBmaWxlIGluc3RhbmNlb2YgVEZpbGUpIHtcbiAgICAgICAgICAgICAgICBuZXcgTm90aWNlKFwiRmlsZSBhbHJlYWR5IGV4aXN0c1wiKTtcbiAgICAgICAgICAgICAgICB0aGlzLnBsdWdpbi5vcGVuRXhpc3RpbmdGaWxlQW5kU2V0Q3Vyc29yKGZpbGUucGF0aCwgcGFyYW1ldGVycyk7XG4gICAgICAgICAgICAgICAgdGhpcy5wbHVnaW4uZmFpbHVyZShwYXJhbWV0ZXJzKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgb3V0RmlsZSA9IGF3YWl0IHRoaXMucGx1Z2luLndyaXRlQW5kT3BlbkZpbGUoXG4gICAgICAgICAgICAgICAgICAgIHBhdGgsXG4gICAgICAgICAgICAgICAgICAgIHBhcmFtZXRlc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gICAgIGlmICghdmlldykgcmV0dXJuO1xuICAgICAgICAgICAgY29uc3QgY2FjaGUgPSBhcHAubWV0YWRhdGFDYWNoZS5nZXRGaWxlQ2FjaGUodmlldy5maWxlKTtcbiAgICAgICAgICAgIGNvbnN0IGhlYWRpbmcgPSBjYWNoZS5oZWFkaW5ncy5maW5kKFxuICAgICAgICAgICAgICAgIChlKSA9PiBlLmhlYWRpbmcgPT09IHBhcmFtZXRlcnMuaGVhZGluZ1xuICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIHZpZXcuZWRpdG9yLmZvY3VzKCk7XG4gICAgICAgICAgICB2aWV3LmVkaXRvci5zZXRDdXJzb3Ioe1xuICAgICAgICAgICAgICAgIGxpbmU6IGhlYWRpbmcucG9zaXRpb24uc3RhcnQubGluZSArIDEsXG4gICAgICAgICAgICAgICAgY2g6IDAsXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfSBlbHNlIGlmIChwYXJhbWV0ZXJzLmJsb2NrICE9IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgYXdhaXQgdGhpcy5wbHVnaW4ub3Blbih7XG4gICAgICAgICAgICAgICAgZmlsZTogcGFyYW1ldGVycy5maWxlcGF0aCArIFwiI15cIiArIHBhcmFtZXRlcnMuYmxvY2ssXG4gICAgICAgICAgICAgICAgc2V0dGluZzogdGhpcy5wbHVnaW4uc2V0dGluZ3Mub3BlbkZpbGVXaXRob3V0V3JpdGVJbk5ld1BhbmUsXG4gICAgICAgICAgICAgICAgcGFyYW1ldGVyczogcGFyYW1ldGVycyxcbiAgICAgICAgICAgICAgICBzdXBwb3J0UG9wb3ZlcjogZmFsc2UsXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIGNvbnN0IHZpZXcgPSBhcHAud29ya3NwYWNlLmdldEFjdGl2ZVZpZXdPZlR5cGUoTWFya2Rvd25WaWV3KTtcbiAgICAgICAgICAgIGlmICghdmlldykgcmV0dXJuO1xuICAgICAgICAgICAgY29uc3QgY2FjaGUg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cHAud29ya3NwYWNlLmdldEFjdGl2ZVZpZXdPZlR5cGUoTWFya2Rvd25WaWV3KTtcblxuICAgICAgICAgICAgdGhpcy50b29scy53cml0ZVVJRFRvRmlsZSh2aWV3LmZpbGUsIHBhcmFtZXRlcnMudWlkKTtcbiAgICAgICAgfVxuICAgICAgICB0aGlzLnBsdWdpbi5zdWNjZXNzKHBhcmFtZXRlcnMpO1xuICAgIH1cblxuICAgIGhhbmRsZUNvcHlGaWxlVVJJKHdpdGhvdXREYXRhOiBib29sZWFuLCBmaWxlPzogVEZpbGUpIHtcbiAgICAgICAgY29uc3QgdmlldyA9IGFwcC53b3Jrc3BhY2UuZ2V0QWN0aXZlVmlld09mVHlwZShGaWxlVmlldyk7XG4gICAgICAgIGlmICghdmlldyAmJiAhZmlsZSkgcmV0dXJuO1xuICAgICAgICBpZiAodmlldyBpbnN0YW5jZW9mIE1hcmtkb3duVmlldykge1xuICAgICAgICAgICAgY29uc3QgcG9zID0gdmlldy5lZGl0b3IuZ2V0Q3Vyc29yKCk7XG4gICAgICAgICAgICBjb25zdCBjYWNoZSA9IGFwcC5tZXRhZGF0YUNhY2hlLmdldEZpbGVDYWNoZSh2aWV3LmZpbGUpO1xuICAgICAgICAgICAgaWYgKGNhY2hlLmhlYWRpbmdzKSB7XG4gICAgICAgICAgICAgICAgZm9yIChjb25zdCBoZWFkaW5nIG9mIGNhY2hlLmhlYWRpbmdzKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICAgIGhlYWRpbmcucG9zaXRpb24uc3RhcnQubGluZSA8PSBwb3MubGluZSAmJlxuICAgICAgICAgICAgICAgICAgICAgICAgaGVhZGluZy5wb3NpdGlvbi5lbmQubGluZSA+PSBwb3MubGluZVxuICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMudG9vbHMuY29weVVSSSh7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZmlsZXBhdGg6IHZpZXcuZmlsZS5wYXRoLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlYWRpbmc6IGhlYWRpbmcuaGVhZGluZyxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKGNhY2hlLmJsb2Nrcykge1xuICAgICAgICAgICAgICAgIGZvciAoY29uc3QgYmxvY2tJRCBvZiBPYmplY3Qua2V5cyhjYWNoZS5ibG9ja3MpKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IGJsb2NrID0gY2FjaGUuYmxvY2tzW2Jsb2NrSURdO1xuICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICBibG9jay5wb3NpdGlvbi5zdGFydC5saW5lIDw9IHBvcy5saW5lICYmXG4gICAgICAgICAgICAgICAgICAgICAgICBibG9jay5wb3NpdGlvbi5lbmQubGluZSA+PSBwb3MubGluZVxuICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMudG9vbHMuY29weVVSSSh7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZmlsZXBhdGg6IHZpZXcuZmlsZS5wYXRoLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJsb2NrOiBibG9ja0lELFxuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBpZiAod2l0aG91dERhdGEpIHtcbiAgICAgICAgICAgIGNvbnN0IGZpbGUyID0gZmlsZSA/PyBhcHAud29ya3NwYWNlLmdldEFjdGl2ZUZpbGUoKTtcbiAgICAgICAgICAgIGlmICghZmlsZTIpIHtcbiAgICAgICAgICAgICAgICBuZXcgTm90aWNlKFwiTm8gZmlsZSBvcGVuZWRcIik7XG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdGhpcy50b29scy5jb3B5VVJJKHtcbiAgICAgICAgICAgICAgICBmaWxlcGF0aDogZmlsZTIucGF0aCxcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgY29uc3QgZmlsZU1vZGFsID0gbmV3IEZpbGVNb2RhbChcbiAgICAgICAgICAgICAgICB0aGlzLnBsdWdpbixcbiAgICAgICAgICAgICAgICBcIkNob29zZSBhIGZpbGVcIixcbiAgICAgICAgICAgICAgICBmYWxzZVxuICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIGZpbGVNb2RhbC5vcGVuKCk7XG4gICAgICAgICAgICBmaWxlTW9kYWwub25DaG9vc2VJdGVtID0gKGl0ZW0sIF8pID0+IHtcbiAgICAgICAgICAgICAgICBuZXcgRW50ZXJEYXRhTW9kYWwodGhpcy5wbHVnaW4sIGl0ZW0uc291cmNlKS5vcGVuKCk7XG4gICAgICAgICAgICB9O1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgaGFuZGxlT3BlblNldHRpbmdzKHBhcmFtZXRlcnM6IFBhcmFtZXRlcnMpIHtcbiAgICAgICAgaWYgKGFwcC5zZXR0aW5nLmNvbnRhaW5lckVsLnBhcmVudEVsZW1lbnQgPT09IG51bGwpIHtcbiAgICAgICAgICAgIGFwcC5zZXR0aW5nLm9wZW4oKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAocGFyYW1ldGVycy5zZXR0aW5naWQgPT0gXCJwbHVnaW4tYnJvd3NlclwiKSB7XG4gICAgICAgICAgICBhcHAuc2V0dGluZy5vcGVuVGFiQnlJZChcImNvbW11bml0eS1wbHVnaW5zXCIpO1xuICAgICAgICAgICAgYXBwLnNldHRpbmcuYWN0aXZlVGFiLmNvbnRhaW5lckVsLmZpbmQoXCIubW9kLWN0YVwiKS5jbGljaygpO1xuICAgICAgICB9IGVsc2UgaWYgKHBhcmFtZXRlcnMuc2V0dGluZ2lkID09IFwidGhlbWUtYnJvd3NlclwiKSB7XG4gICAgICAgICAgICBhcHAuc2V0dGluZy5vcGVuVGFiQnlJZChcImFwcGVhcmFuY2VcIik7XG4gICAgICAgICAgICBhcHAuc2V0dGluZy5hY3RpdmVUYWIuY29udGFpbmVyRWwuZmluZChcIi5tb2QtY3RhXCIpLmNsaWNrKCk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBhcHAuc2V0dGluZy5vcGVuVGFiQnlJZChwYXJhbWV0ZXJzLnNldHRpbmdpZCk7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAocGFyYW1ldGVycy5zZXR0aW5nc2VjdGlvbikge1xuICAgICAgICAgICAgY29uc3QgZWxlbWVudHMgPVxuICAgICAgICAgICAgICAgIGFwcC5zZXR0aW5nLnRhYkNvbnRlbnRDb250YWluZXIucXVlcnlTZWxlY3RvckFsbChcIipcIik7XG4gICAgICAgICAgICBjb25zdCBoZWFkaW5nOiBFbGVtZW50ID0gQXJyYXkucHJvdG90eXBlLmZpbmQuY2FsbChcbiAgICAgICAgICAgICAgICBlbGVtZW50cyxcbiAgICAgICAgICAgICAgICAoZTogRWxlbWVudCkgPT4gZS50ZXh0Q29udGVudCA9PSBwYXJhbWV0ZXJzLnNldHRpbmdzZWN0aW9uXG4gICAgICAgICAgICApO1xuXG4gICAgICAgICAgICBpZiAoaGVhZGluZykge1xuICAgICAgICAgICAgICAgIGhlYWRpbmcuc2Nyb2xsSW50b1ZpZXcoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICB0aGlzLnBsdWdpbi5zdWNjZXNzKHBhcmFtZXRlcnMpO1xuICAgIH1cblxuICAgIGFzeW5jIGhhbmRsZVVwZGF0ZVBsdWdpbnMocGFyYW1ldGVycz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ZXJ5OiBzdHJpbmcpOiBTZWFyY2hNb2RhbERhdGFbXSB7XG4gICAgICAgIGlmIChxdWVyeSA9PT0gXCJcIikge1xuICAgICAgICAgICAgcXVlcnkgPSBcIi4uLlwiO1xuICAgICAgICB9XG4gICAgICAgIGxldCByZWdleDogUmVnRXhwO1xuICAgICAgICB0cnkge1xuICAgICAgICAgICAgcmVnZXggPSBuZXcgUmVnRXhwKHF1ZXJ5KTtcbiAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHt9XG4gICAgICAgIHJldHVybiBbXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgc291cmNlOiBxdWVyeSxcbiAgICAgICAgICAgICAgICBpc1JlZ0V4OiBmYWxzZSxcbiAgICAgICAgICAgICAgICBkaXNwbGF5OiBxdWVyeSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgc291cmNlOiBxdWVyeSxcbiAgICAgICAgICAgICAgICBkaXNwbGF5OiByZWdleCA/IGBBcyBSZWdFeDogJHtxdWVyeX1gIDogYENhbid0IHBhcnNlIFJlZ0V4YCxcbiAgICAgICAgICAgICAgICBpc1JlZ0V4OiB0cnVlLFxuICAgICAgICAgICAgfSxcbiAgICAgICAgXTtcbiAgICB9XG5cbiAgICByZW5kZXJTdWdnZXN0aW9uKHZhbHVlOiBTZWFyY2hNb2RhbERhdGEsIGVsOiBIVE1MRWxlbWVudCk6IHZvaWQge1xuICAgICAgICBlbC5pbm5lclRleHQgPSB2YWx1ZS5kaXNwbGF5O1xuICAgIH1cblxuICAgIG9uQ2hvb3NlU3VnZ2VzdGlvbihcbiAgICAgICAgaXRlbTogU2VhcmNoTW9kYWxEYXRhLFxuICAgICAgICBfOiBNb3VzZUV2ZW50IHwgS2V5Ym9hcmRFdmVudFxuICAgICk6IHZvaWQge31cbn1cbiIsImltcG9ydCB7IEFwcCwgUGx1Z2luU2V0dGluZ1RhYiwgU2V0dGluZyB9IGZyb20gXCJvYnNpZGlhblwiO1xuaW1wb3J0IEFkdmFuY2VkVVJJIGZyb20gXCIuL21haW5cIjtcblxuZXhwb3J0IGNsYXNzIFNldHRpbmdzVGFiIGV4dGVuZHMgUGx1Z2luU2V0dGluZ1RhYiB7XG4gICAgcGx1Z2luOiBBZHZhbmNlZFVSSTtcbiAgICBjb25zdHJ1Y3RvcihhcHA6IEFwcCwgcGx1Z2luOiBBZHZhbmNlZFVSSSkge1xuICAgICAgICBzdXBlcihhcHAsIHBsdWdpbik7XG4gICAgICAgIHRoaXMucGx1Z2luID0gcGx1Z2luO1xuICAgIH1cblxuICAgIGRpc3BsYXkoKTogdm9pZCB7XG4gICAgICAgIGxldCB7IGNvbnRhaW5lckVsIH0gPSB0aGlzO1xuICAgICAgICBjb250YWluZXJFbC5lbXB0eSgpO1xuICAgICAgICBjb250YWluZXJFbC5jcmVhdGVFbChcImgyXCIsIHsgdGV4dDogdGhpcy5wbHVnaW4ubWFuaWZlc3QubmFtZSB9KTtcblxuICAgICAgICBuZXcgU2V0dGluZyhjb250YWluZXJFbCkuc2V0TmFtZShcIk9wZW4gZmlsZSBvbiB3cml0ZVwiKS5hZGRUb2dnbGUoKGNiKSA9PlxuICAgICAgICAgICAgY2JcbiAgICAgICAgICAgICAgICAuc2V0VmFsdWUodGhpcy5wbHVnaW4uc2V0dGluZ3Mub3BlbkZpbGVPbldyaXRlKVxuICAgICAgICAgICAgICAgIC5vbkNoYW5nZSgodmFsdWUpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5wbHVnaW4uc2V0dGluZ3Mub3BlbkZpbGVPbldyaXRlID0gdmFsdWU7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMucGx1Z2luLnNhdmVTZXR0aW5ncygpO1xuICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICk7XG5cbiAgICAgICAgbmV3IFNldHRpbmcoY29udGFpbmVyRWwpXG4gICAgICAgICAgICAuc2V0TmFtZShcIk9wZW4gZmlsZSBvbiB3cml0ZSBpbiBhIG5ldyBwYW5lXCIpXG4gICAgICAgICAgICAuc2V0RGlzYWJsZWQodGhpcy5wbHVnaW4uc2V0dGluZ3Mub3BlbkZpbGVPbldyaXRlKVxuICAgICAgICAgICAgLmFkZFRvZ2dsZSgoY2IpID0+XG4gICAgICAgICAgICAgICAgY2JcbiAgICAgICAgICAgICAgICAgICAgLnNldFZhbHVlKHRoaXMucGx1Z2luLnNldHRpbmdzLm9wZW5GaWxlT25Xcml0ZUluTmV3UGFuZSlcbiAgICAgICAgICAgICAgICAgICAgLm9uQ2hhbmdlKCh2YWx1ZSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5wbHVnaW4uc2V0dGluZ3Mub3BlbkZpbGVPbldyaXRlSW5OZXdQYW5lID0gdmFsdWU7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnBsdWdpbi5zYXZlU2V0dGluZ3MoKTtcbiAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICk7XG5cbiAgICAgICAgbmV3IFNldHRpbmcoY29udGFpbmVyRWwpXG4gICAgICAgICAgICAuc2V0TmFtZShcIk9wZW4gZGFpbHkgbm90ZSBpbiBhIG5ldyBwYW5lXCIpXG4gICAgICAgICAgICAuYWRkVG9nZ2xlKChjYikgPT5cbiAgICAgICAgICAgICAgICBjYlxuICAgICAgICAgICAgICAgICAgICAuc2V0VmFsdWUodGhpcy5wbHVnaW4uc2V0dGluZ3Mub3BlbkRhaWx5SW5OZXdQYW5lKVxuICAgICAgICAgICAgICAgICAgICAub25DaGFuZ2UoKHZhbHVlKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnBsdWdpbi5zZXR0aW5ncy5vcGVuRGFpbHlJbk5ld1BhbmUgPSB2YWx1ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMucGx1Z2luLnNhdmVTZXR0aW5ncygpO1xuICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgKTtcblxuICAgICAgICBuZXcgU2V0dGluZyhjb250YWluZXJFbClcbiAgICAgICAgICAgIC5zZXROYW1lKFwiT3BlbiBmaWxlIHdpdGhvdXQgd3JpdGUgaW4gbmV3IHBhbmVcIilcbiAgICAgICAgICAgIC5hZGRUb2dnbGUoKGNiKSA9PlxuICAgICAgICAgICAgICAgIGNiXG4gICAgICAgICAgICAgICAgICAgIC5zZXRWYWx1ZShcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMucGx1Z2luLnNldHRpbmdzLm9wZW5GaWxlV2l0aG91dFdyaXRlSW5OZXdQYW5lXG4gICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgLm9uQ2hhbmdlKCh2YWx1ZSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5wbHVnaW4uc2V0dGluZ3Mub3BlbkZpbGVXaXRob3V0V3JpdGVJbk5ld1BhbmUgPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5wbHVnaW4uc2F2ZVNldHRpbmdzKCk7XG4gICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICApO1xuXG4gICAgICAgIG5ldyBTZXR0aW5nKGNvbnRhaW5lckVsKVxuICAgICAgICAgICAgLnNldE5hbWUoXCJVc2UgVUlEIGluc3RlYWQgb2YgZmlsZSBwYXRoc1wiKVxuICAgICAgICAgICAgLmFkZFRvZ2dsZSgoY2IpID0+XG4gICAgICAgICAgICAgICAgY2Iuc2V0VmFsdWUodGhpcy5wbHVnaW4uc2V0dGluZ3MudXNlVUlEKS5vbkNoYW5nZSgodmFsdWUpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5wbHVnaW4uc2V0dGluZ3MudXNlVUlEID0gdmFsdWU7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMucGx1Z2luLnNhdmVTZXR0aW5ncygpO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmRpc3BsYXkoKTtcbiAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgKTtcblxuICAgICAgICBpZiAodGhpcy5wbHVnaW4uc2V0dGluZ3MudXNlVUlEKSB7XG4gICAgICAgICAgICBuZXcgU2V0dGluZyhjb250YWluZXJFbClcbiAgICAgICAgICAgICAgICAuc2V0TmFtZShcIkFkZCBmaWxlcGF0aCBwYXJhbWV0ZXJcIilcbiAgICAgICAgICAgICAgICAuc2V0RGVzYyhcbiAgICAgICAgICAgICAgICAgICAgXCJXaGVuIHVzaW5nIFVJRCBpbnN0ZWFkIG9mIGZpbGUgcGF0aHMsIHlvdSBjYW4gc3RpbGwgYWRkIHRoZSBmaWxlcGF0aCBwYXJhbWV0ZXIgdG8ga25vdyB3aGF0IHRoaXMgVVJJIGlzIGFib3V0LiBJdCdzIE5PVCBhY3R1YWxseSB1c2VkLlwiXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgIC5hZGRUb2dnbGUoKGNiKSA9PlxuICAgICAgICAgICAgICAgICAgICBjYlxuICAgICAgICAgICAgICAgICAgICAgICAgLnNldFZhbHVlKHRoaXMucGx1Z2luLnNldHRpbmdzLmFkZEZpbGVwYXRoV2hlblVzaW5nVUlEKVxuICAgICAgICAgICAgICAgICAgICAgICAgLm9uQ2hhbmdlKCh2YWx1ZSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMucGx1Z2luLnNldHRpbmdzLmFkZEZpbGVwYXRoV2hlblVzaW5nVUlEID1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWU7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5wbHVnaW4uc2F2ZVNldHRpbmdzKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgIH1cbiAgICAgICAgbmV3IFNldHRpbmcoY29udGFpbmVyRWwpXG4gICAgICAgICAgICAuc2V0TmFtZShcIlVJRCBmaWVsZCBpbiBmcm9udG1hdHRlclwiKVxuICAgICAgICAgICAgLmFkZFRleHQoKGNiKSA9PlxuICAgICAgICAgICAgICAgIGNiLnNldFZhbHVlKHRoaXMucGx1Z2luLnNldHRpbmdzLmlkRmllbGQpLm9uQ2hhbmdlKCh2YWx1ZSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnBsdWdpbi5zZXR0aW5ncy5pZEZpZWxkID0gdmFsdWU7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMucGx1Z2luLnNhdmVTZXR0aW5ncygpO1xuICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICApO1xuXG4gICAgICAgIG5ldyBTZXR0aW5nKGNvbnRhaW5lckVsKVxuICAgICAgICAgICAgLnNldE5hbWUoXCJBbGxvdyBleGVjdXRpbmcgYXJiaXRyYXJ5IGNvZGUgdmlhIGV2YWxcIilcbiAgICAgICAgICAgIC5zZXREZXNjKFxuICAgICAgICAgICAgICAgIFwi4pqg77iPIFRoaXMgY2FuIGJlIGRhbmdlcm91cyBhcyBpdCBhbGxvd3MgZXhlY3V0aW5nIGFyYml0cmFyeSBjb2RlLiBPbmx5IGVuYWJsZSB0aGlzIGlmIHlvdSB0cnVzdCB0aGUgc291cmNlIG9mIHRoZSBVUklzIHlvdSBhcmUgdXNpbmcgYW5kIGtub3cgd2hhdCB5b3UgYXJlIGRvaW5nLiDimqDvuI9cIlxuICAgICAgICAgICAgKVxuICAgICAgICAgICAgLmFkZFRvZ2dsZSgoY2IpID0+XG4gICAgICAgICAgICAgICAgY2JcbiAgICAgICAgICAgICAgICAgICAgLnNldFZhbHVlKHRoaXMucGx1Z2luLnNldHRpbmdzLmFsbG93RXZhbClcbiAgICAgICAgICAgICAgICAgICAgLm9uQ2hhbmdlKCh2YWx1ZSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5wbHVnaW4uc2V0dGluZ3MuYWxsb3dFdmFsID0gdmFsdWU7XG4gIC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ICAgY29uc3QgaXNZYW1sRW1wdHk6IGJvb2xlYW4gPVxuICAgICAgICAgICAgKCFmcm9udG1hdHRlciB8fCBmcm9udG1hdHRlci5sZW5ndGggPT09IDApICYmXG4gICAgICAgICAgICAhZmlsZUNvbnRlbnQubWF0Y2goL14tezN9XFxzKlxcbipcXHIqLXszfS8pO1xuICAgICAgICBsZXQgc3BsaXRDb250ZW50ID0gZmlsZUNvbnRlbnQuc3BsaXQoXCJcXG5cIik7XG4gICAgICAgIGlmIChpc1lhbWxFbXB0eSkge1xuICAgICAgICAgICAgc3BsaXRDb250ZW50LnVuc2hpZnQoXCItLS1cIik7XG4gICAgICAgICAgICBzcGxpdENvbnRlbnQudW5zaGlmdChgJHt0aGlzLnBsdWdpbi5zZXR0aW5ncy5pZEZpZWxkfTogJHt1aWR9YCk7XG4gICAgICAgICAgICBzcGxpdENvbnRlbnQudW5zaGlmdChcIi0tLVwiKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHNwbGl0Q29udGVudC5zcGxpY2UoXG4gICAgICAgICAgICAgICAgMSxcbiAgICAgICAgICAgICAgICAwLFxuICAgICAgICAgICAgICAgIGAke3RoaXMucGx1Z2luLnNldHRpbmdzLmlkRmllbGR9OiAke3VpZH1gXG4gICAgICAgICAgICApO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgbmV3RmlsZUNvbnRlbnQgPSBzcGxpdENvbnRlbnQuam9pbihcIlxcblwiKTtcbiAgICAgICAgYXdhaXQgYXBwLnZhdWx0Lm1vZGlmeShmaWxlLCBuZXdGaWxlQ29udGVudCk7XG4gICAgICAgIHJldHVybiB1aWQ7XG4gICAgfVxuXG4gICAgYXN5bmMgZ2V0VUlERnJvbUZpbGUoZmlsZTogVEZpbGUpOiBQcm9taXNlPHN0cmluZz4ge1xuICAgICAgICBsZXQgY2FjaGU6IENhY2hlZE1ldGFkYXRhO1xuXG4gICAgICAgIC8vYXdhaXQgcGFyc2luZyBvZiBmcm9udG1hdH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AgICAgICAgaWYgKCF0aGlzLnNldHRpbmdzLmFkZEZpbGVwYXRoV2hlblVzaW5nVUlEKVxuICAgICAgICAgICAgICAgIHBhcmFtZXRlcnMuZmlsZXBhdGggPSB1bmRlZmluZWQ7XG4gICAgICAgICAgICBwYXJhbWV0ZXJzLnVpZCA9IGF3YWl0IHRoaXMuZ2V0VUlERnJvbUZpbGUoZmlsZSk7XG4gICAgICAgIH1cbiAgICAgICAgZm9yIChjb25zdCBwYXJhbWV0ZXIgaW4gcGFyYW1ldGVycykge1xuICAgICAgICAgICAgaWYgKChwYXJhbWV0ZXJzIGFzIGFueSlbcGFyYW1ldGVyXSAhPSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgICAgICBzdWZmaXggPVxuICAgICAgICAgICAgICAgICAgICBzdWZmaXggK1xuICAgICAgICAgICAgICAgICAgICBgJiR7cGFyYW1ldGVyfT0ke2VuY29kZVVSSUNvbXBvbmVudChcbiAgICAgICAgICAgICAgICAgICAgICAgIChwYXJhbWV0ZXJzIGFzIGFueSlbcGFyYW1ldGVyXVxuICAgICAgICAgICAgICAgICAgICApfWA7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgaWYgKGRvdWJsZUVuY29kZSkge1xuICAgICAgICAgICAgcmV0dXJuIHByZWZpeCArIGVuY29kZVVSSShzdWZmaXgpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgcmV0dXJuIHByZWZpeCArIHN1ZmZpeDtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIGFzeW5jIGNvcHlVUkkocGFyYW1ldGVyczogUGFyYW1ldGVycykge1xuICAgICAgICBjb25zdCB1cmkgPSBhd2FpdCB0aGlzLmdlbmVyYXRlVVJJKHBhcmFtZXRlcnMsIHRydWUpO1xuICAgICAgICBhd2FpdCBjb3B5VGV4dCh1cmkpO1xuXG4gICAgICAgIG5ldyBOb3RpY2UoXCJBZHZhbmNlZCBVUkkgY29waWVkIHRvIHlvdXIgY2xpcG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VycmVudC1maWxlXCIsXG4gICAgICAgICAgICBuYW1lOiBcImNvcHkgVVJJIGZvciBmaWxlIHdpdGggb3B0aW9uc1wiLFxuICAgICAgICAgICAgY2FsbGJhY2s6ICgpID0+IHRoaXMuaGFuZGxlcnMuaGFuZGxlQ29weUZpbGVVUkkoZmFsc2UpLFxuICAgICAgICB9KTtcblxuICAgICAgICB0aGlzLmFkZENvbW1hbmQoe1xuICAgICAgICAgICAgaWQ6IFwiY29weS11cmktY3VycmVudC1maWxlLXNpbXBsZVwiLFxuICAgICAgICAgICAgbmFtZTogXCJjb3B5IFVSSSBmb3IgY3VycmVudCBmaWxlXCIsXG4gICAgICAgICAgICBjYWxsYmFjazogKCkgPT4gdGhpcy5oYW5kbGVycy5oYW5kbGVDb3B5RmlsZVVSSSh0cnVlKSxcbiAgICAgICAgfSk7XG5cbiAgICAgICAgdGhpcy5hZGRDb21tYW5kKHtcbiAgICAgICAgICAgIGlkOiBcImNvcHktdXJpLWRhaWx5XCIsXG4gICAgICAgICAgICBuYW1lOiBcImNvcHkgVVJJIGZvciBkYWlseSBub3RlXCIsXG4gICAgICAgICAgICBjYWxsYmFjazogKCkgPT4gbmV3IEVudGVyRGF0YU1vZGFsKHRoaXMpLm9wZW4oKSxcbiAgICAgICAgfSk7XG5cbiAgICAgICAgdGhpcy5hZGRDb21tYW5kKHtcbiAgICAgICAgICAgIGlkOiBcImNvcHktdXJpLXNlYXJjaC1hbmQtcmVwbGFjZVwiLFxuICAgICAgICAgICAgbmFtZTogXCJjb3B5IFVSSSBmb3Igc2VhcmNoIGFuZCByZXBsYWNlXCIsXG4gICAgICAgICAgICBjYWxsYmFjazogKCkgPT4ge1xuICAgICAgICAgICAgICAgIGNvbnN0IGZpbGVNb2RhbCA9IG5ldyBGaWxlTW9kYWwoXG4gICAgICAgICAgICAgICAgICAgIHRoaXMsXG4gICAgICAgICAgICAgICAgICAgIFwiVXNlZCBmaWxlIGZvciBzZWFyY2ggYW5kIHJlcGxhY2VcIlxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgZmlsZU1vZGFsLm9wZW4oKTtcbiAgICAgICAgICAgICAgICBmaWxlTW9kYWwub25DaG9vc2VJdGVtID0gKGZpbGVQYXRoOiBGaWxlTW9kYWxEYXRhKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHNlYXJjaE1vZGFsID0gbmV3IFNlYXJjaE1vZGFsKHRoaXMpO1xuICAgICAgICAgICAgICAgICAgICBzZWFyY2hNb2RhbC5vcGVuKCk7XG4gICAgICAgICAgICAgICAgICAgIHNlYXJjaE1vZGFsLm9uQ2hvb3NlU3VnZ2VzdGlvbiA9IChcbiAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW06IFNlYXJjaE1vZGFsRGF0YVxuICAgICAgICAgICAgICAgICAgICApID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG5ldyBSZXBsYWNlTW9kYWwodGhpcywgaXRlbSwgZmlsZVBhdGg/LnNvdXJjZSkub3BlbigpO1xuICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICB9LFxuICAgICAgICB9KTtcblxuICAgICAgICB0aGlzLmFkZENvbW1hbmQoe1xuICAgICAgICAgICAgaWQ6IFwiY29weS11cmktY29tbWFuZFwiLFxuICAgICAgICAgICAgbmFtZTogXCJjb3B5IFVSSSBmb3IgY29tbWFuZFwiLFxuICAgICAgICAgICAgY2FsbGJhY2s6ICgpID0+IHtcbiAgICAgICAgICAgICAgICBjb25zdCBmaWxlTW9kYWwgPSBuZXcgRmlsZU1vZGFsKFxuICAgICAgICAgICAgICAgICAgICB0aGlzLFxuICAgICAgICAgICAgICAgICAgICBcIlNlbGVjdCBhIGZpbGUgdG8gYmUgb3BlbmVkIGJlZm9yZSBleGVjdXRpbmcgdGhlIGNvbW1hbmRcIlxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgZmlsZU1vZGFsLm9wZW4oKTtcbiAgICAgICAgICAgICAgICBmaWxlTW9kYWwub25DaG9vc2VJdGVtID0gKGl0ZW06IEZpbGVNb2RhbERhdGEpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgbmV3IENvbW1hbmRNb2RhbCh0aGlzLCBpdGVtPy5zb3VyY2UpLm9wZW4oKTtcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgfSxcbiAgICAgICAgfSk7XG5cbiAgICAgICAgdGhpcy5hZGRDb21tYW5kKHtcbiAgICAgICAgICAgIGlkOiBcImNvcHktdXJpLWJsb2NrXCIsXG4gICAgICAgICAgICBuYW1lOiBcImNvcHkgVVJJIGZvciBjdXJyZW50IGJsb2NrXCIsXG4gICAgICAgICAgICBjaGVja0NhbGxiYWNrOiAoY2hlY2tpbmcpID0+IHtcbiAgICAgICAgICAgICAgICBjb25zdCB2aWV3ID1cbiAgICAgICAgICAgICAgICAgICAgdGhpcy5hcHAud29ya3NwYWNlLmdldEFjdGl2ZVZpZXdPZlR5cGUoTWFya2Rvd25WaWV3KTtcbiAgICAgICAgICAgICAgICBpZiAoY2hlY2tpbmcpIHJldHVybiB2aWV3ICE9IHVuZGVmaW5lZDtcbiAgICAgICAgICAgICAgICBjb25zdCBpZCA9IEJsb2NrVXRpbHMuZ2V0QmxvY2tJZCgpO1xuICAgICAgICAgICAgICAgIGlmIChpZCkge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnRvb2xzLmNvcHlVUkkoe1xuICAgICAgICAgICAgICAgICAgICAgICAgZmlsZXBhdGg6IHZpZXcuZmlsZS5wYXRoLFxuICAgICAgICAgICAgICAgICAgICAgICAgYmxvY2s6IGlkLFxuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9LFxuICAgICAgICB9KTtcblxuICAgICAgICB0aGlzLnJlZ2lzdGVyT2JzaWRpYW5Qcm90b2NvbEhhbmRsZXIoXCJhZHZhbmNlZC11cmlcIiwgYXN5bmMgKGUpID0+IHtcbiAgICAgICAgICAgIGNvbnN0IHBhcmFtZXRlcnMgPSBlIGFzIHVua25vd24gYXMgUGFyYW1ldGVycztcblxuICAgICAgICAgICAgLyoqIEFsbG93cyB3cml0aW5nIHRvIG5ldyBjcmVhdGVkIGRhaWx5IG5vdGUgd2l0aG91dCBhbnkgYFBhcmFtZXRlcnMubW9kZWAgKi9cbiAgICAgICAgICAgIGxldCBjcmVhdGVkRGFpbHlOb3RlID0gZmFsc2U7XG4gICAgICAgICAgICBmb3IgKGNvbnN0IHBhcmFtZXRlciBpbiBwYXJhbWV0ZXJzKSB7XG4gICAgICAgICAgICAgICAgKHBhcmFtZXRlcnMgYXMgYW55KVtwYXJhbWV0ZXJdID0gZGVjb2RlVVJJQ29tcG9uZW50KFxuICAgICAgICAgICAgICAgICAgICAocGFyYW1ldGVycyBhcyBhbnkpW3BhcmFtZXRlcl1cbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdGhpcy5sYXN0UGFyYW1ldGVycyA9IHsgLi4ucGFyYW1ldGVycyB9O1xuICAgICAgICAgICAgaWYgKHBhcmFtZXRlcnMudWlkKSB7XG4gICAgICAgICAgICAgICAgY29uc3QgcmVzID0gdGhpcy5nZXRGaWxlRnJvbVVJRChwYXJhbWV0ZXJzLnVpZCk/LnBhdGg7XG4gICAgICAgICAgICAgICAgaWYgKHJlcyAhPSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgcGFyYW1ldGVycy5maWxlcGF0aCA9IHJlcztcbiAgICAgICAgICAgICAgICAgICAgcGFyYW1ldGVycy51aWQgPSB1bmRlZmluZWQ7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIGlmIChwYXJhbWV0ZXJzLmZpbGVuYW1lKSB7XG4gICAgICAgICAgICAgICAgbGV0IGZpbGUgPSB0aGlzLmFwcC5tZXRhZGF0YUNhY2hlLmdldEZpcnN0TGlua3BhdGhEZXN0KFxuICAgICAgICAgICAgICAgICAgICBwYXJhbWV0ZXJzLmZpbGVuYW1lLFxuICAgICAgICAgICAgICAgICAgICBcIlwiXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICBpZiAoIWZpbGUpIHtcbiAgICAgICAgICAgICAgICAgICAgZmlsZSA9IHRoaXMuYXBwLnZhdWx0XG4gICAgICAgICAgICAgICAgICAgICAgICAuZ2V0TWFya2Rvd25GaWxlcygpXG4gICAgICAgICAgICAgICAgICAgICAgICAuZmluZCgoZmlsZSkgPT5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJzZUZyb250TWF0dGVyQWxpYXNlcyhcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5hcHAubWV0YWRhdGFDYWNoZS5nZXRGaWxlQ2FjaGUoZmlsZSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5mcm9udG1hdHRlclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICk/LmluY2x1ZGVzKHBhcmFtZXRlcnMuZmlsZW5hbWUpXG4gICAgICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBjb25zdCBwYXJlbnRGb2xkZXIgPSB0aGlzLmFwcC5maWxlTWFuYWdlci5nZXROZXdGaWxlUGFyZW50KFxuICAgICAgICAgICAgICAgICAgICB0aGlzLmFwcC53b3Jrc3BhY2UuYWN0aXZlTGVhZi52aWV3LmZpbGU/LnBhdGhcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIGNvbnN0IHBhcmVudEZvbGRlclBhdGggPSBwYXJlbnRGb2xkZXIuaXNSb290KClcbiAgICAgICAgICAgICAgICAgICAgPyBcIlwiXG4gICAgICAgICAgICAgICAgICAgIDogcGFyZW50Rm9sZGVyLnBhdGggKyBcIi9cIjtcbiAgICAgICAgICAgICAgICBwYXJhbWV0ZXJzLmZpbGVwYXRoID1cbiAgICAgICAgICAgICAgICAgICAgZmlsZT8ucGF0aCA/P1xuICAgICAgICAgICAgICAgICAgICBwYXJlbnRGb2xkZXJQYXRoICsgbm9ybWFsaXplUGF0aChwYXJhbWV0ZXJzLmZpbGVuYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChwYXJhbWV0ZXJzLmZpbGVwYXRoKSB7XG4gICAgICAgICAgICAgICAgcGFyYW1ldGVycy5maWxlcGF0aCA9IG5vcm1hbGl6ZVBhdGgocGFyYW1ldGVycy5maWxlcGF0aCk7XG4gICAgICAgICAgICAgICAgY29uc3QgaW5kZXggPSBwYXJhbWV0ZXJzLmZpbGVwYXRoLmxhc3RJbmRleE9mKFwiLlwiKTtcbiAgICAgICAgICAgICAgICBjb25zdCBleHRlbnNpb24gPSBwYXJhbWV0ZXJzLmZpbGVwYXRoLnN1YnN0cmluZyhcbiAgICAgICAgICAgICAgICAgICAgaW5kZXggPCAwID8gcGFyYW1ldGVycy5maWxlcGF0aC5sZW5ndGggOiBpbmRleFxuICAgICAgICAgICAgICAgICk7XG5cbiAgICAgICAgICAgICAgICBpZiAoZXh0ZW5zaW9uID09PSBcIlwiKSB7XG4gICAgICAgICAgICAgICAgICAgIHBhcmFtZXRlcnMuZmlsZXBhdGggPSBwYXJhbWV0ZXJzLmZpbGVwYXRoICsgXCIubWRcIjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2UgaWYgKHBhcmFtZXRlcnMuZGFpbHkgPT09IFwidHJ1ZVwiKSB7XG4gICAgICAgICAgICAgICAgaWYgKCFhcHBIYXNEYWlseU5vdGVzUGx1Z2luTG9hZGVkKCkpIHtcbiAgICAgICAgICAgICAgICAgICAgbmV3IE5vdGljZShcIkRhaWx5IG5vdGVzIHBsdWdpbiBpcyBub3QgbG9hZGVkXCIpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGNvbnN0IG1vbWVudCA9IHdpbmRvdy5tb21lbnQoRGF0ZS5ub3coKSk7XG4gICAgICAgICAgICAgICAgY29uc3QgYWxsRGFpbHlOb3RlcyA9IGdldEFsbERhaWx5Tm90ZXMoKTtcbiAgICAgICAgICAgICAgICBsZXQgZGFpbHlOb3RlID0gZ2V0RGFpbHlOb3RlKG1vbWVudCwgYWxsRGFpbHlOb3Rlcyk7XG4gICAgICAgICAgICAgICAgaWYgKCFkYWlseU5vdGUpIHtcbiAgICAgICAgICAgICAgICAgICAgLy8vIFByZXZlbnQgZGFpbHkgbm90ZSBmcm9tIGJlaW5nIGNyZWF0ZWQgb24gZXhpc3RpbmcgY2hlY2tcbiAgICAgICAgICAgICAgICAgICAgaWYgKHBhcmFtZXRlcnMuZXhpc3RzID09PSBcInRydWVcIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgcGFyYW1ldGVycy5maWxlcGF0aCA9IGF3YWl0IGdldERhaWx5Tm90ZVBhdGgobW9tZW50KTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGRhaWx5Tm90ZSA9IGF3YWl0IGNyZWF0ZURhaWx5Tm90ZShtb21lbnQpO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBkZWxheSB0byBsZXQgT2JzaWRpYW4gaW5kZXggYW5kIGdlbmVyYXRlIENhY2hlZE1ldGFkYXRhXG4gICAgICAgICAgICAgICAgICAgICAgICBhd2FpdCBuZXcgUHJvbWlzZSgocikgPT4gc2V0VGltZW91dChyLCA1MDApKTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgY3JlYXRlZERhaWx5Tm90ZSA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKGRhaWx5Tm90ZSAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAgICAgICAgIHBhcmFtZXRlcnMuZmlsZXBhdGggPSBkYWlseU5vdGUucGF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oYW5kbGVycy5oYW5kbGVTZWFyY2gocGFyYW1ldGVycyk7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKHBhcmFtZXRlcnMuZmlsZXBhdGgpIHtcbiAgICAgICAgICAgICAgICB0aGlzLmhhbmRsZXJzLmhhbmRsZU9wZW4ocGFyYW1ldGVycyk7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKHBhcmFtZXRlcnMuc2V0dGluZ2lkKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5oYW5kbGVycy5oYW5kbGVPcGVuU2V0dGluZ3MocGFyYW1ldGVycyk7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKHBhcmFtZXRlcnMudXBkYXRlcGx1Z2lucykge1xuICAgICAgICAgICAgICAgIHRoaXMuaGFuZGxlcnMuaGFuZGxlVXBkYXRlUGx1Z2lucyhwYXJhbWV0ZXJzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgICAgIHRoaXMucmVnaXN0ZXJPYnNpZGlhblByb3RvY29sSGFuZGxlcihcbiAgICAgICAgICAgIFwiaG9vay1nZXQtYWR2YW5jZWQtdXJpXCIsXG4gICAgICAgICAgICBhc3luYyAoZSkgPT4ge1xuICAgICAgICAgICAgICAgIGNvbnN0IHBhcmFtZXRlcnMgPSBlIGFzIHVua25vd24gYXMgSG9va1BhcmFtZXRlcnM7XG4gICAgICAgICAgICAgICAgZm9yIChjb25zdCBwYXJhbWV0ZXIgaW4gcGFyYW1ldGVycykge1xuICAgICAgICAgICAgICAgICAgICAocGFyYW1ldGVycyBhcyBhbnkpW3BhcmFtZXRlcl0gPSBkZWNvZGVVUklDb21wb25lbnQoXG4gICAgICAgICAgICAgICAgICAgICAgICAocGFyYW1ldGVycyBhcyBhbnkpW3BhcmFtZXRlcl1cbiAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgY29uc3QgYWN0aXZlTGVhZiA9IHRoaXMuYXBwLndvcmtzcGFjZS5hY3RpdmVMZWFmO1xuICAgICAgICAgICAgICAgIGNvbnN0IGZpbGUgPSBhY3RpdmVMZWFmLnZpZXcuZmlsZTtcbiAgICAgICAgICAgICAgICBpZiAoYWN0aXZlTGVhZiAmJiBmaWxlKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuaG9va1N1Y2Nlc3MocGFyYW1ldGVycywgZmlsZSk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5mYWlsdXJlKHBhcmFtZXRlcnMsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGVycm9yTWVzc2FnZTogXCJObyBmaWxlIG9wZW5lZFwiLFxuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICk7XG5cbiAgICAgICAgdGhpcy5yZWdpc3RlckV2ZW50KFxuICAgICAgICAgICAgdGhpcy5hcHAud29ya3NwYWNlLm9uKFwiZmlsZS1tZW51XCIsIChtZW51LCBmaWxlLCBzb3VyY2UpID0+IHtcbiAgICAgICAgICAgICAgICBjb25zb2xlLmxvZyhzb3VyY2UpO1xuXG4gICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAhKFxuICAgICAgICAgICAgICAgICAgICAgICAgc291cmNlID09PSBcIm1vcmUtb3B0aW9uc1wiIHx8XG4gICAgICAgICAgICAgICAgICAgICAgICBzb3VyY2UgPT09IFwidGFiLWhlYWRlclwiIHx8XG4gICAgICAgICAgICAgICAgICAgICAgICBzb3VyY2UgPT0gXCJmaWxlLWV4cGxvcmVyLWNvbnRleHQtbWVudVwiXG4gICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmICghKGZpbGUgaW5zdGFuY2VvZiBURmlsZSkpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIG1lbnUuYWRkSXRlbSgoaXRlbSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBpdGVtLnNldFRpdGxlKGBDb3B5IEFkdmFuY2VkIFVSSWApXG4gICAgICAgICAgICAgICAgICAgICAgICAuc2V0SWNvbihcImxpbmtcIilcbiAgICAgICAgICAgICAgICAgICAgICAgIC5zZXRTZWN0aW9uKFwiaW5mb1wiKVxuICAgICAgICAgICAgICAgICAgICAgICAgLm9uQ2xpY2soKF8pID0+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5oYW5kbGVycy5oYW5kbGVDb3B5RmlsZVVSSSh0cnVlLCBmaWxlKVxuICAgICAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0pXG4gICAgICAgICk7XG4gICAgfVxuXG4gICAgYXN5bmMgaG9va1N1Y2Nlc3MocGFyYW1ldGVyczogUGFyYW1ldGVycywgZmlsZTogVEZpbGUpOiBQcm9taXNlPHZvaWQ+IHtcbiAgICAgICAgaWYgKCFwYXJhbWV0ZXJzW1wieC1zdWNjZXNzXCJdKSByZXR1cm47XG5cbiAgICAgICAgY29uc3Qgb3B0aW9ucyA9IHtcbiAgICAgICAgICAgIHRpdGxlOiBzdHJpcE1EKGZpbGUubmFtZSksXG4gICAgICAgICAgICBhZHZhbmNlZHVyaTogYXdhaXQgdGhpcy50b29scy5nZW5lcmF0ZVVSSShcbiAgICAgICAgICAgICAgICB7IGZpbGVwYXRoOiBmaWxlLnBhdGggfSxcbiAgICAgICAgICAgICAgICBmYWxzZVxuICAgICAgICAgICAgKSxcbiAgICAgICAgICAgIHVybGtleTogXCJhZHZhbmNlZHVyaVwiLFxuICAgICAgICAgICAgZmlsZXVyaTogZ2V0RmlsZVVyaShmaWxlKSxcbiAgICAgICAgfTtcbiAgICAgICAgdG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IHRoaXMuYXBwLnZhdWx0LmdldEZpbGVzKCk7XG4gICAgICAgIGNvbnN0IGlkS2V5ID0gdGhpcy5zZXR0aW5ncy5pZEZpZWxkO1xuICAgICAgICByZXR1cm4gZmlsZXMuZmluZChcbiAgICAgICAgICAgIChmaWxlKSA9PlxuICAgICAgICAgICAgICAgIHBhcnNlRnJvbnRNYXR0ZXJFbnRyeShcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5hcHAubWV0YWRhdGFDYWNoZS5nZXRGaWxlQ2FjaGUoZmlsZSk/LmZyb250bWF0dGVyLFxuICAgICAgICAgICAgICAgICAgICBpZEtleVxuICAgICAgICAgICAgICAgICkgPT0gdWlkXG4gICAgICAgICk7XG4gICAgfVxuXG4gICAgYXN5bmMgYXBwZW5kKGZpbGU6IFRGaWxlIHwgc3RyaW5nLCBwYXJhbWV0ZXJzOiBQYXJhbWV0ZXJzKTogUHJvbWlzZTxURmlsZT4ge1xuICAgICAgICBsZXQgcGF0aDogc3RyaW5nO1xuICAgICAgICBsZXQgZGF0YVRvV3JpdGU6IHN0cmluZztcbiAgICAgICAgaWYgKHBhcmFtZXRlcnMuaGVhZGluZykge1xuICAgICAgICAgICAgaWYgKGZpbGUgaW5zdGFuY2VvZiBURmlsZSkge1xuICAgICAgICAgICAgICAgIHBhdGggPSBmaWxlLnBhdGg7XG4gICAgICAgICAgICAgICAgY29uc3QgbGluZSA9IGdldEVuZEFuZEJlZ2lubmluZ09mSGVhZGluZyhcbiAgICAgICAgICAgICAgICAgICAgZmlsZSxcbiAgICAgICAgICAgICAgICAgICAgcGFyYW1ldGVycy5oZWFkaW5nXG4gICAgICAgICAgICAgICAgKT8ubGFzdExpbmU7XG4gICAgICAgICAgICAgICAgaWYgKGxpbmUgPT09IHVuZGVmaW5lZCkgcmV0dXJuO1xuXG4gICAgICAgICAgICAgICAgY29uc3QgZGF0YSA9IGF3YWl0IHRoaXMuYXBwLnZhdWx0LnJlYWQoZmlsZSk7XG4gICAgICAgICAgICAgICAgY29uc3QgbGluZXMgPSBkYXRhLnNwbGl0KFwiXFxuXCIpO1xuXG4gICAgICAgICAgICAgICAgbGluZXMuc3BsaWNlKGxpbmUsIDAsIC4uLnBhcmFtZXRlcnMuZGF0YS5zcGxpdChcIlxcblwiKSk7XG4gICAgICAgICAgICAgICAgZGF0YVRvV3JpdGUgPSBsaW5lcy5qb2luKFwiXFxuXCIpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgbGV0IGZpbGVEYXRhOiBzdHJpbmc7XG4gICAgICAgICAgICBpZiAoZmlsZSBpbnN0YW5jZW9mIFRGaWxlKSB7XG4gICAgICAgICAgICAgICAgZmlsZURhdGEgPSBhd2FpdCB0aGlzLmFwcC52YXVsdC5yZWFkKGZpbGUpO1xuICAgICAgICAgICAgICAgIHBhdGggPSBmaWxlLnBhdGg7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHBhdGggPSBmaWxlO1xuICAgICAgICAgICAgICAgIGZpbGVEYXRhID0gXCJcIjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGRhdGFUb1dyaXRlID0gZmlsZURhdGEgKyBcIlxcblwiICsgcGFyYW1ldGVycy5kYXRhO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB0aGlzLndyaXRlQW5kT3BlbkZpbGUocGF0aCwgZGF0YVRvV3JpdGUsIHBhcmFtZXRlcnMpO1xuICAgIH1cblxuICAgIGFzeW5jIHByZXBlbmQoXG4gICAgICAgIGZpbGU6IFRGaWxlIHwgc3RyaW5nLFxuICAgICAgICBwYXJhbWV0ZXJzOiBQYXJhbWV0ZXJzXG4gICAgKTogUHJvbWlzZTxURmlsZT4ge1xuICAgICAgICBsZXQgcGF0aDogc3RyaW5nO1xuICAgICAgICBsZXQgZGF0YVRvV3JpdGU6IHN0cmluZztcbiAgICAgICAgaWYgKHBhcmFtZXRlcnMuaGVhZGluZykge1xuICAgICAgICAgICAgaWYgKGZpbGUgaW5zdGFuY2VvZiBURmlsZSkge1xuICAgICAgICAgICAgICAgIHBhdGggPSBmaWxlLnBhdGg7XG4gICAgICAgICAgICAgICAgY29uc3QgbGluZSA9IGdldEVuZEFuZEJlZ2lubmluZ09mSGVhZGluZyhcbiAgICAgICAgICAgICAgICAgICAgZmlsZSxcbiAgICAgICAgICAgICAgICAgICAgcGFyYW1ldGVycy5oZWFkaW5nXG4gICAgICAgICAgICAgICAgKT8uZmlyc3RMaW5lO1xuICAgICAgICAgICAgICAgIGlmIChsaW5lID09PSB1bmRlZmluZWQpIHJldHVybjtcblxuICAgICAgICAgICAgICAgIGNvbnN0IGRhdGEgPSBhd2FpdCB0aGlzLmFwcC52YXVsdC5yZWFkKGZpbGUpO1xuICAgICAgICAgICAgICAgIGNvbnN0IGxpbmVzID0gZGF0YS5zcGxpdChcIlxcblwiKTtcblxuICAgICAgICAgICAgICAgIGxpbmVzLnNwbGljZShsaW5lLCAwLCAuLi5wYXJhbWV0ZXJzLmRhdGEuc3BsaXQoXCJcXG5cIikpO1xuICAgICAgICAgICAgICAgIGRhdGFUb1dyaXRlID0gbGluZXMuam9pbihcIlxcblwiKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGlmIChmaWxlIGluc3RhbmNlb2YgVEZpbGUpIHtcbiAgICAgICAgICAgICAgICBjb25zdCBmaWxlRGF0YSA9IGF3YWl0IHRoaXMuYXBwLnZhdWx0LnJlYWQoZmlsZSk7XG4gICAgICAgICAgICAgICAgY29uc3QgY2FjaGUgPSB0aGlzLmFwcC5tZXRhZGF0YUNhY2hlLmdldEZpbGVDYWNoZShmaWxlKTtcblxuICAgICAgICAgICAgICAgIGlmIChjYWNoZS5mcm9udG1hdHRlcikge1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBsaW5lID0gY2FjaGUuZnJvbnRtYXR0ZXIucG9zaXRpb24uZW5kLmxpbmU7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IGZpcnN0ID0gZmlsZURhdGFcbiAgICAgICAgICAgICAgICAgICAgICAgIC5zcGxpdChcIlxcblwiKVxuICAgICAgICAgICAgICAgICAgICAgICAgLnNsaWNlKDAsIGxpbmUgKyAxKVxuICAgICAgICAgICAgICAgICAgICAgICAgLmpvaW4oXCJcXG5cIik7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IGxhc3QgPSBmaWxlRGF0YVxuICAgICAgICAgICAgICAgICAgICAgICAgLnNwbGl0KFwiXFxuXCIpXG4gICAgICAgICAgICAgICAgICAgICAgICAuc2xpY2UobGluZSArIDEpXG4gICAgICAgICAgICAgICAgICAgICAgICAuam9pbihcIlxcblwiKTtcbiAgICAgICAgICAgICAgICAgICAgZGF0YVRvV3JpdGUgPSBmaXJzdCArIFwiXFxuXCIgKyBwYXJhbWV0ZXJzLmRhdGEgKyBcIlxcblwiICsgbGFzdDtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBkYXRhVG9Xcml0ZSA9IHBhcmFtZXRlcnMuZGF0YSArIFwiXFxuXCIgKyBmaWxlRGF0YTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcGF0aCA9IGZpbGUucGF0aDtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgcGF0aCA9IGZpbGU7XG4gICAgICAgICAgICAgICAgZGF0YVRvV3JpdGUgPSBwYXJhbWV0ZXJzLmRhdGE7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gdGhpcy53cml0ZUFuZE9wZW5GaWxlKHBhdGgsIGRhdGFUb1dyaXRlLCBwYXJhbWV0ZXJzKTtcbiAgICB9XG5cbiAgICBhc3luYyB3cml0ZUFuZE9wZW5GaWxlKFxuICAgICAgICBvdXRwdXRGaWxlTmFtZTogc3RyaW5nLFxuICAgICAgICB0ZXh0OiBzdHJpbmcsXG4gICAgICAgIHBhcmFtZXRlcnM6IFBhcmFtZXRlcnNcbiAgICApOiBQcm9taXNlPFRGaWxlPiB7XG4gICAgICAgIGNvbnN0IGZpbGUgPSB0aGlzLmFwcC52YXVsdC5nZXRBYnN0cmFjdEZpbGVCeVBhdGgob3V0cHV0RmlsZU5hbWUpO1xuXG4gICAgICAgIGlmIChmaWxlIGluc3RhbmNlb2YgVEZpbGUpIHtcbiAgICAgICAgICAgIGF3YWl0IHRoaXMuYXBwLnZhdWx0Lm1vZGlmeShmaWxlLCB0ZXh0KTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGNvbnN0IHBhcnRzID0gb3V0cHV0RmlsZU5hbWUuc3BsaXQoXCIvXCIpO1xuICAgICAgICAgICAgY29uc3QgZGlyID0gcGFydHMuc2xpY2UoMCwgcGFydHMubGVuZ3RoIC0gMSkuam9pbihcIi9cIik7XG4gICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgcGFydHMubGVuZ3RoID4gMSAmJlxuICAgICAgICAgICAgICAgICEodGhpcy5hcHAudmF1bHQuZ2V0QWJzdHJhY3RGaWxlQnlQYXRoKGRpcikgaW5zdGFuY2VvZiBURm9sZGVyKVxuICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgYXdhaXQgdGhpcy5hcHAudmF1bHQuY3JlYXRlRm9sZGVyKGRpcik7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjb25zdCBiYXNlNjRyZWdleCA9XG4gICAgICAgICAgICAgICAgL14oWzAtOWEtekEtWisvXXs0fSkqKChbMC05YS16QS1aKy9dezJ9PT0pfChbMC05YS16QS1aKy9dezN9PSkpPyQvO1xuICAgICAgICAgICAgaWYgKGJhc2U2NHJlZ2V4LnRlc3QodGV4dCkpIHtcbiAgICAgICAgICAgICAgICBhd2FpdCB0aGlzLmFwcC52YXVsdC5jcmVhdGVCaW5hcnkoXG4gICAgICAgICAgICAgICAgICAgIG91dHB1dEZpbGVOYW1lLFxuICAgICAgICAgICAgICAgICAg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G4gICAgICAgIGZpbGUsXG4gICAgICAgIHNldHRpbmcsXG4gICAgICAgIHBhcmFtZXRlcnMsXG4gICAgICAgIHN1cHBvcnRQb3BvdmVyLFxuICAgICAgICBtb2RlLFxuICAgIH06IHtcbiAgICAgICAgZmlsZTogc3RyaW5nIHwgVEZpbGU7XG4gICAgICAgIHNldHRpbmc/OiBib29sZWFuO1xuICAgICAgICBwYXJhbWV0ZXJzOiBQYXJhbWV0ZXJzO1xuICAgICAgICBzdXBwb3J0UG9wb3Zlcj86IGJvb2xlYW47XG4gICAgICAgIG1vZGU/OiBcInNvdXJjZVwiO1xuICAgIH0pOiBQcm9taXNlPHZvaWQ+IHtcbiAgICAgICAgaWYgKHBhcmFtZXRlcnMub3Blbm1vZGUgPT0gXCJwb3BvdmVyXCIgJiYgKHN1cHBvcnRQb3BvdmVyID8/IHRydWUpKSB7XG4gICAgICAgICAgICBjb25zdCBob3ZlckVkaXRvciA9XG4gICAgICAgICAgICAgICAgdGhpcy5hcHAucGx1Z2lucy5wbHVnaW5zW1wib2JzaWRpYW4taG92ZXItZWRpdG9yXCJdO1xuICAgICAgICAgICAgaWYgKCFob3ZlckVkaXRvcikge1xuICAgICAgICAgICAgICAgIG5ldyBOb3RpY2UoXG4gICAgICAgICAgICAgICAgICAgIFwiQ2Fubm90IGZpbmQgSG92ZXIgRWRpdG9yIHBsdWdpbi4gUGxlYXNlIGZpbGUgYW4gaXNzdWUuXCJcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIHRoaXMuZmFpbHVyZShwYXJhbWV0ZXJzKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgY29uc3QgbGVhZiA9IGhvdmVyRWRpdG9yLnNwYXduUG9wb3Zlcih1bmRlZmluZWQsICgpID0+IHtcbiAgICAgICAgICAgICAgICB0aGlzLmFwcC53b3Jrc3BhY2Uuc2V0QWN0aXZlTGVhZihsZWFmLCB7IGZvY3VzOiB0cnVlIH0pO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBjb25zdCB0ZmlsZSA9XG4gICAgICAgICAgICAgICAgZmlsZSBpbnN0YW5jZW9mIFRGaWxlXG4gICAgICAgICAgICAgICAgICAgID8gZmlsZVxuICAgICAgICAgICAgICAgICAgICA6ICh0aGlzLmFwcC52YXVsdC5nZXRBYnN0cmFjdEZpbGVCeVBhdGgoZmlsZSkgYXMgVEZpbGUpO1xuICAgICAgICAgICAgbGVhZi5vcGVuRmlsZSh0ZmlsZSk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBsZXQgb3Blbk1vZGU6IE9wZW5Nb2RlIHwgYm9vbGVhbiA9IHNldHRpbmc7XG4gICAgICAgICAgICBpZiAocGFyYW1ldGVycy5uZXdwYW5lICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgICAgICBvcGVuTW9kZSA9IHBhcmFtZXRlcnMubmV3cGFuZSA9PSBcInRydWVcIjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChwYXJhbWV0ZXJzLm9wZW5tb2RlICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgIHBhcmFtZXRlcnMub3Blbm1vZGUgPT0gXCJ0cnVlXCIgfHxcbiAgICAgICAgICAgICAgICAgICAgcGFyYW1ldGVycy5vcGVubW9kZSA9PSBcImZhbHNlXCJcbiAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgb3Blbk1vZGUgPSBwYXJhbWV0ZXJzLm9wZW5tb2RlID09IFwidHJ1ZVwiO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAocGFyYW1ldGVycy5vcGVubW9kZSA9PSBcInBvcG92ZXJcIikge1xuICAgICAgICAgICAgICAgICAgICBvcGVuTW9kZSA9IGZhbHNlO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIG9wZW5Nb2RlID0gcGFyYW1ldGVycy5vcGVubW9kZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAob3Blbk1vZGUgPT0gXCJzaWxlbnRcIikge1xuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgbGV0IGZpbGVJc0FscmVhZHlPcGVuZWQgPSBmYWxzZTtcbiAgICAgICAgICAgIGlmIChpc0Jvb2xlYW4ob3Blbk1vZGUpKSB7XG4gICAgICAgICAgICAgICAgYXBwLndvcmtzcGFjZS5pdGVyYXRlQWxsTGVhdmVzKChsZWFmKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChsZWFmLnZpZXcuZmlsZT8ucGF0aCA9PT0gcGFyYW1ldGVycy5maWxlcGF0aCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGZpbGVJc0FscmVhZHlPcGVuZWQgJiYgbGVhZi53aWR0aCA9PSAwKSByZXR1cm47XG4gICAgICAgICAgICAgICAgICAgICAgICBmaWxlSXNBbHJlYWR5T3BlbmVkID0gdHJ1ZTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgYXBwLndvcmtzcGFjZS5zZXRBY3RpdmVMZWFmKGxlYWYsIHsgZm9jdXM6IHRydWUgfSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiB0aGlzLmFwcC53b3Jrc3BhY2Uub3BlbkxpbmtUZXh0KFxuICAgICAgICAgICAgICAgIGZpbGUgaW5zdGFuY2VvZiBURmlsZSA/IGZpbGUucGF0aCA6IGZpbGUsXG4gICAgICAgICAgICAgICAgXCIvXCIsXG4gICAgICAgICAgICAgICAgZmlsZUlzQWxyZWFkeU9wZW5lZCA/IGZhbHNlIDogb3Blbk1vZGUsXG4gICAgICAgICAgICAgICAgbW9kZSAhPSB1bmRlZmluZWRcbiAgICAgICAgICAgICAgICAgICA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plugins/obsidian-advanced-uri/manifest.json index 371ef77a..b76c4466 100644 --- a/.obsidian/plugins/obsidian-advanced-uri/manifest.json +++ b/.obsidian/plugins/obsidian-advanced-uri/manifest.json @@ -5,7 +5,7 @@ "isDesktopOnly": false, "js": "main.js", "fundingUrl": "https://ko-fi.com/vinzent", - "version": "1.33.0", + "version": "1.33.3", "author": "Vinzent", "authorUrl": "https://github.com/Vinzent03" } diff --git a/.obsidian/plugins/obsidian-commits/data.json b/.obsidian/plugins/obsidian-commits/data.json index cb70d4a7..28d8cf4f 100644 --- a/.obsidian/plugins/obsidian-commits/data.json +++ b/.obsidian/plugins/obsidian-commits/data.json @@ -1580,7 +1580,7 @@ "links": 1 }, "01.02 Home/Household.md": { - "size": 3715, + "size": 4513, "tags": 2, "links": 2 }, @@ -1849,11 +1849,6 @@ "tags": 1, "links": 2 }, - "03.03 Food & Wine/Brown Butter Farro with Mushrooms & Burrata - The Original Dish.md": { - "size": 3274, - "tags": 1, - "links": 2 - }, "05.01 Computer setup/iSH.md": { "size": 1701, "tags": 3, @@ -3402,12 +3397,12 @@ "03.04 Cinematheque/Batman (1989).md": { "size": 1963, "tags": 0, - "links": 4 + "links": 7 }, "03.04 Cinematheque/Batman Returns (1992).md": { "size": 1989, "tags": 0, - "links": 4 + "links": 7 }, "03.04 Cinematheque/For a Few Dollars More (1965).md": { "size": 1982, @@ -3662,7 +3657,7 @@ "03.04 Cinematheque/Batman Forever (1995).md": { "size": 1984, "tags": 0, - "links": 4 + "links": 7 }, "00.03 News/The messages that survived civilisation's collapse.md": { "size": 30338, @@ -3807,7 +3802,7 @@ "03.04 Cinematheque/Batman Robin (1997).md": { "size": 1982, "tags": 0, - "links": 4 + "links": 7 }, "00.03 News/U.K. braced for death of Queen Elizabeth II. It still came as a shock..md": { "size": 9904, @@ -7480,14 +7475,14 @@ "links": 0 }, "00.01 Admin/Calendars/Events/2023-03-11 England - France.md": { - "size": 111, + "size": 211, "tags": 0, - "links": 0 + "links": 2 }, "00.01 Admin/Calendars/Events/2023-03-18 France - Wales.md": { - "size": 109, + "size": 213, "tags": 0, - "links": 0 + "links": 2 }, "00.01 Admin/Calendars/Events/2023-01-27 Madrid.md": { "size": 362, @@ -8826,8 +8821,8 @@ }, "00.03 News/The Untold Story Of Notorious Influencer Andrew Tate.md": { "size": 40271, - "tags": 4, - "links": 1 + "tags": 5, + "links": 2 }, "00.03 News/An Icelandic Town Goes All Out to Save Baby Puffins.md": { "size": 29531, @@ -8861,7 +8856,7 @@ }, "00.01 Admin/Calendars/2023-03-14.md": { "size": 1412, - "tags": 0, + "tags": 1, "links": 6 }, "03.04 Cinematheque/John Wick - Chapter 3 - Parabellum (2019).md": { @@ -8879,11 +8874,6 @@ "tags": 0, "links": 2 }, - "03.03 Food & Wine/Korean Barbecue-Style Meatballs Recipe.md": { - "size": 2902, - "tags": 2, - "links": 2 - }, "00.01 Admin/Calendars/2023-03-16.md": { "size": 1412, "tags": 0, @@ -8892,7 +8882,7 @@ "00.01 Admin/Calendars/2023-03-17.md": { "size": 1412, "tags": 0, - "links": 5 + "links": 6 }, "03.01 Reading list/The Power And The Glory.md": { "size": 1010, @@ -8913,14 +8903,144 @@ "size": 975, "tags": 1, "links": 1 + }, + "00.03 News/Is Fox News Really Doomed.md": { + "size": 23014, + "tags": 3, + "links": 2 + }, + "00.03 News/Law Roach on Why He Retired From Celebrity Fashion Styling.md": { + "size": 53467, + "tags": 3, + "links": 2 + }, + "00.01 Admin/Calendars/2023-03-18.md": { + "size": 1412, + "tags": 0, + "links": 5 + }, + "00.03 News/Striking French workers dispute that they want a right to ‘laziness’.md": { + "size": 9193, + "tags": 3, + "links": 1 + }, + "02.02 Paris/Boulangerie Sain.md": { + "size": 1628, + "tags": 4, + "links": 2 + }, + "00.01 Admin/Calendars/2023-03-19.md": { + "size": 1412, + "tags": 0, + "links": 5 + }, + "03.03 Food & Wine/Korean Barbecue-Style Meatballs.md": { + "size": 2902, + "tags": 2, + "links": 2 + }, + "00.01 Admin/Calendars/2023-03-20.md": { + "size": 1412, + "tags": 0, + "links": 5 + }, + "01.05 Done/Revue Chapitre Papa.md": { + "size": 639, + "tags": 0, + "links": 0 + }, + "03.04 Cinematheque/Batman Begins (2005).md": { + "size": 2279, + "tags": 0, + "links": 7 + }, + "00.01 Admin/Calendars/2023-03-21.md": { + "size": 1283, + "tags": 0, + "links": 5 + }, + "03.04 Cinematheque/The Dark Knight (2008).md": { + "size": 2251, + "tags": 0, + "links": 7 + }, + "00.03 News/The Purposeful Presence of Lance Reddick.md": { + "size": 12295, + "tags": 5, + "links": 2 + }, + "00.03 News/Are Helicopter Parents Actually Lazy.md": { + "size": 11149, + "tags": 2, + "links": 2 + }, + "00.03 News/Why Joe Biden’s Honeymoon With Progressives Is Coming to an End.md": { + "size": 14131, + "tags": 4, + "links": 2 + }, + "00.03 News/Leopards Are Living among People. And That Could Save the Species.md": { + "size": 30461, + "tags": 3, + "links": 2 + }, + "00.03 News/How an FBI agent stained an NCAA basketball corruption probe - Los Angeles Times.md": { + "size": 46429, + "tags": 5, + "links": 1 + }, + "00.03 News/The Brilliant Inventor Who Made Two of History’s Biggest Mistakes.md": { + "size": 52286, + "tags": 3, + "links": 1 + }, + "00.03 News/Adam Sandler doesn’t need your respect. But he’s getting it anyway..md": { + "size": 26315, + "tags": 4, + "links": 1 + }, + "00.01 Admin/Calendars/2023-03-22.md": { + "size": 1412, + "tags": 0, + "links": 6 + }, + "03.04 Cinematheque/The Dark Knight Rises (2012).md": { + "size": 2265, + "tags": 0, + "links": 7 + }, + "00.01 Admin/Calendars/2023-03-23.md": { + "size": 1412, + "tags": 0, + "links": 5 + }, + "03.04 Cinematheque/Esterno notte (2022).md": { + "size": 2716, + "tags": 0, + "links": 1 + }, + "03.03 Food & Wine/Zaalouk.md": { + "size": 3197, + "tags": 3, + "links": 2 + }, + "03.03 Food & Wine/Taktouka.md": { + "size": 3402, + "tags": 0, + "links": 2 + }, + "03.03 Food & Wine/Brown Butter Farro with Mushrooms & Burrata.md": { + "size": 3274, + "tags": 1, + "links": 2 } }, "commitTypes": { "/": { - "Refactor": 2730, - "Create": 1586, - "Link": 3831, - "Expand": 1568 + "Refactor": 2755, + "Create": 1611, + "Link": 3904, + "Expand": 1580 } }, "dailyCommits": { @@ -8932,39 +9052,51 @@ "4": 17, "5": 13, "6": 63, - "7": 566, - "8": 785, - "9": 683, - "10": 513, - "11": 390, - "12": 364, - "13": 413, - "14": 409, - "15": 407, - "16": 520, + "7": 602, + "8": 792, + "9": 688, + "10": 516, + "11": 401, + "12": 365, + "13": 420, + "14": 414, + "15": 417, + "16": 530, "17": 565, - "18": 750, - "19": 473, - "20": 441, - "21": 436, - "22": 434, - "23": 1229 + "18": 758, + "19": 481, + "20": 445, + "21": 449, + "22": 439, + "23": 1231 } }, "weeklyCommits": { "/": { - "Mon": 2244, - "Tue": 1241, - "Wed": 1214, - "Thu": 826, - "Fri": 904, + "Mon": 2259, + "Tue": 1253, + "Wed": 1261, + "Thu": 849, + "Fri": 913, "Sat": 0, - "Sun": 3286 + "Sun": 3315 } }, "recentCommits": { "/": { "Expanded": [ + " Zaalouk ", + " Batman Begins (2005) ", + " The Dark Knight Rises (2012) ", + " The Dark Knight (2008) ", + " Household ", + " Revue Chapitre Papa ", + " Revue Chapitre Papa ", + " Revue Chapitre Papa ", + " Boulangerie Sain ", + " 2023-03-11 England - France ", + " 2023-03-18 France - Wales ", + " Household ", " Au Revoir Là-Haut ", " Au Revoir Là-Haut ", " Le Temps gagné ", @@ -9003,21 +9135,34 @@ " 2023-03-05 ", " 2023-03-04 Diner Baur au Lac ", " Entertainment ", - " Entertainment ", - " Entertainment ", - " Metamask ", - " Metamask ", - " Metamask ", - " Bookmarks - Travels & Sport ", - " Sport ", - " Bookmarks - Selfhosted Apps ", - " 2023-03-04 PSG - FC Nantes ", - " 2023-03-03 ", - " 2023-05-27 London ", - " Alluma ", - " Tao's " + " Entertainment " ], "Created": [ + " Taktouka — My Moroccan Food ", + " Zaalouk - Moroccan Aubergine Salad — My Moroccan Food ", + " Esterno notte (2022) ", + " 2023-03-23 ", + " The Dark Knight Rises (2012) ", + " 2023-03-22 ", + " Adam Sandler doesn’t need your respect. But he’s getting it anyway. ", + " The Brilliant Inventor Who Made Two of History’s Biggest Mistakes ", + " How an FBI agent stained an NCAA basketball corruption probe - Los Angeles Times ", + " Leopards Are Living among People. And That Could Save the Species ", + " Why Joe Biden’s Honeymoon With Progressives Is Coming to an End ", + " Are Helicopter Parents Actually Lazy ", + " The Purposeful Presence of Lance Reddick ", + " The Dark Knight (2008) ", + " 2023-03-21 ", + " Batman Begins (2005) ", + " Untitled ", + " 2023-03-20 ", + " 2023-03-19 ", + " Untitled ", + " Striking French workers dispute that they want a right to ‘laziness’ ", + " Les Combrailles, à la découverte de l’Auvergne secrète ", + " 2023-03-18 ", + " Law Roach on Why He Retired From Celebrity Fashion Styling ", + " Is Fox News Really Doomed ", " Untitled ", " Untitled ", " Untitled ", @@ -9043,34 +9188,33 @@ " Untitled ", " The One Big Question Bernie Sanders Won’t Answer ", " 2023-03-11 ", - " Red Army (2014) ", - " 2023-03-10 ", - " On the Trail of the Fentanyl King ", - " 2023-03-09 ", - " Email template 1 ", - " Humans Started Riding Horses 5,000 Years Ago, New Evidence Suggests ", - " Untitled ", - " Untitled ", - " Untitled ", - " Untitled ", - " Untitled ", - " Untitled ", - " 2023-03-08 ", - " 2023-03-07 ", - " Untitled ", - " Untitled ", - " Untitled ", - " Untitled ", - " Template Note 1 ", - " Untitled ", - " The Power And The Glory ", - " 2023-03-06 ", - " Untitled ", - " Untitled ", - " Untitled ", - " US-China 1MDB Scandal Pits FBI Against Former Fugee Pras Michel " + " Red Army (2014) " ], "Renamed": [ + " Brown Butter Farro with Mushrooms & Burrata ", + " Brown Butter Farro with Mushrooms & Burrata - T Dish ", + " Taktouka ", + " Taktouka ", + " Zaalouk ", + " Zaalouk ", + " Food ", + " Esterno notte (2022) ", + " The Dark Knight Rises (2012) ", + " Adam Sandler doesn’t need your respect. But he’s getting it anyway. ", + " The Brilliant Inventor Who Made Two of History’s Biggest Mistakes ", + " How an FBI agent stained an NCAA basketball corruption probe - Los Angeles Times ", + " Leopards Are Living among People. And That Could Save the Species ", + " Why Joe Biden’s Honeymoon With Progressives Is Coming to an End ", + " Are Helicopter Parents Actually Lazy ", + " The Purposeful Presence of Lance Reddick ", + " The Dark Knight (2008) ", + " Batman Begins (2005) ", + " Revue Chapitre Papa ", + " Korean Barbecue-Style Meatballs ", + " Boulangerie Sain ", + " Striking French workers dispute that they want a right to ‘laziness’ ", + " Law Roach on Why He Retired From Celebrity Fashion Styling ", + " Is Fox News Really Doomed ", " Le Camp des Saints ", " The Camp of the Saints ", " The Power And The Glory ", @@ -9097,33 +9241,26 @@ " Servers - notes ", " 2021-12-31 Quits smoking ", " 2020-05-06 Checkup ", - " 2021-05-05 Checkup ", - " 2021-05-25 COVID Vaccine 1 ", - " 2021-06-29 COVID Vaccine 2 ", - " 2021-12-22 Covid booster ", - " 2023-04-14 Médecin ", - " Portofino am See ", - " 2023-02-24 Kidney inflammation ", - " 2021-10-10 Checkup ", - " 2023-01-23 Checkup ", - " 2023-01-23 Checkup 1 ", - " Checkup 1 ", - " 2023-03-09 Médecin ", - " Checkup ", - " @Health ", - " Health ", - " Template Timeline ", - " Template Timeline1 ", - " Health ", - " Dr Awad Abuawad ", - " Under the Volcano ", - " Entertainment ", - " Metamask ", - " Sport ", - " US-China 1MDB Scandal Pits FBI Against Former Fugee Pras Michel ", - " Sanctuary " + " 2021-05-05 Checkup " ], "Tagged": [ + " Zaalouk ", + " Adam Sandler doesn’t need your respect. But he’s getting it anyway. ", + " How an FBI agent stained an NCAA basketball corruption probe - Los Angeles Times ", + " Leopards Are Living among People. And That Could Save the Species ", + " Why Joe Biden’s Honeymoon With Progressives Is Coming to an End ", + " Are Helicopter Parents Actually Lazy ", + " The Brilliant Inventor Who Made Two of History’s Biggest Mistakes ", + " Are Helicopter Parents Actually Lazy ", + " The Purposeful Presence of Lance Reddick ", + " Boulangerie Sain ", + " Boulangerie Sain ", + " Striking French workers dispute that they want a right to ‘laziness’ ", + " 2023-03-14 ", + " Law Roach on Why He Retired From Celebrity Fashion Styling ", + " Is Fox News Really Doomed ", + " The Untold Story Of Notorious Influencer Andrew Tate ", + " Is Fox News Really Doomed ", " Au Revoir Là-Haut ", " Le Temps gagné ", " The Camp of the Saints - 2017 ", @@ -9157,24 +9294,7 @@ " US-China 1MDB Scandal Pits FBI Against Former Fugee Pras Michel ", " Sanctuary ", " How the Biggest Fraud in German History Unravelled ", - " EVT Will Save Millions of Lives From Stroke. Eventually. ", - " Say Nothing ", - " Andy Wahlou ", - " Le Ballroom du Beef Club ", - " Providores ", - " Casita Andina ", - " Life After Food ", - " George Santos, MAGA ‘It’ Girl ", - " Alluma ", - " Tao's ", - " Japanese Souffle Pancakes ", - " Pile of Books ", - " Pile of Books ", - " Ian Fishback’s American Nightmare ", - " The Dystopian Underworld of South Africa’s Illegal Gold Mines ", - " The Great Dumpling Drama of Glendale, California ", - " The Secret Weapons of Ukraine ", - " The Tragedy of the Spice King " + " EVT Will Save Millions of Lives From Stroke. Eventually. " ], "Refactored": [ " Korean Barbecue-Style Meatballs Recipe ", @@ -9230,6 +9350,7 @@ " Zürich - Practical info " ], "Deleted": [ + " Les Combrailles, à la découverte de l’Auvergne secrète ", " Untitled ", " aglaedevilleneuve@yahoo.fr ", " Email template 1 ", @@ -9279,61 +9400,60 @@ " 2022-11-06 ", " Lemon Chicken Recipe (with Lemon Butter Sauce) - NatashasKitchen.com ", " aglaedevilleneuve@yahoo.fr ", - " Mail Import ", - " Rich text " + " Mail Import " ], "Linked": [ - " Bull elephants – their importance as individuals in elephant societies - Africa Geographic ", - " How a civil war erupted at Fox News after the 2020 election ", - " The One Big Question Bernie Sanders Won’t Answer ", - " Au Revoir Là-Haut ", - " Le Temps gagné ", - " The Camp of the Saints - 2017 ", - " 2023-03-17 ", - " The Power And The Glory ", - " 2023-03-17 ", - " 2023-03-16 ", - " 2023-03-16 ", - " 2023-03-15 ", - " Korean Barbecue-Style Meatballs Recipe ", - " Read Your Way Through Miami ", - " 2023-03-15 ", - " 2023-03-14 ", - " John Wick - Chapter 2 (2017) ", - " John Wick (2014) ", - " John Wick - Chapter 3 - Parabellum (2019) ", - " 2023-03-14 ", - " 2023-03-14 ", - " John Wick (2014) ", - " John Wick - Chapter 2 (2017) ", - " 2023-03-13 ", - " John Wick - Chapter 2 (2017) ", - " Bull elephants – their importance as individuals in elephant societies - Africa Geographic ", - " The Silicon Valley Bank Contagion Is Just Beginning ", - " 2023-03-13 ", - " 2023-03-12 ", - " John Wick (2014) ", - " An Icelandic Town Goes All Out to Save Baby Puffins ", - " The Untold Story Of Notorious Influencer Andrew Tate ", - " How a civil war erupted at Fox News after the 2020 election ", - " Mel Brooks Isn’t Done Punching Up the History of the World ", - " 2023-03-12 ", - " William's Butcherstable ", - " The One Big Question Bernie Sanders Won’t Answer ", - " Humans Started Riding Horses 5,000 Years Ago, New Evidence Suggests ", - " Life After Food ", - " On the Trail of the Fentanyl King ", - " 2023-03-11 ", - " 2023-03-10 ", - " Red Army (2014) ", - " 2023-03-10 ", - " 2023-03-10 ", - " 2023-03-10 ", - " On the Trail of the Fentanyl King ", - " EVT Will Save Millions of Lives From Stroke. Eventually. ", - " 2023-03-09 ", - " Sanctuary ", - " 2023-03-08 " + " Taktouka ", + " Zaalouk ", + " 2023-03-22 ", + " 2023-03-23 ", + " Esterno notte (2022) ", + " Law Roach on Why He Retired From Celebrity Fashion Styling ", + " Why Joe Biden’s Honeymoon With Progressives Is Coming to an End ", + " The Purposeful Presence of Lance Reddick ", + " 2023-03-23 ", + " Batman Begins (2005) ", + " Batman (1989) ", + " Batman Robin (1997) ", + " The Dark Knight Rises (2012) ", + " Batman Returns (1992) ", + " The Dark Knight (2008) ", + " Batman Forever (1995) ", + " 2023-03-22 ", + " The Dark Knight Rises (2012) ", + " Are Helicopter Parents Actually Lazy ", + " Leopards Are Living among People. And That Could Save the Species ", + " 2023-03-22 ", + " Adam Sandler doesn’t need your respect. But he’s getting it anyway. ", + " How an FBI agent stained an NCAA basketball corruption probe - Los Angeles Times ", + " Leopards Are Living among People. And That Could Save the Species ", + " Why Joe Biden’s Honeymoon With Progressives Is Coming to an End ", + " The Brilliant Inventor Who Made Two of History’s Biggest Mistakes ", + " Are Helicopter Parents Actually Lazy ", + " The Purposeful Presence of Lance Reddick ", + " 2023-03-21 ", + " Batman Begins (2005) ", + " Batman Robin (1997) ", + " Batman Forever (1995) ", + " Batman (1989) ", + " Batman Returns (1992) ", + " The Dark Knight (2008) ", + " 2023-03-21 ", + " 2023-03-20 ", + " Batman (1989) ", + " Batman Robin (1997) ", + " Batman Returns (1992) ", + " Batman Forever (1995) ", + " Batman Begins (2005) ", + " 2023-03-20 ", + " 2023-03-19 ", + " 2023-03-18 ", + " 2023-03-19 ", + " Is Fox News Really Doomed ", + " Boulangerie Sain ", + " 2023-03-11 England - France ", + " 2023-03-18 France - Wales ", + " Striking French workers dispute that they want a right to ‘laziness’ " ], "Removed Tags from": [ " ‘Incredibly intelligent, highly elusive’ US faces new threat from Canadian ‘super pig’ ", diff --git a/.obsidian/plugins/obsidian-dice-roller/main.js b/.obsidian/plugins/obsidian-dice-roller/main.js index 43dee807..0d71efb2 100644 --- a/.obsidian/plugins/obsidian-dice-roller/main.js +++ b/.obsidian/plugins/obsidian-dice-roller/main.js @@ -3,10 +3,10 @@ THIS IS A GENERATED/BUNDLED FILE BY ESBUILD if you want to view the source, please visit the github repository of this plugin */ -var Bo=Object.create;var Kt=Object.defineProperty;var Po=Object.getOwnPropertyDescriptor;var Io=Object.getOwnPropertyNames;var ko=Object.getPrototypeOf,Uo=Object.prototype.hasOwnProperty;var Bi=n=>Kt(n,"__esModule",{value:!0});var M0=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports),Oo=(n,e)=>{Bi(n);for(var t in e)Kt(n,t,{get:e[t],enumerable:!0})},Go=(n,e,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Io(e))!Uo.call(n,i)&&i!=="default"&&Kt(n,i,{get:()=>e[i],enumerable:!(t=Po(e,i))||t.enumerable});return n},S2=n=>Go(Bi(Kt(n!=null?Bo(ko(n)):{},"default",n&&n.__esModule&&"default"in n?{get:()=>n.default,enumerable:!0}:{value:n,enumerable:!0})),n);var Pi=M0(Jt=>{"use strict";Object.defineProperty(Jt,"__esModule",{value:!0});require("obsidian");var qo=n=>{var e;return n?(e=n.plugins.plugins.dataview)===null||e===void 0?void 0:e.api:window.DataviewAPI},Wo=n=>n.plugins.enabledPlugins.has("dataview");Jt.getAPI=qo;Jt.isPluginEnabled=Wo});var ba=M0((s6,yt)=>{(function(n){var e=typeof s6=="object"&&s6,t=typeof yt=="object"&&yt&&yt.exports==e&&yt,i=typeof global=="object"&&global;(i.global===i||i.window===i)&&(n=i);var a=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,r=/[\x01-\x7F]/g,o=/[\x01-\t\x0B\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,s=/<\u20D2|=\u20E5|>\u20D2|\u205F\u200A|\u219D\u0338|\u2202\u0338|\u2220\u20D2|\u2229\uFE00|\u222A\uFE00|\u223C\u20D2|\u223D\u0331|\u223E\u0333|\u2242\u0338|\u224B\u0338|\u224D\u20D2|\u224E\u0338|\u224F\u0338|\u2250\u0338|\u2261\u20E5|\u2264\u20D2|\u2265\u20D2|\u2266\u0338|\u2267\u0338|\u2268\uFE00|\u2269\uFE00|\u226A\u0338|\u226A\u20D2|\u226B\u0338|\u226B\u20D2|\u227F\u0338|\u2282\u20D2|\u2283\u20D2|\u228A\uFE00|\u228B\uFE00|\u228F\u0338|\u2290\u0338|\u2293\uFE00|\u2294\uFE00|\u22B4\u20D2|\u22B5\u20D2|\u22D8\u0338|\u22D9\u0338|\u22DA\uFE00|\u22DB\uFE00|\u22F5\u0338|\u22F9\u0338|\u2933\u0338|\u29CF\u0338|\u29D0\u0338|\u2A6D\u0338|\u2A70\u0338|\u2A7D\u0338|\u2A7E\u0338|\u2AA1\u0338|\u2AA2\u0338|\u2AAC\uFE00|\u2AAD\uFE00|\u2AAF\u0338|\u2AB0\u0338|\u2AC5\u0338|\u2AC6\u0338|\u2ACB\uFE00|\u2ACC\uFE00|\u2AFD\u20E5|[\xA0-\u0113\u0116-\u0122\u0124-\u012B\u012E-\u014D\u0150-\u017E\u0192\u01B5\u01F5\u0237\u02C6\u02C7\u02D8-\u02DD\u0311\u0391-\u03A1\u03A3-\u03A9\u03B1-\u03C9\u03D1\u03D2\u03D5\u03D6\u03DC\u03DD\u03F0\u03F1\u03F5\u03F6\u0401-\u040C\u040E-\u044F\u0451-\u045C\u045E\u045F\u2002-\u2005\u2007-\u2010\u2013-\u2016\u2018-\u201A\u201C-\u201E\u2020-\u2022\u2025\u2026\u2030-\u2035\u2039\u203A\u203E\u2041\u2043\u2044\u204F\u2057\u205F-\u2063\u20AC\u20DB\u20DC\u2102\u2105\u210A-\u2113\u2115-\u211E\u2122\u2124\u2127-\u2129\u212C\u212D\u212F-\u2131\u2133-\u2138\u2145-\u2148\u2153-\u215E\u2190-\u219B\u219D-\u21A7\u21A9-\u21AE\u21B0-\u21B3\u21B5-\u21B7\u21BA-\u21DB\u21DD\u21E4\u21E5\u21F5\u21FD-\u2205\u2207-\u2209\u220B\u220C\u220F-\u2214\u2216-\u2218\u221A\u221D-\u2238\u223A-\u2257\u2259\u225A\u225C\u225F-\u2262\u2264-\u228B\u228D-\u229B\u229D-\u22A5\u22A7-\u22B0\u22B2-\u22BB\u22BD-\u22DB\u22DE-\u22E3\u22E6-\u22F7\u22F9-\u22FE\u2305\u2306\u2308-\u2310\u2312\u2313\u2315\u2316\u231C-\u231F\u2322\u2323\u232D\u232E\u2336\u233D\u233F\u237C\u23B0\u23B1\u23B4-\u23B6\u23DC-\u23DF\u23E2\u23E7\u2423\u24C8\u2500\u2502\u250C\u2510\u2514\u2518\u251C\u2524\u252C\u2534\u253C\u2550-\u256C\u2580\u2584\u2588\u2591-\u2593\u25A1\u25AA\u25AB\u25AD\u25AE\u25B1\u25B3-\u25B5\u25B8\u25B9\u25BD-\u25BF\u25C2\u25C3\u25CA\u25CB\u25EC\u25EF\u25F8-\u25FC\u2605\u2606\u260E\u2640\u2642\u2660\u2663\u2665\u2666\u266A\u266D-\u266F\u2713\u2717\u2720\u2736\u2758\u2772\u2773\u27C8\u27C9\u27E6-\u27ED\u27F5-\u27FA\u27FC\u27FF\u2902-\u2905\u290C-\u2913\u2916\u2919-\u2920\u2923-\u292A\u2933\u2935-\u2939\u293C\u293D\u2945\u2948-\u294B\u294E-\u2976\u2978\u2979\u297B-\u297F\u2985\u2986\u298B-\u2996\u299A\u299C\u299D\u29A4-\u29B7\u29B9\u29BB\u29BC\u29BE-\u29C5\u29C9\u29CD-\u29D0\u29DC-\u29DE\u29E3-\u29E5\u29EB\u29F4\u29F6\u2A00-\u2A02\u2A04\u2A06\u2A0C\u2A0D\u2A10-\u2A17\u2A22-\u2A27\u2A29\u2A2A\u2A2D-\u2A31\u2A33-\u2A3C\u2A3F\u2A40\u2A42-\u2A4D\u2A50\u2A53-\u2A58\u2A5A-\u2A5D\u2A5F\u2A66\u2A6A\u2A6D-\u2A75\u2A77-\u2A9A\u2A9D-\u2AA2\u2AA4-\u2AB0\u2AB3-\u2AC8\u2ACB\u2ACC\u2ACF-\u2ADB\u2AE4\u2AE6-\u2AE9\u2AEB-\u2AF3\u2AFD\uFB00-\uFB04]|\uD835[\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDCCF\uDD04\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDD6B]/g,c={"\xAD":"shy","\u200C":"zwnj","\u200D":"zwj","\u200E":"lrm","\u2063":"ic","\u2062":"it","\u2061":"af","\u200F":"rlm","\u200B":"ZeroWidthSpace","\u2060":"NoBreak","\u0311":"DownBreve","\u20DB":"tdot","\u20DC":"DotDot"," ":"Tab","\n":"NewLine","\u2008":"puncsp","\u205F":"MediumSpace","\u2009":"thinsp","\u200A":"hairsp","\u2004":"emsp13","\u2002":"ensp","\u2005":"emsp14","\u2003":"emsp","\u2007":"numsp","\xA0":"nbsp","\u205F\u200A":"ThickSpace","\u203E":"oline",_:"lowbar","\u2010":"dash","\u2013":"ndash","\u2014":"mdash","\u2015":"horbar",",":"comma",";":"semi","\u204F":"bsemi",":":"colon","\u2A74":"Colone","!":"excl","\xA1":"iexcl","?":"quest","\xBF":"iquest",".":"period","\u2025":"nldr","\u2026":"mldr","\xB7":"middot","'":"apos","\u2018":"lsquo","\u2019":"rsquo","\u201A":"sbquo","\u2039":"lsaquo","\u203A":"rsaquo",'"':"quot","\u201C":"ldquo","\u201D":"rdquo","\u201E":"bdquo","\xAB":"laquo","\xBB":"raquo","(":"lpar",")":"rpar","[":"lsqb","]":"rsqb","{":"lcub","}":"rcub","\u2308":"lceil","\u2309":"rceil","\u230A":"lfloor","\u230B":"rfloor","\u2985":"lopar","\u2986":"ropar","\u298B":"lbrke","\u298C":"rbrke","\u298D":"lbrkslu","\u298E":"rbrksld","\u298F":"lbrksld","\u2990":"rbrkslu","\u2991":"langd","\u2992":"rangd","\u2993":"lparlt","\u2994":"rpargt","\u2995":"gtlPar","\u2996":"ltrPar","\u27E6":"lobrk","\u27E7":"robrk","\u27E8":"lang","\u27E9":"rang","\u27EA":"Lang","\u27EB":"Rang","\u27EC":"loang","\u27ED":"roang","\u2772":"lbbrk","\u2773":"rbbrk","\u2016":"Vert","\xA7":"sect","\xB6":"para","@":"commat","*":"ast","/":"sol",undefined:null,"&":"amp","#":"num","%":"percnt","\u2030":"permil","\u2031":"pertenk","\u2020":"dagger","\u2021":"Dagger","\u2022":"bull","\u2043":"hybull","\u2032":"prime","\u2033":"Prime","\u2034":"tprime","\u2057":"qprime","\u2035":"bprime","\u2041":"caret","`":"grave","\xB4":"acute","\u02DC":"tilde","^":"Hat","\xAF":"macr","\u02D8":"breve","\u02D9":"dot","\xA8":"die","\u02DA":"ring","\u02DD":"dblac","\xB8":"cedil","\u02DB":"ogon","\u02C6":"circ","\u02C7":"caron","\xB0":"deg","\xA9":"copy","\xAE":"reg","\u2117":"copysr","\u2118":"wp","\u211E":"rx","\u2127":"mho","\u2129":"iiota","\u2190":"larr","\u219A":"nlarr","\u2192":"rarr","\u219B":"nrarr","\u2191":"uarr","\u2193":"darr","\u2194":"harr","\u21AE":"nharr","\u2195":"varr","\u2196":"nwarr","\u2197":"nearr","\u2198":"searr","\u2199":"swarr","\u219D":"rarrw","\u219D\u0338":"nrarrw","\u219E":"Larr","\u219F":"Uarr","\u21A0":"Rarr","\u21A1":"Darr","\u21A2":"larrtl","\u21A3":"rarrtl","\u21A4":"mapstoleft","\u21A5":"mapstoup","\u21A6":"map","\u21A7":"mapstodown","\u21A9":"larrhk","\u21AA":"rarrhk","\u21AB":"larrlp","\u21AC":"rarrlp","\u21AD":"harrw","\u21B0":"lsh","\u21B1":"rsh","\u21B2":"ldsh","\u21B3":"rdsh","\u21B5":"crarr","\u21B6":"cularr","\u21B7":"curarr","\u21BA":"olarr","\u21BB":"orarr","\u21BC":"lharu","\u21BD":"lhard","\u21BE":"uharr","\u21BF":"uharl","\u21C0":"rharu","\u21C1":"rhard","\u21C2":"dharr","\u21C3":"dharl","\u21C4":"rlarr","\u21C5":"udarr","\u21C6":"lrarr","\u21C7":"llarr","\u21C8":"uuarr","\u21C9":"rrarr","\u21CA":"ddarr","\u21CB":"lrhar","\u21CC":"rlhar","\u21D0":"lArr","\u21CD":"nlArr","\u21D1":"uArr","\u21D2":"rArr","\u21CF":"nrArr","\u21D3":"dArr","\u21D4":"iff","\u21CE":"nhArr","\u21D5":"vArr","\u21D6":"nwArr","\u21D7":"neArr","\u21D8":"seArr","\u21D9":"swArr","\u21DA":"lAarr","\u21DB":"rAarr","\u21DD":"zigrarr","\u21E4":"larrb","\u21E5":"rarrb","\u21F5":"duarr","\u21FD":"loarr","\u21FE":"roarr","\u21FF":"hoarr","\u2200":"forall","\u2201":"comp","\u2202":"part","\u2202\u0338":"npart","\u2203":"exist","\u2204":"nexist","\u2205":"empty","\u2207":"Del","\u2208":"in","\u2209":"notin","\u220B":"ni","\u220C":"notni","\u03F6":"bepsi","\u220F":"prod","\u2210":"coprod","\u2211":"sum","+":"plus","\xB1":"pm","\xF7":"div","\xD7":"times","<":"lt","\u226E":"nlt","<\u20D2":"nvlt","=":"equals","\u2260":"ne","=\u20E5":"bne","\u2A75":"Equal",">":"gt","\u226F":"ngt",">\u20D2":"nvgt","\xAC":"not","|":"vert","\xA6":"brvbar","\u2212":"minus","\u2213":"mp","\u2214":"plusdo","\u2044":"frasl","\u2216":"setmn","\u2217":"lowast","\u2218":"compfn","\u221A":"Sqrt","\u221D":"prop","\u221E":"infin","\u221F":"angrt","\u2220":"ang","\u2220\u20D2":"nang","\u2221":"angmsd","\u2222":"angsph","\u2223":"mid","\u2224":"nmid","\u2225":"par","\u2226":"npar","\u2227":"and","\u2228":"or","\u2229":"cap","\u2229\uFE00":"caps","\u222A":"cup","\u222A\uFE00":"cups","\u222B":"int","\u222C":"Int","\u222D":"tint","\u2A0C":"qint","\u222E":"oint","\u222F":"Conint","\u2230":"Cconint","\u2231":"cwint","\u2232":"cwconint","\u2233":"awconint","\u2234":"there4","\u2235":"becaus","\u2236":"ratio","\u2237":"Colon","\u2238":"minusd","\u223A":"mDDot","\u223B":"homtht","\u223C":"sim","\u2241":"nsim","\u223C\u20D2":"nvsim","\u223D":"bsim","\u223D\u0331":"race","\u223E":"ac","\u223E\u0333":"acE","\u223F":"acd","\u2240":"wr","\u2242":"esim","\u2242\u0338":"nesim","\u2243":"sime","\u2244":"nsime","\u2245":"cong","\u2247":"ncong","\u2246":"simne","\u2248":"ap","\u2249":"nap","\u224A":"ape","\u224B":"apid","\u224B\u0338":"napid","\u224C":"bcong","\u224D":"CupCap","\u226D":"NotCupCap","\u224D\u20D2":"nvap","\u224E":"bump","\u224E\u0338":"nbump","\u224F":"bumpe","\u224F\u0338":"nbumpe","\u2250":"doteq","\u2250\u0338":"nedot","\u2251":"eDot","\u2252":"efDot","\u2253":"erDot","\u2254":"colone","\u2255":"ecolon","\u2256":"ecir","\u2257":"cire","\u2259":"wedgeq","\u225A":"veeeq","\u225C":"trie","\u225F":"equest","\u2261":"equiv","\u2262":"nequiv","\u2261\u20E5":"bnequiv","\u2264":"le","\u2270":"nle","\u2264\u20D2":"nvle","\u2265":"ge","\u2271":"nge","\u2265\u20D2":"nvge","\u2266":"lE","\u2266\u0338":"nlE","\u2267":"gE","\u2267\u0338":"ngE","\u2268\uFE00":"lvnE","\u2268":"lnE","\u2269":"gnE","\u2269\uFE00":"gvnE","\u226A":"ll","\u226A\u0338":"nLtv","\u226A\u20D2":"nLt","\u226B":"gg","\u226B\u0338":"nGtv","\u226B\u20D2":"nGt","\u226C":"twixt","\u2272":"lsim","\u2274":"nlsim","\u2273":"gsim","\u2275":"ngsim","\u2276":"lg","\u2278":"ntlg","\u2277":"gl","\u2279":"ntgl","\u227A":"pr","\u2280":"npr","\u227B":"sc","\u2281":"nsc","\u227C":"prcue","\u22E0":"nprcue","\u227D":"sccue","\u22E1":"nsccue","\u227E":"prsim","\u227F":"scsim","\u227F\u0338":"NotSucceedsTilde","\u2282":"sub","\u2284":"nsub","\u2282\u20D2":"vnsub","\u2283":"sup","\u2285":"nsup","\u2283\u20D2":"vnsup","\u2286":"sube","\u2288":"nsube","\u2287":"supe","\u2289":"nsupe","\u228A\uFE00":"vsubne","\u228A":"subne","\u228B\uFE00":"vsupne","\u228B":"supne","\u228D":"cupdot","\u228E":"uplus","\u228F":"sqsub","\u228F\u0338":"NotSquareSubset","\u2290":"sqsup","\u2290\u0338":"NotSquareSuperset","\u2291":"sqsube","\u22E2":"nsqsube","\u2292":"sqsupe","\u22E3":"nsqsupe","\u2293":"sqcap","\u2293\uFE00":"sqcaps","\u2294":"sqcup","\u2294\uFE00":"sqcups","\u2295":"oplus","\u2296":"ominus","\u2297":"otimes","\u2298":"osol","\u2299":"odot","\u229A":"ocir","\u229B":"oast","\u229D":"odash","\u229E":"plusb","\u229F":"minusb","\u22A0":"timesb","\u22A1":"sdotb","\u22A2":"vdash","\u22AC":"nvdash","\u22A3":"dashv","\u22A4":"top","\u22A5":"bot","\u22A7":"models","\u22A8":"vDash","\u22AD":"nvDash","\u22A9":"Vdash","\u22AE":"nVdash","\u22AA":"Vvdash","\u22AB":"VDash","\u22AF":"nVDash","\u22B0":"prurel","\u22B2":"vltri","\u22EA":"nltri","\u22B3":"vrtri","\u22EB":"nrtri","\u22B4":"ltrie","\u22EC":"nltrie","\u22B4\u20D2":"nvltrie","\u22B5":"rtrie","\u22ED":"nrtrie","\u22B5\u20D2":"nvrtrie","\u22B6":"origof","\u22B7":"imof","\u22B8":"mumap","\u22B9":"hercon","\u22BA":"intcal","\u22BB":"veebar","\u22BD":"barvee","\u22BE":"angrtvb","\u22BF":"lrtri","\u22C0":"Wedge","\u22C1":"Vee","\u22C2":"xcap","\u22C3":"xcup","\u22C4":"diam","\u22C5":"sdot","\u22C6":"Star","\u22C7":"divonx","\u22C8":"bowtie","\u22C9":"ltimes","\u22CA":"rtimes","\u22CB":"lthree","\u22CC":"rthree","\u22CD":"bsime","\u22CE":"cuvee","\u22CF":"cuwed","\u22D0":"Sub","\u22D1":"Sup","\u22D2":"Cap","\u22D3":"Cup","\u22D4":"fork","\u22D5":"epar","\u22D6":"ltdot","\u22D7":"gtdot","\u22D8":"Ll","\u22D8\u0338":"nLl","\u22D9":"Gg","\u22D9\u0338":"nGg","\u22DA\uFE00":"lesg","\u22DA":"leg","\u22DB":"gel","\u22DB\uFE00":"gesl","\u22DE":"cuepr","\u22DF":"cuesc","\u22E6":"lnsim","\u22E7":"gnsim","\u22E8":"prnsim","\u22E9":"scnsim","\u22EE":"vellip","\u22EF":"ctdot","\u22F0":"utdot","\u22F1":"dtdot","\u22F2":"disin","\u22F3":"isinsv","\u22F4":"isins","\u22F5":"isindot","\u22F5\u0338":"notindot","\u22F6":"notinvc","\u22F7":"notinvb","\u22F9":"isinE","\u22F9\u0338":"notinE","\u22FA":"nisd","\u22FB":"xnis","\u22FC":"nis","\u22FD":"notnivc","\u22FE":"notnivb","\u2305":"barwed","\u2306":"Barwed","\u230C":"drcrop","\u230D":"dlcrop","\u230E":"urcrop","\u230F":"ulcrop","\u2310":"bnot","\u2312":"profline","\u2313":"profsurf","\u2315":"telrec","\u2316":"target","\u231C":"ulcorn","\u231D":"urcorn","\u231E":"dlcorn","\u231F":"drcorn","\u2322":"frown","\u2323":"smile","\u232D":"cylcty","\u232E":"profalar","\u2336":"topbot","\u233D":"ovbar","\u233F":"solbar","\u237C":"angzarr","\u23B0":"lmoust","\u23B1":"rmoust","\u23B4":"tbrk","\u23B5":"bbrk","\u23B6":"bbrktbrk","\u23DC":"OverParenthesis","\u23DD":"UnderParenthesis","\u23DE":"OverBrace","\u23DF":"UnderBrace","\u23E2":"trpezium","\u23E7":"elinters","\u2423":"blank","\u2500":"boxh","\u2502":"boxv","\u250C":"boxdr","\u2510":"boxdl","\u2514":"boxur","\u2518":"boxul","\u251C":"boxvr","\u2524":"boxvl","\u252C":"boxhd","\u2534":"boxhu","\u253C":"boxvh","\u2550":"boxH","\u2551":"boxV","\u2552":"boxdR","\u2553":"boxDr","\u2554":"boxDR","\u2555":"boxdL","\u2556":"boxDl","\u2557":"boxDL","\u2558":"boxuR","\u2559":"boxUr","\u255A":"boxUR","\u255B":"boxuL","\u255C":"boxUl","\u255D":"boxUL","\u255E":"boxvR","\u255F":"boxVr","\u2560":"boxVR","\u2561":"boxvL","\u2562":"boxVl","\u2563":"boxVL","\u2564":"boxHd","\u2565":"boxhD","\u2566":"boxHD","\u2567":"boxHu","\u2568":"boxhU","\u2569":"boxHU","\u256A":"boxvH","\u256B":"boxVh","\u256C":"boxVH","\u2580":"uhblk","\u2584":"lhblk","\u2588":"block","\u2591":"blk14","\u2592":"blk12","\u2593":"blk34","\u25A1":"squ","\u25AA":"squf","\u25AB":"EmptyVerySmallSquare","\u25AD":"rect","\u25AE":"marker","\u25B1":"fltns","\u25B3":"xutri","\u25B4":"utrif","\u25B5":"utri","\u25B8":"rtrif","\u25B9":"rtri","\u25BD":"xdtri","\u25BE":"dtrif","\u25BF":"dtri","\u25C2":"ltrif","\u25C3":"ltri","\u25CA":"loz","\u25CB":"cir","\u25EC":"tridot","\u25EF":"xcirc","\u25F8":"ultri","\u25F9":"urtri","\u25FA":"lltri","\u25FB":"EmptySmallSquare","\u25FC":"FilledSmallSquare","\u2605":"starf","\u2606":"star","\u260E":"phone","\u2640":"female","\u2642":"male","\u2660":"spades","\u2663":"clubs","\u2665":"hearts","\u2666":"diams","\u266A":"sung","\u2713":"check","\u2717":"cross","\u2720":"malt","\u2736":"sext","\u2758":"VerticalSeparator","\u27C8":"bsolhsub","\u27C9":"suphsol","\u27F5":"xlarr","\u27F6":"xrarr","\u27F7":"xharr","\u27F8":"xlArr","\u27F9":"xrArr","\u27FA":"xhArr","\u27FC":"xmap","\u27FF":"dzigrarr","\u2902":"nvlArr","\u2903":"nvrArr","\u2904":"nvHarr","\u2905":"Map","\u290C":"lbarr","\u290D":"rbarr","\u290E":"lBarr","\u290F":"rBarr","\u2910":"RBarr","\u2911":"DDotrahd","\u2912":"UpArrowBar","\u2913":"DownArrowBar","\u2916":"Rarrtl","\u2919":"latail","\u291A":"ratail","\u291B":"lAtail","\u291C":"rAtail","\u291D":"larrfs","\u291E":"rarrfs","\u291F":"larrbfs","\u2920":"rarrbfs","\u2923":"nwarhk","\u2924":"nearhk","\u2925":"searhk","\u2926":"swarhk","\u2927":"nwnear","\u2928":"toea","\u2929":"tosa","\u292A":"swnwar","\u2933":"rarrc","\u2933\u0338":"nrarrc","\u2935":"cudarrr","\u2936":"ldca","\u2937":"rdca","\u2938":"cudarrl","\u2939":"larrpl","\u293C":"curarrm","\u293D":"cularrp","\u2945":"rarrpl","\u2948":"harrcir","\u2949":"Uarrocir","\u294A":"lurdshar","\u294B":"ldrushar","\u294E":"LeftRightVector","\u294F":"RightUpDownVector","\u2950":"DownLeftRightVector","\u2951":"LeftUpDownVector","\u2952":"LeftVectorBar","\u2953":"RightVectorBar","\u2954":"RightUpVectorBar","\u2955":"RightDownVectorBar","\u2956":"DownLeftVectorBar","\u2957":"DownRightVectorBar","\u2958":"LeftUpVectorBar","\u2959":"LeftDownVectorBar","\u295A":"LeftTeeVector","\u295B":"RightTeeVector","\u295C":"RightUpTeeVector","\u295D":"RightDownTeeVector","\u295E":"DownLeftTeeVector","\u295F":"DownRightTeeVector","\u2960":"LeftUpTeeVector","\u2961":"LeftDownTeeVector","\u2962":"lHar","\u2963":"uHar","\u2964":"rHar","\u2965":"dHar","\u2966":"luruhar","\u2967":"ldrdhar","\u2968":"ruluhar","\u2969":"rdldhar","\u296A":"lharul","\u296B":"llhard","\u296C":"rharul","\u296D":"lrhard","\u296E":"udhar","\u296F":"duhar","\u2970":"RoundImplies","\u2971":"erarr","\u2972":"simrarr","\u2973":"larrsim","\u2974":"rarrsim","\u2975":"rarrap","\u2976":"ltlarr","\u2978":"gtrarr","\u2979":"subrarr","\u297B":"suplarr","\u297C":"lfisht","\u297D":"rfisht","\u297E":"ufisht","\u297F":"dfisht","\u299A":"vzigzag","\u299C":"vangrt","\u299D":"angrtvbd","\u29A4":"ange","\u29A5":"range","\u29A6":"dwangle","\u29A7":"uwangle","\u29A8":"angmsdaa","\u29A9":"angmsdab","\u29AA":"angmsdac","\u29AB":"angmsdad","\u29AC":"angmsdae","\u29AD":"angmsdaf","\u29AE":"angmsdag","\u29AF":"angmsdah","\u29B0":"bemptyv","\u29B1":"demptyv","\u29B2":"cemptyv","\u29B3":"raemptyv","\u29B4":"laemptyv","\u29B5":"ohbar","\u29B6":"omid","\u29B7":"opar","\u29B9":"operp","\u29BB":"olcross","\u29BC":"odsold","\u29BE":"olcir","\u29BF":"ofcir","\u29C0":"olt","\u29C1":"ogt","\u29C2":"cirscir","\u29C3":"cirE","\u29C4":"solb","\u29C5":"bsolb","\u29C9":"boxbox","\u29CD":"trisb","\u29CE":"rtriltri","\u29CF":"LeftTriangleBar","\u29CF\u0338":"NotLeftTriangleBar","\u29D0":"RightTriangleBar","\u29D0\u0338":"NotRightTriangleBar","\u29DC":"iinfin","\u29DD":"infintie","\u29DE":"nvinfin","\u29E3":"eparsl","\u29E4":"smeparsl","\u29E5":"eqvparsl","\u29EB":"lozf","\u29F4":"RuleDelayed","\u29F6":"dsol","\u2A00":"xodot","\u2A01":"xoplus","\u2A02":"xotime","\u2A04":"xuplus","\u2A06":"xsqcup","\u2A0D":"fpartint","\u2A10":"cirfnint","\u2A11":"awint","\u2A12":"rppolint","\u2A13":"scpolint","\u2A14":"npolint","\u2A15":"pointint","\u2A16":"quatint","\u2A17":"intlarhk","\u2A22":"pluscir","\u2A23":"plusacir","\u2A24":"simplus","\u2A25":"plusdu","\u2A26":"plussim","\u2A27":"plustwo","\u2A29":"mcomma","\u2A2A":"minusdu","\u2A2D":"loplus","\u2A2E":"roplus","\u2A2F":"Cross","\u2A30":"timesd","\u2A31":"timesbar","\u2A33":"smashp","\u2A34":"lotimes","\u2A35":"rotimes","\u2A36":"otimesas","\u2A37":"Otimes","\u2A38":"odiv","\u2A39":"triplus","\u2A3A":"triminus","\u2A3B":"tritime","\u2A3C":"iprod","\u2A3F":"amalg","\u2A40":"capdot","\u2A42":"ncup","\u2A43":"ncap","\u2A44":"capand","\u2A45":"cupor","\u2A46":"cupcap","\u2A47":"capcup","\u2A48":"cupbrcap","\u2A49":"capbrcup","\u2A4A":"cupcup","\u2A4B":"capcap","\u2A4C":"ccups","\u2A4D":"ccaps","\u2A50":"ccupssm","\u2A53":"And","\u2A54":"Or","\u2A55":"andand","\u2A56":"oror","\u2A57":"orslope","\u2A58":"andslope","\u2A5A":"andv","\u2A5B":"orv","\u2A5C":"andd","\u2A5D":"ord","\u2A5F":"wedbar","\u2A66":"sdote","\u2A6A":"simdot","\u2A6D":"congdot","\u2A6D\u0338":"ncongdot","\u2A6E":"easter","\u2A6F":"apacir","\u2A70":"apE","\u2A70\u0338":"napE","\u2A71":"eplus","\u2A72":"pluse","\u2A73":"Esim","\u2A77":"eDDot","\u2A78":"equivDD","\u2A79":"ltcir","\u2A7A":"gtcir","\u2A7B":"ltquest","\u2A7C":"gtquest","\u2A7D":"les","\u2A7D\u0338":"nles","\u2A7E":"ges","\u2A7E\u0338":"nges","\u2A7F":"lesdot","\u2A80":"gesdot","\u2A81":"lesdoto","\u2A82":"gesdoto","\u2A83":"lesdotor","\u2A84":"gesdotol","\u2A85":"lap","\u2A86":"gap","\u2A87":"lne","\u2A88":"gne","\u2A89":"lnap","\u2A8A":"gnap","\u2A8B":"lEg","\u2A8C":"gEl","\u2A8D":"lsime","\u2A8E":"gsime","\u2A8F":"lsimg","\u2A90":"gsiml","\u2A91":"lgE","\u2A92":"glE","\u2A93":"lesges","\u2A94":"gesles","\u2A95":"els","\u2A96":"egs","\u2A97":"elsdot","\u2A98":"egsdot","\u2A99":"el","\u2A9A":"eg","\u2A9D":"siml","\u2A9E":"simg","\u2A9F":"simlE","\u2AA0":"simgE","\u2AA1":"LessLess","\u2AA1\u0338":"NotNestedLessLess","\u2AA2":"GreaterGreater","\u2AA2\u0338":"NotNestedGreaterGreater","\u2AA4":"glj","\u2AA5":"gla","\u2AA6":"ltcc","\u2AA7":"gtcc","\u2AA8":"lescc","\u2AA9":"gescc","\u2AAA":"smt","\u2AAB":"lat","\u2AAC":"smte","\u2AAC\uFE00":"smtes","\u2AAD":"late","\u2AAD\uFE00":"lates","\u2AAE":"bumpE","\u2AAF":"pre","\u2AAF\u0338":"npre","\u2AB0":"sce","\u2AB0\u0338":"nsce","\u2AB3":"prE","\u2AB4":"scE","\u2AB5":"prnE","\u2AB6":"scnE","\u2AB7":"prap","\u2AB8":"scap","\u2AB9":"prnap","\u2ABA":"scnap","\u2ABB":"Pr","\u2ABC":"Sc","\u2ABD":"subdot","\u2ABE":"supdot","\u2ABF":"subplus","\u2AC0":"supplus","\u2AC1":"submult","\u2AC2":"supmult","\u2AC3":"subedot","\u2AC4":"supedot","\u2AC5":"subE","\u2AC5\u0338":"nsubE","\u2AC6":"supE","\u2AC6\u0338":"nsupE","\u2AC7":"subsim","\u2AC8":"supsim","\u2ACB\uFE00":"vsubnE","\u2ACB":"subnE","\u2ACC\uFE00":"vsupnE","\u2ACC":"supnE","\u2ACF":"csub","\u2AD0":"csup","\u2AD1":"csube","\u2AD2":"csupe","\u2AD3":"subsup","\u2AD4":"supsub","\u2AD5":"subsub","\u2AD6":"supsup","\u2AD7":"suphsub","\u2AD8":"supdsub","\u2AD9":"forkv","\u2ADA":"topfork","\u2ADB":"mlcp","\u2AE4":"Dashv","\u2AE6":"Vdashl","\u2AE7":"Barv","\u2AE8":"vBar","\u2AE9":"vBarv","\u2AEB":"Vbar","\u2AEC":"Not","\u2AED":"bNot","\u2AEE":"rnmid","\u2AEF":"cirmid","\u2AF0":"midcir","\u2AF1":"topcir","\u2AF2":"nhpar","\u2AF3":"parsim","\u2AFD":"parsl","\u2AFD\u20E5":"nparsl","\u266D":"flat","\u266E":"natur","\u266F":"sharp","\xA4":"curren","\xA2":"cent",$:"dollar","\xA3":"pound","\xA5":"yen","\u20AC":"euro","\xB9":"sup1","\xBD":"half","\u2153":"frac13","\xBC":"frac14","\u2155":"frac15","\u2159":"frac16","\u215B":"frac18","\xB2":"sup2","\u2154":"frac23","\u2156":"frac25","\xB3":"sup3","\xBE":"frac34","\u2157":"frac35","\u215C":"frac38","\u2158":"frac45","\u215A":"frac56","\u215D":"frac58","\u215E":"frac78","\u{1D4B6}":"ascr","\u{1D552}":"aopf","\u{1D51E}":"afr","\u{1D538}":"Aopf","\u{1D504}":"Afr","\u{1D49C}":"Ascr",\u00AA:"ordf",\u00E1:"aacute",\u00C1:"Aacute",\u00E0:"agrave",\u00C0:"Agrave",\u0103:"abreve",\u0102:"Abreve",\u00E2:"acirc",\u00C2:"Acirc",\u00E5:"aring",\u00C5:"angst",\u00E4:"auml",\u00C4:"Auml",\u00E3:"atilde",\u00C3:"Atilde",\u0105:"aogon",\u0104:"Aogon",\u0101:"amacr",\u0100:"Amacr",\u00E6:"aelig",\u00C6:"AElig","\u{1D4B7}":"bscr","\u{1D553}":"bopf","\u{1D51F}":"bfr","\u{1D539}":"Bopf",\u212C:"Bscr","\u{1D505}":"Bfr","\u{1D520}":"cfr","\u{1D4B8}":"cscr","\u{1D554}":"copf",\u212D:"Cfr","\u{1D49E}":"Cscr",\u2102:"Copf",\u0107:"cacute",\u0106:"Cacute",\u0109:"ccirc",\u0108:"Ccirc",\u010D:"ccaron",\u010C:"Ccaron",\u010B:"cdot",\u010A:"Cdot",\u00E7:"ccedil",\u00C7:"Ccedil","\u2105":"incare","\u{1D521}":"dfr","\u2146":"dd","\u{1D555}":"dopf","\u{1D4B9}":"dscr","\u{1D49F}":"Dscr","\u{1D507}":"Dfr","\u2145":"DD","\u{1D53B}":"Dopf",\u010F:"dcaron",\u010E:"Dcaron",\u0111:"dstrok",\u0110:"Dstrok",\u00F0:"eth",\u00D0:"ETH","\u2147":"ee",\u212F:"escr","\u{1D522}":"efr","\u{1D556}":"eopf",\u2130:"Escr","\u{1D508}":"Efr","\u{1D53C}":"Eopf",\u00E9:"eacute",\u00C9:"Eacute",\u00E8:"egrave",\u00C8:"Egrave",\u00EA:"ecirc",\u00CA:"Ecirc",\u011B:"ecaron",\u011A:"Ecaron",\u00EB:"euml",\u00CB:"Euml",\u0117:"edot",\u0116:"Edot",\u0119:"eogon",\u0118:"Eogon",\u0113:"emacr",\u0112:"Emacr","\u{1D523}":"ffr","\u{1D557}":"fopf","\u{1D4BB}":"fscr","\u{1D509}":"Ffr","\u{1D53D}":"Fopf",\u2131:"Fscr",\uFB00:"fflig",\uFB03:"ffilig",\uFB04:"ffllig",\uFB01:"filig",fj:"fjlig",\uFB02:"fllig",\u0192:"fnof",\u210A:"gscr","\u{1D558}":"gopf","\u{1D524}":"gfr","\u{1D4A2}":"Gscr","\u{1D53E}":"Gopf","\u{1D50A}":"Gfr",\u01F5:"gacute",\u011F:"gbreve",\u011E:"Gbreve",\u011D:"gcirc",\u011C:"Gcirc",\u0121:"gdot",\u0120:"Gdot",\u0122:"Gcedil","\u{1D525}":"hfr",\u210E:"planckh","\u{1D4BD}":"hscr","\u{1D559}":"hopf",\u210B:"Hscr",\u210C:"Hfr",\u210D:"Hopf",\u0125:"hcirc",\u0124:"Hcirc",\u210F:"hbar",\u0127:"hstrok",\u0126:"Hstrok","\u{1D55A}":"iopf","\u{1D526}":"ifr","\u{1D4BE}":"iscr","\u2148":"ii","\u{1D540}":"Iopf",\u2110:"Iscr",\u2111:"Im",\u00ED:"iacute",\u00CD:"Iacute",\u00EC:"igrave",\u00CC:"Igrave",\u00EE:"icirc",\u00CE:"Icirc",\u00EF:"iuml",\u00CF:"Iuml",\u0129:"itilde",\u0128:"Itilde",\u0130:"Idot",\u012F:"iogon",\u012E:"Iogon",\u012B:"imacr",\u012A:"Imacr",\u0133:"ijlig",\u0132:"IJlig",\u0131:"imath","\u{1D4BF}":"jscr","\u{1D55B}":"jopf","\u{1D527}":"jfr","\u{1D4A5}":"Jscr","\u{1D50D}":"Jfr","\u{1D541}":"Jopf",\u0135:"jcirc",\u0134:"Jcirc","\u0237":"jmath","\u{1D55C}":"kopf","\u{1D4C0}":"kscr","\u{1D528}":"kfr","\u{1D4A6}":"Kscr","\u{1D542}":"Kopf","\u{1D50E}":"Kfr",\u0137:"kcedil",\u0136:"Kcedil","\u{1D529}":"lfr","\u{1D4C1}":"lscr",\u2113:"ell","\u{1D55D}":"lopf",\u2112:"Lscr","\u{1D50F}":"Lfr","\u{1D543}":"Lopf",\u013A:"lacute",\u0139:"Lacute",\u013E:"lcaron",\u013D:"Lcaron",\u013C:"lcedil",\u013B:"Lcedil",\u0142:"lstrok",\u0141:"Lstrok",\u0140:"lmidot",\u013F:"Lmidot","\u{1D52A}":"mfr","\u{1D55E}":"mopf","\u{1D4C2}":"mscr","\u{1D510}":"Mfr","\u{1D544}":"Mopf",\u2133:"Mscr","\u{1D52B}":"nfr","\u{1D55F}":"nopf","\u{1D4C3}":"nscr",\u2115:"Nopf","\u{1D4A9}":"Nscr","\u{1D511}":"Nfr",\u0144:"nacute",\u0143:"Nacute",\u0148:"ncaron",\u0147:"Ncaron",\u00F1:"ntilde",\u00D1:"Ntilde",\u0146:"ncedil",\u0145:"Ncedil","\u2116":"numero",\u014B:"eng",\u014A:"ENG","\u{1D560}":"oopf","\u{1D52C}":"ofr",\u2134:"oscr","\u{1D4AA}":"Oscr","\u{1D512}":"Ofr","\u{1D546}":"Oopf",\u00BA:"ordm",\u00F3:"oacute",\u00D3:"Oacute",\u00F2:"ograve",\u00D2:"Ograve",\u00F4:"ocirc",\u00D4:"Ocirc",\u00F6:"ouml",\u00D6:"Ouml",\u0151:"odblac",\u0150:"Odblac",\u00F5:"otilde",\u00D5:"Otilde",\u00F8:"oslash",\u00D8:"Oslash",\u014D:"omacr",\u014C:"Omacr",\u0153:"oelig",\u0152:"OElig","\u{1D52D}":"pfr","\u{1D4C5}":"pscr","\u{1D561}":"popf",\u2119:"Popf","\u{1D513}":"Pfr","\u{1D4AB}":"Pscr","\u{1D562}":"qopf","\u{1D52E}":"qfr","\u{1D4C6}":"qscr","\u{1D4AC}":"Qscr","\u{1D514}":"Qfr",\u211A:"Qopf",\u0138:"kgreen","\u{1D52F}":"rfr","\u{1D563}":"ropf","\u{1D4C7}":"rscr",\u211B:"Rscr",\u211C:"Re",\u211D:"Ropf",\u0155:"racute",\u0154:"Racute",\u0159:"rcaron",\u0158:"Rcaron",\u0157:"rcedil",\u0156:"Rcedil","\u{1D564}":"sopf","\u{1D4C8}":"sscr","\u{1D530}":"sfr","\u{1D54A}":"Sopf","\u{1D516}":"Sfr","\u{1D4AE}":"Sscr","\u24C8":"oS",\u015B:"sacute",\u015A:"Sacute",\u015D:"scirc",\u015C:"Scirc",\u0161:"scaron",\u0160:"Scaron",\u015F:"scedil",\u015E:"Scedil",\u00DF:"szlig","\u{1D531}":"tfr","\u{1D4C9}":"tscr","\u{1D565}":"topf","\u{1D4AF}":"Tscr","\u{1D517}":"Tfr","\u{1D54B}":"Topf",\u0165:"tcaron",\u0164:"Tcaron",\u0163:"tcedil",\u0162:"Tcedil","\u2122":"trade",\u0167:"tstrok",\u0166:"Tstrok","\u{1D4CA}":"uscr","\u{1D566}":"uopf","\u{1D532}":"ufr","\u{1D54C}":"Uopf","\u{1D518}":"Ufr","\u{1D4B0}":"Uscr",\u00FA:"uacute",\u00DA:"Uacute",\u00F9:"ugrave",\u00D9:"Ugrave",\u016D:"ubreve",\u016C:"Ubreve",\u00FB:"ucirc",\u00DB:"Ucirc",\u016F:"uring",\u016E:"Uring",\u00FC:"uuml",\u00DC:"Uuml",\u0171:"udblac",\u0170:"Udblac",\u0169:"utilde",\u0168:"Utilde",\u0173:"uogon",\u0172:"Uogon",\u016B:"umacr",\u016A:"Umacr","\u{1D533}":"vfr","\u{1D567}":"vopf","\u{1D4CB}":"vscr","\u{1D519}":"Vfr","\u{1D54D}":"Vopf","\u{1D4B1}":"Vscr","\u{1D568}":"wopf","\u{1D4CC}":"wscr","\u{1D534}":"wfr","\u{1D4B2}":"Wscr","\u{1D54E}":"Wopf","\u{1D51A}":"Wfr",\u0175:"wcirc",\u0174:"Wcirc","\u{1D535}":"xfr","\u{1D4CD}":"xscr","\u{1D569}":"xopf","\u{1D54F}":"Xopf","\u{1D51B}":"Xfr","\u{1D4B3}":"Xscr","\u{1D536}":"yfr","\u{1D4CE}":"yscr","\u{1D56A}":"yopf","\u{1D4B4}":"Yscr","\u{1D51C}":"Yfr","\u{1D550}":"Yopf",\u00FD:"yacute",\u00DD:"Yacute",\u0177:"ycirc",\u0176:"Ycirc",\u00FF:"yuml",\u0178:"Yuml","\u{1D4CF}":"zscr","\u{1D537}":"zfr","\u{1D56B}":"zopf",\u2128:"Zfr",\u2124:"Zopf","\u{1D4B5}":"Zscr",\u017A:"zacute",\u0179:"Zacute",\u017E:"zcaron",\u017D:"Zcaron",\u017C:"zdot",\u017B:"Zdot",\u01B5:"imped",\u00FE:"thorn",\u00DE:"THORN",\u0149:"napos",\u03B1:"alpha",\u0391:"Alpha",\u03B2:"beta",\u0392:"Beta",\u03B3:"gamma",\u0393:"Gamma",\u03B4:"delta",\u0394:"Delta",\u03B5:"epsi","\u03F5":"epsiv",\u0395:"Epsilon",\u03DD:"gammad",\u03DC:"Gammad",\u03B6:"zeta",\u0396:"Zeta",\u03B7:"eta",\u0397:"Eta",\u03B8:"theta",\u03D1:"thetav",\u0398:"Theta",\u03B9:"iota",\u0399:"Iota",\u03BA:"kappa",\u03F0:"kappav",\u039A:"Kappa",\u03BB:"lambda",\u039B:"Lambda",\u03BC:"mu",\u00B5:"micro",\u039C:"Mu",\u03BD:"nu",\u039D:"Nu",\u03BE:"xi",\u039E:"Xi",\u03BF:"omicron",\u039F:"Omicron",\u03C0:"pi",\u03D6:"piv",\u03A0:"Pi",\u03C1:"rho",\u03F1:"rhov",\u03A1:"Rho",\u03C3:"sigma",\u03A3:"Sigma",\u03C2:"sigmaf",\u03C4:"tau",\u03A4:"Tau",\u03C5:"upsi",\u03A5:"Upsilon",\u03D2:"Upsi",\u03C6:"phi",\u03D5:"phiv",\u03A6:"Phi",\u03C7:"chi",\u03A7:"Chi",\u03C8:"psi",\u03A8:"Psi",\u03C9:"omega",\u03A9:"ohm",\u0430:"acy",\u0410:"Acy",\u0431:"bcy",\u0411:"Bcy",\u0432:"vcy",\u0412:"Vcy",\u0433:"gcy",\u0413:"Gcy",\u0453:"gjcy",\u0403:"GJcy",\u0434:"dcy",\u0414:"Dcy",\u0452:"djcy",\u0402:"DJcy",\u0435:"iecy",\u0415:"IEcy",\u0451:"iocy",\u0401:"IOcy",\u0454:"jukcy",\u0404:"Jukcy",\u0436:"zhcy",\u0416:"ZHcy",\u0437:"zcy",\u0417:"Zcy",\u0455:"dscy",\u0405:"DScy",\u0438:"icy",\u0418:"Icy",\u0456:"iukcy",\u0406:"Iukcy",\u0457:"yicy",\u0407:"YIcy",\u0439:"jcy",\u0419:"Jcy",\u0458:"jsercy",\u0408:"Jsercy",\u043A:"kcy",\u041A:"Kcy",\u045C:"kjcy",\u040C:"KJcy",\u043B:"lcy",\u041B:"Lcy",\u0459:"ljcy",\u0409:"LJcy",\u043C:"mcy",\u041C:"Mcy",\u043D:"ncy",\u041D:"Ncy",\u045A:"njcy",\u040A:"NJcy",\u043E:"ocy",\u041E:"Ocy",\u043F:"pcy",\u041F:"Pcy",\u0440:"rcy",\u0420:"Rcy",\u0441:"scy",\u0421:"Scy",\u0442:"tcy",\u0422:"Tcy",\u045B:"tshcy",\u040B:"TSHcy",\u0443:"ucy",\u0423:"Ucy",\u045E:"ubrcy",\u040E:"Ubrcy",\u0444:"fcy",\u0424:"Fcy",\u0445:"khcy",\u0425:"KHcy",\u0446:"tscy",\u0426:"TScy",\u0447:"chcy",\u0427:"CHcy",\u045F:"dzcy",\u040F:"DZcy",\u0448:"shcy",\u0428:"SHcy",\u0449:"shchcy",\u0429:"SHCHcy",\u044A:"hardcy",\u042A:"HARDcy",\u044B:"ycy",\u042B:"Ycy",\u044C:"softcy",\u042C:"SOFTcy",\u044D:"ecy",\u042D:"Ecy",\u044E:"yucy",\u042E:"YUcy",\u044F:"yacy",\u042F:"YAcy",\u2135:"aleph",\u2136:"beth",\u2137:"gimel",\u2138:"daleth"},l=/["&'<>`]/g,u={'"':""","&":"&","'":"'","<":"<",">":">","`":"`"},f=/&#(?:[xX][^a-fA-F0-9]|[^0-9xX])/,h=/[\0-\x08\x0B\x0E-\x1F\x7F-\x9F\uFDD0-\uFDEF\uFFFE\uFFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F\uDBBF\uDBFF][\uDFFE\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,m=/&(CounterClockwiseContourIntegral|DoubleLongLeftRightArrow|ClockwiseContourIntegral|NotNestedGreaterGreater|NotSquareSupersetEqual|DiacriticalDoubleAcute|NotRightTriangleEqual|NotSucceedsSlantEqual|NotPrecedesSlantEqual|CloseCurlyDoubleQuote|NegativeVeryThinSpace|DoubleContourIntegral|FilledVerySmallSquare|CapitalDifferentialD|OpenCurlyDoubleQuote|EmptyVerySmallSquare|NestedGreaterGreater|DoubleLongRightArrow|NotLeftTriangleEqual|NotGreaterSlantEqual|ReverseUpEquilibrium|DoubleLeftRightArrow|NotSquareSubsetEqual|NotDoubleVerticalBar|RightArrowLeftArrow|NotGreaterFullEqual|NotRightTriangleBar|SquareSupersetEqual|DownLeftRightVector|DoubleLongLeftArrow|leftrightsquigarrow|LeftArrowRightArrow|NegativeMediumSpace|blacktriangleright|RightDownVectorBar|PrecedesSlantEqual|RightDoubleBracket|SucceedsSlantEqual|NotLeftTriangleBar|RightTriangleEqual|SquareIntersection|RightDownTeeVector|ReverseEquilibrium|NegativeThickSpace|longleftrightarrow|Longleftrightarrow|LongLeftRightArrow|DownRightTeeVector|DownRightVectorBar|GreaterSlantEqual|SquareSubsetEqual|LeftDownVectorBar|LeftDoubleBracket|VerticalSeparator|rightleftharpoons|NotGreaterGreater|NotSquareSuperset|blacktriangleleft|blacktriangledown|NegativeThinSpace|LeftDownTeeVector|NotLessSlantEqual|leftrightharpoons|DoubleUpDownArrow|DoubleVerticalBar|LeftTriangleEqual|FilledSmallSquare|twoheadrightarrow|NotNestedLessLess|DownLeftTeeVector|DownLeftVectorBar|RightAngleBracket|NotTildeFullEqual|NotReverseElement|RightUpDownVector|DiacriticalTilde|NotSucceedsTilde|circlearrowright|NotPrecedesEqual|rightharpoondown|DoubleRightArrow|NotSucceedsEqual|NonBreakingSpace|NotRightTriangle|LessEqualGreater|RightUpTeeVector|LeftAngleBracket|GreaterFullEqual|DownArrowUpArrow|RightUpVectorBar|twoheadleftarrow|GreaterEqualLess|downharpoonright|RightTriangleBar|ntrianglerighteq|NotSupersetEqual|LeftUpDownVector|DiacriticalAcute|rightrightarrows|vartriangleright|UpArrowDownArrow|DiacriticalGrave|UnderParenthesis|EmptySmallSquare|LeftUpVectorBar|leftrightarrows|DownRightVector|downharpoonleft|trianglerighteq|ShortRightArrow|OverParenthesis|DoubleLeftArrow|DoubleDownArrow|NotSquareSubset|bigtriangledown|ntrianglelefteq|UpperRightArrow|curvearrowright|vartriangleleft|NotLeftTriangle|nleftrightarrow|LowerRightArrow|NotHumpDownHump|NotGreaterTilde|rightthreetimes|LeftUpTeeVector|NotGreaterEqual|straightepsilon|LeftTriangleBar|rightsquigarrow|ContourIntegral|rightleftarrows|CloseCurlyQuote|RightDownVector|LeftRightVector|nLeftrightarrow|leftharpoondown|circlearrowleft|SquareSuperset|OpenCurlyQuote|hookrightarrow|HorizontalLine|DiacriticalDot|NotLessGreater|ntriangleright|DoubleRightTee|InvisibleComma|InvisibleTimes|LowerLeftArrow|DownLeftVector|NotSubsetEqual|curvearrowleft|trianglelefteq|NotVerticalBar|TildeFullEqual|downdownarrows|NotGreaterLess|RightTeeVector|ZeroWidthSpace|looparrowright|LongRightArrow|doublebarwedge|ShortLeftArrow|ShortDownArrow|RightVectorBar|GreaterGreater|ReverseElement|rightharpoonup|LessSlantEqual|leftthreetimes|upharpoonright|rightarrowtail|LeftDownVector|Longrightarrow|NestedLessLess|UpperLeftArrow|nshortparallel|leftleftarrows|leftrightarrow|Leftrightarrow|LeftRightArrow|longrightarrow|upharpoonleft|RightArrowBar|ApplyFunction|LeftTeeVector|leftarrowtail|NotEqualTilde|varsubsetneqq|varsupsetneqq|RightTeeArrow|SucceedsEqual|SucceedsTilde|LeftVectorBar|SupersetEqual|hookleftarrow|DifferentialD|VerticalTilde|VeryThinSpace|blacktriangle|bigtriangleup|LessFullEqual|divideontimes|leftharpoonup|UpEquilibrium|ntriangleleft|RightTriangle|measuredangle|shortparallel|longleftarrow|Longleftarrow|LongLeftArrow|DoubleLeftTee|Poincareplane|PrecedesEqual|triangleright|DoubleUpArrow|RightUpVector|fallingdotseq|looparrowleft|PrecedesTilde|NotTildeEqual|NotTildeTilde|smallsetminus|Proportional|triangleleft|triangledown|UnderBracket|NotHumpEqual|exponentiale|ExponentialE|NotLessTilde|HilbertSpace|RightCeiling|blacklozenge|varsupsetneq|HumpDownHump|GreaterEqual|VerticalLine|LeftTeeArrow|NotLessEqual|DownTeeArrow|LeftTriangle|varsubsetneq|Intersection|NotCongruent|DownArrowBar|LeftUpVector|LeftArrowBar|risingdotseq|GreaterTilde|RoundImplies|SquareSubset|ShortUpArrow|NotSuperset|quaternions|precnapprox|backepsilon|preccurlyeq|OverBracket|blacksquare|MediumSpace|VerticalBar|circledcirc|circleddash|CircleMinus|CircleTimes|LessGreater|curlyeqprec|curlyeqsucc|diamondsuit|UpDownArrow|Updownarrow|RuleDelayed|Rrightarrow|updownarrow|RightVector|nRightarrow|nrightarrow|eqslantless|LeftCeiling|Equilibrium|SmallCircle|expectation|NotSucceeds|thickapprox|GreaterLess|SquareUnion|NotPrecedes|NotLessLess|straightphi|succnapprox|succcurlyeq|SubsetEqual|sqsupseteq|Proportion|Laplacetrf|ImaginaryI|supsetneqq|NotGreater|gtreqqless|NotElement|ThickSpace|TildeEqual|TildeTilde|Fouriertrf|rmoustache|EqualTilde|eqslantgtr|UnderBrace|LeftVector|UpArrowBar|nLeftarrow|nsubseteqq|subsetneqq|nsupseteqq|nleftarrow|succapprox|lessapprox|UpTeeArrow|upuparrows|curlywedge|lesseqqgtr|varepsilon|varnothing|RightFloor|complement|CirclePlus|sqsubseteq|Lleftarrow|circledast|RightArrow|Rightarrow|rightarrow|lmoustache|Bernoullis|precapprox|mapstoleft|mapstodown|longmapsto|dotsquare|downarrow|DoubleDot|nsubseteq|supsetneq|leftarrow|nsupseteq|subsetneq|ThinSpace|ngeqslant|subseteqq|HumpEqual|NotSubset|triangleq|NotCupCap|lesseqgtr|heartsuit|TripleDot|Leftarrow|Coproduct|Congruent|varpropto|complexes|gvertneqq|LeftArrow|LessTilde|supseteqq|MinusPlus|CircleDot|nleqslant|NotExists|gtreqless|nparallel|UnionPlus|LeftFloor|checkmark|CenterDot|centerdot|Mellintrf|gtrapprox|bigotimes|OverBrace|spadesuit|therefore|pitchfork|rationals|PlusMinus|Backslash|Therefore|DownBreve|backsimeq|backprime|DownArrow|nshortmid|Downarrow|lvertneqq|eqvparsl|imagline|imagpart|infintie|integers|Integral|intercal|LessLess|Uarrocir|intlarhk|sqsupset|angmsdaf|sqsubset|llcorner|vartheta|cupbrcap|lnapprox|Superset|SuchThat|succnsim|succneqq|angmsdag|biguplus|curlyvee|trpezium|Succeeds|NotTilde|bigwedge|angmsdah|angrtvbd|triminus|cwconint|fpartint|lrcorner|smeparsl|subseteq|urcorner|lurdshar|laemptyv|DDotrahd|approxeq|ldrushar|awconint|mapstoup|backcong|shortmid|triangle|geqslant|gesdotol|timesbar|circledR|circledS|setminus|multimap|naturals|scpolint|ncongdot|RightTee|boxminus|gnapprox|boxtimes|andslope|thicksim|angmsdaa|varsigma|cirfnint|rtriltri|angmsdab|rppolint|angmsdac|barwedge|drbkarow|clubsuit|thetasym|bsolhsub|capbrcup|dzigrarr|doteqdot|DotEqual|dotminus|UnderBar|NotEqual|realpart|otimesas|ulcorner|hksearow|hkswarow|parallel|PartialD|elinters|emptyset|plusacir|bbrktbrk|angmsdad|pointint|bigoplus|angmsdae|Precedes|bigsqcup|varkappa|notindot|supseteq|precneqq|precnsim|profalar|profline|profsurf|leqslant|lesdotor|raemptyv|subplus|notnivb|notnivc|subrarr|zigrarr|vzigzag|submult|subedot|Element|between|cirscir|larrbfs|larrsim|lotimes|lbrksld|lbrkslu|lozenge|ldrdhar|dbkarow|bigcirc|epsilon|simrarr|simplus|ltquest|Epsilon|luruhar|gtquest|maltese|npolint|eqcolon|npreceq|bigodot|ddagger|gtrless|bnequiv|harrcir|ddotseq|equivDD|backsim|demptyv|nsqsube|nsqsupe|Upsilon|nsubset|upsilon|minusdu|nsucceq|swarrow|nsupset|coloneq|searrow|boxplus|napprox|natural|asympeq|alefsym|congdot|nearrow|bigstar|diamond|supplus|tritime|LeftTee|nvinfin|triplus|NewLine|nvltrie|nvrtrie|nwarrow|nexists|Diamond|ruluhar|Implies|supmult|angzarr|suplarr|suphsub|questeq|because|digamma|Because|olcross|bemptyv|omicron|Omicron|rotimes|NoBreak|intprod|angrtvb|orderof|uwangle|suphsol|lesdoto|orslope|DownTee|realine|cudarrl|rdldhar|OverBar|supedot|lessdot|supdsub|topfork|succsim|rbrkslu|rbrksld|pertenk|cudarrr|isindot|planckh|lessgtr|pluscir|gesdoto|plussim|plustwo|lesssim|cularrp|rarrsim|Cayleys|notinva|notinvb|notinvc|UpArrow|Uparrow|uparrow|NotLess|dwangle|precsim|Product|curarrm|Cconint|dotplus|rarrbfs|ccupssm|Cedilla|cemptyv|notniva|quatint|frac35|frac38|frac45|frac56|frac58|frac78|tridot|xoplus|gacute|gammad|Gammad|lfisht|lfloor|bigcup|sqsupe|gbreve|Gbreve|lharul|sqsube|sqcups|Gcedil|apacir|llhard|lmidot|Lmidot|lmoust|andand|sqcaps|approx|Abreve|spades|circeq|tprime|divide|topcir|Assign|topbot|gesdot|divonx|xuplus|timesd|gesles|atilde|solbar|SOFTcy|loplus|timesb|lowast|lowbar|dlcorn|dlcrop|softcy|dollar|lparlt|thksim|lrhard|Atilde|lsaquo|smashp|bigvee|thinsp|wreath|bkarow|lsquor|lstrok|Lstrok|lthree|ltimes|ltlarr|DotDot|simdot|ltrPar|weierp|xsqcup|angmsd|sigmav|sigmaf|zeetrf|Zcaron|zcaron|mapsto|vsupne|thetav|cirmid|marker|mcomma|Zacute|vsubnE|there4|gtlPar|vsubne|bottom|gtrarr|SHCHcy|shchcy|midast|midcir|middot|minusb|minusd|gtrdot|bowtie|sfrown|mnplus|models|colone|seswar|Colone|mstpos|searhk|gtrsim|nacute|Nacute|boxbox|telrec|hairsp|Tcedil|nbumpe|scnsim|ncaron|Ncaron|ncedil|Ncedil|hamilt|Scedil|nearhk|hardcy|HARDcy|tcedil|Tcaron|commat|nequiv|nesear|tcaron|target|hearts|nexist|varrho|scedil|Scaron|scaron|hellip|Sacute|sacute|hercon|swnwar|compfn|rtimes|rthree|rsquor|rsaquo|zacute|wedgeq|homtht|barvee|barwed|Barwed|rpargt|horbar|conint|swarhk|roplus|nltrie|hslash|hstrok|Hstrok|rmoust|Conint|bprime|hybull|hyphen|iacute|Iacute|supsup|supsub|supsim|varphi|coprod|brvbar|agrave|Supset|supset|igrave|Igrave|notinE|Agrave|iiiint|iinfin|copysr|wedbar|Verbar|vangrt|becaus|incare|verbar|inodot|bullet|drcorn|intcal|drcrop|cularr|vellip|Utilde|bumpeq|cupcap|dstrok|Dstrok|CupCap|cupcup|cupdot|eacute|Eacute|supdot|iquest|easter|ecaron|Ecaron|ecolon|isinsv|utilde|itilde|Itilde|curarr|succeq|Bumpeq|cacute|ulcrop|nparsl|Cacute|nprcue|egrave|Egrave|nrarrc|nrarrw|subsup|subsub|nrtrie|jsercy|nsccue|Jsercy|kappav|kcedil|Kcedil|subsim|ulcorn|nsimeq|egsdot|veebar|kgreen|capand|elsdot|Subset|subset|curren|aacute|lacute|Lacute|emptyv|ntilde|Ntilde|lagran|lambda|Lambda|capcap|Ugrave|langle|subdot|emsp13|numero|emsp14|nvdash|nvDash|nVdash|nVDash|ugrave|ufisht|nvHarr|larrfs|nvlArr|larrhk|larrlp|larrpl|nvrArr|Udblac|nwarhk|larrtl|nwnear|oacute|Oacute|latail|lAtail|sstarf|lbrace|odblac|Odblac|lbrack|udblac|odsold|eparsl|lcaron|Lcaron|ograve|Ograve|lcedil|Lcedil|Aacute|ssmile|ssetmn|squarf|ldquor|capcup|ominus|cylcty|rharul|eqcirc|dagger|rfloor|rfisht|Dagger|daleth|equals|origof|capdot|equest|dcaron|Dcaron|rdquor|oslash|Oslash|otilde|Otilde|otimes|Otimes|urcrop|Ubreve|ubreve|Yacute|Uacute|uacute|Rcedil|rcedil|urcorn|parsim|Rcaron|Vdashl|rcaron|Tstrok|percnt|period|permil|Exists|yacute|rbrack|rbrace|phmmat|ccaron|Ccaron|planck|ccedil|plankv|tstrok|female|plusdo|plusdu|ffilig|plusmn|ffllig|Ccedil|rAtail|dfisht|bernou|ratail|Rarrtl|rarrtl|angsph|rarrpl|rarrlp|rarrhk|xwedge|xotime|forall|ForAll|Vvdash|vsupnE|preceq|bigcap|frac12|frac13|frac14|primes|rarrfs|prnsim|frac15|Square|frac16|square|lesdot|frac18|frac23|propto|prurel|rarrap|rangle|puncsp|frac25|Racute|qprime|racute|lesges|frac34|abreve|AElig|eqsim|utdot|setmn|urtri|Equal|Uring|seArr|uring|searr|dashv|Dashv|mumap|nabla|iogon|Iogon|sdote|sdotb|scsim|napid|napos|equiv|natur|Acirc|dblac|erarr|nbump|iprod|erDot|ucirc|awint|esdot|angrt|ncong|isinE|scnap|Scirc|scirc|ndash|isins|Ubrcy|nearr|neArr|isinv|nedot|ubrcy|acute|Ycirc|iukcy|Iukcy|xutri|nesim|caret|jcirc|Jcirc|caron|twixt|ddarr|sccue|exist|jmath|sbquo|ngeqq|angst|ccaps|lceil|ngsim|UpTee|delta|Delta|rtrif|nharr|nhArr|nhpar|rtrie|jukcy|Jukcy|kappa|rsquo|Kappa|nlarr|nlArr|TSHcy|rrarr|aogon|Aogon|fflig|xrarr|tshcy|ccirc|nleqq|filig|upsih|nless|dharl|nlsim|fjlig|ropar|nltri|dharr|robrk|roarr|fllig|fltns|roang|rnmid|subnE|subne|lAarr|trisb|Ccirc|acirc|ccups|blank|VDash|forkv|Vdash|langd|cedil|blk12|blk14|laquo|strns|diams|notin|vDash|larrb|blk34|block|disin|uplus|vdash|vBarv|aelig|starf|Wedge|check|xrArr|lates|lbarr|lBarr|notni|lbbrk|bcong|frasl|lbrke|frown|vrtri|vprop|vnsup|gamma|Gamma|wedge|xodot|bdquo|srarr|doteq|ldquo|boxdl|boxdL|gcirc|Gcirc|boxDl|boxDL|boxdr|boxdR|boxDr|TRADE|trade|rlhar|boxDR|vnsub|npart|vltri|rlarr|boxhd|boxhD|nprec|gescc|nrarr|nrArr|boxHd|boxHD|boxhu|boxhU|nrtri|boxHu|clubs|boxHU|times|colon|Colon|gimel|xlArr|Tilde|nsime|tilde|nsmid|nspar|THORN|thorn|xlarr|nsube|nsubE|thkap|xhArr|comma|nsucc|boxul|boxuL|nsupe|nsupE|gneqq|gnsim|boxUl|boxUL|grave|boxur|boxuR|boxUr|boxUR|lescc|angle|bepsi|boxvh|varpi|boxvH|numsp|Theta|gsime|gsiml|theta|boxVh|boxVH|boxvl|gtcir|gtdot|boxvL|boxVl|boxVL|crarr|cross|Cross|nvsim|boxvr|nwarr|nwArr|sqsup|dtdot|Uogon|lhard|lharu|dtrif|ocirc|Ocirc|lhblk|duarr|odash|sqsub|Hacek|sqcup|llarr|duhar|oelig|OElig|ofcir|boxvR|uogon|lltri|boxVr|csube|uuarr|ohbar|csupe|ctdot|olarr|olcir|harrw|oline|sqcap|omacr|Omacr|omega|Omega|boxVR|aleph|lneqq|lnsim|loang|loarr|rharu|lobrk|hcirc|operp|oplus|rhard|Hcirc|orarr|Union|order|ecirc|Ecirc|cuepr|szlig|cuesc|breve|reals|eDDot|Breve|hoarr|lopar|utrif|rdquo|Umacr|umacr|efDot|swArr|ultri|alpha|rceil|ovbar|swarr|Wcirc|wcirc|smtes|smile|bsemi|lrarr|aring|parsl|lrhar|bsime|uhblk|lrtri|cupor|Aring|uharr|uharl|slarr|rbrke|bsolb|lsime|rbbrk|RBarr|lsimg|phone|rBarr|rbarr|icirc|lsquo|Icirc|emacr|Emacr|ratio|simne|plusb|simlE|simgE|simeq|pluse|ltcir|ltdot|empty|xharr|xdtri|iexcl|Alpha|ltrie|rarrw|pound|ltrif|xcirc|bumpe|prcue|bumpE|asymp|amacr|cuvee|Sigma|sigma|iiint|udhar|iiota|ijlig|IJlig|supnE|imacr|Imacr|prime|Prime|image|prnap|eogon|Eogon|rarrc|mdash|mDDot|cuwed|imath|supne|imped|Amacr|udarr|prsim|micro|rarrb|cwint|raquo|infin|eplus|range|rangd|Ucirc|radic|minus|amalg|veeeq|rAarr|epsiv|ycirc|quest|sharp|quot|zwnj|Qscr|race|qscr|Qopf|qopf|qint|rang|Rang|Zscr|zscr|Zopf|zopf|rarr|rArr|Rarr|Pscr|pscr|prop|prod|prnE|prec|ZHcy|zhcy|prap|Zeta|zeta|Popf|popf|Zdot|plus|zdot|Yuml|yuml|phiv|YUcy|yucy|Yscr|yscr|perp|Yopf|yopf|part|para|YIcy|Ouml|rcub|yicy|YAcy|rdca|ouml|osol|Oscr|rdsh|yacy|real|oscr|xvee|andd|rect|andv|Xscr|oror|ordm|ordf|xscr|ange|aopf|Aopf|rHar|Xopf|opar|Oopf|xopf|xnis|rhov|oopf|omid|xmap|oint|apid|apos|ogon|ascr|Ascr|odot|odiv|xcup|xcap|ocir|oast|nvlt|nvle|nvgt|nvge|nvap|Wscr|wscr|auml|ntlg|ntgl|nsup|nsub|nsim|Nscr|nscr|nsce|Wopf|ring|npre|wopf|npar|Auml|Barv|bbrk|Nopf|nopf|nmid|nLtv|beta|ropf|Ropf|Beta|beth|nles|rpar|nleq|bnot|bNot|nldr|NJcy|rscr|Rscr|Vscr|vscr|rsqb|njcy|bopf|nisd|Bopf|rtri|Vopf|nGtv|ngtr|vopf|boxh|boxH|boxv|nges|ngeq|boxV|bscr|scap|Bscr|bsim|Vert|vert|bsol|bull|bump|caps|cdot|ncup|scnE|ncap|nbsp|napE|Cdot|cent|sdot|Vbar|nang|vBar|chcy|Mscr|mscr|sect|semi|CHcy|Mopf|mopf|sext|circ|cire|mldr|mlcp|cirE|comp|shcy|SHcy|vArr|varr|cong|copf|Copf|copy|COPY|malt|male|macr|lvnE|cscr|ltri|sime|ltcc|simg|Cscr|siml|csub|Uuml|lsqb|lsim|uuml|csup|Lscr|lscr|utri|smid|lpar|cups|smte|lozf|darr|Lopf|Uscr|solb|lopf|sopf|Sopf|lneq|uscr|spar|dArr|lnap|Darr|dash|Sqrt|LJcy|ljcy|lHar|dHar|Upsi|upsi|diam|lesg|djcy|DJcy|leqq|dopf|Dopf|dscr|Dscr|dscy|ldsh|ldca|squf|DScy|sscr|Sscr|dsol|lcub|late|star|Star|Uopf|Larr|lArr|larr|uopf|dtri|dzcy|sube|subE|Lang|lang|Kscr|kscr|Kopf|kopf|KJcy|kjcy|KHcy|khcy|DZcy|ecir|edot|eDot|Jscr|jscr|succ|Jopf|jopf|Edot|uHar|emsp|ensp|Iuml|iuml|eopf|isin|Iscr|iscr|Eopf|epar|sung|epsi|escr|sup1|sup2|sup3|Iota|iota|supe|supE|Iopf|iopf|IOcy|iocy|Escr|esim|Esim|imof|Uarr|QUOT|uArr|uarr|euml|IEcy|iecy|Idot|Euml|euro|excl|Hscr|hscr|Hopf|hopf|TScy|tscy|Tscr|hbar|tscr|flat|tbrk|fnof|hArr|harr|half|fopf|Fopf|tdot|gvnE|fork|trie|gtcc|fscr|Fscr|gdot|gsim|Gscr|gscr|Gopf|gopf|gneq|Gdot|tosa|gnap|Topf|topf|geqq|toea|GJcy|gjcy|tint|gesl|mid|Sfr|ggg|top|ges|gla|glE|glj|geq|gne|gEl|gel|gnE|Gcy|gcy|gap|Tfr|tfr|Tcy|tcy|Hat|Tau|Ffr|tau|Tab|hfr|Hfr|ffr|Fcy|fcy|icy|Icy|iff|ETH|eth|ifr|Ifr|Eta|eta|int|Int|Sup|sup|ucy|Ucy|Sum|sum|jcy|ENG|ufr|Ufr|eng|Jcy|jfr|els|ell|egs|Efr|efr|Jfr|uml|kcy|Kcy|Ecy|ecy|kfr|Kfr|lap|Sub|sub|lat|lcy|Lcy|leg|Dot|dot|lEg|leq|les|squ|div|die|lfr|Lfr|lgE|Dfr|dfr|Del|deg|Dcy|dcy|lne|lnE|sol|loz|smt|Cup|lrm|cup|lsh|Lsh|sim|shy|map|Map|mcy|Mcy|mfr|Mfr|mho|gfr|Gfr|sfr|cir|Chi|chi|nap|Cfr|vcy|Vcy|cfr|Scy|scy|ncy|Ncy|vee|Vee|Cap|cap|nfr|scE|sce|Nfr|nge|ngE|nGg|vfr|Vfr|ngt|bot|nGt|nis|niv|Rsh|rsh|nle|nlE|bne|Bfr|bfr|nLl|nlt|nLt|Bcy|bcy|not|Not|rlm|wfr|Wfr|npr|nsc|num|ocy|ast|Ocy|ofr|xfr|Xfr|Ofr|ogt|ohm|apE|olt|Rho|ape|rho|Rfr|rfr|ord|REG|ang|reg|orv|And|and|AMP|Rcy|amp|Afr|ycy|Ycy|yen|yfr|Yfr|rcy|par|pcy|Pcy|pfr|Pfr|phi|Phi|afr|Acy|acy|zcy|Zcy|piv|acE|acd|zfr|Zfr|pre|prE|psi|Psi|qfr|Qfr|zwj|Or|ge|Gg|gt|gg|el|oS|lt|Lt|LT|Re|lg|gl|eg|ne|Im|it|le|DD|wp|wr|nu|Nu|dd|lE|Sc|sc|pi|Pi|ee|af|ll|Ll|rx|gE|xi|pm|Xi|ic|pr|Pr|in|ni|mp|mu|ac|Mu|or|ap|Gt|GT|ii);|&(Aacute|Agrave|Atilde|Ccedil|Eacute|Egrave|Iacute|Igrave|Ntilde|Oacute|Ograve|Oslash|Otilde|Uacute|Ugrave|Yacute|aacute|agrave|atilde|brvbar|ccedil|curren|divide|eacute|egrave|frac12|frac14|frac34|iacute|igrave|iquest|middot|ntilde|oacute|ograve|oslash|otilde|plusmn|uacute|ugrave|yacute|AElig|Acirc|Aring|Ecirc|Icirc|Ocirc|THORN|Ucirc|acirc|acute|aelig|aring|cedil|ecirc|icirc|iexcl|laquo|micro|ocirc|pound|raquo|szlig|thorn|times|ucirc|Auml|COPY|Euml|Iuml|Ouml|QUOT|Uuml|auml|cent|copy|euml|iuml|macr|nbsp|ordf|ordm|ouml|para|quot|sect|sup1|sup2|sup3|uuml|yuml|AMP|ETH|REG|amp|deg|eth|not|reg|shy|uml|yen|GT|LT|gt|lt)(?!;)([=a-zA-Z0-9]?)|&#([0-9]+)(;?)|&#[xX]([a-fA-F0-9]+)(;?)|&([0-9a-zA-Z]+)/g,v={aacute:"\xE1",Aacute:"\xC1",abreve:"\u0103",Abreve:"\u0102",ac:"\u223E",acd:"\u223F",acE:"\u223E\u0333",acirc:"\xE2",Acirc:"\xC2",acute:"\xB4",acy:"\u0430",Acy:"\u0410",aelig:"\xE6",AElig:"\xC6",af:"\u2061",afr:"\u{1D51E}",Afr:"\u{1D504}",agrave:"\xE0",Agrave:"\xC0",alefsym:"\u2135",aleph:"\u2135",alpha:"\u03B1",Alpha:"\u0391",amacr:"\u0101",Amacr:"\u0100",amalg:"\u2A3F",amp:"&",AMP:"&",and:"\u2227",And:"\u2A53",andand:"\u2A55",andd:"\u2A5C",andslope:"\u2A58",andv:"\u2A5A",ang:"\u2220",ange:"\u29A4",angle:"\u2220",angmsd:"\u2221",angmsdaa:"\u29A8",angmsdab:"\u29A9",angmsdac:"\u29AA",angmsdad:"\u29AB",angmsdae:"\u29AC",angmsdaf:"\u29AD",angmsdag:"\u29AE",angmsdah:"\u29AF",angrt:"\u221F",angrtvb:"\u22BE",angrtvbd:"\u299D",angsph:"\u2222",angst:"\xC5",angzarr:"\u237C",aogon:"\u0105",Aogon:"\u0104",aopf:"\u{1D552}",Aopf:"\u{1D538}",ap:"\u2248",apacir:"\u2A6F",ape:"\u224A",apE:"\u2A70",apid:"\u224B",apos:"'",ApplyFunction:"\u2061",approx:"\u2248",approxeq:"\u224A",aring:"\xE5",Aring:"\xC5",ascr:"\u{1D4B6}",Ascr:"\u{1D49C}",Assign:"\u2254",ast:"*",asymp:"\u2248",asympeq:"\u224D",atilde:"\xE3",Atilde:"\xC3",auml:"\xE4",Auml:"\xC4",awconint:"\u2233",awint:"\u2A11",backcong:"\u224C",backepsilon:"\u03F6",backprime:"\u2035",backsim:"\u223D",backsimeq:"\u22CD",Backslash:"\u2216",Barv:"\u2AE7",barvee:"\u22BD",barwed:"\u2305",Barwed:"\u2306",barwedge:"\u2305",bbrk:"\u23B5",bbrktbrk:"\u23B6",bcong:"\u224C",bcy:"\u0431",Bcy:"\u0411",bdquo:"\u201E",becaus:"\u2235",because:"\u2235",Because:"\u2235",bemptyv:"\u29B0",bepsi:"\u03F6",bernou:"\u212C",Bernoullis:"\u212C",beta:"\u03B2",Beta:"\u0392",beth:"\u2136",between:"\u226C",bfr:"\u{1D51F}",Bfr:"\u{1D505}",bigcap:"\u22C2",bigcirc:"\u25EF",bigcup:"\u22C3",bigodot:"\u2A00",bigoplus:"\u2A01",bigotimes:"\u2A02",bigsqcup:"\u2A06",bigstar:"\u2605",bigtriangledown:"\u25BD",bigtriangleup:"\u25B3",biguplus:"\u2A04",bigvee:"\u22C1",bigwedge:"\u22C0",bkarow:"\u290D",blacklozenge:"\u29EB",blacksquare:"\u25AA",blacktriangle:"\u25B4",blacktriangledown:"\u25BE",blacktriangleleft:"\u25C2",blacktriangleright:"\u25B8",blank:"\u2423",blk12:"\u2592",blk14:"\u2591",blk34:"\u2593",block:"\u2588",bne:"=\u20E5",bnequiv:"\u2261\u20E5",bnot:"\u2310",bNot:"\u2AED",bopf:"\u{1D553}",Bopf:"\u{1D539}",bot:"\u22A5",bottom:"\u22A5",bowtie:"\u22C8",boxbox:"\u29C9",boxdl:"\u2510",boxdL:"\u2555",boxDl:"\u2556",boxDL:"\u2557",boxdr:"\u250C",boxdR:"\u2552",boxDr:"\u2553",boxDR:"\u2554",boxh:"\u2500",boxH:"\u2550",boxhd:"\u252C",boxhD:"\u2565",boxHd:"\u2564",boxHD:"\u2566",boxhu:"\u2534",boxhU:"\u2568",boxHu:"\u2567",boxHU:"\u2569",boxminus:"\u229F",boxplus:"\u229E",boxtimes:"\u22A0",boxul:"\u2518",boxuL:"\u255B",boxUl:"\u255C",boxUL:"\u255D",boxur:"\u2514",boxuR:"\u2558",boxUr:"\u2559",boxUR:"\u255A",boxv:"\u2502",boxV:"\u2551",boxvh:"\u253C",boxvH:"\u256A",boxVh:"\u256B",boxVH:"\u256C",boxvl:"\u2524",boxvL:"\u2561",boxVl:"\u2562",boxVL:"\u2563",boxvr:"\u251C",boxvR:"\u255E",boxVr:"\u255F",boxVR:"\u2560",bprime:"\u2035",breve:"\u02D8",Breve:"\u02D8",brvbar:"\xA6",bscr:"\u{1D4B7}",Bscr:"\u212C",bsemi:"\u204F",bsim:"\u223D",bsime:"\u22CD",bsol:"\\",bsolb:"\u29C5",bsolhsub:"\u27C8",bull:"\u2022",bullet:"\u2022",bump:"\u224E",bumpe:"\u224F",bumpE:"\u2AAE",bumpeq:"\u224F",Bumpeq:"\u224E",cacute:"\u0107",Cacute:"\u0106",cap:"\u2229",Cap:"\u22D2",capand:"\u2A44",capbrcup:"\u2A49",capcap:"\u2A4B",capcup:"\u2A47",capdot:"\u2A40",CapitalDifferentialD:"\u2145",caps:"\u2229\uFE00",caret:"\u2041",caron:"\u02C7",Cayleys:"\u212D",ccaps:"\u2A4D",ccaron:"\u010D",Ccaron:"\u010C",ccedil:"\xE7",Ccedil:"\xC7",ccirc:"\u0109",Ccirc:"\u0108",Cconint:"\u2230",ccups:"\u2A4C",ccupssm:"\u2A50",cdot:"\u010B",Cdot:"\u010A",cedil:"\xB8",Cedilla:"\xB8",cemptyv:"\u29B2",cent:"\xA2",centerdot:"\xB7",CenterDot:"\xB7",cfr:"\u{1D520}",Cfr:"\u212D",chcy:"\u0447",CHcy:"\u0427",check:"\u2713",checkmark:"\u2713",chi:"\u03C7",Chi:"\u03A7",cir:"\u25CB",circ:"\u02C6",circeq:"\u2257",circlearrowleft:"\u21BA",circlearrowright:"\u21BB",circledast:"\u229B",circledcirc:"\u229A",circleddash:"\u229D",CircleDot:"\u2299",circledR:"\xAE",circledS:"\u24C8",CircleMinus:"\u2296",CirclePlus:"\u2295",CircleTimes:"\u2297",cire:"\u2257",cirE:"\u29C3",cirfnint:"\u2A10",cirmid:"\u2AEF",cirscir:"\u29C2",ClockwiseContourIntegral:"\u2232",CloseCurlyDoubleQuote:"\u201D",CloseCurlyQuote:"\u2019",clubs:"\u2663",clubsuit:"\u2663",colon:":",Colon:"\u2237",colone:"\u2254",Colone:"\u2A74",coloneq:"\u2254",comma:",",commat:"@",comp:"\u2201",compfn:"\u2218",complement:"\u2201",complexes:"\u2102",cong:"\u2245",congdot:"\u2A6D",Congruent:"\u2261",conint:"\u222E",Conint:"\u222F",ContourIntegral:"\u222E",copf:"\u{1D554}",Copf:"\u2102",coprod:"\u2210",Coproduct:"\u2210",copy:"\xA9",COPY:"\xA9",copysr:"\u2117",CounterClockwiseContourIntegral:"\u2233",crarr:"\u21B5",cross:"\u2717",Cross:"\u2A2F",cscr:"\u{1D4B8}",Cscr:"\u{1D49E}",csub:"\u2ACF",csube:"\u2AD1",csup:"\u2AD0",csupe:"\u2AD2",ctdot:"\u22EF",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22DE",cuesc:"\u22DF",cularr:"\u21B6",cularrp:"\u293D",cup:"\u222A",Cup:"\u22D3",cupbrcap:"\u2A48",cupcap:"\u2A46",CupCap:"\u224D",cupcup:"\u2A4A",cupdot:"\u228D",cupor:"\u2A45",cups:"\u222A\uFE00",curarr:"\u21B7",curarrm:"\u293C",curlyeqprec:"\u22DE",curlyeqsucc:"\u22DF",curlyvee:"\u22CE",curlywedge:"\u22CF",curren:"\xA4",curvearrowleft:"\u21B6",curvearrowright:"\u21B7",cuvee:"\u22CE",cuwed:"\u22CF",cwconint:"\u2232",cwint:"\u2231",cylcty:"\u232D",dagger:"\u2020",Dagger:"\u2021",daleth:"\u2138",darr:"\u2193",dArr:"\u21D3",Darr:"\u21A1",dash:"\u2010",dashv:"\u22A3",Dashv:"\u2AE4",dbkarow:"\u290F",dblac:"\u02DD",dcaron:"\u010F",Dcaron:"\u010E",dcy:"\u0434",Dcy:"\u0414",dd:"\u2146",DD:"\u2145",ddagger:"\u2021",ddarr:"\u21CA",DDotrahd:"\u2911",ddotseq:"\u2A77",deg:"\xB0",Del:"\u2207",delta:"\u03B4",Delta:"\u0394",demptyv:"\u29B1",dfisht:"\u297F",dfr:"\u{1D521}",Dfr:"\u{1D507}",dHar:"\u2965",dharl:"\u21C3",dharr:"\u21C2",DiacriticalAcute:"\xB4",DiacriticalDot:"\u02D9",DiacriticalDoubleAcute:"\u02DD",DiacriticalGrave:"`",DiacriticalTilde:"\u02DC",diam:"\u22C4",diamond:"\u22C4",Diamond:"\u22C4",diamondsuit:"\u2666",diams:"\u2666",die:"\xA8",DifferentialD:"\u2146",digamma:"\u03DD",disin:"\u22F2",div:"\xF7",divide:"\xF7",divideontimes:"\u22C7",divonx:"\u22C7",djcy:"\u0452",DJcy:"\u0402",dlcorn:"\u231E",dlcrop:"\u230D",dollar:"$",dopf:"\u{1D555}",Dopf:"\u{1D53B}",dot:"\u02D9",Dot:"\xA8",DotDot:"\u20DC",doteq:"\u2250",doteqdot:"\u2251",DotEqual:"\u2250",dotminus:"\u2238",dotplus:"\u2214",dotsquare:"\u22A1",doublebarwedge:"\u2306",DoubleContourIntegral:"\u222F",DoubleDot:"\xA8",DoubleDownArrow:"\u21D3",DoubleLeftArrow:"\u21D0",DoubleLeftRightArrow:"\u21D4",DoubleLeftTee:"\u2AE4",DoubleLongLeftArrow:"\u27F8",DoubleLongLeftRightArrow:"\u27FA",DoubleLongRightArrow:"\u27F9",DoubleRightArrow:"\u21D2",DoubleRightTee:"\u22A8",DoubleUpArrow:"\u21D1",DoubleUpDownArrow:"\u21D5",DoubleVerticalBar:"\u2225",downarrow:"\u2193",Downarrow:"\u21D3",DownArrow:"\u2193",DownArrowBar:"\u2913",DownArrowUpArrow:"\u21F5",DownBreve:"\u0311",downdownarrows:"\u21CA",downharpoonleft:"\u21C3",downharpoonright:"\u21C2",DownLeftRightVector:"\u2950",DownLeftTeeVector:"\u295E",DownLeftVector:"\u21BD",DownLeftVectorBar:"\u2956",DownRightTeeVector:"\u295F",DownRightVector:"\u21C1",DownRightVectorBar:"\u2957",DownTee:"\u22A4",DownTeeArrow:"\u21A7",drbkarow:"\u2910",drcorn:"\u231F",drcrop:"\u230C",dscr:"\u{1D4B9}",Dscr:"\u{1D49F}",dscy:"\u0455",DScy:"\u0405",dsol:"\u29F6",dstrok:"\u0111",Dstrok:"\u0110",dtdot:"\u22F1",dtri:"\u25BF",dtrif:"\u25BE",duarr:"\u21F5",duhar:"\u296F",dwangle:"\u29A6",dzcy:"\u045F",DZcy:"\u040F",dzigrarr:"\u27FF",eacute:"\xE9",Eacute:"\xC9",easter:"\u2A6E",ecaron:"\u011B",Ecaron:"\u011A",ecir:"\u2256",ecirc:"\xEA",Ecirc:"\xCA",ecolon:"\u2255",ecy:"\u044D",Ecy:"\u042D",eDDot:"\u2A77",edot:"\u0117",eDot:"\u2251",Edot:"\u0116",ee:"\u2147",efDot:"\u2252",efr:"\u{1D522}",Efr:"\u{1D508}",eg:"\u2A9A",egrave:"\xE8",Egrave:"\xC8",egs:"\u2A96",egsdot:"\u2A98",el:"\u2A99",Element:"\u2208",elinters:"\u23E7",ell:"\u2113",els:"\u2A95",elsdot:"\u2A97",emacr:"\u0113",Emacr:"\u0112",empty:"\u2205",emptyset:"\u2205",EmptySmallSquare:"\u25FB",emptyv:"\u2205",EmptyVerySmallSquare:"\u25AB",emsp:"\u2003",emsp13:"\u2004",emsp14:"\u2005",eng:"\u014B",ENG:"\u014A",ensp:"\u2002",eogon:"\u0119",Eogon:"\u0118",eopf:"\u{1D556}",Eopf:"\u{1D53C}",epar:"\u22D5",eparsl:"\u29E3",eplus:"\u2A71",epsi:"\u03B5",epsilon:"\u03B5",Epsilon:"\u0395",epsiv:"\u03F5",eqcirc:"\u2256",eqcolon:"\u2255",eqsim:"\u2242",eqslantgtr:"\u2A96",eqslantless:"\u2A95",Equal:"\u2A75",equals:"=",EqualTilde:"\u2242",equest:"\u225F",Equilibrium:"\u21CC",equiv:"\u2261",equivDD:"\u2A78",eqvparsl:"\u29E5",erarr:"\u2971",erDot:"\u2253",escr:"\u212F",Escr:"\u2130",esdot:"\u2250",esim:"\u2242",Esim:"\u2A73",eta:"\u03B7",Eta:"\u0397",eth:"\xF0",ETH:"\xD0",euml:"\xEB",Euml:"\xCB",euro:"\u20AC",excl:"!",exist:"\u2203",Exists:"\u2203",expectation:"\u2130",exponentiale:"\u2147",ExponentialE:"\u2147",fallingdotseq:"\u2252",fcy:"\u0444",Fcy:"\u0424",female:"\u2640",ffilig:"\uFB03",fflig:"\uFB00",ffllig:"\uFB04",ffr:"\u{1D523}",Ffr:"\u{1D509}",filig:"\uFB01",FilledSmallSquare:"\u25FC",FilledVerySmallSquare:"\u25AA",fjlig:"fj",flat:"\u266D",fllig:"\uFB02",fltns:"\u25B1",fnof:"\u0192",fopf:"\u{1D557}",Fopf:"\u{1D53D}",forall:"\u2200",ForAll:"\u2200",fork:"\u22D4",forkv:"\u2AD9",Fouriertrf:"\u2131",fpartint:"\u2A0D",frac12:"\xBD",frac13:"\u2153",frac14:"\xBC",frac15:"\u2155",frac16:"\u2159",frac18:"\u215B",frac23:"\u2154",frac25:"\u2156",frac34:"\xBE",frac35:"\u2157",frac38:"\u215C",frac45:"\u2158",frac56:"\u215A",frac58:"\u215D",frac78:"\u215E",frasl:"\u2044",frown:"\u2322",fscr:"\u{1D4BB}",Fscr:"\u2131",gacute:"\u01F5",gamma:"\u03B3",Gamma:"\u0393",gammad:"\u03DD",Gammad:"\u03DC",gap:"\u2A86",gbreve:"\u011F",Gbreve:"\u011E",Gcedil:"\u0122",gcirc:"\u011D",Gcirc:"\u011C",gcy:"\u0433",Gcy:"\u0413",gdot:"\u0121",Gdot:"\u0120",ge:"\u2265",gE:"\u2267",gel:"\u22DB",gEl:"\u2A8C",geq:"\u2265",geqq:"\u2267",geqslant:"\u2A7E",ges:"\u2A7E",gescc:"\u2AA9",gesdot:"\u2A80",gesdoto:"\u2A82",gesdotol:"\u2A84",gesl:"\u22DB\uFE00",gesles:"\u2A94",gfr:"\u{1D524}",Gfr:"\u{1D50A}",gg:"\u226B",Gg:"\u22D9",ggg:"\u22D9",gimel:"\u2137",gjcy:"\u0453",GJcy:"\u0403",gl:"\u2277",gla:"\u2AA5",glE:"\u2A92",glj:"\u2AA4",gnap:"\u2A8A",gnapprox:"\u2A8A",gne:"\u2A88",gnE:"\u2269",gneq:"\u2A88",gneqq:"\u2269",gnsim:"\u22E7",gopf:"\u{1D558}",Gopf:"\u{1D53E}",grave:"`",GreaterEqual:"\u2265",GreaterEqualLess:"\u22DB",GreaterFullEqual:"\u2267",GreaterGreater:"\u2AA2",GreaterLess:"\u2277",GreaterSlantEqual:"\u2A7E",GreaterTilde:"\u2273",gscr:"\u210A",Gscr:"\u{1D4A2}",gsim:"\u2273",gsime:"\u2A8E",gsiml:"\u2A90",gt:">",Gt:"\u226B",GT:">",gtcc:"\u2AA7",gtcir:"\u2A7A",gtdot:"\u22D7",gtlPar:"\u2995",gtquest:"\u2A7C",gtrapprox:"\u2A86",gtrarr:"\u2978",gtrdot:"\u22D7",gtreqless:"\u22DB",gtreqqless:"\u2A8C",gtrless:"\u2277",gtrsim:"\u2273",gvertneqq:"\u2269\uFE00",gvnE:"\u2269\uFE00",Hacek:"\u02C7",hairsp:"\u200A",half:"\xBD",hamilt:"\u210B",hardcy:"\u044A",HARDcy:"\u042A",harr:"\u2194",hArr:"\u21D4",harrcir:"\u2948",harrw:"\u21AD",Hat:"^",hbar:"\u210F",hcirc:"\u0125",Hcirc:"\u0124",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",hercon:"\u22B9",hfr:"\u{1D525}",Hfr:"\u210C",HilbertSpace:"\u210B",hksearow:"\u2925",hkswarow:"\u2926",hoarr:"\u21FF",homtht:"\u223B",hookleftarrow:"\u21A9",hookrightarrow:"\u21AA",hopf:"\u{1D559}",Hopf:"\u210D",horbar:"\u2015",HorizontalLine:"\u2500",hscr:"\u{1D4BD}",Hscr:"\u210B",hslash:"\u210F",hstrok:"\u0127",Hstrok:"\u0126",HumpDownHump:"\u224E",HumpEqual:"\u224F",hybull:"\u2043",hyphen:"\u2010",iacute:"\xED",Iacute:"\xCD",ic:"\u2063",icirc:"\xEE",Icirc:"\xCE",icy:"\u0438",Icy:"\u0418",Idot:"\u0130",iecy:"\u0435",IEcy:"\u0415",iexcl:"\xA1",iff:"\u21D4",ifr:"\u{1D526}",Ifr:"\u2111",igrave:"\xEC",Igrave:"\xCC",ii:"\u2148",iiiint:"\u2A0C",iiint:"\u222D",iinfin:"\u29DC",iiota:"\u2129",ijlig:"\u0133",IJlig:"\u0132",Im:"\u2111",imacr:"\u012B",Imacr:"\u012A",image:"\u2111",ImaginaryI:"\u2148",imagline:"\u2110",imagpart:"\u2111",imath:"\u0131",imof:"\u22B7",imped:"\u01B5",Implies:"\u21D2",in:"\u2208",incare:"\u2105",infin:"\u221E",infintie:"\u29DD",inodot:"\u0131",int:"\u222B",Int:"\u222C",intcal:"\u22BA",integers:"\u2124",Integral:"\u222B",intercal:"\u22BA",Intersection:"\u22C2",intlarhk:"\u2A17",intprod:"\u2A3C",InvisibleComma:"\u2063",InvisibleTimes:"\u2062",iocy:"\u0451",IOcy:"\u0401",iogon:"\u012F",Iogon:"\u012E",iopf:"\u{1D55A}",Iopf:"\u{1D540}",iota:"\u03B9",Iota:"\u0399",iprod:"\u2A3C",iquest:"\xBF",iscr:"\u{1D4BE}",Iscr:"\u2110",isin:"\u2208",isindot:"\u22F5",isinE:"\u22F9",isins:"\u22F4",isinsv:"\u22F3",isinv:"\u2208",it:"\u2062",itilde:"\u0129",Itilde:"\u0128",iukcy:"\u0456",Iukcy:"\u0406",iuml:"\xEF",Iuml:"\xCF",jcirc:"\u0135",Jcirc:"\u0134",jcy:"\u0439",Jcy:"\u0419",jfr:"\u{1D527}",Jfr:"\u{1D50D}",jmath:"\u0237",jopf:"\u{1D55B}",Jopf:"\u{1D541}",jscr:"\u{1D4BF}",Jscr:"\u{1D4A5}",jsercy:"\u0458",Jsercy:"\u0408",jukcy:"\u0454",Jukcy:"\u0404",kappa:"\u03BA",Kappa:"\u039A",kappav:"\u03F0",kcedil:"\u0137",Kcedil:"\u0136",kcy:"\u043A",Kcy:"\u041A",kfr:"\u{1D528}",Kfr:"\u{1D50E}",kgreen:"\u0138",khcy:"\u0445",KHcy:"\u0425",kjcy:"\u045C",KJcy:"\u040C",kopf:"\u{1D55C}",Kopf:"\u{1D542}",kscr:"\u{1D4C0}",Kscr:"\u{1D4A6}",lAarr:"\u21DA",lacute:"\u013A",Lacute:"\u0139",laemptyv:"\u29B4",lagran:"\u2112",lambda:"\u03BB",Lambda:"\u039B",lang:"\u27E8",Lang:"\u27EA",langd:"\u2991",langle:"\u27E8",lap:"\u2A85",Laplacetrf:"\u2112",laquo:"\xAB",larr:"\u2190",lArr:"\u21D0",Larr:"\u219E",larrb:"\u21E4",larrbfs:"\u291F",larrfs:"\u291D",larrhk:"\u21A9",larrlp:"\u21AB",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21A2",lat:"\u2AAB",latail:"\u2919",lAtail:"\u291B",late:"\u2AAD",lates:"\u2AAD\uFE00",lbarr:"\u290C",lBarr:"\u290E",lbbrk:"\u2772",lbrace:"{",lbrack:"[",lbrke:"\u298B",lbrksld:"\u298F",lbrkslu:"\u298D",lcaron:"\u013E",Lcaron:"\u013D",lcedil:"\u013C",Lcedil:"\u013B",lceil:"\u2308",lcub:"{",lcy:"\u043B",Lcy:"\u041B",ldca:"\u2936",ldquo:"\u201C",ldquor:"\u201E",ldrdhar:"\u2967",ldrushar:"\u294B",ldsh:"\u21B2",le:"\u2264",lE:"\u2266",LeftAngleBracket:"\u27E8",leftarrow:"\u2190",Leftarrow:"\u21D0",LeftArrow:"\u2190",LeftArrowBar:"\u21E4",LeftArrowRightArrow:"\u21C6",leftarrowtail:"\u21A2",LeftCeiling:"\u2308",LeftDoubleBracket:"\u27E6",LeftDownTeeVector:"\u2961",LeftDownVector:"\u21C3",LeftDownVectorBar:"\u2959",LeftFloor:"\u230A",leftharpoondown:"\u21BD",leftharpoonup:"\u21BC",leftleftarrows:"\u21C7",leftrightarrow:"\u2194",Leftrightarrow:"\u21D4",LeftRightArrow:"\u2194",leftrightarrows:"\u21C6",leftrightharpoons:"\u21CB",leftrightsquigarrow:"\u21AD",LeftRightVector:"\u294E",LeftTee:"\u22A3",LeftTeeArrow:"\u21A4",LeftTeeVector:"\u295A",leftthreetimes:"\u22CB",LeftTriangle:"\u22B2",LeftTriangleBar:"\u29CF",LeftTriangleEqual:"\u22B4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVector:"\u21BF",LeftUpVectorBar:"\u2958",LeftVector:"\u21BC",LeftVectorBar:"\u2952",leg:"\u22DA",lEg:"\u2A8B",leq:"\u2264",leqq:"\u2266",leqslant:"\u2A7D",les:"\u2A7D",lescc:"\u2AA8",lesdot:"\u2A7F",lesdoto:"\u2A81",lesdotor:"\u2A83",lesg:"\u22DA\uFE00",lesges:"\u2A93",lessapprox:"\u2A85",lessdot:"\u22D6",lesseqgtr:"\u22DA",lesseqqgtr:"\u2A8B",LessEqualGreater:"\u22DA",LessFullEqual:"\u2266",LessGreater:"\u2276",lessgtr:"\u2276",LessLess:"\u2AA1",lesssim:"\u2272",LessSlantEqual:"\u2A7D",LessTilde:"\u2272",lfisht:"\u297C",lfloor:"\u230A",lfr:"\u{1D529}",Lfr:"\u{1D50F}",lg:"\u2276",lgE:"\u2A91",lHar:"\u2962",lhard:"\u21BD",lharu:"\u21BC",lharul:"\u296A",lhblk:"\u2584",ljcy:"\u0459",LJcy:"\u0409",ll:"\u226A",Ll:"\u22D8",llarr:"\u21C7",llcorner:"\u231E",Lleftarrow:"\u21DA",llhard:"\u296B",lltri:"\u25FA",lmidot:"\u0140",Lmidot:"\u013F",lmoust:"\u23B0",lmoustache:"\u23B0",lnap:"\u2A89",lnapprox:"\u2A89",lne:"\u2A87",lnE:"\u2268",lneq:"\u2A87",lneqq:"\u2268",lnsim:"\u22E6",loang:"\u27EC",loarr:"\u21FD",lobrk:"\u27E6",longleftarrow:"\u27F5",Longleftarrow:"\u27F8",LongLeftArrow:"\u27F5",longleftrightarrow:"\u27F7",Longleftrightarrow:"\u27FA",LongLeftRightArrow:"\u27F7",longmapsto:"\u27FC",longrightarrow:"\u27F6",Longrightarrow:"\u27F9",LongRightArrow:"\u27F6",looparrowleft:"\u21AB",looparrowright:"\u21AC",lopar:"\u2985",lopf:"\u{1D55D}",Lopf:"\u{1D543}",loplus:"\u2A2D",lotimes:"\u2A34",lowast:"\u2217",lowbar:"_",LowerLeftArrow:"\u2199",LowerRightArrow:"\u2198",loz:"\u25CA",lozenge:"\u25CA",lozf:"\u29EB",lpar:"(",lparlt:"\u2993",lrarr:"\u21C6",lrcorner:"\u231F",lrhar:"\u21CB",lrhard:"\u296D",lrm:"\u200E",lrtri:"\u22BF",lsaquo:"\u2039",lscr:"\u{1D4C1}",Lscr:"\u2112",lsh:"\u21B0",Lsh:"\u21B0",lsim:"\u2272",lsime:"\u2A8D",lsimg:"\u2A8F",lsqb:"[",lsquo:"\u2018",lsquor:"\u201A",lstrok:"\u0142",Lstrok:"\u0141",lt:"<",Lt:"\u226A",LT:"<",ltcc:"\u2AA6",ltcir:"\u2A79",ltdot:"\u22D6",lthree:"\u22CB",ltimes:"\u22C9",ltlarr:"\u2976",ltquest:"\u2A7B",ltri:"\u25C3",ltrie:"\u22B4",ltrif:"\u25C2",ltrPar:"\u2996",lurdshar:"\u294A",luruhar:"\u2966",lvertneqq:"\u2268\uFE00",lvnE:"\u2268\uFE00",macr:"\xAF",male:"\u2642",malt:"\u2720",maltese:"\u2720",map:"\u21A6",Map:"\u2905",mapsto:"\u21A6",mapstodown:"\u21A7",mapstoleft:"\u21A4",mapstoup:"\u21A5",marker:"\u25AE",mcomma:"\u2A29",mcy:"\u043C",Mcy:"\u041C",mdash:"\u2014",mDDot:"\u223A",measuredangle:"\u2221",MediumSpace:"\u205F",Mellintrf:"\u2133",mfr:"\u{1D52A}",Mfr:"\u{1D510}",mho:"\u2127",micro:"\xB5",mid:"\u2223",midast:"*",midcir:"\u2AF0",middot:"\xB7",minus:"\u2212",minusb:"\u229F",minusd:"\u2238",minusdu:"\u2A2A",MinusPlus:"\u2213",mlcp:"\u2ADB",mldr:"\u2026",mnplus:"\u2213",models:"\u22A7",mopf:"\u{1D55E}",Mopf:"\u{1D544}",mp:"\u2213",mscr:"\u{1D4C2}",Mscr:"\u2133",mstpos:"\u223E",mu:"\u03BC",Mu:"\u039C",multimap:"\u22B8",mumap:"\u22B8",nabla:"\u2207",nacute:"\u0144",Nacute:"\u0143",nang:"\u2220\u20D2",nap:"\u2249",napE:"\u2A70\u0338",napid:"\u224B\u0338",napos:"\u0149",napprox:"\u2249",natur:"\u266E",natural:"\u266E",naturals:"\u2115",nbsp:"\xA0",nbump:"\u224E\u0338",nbumpe:"\u224F\u0338",ncap:"\u2A43",ncaron:"\u0148",Ncaron:"\u0147",ncedil:"\u0146",Ncedil:"\u0145",ncong:"\u2247",ncongdot:"\u2A6D\u0338",ncup:"\u2A42",ncy:"\u043D",Ncy:"\u041D",ndash:"\u2013",ne:"\u2260",nearhk:"\u2924",nearr:"\u2197",neArr:"\u21D7",nearrow:"\u2197",nedot:"\u2250\u0338",NegativeMediumSpace:"\u200B",NegativeThickSpace:"\u200B",NegativeThinSpace:"\u200B",NegativeVeryThinSpace:"\u200B",nequiv:"\u2262",nesear:"\u2928",nesim:"\u2242\u0338",NestedGreaterGreater:"\u226B",NestedLessLess:"\u226A",NewLine:` -`,nexist:"\u2204",nexists:"\u2204",nfr:"\u{1D52B}",Nfr:"\u{1D511}",nge:"\u2271",ngE:"\u2267\u0338",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",nGg:"\u22D9\u0338",ngsim:"\u2275",ngt:"\u226F",nGt:"\u226B\u20D2",ngtr:"\u226F",nGtv:"\u226B\u0338",nharr:"\u21AE",nhArr:"\u21CE",nhpar:"\u2AF2",ni:"\u220B",nis:"\u22FC",nisd:"\u22FA",niv:"\u220B",njcy:"\u045A",NJcy:"\u040A",nlarr:"\u219A",nlArr:"\u21CD",nldr:"\u2025",nle:"\u2270",nlE:"\u2266\u0338",nleftarrow:"\u219A",nLeftarrow:"\u21CD",nleftrightarrow:"\u21AE",nLeftrightarrow:"\u21CE",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",nless:"\u226E",nLl:"\u22D8\u0338",nlsim:"\u2274",nlt:"\u226E",nLt:"\u226A\u20D2",nltri:"\u22EA",nltrie:"\u22EC",nLtv:"\u226A\u0338",nmid:"\u2224",NoBreak:"\u2060",NonBreakingSpace:"\xA0",nopf:"\u{1D55F}",Nopf:"\u2115",not:"\xAC",Not:"\u2AEC",NotCongruent:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226F",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",notin:"\u2209",notindot:"\u22F5\u0338",notinE:"\u22F9\u0338",notinva:"\u2209",notinvb:"\u22F7",notinvc:"\u22F6",NotLeftTriangle:"\u22EA",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangleEqual:"\u22EC",NotLess:"\u226E",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",notni:"\u220C",notniva:"\u220C",notnivb:"\u22FE",notnivc:"\u22FD",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",NotReverseElement:"\u220C",NotRightTriangle:"\u22EB",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangleEqual:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",NotSubset:"\u2282\u20D2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",npar:"\u2226",nparallel:"\u2226",nparsl:"\u2AFD\u20E5",npart:"\u2202\u0338",npolint:"\u2A14",npr:"\u2280",nprcue:"\u22E0",npre:"\u2AAF\u0338",nprec:"\u2280",npreceq:"\u2AAF\u0338",nrarr:"\u219B",nrArr:"\u21CF",nrarrc:"\u2933\u0338",nrarrw:"\u219D\u0338",nrightarrow:"\u219B",nRightarrow:"\u21CF",nrtri:"\u22EB",nrtrie:"\u22ED",nsc:"\u2281",nsccue:"\u22E1",nsce:"\u2AB0\u0338",nscr:"\u{1D4C3}",Nscr:"\u{1D4A9}",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22E2",nsqsupe:"\u22E3",nsub:"\u2284",nsube:"\u2288",nsubE:"\u2AC5\u0338",nsubset:"\u2282\u20D2",nsubseteq:"\u2288",nsubseteqq:"\u2AC5\u0338",nsucc:"\u2281",nsucceq:"\u2AB0\u0338",nsup:"\u2285",nsupe:"\u2289",nsupE:"\u2AC6\u0338",nsupset:"\u2283\u20D2",nsupseteq:"\u2289",nsupseteqq:"\u2AC6\u0338",ntgl:"\u2279",ntilde:"\xF1",Ntilde:"\xD1",ntlg:"\u2278",ntriangleleft:"\u22EA",ntrianglelefteq:"\u22EC",ntriangleright:"\u22EB",ntrianglerighteq:"\u22ED",nu:"\u03BD",Nu:"\u039D",num:"#",numero:"\u2116",numsp:"\u2007",nvap:"\u224D\u20D2",nvdash:"\u22AC",nvDash:"\u22AD",nVdash:"\u22AE",nVDash:"\u22AF",nvge:"\u2265\u20D2",nvgt:">\u20D2",nvHarr:"\u2904",nvinfin:"\u29DE",nvlArr:"\u2902",nvle:"\u2264\u20D2",nvlt:"<\u20D2",nvltrie:"\u22B4\u20D2",nvrArr:"\u2903",nvrtrie:"\u22B5\u20D2",nvsim:"\u223C\u20D2",nwarhk:"\u2923",nwarr:"\u2196",nwArr:"\u21D6",nwarrow:"\u2196",nwnear:"\u2927",oacute:"\xF3",Oacute:"\xD3",oast:"\u229B",ocir:"\u229A",ocirc:"\xF4",Ocirc:"\xD4",ocy:"\u043E",Ocy:"\u041E",odash:"\u229D",odblac:"\u0151",Odblac:"\u0150",odiv:"\u2A38",odot:"\u2299",odsold:"\u29BC",oelig:"\u0153",OElig:"\u0152",ofcir:"\u29BF",ofr:"\u{1D52C}",Ofr:"\u{1D512}",ogon:"\u02DB",ograve:"\xF2",Ograve:"\xD2",ogt:"\u29C1",ohbar:"\u29B5",ohm:"\u03A9",oint:"\u222E",olarr:"\u21BA",olcir:"\u29BE",olcross:"\u29BB",oline:"\u203E",olt:"\u29C0",omacr:"\u014D",Omacr:"\u014C",omega:"\u03C9",Omega:"\u03A9",omicron:"\u03BF",Omicron:"\u039F",omid:"\u29B6",ominus:"\u2296",oopf:"\u{1D560}",Oopf:"\u{1D546}",opar:"\u29B7",OpenCurlyDoubleQuote:"\u201C",OpenCurlyQuote:"\u2018",operp:"\u29B9",oplus:"\u2295",or:"\u2228",Or:"\u2A54",orarr:"\u21BB",ord:"\u2A5D",order:"\u2134",orderof:"\u2134",ordf:"\xAA",ordm:"\xBA",origof:"\u22B6",oror:"\u2A56",orslope:"\u2A57",orv:"\u2A5B",oS:"\u24C8",oscr:"\u2134",Oscr:"\u{1D4AA}",oslash:"\xF8",Oslash:"\xD8",osol:"\u2298",otilde:"\xF5",Otilde:"\xD5",otimes:"\u2297",Otimes:"\u2A37",otimesas:"\u2A36",ouml:"\xF6",Ouml:"\xD6",ovbar:"\u233D",OverBar:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",OverParenthesis:"\u23DC",par:"\u2225",para:"\xB6",parallel:"\u2225",parsim:"\u2AF3",parsl:"\u2AFD",part:"\u2202",PartialD:"\u2202",pcy:"\u043F",Pcy:"\u041F",percnt:"%",period:".",permil:"\u2030",perp:"\u22A5",pertenk:"\u2031",pfr:"\u{1D52D}",Pfr:"\u{1D513}",phi:"\u03C6",Phi:"\u03A6",phiv:"\u03D5",phmmat:"\u2133",phone:"\u260E",pi:"\u03C0",Pi:"\u03A0",pitchfork:"\u22D4",piv:"\u03D6",planck:"\u210F",planckh:"\u210E",plankv:"\u210F",plus:"+",plusacir:"\u2A23",plusb:"\u229E",pluscir:"\u2A22",plusdo:"\u2214",plusdu:"\u2A25",pluse:"\u2A72",PlusMinus:"\xB1",plusmn:"\xB1",plussim:"\u2A26",plustwo:"\u2A27",pm:"\xB1",Poincareplane:"\u210C",pointint:"\u2A15",popf:"\u{1D561}",Popf:"\u2119",pound:"\xA3",pr:"\u227A",Pr:"\u2ABB",prap:"\u2AB7",prcue:"\u227C",pre:"\u2AAF",prE:"\u2AB3",prec:"\u227A",precapprox:"\u2AB7",preccurlyeq:"\u227C",Precedes:"\u227A",PrecedesEqual:"\u2AAF",PrecedesSlantEqual:"\u227C",PrecedesTilde:"\u227E",preceq:"\u2AAF",precnapprox:"\u2AB9",precneqq:"\u2AB5",precnsim:"\u22E8",precsim:"\u227E",prime:"\u2032",Prime:"\u2033",primes:"\u2119",prnap:"\u2AB9",prnE:"\u2AB5",prnsim:"\u22E8",prod:"\u220F",Product:"\u220F",profalar:"\u232E",profline:"\u2312",profsurf:"\u2313",prop:"\u221D",Proportion:"\u2237",Proportional:"\u221D",propto:"\u221D",prsim:"\u227E",prurel:"\u22B0",pscr:"\u{1D4C5}",Pscr:"\u{1D4AB}",psi:"\u03C8",Psi:"\u03A8",puncsp:"\u2008",qfr:"\u{1D52E}",Qfr:"\u{1D514}",qint:"\u2A0C",qopf:"\u{1D562}",Qopf:"\u211A",qprime:"\u2057",qscr:"\u{1D4C6}",Qscr:"\u{1D4AC}",quaternions:"\u210D",quatint:"\u2A16",quest:"?",questeq:"\u225F",quot:'"',QUOT:'"',rAarr:"\u21DB",race:"\u223D\u0331",racute:"\u0155",Racute:"\u0154",radic:"\u221A",raemptyv:"\u29B3",rang:"\u27E9",Rang:"\u27EB",rangd:"\u2992",range:"\u29A5",rangle:"\u27E9",raquo:"\xBB",rarr:"\u2192",rArr:"\u21D2",Rarr:"\u21A0",rarrap:"\u2975",rarrb:"\u21E5",rarrbfs:"\u2920",rarrc:"\u2933",rarrfs:"\u291E",rarrhk:"\u21AA",rarrlp:"\u21AC",rarrpl:"\u2945",rarrsim:"\u2974",rarrtl:"\u21A3",Rarrtl:"\u2916",rarrw:"\u219D",ratail:"\u291A",rAtail:"\u291C",ratio:"\u2236",rationals:"\u211A",rbarr:"\u290D",rBarr:"\u290F",RBarr:"\u2910",rbbrk:"\u2773",rbrace:"}",rbrack:"]",rbrke:"\u298C",rbrksld:"\u298E",rbrkslu:"\u2990",rcaron:"\u0159",Rcaron:"\u0158",rcedil:"\u0157",Rcedil:"\u0156",rceil:"\u2309",rcub:"}",rcy:"\u0440",Rcy:"\u0420",rdca:"\u2937",rdldhar:"\u2969",rdquo:"\u201D",rdquor:"\u201D",rdsh:"\u21B3",Re:"\u211C",real:"\u211C",realine:"\u211B",realpart:"\u211C",reals:"\u211D",rect:"\u25AD",reg:"\xAE",REG:"\xAE",ReverseElement:"\u220B",ReverseEquilibrium:"\u21CB",ReverseUpEquilibrium:"\u296F",rfisht:"\u297D",rfloor:"\u230B",rfr:"\u{1D52F}",Rfr:"\u211C",rHar:"\u2964",rhard:"\u21C1",rharu:"\u21C0",rharul:"\u296C",rho:"\u03C1",Rho:"\u03A1",rhov:"\u03F1",RightAngleBracket:"\u27E9",rightarrow:"\u2192",Rightarrow:"\u21D2",RightArrow:"\u2192",RightArrowBar:"\u21E5",RightArrowLeftArrow:"\u21C4",rightarrowtail:"\u21A3",RightCeiling:"\u2309",RightDoubleBracket:"\u27E7",RightDownTeeVector:"\u295D",RightDownVector:"\u21C2",RightDownVectorBar:"\u2955",RightFloor:"\u230B",rightharpoondown:"\u21C1",rightharpoonup:"\u21C0",rightleftarrows:"\u21C4",rightleftharpoons:"\u21CC",rightrightarrows:"\u21C9",rightsquigarrow:"\u219D",RightTee:"\u22A2",RightTeeArrow:"\u21A6",RightTeeVector:"\u295B",rightthreetimes:"\u22CC",RightTriangle:"\u22B3",RightTriangleBar:"\u29D0",RightTriangleEqual:"\u22B5",RightUpDownVector:"\u294F",RightUpTeeVector:"\u295C",RightUpVector:"\u21BE",RightUpVectorBar:"\u2954",RightVector:"\u21C0",RightVectorBar:"\u2953",ring:"\u02DA",risingdotseq:"\u2253",rlarr:"\u21C4",rlhar:"\u21CC",rlm:"\u200F",rmoust:"\u23B1",rmoustache:"\u23B1",rnmid:"\u2AEE",roang:"\u27ED",roarr:"\u21FE",robrk:"\u27E7",ropar:"\u2986",ropf:"\u{1D563}",Ropf:"\u211D",roplus:"\u2A2E",rotimes:"\u2A35",RoundImplies:"\u2970",rpar:")",rpargt:"\u2994",rppolint:"\u2A12",rrarr:"\u21C9",Rrightarrow:"\u21DB",rsaquo:"\u203A",rscr:"\u{1D4C7}",Rscr:"\u211B",rsh:"\u21B1",Rsh:"\u21B1",rsqb:"]",rsquo:"\u2019",rsquor:"\u2019",rthree:"\u22CC",rtimes:"\u22CA",rtri:"\u25B9",rtrie:"\u22B5",rtrif:"\u25B8",rtriltri:"\u29CE",RuleDelayed:"\u29F4",ruluhar:"\u2968",rx:"\u211E",sacute:"\u015B",Sacute:"\u015A",sbquo:"\u201A",sc:"\u227B",Sc:"\u2ABC",scap:"\u2AB8",scaron:"\u0161",Scaron:"\u0160",sccue:"\u227D",sce:"\u2AB0",scE:"\u2AB4",scedil:"\u015F",Scedil:"\u015E",scirc:"\u015D",Scirc:"\u015C",scnap:"\u2ABA",scnE:"\u2AB6",scnsim:"\u22E9",scpolint:"\u2A13",scsim:"\u227F",scy:"\u0441",Scy:"\u0421",sdot:"\u22C5",sdotb:"\u22A1",sdote:"\u2A66",searhk:"\u2925",searr:"\u2198",seArr:"\u21D8",searrow:"\u2198",sect:"\xA7",semi:";",seswar:"\u2929",setminus:"\u2216",setmn:"\u2216",sext:"\u2736",sfr:"\u{1D530}",Sfr:"\u{1D516}",sfrown:"\u2322",sharp:"\u266F",shchcy:"\u0449",SHCHcy:"\u0429",shcy:"\u0448",SHcy:"\u0428",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",shortmid:"\u2223",shortparallel:"\u2225",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",shy:"\xAD",sigma:"\u03C3",Sigma:"\u03A3",sigmaf:"\u03C2",sigmav:"\u03C2",sim:"\u223C",simdot:"\u2A6A",sime:"\u2243",simeq:"\u2243",simg:"\u2A9E",simgE:"\u2AA0",siml:"\u2A9D",simlE:"\u2A9F",simne:"\u2246",simplus:"\u2A24",simrarr:"\u2972",slarr:"\u2190",SmallCircle:"\u2218",smallsetminus:"\u2216",smashp:"\u2A33",smeparsl:"\u29E4",smid:"\u2223",smile:"\u2323",smt:"\u2AAA",smte:"\u2AAC",smtes:"\u2AAC\uFE00",softcy:"\u044C",SOFTcy:"\u042C",sol:"/",solb:"\u29C4",solbar:"\u233F",sopf:"\u{1D564}",Sopf:"\u{1D54A}",spades:"\u2660",spadesuit:"\u2660",spar:"\u2225",sqcap:"\u2293",sqcaps:"\u2293\uFE00",sqcup:"\u2294",sqcups:"\u2294\uFE00",Sqrt:"\u221A",sqsub:"\u228F",sqsube:"\u2291",sqsubset:"\u228F",sqsubseteq:"\u2291",sqsup:"\u2290",sqsupe:"\u2292",sqsupset:"\u2290",sqsupseteq:"\u2292",squ:"\u25A1",square:"\u25A1",Square:"\u25A1",SquareIntersection:"\u2293",SquareSubset:"\u228F",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",squarf:"\u25AA",squf:"\u25AA",srarr:"\u2192",sscr:"\u{1D4C8}",Sscr:"\u{1D4AE}",ssetmn:"\u2216",ssmile:"\u2323",sstarf:"\u22C6",star:"\u2606",Star:"\u22C6",starf:"\u2605",straightepsilon:"\u03F5",straightphi:"\u03D5",strns:"\xAF",sub:"\u2282",Sub:"\u22D0",subdot:"\u2ABD",sube:"\u2286",subE:"\u2AC5",subedot:"\u2AC3",submult:"\u2AC1",subne:"\u228A",subnE:"\u2ACB",subplus:"\u2ABF",subrarr:"\u2979",subset:"\u2282",Subset:"\u22D0",subseteq:"\u2286",subseteqq:"\u2AC5",SubsetEqual:"\u2286",subsetneq:"\u228A",subsetneqq:"\u2ACB",subsim:"\u2AC7",subsub:"\u2AD5",subsup:"\u2AD3",succ:"\u227B",succapprox:"\u2AB8",succcurlyeq:"\u227D",Succeeds:"\u227B",SucceedsEqual:"\u2AB0",SucceedsSlantEqual:"\u227D",SucceedsTilde:"\u227F",succeq:"\u2AB0",succnapprox:"\u2ABA",succneqq:"\u2AB6",succnsim:"\u22E9",succsim:"\u227F",SuchThat:"\u220B",sum:"\u2211",Sum:"\u2211",sung:"\u266A",sup:"\u2283",Sup:"\u22D1",sup1:"\xB9",sup2:"\xB2",sup3:"\xB3",supdot:"\u2ABE",supdsub:"\u2AD8",supe:"\u2287",supE:"\u2AC6",supedot:"\u2AC4",Superset:"\u2283",SupersetEqual:"\u2287",suphsol:"\u27C9",suphsub:"\u2AD7",suplarr:"\u297B",supmult:"\u2AC2",supne:"\u228B",supnE:"\u2ACC",supplus:"\u2AC0",supset:"\u2283",Supset:"\u22D1",supseteq:"\u2287",supseteqq:"\u2AC6",supsetneq:"\u228B",supsetneqq:"\u2ACC",supsim:"\u2AC8",supsub:"\u2AD4",supsup:"\u2AD6",swarhk:"\u2926",swarr:"\u2199",swArr:"\u21D9",swarrow:"\u2199",swnwar:"\u292A",szlig:"\xDF",Tab:" ",target:"\u2316",tau:"\u03C4",Tau:"\u03A4",tbrk:"\u23B4",tcaron:"\u0165",Tcaron:"\u0164",tcedil:"\u0163",Tcedil:"\u0162",tcy:"\u0442",Tcy:"\u0422",tdot:"\u20DB",telrec:"\u2315",tfr:"\u{1D531}",Tfr:"\u{1D517}",there4:"\u2234",therefore:"\u2234",Therefore:"\u2234",theta:"\u03B8",Theta:"\u0398",thetasym:"\u03D1",thetav:"\u03D1",thickapprox:"\u2248",thicksim:"\u223C",ThickSpace:"\u205F\u200A",thinsp:"\u2009",ThinSpace:"\u2009",thkap:"\u2248",thksim:"\u223C",thorn:"\xFE",THORN:"\xDE",tilde:"\u02DC",Tilde:"\u223C",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",times:"\xD7",timesb:"\u22A0",timesbar:"\u2A31",timesd:"\u2A30",tint:"\u222D",toea:"\u2928",top:"\u22A4",topbot:"\u2336",topcir:"\u2AF1",topf:"\u{1D565}",Topf:"\u{1D54B}",topfork:"\u2ADA",tosa:"\u2929",tprime:"\u2034",trade:"\u2122",TRADE:"\u2122",triangle:"\u25B5",triangledown:"\u25BF",triangleleft:"\u25C3",trianglelefteq:"\u22B4",triangleq:"\u225C",triangleright:"\u25B9",trianglerighteq:"\u22B5",tridot:"\u25EC",trie:"\u225C",triminus:"\u2A3A",TripleDot:"\u20DB",triplus:"\u2A39",trisb:"\u29CD",tritime:"\u2A3B",trpezium:"\u23E2",tscr:"\u{1D4C9}",Tscr:"\u{1D4AF}",tscy:"\u0446",TScy:"\u0426",tshcy:"\u045B",TSHcy:"\u040B",tstrok:"\u0167",Tstrok:"\u0166",twixt:"\u226C",twoheadleftarrow:"\u219E",twoheadrightarrow:"\u21A0",uacute:"\xFA",Uacute:"\xDA",uarr:"\u2191",uArr:"\u21D1",Uarr:"\u219F",Uarrocir:"\u2949",ubrcy:"\u045E",Ubrcy:"\u040E",ubreve:"\u016D",Ubreve:"\u016C",ucirc:"\xFB",Ucirc:"\xDB",ucy:"\u0443",Ucy:"\u0423",udarr:"\u21C5",udblac:"\u0171",Udblac:"\u0170",udhar:"\u296E",ufisht:"\u297E",ufr:"\u{1D532}",Ufr:"\u{1D518}",ugrave:"\xF9",Ugrave:"\xD9",uHar:"\u2963",uharl:"\u21BF",uharr:"\u21BE",uhblk:"\u2580",ulcorn:"\u231C",ulcorner:"\u231C",ulcrop:"\u230F",ultri:"\u25F8",umacr:"\u016B",Umacr:"\u016A",uml:"\xA8",UnderBar:"_",UnderBrace:"\u23DF",UnderBracket:"\u23B5",UnderParenthesis:"\u23DD",Union:"\u22C3",UnionPlus:"\u228E",uogon:"\u0173",Uogon:"\u0172",uopf:"\u{1D566}",Uopf:"\u{1D54C}",uparrow:"\u2191",Uparrow:"\u21D1",UpArrow:"\u2191",UpArrowBar:"\u2912",UpArrowDownArrow:"\u21C5",updownarrow:"\u2195",Updownarrow:"\u21D5",UpDownArrow:"\u2195",UpEquilibrium:"\u296E",upharpoonleft:"\u21BF",upharpoonright:"\u21BE",uplus:"\u228E",UpperLeftArrow:"\u2196",UpperRightArrow:"\u2197",upsi:"\u03C5",Upsi:"\u03D2",upsih:"\u03D2",upsilon:"\u03C5",Upsilon:"\u03A5",UpTee:"\u22A5",UpTeeArrow:"\u21A5",upuparrows:"\u21C8",urcorn:"\u231D",urcorner:"\u231D",urcrop:"\u230E",uring:"\u016F",Uring:"\u016E",urtri:"\u25F9",uscr:"\u{1D4CA}",Uscr:"\u{1D4B0}",utdot:"\u22F0",utilde:"\u0169",Utilde:"\u0168",utri:"\u25B5",utrif:"\u25B4",uuarr:"\u21C8",uuml:"\xFC",Uuml:"\xDC",uwangle:"\u29A7",vangrt:"\u299C",varepsilon:"\u03F5",varkappa:"\u03F0",varnothing:"\u2205",varphi:"\u03D5",varpi:"\u03D6",varpropto:"\u221D",varr:"\u2195",vArr:"\u21D5",varrho:"\u03F1",varsigma:"\u03C2",varsubsetneq:"\u228A\uFE00",varsubsetneqq:"\u2ACB\uFE00",varsupsetneq:"\u228B\uFE00",varsupsetneqq:"\u2ACC\uFE00",vartheta:"\u03D1",vartriangleleft:"\u22B2",vartriangleright:"\u22B3",vBar:"\u2AE8",Vbar:"\u2AEB",vBarv:"\u2AE9",vcy:"\u0432",Vcy:"\u0412",vdash:"\u22A2",vDash:"\u22A8",Vdash:"\u22A9",VDash:"\u22AB",Vdashl:"\u2AE6",vee:"\u2228",Vee:"\u22C1",veebar:"\u22BB",veeeq:"\u225A",vellip:"\u22EE",verbar:"|",Verbar:"\u2016",vert:"|",Vert:"\u2016",VerticalBar:"\u2223",VerticalLine:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",VeryThinSpace:"\u200A",vfr:"\u{1D533}",Vfr:"\u{1D519}",vltri:"\u22B2",vnsub:"\u2282\u20D2",vnsup:"\u2283\u20D2",vopf:"\u{1D567}",Vopf:"\u{1D54D}",vprop:"\u221D",vrtri:"\u22B3",vscr:"\u{1D4CB}",Vscr:"\u{1D4B1}",vsubne:"\u228A\uFE00",vsubnE:"\u2ACB\uFE00",vsupne:"\u228B\uFE00",vsupnE:"\u2ACC\uFE00",Vvdash:"\u22AA",vzigzag:"\u299A",wcirc:"\u0175",Wcirc:"\u0174",wedbar:"\u2A5F",wedge:"\u2227",Wedge:"\u22C0",wedgeq:"\u2259",weierp:"\u2118",wfr:"\u{1D534}",Wfr:"\u{1D51A}",wopf:"\u{1D568}",Wopf:"\u{1D54E}",wp:"\u2118",wr:"\u2240",wreath:"\u2240",wscr:"\u{1D4CC}",Wscr:"\u{1D4B2}",xcap:"\u22C2",xcirc:"\u25EF",xcup:"\u22C3",xdtri:"\u25BD",xfr:"\u{1D535}",Xfr:"\u{1D51B}",xharr:"\u27F7",xhArr:"\u27FA",xi:"\u03BE",Xi:"\u039E",xlarr:"\u27F5",xlArr:"\u27F8",xmap:"\u27FC",xnis:"\u22FB",xodot:"\u2A00",xopf:"\u{1D569}",Xopf:"\u{1D54F}",xoplus:"\u2A01",xotime:"\u2A02",xrarr:"\u27F6",xrArr:"\u27F9",xscr:"\u{1D4CD}",Xscr:"\u{1D4B3}",xsqcup:"\u2A06",xuplus:"\u2A04",xutri:"\u25B3",xvee:"\u22C1",xwedge:"\u22C0",yacute:"\xFD",Yacute:"\xDD",yacy:"\u044F",YAcy:"\u042F",ycirc:"\u0177",Ycirc:"\u0176",ycy:"\u044B",Ycy:"\u042B",yen:"\xA5",yfr:"\u{1D536}",Yfr:"\u{1D51C}",yicy:"\u0457",YIcy:"\u0407",yopf:"\u{1D56A}",Yopf:"\u{1D550}",yscr:"\u{1D4CE}",Yscr:"\u{1D4B4}",yucy:"\u044E",YUcy:"\u042E",yuml:"\xFF",Yuml:"\u0178",zacute:"\u017A",Zacute:"\u0179",zcaron:"\u017E",Zcaron:"\u017D",zcy:"\u0437",Zcy:"\u0417",zdot:"\u017C",Zdot:"\u017B",zeetrf:"\u2128",ZeroWidthSpace:"\u200B",zeta:"\u03B6",Zeta:"\u0396",zfr:"\u{1D537}",Zfr:"\u2128",zhcy:"\u0436",ZHcy:"\u0416",zigrarr:"\u21DD",zopf:"\u{1D56B}",Zopf:"\u2124",zscr:"\u{1D4CF}",Zscr:"\u{1D4B5}",zwj:"\u200D",zwnj:"\u200C"},g={aacute:"\xE1",Aacute:"\xC1",acirc:"\xE2",Acirc:"\xC2",acute:"\xB4",aelig:"\xE6",AElig:"\xC6",agrave:"\xE0",Agrave:"\xC0",amp:"&",AMP:"&",aring:"\xE5",Aring:"\xC5",atilde:"\xE3",Atilde:"\xC3",auml:"\xE4",Auml:"\xC4",brvbar:"\xA6",ccedil:"\xE7",Ccedil:"\xC7",cedil:"\xB8",cent:"\xA2",copy:"\xA9",COPY:"\xA9",curren:"\xA4",deg:"\xB0",divide:"\xF7",eacute:"\xE9",Eacute:"\xC9",ecirc:"\xEA",Ecirc:"\xCA",egrave:"\xE8",Egrave:"\xC8",eth:"\xF0",ETH:"\xD0",euml:"\xEB",Euml:"\xCB",frac12:"\xBD",frac14:"\xBC",frac34:"\xBE",gt:">",GT:">",iacute:"\xED",Iacute:"\xCD",icirc:"\xEE",Icirc:"\xCE",iexcl:"\xA1",igrave:"\xEC",Igrave:"\xCC",iquest:"\xBF",iuml:"\xEF",Iuml:"\xCF",laquo:"\xAB",lt:"<",LT:"<",macr:"\xAF",micro:"\xB5",middot:"\xB7",nbsp:"\xA0",not:"\xAC",ntilde:"\xF1",Ntilde:"\xD1",oacute:"\xF3",Oacute:"\xD3",ocirc:"\xF4",Ocirc:"\xD4",ograve:"\xF2",Ograve:"\xD2",ordf:"\xAA",ordm:"\xBA",oslash:"\xF8",Oslash:"\xD8",otilde:"\xF5",Otilde:"\xD5",ouml:"\xF6",Ouml:"\xD6",para:"\xB6",plusmn:"\xB1",pound:"\xA3",quot:'"',QUOT:'"',raquo:"\xBB",reg:"\xAE",REG:"\xAE",sect:"\xA7",shy:"\xAD",sup1:"\xB9",sup2:"\xB2",sup3:"\xB3",szlig:"\xDF",thorn:"\xFE",THORN:"\xDE",times:"\xD7",uacute:"\xFA",Uacute:"\xDA",ucirc:"\xFB",Ucirc:"\xDB",ugrave:"\xF9",Ugrave:"\xD9",uml:"\xA8",uuml:"\xFC",Uuml:"\xDC",yacute:"\xFD",Yacute:"\xDD",yen:"\xA5",yuml:"\xFF"},x={"0":"\uFFFD","128":"\u20AC","130":"\u201A","131":"\u0192","132":"\u201E","133":"\u2026","134":"\u2020","135":"\u2021","136":"\u02C6","137":"\u2030","138":"\u0160","139":"\u2039","140":"\u0152","142":"\u017D","145":"\u2018","146":"\u2019","147":"\u201C","148":"\u201D","149":"\u2022","150":"\u2013","151":"\u2014","152":"\u02DC","153":"\u2122","154":"\u0161","155":"\u203A","156":"\u0153","158":"\u017E","159":"\u0178"},p=[1,2,3,4,5,6,7,8,11,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,64976,64977,64978,64979,64980,64981,64982,64983,64984,64985,64986,64987,64988,64989,64990,64991,64992,64993,64994,64995,64996,64997,64998,64999,65e3,65001,65002,65003,65004,65005,65006,65007,65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111],d=String.fromCharCode,A={},b=A.hasOwnProperty,C=function(N,U){return b.call(N,U)},E=function(N,U){for(var Z=-1,O=N.length;++Z=55296&&N<=57343||N>1114111?(U&&M("character reference outside the permissible Unicode range"),"\uFFFD"):C(x,N)?(U&&M("disallowed character reference"),x[N]):(U&&E(p,N)&&M("disallowed character reference"),N>65535&&(N-=65536,Z+=d(N>>>10&1023|55296),N=56320|N&1023),Z+=d(N),Z)},P=function(N){return"&#x"+N.toString(16).toUpperCase()+";"},F=function(N){return"&#"+N+";"},M=function(N){throw Error("Parse error: "+N)},D=function(N,U){U=T(U,D.options);var Z=U.strict;Z&&h.test(N)&&M("forbidden code point");var O=U.encodeEverything,W=U.useNamedReferences,X=U.allowUnsafeSymbols,Q=U.decimal?F:P,a1=function(B){return Q(B.charCodeAt(0))};return O?(N=N.replace(r,function(B){return W&&C(c,B)?"&"+c[B]+";":a1(B)}),W&&(N=N.replace(/>\u20D2/g,">⃒").replace(/<\u20D2/g,"<⃒").replace(/fj/g,"fj")),W&&(N=N.replace(s,function(B){return"&"+c[B]+";"}))):W?(X||(N=N.replace(l,function(B){return"&"+c[B]+";"})),N=N.replace(/>\u20D2/g,">⃒").replace(/<\u20D2/g,"<⃒"),N=N.replace(s,function(B){return"&"+c[B]+";"})):X||(N=N.replace(l,a1)),N.replace(a,function(B){var M1=B.charCodeAt(0),u1=B.charCodeAt(1),v1=(M1-55296)*1024+u1-56320+65536;return Q(v1)}).replace(o,a1)};D.options={allowUnsafeSymbols:!1,encodeEverything:!1,strict:!1,useNamedReferences:!1,decimal:!1};var z=function(N,U){U=T(U,z.options);var Z=U.strict;return Z&&f.test(N)&&M("malformed character reference"),N.replace(m,function(O,W,X,Q,a1,B,M1,u1,v1){var n1,T1,A1,C1,h2,K1;return W?(h2=W,v[h2]):X?(h2=X,K1=Q,K1&&U.isAttributeValue?(Z&&K1=="="&&M("`&` did not start a character reference"),O):(Z&&M("named character reference was not terminated by a semicolon"),g[h2]+(K1||""))):a1?(A1=a1,T1=B,Z&&!T1&&M("character reference was not terminated by a semicolon"),n1=parseInt(A1,10),_(n1,Z)):M1?(C1=M1,T1=u1,Z&&!T1&&M("character reference was not terminated by a semicolon"),n1=parseInt(C1,16),_(n1,Z)):(Z&&M("named character reference was not terminated by a semicolon"),O)})};z.options={isAttributeValue:!1,strict:!1};var H=function(N){return N.replace(l,function(U){return u[U]})},V={version:"1.2.0",encode:D,decode:z,escape:H,unescape:z};if(typeof define=="function"&&typeof define.amd=="object"&&define.amd)define(function(){return V});else if(e&&!e.nodeType)if(t)t.exports=V;else for(var L in V)C(V,L)&&(e[L]=V[L]);else n.he=V})(s6)});var So=M0((wo,v0)=>{(function(n,e){typeof define=="function"&&define.amd?define([],e):typeof v0=="object"&&v0.exports?v0.exports=e():n.moo=e()})(wo,function(){"use strict";var n=Object.prototype.hasOwnProperty,e=Object.prototype.toString,t=typeof new RegExp().sticky=="boolean";function i(_){return _&&e.call(_)==="[object RegExp]"}function a(_){return _&&typeof _=="object"&&!i(_)&&!Array.isArray(_)}function r(_){return _.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function o(_){var P=new RegExp("|"+_);return P.exec("").length-1}function s(_){return"("+_+")"}function c(_){if(!_.length)return"(?!)";var P=_.map(function(F){return"(?:"+F+")"}).join("|");return"(?:"+P+")"}function l(_){if(typeof _=="string")return"(?:"+r(_)+")";if(i(_)){if(_.ignoreCase)throw new Error("RegExp /i flag not allowed");if(_.global)throw new Error("RegExp /g flag is implied");if(_.sticky)throw new Error("RegExp /y flag is implied");if(_.multiline)throw new Error("RegExp /m flag is implied");return _.source}else throw new Error("Not a pattern: "+_)}function u(_){for(var P=Object.getOwnPropertyNames(_),F=[],M=0;M0)throw new Error("RegExp has capture groups: "+Q+` +var Po=Object.create;var Kt=Object.defineProperty;var Io=Object.getOwnPropertyDescriptor;var ko=Object.getOwnPropertyNames;var Uo=Object.getPrototypeOf,Oo=Object.prototype.hasOwnProperty;var Pi=n=>Kt(n,"__esModule",{value:!0});var b0=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports),Go=(n,e)=>{Pi(n);for(var t in e)Kt(n,t,{get:e[t],enumerable:!0})},qo=(n,e,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of ko(e))!Oo.call(n,i)&&i!=="default"&&Kt(n,i,{get:()=>e[i],enumerable:!(t=Io(e,i))||t.enumerable});return n},w2=n=>qo(Pi(Kt(n!=null?Po(Uo(n)):{},"default",n&&n.__esModule&&"default"in n?{get:()=>n.default,enumerable:!0}:{value:n,enumerable:!0})),n);var Ii=b0(Jt=>{"use strict";Object.defineProperty(Jt,"__esModule",{value:!0});require("obsidian");var Wo=n=>{var e;return n?(e=n.plugins.plugins.dataview)===null||e===void 0?void 0:e.api:window.DataviewAPI},jo=n=>n.plugins.enabledPlugins.has("dataview");Jt.getAPI=Wo;Jt.isPluginEnabled=jo});var ya=b0((s6,bt)=>{(function(n){var e=typeof s6=="object"&&s6,t=typeof bt=="object"&&bt&&bt.exports==e&&bt,i=typeof global=="object"&&global;(i.global===i||i.window===i)&&(n=i);var a=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,r=/[\x01-\x7F]/g,s=/[\x01-\t\x0B\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,o=/<\u20D2|=\u20E5|>\u20D2|\u205F\u200A|\u219D\u0338|\u2202\u0338|\u2220\u20D2|\u2229\uFE00|\u222A\uFE00|\u223C\u20D2|\u223D\u0331|\u223E\u0333|\u2242\u0338|\u224B\u0338|\u224D\u20D2|\u224E\u0338|\u224F\u0338|\u2250\u0338|\u2261\u20E5|\u2264\u20D2|\u2265\u20D2|\u2266\u0338|\u2267\u0338|\u2268\uFE00|\u2269\uFE00|\u226A\u0338|\u226A\u20D2|\u226B\u0338|\u226B\u20D2|\u227F\u0338|\u2282\u20D2|\u2283\u20D2|\u228A\uFE00|\u228B\uFE00|\u228F\u0338|\u2290\u0338|\u2293\uFE00|\u2294\uFE00|\u22B4\u20D2|\u22B5\u20D2|\u22D8\u0338|\u22D9\u0338|\u22DA\uFE00|\u22DB\uFE00|\u22F5\u0338|\u22F9\u0338|\u2933\u0338|\u29CF\u0338|\u29D0\u0338|\u2A6D\u0338|\u2A70\u0338|\u2A7D\u0338|\u2A7E\u0338|\u2AA1\u0338|\u2AA2\u0338|\u2AAC\uFE00|\u2AAD\uFE00|\u2AAF\u0338|\u2AB0\u0338|\u2AC5\u0338|\u2AC6\u0338|\u2ACB\uFE00|\u2ACC\uFE00|\u2AFD\u20E5|[\xA0-\u0113\u0116-\u0122\u0124-\u012B\u012E-\u014D\u0150-\u017E\u0192\u01B5\u01F5\u0237\u02C6\u02C7\u02D8-\u02DD\u0311\u0391-\u03A1\u03A3-\u03A9\u03B1-\u03C9\u03D1\u03D2\u03D5\u03D6\u03DC\u03DD\u03F0\u03F1\u03F5\u03F6\u0401-\u040C\u040E-\u044F\u0451-\u045C\u045E\u045F\u2002-\u2005\u2007-\u2010\u2013-\u2016\u2018-\u201A\u201C-\u201E\u2020-\u2022\u2025\u2026\u2030-\u2035\u2039\u203A\u203E\u2041\u2043\u2044\u204F\u2057\u205F-\u2063\u20AC\u20DB\u20DC\u2102\u2105\u210A-\u2113\u2115-\u211E\u2122\u2124\u2127-\u2129\u212C\u212D\u212F-\u2131\u2133-\u2138\u2145-\u2148\u2153-\u215E\u2190-\u219B\u219D-\u21A7\u21A9-\u21AE\u21B0-\u21B3\u21B5-\u21B7\u21BA-\u21DB\u21DD\u21E4\u21E5\u21F5\u21FD-\u2205\u2207-\u2209\u220B\u220C\u220F-\u2214\u2216-\u2218\u221A\u221D-\u2238\u223A-\u2257\u2259\u225A\u225C\u225F-\u2262\u2264-\u228B\u228D-\u229B\u229D-\u22A5\u22A7-\u22B0\u22B2-\u22BB\u22BD-\u22DB\u22DE-\u22E3\u22E6-\u22F7\u22F9-\u22FE\u2305\u2306\u2308-\u2310\u2312\u2313\u2315\u2316\u231C-\u231F\u2322\u2323\u232D\u232E\u2336\u233D\u233F\u237C\u23B0\u23B1\u23B4-\u23B6\u23DC-\u23DF\u23E2\u23E7\u2423\u24C8\u2500\u2502\u250C\u2510\u2514\u2518\u251C\u2524\u252C\u2534\u253C\u2550-\u256C\u2580\u2584\u2588\u2591-\u2593\u25A1\u25AA\u25AB\u25AD\u25AE\u25B1\u25B3-\u25B5\u25B8\u25B9\u25BD-\u25BF\u25C2\u25C3\u25CA\u25CB\u25EC\u25EF\u25F8-\u25FC\u2605\u2606\u260E\u2640\u2642\u2660\u2663\u2665\u2666\u266A\u266D-\u266F\u2713\u2717\u2720\u2736\u2758\u2772\u2773\u27C8\u27C9\u27E6-\u27ED\u27F5-\u27FA\u27FC\u27FF\u2902-\u2905\u290C-\u2913\u2916\u2919-\u2920\u2923-\u292A\u2933\u2935-\u2939\u293C\u293D\u2945\u2948-\u294B\u294E-\u2976\u2978\u2979\u297B-\u297F\u2985\u2986\u298B-\u2996\u299A\u299C\u299D\u29A4-\u29B7\u29B9\u29BB\u29BC\u29BE-\u29C5\u29C9\u29CD-\u29D0\u29DC-\u29DE\u29E3-\u29E5\u29EB\u29F4\u29F6\u2A00-\u2A02\u2A04\u2A06\u2A0C\u2A0D\u2A10-\u2A17\u2A22-\u2A27\u2A29\u2A2A\u2A2D-\u2A31\u2A33-\u2A3C\u2A3F\u2A40\u2A42-\u2A4D\u2A50\u2A53-\u2A58\u2A5A-\u2A5D\u2A5F\u2A66\u2A6A\u2A6D-\u2A75\u2A77-\u2A9A\u2A9D-\u2AA2\u2AA4-\u2AB0\u2AB3-\u2AC8\u2ACB\u2ACC\u2ACF-\u2ADB\u2AE4\u2AE6-\u2AE9\u2AEB-\u2AF3\u2AFD\uFB00-\uFB04]|\uD835[\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDCCF\uDD04\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDD6B]/g,c={"\xAD":"shy","\u200C":"zwnj","\u200D":"zwj","\u200E":"lrm","\u2063":"ic","\u2062":"it","\u2061":"af","\u200F":"rlm","\u200B":"ZeroWidthSpace","\u2060":"NoBreak","\u0311":"DownBreve","\u20DB":"tdot","\u20DC":"DotDot"," ":"Tab","\n":"NewLine","\u2008":"puncsp","\u205F":"MediumSpace","\u2009":"thinsp","\u200A":"hairsp","\u2004":"emsp13","\u2002":"ensp","\u2005":"emsp14","\u2003":"emsp","\u2007":"numsp","\xA0":"nbsp","\u205F\u200A":"ThickSpace","\u203E":"oline",_:"lowbar","\u2010":"dash","\u2013":"ndash","\u2014":"mdash","\u2015":"horbar",",":"comma",";":"semi","\u204F":"bsemi",":":"colon","\u2A74":"Colone","!":"excl","\xA1":"iexcl","?":"quest","\xBF":"iquest",".":"period","\u2025":"nldr","\u2026":"mldr","\xB7":"middot","'":"apos","\u2018":"lsquo","\u2019":"rsquo","\u201A":"sbquo","\u2039":"lsaquo","\u203A":"rsaquo",'"':"quot","\u201C":"ldquo","\u201D":"rdquo","\u201E":"bdquo","\xAB":"laquo","\xBB":"raquo","(":"lpar",")":"rpar","[":"lsqb","]":"rsqb","{":"lcub","}":"rcub","\u2308":"lceil","\u2309":"rceil","\u230A":"lfloor","\u230B":"rfloor","\u2985":"lopar","\u2986":"ropar","\u298B":"lbrke","\u298C":"rbrke","\u298D":"lbrkslu","\u298E":"rbrksld","\u298F":"lbrksld","\u2990":"rbrkslu","\u2991":"langd","\u2992":"rangd","\u2993":"lparlt","\u2994":"rpargt","\u2995":"gtlPar","\u2996":"ltrPar","\u27E6":"lobrk","\u27E7":"robrk","\u27E8":"lang","\u27E9":"rang","\u27EA":"Lang","\u27EB":"Rang","\u27EC":"loang","\u27ED":"roang","\u2772":"lbbrk","\u2773":"rbbrk","\u2016":"Vert","\xA7":"sect","\xB6":"para","@":"commat","*":"ast","/":"sol",undefined:null,"&":"amp","#":"num","%":"percnt","\u2030":"permil","\u2031":"pertenk","\u2020":"dagger","\u2021":"Dagger","\u2022":"bull","\u2043":"hybull","\u2032":"prime","\u2033":"Prime","\u2034":"tprime","\u2057":"qprime","\u2035":"bprime","\u2041":"caret","`":"grave","\xB4":"acute","\u02DC":"tilde","^":"Hat","\xAF":"macr","\u02D8":"breve","\u02D9":"dot","\xA8":"die","\u02DA":"ring","\u02DD":"dblac","\xB8":"cedil","\u02DB":"ogon","\u02C6":"circ","\u02C7":"caron","\xB0":"deg","\xA9":"copy","\xAE":"reg","\u2117":"copysr","\u2118":"wp","\u211E":"rx","\u2127":"mho","\u2129":"iiota","\u2190":"larr","\u219A":"nlarr","\u2192":"rarr","\u219B":"nrarr","\u2191":"uarr","\u2193":"darr","\u2194":"harr","\u21AE":"nharr","\u2195":"varr","\u2196":"nwarr","\u2197":"nearr","\u2198":"searr","\u2199":"swarr","\u219D":"rarrw","\u219D\u0338":"nrarrw","\u219E":"Larr","\u219F":"Uarr","\u21A0":"Rarr","\u21A1":"Darr","\u21A2":"larrtl","\u21A3":"rarrtl","\u21A4":"mapstoleft","\u21A5":"mapstoup","\u21A6":"map","\u21A7":"mapstodown","\u21A9":"larrhk","\u21AA":"rarrhk","\u21AB":"larrlp","\u21AC":"rarrlp","\u21AD":"harrw","\u21B0":"lsh","\u21B1":"rsh","\u21B2":"ldsh","\u21B3":"rdsh","\u21B5":"crarr","\u21B6":"cularr","\u21B7":"curarr","\u21BA":"olarr","\u21BB":"orarr","\u21BC":"lharu","\u21BD":"lhard","\u21BE":"uharr","\u21BF":"uharl","\u21C0":"rharu","\u21C1":"rhard","\u21C2":"dharr","\u21C3":"dharl","\u21C4":"rlarr","\u21C5":"udarr","\u21C6":"lrarr","\u21C7":"llarr","\u21C8":"uuarr","\u21C9":"rrarr","\u21CA":"ddarr","\u21CB":"lrhar","\u21CC":"rlhar","\u21D0":"lArr","\u21CD":"nlArr","\u21D1":"uArr","\u21D2":"rArr","\u21CF":"nrArr","\u21D3":"dArr","\u21D4":"iff","\u21CE":"nhArr","\u21D5":"vArr","\u21D6":"nwArr","\u21D7":"neArr","\u21D8":"seArr","\u21D9":"swArr","\u21DA":"lAarr","\u21DB":"rAarr","\u21DD":"zigrarr","\u21E4":"larrb","\u21E5":"rarrb","\u21F5":"duarr","\u21FD":"loarr","\u21FE":"roarr","\u21FF":"hoarr","\u2200":"forall","\u2201":"comp","\u2202":"part","\u2202\u0338":"npart","\u2203":"exist","\u2204":"nexist","\u2205":"empty","\u2207":"Del","\u2208":"in","\u2209":"notin","\u220B":"ni","\u220C":"notni","\u03F6":"bepsi","\u220F":"prod","\u2210":"coprod","\u2211":"sum","+":"plus","\xB1":"pm","\xF7":"div","\xD7":"times","<":"lt","\u226E":"nlt","<\u20D2":"nvlt","=":"equals","\u2260":"ne","=\u20E5":"bne","\u2A75":"Equal",">":"gt","\u226F":"ngt",">\u20D2":"nvgt","\xAC":"not","|":"vert","\xA6":"brvbar","\u2212":"minus","\u2213":"mp","\u2214":"plusdo","\u2044":"frasl","\u2216":"setmn","\u2217":"lowast","\u2218":"compfn","\u221A":"Sqrt","\u221D":"prop","\u221E":"infin","\u221F":"angrt","\u2220":"ang","\u2220\u20D2":"nang","\u2221":"angmsd","\u2222":"angsph","\u2223":"mid","\u2224":"nmid","\u2225":"par","\u2226":"npar","\u2227":"and","\u2228":"or","\u2229":"cap","\u2229\uFE00":"caps","\u222A":"cup","\u222A\uFE00":"cups","\u222B":"int","\u222C":"Int","\u222D":"tint","\u2A0C":"qint","\u222E":"oint","\u222F":"Conint","\u2230":"Cconint","\u2231":"cwint","\u2232":"cwconint","\u2233":"awconint","\u2234":"there4","\u2235":"becaus","\u2236":"ratio","\u2237":"Colon","\u2238":"minusd","\u223A":"mDDot","\u223B":"homtht","\u223C":"sim","\u2241":"nsim","\u223C\u20D2":"nvsim","\u223D":"bsim","\u223D\u0331":"race","\u223E":"ac","\u223E\u0333":"acE","\u223F":"acd","\u2240":"wr","\u2242":"esim","\u2242\u0338":"nesim","\u2243":"sime","\u2244":"nsime","\u2245":"cong","\u2247":"ncong","\u2246":"simne","\u2248":"ap","\u2249":"nap","\u224A":"ape","\u224B":"apid","\u224B\u0338":"napid","\u224C":"bcong","\u224D":"CupCap","\u226D":"NotCupCap","\u224D\u20D2":"nvap","\u224E":"bump","\u224E\u0338":"nbump","\u224F":"bumpe","\u224F\u0338":"nbumpe","\u2250":"doteq","\u2250\u0338":"nedot","\u2251":"eDot","\u2252":"efDot","\u2253":"erDot","\u2254":"colone","\u2255":"ecolon","\u2256":"ecir","\u2257":"cire","\u2259":"wedgeq","\u225A":"veeeq","\u225C":"trie","\u225F":"equest","\u2261":"equiv","\u2262":"nequiv","\u2261\u20E5":"bnequiv","\u2264":"le","\u2270":"nle","\u2264\u20D2":"nvle","\u2265":"ge","\u2271":"nge","\u2265\u20D2":"nvge","\u2266":"lE","\u2266\u0338":"nlE","\u2267":"gE","\u2267\u0338":"ngE","\u2268\uFE00":"lvnE","\u2268":"lnE","\u2269":"gnE","\u2269\uFE00":"gvnE","\u226A":"ll","\u226A\u0338":"nLtv","\u226A\u20D2":"nLt","\u226B":"gg","\u226B\u0338":"nGtv","\u226B\u20D2":"nGt","\u226C":"twixt","\u2272":"lsim","\u2274":"nlsim","\u2273":"gsim","\u2275":"ngsim","\u2276":"lg","\u2278":"ntlg","\u2277":"gl","\u2279":"ntgl","\u227A":"pr","\u2280":"npr","\u227B":"sc","\u2281":"nsc","\u227C":"prcue","\u22E0":"nprcue","\u227D":"sccue","\u22E1":"nsccue","\u227E":"prsim","\u227F":"scsim","\u227F\u0338":"NotSucceedsTilde","\u2282":"sub","\u2284":"nsub","\u2282\u20D2":"vnsub","\u2283":"sup","\u2285":"nsup","\u2283\u20D2":"vnsup","\u2286":"sube","\u2288":"nsube","\u2287":"supe","\u2289":"nsupe","\u228A\uFE00":"vsubne","\u228A":"subne","\u228B\uFE00":"vsupne","\u228B":"supne","\u228D":"cupdot","\u228E":"uplus","\u228F":"sqsub","\u228F\u0338":"NotSquareSubset","\u2290":"sqsup","\u2290\u0338":"NotSquareSuperset","\u2291":"sqsube","\u22E2":"nsqsube","\u2292":"sqsupe","\u22E3":"nsqsupe","\u2293":"sqcap","\u2293\uFE00":"sqcaps","\u2294":"sqcup","\u2294\uFE00":"sqcups","\u2295":"oplus","\u2296":"ominus","\u2297":"otimes","\u2298":"osol","\u2299":"odot","\u229A":"ocir","\u229B":"oast","\u229D":"odash","\u229E":"plusb","\u229F":"minusb","\u22A0":"timesb","\u22A1":"sdotb","\u22A2":"vdash","\u22AC":"nvdash","\u22A3":"dashv","\u22A4":"top","\u22A5":"bot","\u22A7":"models","\u22A8":"vDash","\u22AD":"nvDash","\u22A9":"Vdash","\u22AE":"nVdash","\u22AA":"Vvdash","\u22AB":"VDash","\u22AF":"nVDash","\u22B0":"prurel","\u22B2":"vltri","\u22EA":"nltri","\u22B3":"vrtri","\u22EB":"nrtri","\u22B4":"ltrie","\u22EC":"nltrie","\u22B4\u20D2":"nvltrie","\u22B5":"rtrie","\u22ED":"nrtrie","\u22B5\u20D2":"nvrtrie","\u22B6":"origof","\u22B7":"imof","\u22B8":"mumap","\u22B9":"hercon","\u22BA":"intcal","\u22BB":"veebar","\u22BD":"barvee","\u22BE":"angrtvb","\u22BF":"lrtri","\u22C0":"Wedge","\u22C1":"Vee","\u22C2":"xcap","\u22C3":"xcup","\u22C4":"diam","\u22C5":"sdot","\u22C6":"Star","\u22C7":"divonx","\u22C8":"bowtie","\u22C9":"ltimes","\u22CA":"rtimes","\u22CB":"lthree","\u22CC":"rthree","\u22CD":"bsime","\u22CE":"cuvee","\u22CF":"cuwed","\u22D0":"Sub","\u22D1":"Sup","\u22D2":"Cap","\u22D3":"Cup","\u22D4":"fork","\u22D5":"epar","\u22D6":"ltdot","\u22D7":"gtdot","\u22D8":"Ll","\u22D8\u0338":"nLl","\u22D9":"Gg","\u22D9\u0338":"nGg","\u22DA\uFE00":"lesg","\u22DA":"leg","\u22DB":"gel","\u22DB\uFE00":"gesl","\u22DE":"cuepr","\u22DF":"cuesc","\u22E6":"lnsim","\u22E7":"gnsim","\u22E8":"prnsim","\u22E9":"scnsim","\u22EE":"vellip","\u22EF":"ctdot","\u22F0":"utdot","\u22F1":"dtdot","\u22F2":"disin","\u22F3":"isinsv","\u22F4":"isins","\u22F5":"isindot","\u22F5\u0338":"notindot","\u22F6":"notinvc","\u22F7":"notinvb","\u22F9":"isinE","\u22F9\u0338":"notinE","\u22FA":"nisd","\u22FB":"xnis","\u22FC":"nis","\u22FD":"notnivc","\u22FE":"notnivb","\u2305":"barwed","\u2306":"Barwed","\u230C":"drcrop","\u230D":"dlcrop","\u230E":"urcrop","\u230F":"ulcrop","\u2310":"bnot","\u2312":"profline","\u2313":"profsurf","\u2315":"telrec","\u2316":"target","\u231C":"ulcorn","\u231D":"urcorn","\u231E":"dlcorn","\u231F":"drcorn","\u2322":"frown","\u2323":"smile","\u232D":"cylcty","\u232E":"profalar","\u2336":"topbot","\u233D":"ovbar","\u233F":"solbar","\u237C":"angzarr","\u23B0":"lmoust","\u23B1":"rmoust","\u23B4":"tbrk","\u23B5":"bbrk","\u23B6":"bbrktbrk","\u23DC":"OverParenthesis","\u23DD":"UnderParenthesis","\u23DE":"OverBrace","\u23DF":"UnderBrace","\u23E2":"trpezium","\u23E7":"elinters","\u2423":"blank","\u2500":"boxh","\u2502":"boxv","\u250C":"boxdr","\u2510":"boxdl","\u2514":"boxur","\u2518":"boxul","\u251C":"boxvr","\u2524":"boxvl","\u252C":"boxhd","\u2534":"boxhu","\u253C":"boxvh","\u2550":"boxH","\u2551":"boxV","\u2552":"boxdR","\u2553":"boxDr","\u2554":"boxDR","\u2555":"boxdL","\u2556":"boxDl","\u2557":"boxDL","\u2558":"boxuR","\u2559":"boxUr","\u255A":"boxUR","\u255B":"boxuL","\u255C":"boxUl","\u255D":"boxUL","\u255E":"boxvR","\u255F":"boxVr","\u2560":"boxVR","\u2561":"boxvL","\u2562":"boxVl","\u2563":"boxVL","\u2564":"boxHd","\u2565":"boxhD","\u2566":"boxHD","\u2567":"boxHu","\u2568":"boxhU","\u2569":"boxHU","\u256A":"boxvH","\u256B":"boxVh","\u256C":"boxVH","\u2580":"uhblk","\u2584":"lhblk","\u2588":"block","\u2591":"blk14","\u2592":"blk12","\u2593":"blk34","\u25A1":"squ","\u25AA":"squf","\u25AB":"EmptyVerySmallSquare","\u25AD":"rect","\u25AE":"marker","\u25B1":"fltns","\u25B3":"xutri","\u25B4":"utrif","\u25B5":"utri","\u25B8":"rtrif","\u25B9":"rtri","\u25BD":"xdtri","\u25BE":"dtrif","\u25BF":"dtri","\u25C2":"ltrif","\u25C3":"ltri","\u25CA":"loz","\u25CB":"cir","\u25EC":"tridot","\u25EF":"xcirc","\u25F8":"ultri","\u25F9":"urtri","\u25FA":"lltri","\u25FB":"EmptySmallSquare","\u25FC":"FilledSmallSquare","\u2605":"starf","\u2606":"star","\u260E":"phone","\u2640":"female","\u2642":"male","\u2660":"spades","\u2663":"clubs","\u2665":"hearts","\u2666":"diams","\u266A":"sung","\u2713":"check","\u2717":"cross","\u2720":"malt","\u2736":"sext","\u2758":"VerticalSeparator","\u27C8":"bsolhsub","\u27C9":"suphsol","\u27F5":"xlarr","\u27F6":"xrarr","\u27F7":"xharr","\u27F8":"xlArr","\u27F9":"xrArr","\u27FA":"xhArr","\u27FC":"xmap","\u27FF":"dzigrarr","\u2902":"nvlArr","\u2903":"nvrArr","\u2904":"nvHarr","\u2905":"Map","\u290C":"lbarr","\u290D":"rbarr","\u290E":"lBarr","\u290F":"rBarr","\u2910":"RBarr","\u2911":"DDotrahd","\u2912":"UpArrowBar","\u2913":"DownArrowBar","\u2916":"Rarrtl","\u2919":"latail","\u291A":"ratail","\u291B":"lAtail","\u291C":"rAtail","\u291D":"larrfs","\u291E":"rarrfs","\u291F":"larrbfs","\u2920":"rarrbfs","\u2923":"nwarhk","\u2924":"nearhk","\u2925":"searhk","\u2926":"swarhk","\u2927":"nwnear","\u2928":"toea","\u2929":"tosa","\u292A":"swnwar","\u2933":"rarrc","\u2933\u0338":"nrarrc","\u2935":"cudarrr","\u2936":"ldca","\u2937":"rdca","\u2938":"cudarrl","\u2939":"larrpl","\u293C":"curarrm","\u293D":"cularrp","\u2945":"rarrpl","\u2948":"harrcir","\u2949":"Uarrocir","\u294A":"lurdshar","\u294B":"ldrushar","\u294E":"LeftRightVector","\u294F":"RightUpDownVector","\u2950":"DownLeftRightVector","\u2951":"LeftUpDownVector","\u2952":"LeftVectorBar","\u2953":"RightVectorBar","\u2954":"RightUpVectorBar","\u2955":"RightDownVectorBar","\u2956":"DownLeftVectorBar","\u2957":"DownRightVectorBar","\u2958":"LeftUpVectorBar","\u2959":"LeftDownVectorBar","\u295A":"LeftTeeVector","\u295B":"RightTeeVector","\u295C":"RightUpTeeVector","\u295D":"RightDownTeeVector","\u295E":"DownLeftTeeVector","\u295F":"DownRightTeeVector","\u2960":"LeftUpTeeVector","\u2961":"LeftDownTeeVector","\u2962":"lHar","\u2963":"uHar","\u2964":"rHar","\u2965":"dHar","\u2966":"luruhar","\u2967":"ldrdhar","\u2968":"ruluhar","\u2969":"rdldhar","\u296A":"lharul","\u296B":"llhard","\u296C":"rharul","\u296D":"lrhard","\u296E":"udhar","\u296F":"duhar","\u2970":"RoundImplies","\u2971":"erarr","\u2972":"simrarr","\u2973":"larrsim","\u2974":"rarrsim","\u2975":"rarrap","\u2976":"ltlarr","\u2978":"gtrarr","\u2979":"subrarr","\u297B":"suplarr","\u297C":"lfisht","\u297D":"rfisht","\u297E":"ufisht","\u297F":"dfisht","\u299A":"vzigzag","\u299C":"vangrt","\u299D":"angrtvbd","\u29A4":"ange","\u29A5":"range","\u29A6":"dwangle","\u29A7":"uwangle","\u29A8":"angmsdaa","\u29A9":"angmsdab","\u29AA":"angmsdac","\u29AB":"angmsdad","\u29AC":"angmsdae","\u29AD":"angmsdaf","\u29AE":"angmsdag","\u29AF":"angmsdah","\u29B0":"bemptyv","\u29B1":"demptyv","\u29B2":"cemptyv","\u29B3":"raemptyv","\u29B4":"laemptyv","\u29B5":"ohbar","\u29B6":"omid","\u29B7":"opar","\u29B9":"operp","\u29BB":"olcross","\u29BC":"odsold","\u29BE":"olcir","\u29BF":"ofcir","\u29C0":"olt","\u29C1":"ogt","\u29C2":"cirscir","\u29C3":"cirE","\u29C4":"solb","\u29C5":"bsolb","\u29C9":"boxbox","\u29CD":"trisb","\u29CE":"rtriltri","\u29CF":"LeftTriangleBar","\u29CF\u0338":"NotLeftTriangleBar","\u29D0":"RightTriangleBar","\u29D0\u0338":"NotRightTriangleBar","\u29DC":"iinfin","\u29DD":"infintie","\u29DE":"nvinfin","\u29E3":"eparsl","\u29E4":"smeparsl","\u29E5":"eqvparsl","\u29EB":"lozf","\u29F4":"RuleDelayed","\u29F6":"dsol","\u2A00":"xodot","\u2A01":"xoplus","\u2A02":"xotime","\u2A04":"xuplus","\u2A06":"xsqcup","\u2A0D":"fpartint","\u2A10":"cirfnint","\u2A11":"awint","\u2A12":"rppolint","\u2A13":"scpolint","\u2A14":"npolint","\u2A15":"pointint","\u2A16":"quatint","\u2A17":"intlarhk","\u2A22":"pluscir","\u2A23":"plusacir","\u2A24":"simplus","\u2A25":"plusdu","\u2A26":"plussim","\u2A27":"plustwo","\u2A29":"mcomma","\u2A2A":"minusdu","\u2A2D":"loplus","\u2A2E":"roplus","\u2A2F":"Cross","\u2A30":"timesd","\u2A31":"timesbar","\u2A33":"smashp","\u2A34":"lotimes","\u2A35":"rotimes","\u2A36":"otimesas","\u2A37":"Otimes","\u2A38":"odiv","\u2A39":"triplus","\u2A3A":"triminus","\u2A3B":"tritime","\u2A3C":"iprod","\u2A3F":"amalg","\u2A40":"capdot","\u2A42":"ncup","\u2A43":"ncap","\u2A44":"capand","\u2A45":"cupor","\u2A46":"cupcap","\u2A47":"capcup","\u2A48":"cupbrcap","\u2A49":"capbrcup","\u2A4A":"cupcup","\u2A4B":"capcap","\u2A4C":"ccups","\u2A4D":"ccaps","\u2A50":"ccupssm","\u2A53":"And","\u2A54":"Or","\u2A55":"andand","\u2A56":"oror","\u2A57":"orslope","\u2A58":"andslope","\u2A5A":"andv","\u2A5B":"orv","\u2A5C":"andd","\u2A5D":"ord","\u2A5F":"wedbar","\u2A66":"sdote","\u2A6A":"simdot","\u2A6D":"congdot","\u2A6D\u0338":"ncongdot","\u2A6E":"easter","\u2A6F":"apacir","\u2A70":"apE","\u2A70\u0338":"napE","\u2A71":"eplus","\u2A72":"pluse","\u2A73":"Esim","\u2A77":"eDDot","\u2A78":"equivDD","\u2A79":"ltcir","\u2A7A":"gtcir","\u2A7B":"ltquest","\u2A7C":"gtquest","\u2A7D":"les","\u2A7D\u0338":"nles","\u2A7E":"ges","\u2A7E\u0338":"nges","\u2A7F":"lesdot","\u2A80":"gesdot","\u2A81":"lesdoto","\u2A82":"gesdoto","\u2A83":"lesdotor","\u2A84":"gesdotol","\u2A85":"lap","\u2A86":"gap","\u2A87":"lne","\u2A88":"gne","\u2A89":"lnap","\u2A8A":"gnap","\u2A8B":"lEg","\u2A8C":"gEl","\u2A8D":"lsime","\u2A8E":"gsime","\u2A8F":"lsimg","\u2A90":"gsiml","\u2A91":"lgE","\u2A92":"glE","\u2A93":"lesges","\u2A94":"gesles","\u2A95":"els","\u2A96":"egs","\u2A97":"elsdot","\u2A98":"egsdot","\u2A99":"el","\u2A9A":"eg","\u2A9D":"siml","\u2A9E":"simg","\u2A9F":"simlE","\u2AA0":"simgE","\u2AA1":"LessLess","\u2AA1\u0338":"NotNestedLessLess","\u2AA2":"GreaterGreater","\u2AA2\u0338":"NotNestedGreaterGreater","\u2AA4":"glj","\u2AA5":"gla","\u2AA6":"ltcc","\u2AA7":"gtcc","\u2AA8":"lescc","\u2AA9":"gescc","\u2AAA":"smt","\u2AAB":"lat","\u2AAC":"smte","\u2AAC\uFE00":"smtes","\u2AAD":"late","\u2AAD\uFE00":"lates","\u2AAE":"bumpE","\u2AAF":"pre","\u2AAF\u0338":"npre","\u2AB0":"sce","\u2AB0\u0338":"nsce","\u2AB3":"prE","\u2AB4":"scE","\u2AB5":"prnE","\u2AB6":"scnE","\u2AB7":"prap","\u2AB8":"scap","\u2AB9":"prnap","\u2ABA":"scnap","\u2ABB":"Pr","\u2ABC":"Sc","\u2ABD":"subdot","\u2ABE":"supdot","\u2ABF":"subplus","\u2AC0":"supplus","\u2AC1":"submult","\u2AC2":"supmult","\u2AC3":"subedot","\u2AC4":"supedot","\u2AC5":"subE","\u2AC5\u0338":"nsubE","\u2AC6":"supE","\u2AC6\u0338":"nsupE","\u2AC7":"subsim","\u2AC8":"supsim","\u2ACB\uFE00":"vsubnE","\u2ACB":"subnE","\u2ACC\uFE00":"vsupnE","\u2ACC":"supnE","\u2ACF":"csub","\u2AD0":"csup","\u2AD1":"csube","\u2AD2":"csupe","\u2AD3":"subsup","\u2AD4":"supsub","\u2AD5":"subsub","\u2AD6":"supsup","\u2AD7":"suphsub","\u2AD8":"supdsub","\u2AD9":"forkv","\u2ADA":"topfork","\u2ADB":"mlcp","\u2AE4":"Dashv","\u2AE6":"Vdashl","\u2AE7":"Barv","\u2AE8":"vBar","\u2AE9":"vBarv","\u2AEB":"Vbar","\u2AEC":"Not","\u2AED":"bNot","\u2AEE":"rnmid","\u2AEF":"cirmid","\u2AF0":"midcir","\u2AF1":"topcir","\u2AF2":"nhpar","\u2AF3":"parsim","\u2AFD":"parsl","\u2AFD\u20E5":"nparsl","\u266D":"flat","\u266E":"natur","\u266F":"sharp","\xA4":"curren","\xA2":"cent",$:"dollar","\xA3":"pound","\xA5":"yen","\u20AC":"euro","\xB9":"sup1","\xBD":"half","\u2153":"frac13","\xBC":"frac14","\u2155":"frac15","\u2159":"frac16","\u215B":"frac18","\xB2":"sup2","\u2154":"frac23","\u2156":"frac25","\xB3":"sup3","\xBE":"frac34","\u2157":"frac35","\u215C":"frac38","\u2158":"frac45","\u215A":"frac56","\u215D":"frac58","\u215E":"frac78","\u{1D4B6}":"ascr","\u{1D552}":"aopf","\u{1D51E}":"afr","\u{1D538}":"Aopf","\u{1D504}":"Afr","\u{1D49C}":"Ascr",\u00AA:"ordf",\u00E1:"aacute",\u00C1:"Aacute",\u00E0:"agrave",\u00C0:"Agrave",\u0103:"abreve",\u0102:"Abreve",\u00E2:"acirc",\u00C2:"Acirc",\u00E5:"aring",\u00C5:"angst",\u00E4:"auml",\u00C4:"Auml",\u00E3:"atilde",\u00C3:"Atilde",\u0105:"aogon",\u0104:"Aogon",\u0101:"amacr",\u0100:"Amacr",\u00E6:"aelig",\u00C6:"AElig","\u{1D4B7}":"bscr","\u{1D553}":"bopf","\u{1D51F}":"bfr","\u{1D539}":"Bopf",\u212C:"Bscr","\u{1D505}":"Bfr","\u{1D520}":"cfr","\u{1D4B8}":"cscr","\u{1D554}":"copf",\u212D:"Cfr","\u{1D49E}":"Cscr",\u2102:"Copf",\u0107:"cacute",\u0106:"Cacute",\u0109:"ccirc",\u0108:"Ccirc",\u010D:"ccaron",\u010C:"Ccaron",\u010B:"cdot",\u010A:"Cdot",\u00E7:"ccedil",\u00C7:"Ccedil","\u2105":"incare","\u{1D521}":"dfr","\u2146":"dd","\u{1D555}":"dopf","\u{1D4B9}":"dscr","\u{1D49F}":"Dscr","\u{1D507}":"Dfr","\u2145":"DD","\u{1D53B}":"Dopf",\u010F:"dcaron",\u010E:"Dcaron",\u0111:"dstrok",\u0110:"Dstrok",\u00F0:"eth",\u00D0:"ETH","\u2147":"ee",\u212F:"escr","\u{1D522}":"efr","\u{1D556}":"eopf",\u2130:"Escr","\u{1D508}":"Efr","\u{1D53C}":"Eopf",\u00E9:"eacute",\u00C9:"Eacute",\u00E8:"egrave",\u00C8:"Egrave",\u00EA:"ecirc",\u00CA:"Ecirc",\u011B:"ecaron",\u011A:"Ecaron",\u00EB:"euml",\u00CB:"Euml",\u0117:"edot",\u0116:"Edot",\u0119:"eogon",\u0118:"Eogon",\u0113:"emacr",\u0112:"Emacr","\u{1D523}":"ffr","\u{1D557}":"fopf","\u{1D4BB}":"fscr","\u{1D509}":"Ffr","\u{1D53D}":"Fopf",\u2131:"Fscr",\uFB00:"fflig",\uFB03:"ffilig",\uFB04:"ffllig",\uFB01:"filig",fj:"fjlig",\uFB02:"fllig",\u0192:"fnof",\u210A:"gscr","\u{1D558}":"gopf","\u{1D524}":"gfr","\u{1D4A2}":"Gscr","\u{1D53E}":"Gopf","\u{1D50A}":"Gfr",\u01F5:"gacute",\u011F:"gbreve",\u011E:"Gbreve",\u011D:"gcirc",\u011C:"Gcirc",\u0121:"gdot",\u0120:"Gdot",\u0122:"Gcedil","\u{1D525}":"hfr",\u210E:"planckh","\u{1D4BD}":"hscr","\u{1D559}":"hopf",\u210B:"Hscr",\u210C:"Hfr",\u210D:"Hopf",\u0125:"hcirc",\u0124:"Hcirc",\u210F:"hbar",\u0127:"hstrok",\u0126:"Hstrok","\u{1D55A}":"iopf","\u{1D526}":"ifr","\u{1D4BE}":"iscr","\u2148":"ii","\u{1D540}":"Iopf",\u2110:"Iscr",\u2111:"Im",\u00ED:"iacute",\u00CD:"Iacute",\u00EC:"igrave",\u00CC:"Igrave",\u00EE:"icirc",\u00CE:"Icirc",\u00EF:"iuml",\u00CF:"Iuml",\u0129:"itilde",\u0128:"Itilde",\u0130:"Idot",\u012F:"iogon",\u012E:"Iogon",\u012B:"imacr",\u012A:"Imacr",\u0133:"ijlig",\u0132:"IJlig",\u0131:"imath","\u{1D4BF}":"jscr","\u{1D55B}":"jopf","\u{1D527}":"jfr","\u{1D4A5}":"Jscr","\u{1D50D}":"Jfr","\u{1D541}":"Jopf",\u0135:"jcirc",\u0134:"Jcirc","\u0237":"jmath","\u{1D55C}":"kopf","\u{1D4C0}":"kscr","\u{1D528}":"kfr","\u{1D4A6}":"Kscr","\u{1D542}":"Kopf","\u{1D50E}":"Kfr",\u0137:"kcedil",\u0136:"Kcedil","\u{1D529}":"lfr","\u{1D4C1}":"lscr",\u2113:"ell","\u{1D55D}":"lopf",\u2112:"Lscr","\u{1D50F}":"Lfr","\u{1D543}":"Lopf",\u013A:"lacute",\u0139:"Lacute",\u013E:"lcaron",\u013D:"Lcaron",\u013C:"lcedil",\u013B:"Lcedil",\u0142:"lstrok",\u0141:"Lstrok",\u0140:"lmidot",\u013F:"Lmidot","\u{1D52A}":"mfr","\u{1D55E}":"mopf","\u{1D4C2}":"mscr","\u{1D510}":"Mfr","\u{1D544}":"Mopf",\u2133:"Mscr","\u{1D52B}":"nfr","\u{1D55F}":"nopf","\u{1D4C3}":"nscr",\u2115:"Nopf","\u{1D4A9}":"Nscr","\u{1D511}":"Nfr",\u0144:"nacute",\u0143:"Nacute",\u0148:"ncaron",\u0147:"Ncaron",\u00F1:"ntilde",\u00D1:"Ntilde",\u0146:"ncedil",\u0145:"Ncedil","\u2116":"numero",\u014B:"eng",\u014A:"ENG","\u{1D560}":"oopf","\u{1D52C}":"ofr",\u2134:"oscr","\u{1D4AA}":"Oscr","\u{1D512}":"Ofr","\u{1D546}":"Oopf",\u00BA:"ordm",\u00F3:"oacute",\u00D3:"Oacute",\u00F2:"ograve",\u00D2:"Ograve",\u00F4:"ocirc",\u00D4:"Ocirc",\u00F6:"ouml",\u00D6:"Ouml",\u0151:"odblac",\u0150:"Odblac",\u00F5:"otilde",\u00D5:"Otilde",\u00F8:"oslash",\u00D8:"Oslash",\u014D:"omacr",\u014C:"Omacr",\u0153:"oelig",\u0152:"OElig","\u{1D52D}":"pfr","\u{1D4C5}":"pscr","\u{1D561}":"popf",\u2119:"Popf","\u{1D513}":"Pfr","\u{1D4AB}":"Pscr","\u{1D562}":"qopf","\u{1D52E}":"qfr","\u{1D4C6}":"qscr","\u{1D4AC}":"Qscr","\u{1D514}":"Qfr",\u211A:"Qopf",\u0138:"kgreen","\u{1D52F}":"rfr","\u{1D563}":"ropf","\u{1D4C7}":"rscr",\u211B:"Rscr",\u211C:"Re",\u211D:"Ropf",\u0155:"racute",\u0154:"Racute",\u0159:"rcaron",\u0158:"Rcaron",\u0157:"rcedil",\u0156:"Rcedil","\u{1D564}":"sopf","\u{1D4C8}":"sscr","\u{1D530}":"sfr","\u{1D54A}":"Sopf","\u{1D516}":"Sfr","\u{1D4AE}":"Sscr","\u24C8":"oS",\u015B:"sacute",\u015A:"Sacute",\u015D:"scirc",\u015C:"Scirc",\u0161:"scaron",\u0160:"Scaron",\u015F:"scedil",\u015E:"Scedil",\u00DF:"szlig","\u{1D531}":"tfr","\u{1D4C9}":"tscr","\u{1D565}":"topf","\u{1D4AF}":"Tscr","\u{1D517}":"Tfr","\u{1D54B}":"Topf",\u0165:"tcaron",\u0164:"Tcaron",\u0163:"tcedil",\u0162:"Tcedil","\u2122":"trade",\u0167:"tstrok",\u0166:"Tstrok","\u{1D4CA}":"uscr","\u{1D566}":"uopf","\u{1D532}":"ufr","\u{1D54C}":"Uopf","\u{1D518}":"Ufr","\u{1D4B0}":"Uscr",\u00FA:"uacute",\u00DA:"Uacute",\u00F9:"ugrave",\u00D9:"Ugrave",\u016D:"ubreve",\u016C:"Ubreve",\u00FB:"ucirc",\u00DB:"Ucirc",\u016F:"uring",\u016E:"Uring",\u00FC:"uuml",\u00DC:"Uuml",\u0171:"udblac",\u0170:"Udblac",\u0169:"utilde",\u0168:"Utilde",\u0173:"uogon",\u0172:"Uogon",\u016B:"umacr",\u016A:"Umacr","\u{1D533}":"vfr","\u{1D567}":"vopf","\u{1D4CB}":"vscr","\u{1D519}":"Vfr","\u{1D54D}":"Vopf","\u{1D4B1}":"Vscr","\u{1D568}":"wopf","\u{1D4CC}":"wscr","\u{1D534}":"wfr","\u{1D4B2}":"Wscr","\u{1D54E}":"Wopf","\u{1D51A}":"Wfr",\u0175:"wcirc",\u0174:"Wcirc","\u{1D535}":"xfr","\u{1D4CD}":"xscr","\u{1D569}":"xopf","\u{1D54F}":"Xopf","\u{1D51B}":"Xfr","\u{1D4B3}":"Xscr","\u{1D536}":"yfr","\u{1D4CE}":"yscr","\u{1D56A}":"yopf","\u{1D4B4}":"Yscr","\u{1D51C}":"Yfr","\u{1D550}":"Yopf",\u00FD:"yacute",\u00DD:"Yacute",\u0177:"ycirc",\u0176:"Ycirc",\u00FF:"yuml",\u0178:"Yuml","\u{1D4CF}":"zscr","\u{1D537}":"zfr","\u{1D56B}":"zopf",\u2128:"Zfr",\u2124:"Zopf","\u{1D4B5}":"Zscr",\u017A:"zacute",\u0179:"Zacute",\u017E:"zcaron",\u017D:"Zcaron",\u017C:"zdot",\u017B:"Zdot",\u01B5:"imped",\u00FE:"thorn",\u00DE:"THORN",\u0149:"napos",\u03B1:"alpha",\u0391:"Alpha",\u03B2:"beta",\u0392:"Beta",\u03B3:"gamma",\u0393:"Gamma",\u03B4:"delta",\u0394:"Delta",\u03B5:"epsi","\u03F5":"epsiv",\u0395:"Epsilon",\u03DD:"gammad",\u03DC:"Gammad",\u03B6:"zeta",\u0396:"Zeta",\u03B7:"eta",\u0397:"Eta",\u03B8:"theta",\u03D1:"thetav",\u0398:"Theta",\u03B9:"iota",\u0399:"Iota",\u03BA:"kappa",\u03F0:"kappav",\u039A:"Kappa",\u03BB:"lambda",\u039B:"Lambda",\u03BC:"mu",\u00B5:"micro",\u039C:"Mu",\u03BD:"nu",\u039D:"Nu",\u03BE:"xi",\u039E:"Xi",\u03BF:"omicron",\u039F:"Omicron",\u03C0:"pi",\u03D6:"piv",\u03A0:"Pi",\u03C1:"rho",\u03F1:"rhov",\u03A1:"Rho",\u03C3:"sigma",\u03A3:"Sigma",\u03C2:"sigmaf",\u03C4:"tau",\u03A4:"Tau",\u03C5:"upsi",\u03A5:"Upsilon",\u03D2:"Upsi",\u03C6:"phi",\u03D5:"phiv",\u03A6:"Phi",\u03C7:"chi",\u03A7:"Chi",\u03C8:"psi",\u03A8:"Psi",\u03C9:"omega",\u03A9:"ohm",\u0430:"acy",\u0410:"Acy",\u0431:"bcy",\u0411:"Bcy",\u0432:"vcy",\u0412:"Vcy",\u0433:"gcy",\u0413:"Gcy",\u0453:"gjcy",\u0403:"GJcy",\u0434:"dcy",\u0414:"Dcy",\u0452:"djcy",\u0402:"DJcy",\u0435:"iecy",\u0415:"IEcy",\u0451:"iocy",\u0401:"IOcy",\u0454:"jukcy",\u0404:"Jukcy",\u0436:"zhcy",\u0416:"ZHcy",\u0437:"zcy",\u0417:"Zcy",\u0455:"dscy",\u0405:"DScy",\u0438:"icy",\u0418:"Icy",\u0456:"iukcy",\u0406:"Iukcy",\u0457:"yicy",\u0407:"YIcy",\u0439:"jcy",\u0419:"Jcy",\u0458:"jsercy",\u0408:"Jsercy",\u043A:"kcy",\u041A:"Kcy",\u045C:"kjcy",\u040C:"KJcy",\u043B:"lcy",\u041B:"Lcy",\u0459:"ljcy",\u0409:"LJcy",\u043C:"mcy",\u041C:"Mcy",\u043D:"ncy",\u041D:"Ncy",\u045A:"njcy",\u040A:"NJcy",\u043E:"ocy",\u041E:"Ocy",\u043F:"pcy",\u041F:"Pcy",\u0440:"rcy",\u0420:"Rcy",\u0441:"scy",\u0421:"Scy",\u0442:"tcy",\u0422:"Tcy",\u045B:"tshcy",\u040B:"TSHcy",\u0443:"ucy",\u0423:"Ucy",\u045E:"ubrcy",\u040E:"Ubrcy",\u0444:"fcy",\u0424:"Fcy",\u0445:"khcy",\u0425:"KHcy",\u0446:"tscy",\u0426:"TScy",\u0447:"chcy",\u0427:"CHcy",\u045F:"dzcy",\u040F:"DZcy",\u0448:"shcy",\u0428:"SHcy",\u0449:"shchcy",\u0429:"SHCHcy",\u044A:"hardcy",\u042A:"HARDcy",\u044B:"ycy",\u042B:"Ycy",\u044C:"softcy",\u042C:"SOFTcy",\u044D:"ecy",\u042D:"Ecy",\u044E:"yucy",\u042E:"YUcy",\u044F:"yacy",\u042F:"YAcy",\u2135:"aleph",\u2136:"beth",\u2137:"gimel",\u2138:"daleth"},l=/["&'<>`]/g,u={'"':""","&":"&","'":"'","<":"<",">":">","`":"`"},f=/&#(?:[xX][^a-fA-F0-9]|[^0-9xX])/,h=/[\0-\x08\x0B\x0E-\x1F\x7F-\x9F\uFDD0-\uFDEF\uFFFE\uFFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F\uDBBF\uDBFF][\uDFFE\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,p=/&(CounterClockwiseContourIntegral|DoubleLongLeftRightArrow|ClockwiseContourIntegral|NotNestedGreaterGreater|NotSquareSupersetEqual|DiacriticalDoubleAcute|NotRightTriangleEqual|NotSucceedsSlantEqual|NotPrecedesSlantEqual|CloseCurlyDoubleQuote|NegativeVeryThinSpace|DoubleContourIntegral|FilledVerySmallSquare|CapitalDifferentialD|OpenCurlyDoubleQuote|EmptyVerySmallSquare|NestedGreaterGreater|DoubleLongRightArrow|NotLeftTriangleEqual|NotGreaterSlantEqual|ReverseUpEquilibrium|DoubleLeftRightArrow|NotSquareSubsetEqual|NotDoubleVerticalBar|RightArrowLeftArrow|NotGreaterFullEqual|NotRightTriangleBar|SquareSupersetEqual|DownLeftRightVector|DoubleLongLeftArrow|leftrightsquigarrow|LeftArrowRightArrow|NegativeMediumSpace|blacktriangleright|RightDownVectorBar|PrecedesSlantEqual|RightDoubleBracket|SucceedsSlantEqual|NotLeftTriangleBar|RightTriangleEqual|SquareIntersection|RightDownTeeVector|ReverseEquilibrium|NegativeThickSpace|longleftrightarrow|Longleftrightarrow|LongLeftRightArrow|DownRightTeeVector|DownRightVectorBar|GreaterSlantEqual|SquareSubsetEqual|LeftDownVectorBar|LeftDoubleBracket|VerticalSeparator|rightleftharpoons|NotGreaterGreater|NotSquareSuperset|blacktriangleleft|blacktriangledown|NegativeThinSpace|LeftDownTeeVector|NotLessSlantEqual|leftrightharpoons|DoubleUpDownArrow|DoubleVerticalBar|LeftTriangleEqual|FilledSmallSquare|twoheadrightarrow|NotNestedLessLess|DownLeftTeeVector|DownLeftVectorBar|RightAngleBracket|NotTildeFullEqual|NotReverseElement|RightUpDownVector|DiacriticalTilde|NotSucceedsTilde|circlearrowright|NotPrecedesEqual|rightharpoondown|DoubleRightArrow|NotSucceedsEqual|NonBreakingSpace|NotRightTriangle|LessEqualGreater|RightUpTeeVector|LeftAngleBracket|GreaterFullEqual|DownArrowUpArrow|RightUpVectorBar|twoheadleftarrow|GreaterEqualLess|downharpoonright|RightTriangleBar|ntrianglerighteq|NotSupersetEqual|LeftUpDownVector|DiacriticalAcute|rightrightarrows|vartriangleright|UpArrowDownArrow|DiacriticalGrave|UnderParenthesis|EmptySmallSquare|LeftUpVectorBar|leftrightarrows|DownRightVector|downharpoonleft|trianglerighteq|ShortRightArrow|OverParenthesis|DoubleLeftArrow|DoubleDownArrow|NotSquareSubset|bigtriangledown|ntrianglelefteq|UpperRightArrow|curvearrowright|vartriangleleft|NotLeftTriangle|nleftrightarrow|LowerRightArrow|NotHumpDownHump|NotGreaterTilde|rightthreetimes|LeftUpTeeVector|NotGreaterEqual|straightepsilon|LeftTriangleBar|rightsquigarrow|ContourIntegral|rightleftarrows|CloseCurlyQuote|RightDownVector|LeftRightVector|nLeftrightarrow|leftharpoondown|circlearrowleft|SquareSuperset|OpenCurlyQuote|hookrightarrow|HorizontalLine|DiacriticalDot|NotLessGreater|ntriangleright|DoubleRightTee|InvisibleComma|InvisibleTimes|LowerLeftArrow|DownLeftVector|NotSubsetEqual|curvearrowleft|trianglelefteq|NotVerticalBar|TildeFullEqual|downdownarrows|NotGreaterLess|RightTeeVector|ZeroWidthSpace|looparrowright|LongRightArrow|doublebarwedge|ShortLeftArrow|ShortDownArrow|RightVectorBar|GreaterGreater|ReverseElement|rightharpoonup|LessSlantEqual|leftthreetimes|upharpoonright|rightarrowtail|LeftDownVector|Longrightarrow|NestedLessLess|UpperLeftArrow|nshortparallel|leftleftarrows|leftrightarrow|Leftrightarrow|LeftRightArrow|longrightarrow|upharpoonleft|RightArrowBar|ApplyFunction|LeftTeeVector|leftarrowtail|NotEqualTilde|varsubsetneqq|varsupsetneqq|RightTeeArrow|SucceedsEqual|SucceedsTilde|LeftVectorBar|SupersetEqual|hookleftarrow|DifferentialD|VerticalTilde|VeryThinSpace|blacktriangle|bigtriangleup|LessFullEqual|divideontimes|leftharpoonup|UpEquilibrium|ntriangleleft|RightTriangle|measuredangle|shortparallel|longleftarrow|Longleftarrow|LongLeftArrow|DoubleLeftTee|Poincareplane|PrecedesEqual|triangleright|DoubleUpArrow|RightUpVector|fallingdotseq|looparrowleft|PrecedesTilde|NotTildeEqual|NotTildeTilde|smallsetminus|Proportional|triangleleft|triangledown|UnderBracket|NotHumpEqual|exponentiale|ExponentialE|NotLessTilde|HilbertSpace|RightCeiling|blacklozenge|varsupsetneq|HumpDownHump|GreaterEqual|VerticalLine|LeftTeeArrow|NotLessEqual|DownTeeArrow|LeftTriangle|varsubsetneq|Intersection|NotCongruent|DownArrowBar|LeftUpVector|LeftArrowBar|risingdotseq|GreaterTilde|RoundImplies|SquareSubset|ShortUpArrow|NotSuperset|quaternions|precnapprox|backepsilon|preccurlyeq|OverBracket|blacksquare|MediumSpace|VerticalBar|circledcirc|circleddash|CircleMinus|CircleTimes|LessGreater|curlyeqprec|curlyeqsucc|diamondsuit|UpDownArrow|Updownarrow|RuleDelayed|Rrightarrow|updownarrow|RightVector|nRightarrow|nrightarrow|eqslantless|LeftCeiling|Equilibrium|SmallCircle|expectation|NotSucceeds|thickapprox|GreaterLess|SquareUnion|NotPrecedes|NotLessLess|straightphi|succnapprox|succcurlyeq|SubsetEqual|sqsupseteq|Proportion|Laplacetrf|ImaginaryI|supsetneqq|NotGreater|gtreqqless|NotElement|ThickSpace|TildeEqual|TildeTilde|Fouriertrf|rmoustache|EqualTilde|eqslantgtr|UnderBrace|LeftVector|UpArrowBar|nLeftarrow|nsubseteqq|subsetneqq|nsupseteqq|nleftarrow|succapprox|lessapprox|UpTeeArrow|upuparrows|curlywedge|lesseqqgtr|varepsilon|varnothing|RightFloor|complement|CirclePlus|sqsubseteq|Lleftarrow|circledast|RightArrow|Rightarrow|rightarrow|lmoustache|Bernoullis|precapprox|mapstoleft|mapstodown|longmapsto|dotsquare|downarrow|DoubleDot|nsubseteq|supsetneq|leftarrow|nsupseteq|subsetneq|ThinSpace|ngeqslant|subseteqq|HumpEqual|NotSubset|triangleq|NotCupCap|lesseqgtr|heartsuit|TripleDot|Leftarrow|Coproduct|Congruent|varpropto|complexes|gvertneqq|LeftArrow|LessTilde|supseteqq|MinusPlus|CircleDot|nleqslant|NotExists|gtreqless|nparallel|UnionPlus|LeftFloor|checkmark|CenterDot|centerdot|Mellintrf|gtrapprox|bigotimes|OverBrace|spadesuit|therefore|pitchfork|rationals|PlusMinus|Backslash|Therefore|DownBreve|backsimeq|backprime|DownArrow|nshortmid|Downarrow|lvertneqq|eqvparsl|imagline|imagpart|infintie|integers|Integral|intercal|LessLess|Uarrocir|intlarhk|sqsupset|angmsdaf|sqsubset|llcorner|vartheta|cupbrcap|lnapprox|Superset|SuchThat|succnsim|succneqq|angmsdag|biguplus|curlyvee|trpezium|Succeeds|NotTilde|bigwedge|angmsdah|angrtvbd|triminus|cwconint|fpartint|lrcorner|smeparsl|subseteq|urcorner|lurdshar|laemptyv|DDotrahd|approxeq|ldrushar|awconint|mapstoup|backcong|shortmid|triangle|geqslant|gesdotol|timesbar|circledR|circledS|setminus|multimap|naturals|scpolint|ncongdot|RightTee|boxminus|gnapprox|boxtimes|andslope|thicksim|angmsdaa|varsigma|cirfnint|rtriltri|angmsdab|rppolint|angmsdac|barwedge|drbkarow|clubsuit|thetasym|bsolhsub|capbrcup|dzigrarr|doteqdot|DotEqual|dotminus|UnderBar|NotEqual|realpart|otimesas|ulcorner|hksearow|hkswarow|parallel|PartialD|elinters|emptyset|plusacir|bbrktbrk|angmsdad|pointint|bigoplus|angmsdae|Precedes|bigsqcup|varkappa|notindot|supseteq|precneqq|precnsim|profalar|profline|profsurf|leqslant|lesdotor|raemptyv|subplus|notnivb|notnivc|subrarr|zigrarr|vzigzag|submult|subedot|Element|between|cirscir|larrbfs|larrsim|lotimes|lbrksld|lbrkslu|lozenge|ldrdhar|dbkarow|bigcirc|epsilon|simrarr|simplus|ltquest|Epsilon|luruhar|gtquest|maltese|npolint|eqcolon|npreceq|bigodot|ddagger|gtrless|bnequiv|harrcir|ddotseq|equivDD|backsim|demptyv|nsqsube|nsqsupe|Upsilon|nsubset|upsilon|minusdu|nsucceq|swarrow|nsupset|coloneq|searrow|boxplus|napprox|natural|asympeq|alefsym|congdot|nearrow|bigstar|diamond|supplus|tritime|LeftTee|nvinfin|triplus|NewLine|nvltrie|nvrtrie|nwarrow|nexists|Diamond|ruluhar|Implies|supmult|angzarr|suplarr|suphsub|questeq|because|digamma|Because|olcross|bemptyv|omicron|Omicron|rotimes|NoBreak|intprod|angrtvb|orderof|uwangle|suphsol|lesdoto|orslope|DownTee|realine|cudarrl|rdldhar|OverBar|supedot|lessdot|supdsub|topfork|succsim|rbrkslu|rbrksld|pertenk|cudarrr|isindot|planckh|lessgtr|pluscir|gesdoto|plussim|plustwo|lesssim|cularrp|rarrsim|Cayleys|notinva|notinvb|notinvc|UpArrow|Uparrow|uparrow|NotLess|dwangle|precsim|Product|curarrm|Cconint|dotplus|rarrbfs|ccupssm|Cedilla|cemptyv|notniva|quatint|frac35|frac38|frac45|frac56|frac58|frac78|tridot|xoplus|gacute|gammad|Gammad|lfisht|lfloor|bigcup|sqsupe|gbreve|Gbreve|lharul|sqsube|sqcups|Gcedil|apacir|llhard|lmidot|Lmidot|lmoust|andand|sqcaps|approx|Abreve|spades|circeq|tprime|divide|topcir|Assign|topbot|gesdot|divonx|xuplus|timesd|gesles|atilde|solbar|SOFTcy|loplus|timesb|lowast|lowbar|dlcorn|dlcrop|softcy|dollar|lparlt|thksim|lrhard|Atilde|lsaquo|smashp|bigvee|thinsp|wreath|bkarow|lsquor|lstrok|Lstrok|lthree|ltimes|ltlarr|DotDot|simdot|ltrPar|weierp|xsqcup|angmsd|sigmav|sigmaf|zeetrf|Zcaron|zcaron|mapsto|vsupne|thetav|cirmid|marker|mcomma|Zacute|vsubnE|there4|gtlPar|vsubne|bottom|gtrarr|SHCHcy|shchcy|midast|midcir|middot|minusb|minusd|gtrdot|bowtie|sfrown|mnplus|models|colone|seswar|Colone|mstpos|searhk|gtrsim|nacute|Nacute|boxbox|telrec|hairsp|Tcedil|nbumpe|scnsim|ncaron|Ncaron|ncedil|Ncedil|hamilt|Scedil|nearhk|hardcy|HARDcy|tcedil|Tcaron|commat|nequiv|nesear|tcaron|target|hearts|nexist|varrho|scedil|Scaron|scaron|hellip|Sacute|sacute|hercon|swnwar|compfn|rtimes|rthree|rsquor|rsaquo|zacute|wedgeq|homtht|barvee|barwed|Barwed|rpargt|horbar|conint|swarhk|roplus|nltrie|hslash|hstrok|Hstrok|rmoust|Conint|bprime|hybull|hyphen|iacute|Iacute|supsup|supsub|supsim|varphi|coprod|brvbar|agrave|Supset|supset|igrave|Igrave|notinE|Agrave|iiiint|iinfin|copysr|wedbar|Verbar|vangrt|becaus|incare|verbar|inodot|bullet|drcorn|intcal|drcrop|cularr|vellip|Utilde|bumpeq|cupcap|dstrok|Dstrok|CupCap|cupcup|cupdot|eacute|Eacute|supdot|iquest|easter|ecaron|Ecaron|ecolon|isinsv|utilde|itilde|Itilde|curarr|succeq|Bumpeq|cacute|ulcrop|nparsl|Cacute|nprcue|egrave|Egrave|nrarrc|nrarrw|subsup|subsub|nrtrie|jsercy|nsccue|Jsercy|kappav|kcedil|Kcedil|subsim|ulcorn|nsimeq|egsdot|veebar|kgreen|capand|elsdot|Subset|subset|curren|aacute|lacute|Lacute|emptyv|ntilde|Ntilde|lagran|lambda|Lambda|capcap|Ugrave|langle|subdot|emsp13|numero|emsp14|nvdash|nvDash|nVdash|nVDash|ugrave|ufisht|nvHarr|larrfs|nvlArr|larrhk|larrlp|larrpl|nvrArr|Udblac|nwarhk|larrtl|nwnear|oacute|Oacute|latail|lAtail|sstarf|lbrace|odblac|Odblac|lbrack|udblac|odsold|eparsl|lcaron|Lcaron|ograve|Ograve|lcedil|Lcedil|Aacute|ssmile|ssetmn|squarf|ldquor|capcup|ominus|cylcty|rharul|eqcirc|dagger|rfloor|rfisht|Dagger|daleth|equals|origof|capdot|equest|dcaron|Dcaron|rdquor|oslash|Oslash|otilde|Otilde|otimes|Otimes|urcrop|Ubreve|ubreve|Yacute|Uacute|uacute|Rcedil|rcedil|urcorn|parsim|Rcaron|Vdashl|rcaron|Tstrok|percnt|period|permil|Exists|yacute|rbrack|rbrace|phmmat|ccaron|Ccaron|planck|ccedil|plankv|tstrok|female|plusdo|plusdu|ffilig|plusmn|ffllig|Ccedil|rAtail|dfisht|bernou|ratail|Rarrtl|rarrtl|angsph|rarrpl|rarrlp|rarrhk|xwedge|xotime|forall|ForAll|Vvdash|vsupnE|preceq|bigcap|frac12|frac13|frac14|primes|rarrfs|prnsim|frac15|Square|frac16|square|lesdot|frac18|frac23|propto|prurel|rarrap|rangle|puncsp|frac25|Racute|qprime|racute|lesges|frac34|abreve|AElig|eqsim|utdot|setmn|urtri|Equal|Uring|seArr|uring|searr|dashv|Dashv|mumap|nabla|iogon|Iogon|sdote|sdotb|scsim|napid|napos|equiv|natur|Acirc|dblac|erarr|nbump|iprod|erDot|ucirc|awint|esdot|angrt|ncong|isinE|scnap|Scirc|scirc|ndash|isins|Ubrcy|nearr|neArr|isinv|nedot|ubrcy|acute|Ycirc|iukcy|Iukcy|xutri|nesim|caret|jcirc|Jcirc|caron|twixt|ddarr|sccue|exist|jmath|sbquo|ngeqq|angst|ccaps|lceil|ngsim|UpTee|delta|Delta|rtrif|nharr|nhArr|nhpar|rtrie|jukcy|Jukcy|kappa|rsquo|Kappa|nlarr|nlArr|TSHcy|rrarr|aogon|Aogon|fflig|xrarr|tshcy|ccirc|nleqq|filig|upsih|nless|dharl|nlsim|fjlig|ropar|nltri|dharr|robrk|roarr|fllig|fltns|roang|rnmid|subnE|subne|lAarr|trisb|Ccirc|acirc|ccups|blank|VDash|forkv|Vdash|langd|cedil|blk12|blk14|laquo|strns|diams|notin|vDash|larrb|blk34|block|disin|uplus|vdash|vBarv|aelig|starf|Wedge|check|xrArr|lates|lbarr|lBarr|notni|lbbrk|bcong|frasl|lbrke|frown|vrtri|vprop|vnsup|gamma|Gamma|wedge|xodot|bdquo|srarr|doteq|ldquo|boxdl|boxdL|gcirc|Gcirc|boxDl|boxDL|boxdr|boxdR|boxDr|TRADE|trade|rlhar|boxDR|vnsub|npart|vltri|rlarr|boxhd|boxhD|nprec|gescc|nrarr|nrArr|boxHd|boxHD|boxhu|boxhU|nrtri|boxHu|clubs|boxHU|times|colon|Colon|gimel|xlArr|Tilde|nsime|tilde|nsmid|nspar|THORN|thorn|xlarr|nsube|nsubE|thkap|xhArr|comma|nsucc|boxul|boxuL|nsupe|nsupE|gneqq|gnsim|boxUl|boxUL|grave|boxur|boxuR|boxUr|boxUR|lescc|angle|bepsi|boxvh|varpi|boxvH|numsp|Theta|gsime|gsiml|theta|boxVh|boxVH|boxvl|gtcir|gtdot|boxvL|boxVl|boxVL|crarr|cross|Cross|nvsim|boxvr|nwarr|nwArr|sqsup|dtdot|Uogon|lhard|lharu|dtrif|ocirc|Ocirc|lhblk|duarr|odash|sqsub|Hacek|sqcup|llarr|duhar|oelig|OElig|ofcir|boxvR|uogon|lltri|boxVr|csube|uuarr|ohbar|csupe|ctdot|olarr|olcir|harrw|oline|sqcap|omacr|Omacr|omega|Omega|boxVR|aleph|lneqq|lnsim|loang|loarr|rharu|lobrk|hcirc|operp|oplus|rhard|Hcirc|orarr|Union|order|ecirc|Ecirc|cuepr|szlig|cuesc|breve|reals|eDDot|Breve|hoarr|lopar|utrif|rdquo|Umacr|umacr|efDot|swArr|ultri|alpha|rceil|ovbar|swarr|Wcirc|wcirc|smtes|smile|bsemi|lrarr|aring|parsl|lrhar|bsime|uhblk|lrtri|cupor|Aring|uharr|uharl|slarr|rbrke|bsolb|lsime|rbbrk|RBarr|lsimg|phone|rBarr|rbarr|icirc|lsquo|Icirc|emacr|Emacr|ratio|simne|plusb|simlE|simgE|simeq|pluse|ltcir|ltdot|empty|xharr|xdtri|iexcl|Alpha|ltrie|rarrw|pound|ltrif|xcirc|bumpe|prcue|bumpE|asymp|amacr|cuvee|Sigma|sigma|iiint|udhar|iiota|ijlig|IJlig|supnE|imacr|Imacr|prime|Prime|image|prnap|eogon|Eogon|rarrc|mdash|mDDot|cuwed|imath|supne|imped|Amacr|udarr|prsim|micro|rarrb|cwint|raquo|infin|eplus|range|rangd|Ucirc|radic|minus|amalg|veeeq|rAarr|epsiv|ycirc|quest|sharp|quot|zwnj|Qscr|race|qscr|Qopf|qopf|qint|rang|Rang|Zscr|zscr|Zopf|zopf|rarr|rArr|Rarr|Pscr|pscr|prop|prod|prnE|prec|ZHcy|zhcy|prap|Zeta|zeta|Popf|popf|Zdot|plus|zdot|Yuml|yuml|phiv|YUcy|yucy|Yscr|yscr|perp|Yopf|yopf|part|para|YIcy|Ouml|rcub|yicy|YAcy|rdca|ouml|osol|Oscr|rdsh|yacy|real|oscr|xvee|andd|rect|andv|Xscr|oror|ordm|ordf|xscr|ange|aopf|Aopf|rHar|Xopf|opar|Oopf|xopf|xnis|rhov|oopf|omid|xmap|oint|apid|apos|ogon|ascr|Ascr|odot|odiv|xcup|xcap|ocir|oast|nvlt|nvle|nvgt|nvge|nvap|Wscr|wscr|auml|ntlg|ntgl|nsup|nsub|nsim|Nscr|nscr|nsce|Wopf|ring|npre|wopf|npar|Auml|Barv|bbrk|Nopf|nopf|nmid|nLtv|beta|ropf|Ropf|Beta|beth|nles|rpar|nleq|bnot|bNot|nldr|NJcy|rscr|Rscr|Vscr|vscr|rsqb|njcy|bopf|nisd|Bopf|rtri|Vopf|nGtv|ngtr|vopf|boxh|boxH|boxv|nges|ngeq|boxV|bscr|scap|Bscr|bsim|Vert|vert|bsol|bull|bump|caps|cdot|ncup|scnE|ncap|nbsp|napE|Cdot|cent|sdot|Vbar|nang|vBar|chcy|Mscr|mscr|sect|semi|CHcy|Mopf|mopf|sext|circ|cire|mldr|mlcp|cirE|comp|shcy|SHcy|vArr|varr|cong|copf|Copf|copy|COPY|malt|male|macr|lvnE|cscr|ltri|sime|ltcc|simg|Cscr|siml|csub|Uuml|lsqb|lsim|uuml|csup|Lscr|lscr|utri|smid|lpar|cups|smte|lozf|darr|Lopf|Uscr|solb|lopf|sopf|Sopf|lneq|uscr|spar|dArr|lnap|Darr|dash|Sqrt|LJcy|ljcy|lHar|dHar|Upsi|upsi|diam|lesg|djcy|DJcy|leqq|dopf|Dopf|dscr|Dscr|dscy|ldsh|ldca|squf|DScy|sscr|Sscr|dsol|lcub|late|star|Star|Uopf|Larr|lArr|larr|uopf|dtri|dzcy|sube|subE|Lang|lang|Kscr|kscr|Kopf|kopf|KJcy|kjcy|KHcy|khcy|DZcy|ecir|edot|eDot|Jscr|jscr|succ|Jopf|jopf|Edot|uHar|emsp|ensp|Iuml|iuml|eopf|isin|Iscr|iscr|Eopf|epar|sung|epsi|escr|sup1|sup2|sup3|Iota|iota|supe|supE|Iopf|iopf|IOcy|iocy|Escr|esim|Esim|imof|Uarr|QUOT|uArr|uarr|euml|IEcy|iecy|Idot|Euml|euro|excl|Hscr|hscr|Hopf|hopf|TScy|tscy|Tscr|hbar|tscr|flat|tbrk|fnof|hArr|harr|half|fopf|Fopf|tdot|gvnE|fork|trie|gtcc|fscr|Fscr|gdot|gsim|Gscr|gscr|Gopf|gopf|gneq|Gdot|tosa|gnap|Topf|topf|geqq|toea|GJcy|gjcy|tint|gesl|mid|Sfr|ggg|top|ges|gla|glE|glj|geq|gne|gEl|g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rave|Yacute|aacute|agrave|atilde|brvbar|ccedil|curren|divide|eacute|egrave|frac12|frac14|frac34|iacute|igrave|iquest|middot|ntilde|oacute|ograve|oslash|otilde|plusmn|uacute|ugrave|yacute|AElig|Acirc|Aring|Ecirc|Icirc|Ocirc|THORN|Ucirc|acirc|acute|aelig|aring|cedil|ecirc|icirc|iexcl|laquo|micro|ocirc|pound|raquo|szlig|thorn|times|ucirc|Auml|COPY|Euml|Iuml|Ouml|QUOT|Uuml|auml|cent|copy|euml|iuml|macr|nbsp|ordf|ordm|ouml|para|quot|sect|sup1|sup2|sup3|uuml|yuml|AMP|ETH|REG|amp|deg|eth|not|reg|shy|uml|yen|GT|LT|gt|lt)(?!;)([=a-zA-Z0-9]?)|&#([0-9]+)(;?)|&#[xX]([a-fA-F0-9]+)(;?)|&([0-9a-zA-Z]+)/g,v={aacute:"\xE1",Aacute:"\xC1",abreve:"\u0103",Abreve:"\u0102",ac:"\u223E",acd:"\u223F",acE:"\u223E\u0333",acirc:"\xE2",Acirc:"\xC2",acute:"\xB4",acy:"\u0430",Acy:"\u0410",aelig:"\xE6",AElig:"\xC6",af:"\u2061",afr:"\u{1D51E}",Afr:"\u{1D504}",agrave:"\xE0",Agrave:"\xC0",alefsym:"\u2135",aleph:"\u2135",alpha:"\u03B1",Alpha:"\u0391",amacr:"\u0101",Amacr:"\u0100",amalg:"\u2A3F",amp:"&",AMP:"&",and:"\u2227",And:"\u2A53",andand:"\u2A55",andd:"\u2A5C",andslope:"\u2A58",andv:"\u2A5A",ang:"\u2220",ange:"\u29A4",angle:"\u2220",angmsd:"\u2221",angmsdaa:"\u29A8",angmsdab:"\u29A9",angmsdac:"\u29AA",angmsdad:"\u29AB",angmsdae:"\u29AC",angmsdaf:"\u29AD",angmsdag:"\u29AE",angmsdah:"\u29AF",angrt:"\u221F",angrtvb:"\u22BE",angrtvbd:"\u299D",angsph:"\u2222",angst:"\xC5",angzarr:"\u237C",aogon:"\u0105",Aogon:"\u0104",aopf:"\u{1D552}",Aopf:"\u{1D538}",ap:"\u2248",apacir:"\u2A6F",ape:"\u224A",apE:"\u2A70",apid:"\u224B",apos:"'",ApplyFunction:"\u2061",approx:"\u2248",approxeq:"\u224A",aring:"\xE5",Aring:"\xC5",ascr:"\u{1D4B6}",Ascr:"\u{1D49C}",Assign:"\u2254",ast:"*",asymp:"\u2248",asympeq:"\u224D",atilde:"\xE3",Atilde:"\xC3",auml:"\xE4",Auml:"\xC4",awconint:"\u2233",awint:"\u2A11",backcong:"\u224C",backepsilon:"\u03F6",backprime:"\u2035",backsim:"\u223D",backsimeq:"\u22CD",Backslash:"\u2216",Barv:"\u2AE7",barvee:"\u22BD",barwed:"\u2305",Barwed:"\u2306",barwedge:"\u2305",bbrk:"\u23B5",bbrktbrk:"\u23B6",bcong:"\u224C",bcy:"\u0431",Bcy:"\u0411",bdquo:"\u201E",becaus:"\u2235",because:"\u2235",Because:"\u2235",bemptyv:"\u29B0",bepsi:"\u03F6",bernou:"\u212C",Bernoullis:"\u212C",beta:"\u03B2",Beta:"\u0392",beth:"\u2136",between:"\u226C",bfr:"\u{1D51F}",Bfr:"\u{1D505}",bigcap:"\u22C2",bigcirc:"\u25EF",bigcup:"\u22C3",bigodot:"\u2A00",bigoplus:"\u2A01",bigotimes:"\u2A02",bigsqcup:"\u2A06",bigstar:"\u2605",bigtriangledown:"\u25BD",bigtriangleup:"\u25B3",biguplus:"\u2A04",bigvee:"\u22C1",bigwedge:"\u22C0",bkarow:"\u290D",blacklozenge:"\u29EB",blacksquare:"\u25AA",blacktriangle:"\u25B4",blacktriangledown:"\u25BE",blacktriangleleft:"\u25C2",blacktriangleright:"\u25B8",blank:"\u2423",blk12:"\u2592",blk14:"\u2591",blk34:"\u2593",block:"\u2588",bne:"=\u20E5",bnequiv:"\u2261\u20E5",bnot:"\u2310",bNot:"\u2AED",bopf:"\u{1D553}",Bopf:"\u{1D539}",bot:"\u22A5",bottom:"\u22A5",bowtie:"\u22C8",boxbox:"\u29C9",boxdl:"\u2510",boxdL:"\u2555",boxDl:"\u2556",boxDL:"\u2557",boxdr:"\u250C",boxdR:"\u2552",boxDr:"\u2553",boxDR:"\u2554",boxh:"\u2500",boxH:"\u2550",boxhd:"\u252C",boxhD:"\u2565",boxHd:"\u2564",boxHD:"\u2566",boxhu:"\u2534",boxhU:"\u2568",boxHu:"\u2567",boxHU:"\u2569",boxminus:"\u229F",boxplus:"\u229E",boxtimes:"\u22A0",boxul:"\u2518",boxuL:"\u255B",boxUl:"\u255C",boxUL:"\u255D",boxur:"\u2514",boxuR:"\u2558",boxUr:"\u2559",boxUR:"\u255A",boxv:"\u2502",boxV:"\u2551",boxvh:"\u253C",boxvH:"\u256A",boxVh:"\u256B",boxVH:"\u256C",boxvl:"\u2524",boxvL:"\u2561",boxVl:"\u2562",boxVL:"\u2563",boxvr:"\u251C",boxvR:"\u255E",boxVr:"\u255F",boxVR:"\u2560",bprime:"\u2035",breve:"\u02D8",Breve:"\u02D8",brvbar:"\xA6",bscr:"\u{1D4B7}",Bscr:"\u212C",bsemi:"\u204F",bsim:"\u223D",bsime:"\u22CD",bsol:"\\",bsolb:"\u29C5",bsolhsub:"\u27C8",bull:"\u2022",bullet:"\u2022",bump:"\u224E",bumpe:"\u224F",bumpE:"\u2AAE",bumpeq:"\u224F",Bumpeq:"\u224E",cacute:"\u0107",Cacute:"\u0106",cap:"\u2229",Cap:"\u22D2",capand:"\u2A44",capbrcup:"\u2A49",capcap:"\u2A4B",capcup:"\u2A47",capdot:"\u2A40",CapitalDifferentialD:"\u2145",caps:"\u2229\uFE00",caret:"\u2041",caron:"\u02C7",Cayleys:"\u212D",ccaps:"\u2A4D",ccaron:"\u010D",Ccaron:"\u010C",ccedil:"\xE7",Ccedil:"\xC7",ccirc:"\u0109",Ccirc:"\u0108",Cconint:"\u2230",ccups:"\u2A4C",ccupssm:"\u2A50",cdot:"\u010B",Cdot:"\u010A",cedil:"\xB8",Cedilla:"\xB8",cemptyv:"\u29B2",cent:"\xA2",centerdot:"\xB7",CenterDot:"\xB7",cfr:"\u{1D520}",Cfr:"\u212D",chcy:"\u0447",CHcy:"\u0427",check:"\u2713",checkmark:"\u2713",chi:"\u03C7",Chi:"\u03A7",cir:"\u25CB",circ:"\u02C6",circeq:"\u2257",circlearrowleft:"\u21BA",circlearrowright:"\u21BB",circledast:"\u229B",circledcirc:"\u229A",circleddash:"\u229D",CircleDot:"\u2299",circledR:"\xAE",circledS:"\u24C8",CircleMinus:"\u2296",CirclePlus:"\u2295",CircleTimes:"\u2297",cire:"\u2257",cirE:"\u29C3",cirfnint:"\u2A10",cirmid:"\u2AEF",cirscir:"\u29C2",ClockwiseContourIntegral:"\u2232",CloseCurlyDoubleQuote:"\u201D",CloseCurlyQuote:"\u2019",clubs:"\u2663",clubsuit:"\u2663",colon:":",Colon:"\u2237",colone:"\u2254",Colone:"\u2A74",coloneq:"\u2254",comma:",",commat:"@",comp:"\u2201",compfn:"\u2218",complement:"\u2201",complexes:"\u2102",cong:"\u2245",congdot:"\u2A6D",Congruent:"\u2261",conint:"\u222E",Conint:"\u222F",ContourIntegral:"\u222E",copf:"\u{1D554}",Copf:"\u2102",coprod:"\u2210",Coproduct:"\u2210",copy:"\xA9",COPY:"\xA9",copysr:"\u2117",CounterClockwiseContourIntegral:"\u2233",crarr:"\u21B5",cross:"\u2717",Cross:"\u2A2F",cscr:"\u{1D4B8}",Cscr:"\u{1D49E}",csub:"\u2ACF",csube:"\u2AD1",csup:"\u2AD0",csupe:"\u2AD2",ctdot:"\u22EF",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22DE",cuesc:"\u22DF",cularr:"\u21B6",cularrp:"\u293D",cup:"\u222A",Cup:"\u22D3",cupbrcap:"\u2A48",cupcap:"\u2A46",CupCap:"\u224D",cupcup:"\u2A4A",cupdot:"\u228D",cupor:"\u2A45",cups:"\u222A\uFE00",curarr:"\u21B7",curarrm:"\u293C",curlyeqprec:"\u22DE",curlyeqsucc:"\u22DF",curlyvee:"\u22CE",curlywedge:"\u22CF",curren:"\xA4",curvearrowleft:"\u21B6",curvearrowright:"\u21B7",cuvee:"\u22CE",cuwed:"\u22CF",cwconint:"\u2232",cwint:"\u2231",cylcty:"\u232D",dagger:"\u2020",Dagger:"\u2021",daleth:"\u2138",darr:"\u2193",dArr:"\u21D3",Darr:"\u21A1",dash:"\u2010",dashv:"\u22A3",Dashv:"\u2AE4",dbkarow:"\u290F",dblac:"\u02DD",dcaron:"\u010F",Dcaron:"\u010E",dcy:"\u0434",Dcy:"\u0414",dd:"\u2146",DD:"\u2145",ddagger:"\u2021",ddarr:"\u21CA",DDotrahd:"\u2911",ddotseq:"\u2A77",deg:"\xB0",Del:"\u2207",delta:"\u03B4",Delta:"\u0394",demptyv:"\u29B1",dfisht:"\u297F",dfr:"\u{1D521}",Dfr:"\u{1D507}",dHar:"\u2965",dharl:"\u21C3",dharr:"\u21C2",DiacriticalAcute:"\xB4",DiacriticalDot:"\u02D9",DiacriticalDoubleAcute:"\u02DD",DiacriticalGrave:"`",DiacriticalTilde:"\u02DC",diam:"\u22C4",diamond:"\u22C4",Diamond:"\u22C4",diamondsuit:"\u2666",diams:"\u2666",die:"\xA8",DifferentialD:"\u2146",digamma:"\u03DD",disin:"\u22F2",div:"\xF7",divide:"\xF7",divideontimes:"\u22C7",divonx:"\u22C7",djcy:"\u0452",DJcy:"\u0402",dlcorn:"\u231E",dlcrop:"\u230D",dollar:"$",dopf:"\u{1D555}",Dopf:"\u{1D53B}",dot:"\u02D9",Dot:"\xA8",DotDot:"\u20DC",doteq:"\u2250",doteqdot:"\u2251",DotEqual:"\u2250",dotminus:"\u2238",dotplus:"\u2214",dotsquare:"\u22A1",doublebarwedge:"\u2306",DoubleContourIntegral:"\u222F",DoubleDot:"\xA8",DoubleDownArrow:"\u21D3",DoubleLeftArrow:"\u21D0",DoubleLeftRightArrow:"\u21D4",DoubleLeftTee:"\u2AE4",DoubleLongLeftArrow:"\u27F8",DoubleLongLeftRightArrow:"\u27FA",DoubleLongRightArrow:"\u27F9",DoubleRightArrow:"\u21D2",DoubleRightTee:"\u22A8",DoubleUpArrow:"\u21D1",DoubleUpDownArrow:"\u21D5",DoubleVerticalBar:"\u2225",downarrow:"\u2193",Downarrow:"\u21D3",DownArrow:"\u2193",DownArrowBar:"\u2913",DownArrowUpArrow:"\u21F5",DownBreve:"\u0311",downdownarrows:"\u21CA",downharpoonleft:"\u21C3",downharpoonright:"\u21C2",DownLeftRightVector:"\u2950",DownLeftTeeVector:"\u295E",DownLeftVector:"\u21BD",DownLeftVectorBar:"\u2956",DownRightTeeVector:"\u295F",DownRightVector:"\u21C1",DownRightVectorBar:"\u2957",DownTee:"\u22A4",DownTeeArrow:"\u21A7",drbkarow:"\u2910",drcorn:"\u231F",drcrop:"\u230C",dscr:"\u{1D4B9}",Dscr:"\u{1D49F}",dscy:"\u0455",DScy:"\u0405",dsol:"\u29F6",dstrok:"\u0111",Dstrok:"\u0110",dtdot:"\u22F1",dtri:"\u25BF",dtrif:"\u25BE",duarr:"\u21F5",duhar:"\u296F",dwangle:"\u29A6",dzcy:"\u045F",DZcy:"\u040F",dzigrarr:"\u27FF",eacute:"\xE9",Eacute:"\xC9",easter:"\u2A6E",ecaron:"\u011B",Ecaron:"\u011A",ecir:"\u2256",ecirc:"\xEA",Ecirc:"\xCA",ecolon:"\u2255",ecy:"\u044D",Ecy:"\u042D",eDDot:"\u2A77",edot:"\u0117",eDot:"\u2251",Edot:"\u0116",ee:"\u2147",efDot:"\u2252",efr:"\u{1D522}",Efr:"\u{1D508}",eg:"\u2A9A",egrave:"\xE8",Egrave:"\xC8",egs:"\u2A96",egsdot:"\u2A98",el:"\u2A99",Element:"\u2208",elinters:"\u23E7",ell:"\u2113",els:"\u2A95",elsdot:"\u2A97",emacr:"\u0113",Emacr:"\u0112",empty:"\u2205",emptyset:"\u2205",EmptySmallSquare:"\u25FB",emptyv:"\u2205",EmptyVerySmallSquare:"\u25AB",emsp:"\u2003",emsp13:"\u2004",emsp14:"\u2005",eng:"\u014B",ENG:"\u014A",ensp:"\u2002",eogon:"\u0119",Eogon:"\u0118",eopf:"\u{1D556}",Eopf:"\u{1D53C}",epar:"\u22D5",eparsl:"\u29E3",eplus:"\u2A71",epsi:"\u03B5",epsilon:"\u03B5",Epsilon:"\u0395",epsiv:"\u03F5",eqcirc:"\u2256",eqcolon:"\u2255",eqsim:"\u2242",eqslantgtr:"\u2A96",eqslantless:"\u2A95",Equal:"\u2A75",equals:"=",EqualTilde:"\u2242",equest:"\u225F",Equilibrium:"\u21CC",equiv:"\u2261",equivDD:"\u2A78",eqvparsl:"\u29E5",erarr:"\u2971",erDot:"\u2253",escr:"\u212F",Escr:"\u2130",esdot:"\u2250",esim:"\u2242",Esim:"\u2A73",eta:"\u03B7",Eta:"\u0397",eth:"\xF0",ETH:"\xD0",euml:"\xEB",Euml:"\xCB",euro:"\u20AC",excl:"!",exist:"\u2203",Exists:"\u2203",expectation:"\u2130",exponentiale:"\u2147",ExponentialE:"\u2147",fallingdotseq:"\u2252",fcy:"\u0444",Fcy:"\u0424",female:"\u2640",ffilig:"\uFB03",fflig:"\uFB00",ffllig:"\uFB04",ffr:"\u{1D523}",Ffr:"\u{1D509}",filig:"\uFB01",FilledSmallSquare:"\u25FC",FilledVerySmallSquare:"\u25AA",fjlig:"fj",flat:"\u266D",fllig:"\uFB02",fltns:"\u25B1",fnof:"\u0192",fopf:"\u{1D557}",Fopf:"\u{1D53D}",forall:"\u2200",ForAll:"\u2200",fork:"\u22D4",forkv:"\u2AD9",Fouriertrf:"\u2131",fpartint:"\u2A0D",frac12:"\xBD",frac13:"\u2153",frac14:"\xBC",frac15:"\u2155",frac16:"\u2159",frac18:"\u215B",frac23:"\u2154",frac25:"\u2156",frac34:"\xBE",frac35:"\u2157",frac38:"\u215C",frac45:"\u2158",frac56:"\u215A",frac58:"\u215D",frac78:"\u215E",frasl:"\u2044",frown:"\u2322",fscr:"\u{1D4BB}",Fscr:"\u2131",gacute:"\u01F5",gamma:"\u03B3",Gamma:"\u0393",gammad:"\u03DD",Gammad:"\u03DC",gap:"\u2A86",gbreve:"\u011F",Gbreve:"\u011E",Gcedil:"\u0122",gcirc:"\u011D",Gcirc:"\u011C",gcy:"\u0433",Gcy:"\u0413",gdot:"\u0121",Gdot:"\u0120",ge:"\u2265",gE:"\u2267",gel:"\u22DB",gEl:"\u2A8C",geq:"\u2265",geqq:"\u2267",geqslant:"\u2A7E",ges:"\u2A7E",gescc:"\u2AA9",gesdot:"\u2A80",gesdoto:"\u2A82",gesdotol:"\u2A84",gesl:"\u22DB\uFE00",gesles:"\u2A94",gfr:"\u{1D524}",Gfr:"\u{1D50A}",gg:"\u226B",Gg:"\u22D9",ggg:"\u22D9",gimel:"\u2137",gjcy:"\u0453",GJcy:"\u0403",gl:"\u2277",gla:"\u2AA5",glE:"\u2A92",glj:"\u2AA4",gnap:"\u2A8A",gnapprox:"\u2A8A",gne:"\u2A88",gnE:"\u2269",gneq:"\u2A88",gneqq:"\u2269",gnsim:"\u22E7",gopf:"\u{1D558}",Gopf:"\u{1D53E}",grave:"`",GreaterEqual:"\u2265",GreaterEqualLess:"\u22DB",GreaterFullEqual:"\u2267",GreaterGreater:"\u2AA2",GreaterLess:"\u2277",GreaterSlantEqual:"\u2A7E",GreaterTilde:"\u2273",gscr:"\u210A",Gscr:"\u{1D4A2}",gsim:"\u2273",gsime:"\u2A8E",gsiml:"\u2A90",gt:">",Gt:"\u226B",GT:">",gtcc:"\u2AA7",gtcir:"\u2A7A",gtdot:"\u22D7",gtlPar:"\u2995",gtquest:"\u2A7C",gtrapprox:"\u2A86",gtrarr:"\u2978",gtrdot:"\u22D7",gtreqless:"\u22DB",gtreqqless:"\u2A8C",gtrless:"\u2277",gtrsim:"\u2273",gvertneqq:"\u2269\uFE00",gvnE:"\u2269\uFE00",Hacek:"\u02C7",hairsp:"\u200A",half:"\xBD",hamilt:"\u210B",hardcy:"\u044A",HARDcy:"\u042A",harr:"\u2194",hArr:"\u21D4",harrcir:"\u2948",harrw:"\u21AD",Hat:"^",hbar:"\u210F",hcirc:"\u0125",Hcirc:"\u0124",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",hercon:"\u22B9",hfr:"\u{1D525}",Hfr:"\u210C",HilbertSpace:"\u210B",hksearow:"\u2925",hkswarow:"\u2926",hoarr:"\u21FF",homtht:"\u223B",hookleftarrow:"\u21A9",hookrightarrow:"\u21AA",hopf:"\u{1D559}",Hopf:"\u210D",horbar:"\u2015",HorizontalLine:"\u2500",hscr:"\u{1D4BD}",Hscr:"\u210B",hslash:"\u210F",hstrok:"\u0127",Hstrok:"\u0126",HumpDownHump:"\u224E",HumpEqual:"\u224F",hybull:"\u2043",hyphen:"\u2010",iacute:"\xED",Iacute:"\xCD",ic:"\u2063",icirc:"\xEE",Icirc:"\xCE",icy:"\u0438",Icy:"\u0418",Idot:"\u0130",iecy:"\u0435",IEcy:"\u0415",iexcl:"\xA1",iff:"\u21D4",ifr:"\u{1D526}",Ifr:"\u2111",igrave:"\xEC",Igrave:"\xCC",ii:"\u2148",iiiint:"\u2A0C",iiint:"\u222D",iinfin:"\u29DC",iiota:"\u2129",ijlig:"\u0133",IJlig:"\u0132",Im:"\u2111",imacr:"\u012B",Imacr:"\u012A",image:"\u2111",ImaginaryI:"\u2148",imagline:"\u2110",imagpart:"\u2111",imath:"\u0131",imof:"\u22B7",imped:"\u01B5",Implies:"\u21D2",in:"\u2208",incare:"\u2105",infin:"\u221E",infintie:"\u29DD",inodot:"\u0131",int:"\u222B",Int:"\u222C",intcal:"\u22BA",integers:"\u2124",Integral:"\u222B",intercal:"\u22BA",Intersection:"\u22C2",intlarhk:"\u2A17",intprod:"\u2A3C",InvisibleComma:"\u2063",InvisibleTimes:"\u2062",iocy:"\u0451",IOcy:"\u0401",iogon:"\u012F",Iogon:"\u012E",iopf:"\u{1D55A}",Iopf:"\u{1D540}",iota:"\u03B9",Iota:"\u0399",iprod:"\u2A3C",iquest:"\xBF",iscr:"\u{1D4BE}",Iscr:"\u2110",isin:"\u2208",isindot:"\u22F5",isinE:"\u22F9",isins:"\u22F4",isinsv:"\u22F3",isinv:"\u2208",it:"\u2062",itilde:"\u0129",Itilde:"\u0128",iukcy:"\u0456",Iukcy:"\u0406",iuml:"\xEF",Iuml:"\xCF",jcirc:"\u0135",Jcirc:"\u0134",jcy:"\u0439",Jcy:"\u0419",jfr:"\u{1D527}",Jfr:"\u{1D50D}",jmath:"\u0237",jopf:"\u{1D55B}",Jopf:"\u{1D541}",jscr:"\u{1D4BF}",Jscr:"\u{1D4A5}",jsercy:"\u0458",Jsercy:"\u0408",jukcy:"\u0454",Jukcy:"\u0404",kappa:"\u03BA",Kappa:"\u039A",kappav:"\u03F0",kcedil:"\u0137",Kcedil:"\u0136",kcy:"\u043A",Kcy:"\u041A",kfr:"\u{1D528}",Kfr:"\u{1D50E}",kgreen:"\u0138",khcy:"\u0445",KHcy:"\u0425",kjcy:"\u045C",KJcy:"\u040C",kopf:"\u{1D55C}",Kopf:"\u{1D542}",kscr:"\u{1D4C0}",Kscr:"\u{1D4A6}",lAarr:"\u21DA",lacute:"\u013A",Lacute:"\u0139",laemptyv:"\u29B4",lagran:"\u2112",lambda:"\u03BB",Lambda:"\u039B",lang:"\u27E8",Lang:"\u27EA",langd:"\u2991",langle:"\u27E8",lap:"\u2A85",Laplacetrf:"\u2112",laquo:"\xAB",larr:"\u2190",lArr:"\u21D0",Larr:"\u219E",larrb:"\u21E4",larrbfs:"\u291F",larrfs:"\u291D",larrhk:"\u21A9",larrlp:"\u21AB",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21A2",lat:"\u2AAB",latail:"\u2919",lAtail:"\u291B",late:"\u2AAD",lates:"\u2AAD\uFE00",lbarr:"\u290C",lBarr:"\u290E",lbbrk:"\u2772",lbrace:"{",lbrack:"[",lbrke:"\u298B",lbrksld:"\u298F",lbrkslu:"\u298D",lcaron:"\u013E",Lcaron:"\u013D",lcedil:"\u013C",Lcedil:"\u013B",lceil:"\u2308",lcub:"{",lcy:"\u043B",Lcy:"\u041B",ldca:"\u2936",ldquo:"\u201C",ldquor:"\u201E",ldrdhar:"\u2967",ldrushar:"\u294B",ldsh:"\u21B2",le:"\u2264",lE:"\u2266",LeftAngleBracket:"\u27E8",leftarrow:"\u2190",Leftarrow:"\u21D0",LeftArrow:"\u2190",LeftArrowBar:"\u21E4",LeftArrowRightArrow:"\u21C6",leftarrowtail:"\u21A2",LeftCeiling:"\u2308",LeftDoubleBracket:"\u27E6",LeftDownTeeVector:"\u2961",LeftDownVector:"\u21C3",LeftDownVectorBar:"\u2959",LeftFloor:"\u230A",leftharpoondown:"\u21BD",leftharpoonup:"\u21BC",leftleftarrows:"\u21C7",leftrightarrow:"\u2194",Leftrightarrow:"\u21D4",LeftRightArrow:"\u2194",leftrightarrows:"\u21C6",leftrightharpoons:"\u21CB",leftrightsquigarrow:"\u21AD",LeftRightVector:"\u294E",LeftTee:"\u22A3",LeftTeeArrow:"\u21A4",LeftTeeVector:"\u295A",leftthreetimes:"\u22CB",LeftTriangle:"\u22B2",LeftTriangleBar:"\u29CF",LeftTriangleEqual:"\u22B4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVector:"\u21BF",LeftUpVectorBar:"\u2958",LeftVector:"\u21BC",LeftVectorBar:"\u2952",leg:"\u22DA",lEg:"\u2A8B",leq:"\u2264",leqq:"\u2266",leqslant:"\u2A7D",les:"\u2A7D",lescc:"\u2AA8",lesdot:"\u2A7F",lesdoto:"\u2A81",lesdotor:"\u2A83",lesg:"\u22DA\uFE00",lesges:"\u2A93",lessapprox:"\u2A85",lessdot:"\u22D6",lesseqgtr:"\u22DA",lesseqqgtr:"\u2A8B",LessEqualGreater:"\u22DA",LessFullEqual:"\u2266",LessGreater:"\u2276",lessgtr:"\u2276",LessLess:"\u2AA1",lesssim:"\u2272",LessSlantEqual:"\u2A7D",LessTilde:"\u2272",lfisht:"\u297C",lfloor:"\u230A",lfr:"\u{1D529}",Lfr:"\u{1D50F}",lg:"\u2276",lgE:"\u2A91",lHar:"\u2962",lhard:"\u21BD",lharu:"\u21BC",lharul:"\u296A",lhblk:"\u2584",ljcy:"\u0459",LJcy:"\u0409",ll:"\u226A",Ll:"\u22D8",llarr:"\u21C7",llcorner:"\u231E",Lleftarrow:"\u21DA",llhard:"\u296B",lltri:"\u25FA",lmidot:"\u0140",Lmidot:"\u013F",lmoust:"\u23B0",lmoustache:"\u23B0",lnap:"\u2A89",lnapprox:"\u2A89",lne:"\u2A87",lnE:"\u2268",lneq:"\u2A87",lneqq:"\u2268",lnsim:"\u22E6",loang:"\u27EC",loarr:"\u21FD",lobrk:"\u27E6",longleftarrow:"\u27F5",Longleftarrow:"\u27F8",LongLeftArrow:"\u27F5",longleftrightarrow:"\u27F7",Longleftrightarrow:"\u27FA",LongLeftRightArrow:"\u27F7",longmapsto:"\u27FC",longrightarrow:"\u27F6",Longrightarrow:"\u27F9",LongRightArrow:"\u27F6",looparrowleft:"\u21AB",looparrowright:"\u21AC",lopar:"\u2985",lopf:"\u{1D55D}",Lopf:"\u{1D543}",loplus:"\u2A2D",lotimes:"\u2A34",lowast:"\u2217",lowbar:"_",LowerLeftArrow:"\u2199",LowerRightArrow:"\u2198",loz:"\u25CA",lozenge:"\u25CA",lozf:"\u29EB",lpar:"(",lparlt:"\u2993",lrarr:"\u21C6",lrcorner:"\u231F",lrhar:"\u21CB",lrhard:"\u296D",lrm:"\u200E",lrtri:"\u22BF",lsaquo:"\u2039",lscr:"\u{1D4C1}",Lscr:"\u2112",lsh:"\u21B0",Lsh:"\u21B0",lsim:"\u2272",lsime:"\u2A8D",lsimg:"\u2A8F",lsqb:"[",lsquo:"\u2018",lsquor:"\u201A",lstrok:"\u0142",Lstrok:"\u0141",lt:"<",Lt:"\u226A",LT:"<",ltcc:"\u2AA6",ltcir:"\u2A79",ltdot:"\u22D6",lthree:"\u22CB",ltimes:"\u22C9",ltlarr:"\u2976",ltquest:"\u2A7B",ltri:"\u25C3",ltrie:"\u22B4",ltrif:"\u25C2",ltrPar:"\u2996",lurdshar:"\u294A",luruhar:"\u2966",lvertneqq:"\u2268\uFE00",lvnE:"\u2268\uFE00",macr:"\xAF",male:"\u2642",malt:"\u2720",maltese:"\u2720",map:"\u21A6",Map:"\u2905",mapsto:"\u21A6",mapstodown:"\u21A7",mapstoleft:"\u21A4",mapstoup:"\u21A5",marker:"\u25AE",mcomma:"\u2A29",mcy:"\u043C",Mcy:"\u041C",mdash:"\u2014",mDDot:"\u223A",measuredangle:"\u2221",MediumSpace:"\u205F",Mellintrf:"\u2133",mfr:"\u{1D52A}",Mfr:"\u{1D510}",mho:"\u2127",micro:"\xB5",mid:"\u2223",midast:"*",midcir:"\u2AF0",middot:"\xB7",minus:"\u2212",minusb:"\u229F",minusd:"\u2238",minusdu:"\u2A2A",MinusPlus:"\u2213",mlcp:"\u2ADB",mldr:"\u2026",mnplus:"\u2213",models:"\u22A7",mopf:"\u{1D55E}",Mopf:"\u{1D544}",mp:"\u2213",mscr:"\u{1D4C2}",Mscr:"\u2133",mstpos:"\u223E",mu:"\u03BC",Mu:"\u039C",multimap:"\u22B8",mumap:"\u22B8",nabla:"\u2207",nacute:"\u0144",Nacute:"\u0143",nang:"\u2220\u20D2",nap:"\u2249",napE:"\u2A70\u0338",napid:"\u224B\u0338",napos:"\u0149",napprox:"\u2249",natur:"\u266E",natural:"\u266E",naturals:"\u2115",nbsp:"\xA0",nbump:"\u224E\u0338",nbumpe:"\u224F\u0338",ncap:"\u2A43",ncaron:"\u0148",Ncaron:"\u0147",ncedil:"\u0146",Ncedil:"\u0145",ncong:"\u2247",ncongdot:"\u2A6D\u0338",ncup:"\u2A42",ncy:"\u043D",Ncy:"\u041D",ndash:"\u2013",ne:"\u2260",nearhk:"\u2924",nearr:"\u2197",neArr:"\u21D7",nearrow:"\u2197",nedot:"\u2250\u0338",NegativeMediumSpace:"\u200B",NegativeThickSpace:"\u200B",NegativeThinSpace:"\u200B",NegativeVeryThinSpace:"\u200B",nequiv:"\u2262",nesear:"\u2928",nesim:"\u2242\u0338",NestedGreaterGreater:"\u226B",NestedLessLess:"\u226A",NewLine:` +`,nexist:"\u2204",nexists:"\u2204",nfr:"\u{1D52B}",Nfr:"\u{1D511}",nge:"\u2271",ngE:"\u2267\u0338",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",nGg:"\u22D9\u0338",ngsim:"\u2275",ngt:"\u226F",nGt:"\u226B\u20D2",ngtr:"\u226F",nGtv:"\u226B\u0338",nharr:"\u21AE",nhArr:"\u21CE",nhpar:"\u2AF2",ni:"\u220B",nis:"\u22FC",nisd:"\u22FA",niv:"\u220B",njcy:"\u045A",NJcy:"\u040A",nlarr:"\u219A",nlArr:"\u21CD",nldr:"\u2025",nle:"\u2270",nlE:"\u2266\u0338",nleftarrow:"\u219A",nLeftarrow:"\u21CD",nleftrightarrow:"\u21AE",nLeftrightarrow:"\u21CE",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",nless:"\u226E",nLl:"\u22D8\u0338",nlsim:"\u2274",nlt:"\u226E",nLt:"\u226A\u20D2",nltri:"\u22EA",nltrie:"\u22EC",nLtv:"\u226A\u0338",nmid:"\u2224",NoBreak:"\u2060",NonBreakingSpace:"\xA0",nopf:"\u{1D55F}",Nopf:"\u2115",not:"\xAC",Not:"\u2AEC",NotCongruent:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226F",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",notin:"\u2209",notindot:"\u22F5\u0338",notinE:"\u22F9\u0338",notinva:"\u2209",notinvb:"\u22F7",notinvc:"\u22F6",NotLeftTriangle:"\u22EA",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangleEqual:"\u22EC",NotLess:"\u226E",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",notni:"\u220C",notniva:"\u220C",notnivb:"\u22FE",notnivc:"\u22FD",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",NotReverseElement:"\u220C",NotRightTriangle:"\u22EB",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangleEqual:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",NotSubset:"\u2282\u20D2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",npar:"\u2226",nparallel:"\u2226",nparsl:"\u2AFD\u20E5",npart:"\u2202\u0338",npolint:"\u2A14",npr:"\u2280",nprcue:"\u22E0",npre:"\u2AAF\u0338",nprec:"\u2280",npreceq:"\u2AAF\u0338",nrarr:"\u219B",nrArr:"\u21CF",nrarrc:"\u2933\u0338",nrarrw:"\u219D\u0338",nrightarrow:"\u219B",nRightarrow:"\u21CF",nrtri:"\u22EB",nrtrie:"\u22ED",nsc:"\u2281",nsccue:"\u22E1",nsce:"\u2AB0\u0338",nscr:"\u{1D4C3}",Nscr:"\u{1D4A9}",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22E2",nsqsupe:"\u22E3",nsub:"\u2284",nsube:"\u2288",nsubE:"\u2AC5\u0338",nsubset:"\u2282\u20D2",nsubseteq:"\u2288",nsubseteqq:"\u2AC5\u0338",nsucc:"\u2281",nsucceq:"\u2AB0\u0338",nsup:"\u2285",nsupe:"\u2289",nsupE:"\u2AC6\u0338",nsupset:"\u2283\u20D2",nsupseteq:"\u2289",nsupseteqq:"\u2AC6\u0338",ntgl:"\u2279",ntilde:"\xF1",Ntilde:"\xD1",ntlg:"\u2278",ntriangleleft:"\u22EA",ntrianglelefteq:"\u22EC",ntriangleright:"\u22EB",ntrianglerighteq:"\u22ED",nu:"\u03BD",Nu:"\u039D",num:"#",numero:"\u2116",numsp:"\u2007",nvap:"\u224D\u20D2",nvdash:"\u22AC",nvDash:"\u22AD",nVdash:"\u22AE",nVDash:"\u22AF",nvge:"\u2265\u20D2",nvgt:">\u20D2",nvHarr:"\u2904",nvinfin:"\u29DE",nvlArr:"\u2902",nvle:"\u2264\u20D2",nvlt:"<\u20D2",nvltrie:"\u22B4\u20D2",nvrArr:"\u2903",nvrtrie:"\u22B5\u20D2",nvsim:"\u223C\u20D2",nwarhk:"\u2923",nwarr:"\u2196",nwArr:"\u21D6",nwarrow:"\u2196",nwnear:"\u2927",oacute:"\xF3",Oacute:"\xD3",oast:"\u229B",ocir:"\u229A",ocirc:"\xF4",Ocirc:"\xD4",ocy:"\u043E",Ocy:"\u041E",odash:"\u229D",odblac:"\u0151",Odblac:"\u0150",odiv:"\u2A38",odot:"\u2299",odsold:"\u29BC",oelig:"\u0153",OElig:"\u0152",ofcir:"\u29BF",ofr:"\u{1D52C}",Ofr:"\u{1D512}",ogon:"\u02DB",ograve:"\xF2",Ograve:"\xD2",ogt:"\u29C1",ohbar:"\u29B5",ohm:"\u03A9",oint:"\u222E",olarr:"\u21BA",olcir:"\u29BE",olcross:"\u29BB",oline:"\u203E",olt:"\u29C0",omacr:"\u014D",Omacr:"\u014C",omega:"\u03C9",Omega:"\u03A9",omicron:"\u03BF",Omicron:"\u039F",omid:"\u29B6",ominus:"\u2296",oopf:"\u{1D560}",Oopf:"\u{1D546}",opar:"\u29B7",OpenCurlyDoubleQuote:"\u201C",OpenCurlyQuote:"\u2018",operp:"\u29B9",oplus:"\u2295",or:"\u2228",Or:"\u2A54",orarr:"\u21BB",ord:"\u2A5D",order:"\u2134",orderof:"\u2134",ordf:"\xAA",ordm:"\xBA",origof:"\u22B6",oror:"\u2A56",orslope:"\u2A57",orv:"\u2A5B",oS:"\u24C8",oscr:"\u2134",Oscr:"\u{1D4AA}",oslash:"\xF8",Oslash:"\xD8",osol:"\u2298",otilde:"\xF5",Otilde:"\xD5",otimes:"\u2297",Otimes:"\u2A37",otimesas:"\u2A36",ouml:"\xF6",Ouml:"\xD6",ovbar:"\u233D",OverBar:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",OverParenthesis:"\u23DC",par:"\u2225",para:"\xB6",parallel:"\u2225",parsim:"\u2AF3",parsl:"\u2AFD",part:"\u2202",PartialD:"\u2202",pcy:"\u043F",Pcy:"\u041F",percnt:"%",period:".",permil:"\u2030",perp:"\u22A5",pertenk:"\u2031",pfr:"\u{1D52D}",Pfr:"\u{1D513}",phi:"\u03C6",Phi:"\u03A6",phiv:"\u03D5",phmmat:"\u2133",phone:"\u260E",pi:"\u03C0",Pi:"\u03A0",pitchfork:"\u22D4",piv:"\u03D6",planck:"\u210F",planckh:"\u210E",plankv:"\u210F",plus:"+",plusacir:"\u2A23",plusb:"\u229E",pluscir:"\u2A22",plusdo:"\u2214",plusdu:"\u2A25",pluse:"\u2A72",PlusMinus:"\xB1",plusmn:"\xB1",plussim:"\u2A26",plustwo:"\u2A27",pm:"\xB1",Poincareplane:"\u210C",pointint:"\u2A15",popf:"\u{1D561}",Popf:"\u2119",pound:"\xA3",pr:"\u227A",Pr:"\u2ABB",prap:"\u2AB7",prcue:"\u227C",pre:"\u2AAF",prE:"\u2AB3",prec:"\u227A",precapprox:"\u2AB7",preccurlyeq:"\u227C",Precedes:"\u227A",PrecedesEqual:"\u2AAF",PrecedesSlantEqual:"\u227C",PrecedesTilde:"\u227E",preceq:"\u2AAF",precnapprox:"\u2AB9",precneqq:"\u2AB5",precnsim:"\u22E8",precsim:"\u227E",prime:"\u2032",Prime:"\u2033",primes:"\u2119",prnap:"\u2AB9",prnE:"\u2AB5",prnsim:"\u22E8",prod:"\u220F",Product:"\u220F",profalar:"\u232E",profline:"\u2312",profsurf:"\u2313",prop:"\u221D",Proportion:"\u2237",Proportional:"\u221D",propto:"\u221D",prsim:"\u227E",prurel:"\u22B0",pscr:"\u{1D4C5}",Pscr:"\u{1D4AB}",psi:"\u03C8",Psi:"\u03A8",puncsp:"\u2008",qfr:"\u{1D52E}",Qfr:"\u{1D514}",qint:"\u2A0C",qopf:"\u{1D562}",Qopf:"\u211A",qprime:"\u2057",qscr:"\u{1D4C6}",Qscr:"\u{1D4AC}",quaternions:"\u210D",quatint:"\u2A16",quest:"?",questeq:"\u225F",quot:'"',QUOT:'"',rAarr:"\u21DB",race:"\u223D\u0331",racute:"\u0155",Racute:"\u0154",radic:"\u221A",raemptyv:"\u29B3",rang:"\u27E9",Rang:"\u27EB",rangd:"\u2992",range:"\u29A5",rangle:"\u27E9",raquo:"\xBB",rarr:"\u2192",rArr:"\u21D2",Rarr:"\u21A0",rarrap:"\u2975",rarrb:"\u21E5",rarrbfs:"\u2920",rarrc:"\u2933",rarrfs:"\u291E",rarrhk:"\u21AA",rarrlp:"\u21AC",rarrpl:"\u2945",rarrsim:"\u2974",rarrtl:"\u21A3",Rarrtl:"\u2916",rarrw:"\u219D",ratail:"\u291A",rAtail:"\u291C",ratio:"\u2236",rationals:"\u211A",rbarr:"\u290D",rBarr:"\u290F",RBarr:"\u2910",rbbrk:"\u2773",rbrace:"}",rbrack:"]",rbrke:"\u298C",rbrksld:"\u298E",rbrkslu:"\u2990",rcaron:"\u0159",Rcaron:"\u0158",rcedil:"\u0157",Rcedil:"\u0156",rceil:"\u2309",rcub:"}",rcy:"\u0440",Rcy:"\u0420",rdca:"\u2937",rdldhar:"\u2969",rdquo:"\u201D",rdquor:"\u201D",rdsh:"\u21B3",Re:"\u211C",real:"\u211C",realine:"\u211B",realpart:"\u211C",reals:"\u211D",rect:"\u25AD",reg:"\xAE",REG:"\xAE",ReverseElement:"\u220B",ReverseEquilibrium:"\u21CB",ReverseUpEquilibrium:"\u296F",rfisht:"\u297D",rfloor:"\u230B",rfr:"\u{1D52F}",Rfr:"\u211C",rHar:"\u2964",rhard:"\u21C1",rharu:"\u21C0",rharul:"\u296C",rho:"\u03C1",Rho:"\u03A1",rhov:"\u03F1",RightAngleBracket:"\u27E9",rightarrow:"\u2192",Rightarrow:"\u21D2",RightArrow:"\u2192",RightArrowBar:"\u21E5",RightArrowLeftArrow:"\u21C4",rightarrowtail:"\u21A3",RightCeiling:"\u2309",RightDoubleBracket:"\u27E7",RightDownTeeVector:"\u295D",RightDownVector:"\u21C2",RightDownVectorBar:"\u2955",RightFloor:"\u230B",rightharpoondown:"\u21C1",rightharpoonup:"\u21C0",rightleftarrows:"\u21C4",rightleftharpoons:"\u21CC",rightrightarrows:"\u21C9",rightsquigarrow:"\u219D",RightTee:"\u22A2",RightTeeArrow:"\u21A6",RightTeeVector:"\u295B",rightthreetimes:"\u22CC",RightTriangle:"\u22B3",RightTriangleBar:"\u29D0",RightTriangleEqual:"\u22B5",RightUpDownVector:"\u294F",RightUpTeeVector:"\u295C",RightUpVector:"\u21BE",RightUpVectorBar:"\u2954",RightVector:"\u21C0",RightVectorBar:"\u2953",ring:"\u02DA",risingdotseq:"\u2253",rlarr:"\u21C4",rlhar:"\u21CC",rlm:"\u200F",rmoust:"\u23B1",rmoustache:"\u23B1",rnmid:"\u2AEE",roang:"\u27ED",roarr:"\u21FE",robrk:"\u27E7",ropar:"\u2986",ropf:"\u{1D563}",Ropf:"\u211D",roplus:"\u2A2E",rotimes:"\u2A35",RoundImplies:"\u2970",rpar:")",rpargt:"\u2994",rppolint:"\u2A12",rrarr:"\u21C9",Rrightarrow:"\u21DB",rsaquo:"\u203A",rscr:"\u{1D4C7}",Rscr:"\u211B",rsh:"\u21B1",Rsh:"\u21B1",rsqb:"]",rsquo:"\u2019",rsquor:"\u2019",rthree:"\u22CC",rtimes:"\u22CA",rtri:"\u25B9",rtrie:"\u22B5",rtrif:"\u25B8",rtriltri:"\u29CE",RuleDelayed:"\u29F4",ruluhar:"\u2968",rx:"\u211E",sacute:"\u015B",Sacute:"\u015A",sbquo:"\u201A",sc:"\u227B",Sc:"\u2ABC",scap:"\u2AB8",scaron:"\u0161",Scaron:"\u0160",sccue:"\u227D",sce:"\u2AB0",scE:"\u2AB4",scedil:"\u015F",Scedil:"\u015E",scirc:"\u015D",Scirc:"\u015C",scnap:"\u2ABA",scnE:"\u2AB6",scnsim:"\u22E9",scpolint:"\u2A13",scsim:"\u227F",scy:"\u0441",Scy:"\u0421",sdot:"\u22C5",sdotb:"\u22A1",sdote:"\u2A66",searhk:"\u2925",searr:"\u2198",seArr:"\u21D8",searrow:"\u2198",sect:"\xA7",semi:";",seswar:"\u2929",setminus:"\u2216",setmn:"\u2216",sext:"\u2736",sfr:"\u{1D530}",Sfr:"\u{1D516}",sfrown:"\u2322",sharp:"\u266F",shchcy:"\u0449",SHCHcy:"\u0429",shcy:"\u0448",SHcy:"\u0428",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",shortmid:"\u2223",shortparallel:"\u2225",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",shy:"\xAD",sigma:"\u03C3",Sigma:"\u03A3",sigmaf:"\u03C2",sigmav:"\u03C2",sim:"\u223C",simdot:"\u2A6A",sime:"\u2243",simeq:"\u2243",simg:"\u2A9E",simgE:"\u2AA0",siml:"\u2A9D",simlE:"\u2A9F",simne:"\u2246",simplus:"\u2A24",simrarr:"\u2972",slarr:"\u2190",SmallCircle:"\u2218",smallsetminus:"\u2216",smashp:"\u2A33",smeparsl:"\u29E4",smid:"\u2223",smile:"\u2323",smt:"\u2AAA",smte:"\u2AAC",smtes:"\u2AAC\uFE00",softcy:"\u044C",SOFTcy:"\u042C",sol:"/",solb:"\u29C4",solbar:"\u233F",sopf:"\u{1D564}",Sopf:"\u{1D54A}",spades:"\u2660",spadesuit:"\u2660",spar:"\u2225",sqcap:"\u2293",sqcaps:"\u2293\uFE00",sqcup:"\u2294",sqcups:"\u2294\uFE00",Sqrt:"\u221A",sqsub:"\u228F",sqsube:"\u2291",sqsubset:"\u228F",sqsubseteq:"\u2291",sqsup:"\u2290",sqsupe:"\u2292",sqsupset:"\u2290",sqsupseteq:"\u2292",squ:"\u25A1",square:"\u25A1",Square:"\u25A1",SquareIntersection:"\u2293",SquareSubset:"\u228F",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",squarf:"\u25AA",squf:"\u25AA",srarr:"\u2192",sscr:"\u{1D4C8}",Sscr:"\u{1D4AE}",ssetmn:"\u2216",ssmile:"\u2323",sstarf:"\u22C6",star:"\u2606",Star:"\u22C6",starf:"\u2605",straightepsilon:"\u03F5",straightphi:"\u03D5",strns:"\xAF",sub:"\u2282",Sub:"\u22D0",subdot:"\u2ABD",sube:"\u2286",subE:"\u2AC5",subedot:"\u2AC3",submult:"\u2AC1",subne:"\u228A",subnE:"\u2ACB",subplus:"\u2ABF",subrarr:"\u2979",subset:"\u2282",Subset:"\u22D0",subseteq:"\u2286",subseteqq:"\u2AC5",SubsetEqual:"\u2286",subsetneq:"\u228A",subsetneqq:"\u2ACB",subsim:"\u2AC7",subsub:"\u2AD5",subsup:"\u2AD3",succ:"\u227B",succapprox:"\u2AB8",succcurlyeq:"\u227D",Succeeds:"\u227B",SucceedsEqual:"\u2AB0",SucceedsSlantEqual:"\u227D",SucceedsTilde:"\u227F",succeq:"\u2AB0",succnapprox:"\u2ABA",succneqq:"\u2AB6",succnsim:"\u22E9",succsim:"\u227F",SuchThat:"\u220B",sum:"\u2211",Sum:"\u2211",sung:"\u266A",sup:"\u2283",Sup:"\u22D1",sup1:"\xB9",sup2:"\xB2",sup3:"\xB3",supdot:"\u2ABE",supdsub:"\u2AD8",supe:"\u2287",supE:"\u2AC6",supedot:"\u2AC4",Superset:"\u2283",SupersetEqual:"\u2287",suphsol:"\u27C9",suphsub:"\u2AD7",suplarr:"\u297B",supmult:"\u2AC2",supne:"\u228B",supnE:"\u2ACC",supplus:"\u2AC0",supset:"\u2283",Supset:"\u22D1",supseteq:"\u2287",supseteqq:"\u2AC6",supsetneq:"\u228B",supsetneqq:"\u2ACC",supsim:"\u2AC8",supsub:"\u2AD4",supsup:"\u2AD6",swarhk:"\u2926",swarr:"\u2199",swArr:"\u21D9",swarrow:"\u2199",swnwar:"\u292A",szlig:"\xDF",Tab:" ",target:"\u2316",tau:"\u03C4",Tau:"\u03A4",tbrk:"\u23B4",tcaron:"\u0165",Tcaron:"\u0164",tcedil:"\u0163",Tcedil:"\u0162",tcy:"\u0442",Tcy:"\u0422",tdot:"\u20DB",telrec:"\u2315",tfr:"\u{1D531}",Tfr:"\u{1D517}",there4:"\u2234",therefore:"\u2234",Therefore:"\u2234",theta:"\u03B8",Theta:"\u0398",thetasym:"\u03D1",thetav:"\u03D1",thickapprox:"\u2248",thicksim:"\u223C",ThickSpace:"\u205F\u200A",thinsp:"\u2009",ThinSpace:"\u2009",thkap:"\u2248",thksim:"\u223C",thorn:"\xFE",THORN:"\xDE",tilde:"\u02DC",Tilde:"\u223C",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",times:"\xD7",timesb:"\u22A0",timesbar:"\u2A31",timesd:"\u2A30",tint:"\u222D",toea:"\u2928",top:"\u22A4",topbot:"\u2336",topcir:"\u2AF1",topf:"\u{1D565}",Topf:"\u{1D54B}",topfork:"\u2ADA",tosa:"\u2929",tprime:"\u2034",trade:"\u2122",TRADE:"\u2122",triangle:"\u25B5",triangledown:"\u25BF",triangleleft:"\u25C3",trianglelefteq:"\u22B4",triangleq:"\u225C",triangleright:"\u25B9",trianglerighteq:"\u22B5",tridot:"\u25EC",trie:"\u225C",triminus:"\u2A3A",TripleDot:"\u20DB",triplus:"\u2A39",trisb:"\u29CD",tritime:"\u2A3B",trpezium:"\u23E2",tscr:"\u{1D4C9}",Tscr:"\u{1D4AF}",tscy:"\u0446",TScy:"\u0426",tshcy:"\u045B",TSHcy:"\u040B",tstrok:"\u0167",Tstrok:"\u0166",twixt:"\u226C",twoheadleftarrow:"\u219E",twoheadrightarrow:"\u21A0",uacute:"\xFA",Uacute:"\xDA",uarr:"\u2191",uArr:"\u21D1",Uarr:"\u219F",Uarrocir:"\u2949",ubrcy:"\u045E",Ubrcy:"\u040E",ubreve:"\u016D",Ubreve:"\u016C",ucirc:"\xFB",Ucirc:"\xDB",ucy:"\u0443",Ucy:"\u0423",udarr:"\u21C5",udblac:"\u0171",Udblac:"\u0170",udhar:"\u296E",ufisht:"\u297E",ufr:"\u{1D532}",Ufr:"\u{1D518}",ugrave:"\xF9",Ugrave:"\xD9",uHar:"\u2963",uharl:"\u21BF",uharr:"\u21BE",uhblk:"\u2580",ulcorn:"\u231C",ulcorner:"\u231C",ulcrop:"\u230F",ultri:"\u25F8",umacr:"\u016B",Umacr:"\u016A",uml:"\xA8",UnderBar:"_",UnderBrace:"\u23DF",UnderBracket:"\u23B5",UnderParenthesis:"\u23DD",Union:"\u22C3",UnionPlus:"\u228E",uogon:"\u0173",Uogon:"\u0172",uopf:"\u{1D566}",Uopf:"\u{1D54C}",uparrow:"\u2191",Uparrow:"\u21D1",UpArrow:"\u2191",UpArrowBar:"\u2912",UpArrowDownArrow:"\u21C5",updownarrow:"\u2195",Updownarrow:"\u21D5",UpDownArrow:"\u2195",UpEquilibrium:"\u296E",upharpoonleft:"\u21BF",upharpoonright:"\u21BE",uplus:"\u228E",UpperLeftArrow:"\u2196",UpperRightArrow:"\u2197",upsi:"\u03C5",Upsi:"\u03D2",upsih:"\u03D2",upsilon:"\u03C5",Upsilon:"\u03A5",UpTee:"\u22A5",UpTeeArrow:"\u21A5",upuparrows:"\u21C8",urcorn:"\u231D",urcorner:"\u231D",urcrop:"\u230E",uring:"\u016F",Uring:"\u016E",urtri:"\u25F9",uscr:"\u{1D4CA}",Uscr:"\u{1D4B0}",utdot:"\u22F0",utilde:"\u0169",Utilde:"\u0168",utri:"\u25B5",utrif:"\u25B4",uuarr:"\u21C8",uuml:"\xFC",Uuml:"\xDC",uwangle:"\u29A7",vangrt:"\u299C",varepsilon:"\u03F5",varkappa:"\u03F0",varnothing:"\u2205",varphi:"\u03D5",varpi:"\u03D6",varpropto:"\u221D",varr:"\u2195",vArr:"\u21D5",varrho:"\u03F1",varsigma:"\u03C2",varsubsetneq:"\u228A\uFE00",varsubsetneqq:"\u2ACB\uFE00",varsupsetneq:"\u228B\uFE00",varsupsetneqq:"\u2ACC\uFE00",vartheta:"\u03D1",vartriangleleft:"\u22B2",vartriangleright:"\u22B3",vBar:"\u2AE8",Vbar:"\u2AEB",vBarv:"\u2AE9",vcy:"\u0432",Vcy:"\u0412",vdash:"\u22A2",vDash:"\u22A8",Vdash:"\u22A9",VDash:"\u22AB",Vdashl:"\u2AE6",vee:"\u2228",Vee:"\u22C1",veebar:"\u22BB",veeeq:"\u225A",vellip:"\u22EE",verbar:"|",Verbar:"\u2016",vert:"|",Vert:"\u2016",VerticalBar:"\u2223",VerticalLine:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",VeryThinSpace:"\u200A",vfr:"\u{1D533}",Vfr:"\u{1D519}",vltri:"\u22B2",vnsub:"\u2282\u20D2",vnsup:"\u2283\u20D2",vopf:"\u{1D567}",Vopf:"\u{1D54D}",vprop:"\u221D",vrtri:"\u22B3",vscr:"\u{1D4CB}",Vscr:"\u{1D4B1}",vsubne:"\u228A\uFE00",vsubnE:"\u2ACB\uFE00",vsupne:"\u228B\uFE00",vsupnE:"\u2ACC\uFE00",Vvdash:"\u22AA",vzigzag:"\u299A",wcirc:"\u0175",Wcirc:"\u0174",wedbar:"\u2A5F",wedge:"\u2227",Wedge:"\u22C0",wedgeq:"\u2259",weierp:"\u2118",wfr:"\u{1D534}",Wfr:"\u{1D51A}",wopf:"\u{1D568}",Wopf:"\u{1D54E}",wp:"\u2118",wr:"\u2240",wreath:"\u2240",wscr:"\u{1D4CC}",Wscr:"\u{1D4B2}",xcap:"\u22C2",xcirc:"\u25EF",xcup:"\u22C3",xdtri:"\u25BD",xfr:"\u{1D535}",Xfr:"\u{1D51B}",xharr:"\u27F7",xhArr:"\u27FA",xi:"\u03BE",Xi:"\u039E",xlarr:"\u27F5",xlArr:"\u27F8",xmap:"\u27FC",xnis:"\u22FB",xodot:"\u2A00",xopf:"\u{1D569}",Xopf:"\u{1D54F}",xoplus:"\u2A01",xotime:"\u2A02",xrarr:"\u27F6",xrArr:"\u27F9",xscr:"\u{1D4CD}",Xscr:"\u{1D4B3}",xsqcup:"\u2A06",xuplus:"\u2A04",xutri:"\u25B3",xvee:"\u22C1",xwedge:"\u22C0",yacute:"\xFD",Yacute:"\xDD",yacy:"\u044F",YAcy:"\u042F",ycirc:"\u0177",Ycirc:"\u0176",ycy:"\u044B",Ycy:"\u042B",yen:"\xA5",yfr:"\u{1D536}",Yfr:"\u{1D51C}",yicy:"\u0457",YIcy:"\u0407",yopf:"\u{1D56A}",Yopf:"\u{1D550}",yscr:"\u{1D4CE}",Yscr:"\u{1D4B4}",yucy:"\u044E",YUcy:"\u042E",yuml:"\xFF",Yuml:"\u0178",zacute:"\u017A",Zacute:"\u0179",zcaron:"\u017E",Zcaron:"\u017D",zcy:"\u0437",Zcy:"\u0417",zdot:"\u017C",Zdot:"\u017B",zeetrf:"\u2128",ZeroWidthSpace:"\u200B",zeta:"\u03B6",Zeta:"\u0396",zfr:"\u{1D537}",Zfr:"\u2128",zhcy:"\u0436",ZHcy:"\u0416",zigrarr:"\u21DD",zopf:"\u{1D56B}",Zopf:"\u2124",zscr:"\u{1D4CF}",Zscr:"\u{1D4B5}",zwj:"\u200D",zwnj:"\u200C"},g={aacute:"\xE1",Aacute:"\xC1",acirc:"\xE2",Acirc:"\xC2",acute:"\xB4",aelig:"\xE6",AElig:"\xC6",agrave:"\xE0",Agrave:"\xC0",amp:"&",AMP:"&",aring:"\xE5",Aring:"\xC5",atilde:"\xE3",Atilde:"\xC3",auml:"\xE4",Auml:"\xC4",brvbar:"\xA6",ccedil:"\xE7",Ccedil:"\xC7",cedil:"\xB8",cent:"\xA2",copy:"\xA9",COPY:"\xA9",curren:"\xA4",deg:"\xB0",divide:"\xF7",eacute:"\xE9",Eacute:"\xC9",ecirc:"\xEA",Ecirc:"\xCA",egrave:"\xE8",Egrave:"\xC8",eth:"\xF0",ETH:"\xD0",euml:"\xEB",Euml:"\xCB",frac12:"\xBD",frac14:"\xBC",frac34:"\xBE",gt:">",GT:">",iacute:"\xED",Iacute:"\xCD",icirc:"\xEE",Icirc:"\xCE",iexcl:"\xA1",igrave:"\xEC",Igrave:"\xCC",iquest:"\xBF",iuml:"\xEF",Iuml:"\xCF",laquo:"\xAB",lt:"<",LT:"<",macr:"\xAF",micro:"\xB5",middot:"\xB7",nbsp:"\xA0",not:"\xAC",ntilde:"\xF1",Ntilde:"\xD1",oacute:"\xF3",Oacute:"\xD3",ocirc:"\xF4",Ocirc:"\xD4",ograve:"\xF2",Ograve:"\xD2",ordf:"\xAA",ordm:"\xBA",oslash:"\xF8",Oslash:"\xD8",otilde:"\xF5",Otilde:"\xD5",ouml:"\xF6",Ouml:"\xD6",para:"\xB6",plusmn:"\xB1",pound:"\xA3",quot:'"',QUOT:'"',raquo:"\xBB",reg:"\xAE",REG:"\xAE",sect:"\xA7",shy:"\xAD",sup1:"\xB9",sup2:"\xB2",sup3:"\xB3",szlig:"\xDF",thorn:"\xFE",THORN:"\xDE",times:"\xD7",uacute:"\xFA",Uacute:"\xDA",ucirc:"\xFB",Ucirc:"\xDB",ugrave:"\xF9",Ugrave:"\xD9",uml:"\xA8",uuml:"\xFC",Uuml:"\xDC",yacute:"\xFD",Yacute:"\xDD",yen:"\xA5",yuml:"\xFF"},x={"0":"\uFFFD","128":"\u20AC","130":"\u201A","131":"\u0192","132":"\u201E","133":"\u2026","134":"\u2020","135":"\u2021","136":"\u02C6","137":"\u2030","138":"\u0160","139":"\u2039","140":"\u0152","142":"\u017D","145":"\u2018","146":"\u2019","147":"\u201C","148":"\u201D","149":"\u2022","150":"\u2013","151":"\u2014","152":"\u02DC","153":"\u2122","154":"\u0161","155":"\u203A","156":"\u0153","158":"\u017E","159":"\u0178"},m=[1,2,3,4,5,6,7,8,11,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,64976,64977,64978,64979,64980,64981,64982,64983,64984,64985,64986,64987,64988,64989,64990,64991,64992,64993,64994,64995,64996,64997,64998,64999,65e3,65001,65002,65003,65004,65005,65006,65007,65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111],d=String.fromCharCode,A={},b=A.hasOwnProperty,C=function(N,U){return b.call(N,U)},E=function(N,U){for(var Z=-1,O=N.length;++Z=55296&&N<=57343||N>1114111?(U&&M("character reference outside the permissible Unicode range"),"\uFFFD"):C(x,N)?(U&&M("disallowed character reference"),x[N]):(U&&E(m,N)&&M("disallowed character reference"),N>65535&&(N-=65536,Z+=d(N>>>10&1023|55296),N=56320|N&1023),Z+=d(N),Z)},P=function(N){return"&#x"+N.toString(16).toUpperCase()+";"},F=function(N){return"&#"+N+";"},M=function(N){throw Error("Parse error: "+N)},D=function(N,U){U=T(U,D.options);var Z=U.strict;Z&&h.test(N)&&M("forbidden code point");var O=U.encodeEverything,W=U.useNamedReferences,X=U.allowUnsafeSymbols,Q=U.decimal?F:P,a1=function(B){return Q(B.charCodeAt(0))};return O?(N=N.replace(r,function(B){return W&&C(c,B)?"&"+c[B]+";":a1(B)}),W&&(N=N.replace(/>\u20D2/g,">⃒").replace(/<\u20D2/g,"<⃒").replace(/fj/g,"fj")),W&&(N=N.replace(o,function(B){return"&"+c[B]+";"}))):W?(X||(N=N.replace(l,function(B){return"&"+c[B]+";"})),N=N.replace(/>\u20D2/g,">⃒").replace(/<\u20D2/g,"<⃒"),N=N.replace(o,function(B){return"&"+c[B]+";"})):X||(N=N.replace(l,a1)),N.replace(a,function(B){var M1=B.charCodeAt(0),u1=B.charCodeAt(1),v1=(M1-55296)*1024+u1-56320+65536;return Q(v1)}).replace(s,a1)};D.options={allowUnsafeSymbols:!1,encodeEverything:!1,strict:!1,useNamedReferences:!1,decimal:!1};var z=function(N,U){U=T(U,z.options);var Z=U.strict;return Z&&f.test(N)&&M("malformed character reference"),N.replace(p,function(O,W,X,Q,a1,B,M1,u1,v1){var n1,T1,A1,C1,u2,J1;return W?(u2=W,v[u2]):X?(u2=X,J1=Q,J1&&U.isAttributeValue?(Z&&J1=="="&&M("`&` did not start a character reference"),O):(Z&&M("named character reference was not terminated by a semicolon"),g[u2]+(J1||""))):a1?(A1=a1,T1=B,Z&&!T1&&M("character reference was not terminated by a semicolon"),n1=parseInt(A1,10),_(n1,Z)):M1?(C1=M1,T1=u1,Z&&!T1&&M("character reference was not terminated by a semicolon"),n1=parseInt(C1,16),_(n1,Z)):(Z&&M("named character reference was not terminated by a semicolon"),O)})};z.options={isAttributeValue:!1,strict:!1};var H=function(N){return N.replace(l,function(U){return u[U]})},V={version:"1.2.0",encode:D,decode:z,escape:H,unescape:z};if(typeof define=="function"&&typeof define.amd=="object"&&define.amd)define(function(){return V});else if(e&&!e.nodeType)if(t)t.exports=V;else for(var L in V)C(V,L)&&(e[L]=V[L]);else n.he=V})(s6)});var _o=b0((So,g0)=>{(function(n,e){typeof define=="function"&&define.amd?define([],e):typeof g0=="object"&&g0.exports?g0.exports=e():n.moo=e()})(So,function(){"use strict";var n=Object.prototype.hasOwnProperty,e=Object.prototype.toString,t=typeof new RegExp().sticky=="boolean";function i(_){return _&&e.call(_)==="[object RegExp]"}function a(_){return _&&typeof _=="object"&&!i(_)&&!Array.isArray(_)}function r(_){return _.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function s(_){var P=new RegExp("|"+_);return P.exec("").length-1}function o(_){return"("+_+")"}function c(_){if(!_.length)return"(?!)";var P=_.map(function(F){return"(?:"+F+")"}).join("|");return"(?:"+P+")"}function l(_){if(typeof _=="string")return"(?:"+r(_)+")";if(i(_)){if(_.ignoreCase)throw new Error("RegExp /i flag not allowed");if(_.global)throw new Error("RegExp /g flag is implied");if(_.sticky)throw new Error("RegExp /y flag is implied");if(_.multiline)throw new Error("RegExp /m flag is implied");return _.source}else throw new Error("Not a pattern: "+_)}function u(_){for(var P=Object.getOwnPropertyNames(_),F=[],M=0;M0)throw new Error("RegExp has capture groups: "+Q+` Use (?: \u2026 ) instead`);if(!N.lineBreaks&&Q.test(` -`))throw new Error("Rule should declare lineBreaks: "+Q);V.push(s(X))}}var B=F&&F.fallback,M1=t&&!B?"ym":"gm",u1=t||B?"":"|";z===!0&&(M1+="u");var v1=new RegExp(c(V)+u1,M1);return{regexp:v1,groups:H,fast:M,error:F||v}}function x(_){var P=g(m(_));return new b({start:P},"start")}function p(_,P,F){var M=_&&(_.push||_.next);if(M&&!F[M])throw new Error("Missing state '"+M+"' (in token '"+_.defaultType+"' of state '"+P+"')");if(_&&_.pop&&+_.pop!=1)throw new Error("pop must be 1 (in token '"+_.defaultType+"' of state '"+P+"')")}function d(_,P){var F=_.$all?m(_.$all):[];delete _.$all;var M=Object.getOwnPropertyNames(_);P||(P=M[0]);for(var D=Object.create(null),z=0;zh6,default:()=>Ri});var e2=S2(require("obsidian")),Ho=S2(Pi());var Ii={prefix:"fas",iconName:"dice",icon:[640,512,[],"f522","M592 192H473.26c12.69 29.59 7.12 65.2-17 89.32L320 417.58V464c0 26.51 21.49 48 48 48h224c26.51 0 48-21.49 48-48V240c0-26.51-21.49-48-48-48zM480 376c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24zm-46.37-186.7L258.7 14.37c-19.16-19.16-50.23-19.16-69.39 0L14.37 189.3c-19.16 19.16-19.16 50.23 0 69.39L189.3 433.63c19.16 19.16 50.23 19.16 69.39 0L433.63 258.7c19.16-19.17 19.16-50.24 0-69.4zM96 248c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24zm128 128c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24zm0-128c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24zm0-128c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24zm128 128c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24z"]};var ki={prefix:"far",iconName:"copy",icon:[448,512,[],"f0c5","M433.941 65.941l-51.882-51.882A48 48 0 0 0 348.118 0H176c-26.51 0-48 21.49-48 48v48H48c-26.51 0-48 21.49-48 48v320c0 26.51 21.49 48 48 48h224c26.51 0 48-21.49 48-48v-48h80c26.51 0 48-21.49 48-48V99.882a48 48 0 0 0-14.059-33.941zM266 464H54a6 6 0 0 1-6-6V150a6 6 0 0 1 6-6h74v224c0 26.51 21.49 48 48 48h96v42a6 6 0 0 1-6 6zm128-96H182a6 6 0 0 1-6-6V54a6 6 0 0 1 6-6h106v88c0 13.255 10.745 24 24 24h88v202a6 6 0 0 1-6 6zm6-256h-64V48h9.632c1.591 0 3.117.632 4.243 1.757l48.368 48.368a6 6 0 0 1 1.757 4.243V112z"]};function xt(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?xt=function(e){return typeof e}:xt=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},xt(n)}function jo(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function Ui(n,e){for(var t=0;t-1;a--){var r=t[a],o=(r.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(o)>-1&&(i=r)}return z2.head.insertBefore(e,i),n}}var mc="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";function r6(){for(var n=12,e="";n-- >0;)e+=mc[Math.random()*62|0];return e}function na(n){return"".concat(n).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}function vc(n){return Object.keys(n||{}).reduce(function(e,t){return e+"".concat(t,'="').concat(na(n[t]),'" ')},"").trim()}function sa(n){return Object.keys(n||{}).reduce(function(e,t){return e+"".concat(t,": ").concat(n[t],";")},"")}function oa(n){return n.size!==B4.size||n.x!==B4.x||n.y!==B4.y||n.rotate!==B4.rotate||n.flipX||n.flipY}function ca(n){var e=n.transform,t=n.containerWidth,i=n.iconWidth,a={transform:"translate(".concat(t/2," 256)")},r="translate(".concat(e.x*32,", ").concat(e.y*32,") "),o="scale(".concat(e.size/16*(e.flipX?-1:1),", ").concat(e.size/16*(e.flipY?-1:1),") "),s="rotate(".concat(e.rotate," 0 0)"),c={transform:"".concat(r," ").concat(o," ").concat(s)},l={transform:"translate(".concat(i/2*-1," -256)")};return{outer:a,inner:c,path:l}}var _0={x:0,y:0,width:"100%",height:"100%"};function la(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return n.attributes&&(n.attributes.fill||e)&&(n.attributes.fill="black"),n}function gc(n){return n.tag==="g"?n.children:[n]}function xc(n){var e=n.children,t=n.attributes,i=n.main,a=n.mask,r=n.maskId,o=n.transform,s=i.width,c=i.icon,l=a.width,u=a.icon,f=ca({transform:o,containerWidth:l,iconWidth:s}),h={tag:"rect",attributes:F1({},_0,{fill:"white"})},m=c.children?{children:c.children.map(la)}:{},v={tag:"g",attributes:F1({},f.inner),children:[la(F1({tag:c.tag,attributes:F1({},c.attributes,f.path)},m))]},g={tag:"g",attributes:F1({},f.outer),children:[v]},x="mask-".concat(r||r6()),p="clip-".concat(r||r6()),d={tag:"mask",attributes:F1({},_0,{id:x,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[h,g]},A={tag:"defs",children:[{tag:"clipPath",attributes:{id:p},children:gc(u)},d]};return e.push(A,{tag:"rect",attributes:F1({fill:"currentColor","clip-path":"url(#".concat(p,")"),mask:"url(#".concat(x,")")},_0)}),{children:e,attributes:t}}function Mc(n){var e=n.children,t=n.attributes,i=n.main,a=n.transform,r=n.styles,o=sa(r);if(o.length>0&&(t.style=o),oa(a)){var s=ca({transform:a,containerWidth:i.width,iconWidth:i.width});e.push({tag:"g",attributes:F1({},s.outer),children:[{tag:"g",attributes:F1({},s.inner),children:[{tag:i.icon.tag,children:i.icon.children,attributes:F1({},i.icon.attributes,s.path)}]}]})}else e.push(i.icon);return{children:e,attributes:t}}function bc(n){var e=n.children,t=n.main,i=n.mask,a=n.attributes,r=n.styles,o=n.transform;if(oa(o)&&t.found&&!i.found){var s=t.width,c=t.height,l={x:s/c/2,y:.5};a.style=sa(F1({},r,{"transform-origin":"".concat(l.x+o.x/16,"em ").concat(l.y+o.y/16,"em")}))}return[{tag:"svg",attributes:a,children:e}]}function yc(n){var e=n.prefix,t=n.iconName,i=n.children,a=n.attributes,r=n.symbol,o=r===!0?"".concat(e,"-").concat(N2.familyPrefix,"-").concat(t):r;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:F1({},a,{id:o}),children:i}]}]}function Cc(n){var e=n.icons,t=e.main,i=e.mask,a=n.prefix,r=n.iconName,o=n.transform,s=n.symbol,c=n.title,l=n.maskId,u=n.titleId,f=n.extra,h=n.watchable,m=h===void 0?!1:h,v=i.found?i:t,g=v.width,x=v.height,p=a==="fak",d=p?"":"fa-w-".concat(Math.ceil(g/x*16)),A=[N2.replacementClass,r?"".concat(N2.familyPrefix,"-").concat(r):"",d].filter(function(F){return f.classes.indexOf(F)===-1}).filter(function(F){return F!==""||!!F}).concat(f.classes).join(" "),b={children:[],attributes:F1({},f.attributes,{"data-prefix":a,"data-icon":r,class:A,role:f.attributes.role||"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(g," ").concat(x)})},C=p&&!~f.classes.indexOf("fa-fw")?{width:"".concat(g/x*16*.0625,"em")}:{};m&&(b.attributes[ec]=""),c&&b.children.push({tag:"title",attributes:{id:b.attributes["aria-labelledby"]||"title-".concat(u||r6())},children:[c]});var E=F1({},b,{prefix:a,iconName:r,main:t,mask:i,maskId:l,transform:o,symbol:s,styles:F1({},C,f.styles)}),T=i.found&&t.found?xc(E):Mc(E),_=T.children,P=T.attributes;return E.children=_,E.attributes=P,s?yc(E):bc(E)}var ua=function(){},Mh=N2.measurePerformance&&e6&&e6.mark&&e6.measure?e6:{mark:ua,measure:ua};var zc=function(e,t){return function(i,a,r,o){return e.call(t,i,a,r,o)}},E0=function(e,t,i,a){var r=Object.keys(e),o=r.length,s=a!==void 0?zc(t,a):t,c,l,u;for(i===void 0?(c=1,u=e[r[0]]):(c=0,u=i);c2&&arguments[2]!==void 0?arguments[2]:{},i=t.skipHooks,a=i===void 0?!1:i,r=Object.keys(e).reduce(function(o,s){var c=e[s],l=!!c.icon;return l?o[c.iconName]=c.icon:o[s]=c,o},{});typeof de.hooks.addPack=="function"&&!a?de.hooks.addPack(n,r):de.styles[n]=F1({},de.styles[n]||{},r),n==="fas"&&ha("fa",e)}var fa=de.styles,Ac=de.shims,wc={},Sc={},_c={},da=function(){var e=function(a){return E0(fa,function(r,o,s){return r[s]=E0(o,a,{}),r},{})};wc=e(function(i,a,r){return a[3]&&(i[a[3]]=r),i}),Sc=e(function(i,a,r){var o=a[2];return i[r]=r,o.forEach(function(s){i[s]=r}),i});var t="far"in fa;_c=E0(Ac,function(i,a){var r=a[0],o=a[1],s=a[2];return o==="far"&&!t&&(o="fas"),i[r]={prefix:o,iconName:s},i},{})};da();var bh=de.styles;function pa(n,e,t){if(n&&n[e]&&n[e][t])return{prefix:e,iconName:t,icon:n[e][t]}}function ma(n){var e=n.tag,t=n.attributes,i=t===void 0?{}:t,a=n.children,r=a===void 0?[]:a;return typeof n=="string"?na(n):"<".concat(e," ").concat(vc(i),">").concat(r.map(ma).join(""),"")}function L0(n){this.name="MissingIcon",this.message=n||"Icon unavailable",this.stack=new Error().stack}L0.prototype=Object.create(Error.prototype);L0.prototype.constructor=L0;var n6={fill:"currentColor"},va={attributeType:"XML",repeatCount:"indefinite",dur:"2s"},yh={tag:"path",attributes:F1({},n6,{d:"M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z"})},D0=F1({},va,{attributeName:"opacity"}),Ch={tag:"circle",attributes:F1({},n6,{cx:"256",cy:"364",r:"28"}),children:[{tag:"animate",attributes:F1({},va,{attributeName:"r",values:"28;14;28;28;14;28;"})},{tag:"animate",attributes:F1({},D0,{values:"1;0;1;1;0;1;"})}]},zh={tag:"path",attributes:F1({},n6,{opacity:"1",d:"M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z"}),children:[{tag:"animate",attributes:F1({},D0,{values:"1;0;0;0;0;1;"})}]},Ah={tag:"path",attributes:F1({},n6,{opacity:"0",d:"M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z"}),children:[{tag:"animate",attributes:F1({},D0,{values:"0;0;1;1;0;0;"})}]};var wh=de.styles;function ga(n){var e=n[0],t=n[1],i=n.slice(4),a=Oi(i,1),r=a[0],o=null;return Array.isArray(r)?o={tag:"g",attributes:{class:"".concat(N2.familyPrefix,"-").concat(v4.GROUP)},children:[{tag:"path",attributes:{class:"".concat(N2.familyPrefix,"-").concat(v4.SECONDARY),fill:"currentColor",d:r[0]}},{tag:"path",attributes:{class:"".concat(N2.familyPrefix,"-").concat(v4.PRIMARY),fill:"currentColor",d:r[1]}}]}:o={tag:"path",attributes:{fill:"currentColor",d:r}},{found:!0,width:e,height:t,icon:o}}var Sh=de.styles;var Ec=`svg:not(:root).svg-inline--fa { +`,P+=" "+Array(_.col).join(" ")+"^",P},b.prototype.clone=function(){return new b(this.states,this.state)},b.prototype.has=function(_){return!0},{compile:x,states:d,error:Object.freeze({error:!0}),fallback:Object.freeze({fallback:!0}),keywords:A}})});Go(exports,{DEFAULT_SETTINGS:()=>f6,default:()=>Fi});var Z1=w2(require("obsidian")),Vo=w2(Ii());var ki={prefix:"fas",iconName:"dice",icon:[640,512,[],"f522","M592 192H473.26c12.69 29.59 7.12 65.2-17 89.32L320 417.58V464c0 26.51 21.49 48 48 48h224c26.51 0 48-21.49 48-48V240c0-26.51-21.49-48-48-48zM480 376c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24zm-46.37-186.7L258.7 14.37c-19.16-19.16-50.23-19.16-69.39 0L14.37 189.3c-19.16 19.16-19.16 50.23 0 69.39L189.3 433.63c19.16 19.16 50.23 19.16 69.39 0L433.63 258.7c19.16-19.17 19.16-50.24 0-69.4zM96 248c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24zm128 128c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24zm0-128c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24zm0-128c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24zm128 128c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24z"]};var Ui={prefix:"far",iconName:"copy",icon:[448,512,[],"f0c5","M433.941 65.941l-51.882-51.882A48 48 0 0 0 348.118 0H176c-26.51 0-48 21.49-48 48v48H48c-26.51 0-48 21.49-48 48v320c0 26.51 21.49 48 48 48h224c26.51 0 48-21.49 48-48v-48h80c26.51 0 48-21.49 48-48V99.882a48 48 0 0 0-14.059-33.941zM266 464H54a6 6 0 0 1-6-6V150a6 6 0 0 1 6-6h74v224c0 26.51 21.49 48 48 48h96v42a6 6 0 0 1-6 6zm128-96H182a6 6 0 0 1-6-6V54a6 6 0 0 1 6-6h106v88c0 13.255 10.745 24 24 24h88v202a6 6 0 0 1-6 6zm6-256h-64V48h9.632c1.591 0 3.117.632 4.243 1.757l48.368 48.368a6 6 0 0 1 1.757 4.243V112z"]};function gt(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?gt=function(e){return typeof e}:gt=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},gt(n)}function Xo(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function Oi(n,e){for(var t=0;t-1;a--){var r=t[a],s=(r.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(s)>-1&&(i=r)}return C2.head.insertBefore(e,i),n}}var vc="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";function r6(){for(var n=12,e="";n-- >0;)e+=vc[Math.random()*62|0];return e}function sa(n){return"".concat(n).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}function gc(n){return Object.keys(n||{}).reduce(function(e,t){return e+"".concat(t,'="').concat(sa(n[t]),'" ')},"").trim()}function oa(n){return Object.keys(n||{}).reduce(function(e,t){return e+"".concat(t,": ").concat(n[t],";")},"")}function ca(n){return n.size!==F4.size||n.x!==F4.x||n.y!==F4.y||n.rotate!==F4.rotate||n.flipX||n.flipY}function la(n){var e=n.transform,t=n.containerWidth,i=n.iconWidth,a={transform:"translate(".concat(t/2," 256)")},r="translate(".concat(e.x*32,", ").concat(e.y*32,") "),s="scale(".concat(e.size/16*(e.flipX?-1:1),", ").concat(e.size/16*(e.flipY?-1:1),") "),o="rotate(".concat(e.rotate," 0 0)"),c={transform:"".concat(r," ").concat(s," ").concat(o)},l={transform:"translate(".concat(i/2*-1," -256)")};return{outer:a,inner:c,path:l}}var E0={x:0,y:0,width:"100%",height:"100%"};function ua(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return n.attributes&&(n.attributes.fill||e)&&(n.attributes.fill="black"),n}function xc(n){return n.tag==="g"?n.children:[n]}function Mc(n){var e=n.children,t=n.attributes,i=n.main,a=n.mask,r=n.maskId,s=n.transform,o=i.width,c=i.icon,l=a.width,u=a.icon,f=la({transform:s,containerWidth:l,iconWidth:o}),h={tag:"rect",attributes:F1({},E0,{fill:"white"})},p=c.children?{children:c.children.map(ua)}:{},v={tag:"g",attributes:F1({},f.inner),children:[ua(F1({tag:c.tag,attributes:F1({},c.attributes,f.path)},p))]},g={tag:"g",attributes:F1({},f.outer),children:[v]},x="mask-".concat(r||r6()),m="clip-".concat(r||r6()),d={tag:"mask",attributes:F1({},E0,{id:x,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[h,g]},A={tag:"defs",children:[{tag:"clipPath",attributes:{id:m},children:xc(u)},d]};return e.push(A,{tag:"rect",attributes:F1({fill:"currentColor","clip-path":"url(#".concat(m,")"),mask:"url(#".concat(x,")")},E0)}),{children:e,attributes:t}}function bc(n){var e=n.children,t=n.attributes,i=n.main,a=n.transform,r=n.styles,s=oa(r);if(s.length>0&&(t.style=s),ca(a)){var o=la({transform:a,containerWidth:i.width,iconWidth:i.width});e.push({tag:"g",attributes:F1({},o.outer),children:[{tag:"g",attributes:F1({},o.inner),children:[{tag:i.icon.tag,children:i.icon.children,attributes:F1({},i.icon.attributes,o.path)}]}]})}else e.push(i.icon);return{children:e,attributes:t}}function yc(n){var e=n.children,t=n.main,i=n.mask,a=n.attributes,r=n.styles,s=n.transform;if(ca(s)&&t.found&&!i.found){var o=t.width,c=t.height,l={x:o/c/2,y:.5};a.style=oa(F1({},r,{"transform-origin":"".concat(l.x+s.x/16,"em ").concat(l.y+s.y/16,"em")}))}return[{tag:"svg",attributes:a,children:e}]}function Cc(n){var e=n.prefix,t=n.iconName,i=n.children,a=n.attributes,r=n.symbol,s=r===!0?"".concat(e,"-").concat(V2.familyPrefix,"-").concat(t):r;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:F1({},a,{id:s}),children:i}]}]}function zc(n){var e=n.icons,t=e.main,i=e.mask,a=n.prefix,r=n.iconName,s=n.transform,o=n.symbol,c=n.title,l=n.maskId,u=n.titleId,f=n.extra,h=n.watchable,p=h===void 0?!1:h,v=i.found?i:t,g=v.width,x=v.height,m=a==="fak",d=m?"":"fa-w-".concat(Math.ceil(g/x*16)),A=[V2.replacementClass,r?"".concat(V2.familyPrefix,"-").concat(r):"",d].filter(function(F){return f.classes.indexOf(F)===-1}).filter(function(F){return F!==""||!!F}).concat(f.classes).join(" "),b={children:[],attributes:F1({},f.attributes,{"data-prefix":a,"data-icon":r,class:A,role:f.attributes.role||"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(g," ").concat(x)})},C=m&&!~f.classes.indexOf("fa-fw")?{width:"".concat(g/x*16*.0625,"em")}:{};p&&(b.attributes[tc]=""),c&&b.children.push({tag:"title",attributes:{id:b.attributes["aria-labelledby"]||"title-".concat(u||r6())},children:[c]});var E=F1({},b,{prefix:a,iconName:r,main:t,mask:i,maskId:l,transform:s,symbol:o,styles:F1({},C,f.styles)}),T=i.found&&t.found?Mc(E):bc(E),_=T.children,P=T.attributes;return E.children=_,E.attributes=P,o?Cc(E):yc(E)}var ha=function(){},bh=V2.measurePerformance&&e6&&e6.mark&&e6.measure?e6:{mark:ha,measure:ha};var Ac=function(e,t){return function(i,a,r,s){return e.call(t,i,a,r,s)}},L0=function(e,t,i,a){var r=Object.keys(e),s=r.length,o=a!==void 0?Ac(t,a):t,c,l,u;for(i===void 0?(c=1,u=e[r[0]]):(c=0,u=i);c2&&arguments[2]!==void 0?arguments[2]:{},i=t.skipHooks,a=i===void 0?!1:i,r=Object.keys(e).reduce(function(s,o){var c=e[o],l=!!c.icon;return l?s[c.iconName]=c.icon:s[o]=c,s},{});typeof de.hooks.addPack=="function"&&!a?de.hooks.addPack(n,r):de.styles[n]=F1({},de.styles[n]||{},r),n==="fas"&&fa("fa",e)}var da=de.styles,wc=de.shims,Sc={},_c={},Ec={},pa=function(){var e=function(a){return L0(da,function(r,s,o){return r[o]=L0(s,a,{}),r},{})};Sc=e(function(i,a,r){return a[3]&&(i[a[3]]=r),i}),_c=e(function(i,a,r){var s=a[2];return i[r]=r,s.forEach(function(o){i[o]=r}),i});var t="far"in da;Ec=L0(wc,function(i,a){var r=a[0],s=a[1],o=a[2];return s==="far"&&!t&&(s="fas"),i[r]={prefix:s,iconName:o},i},{})};pa();var yh=de.styles;function ma(n,e,t){if(n&&n[e]&&n[e][t])return{prefix:e,iconName:t,icon:n[e][t]}}function va(n){var e=n.tag,t=n.attributes,i=t===void 0?{}:t,a=n.children,r=a===void 0?[]:a;return typeof n=="string"?sa(n):"<".concat(e," ").concat(gc(i),">").concat(r.map(va).join(""),"")}function D0(n){this.name="MissingIcon",this.message=n||"Icon unavailable",this.stack=new Error().stack}D0.prototype=Object.create(Error.prototype);D0.prototype.constructor=D0;var n6={fill:"currentColor"},ga={attributeType:"XML",repeatCount:"indefinite",dur:"2s"},Ch={tag:"path",attributes:F1({},n6,{d:"M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z"})},T0=F1({},ga,{attributeName:"opacity"}),zh={tag:"circle",attributes:F1({},n6,{cx:"256",cy:"364",r:"28"}),children:[{tag:"animate",attributes:F1({},ga,{attributeName:"r",values:"28;14;28;28;14;28;"})},{tag:"animate",attributes:F1({},T0,{values:"1;0;1;1;0;1;"})}]},Ah={tag:"path",attributes:F1({},n6,{opacity:"1",d:"M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z"}),children:[{tag:"animate",attributes:F1({},T0,{values:"1;0;0;0;0;1;"})}]},wh={tag:"path",attributes:F1({},n6,{opacity:"0",d:"M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z"}),children:[{tag:"animate",attributes:F1({},T0,{values:"0;0;1;1;0;0;"})}]};var Sh=de.styles;function xa(n){var e=n[0],t=n[1],i=n.slice(4),a=Gi(i,1),r=a[0],s=null;return Array.isArray(r)?s={tag:"g",attributes:{class:"".concat(V2.familyPrefix,"-").concat(m4.GROUP)},children:[{tag:"path",attributes:{class:"".concat(V2.familyPrefix,"-").concat(m4.SECONDARY),fill:"currentColor",d:r[0]}},{tag:"path",attributes:{class:"".concat(V2.familyPrefix,"-").concat(m4.PRIMARY),fill:"currentColor",d:r[1]}}]}:s={tag:"path",attributes:{fill:"currentColor",d:r}},{found:!0,width:e,height:t,icon:s}}var _h=de.styles;var Lc=`svg:not(:root).svg-inline--fa { overflow: visible; } @@ -469,91 +469,91 @@ Use (?: \u2026 ) instead`);if(!N.lineBreaks&&Q.test(` .fad.fa-inverse { color: #fff; -}`;function Lc(){var n=Zi,e=Yi,t=N2.familyPrefix,i=N2.replacementClass,a=Ec;if(t!==n||i!==e){var r=new RegExp("\\.".concat(n,"\\-"),"g"),o=new RegExp("\\--".concat(n,"\\-"),"g"),s=new RegExp("\\.".concat(e),"g");a=a.replace(r,".".concat(t,"-")).replace(o,"--".concat(t,"-")).replace(s,".".concat(i))}return a}var Dc=function(){function n(){jo(this,n),this.definitions={}}return Xo(n,[{key:"add",value:function(){for(var t=this,i=arguments.length,a=new Array(i),r=0;r1&&arguments[1]!==void 0?arguments[1]:{},i=(e||{}).icon?e:xa(e||{}),a=t.mask;return a&&(a=(a||{}).icon?a:xa(a||{})),n(i,F1({},t,{mask:a}))}}var Nc=new Dc;var Ma=!1;var T0=Vc(function(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=e.transform,i=t===void 0?B4:t,a=e.symbol,r=a===void 0?!1:a,o=e.mask,s=o===void 0?null:o,c=e.maskId,l=c===void 0?null:c,u=e.title,f=u===void 0?null:u,h=e.titleId,m=h===void 0?null:h,v=e.classes,g=v===void 0?[]:v,x=e.attributes,p=x===void 0?{}:x,d=e.styles,A=d===void 0?{}:d;if(!!n){var b=n.prefix,C=n.iconName,E=n.icon;return Hc(F1({type:"icon"},n),function(){return Tc(),N2.autoA11y&&(f?p["aria-labelledby"]="".concat(N2.replacementClass,"-title-").concat(m||r6()):(p["aria-hidden"]="true",p.focusable="false")),Cc({icons:{main:ga(E),mask:s?ga(s.icon):{found:!1,width:null,height:null,icon:{}}},prefix:b,iconName:C,transform:F1({},B4,i),symbol:r,title:f,maskId:l,titleId:m,extra:{attributes:p,styles:A,classes:g}})})}});function H0(n,e){let t=Object.keys(e).map(i=>Rc(n,i,e[i]));return t.length===1?t[0]:function(){t.forEach(i=>i())}}function Rc(n,e,t){let i=n[e],a=n.hasOwnProperty(e),r=t(i);return i&&Object.setPrototypeOf(r,i),Object.setPrototypeOf(o,r),n[e]=o,s;function o(...c){return r===i&&n[e]===o&&s(),r.apply(this,c)}function s(){n[e]===o&&(a?n[e]=i:delete n[e]),r!==i&&(r=i,Object.setPrototypeOf(o,i||Function))}}var Ni=S2(ba());var V0=/(?:(?\d+)[Dd])?#(?[\p{Letter}\p{Emoji_Presentation}\w/-]+)(?:\|(?[\+-]))?(?:\|(?[^\+-]+))?/u,ya=/(?.*)?(?:\[.*\]\(|\[\[)(?.+?)#?\^(?.+?)(?:\]\]|\))(?:\|(?
.+))?/,N0=/(?:(?\d+)[Dd])?(?:\[.*\]\(|\[\[)(?.+)(?:\]\]|\))\|?(?.+)?/;var Y2="dice-roller-icon",Te="dice-roller-copy";var x4=S2(require("obsidian"));var pe=(a=>(a.None="None",a.Normal="Normal",a.Up="Up",a.Down="Down",a))(pe||{}),f2=(i=>(i.None="None",i.Average="Average",i.Roll="Roll",i))(f2||{});function Ca(n,e,t){[...n].slice(e).reverse().forEach(([a,r])=>{n.set(a+1,r)}),n.set(e,t)}var P4=S2(require("obsidian"));var R0=class extends P4.Events{constructor(e,t="",i=e.data.showDice){super();this.plugin=e;this.original=t;this.loaded=!1;this.containerEl=createSpan({cls:"dice-roller",attr:{"aria-label-position":"top","data-dice":this.original}});this.resultEl=this.containerEl.createSpan("dice-roller-result");if(i){let a=this.containerEl.createSpan({cls:"dice-roller-button"});(0,P4.setIcon)(a,Y2),a.onclick=this.onClick.bind(this)}else this.containerEl.addClass("no-icon");this.containerEl.onclick=this.onClick.bind(this)}setTooltip(){this.plugin.data.displayResultsInline||this.containerEl.setAttrs({"aria-label":this.tooltip})}getRandomBetween(e,t){let i=new Uint32Array(1);crypto.getRandomValues(i);let a=i[0]/(4294967295+1);return Math.floor(a*(t-e+1))+e}async render(){this.setTooltip(),await this.build()}async onClick(e){e.stopPropagation(),e.stopImmediatePropagation(),window.getSelection()?.isCollapsed&&await this.roll()}},za=class extends R0{constructor(e,t,i,a=e.data.showDice){super(e,t,a);this.plugin=e;this.original=t;this.lexemes=i;this.showDice=a;this.save=!1}get inlineText(){return`${this.tooltip.split(` -`).join(" -> ")} -> `}},g4=class extends za{},I4=class extends g4{constructor(e,t,i,a,r=e.data.showDice){super(e,t,[i],r);this.plugin=e;this.original=t;this.lexeme=i;this.source=a;this.watch=!0;this.getPath(),this.init=this.getFile()}async getFile(){if(this.file=this.plugin.app.metadataCache.getFirstLinkpathDest(this.path,this.source),!this.file||!(this.file instanceof P4.TFile))throw new Error("Could not load file.");await this.load()}},F0=class extends R0{constructor(e,t,i){super(e,"");this.options=t;this.rolls=i}get tooltip(){return`${this.options.toString()} +}`;function Dc(){var n=Yi,e=$i,t=V2.familyPrefix,i=V2.replacementClass,a=Lc;if(t!==n||i!==e){var r=new RegExp("\\.".concat(n,"\\-"),"g"),s=new RegExp("\\--".concat(n,"\\-"),"g"),o=new RegExp("\\.".concat(e),"g");a=a.replace(r,".".concat(t,"-")).replace(s,"--".concat(t,"-")).replace(o,".".concat(i))}return a}var Tc=function(){function n(){Xo(this,n),this.definitions={}}return Zo(n,[{key:"add",value:function(){for(var t=this,i=arguments.length,a=new Array(i),r=0;r1&&arguments[1]!==void 0?arguments[1]:{},i=(e||{}).icon?e:Ma(e||{}),a=t.mask;return a&&(a=(a||{}).icon?a:Ma(a||{})),n(i,F1({},t,{mask:a}))}}var Rc=new Tc;var ba=!1;var H0=Nc(function(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=e.transform,i=t===void 0?F4:t,a=e.symbol,r=a===void 0?!1:a,s=e.mask,o=s===void 0?null:s,c=e.maskId,l=c===void 0?null:c,u=e.title,f=u===void 0?null:u,h=e.titleId,p=h===void 0?null:h,v=e.classes,g=v===void 0?[]:v,x=e.attributes,m=x===void 0?{}:x,d=e.styles,A=d===void 0?{}:d;if(!!n){var b=n.prefix,C=n.iconName,E=n.icon;return Vc(F1({type:"icon"},n),function(){return Hc(),V2.autoA11y&&(f?m["aria-labelledby"]="".concat(V2.replacementClass,"-title-").concat(p||r6()):(m["aria-hidden"]="true",m.focusable="false")),zc({icons:{main:xa(E),mask:o?xa(o.icon):{found:!1,width:null,height:null,icon:{}}},prefix:b,iconName:C,transform:F1({},F4,i),symbol:r,title:f,maskId:l,titleId:p,extra:{attributes:m,styles:A,classes:g}})})}});function V0(n,e){let t=Object.keys(e).map(i=>Fc(n,i,e[i]));return t.length===1?t[0]:function(){t.forEach(i=>i())}}function Fc(n,e,t){let i=n[e],a=n.hasOwnProperty(e),r=t(i);return i&&Object.setPrototypeOf(r,i),Object.setPrototypeOf(s,r),n[e]=s,o;function s(...c){return r===i&&n[e]===s&&o(),r.apply(this,c)}function o(){n[e]===s&&(a?n[e]=i:delete n[e]),r!==i&&(r=i,Object.setPrototypeOf(s,i||Function))}}var Ri=w2(ya());var N0=/(?:(?\d+)[Dd])?#(?[\p{Letter}\p{Emoji_Presentation}\w/-]+)(?:\|(?[\+-]))?(?:\|(?[^\+-]+))?/u,Ca=/(?.*)?(?:\[.*\]\(|\[\[)(?.+?)#?\^(?.+?)(?:\]\]|\))(?:\|(?
.+))?/,R0=/(?:(?\d+)[Dd])?(?:\[.*\]\(|\[\[)(?.+)(?:\]\]|\))\|?(?.+)?/;var Y2="dice-roller-icon",Ke="dice-roller-copy";var g4=w2(require("obsidian"));var pe=(a=>(a.None="None",a.Normal="Normal",a.Up="Up",a.Down="Down",a))(pe||{}),h2=(i=>(i.None="None",i.Average="Average",i.Roll="Roll",i))(h2||{});function za(n,e,t){[...n].slice(e).reverse().forEach(([a,r])=>{n.set(a+1,r)}),n.set(e,t)}var B4=w2(require("obsidian"));var F0=class extends B4.Events{constructor(e,t="",i=e.data.showDice){super();this.plugin=e;this.original=t;this.loaded=!1;this.containerEl=createSpan({cls:"dice-roller",attr:{"aria-label-position":"top","data-dice":this.original}});this.resultEl=this.containerEl.createSpan("dice-roller-result");if(i){let a=this.containerEl.createSpan({cls:"dice-roller-button"});(0,B4.setIcon)(a,Y2),a.onclick=this.onClick.bind(this)}else this.containerEl.addClass("no-icon");this.containerEl.onclick=this.onClick.bind(this)}setTooltip(){this.plugin.data.displayResultsInline||this.containerEl.setAttrs({"aria-label":this.tooltip})}getRandomBetween(e,t){let i=new Uint32Array(1);crypto.getRandomValues(i);let a=i[0]/(4294967295+1);return Math.floor(a*(t-e+1))+e}async render(){this.setTooltip(),await this.build()}async onClick(e){e.stopPropagation(),e.stopImmediatePropagation(),window.getSelection()?.isCollapsed&&await this.roll()}},o6=class extends F0{constructor(e,t,i,a=e.data.showDice){super(e,t,a);this.plugin=e;this.original=t;this.lexemes=i;this.showDice=a;this.save=!1}get inlineText(){return`${this.tooltip.split(` +`).join(" -> ")} -> `}},v4=class extends o6{},yt=class extends v4{constructor(e,t,i,a,r=e.data.showDice){super(e,t,[i],r);this.plugin=e;this.original=t;this.lexeme=i;this.source=a;this.watch=!0;this.getPath(),this.init=this.getFile()}async getFile(){if(this.file=this.plugin.app.metadataCache.getFirstLinkpathDest(this.path,this.source),!this.file||!(this.file instanceof B4.TFile))throw new Error("Could not load file.");await this.load()}},B0=class extends F0{constructor(e,t,i){super(e,"");this.options=t;this.rolls=i}get tooltip(){return`${this.options.toString()} -${this.results.toString()}`}async roll(){let e=[...this.options];return this.results=[...Array(this.rolls)].map(()=>{let t=e[this.getRandomBetween(0,e.length-1)];return e.splice(e.indexOf(t),1),t}).filter(t=>t),this.render(),this.trigger("new-result"),this.result=this.results[0],this.results[0]}async build(){this.resultEl.empty(),this.resultEl.setText(this.results.toString())}};var M2=class{constructor(e,t={value:e,conditions:[],type:"dice"}){this.lexeme=t;this.modifiers=new Map;this.modifiersAllowed=!0;this.static=!1;this.conditions=[];this.fudge=!1;if(!/(\-?\d+)[dD]?(\d+|%|\[\d+,\s?\d+\])?/.test(e))throw new Error("Non parseable dice string passed to DiceRoll.");this.dice=e.split(" ").join(""),/^-?\d+(?:\.\d+)?$/.test(this.dice)&&(this.static=!0,this.modifiersAllowed=!1);let[,i,a=null,r=1]=this.dice.match(/(\-?\d+)[dD]\[?(?:(-?\d+)\s?,)?\s?(-?\d+|%|F)\]?/)||[,1,null,1];i=Number(i),this.multiplier=i<0?-1:1;let o=isNaN(Number(a))?null:Number(a),s;this.rolls=Math.abs(Number(i))||1,r==="%"?s=100:r==="F"?(s=1,o=-1,this.fudge=!0):s=Number(r),Number(s)<0&&!o&&(o=-1),Number(s)[l,{usable:!0,value:c,display:`${c}`,modifiers:new Set}]))}get text(){return`${this.result}`}get result(){return this.static?Number(this.dice):[...this.results].map(([,{usable:t,value:i}])=>t?i:0).reduce((t,i)=>t+i,0)}get display(){return this.static?`${this.result}`:`[${[...this.results].map(([,{modifiers:e,display:t}])=>`${t}${[...e].join("")}`).join(", ")}]`}get modifierText(){if(!this.modifiers.size)return"";let e=[...this.conditions].map(({value:i})=>i).join(""),t=[...this.modifiers].map(([i,{conditionals:a,value:r}])=>{let o=a.map(s=>s.value);return`${r}${o.join("")}`}).join("");return`${e}${t}`}keepLow(e=1){if(!this.modifiersAllowed){new x4.Notice("Modifiers are only allowed on dice rolls.");return}[...this.results].sort((t,i)=>t[1].value-i[1].value).slice(e-this.results.size).forEach(([t])=>{let i=this.results.get(t);i.usable=!1,i.modifiers.add("d"),this.results.set(t,{...i})})}keepHigh(e=1){if(!this.modifiersAllowed){new x4.Notice("Modifiers are only allowed on dice rolls.");return}[...this.results].sort((t,i)=>i[1].value-t[1].value).slice(e).forEach(([t])=>{let i=this.results.get(t);i.usable=!1,i.modifiers.add("d"),this.results.set(t,{...i})})}reroll(e,t){if(!this.modifiersAllowed){new x4.Notice("Modifiers are only allowed on dice rolls.");return}t.length||t.push({operator:"=",comparer:this.faces.min,value:""});let i=0,a=[...this.results].filter(([,{value:r}])=>this.checkCondition(r,t));for(;ithis.checkCondition(r,t)).length>0;)i++,a.map(([,r])=>{r.modifiers.add("r"),r.value=this.getRandomBetween(this.faces.min,this.faces.max)});a.forEach(([r,o])=>{this.results.set(r,o)})}explodeAndCombine(e,t){if(!this.modifiersAllowed){new x4.Notice("Modifiers are only allowed on dice rolls.");return}t.length||t.push({operator:"=",comparer:this.faces.max,value:""});let i=0;[...this.results].filter(([,{value:r}])=>this.checkCondition(r,t)).forEach(([r,o])=>{let s=this.getRandomBetween(this.faces.min,this.faces.max);for(i++,o.modifiers.add("!"),o.value+=s,o.display=`${o.value}`,this.results.set(r,o);ithis.checkCondition(r,t)),a=0;i.forEach(([r,o])=>{let s=o.value,c=0;for(;cthis.multiplier*this.getRandomBetween(this.faces.min,this.faces.max))}setResults(e){this.results=new Map([...e].map((t,i)=>[i,{usable:!0,value:t,display:`${t}`,modifiers:new Set}]))}applyModifiers(){for(let[e,t]of this.modifiers)this.applyModifier(e,t)}roll(){let e=this._roll();return this.results=new Map([...e].map((t,i)=>[i,{usable:!0,value:t,display:`${t}`,modifiers:new Set}])),this.applyModifiers(),this.conditions?.length&&this.applyConditions(),e}applyConditions(){for(let[e,t]of this.results){let i=this.conditions.find(({operator:r})=>r==="-="||r==="=-");if(i&&t.value===i.comparer){t.value=-1,t.modifiers.add("-");continue}this.checkCondition(t.value,this.conditions)?(t.modifiers.add("*"),t.value=1):t.usable=!1}}applyModifier(e,t){switch(e){case"sort":{let i;t.value=="sa"?i=[...this.results.values()].sort((a,r)=>a.value-r.value):i=[...this.results.values()].sort((a,r)=>r.value-a.value),this.results=new Map([...this.results.keys()].map(a=>[a,i[a]]));break}case"kh":{this.keepHigh(t.data);break}case"kl":{this.keepLow(t.data);break}case"!":{this.explode(t.data,t.conditionals);break}case"!!":{this.explodeAndCombine(t.data,t.conditionals);break}case"r":{this.reroll(t.data,t.conditionals);break}case"condition":}}checkCondition(e,t){return!t||!t.length?e:t.some(({operator:i,comparer:a})=>{if(Number.isNaN(e)||Number.isNaN(a))return!1;let r=!1;switch(i){case"=":r=e===a;break;case"!=":case"=!":r=e!==a;break;case"<":r=e":r=e>a;break;case">=":r=e>=a;break}return r})}allowAverage(){return!0}average(){return(this.faces.min+this.faces.max)/2}getRandomBetween(e,t){return Math.floor(Math.random()*(t-e+1))+e}},He=class extends M2{constructor(e,t){super("3d6",t);this.dice=e;this.lexeme=t}get doubles(){return new Set([...this.results].map(([,{usable:e,value:t}])=>e?t:0)).size<3}get result(){return this.static?Number(this.dice):[...this.results].map(([,{usable:t,value:i}])=>t?i:0).reduce((t,i)=>t+i,0)}get display(){let e=[];for(let t of this.results){if(t[0]==0&&this.doubles){e.push(`${t[1].value}S`);continue}e.push(`${t[1].value}`)}return`[${e.join(", ")}]`}allowAverage(){return!1}},B0=class extends M2{constructor(e,t){super(e,t);this.dice=e;this.lexeme=t;this.stack=[];let i=`${this.faces.max}`.split("");for(let a=0;aNumber(e.map(t=>t.result).join(""))).reduce((e,t)=>e+t)}get display(){return this.stack.map(e=>e.map(t=>t.result).join(",")).join("|")}roll(){return!this.stack||!this.stack.length?super.roll():(this.stack.forEach(e=>e.map(t=>t.roll())),[...this.stack.map(e=>e.map(t=>t.result)).flat()])}allowAverage(){return!1}},_2=class extends g4{constructor(e,t,i,a=e.data.showDice,r,o,s=e.data.displayFormulaAfter){super(e,t,i,a);this.plugin=e;this.original=t;this.lexemes=i;this.displayFixedText=!1;this.stunted="";this.shouldRender=!1;this.showFormula=!1;this.operators={"+":(e,t)=>e+t,"-":(e,t)=>e-t,"*":(e,t)=>e*t,"/":(e,t)=>e/t,"^":(e,t)=>Math.pow(e,t)};this.stack=[];this.stackCopy=[];this.dice=[];this.hasRunOnce=!1;s&&this.containerEl.createSpan({cls:"dice-roller-formula",text:`(${t})`}),this.fixedText=r,this.expectedValue=o,this.displayFixedText=this.fixedText!=="",this.loaded=!0,this.trigger("loaded")}get replacer(){return`${this.result}`}get resultText(){let e=[],t=0;return this.dice.forEach(i=>{let a=this.original.slice(t);e.push(a.slice(0,a.indexOf(i.lexeme.text)),i.display),t+=a.indexOf(i.lexeme.text)+i.lexeme.text.length+i.modifierText.length}),e.push(this.original.slice(t)),e.join("")}get tooltip(){return this._tooltip?this._tooltip:this.expectedValue===f2.Roll||this.shouldRender?this.displayFixedText?`${this.original} +${this.results.toString()}`}async roll(){let e=[...this.options];return this.results=[...Array(this.rolls)].map(()=>{let t=e[this.getRandomBetween(0,e.length-1)];return e.splice(e.indexOf(t),1),t}).filter(t=>t),this.render(),this.trigger("new-result"),this.result=this.results[0],this.results[0]}async build(){this.resultEl.empty(),this.resultEl.setText(this.results.toString())}};var k2=class{constructor(e,t={value:e,conditions:[],type:"dice"}){this.lexeme=t;this.modifiers=new Map;this.modifiersAllowed=!0;this.static=!1;this.conditions=[];this.fudge=!1;if(!/(\-?\d+)[dD]?(\d+|%|\[\d+,\s?\d+\])?/.test(e))throw new Error("Non parseable dice string passed to DiceRoll.");this.dice=e.split(" ").join(""),/^-?\d+(?:\.\d+)?$/.test(this.dice)&&(this.static=!0,this.modifiersAllowed=!1);let[,i,a=null,r=1]=this.dice.match(/(\-?\d+)[dD]\[?(?:(-?\d+)\s?,)?\s?(-?\d+|%|F)\]?/)||[,1,null,1];i=Number(i),this.multiplier=i<0?-1:1;let s=isNaN(Number(a))?null:Number(a),o;this.rolls=Math.abs(Number(i))||1,r==="%"?o=100:r==="F"?(o=1,s=-1,this.fudge=!0):o=Number(r),Number(o)<0&&!s&&(s=-1),Number(o)t?i:0).reduce((t,i)=>t+i,0)}get display(){return this.static?`${this.result}`:`[${[...this.results].map(([,{modifiers:e,display:t}])=>`${t}${[...e].join("")}`).join(", ")}]`}get modifierText(){if(!this.modifiers.size)return"";let e=[...this.conditions].map(({value:i})=>i).join(""),t=[...this.modifiers].map(([i,{conditionals:a,value:r}])=>{let s=a.map(o=>o.value);return`${r}${s.join("")}`}).join("");return`${e}${t}`}keepLow(e=1){if(!this.modifiersAllowed){new g4.Notice("Modifiers are only allowed on dice rolls.");return}[...this.results].sort((t,i)=>t[1].value-i[1].value).slice(e-this.results.size).forEach(([t])=>{let i=this.results.get(t);i.usable=!1,i.modifiers.add("d"),this.results.set(t,{...i})})}keepHigh(e=1){if(!this.modifiersAllowed){new g4.Notice("Modifiers are only allowed on dice rolls.");return}[...this.results].sort((t,i)=>i[1].value-t[1].value).slice(e).forEach(([t])=>{let i=this.results.get(t);i.usable=!1,i.modifiers.add("d"),this.results.set(t,{...i})})}reroll(e,t){if(!this.modifiersAllowed){new g4.Notice("Modifiers are only allowed on dice rolls.");return}t.length||t.push({operator:"=",comparer:this.faces.min,value:""});let i=0,a=[...this.results].filter(([,{value:r}])=>this.checkCondition(r,t));for(;ithis.checkCondition(r,t)).length>0;)i++,a.map(([,r])=>{r.modifiers.add("r"),r.value=this.getValue()});a.forEach(([r,s])=>{this.results.set(r,s)})}explodeAndCombine(e,t){if(!this.modifiersAllowed){new g4.Notice("Modifiers are only allowed on dice rolls.");return}t.length||t.push({operator:"=",comparer:this.faces.max,value:""}),[...this.results].filter(([,{value:a}])=>this.checkCondition(a,t)).forEach(([a,r])=>{let s=this.getValue(),o=0;for(r.modifiers.add("!"),r.value+=s,r.display=`${r.value}`,this.results.set(a,r);othis.checkCondition(r,t)),a=0;i.forEach(([r,s])=>{let o=s.value,c=0;for(;cthis.getValue())}getValue(){return this.multiplier*this.getRandomBetween(this.faces.min,this.faces.max)}setResults(e){this.results=new Map([...e].map((t,i)=>[i,{usable:!0,value:t,display:`${t}`,modifiers:new Set}])),this.updateResultArray()}applyModifiers(){for(let[e,t]of this.modifiers)this.applyModifier(e,t)}roll(){let e=this._roll();return this.setResults(e),this.applyModifiers(),this.conditions?.length&&this.applyConditions(),e}applyConditions(){for(let[e,t]of this.results){let i=this.conditions.find(({operator:r})=>r==="-="||r==="=-");if(i&&t.value===i.comparer){t.value=-1,t.modifiers.add("-");continue}this.checkCondition(t.value,this.conditions)?(t.modifiers.add("*"),t.value=1):t.usable=!1}}updateResultArray(){this.resultArray=[...this.results.values()].map(e=>e.value)}applyModifier(e,t){switch(e){case"sort":{let i;t.value=="sa"?i=[...this.results.values()].sort((a,r)=>a.value-r.value):i=[...this.results.values()].sort((a,r)=>r.value-a.value),this.results=new Map([...this.results.keys()].map(a=>[a,i[a]])),this.updateResultArray();break}case"kh":{this.keepHigh(t.data);break}case"kl":{this.keepLow(t.data);break}case"!":{this.explode(t.data,t.conditionals);break}case"!!":{this.explodeAndCombine(t.data,t.conditionals);break}case"r":{this.reroll(t.data,t.conditionals);break}case"u":{this.makeUnique();break}case"condition":}}makeUnique(){let e=[...this.results.values()];if(this.faces.max-this.faces.min+1i.value)).size==this.results.size)return;let t=0;for(;new Set(e.map(i=>i.value)).size!=this.results.size&&t<100;){for(let i of e){let a=e.find(r=>r.value==i.value&&r!=i);a&&(a.value=this.getValue(),a.display=`${a.value}`,a.modifiers.add("u"))}e=[...this.results.values()],t++}}checkCondition(e,t){return!t||!t.length?e:t.some(({operator:i,comparer:a})=>{if(Number.isNaN(e)||Number.isNaN(a))return!1;let r=!1;switch(i){case"=":r=e===a;break;case"!=":case"=!":r=e!==a;break;case"<":r=e":r=e>a;break;case">=":r=e>=a;break}return r})}allowAverage(){return!0}average(){return(this.faces.min+this.faces.max)/2}getRandomBetween(e,t){return Math.floor(Math.random()*(t-e+1))+e}},P4=class extends k2{constructor(e,t){super("3d6",t);this.dice=e;this.lexeme=t}get doubles(){return new Set([...this.results].map(([,{usable:e,value:t}])=>e?t:0)).size<3}get result(){return this.static?Number(this.dice):[...this.results].map(([,{usable:t,value:i}])=>t?i:0).reduce((t,i)=>t+i,0)}get display(){let e=[];for(let t of this.results){if(t[0]==0&&this.doubles){e.push(`${t[1].value}S`);continue}e.push(`${t[1].value}`)}return`[${e.join(", ")}]`}allowAverage(){return!1}},Aa=class extends k2{constructor(e,t){super(e,t);this.dice=e;this.lexeme=t;this.stack=[];let i=`${this.faces.max}`.split("");for(let a=0;aNumber(e.map(t=>t.result).join(""))).reduce((e,t)=>e+t)}get display(){return this.stack.map(e=>e.map(t=>t.result).join(",")).join("|")}roll(){return!this.stack||!this.stack.length?super.roll():(this.stack.forEach(e=>e.map(t=>t.roll())),[...this.stack.map(e=>e.map(t=>t.result)).flat()])}allowAverage(){return!1}},S2=class extends v4{constructor(e,t,i,a=e.data.showDice,r,s,o=e.data.displayFormulaAfter){super(e,t,i,a);this.plugin=e;this.original=t;this.lexemes=i;this.displayFixedText=!1;this.stunted="";this.shouldRender=!1;this.showFormula=!1;this.operators={"+":(e,t)=>e+t,"-":(e,t)=>e-t,"*":(e,t)=>e*t,"/":(e,t)=>e/t,"^":(e,t)=>Math.pow(e,t)};this.stack=[];this.stackCopy=[];this.dice=[];this.hasRunOnce=!1;o&&this.containerEl.createSpan({cls:"dice-roller-formula",text:`(${t})`}),this.fixedText=r,this.expectedValue=s,this.displayFixedText=this.fixedText!=="",this.loaded=!0,this.trigger("loaded")}get replacer(){return`${this.result}`}get resultText(){let e=[],t=0;return this.dice.forEach(i=>{let a=this.original.slice(t);e.push(a.slice(0,a.indexOf(i.lexeme.text)),i.display),t+=a.indexOf(i.lexeme.text)+i.lexeme.text.length+i.modifierText.length}),e.push(this.original.slice(t)),e.join("")}get tooltip(){return this._tooltip?this._tooltip:this.expectedValue===h2.Roll||this.shouldRender?this.displayFixedText?`${this.original} ${this.result} = ${this.resultText}`:`${this.original} -${this.resultText}`:this.expectedValue===f2.Average?this.displayFixedText?`${this.original} +${this.resultText}`:this.expectedValue===h2.Average?this.displayFixedText?`${this.original} ${this.result} = average: ${this.resultText}`:`${this.original} average: ${this.resultText}`:`${this.original} -empty`}allowAverage(){let e=t=>t.allowAverage();return this.dynamic.every(e)}async build(){if(this.expectedValue===f2.Average&&!this.shouldRender){if(this.allowAverage())for(let a of this.dynamic){let r=a.average();var e=Array(a.rolls).fill(r);a.setResults(e),this.recalculate()}else this.expectedValue=f2.Roll;this.result=Math.floor(this.result),this.setTooltip()}let t=this.result;switch(this.plugin.data.round){case pe.None:{t=Math.trunc(t*100)/100;break}case pe.Normal:{t=Math.round(t);break}case pe.Up:{t=Math.ceil(t);break}case pe.Down:{t=Math.floor(t);break}}let i;this.expectedValue===f2.None&&!this.shouldRender?(this.showDice?i=[""]:i=["\xA0"],this.showFormula&&i.unshift(this.original+" -> ")):(i=[`${t}`],this.showFormula&&i.unshift(this.inlineText)),this.expectedValue=f2.Roll,this.displayFixedText?this.resultEl.setText(this.fixedText):this.resultEl.setText(i.join("")+this.stunted)}async onClick(e){e.stopPropagation(),e.stopImmediatePropagation(),e.getModifierState("Alt")?this.expectedValue=f2.Average:e.getModifierState("Control")&&(this.expectedValue=f2.None),window.getSelection()?.isCollapsed&&await this.roll()}get dynamic(){return this.dice.filter(e=>!e.static)}get static(){return this.dice.filter(e=>e.static)}get isStatic(){return this.dice.every(e=>e.static)}rollSync(){let e=0;this.stunted="";for(let i of this.lexemes)switch(i.type){case"+":case"-":case"*":case"/":case"^":case"math":let a=this.stack.pop(),r=this.stack.pop();if(!r){i.value==="-"&&(a=new M2(`-${a.dice}`,a.lexeme)),this.stackCopy.push(i.value),this.stack.push(a);continue}a.roll(),a instanceof He&&a.doubles&&(this.stunted=` - ${a.results.get(0).value} Stunt Points`),r.roll(),r instanceof He&&r.doubles&&(this.stunted=` - ${r.results.get(0).value} Stunt Points`);let o=this.operators[i.value](r.result,a.result);this.stackCopy.push(i.value),this.stack.push(new M2(`${o}`,i));break;case"kh":{let s=this.dice[e-1],c=i.value?Number(i.value):1;s.modifiers.set("kh",{data:c,conditionals:[],value:i.text});break}case"dl":{let s=this.dice[e-1],c=i.value?Number(i.value):1;c=s.results.size-c,s.modifiers.set("kh",{data:c,conditionals:[],value:i.text});break}case"kl":{let s=this.dice[e-1],c=i.value?Number(i.value):1;s.modifiers.set("kl",{data:c,conditionals:[],value:i.text});break}case"dh":{let s=this.dice[e-1],c=i.value?Number(i.value):1;c=s.results.size-c,s.modifiers.set("kl",{data:c,conditionals:[],value:i.text});break}case"!":{let s=this.dice[e-1],c=Number(i.value)||1;s.modifiers.set("!",{data:c,conditionals:i.conditions??[],value:i.text});break}case"!!":{let s=this.dice[e-1],c=Number(i.value)||1;s.modifiers.set("!!",{data:c,conditionals:i.conditions??[],value:i.text});break}case"r":{let s=this.dice[e-1],c=Number(i.value)||1;s.modifiers.set("r",{data:c,conditionals:i.conditions??[],value:i.text});break}case"sort":{let s=this.dice[e-1],c=Number(i.value);s.modifiers.set("sort",{data:c,conditionals:i.conditions??[],value:i.value});break}case"dice":{if(i.parenedDice&&/^d/.test(i.value)&&this.stack.length){let s=this.stack.pop();i.value=`${s.result}${i.value}`,this.dice[e]=new M2(i.value,i)}this.dice[e]||(this.dice[e]=new M2(i.value,i)),this.stack.push(this.dice[e]),this.stackCopy.push(this.dice[e]),e++;break}case"stunt":{this.dice[e]||(this.dice[e]=new He(i.value,i)),this.stack.push(this.dice[e]),this.stackCopy.push(this.dice[e]),e++;break}case"%":{this.dice[e]||(this.dice[e]=new B0(i.value,i)),this.stack.push(this.dice[e]),this.stackCopy.push(this.dice[e]),e++;break}}let t=this.stack.pop();return t.roll(),t instanceof He&&t.doubles&&(this.stunted=` - ${t.results.get(0).value} Stunt Points`),this.result=t.result,this._tooltip=null,this.render(),this.trigger("new-result"),this.hasRunOnce=!0,this.result}async roll(){let e=0;this.stunted="";for(let t of this.lexemes)switch(t.type){case"+":case"-":case"*":case"/":case"^":case"math":let i=this.stack.pop(),a=this.stack.pop();if(!a){t.value==="-"&&(i=new M2(`-${i.dice}`,i.lexeme)),this.stackCopy.push(t.value),this.stack.push(i);continue}i.roll(),i instanceof He&&i.doubles&&(this.stunted=` - ${i.results.get(0).value} Stunt Points`),a.roll(),a instanceof He&&a.doubles&&(this.stunted=` - ${a.results.get(0).value} Stunt Points`);let r=this.operators[t.value](a.result,i.result);this.stackCopy.push(t.value),this.stack.push(new M2(`${r}`,t));break;case"kh":{let o=this.dice[e-1],s=t.value?Number(t.value):1;o.modifiers.set("kh",{data:s,conditionals:[],value:t.text});break}case"dl":{let o=this.dice[e-1],s=t.value?Number(t.value):1;s=o.results.size-s,o.modifiers.set("kh",{data:s,conditionals:[],value:t.text});break}case"kl":{let o=this.dice[e-1],s=t.value?Number(t.value):1;o.modifiers.set("kl",{data:s,conditionals:[],value:t.text});break}case"dh":{let o=this.dice[e-1],s=t.value?Number(t.value):1;s=o.results.size-s,o.modifiers.set("kl",{data:s,conditionals:[],value:t.text});break}case"!":{let o=this.dice[e-1],s=Number(t.value)||1;o.modifiers.set("!",{data:s,conditionals:t.conditions??[],value:t.text});break}case"!!":{let o=this.dice[e-1],s=Number(t.value)||1;o.modifiers.set("!!",{data:s,conditionals:t.conditions??[],value:t.text});break}case"r":{let o=this.dice[e-1],s=Number(t.value)||1;o.modifiers.set("r",{data:s,conditionals:t.conditions??[],value:t.text});break}case"sort":{let o=this.dice[e-1],s=Number(t.value);o.modifiers.set("sort",{data:s,conditionals:t.conditions??[],value:t.value});break}case"dice":{if(t.parenedDice&&/^d/.test(t.value)&&this.stack.length){let o=this.stack.pop();t.value=`${o.result}${t.value}`,this.dice[e]=new M2(t.value,t)}this.dice[e]||(this.dice[e]=new M2(t.value,t)),this.stack.push(this.dice[e]),this.stackCopy.push(this.dice[e]),e++;break}case"stunt":{this.dice[e]||(this.dice[e]=new He(t.value,t)),this.stack.push(this.dice[e]),this.stackCopy.push(this.dice[e]),e++;break}case"%":{this.dice[e]||(this.dice[e]=new B0(t.value,t)),this.stack.push(this.dice[e]),this.stackCopy.push(this.dice[e]),e++;break}}if(this.shouldRender&&this.hasRunOnce)await this.plugin.renderRoll(this),new x4.Notice(`${this.tooltip} +empty`}allowAverage(){let e=t=>t.allowAverage();return this.dynamic.every(e)}async build(){if(this.expectedValue===h2.Average&&!this.shouldRender){if(this.allowAverage())for(let a of this.dynamic){let r=a.average();var e=Array(a.rolls).fill(r);a.setResults(e),this.recalculate()}else this.expectedValue=h2.Roll;this.result=Math.floor(this.result),this.setTooltip()}let t=this.result;switch(this.plugin.data.round){case pe.None:{t=Math.trunc(t*100)/100;break}case pe.Normal:{t=Math.round(t);break}case pe.Up:{t=Math.ceil(t);break}case pe.Down:{t=Math.floor(t);break}}let i;this.expectedValue===h2.None&&!this.shouldRender?(this.showDice?i=[""]:i=["\xA0"],this.showFormula&&i.unshift(this.original+" -> ")):(i=[`${t}`],this.showFormula&&i.unshift(this.inlineText)),this.expectedValue=h2.Roll,this.displayFixedText?this.resultEl.setText(this.fixedText):this.resultEl.setText(i.join("")+this.stunted)}async onClick(e){e.stopPropagation(),e.stopImmediatePropagation(),e.getModifierState("Alt")?this.expectedValue=h2.Average:e.getModifierState("Control")&&(this.expectedValue=h2.None),e.getModifierState("Shift")?(await this.plugin.renderRoll(this),this.render(),this.trigger("new-result"),this.hasRunOnce=!0):window.getSelection()?.isCollapsed&&await this.roll()}get dynamic(){return this.dice.filter(e=>!e.static)}get static(){return this.dice.filter(e=>e.static)}get isStatic(){return this.dice.every(e=>e.static)}rollSync(){this.stunted="",this.parseLexemes();let e=this.stack.pop();return e.roll(),e instanceof P4&&e.doubles&&(this.stunted=` - ${e.results.get(0).value} Stunt Points`),this.result=e.result,this._tooltip=null,this.render(),this.trigger("new-result"),this.hasRunOnce=!0,this.result}async roll(e){if(this.stunted="",this.stackCopy=[],this.parseLexemes(),e||this.shouldRender&&this.hasRunOnce)await this.plugin.renderRoll(this),new g4.Notice(`${this.tooltip} -Result: ${this.result}`);else{let t=this.stack.pop();t.roll(),t instanceof He&&t.doubles&&(this.stunted=` - ${t.results.get(0).value} Stunt Points`),this.result=t.result,this._tooltip=null}return this.render(),this.trigger("new-result"),this.hasRunOnce=!0,this.result}recalculate(){let e=[],t=0;for(let i of this.stackCopy)if(typeof i=="string"){let a=e.pop(),r=e.pop();if(!r){i==="-"&&(a=new M2(`-${a.result}`,a.lexeme)),e.push(a);continue}let o=this.operators[i](r.result,a.result);e.push(new M2(`${o}`))}else e.push(i),i instanceof M2&&i.applyModifiers();e.length&&e[0]instanceof M2&&(e[0].applyModifiers(),t+=e[0].result),this.result=t}toResult(){return{type:"dice",result:this.result,tooltip:this.tooltip}}async applyResult(e){e.type==="dice"&&(e.result&&(this.result=e.result),e.tooltip&&(this._tooltip=e.tooltip),await this.render())}setResult(e){}};var s2=S2(require("obsidian"));function Fc(n){let e="",t="abcdefghijklmnopqrstuvwxyz0123456789",i=t.length;for(let a=0;a{s.stopPropagation(),navigator.clipboard.writeText(this.displayFromCache(...this.results).trim()).then(async()=>{new s2.Notice("Result copied to clipboard.")})}),(0,s2.setIcon)(this.copy,Te)}get replacer(){let e=this.getBlockId(this.result);return e?`![[${this.path}#^${e}]]`:""}get tooltip(){return`${this.original} -${this.path}`}async build(){if(this.resultEl.empty(),this.plugin.data.displayResultsInline&&this.inline&&this.resultEl.createSpan({text:this.inlineText}),!this.results||!this.results.length){this.resultEl.createDiv({cls:"dice-no-results",text:"No results."});return}this.plugin.data.copyContentButton&&this.copy.removeClass("no-show");for(let e of this.results){this.resultEl.onclick=async i=>{if(i&&i.getModifierState("Control")||i.getModifierState("Meta")){i.stopPropagation();return}};let t=this.resultEl.createDiv({cls:"markdown-embed"});if(!this.plugin.data.displayResultsInline){let i="type"in e?e.type:"List Item";t.setAttrs({"aria-label":`${this.file.basename}: ${i}`})}if(!e){t.createDiv({cls:"dice-no-results",text:"No results."});continue}if(s2.MarkdownRenderer.renderMarkdown(this.displayFromCache(e),t.createDiv(),this.source,null),this.plugin.data.copyContentButton&&this.results.length>1){let i=t.createDiv({cls:"dice-content-copy dice-roller-button",attr:{"aria-label":"Copy Contents"}});i.addEventListener("click",a=>{a.stopPropagation(),navigator.clipboard.writeText(this.displayFromCache(e).trim()).then(async()=>{new s2.Notice("Result copied to clipboard.")})}),(0,s2.setIcon)(i,Te)}}}async load(){await this.getOptions()}displayFromCache(...e){let t=[];for(let i of e)t.push(this.content.slice(i.position.start.offset,i.position.end.offset));return t.join(` +Result: ${this.result}`);else{let t=this.stack.pop();t.roll(),t instanceof P4&&t.doubles&&(this.stunted=` - ${t.results.get(0).value} Stunt Points`),this.result=t.result,this._tooltip=null}return this.render(),this.trigger("new-result"),this.hasRunOnce=!0,this.result}parseLexemes(){let e=0;for(let t of this.lexemes)switch(t.type){case"+":case"-":case"*":case"/":case"^":case"math":let i=this.stack.pop(),a=this.stack.pop();if(!a){t.value==="-"&&(i=new k2(`-${i.dice}`,i.lexeme)),this.stackCopy.push(t.value),this.stack.push(i);continue}i.roll(),i instanceof P4&&i.doubles&&(this.stunted=` - ${i.results.get(0).value} Stunt Points`),a.roll(),a instanceof P4&&a.doubles&&(this.stunted=` - ${a.results.get(0).value} Stunt Points`);let r=this.operators[t.value](a.result,i.result);this.stackCopy.push(t.value),this.stack.push(new k2(`${r}`,t));break;case"u":{let s=this.dice[e-1],o=t.value?Number(t.value):1;s.modifiers.set("u",{data:o,conditionals:[],value:t.text});break}case"kh":{let s=this.dice[e-1],o=t.value?Number(t.value):1;s.modifiers.set("kh",{data:o,conditionals:[],value:t.text});break}case"dl":{let s=this.dice[e-1],o=t.value?Number(t.value):1;o=s.results.size-o,s.modifiers.set("kh",{data:o,conditionals:[],value:t.text});break}case"kl":{let s=this.dice[e-1],o=t.value?Number(t.value):1;s.modifiers.set("kl",{data:o,conditionals:[],value:t.text});break}case"dh":{let s=this.dice[e-1],o=t.value?Number(t.value):1;o=s.results.size-o,s.modifiers.set("kl",{data:o,conditionals:[],value:t.text});break}case"!":{let s=this.dice[e-1],o=Number(t.value)||1;s.modifiers.set("!",{data:o,conditionals:t.conditions??[],value:t.text});break}case"!!":{let s=this.dice[e-1],o=Number(t.value)||1;s.modifiers.set("!!",{data:o,conditionals:t.conditions??[],value:t.text});break}case"r":{let s=this.dice[e-1],o=Number(t.value)||1;s.modifiers.set("r",{data:o,conditionals:t.conditions??[],value:t.text});break}case"sort":{let s=this.dice[e-1],o=Number(t.value);s.modifiers.set("sort",{data:o,conditionals:t.conditions??[],value:t.value});break}case"dice":{if(t.parenedDice&&/^d/.test(t.value)&&this.stack.length){let s=this.stack.pop();t.value=`${s.result}${t.value}`,this.dice[e]=new k2(t.value,t)}this.dice[e]||(this.dice[e]=new k2(t.value,t)),this.stack.push(this.dice[e]),this.stackCopy.push(this.dice[e]),e++;break}case"stunt":{this.dice[e]||(this.dice[e]=new P4(t.value,t)),this.stack.push(this.dice[e]),this.stackCopy.push(this.dice[e]),e++;break}case"%":{this.dice[e]||(this.dice[e]=new Aa(t.value,t)),this.stack.push(this.dice[e]),this.stackCopy.push(this.dice[e]),e++;break}}}recalculate(){let e=[],t=0;if(!this.stackCopy.length)return this.roll();for(let i of this.stackCopy)if(typeof i=="string"){let a=e.pop(),r=e.pop();if(!r){i==="-"&&(a=new k2(`-${a.result}`,a.lexeme)),e.push(a);continue}let s=this.operators[i](r.result,a.result);e.push(new k2(`${s}`))}else e.push(i),i instanceof k2&&this.stackCopy.indexOf(i)!=this.stackCopy.length-1&&i.applyModifiers();e.length&&e[0]instanceof k2&&(e[0].applyModifiers(),t+=e[0].result),this.result=t,this.stackCopy=[]}toResult(){return{type:"dice",result:this.result,tooltip:this.tooltip}}async applyResult(e){e.type==="dice"&&(e.result&&(this.result=e.result),e.tooltip&&(this._tooltip=e.tooltip),await this.render())}setResult(e){}};var x2=w2(require("obsidian"));function Bc(n){let e="",t="abcdefghijklmnopqrstuvwxyz0123456789",i=t.length;for(let a=0;a{o.stopPropagation(),navigator.clipboard.writeText(this.results.join(` +`)).then(async()=>{new x2.Notice("Result copied to clipboard.")})}),(0,x2.setIcon)(this.copy,Ke)}getEmbedClass(){return this.plugin.data.displayAsEmbed?"markdown-embed":""}},Ct=class extends P0{constructor(e,t,i,a,r=!0,s=e.data.showDice){super(e,t,i,a,s);this.plugin=e;this.original=t;this.lexeme=i;this.inline=r}get replacer(){let e=this.getBlockId(this.result);return e?`![[${this.path}#^${e}]]`:""}get tooltip(){return`${this.original} +${this.path}`}async build(){if(this.resultEl.empty(),this.plugin.data.displayResultsInline&&this.inline&&this.resultEl.createSpan({text:this.inlineText}),!this.results||!this.results.length){this.resultEl.createDiv({cls:"dice-no-results",text:"No results."});return}this.plugin.data.copyContentButton&&this.copy.removeClass("no-show");for(let e of this.results){this.resultEl.onclick=async i=>{if(i&&i.getModifierState("Control")||i.getModifierState("Meta")){i.stopPropagation();return}};let t=this.resultEl.createDiv({cls:this.getEmbedClass()});if(!this.plugin.data.displayResultsInline){let i="type"in e?e.type:"List Item";t.setAttrs({"aria-label":`${this.file.basename}: ${i}`})}if(!e){t.createDiv({cls:"dice-no-results",text:"No results."});continue}if(x2.MarkdownRenderer.renderMarkdown(this.displayFromCache(e),t.createDiv(),this.source,null),this.plugin.data.copyContentButton&&this.results.length>1){let i=t.createDiv({cls:"dice-content-copy dice-roller-button",attr:{"aria-label":"Copy Contents"}});i.addEventListener("click",a=>{a.stopPropagation(),navigator.clipboard.writeText(this.displayFromCache(e).trim()).then(async()=>{new x2.Notice("Result copied to clipboard.")})}),(0,x2.setIcon)(i,Ke)}}}async load(){await this.getOptions()}displayFromCache(...e){let t=[];for(let i of e)t.push(this.content.slice(i.position.start.offset,i.position.end.offset));return t.join(` -`)}getBlockId(e){let t=this.cache.blocks??{},i=Object.entries(t).find(([a,r])=>Aa(r.position,e.position));if(!i){let a=`${Bc(4)}`,r=`${this.content.slice(0,this.result.position.end.offset+1)}^${a}${this.content.slice(this.result.position.end.offset)}`;return this.watch=!1,this.plugin.app.vault.modify(this.file,r),a}return i[0]}getPath(){let{groups:e}=this.lexeme.value.match(N0),{roll:t=1,link:i,types:a}=e;if(!i)throw new Error("Could not parse link.");this.rolls=(t&&!isNaN(Number(t))&&Number(t))??1,this.path=decodeURIComponent(i.replace(/(\[|\]|\(|\))/g,"")),this.types=a?.split(","),this.levels=a?.split(",").map(r=>/heading\-\d+/.test(r)?r.split("-").pop():null).filter(r=>r),this.types=a?.split(",").map(r=>/heading\-\d+/.test(r)?r.split("-").shift():r)}async getOptions(){if(this.cache=this.plugin.app.metadataCache.getFileCache(this.file),!this.cache||!this.cache.sections)throw new Error("Could not read file cache.");this.content=await this.plugin.app.vault.cachedRead(this.file),this.options=this.cache.sections.filter(({type:e,position:t})=>this.types?e=="heading"&&this.types.includes(e)&&this.levels.length?(this.cache.headings??[]).filter(({level:a})=>this.levels.includes(`${a}`)).some(({position:a})=>Aa(a,t)):this.types.includes(e):!["yaml","thematicBreak"].includes(e)),this.types&&this.types.includes("listItem")&&this.options.push(...this.cache.listItems),this.loaded=!0,this.trigger("loaded")}async roll(){return new Promise((e,t)=>{if(!this.loaded)this.on("loaded",()=>{let i=[...this.options];this.results=[...Array(this.rolls)].map(()=>{let a=i[this.getRandomBetween(0,i.length-1)];return i.splice(i.indexOf(a),1),a}).filter(a=>a),this.render(),this.trigger("new-result"),this.result=this.results[0],e(this.results[0])});else{let i=[...this.options];this.results=[...Array(this.rolls)].map(()=>{let a=i[this.getRandomBetween(0,i.length-1)];return i.splice(i.indexOf(a),1),a}).filter(a=>a),this.render(),this.trigger("new-result"),this.result=this.results[0],e(this.results[0])}})}toResult(){return{type:"section",result:this.results}}async applyResult(e){e.type==="section"&&(e.result&&(this.results=e.result),await this.render())}},o6=class extends g4{constructor(e,t,i,a,r=e.data.showDice){super(e,t,[i],r);this.plugin=e;this.original=t;this.lexeme=i;this.source=a;this.loaded=!1;if(!this.plugin.canUseDataview)throw new s2.Notice("A tag can only be rolled with the Dataview plugin enabled."),new Error("A tag can only be rolled with the Dataview plugin enabled.");this.containerEl.addClasses(["has-embed","markdown-embed"]);let{roll:o=1,tag:s,collapse:c,types:l}=i.value.match(V0).groups;this.collapse=c==="-"?!0:c==="+"?!1:!this.plugin.data.returnAllTags,this.tag=`#${s}`,this.rolls=Number(o),this.types=l,this.getFiles()}get replacer(){return this.result.replacer}get typeText(){return this.types?.length?`|${this.types}`:""}async getFiles(){if(!this.plugin.dataviewAPI){new s2.Notice("Dice Roller: Dataview must be installed and enabled to use tag rollers.");return}await this.plugin.dataviewReady();let e=await this.plugin.dataviewAPI.query(`list from ${this.tag}`);if(!e.successful)throw new Error(`No files found with that tag. Is the tag correct? +`)}getBlockId(e){let t=this.cache.blocks??{},i=Object.entries(t).find(([a,r])=>wa(r.position,e.position));if(!i){let a=`${Pc(4)}`,r=`${this.content.slice(0,this.result.position.end.offset+1)}^${a}${this.content.slice(this.result.position.end.offset)}`;return this.watch=!1,this.plugin.app.vault.modify(this.file,r),a}return i[0]}getPath(){let{groups:e}=this.lexeme.value.match(R0),{roll:t=1,link:i,types:a}=e;if(!i)throw new Error("Could not parse link.");this.rolls=(t&&!isNaN(Number(t))&&Number(t))??1,this.path=decodeURIComponent(i.replace(/(\[|\]|\(|\))/g,"")),this.types=a?.split(","),this.levels=a?.split(",").map(r=>/heading\-\d+/.test(r)?r.split("-").pop():null).filter(r=>r),this.types=a?.split(",").map(r=>/heading\-\d+/.test(r)?r.split("-").shift():r)}async getOptions(){if(this.cache=this.plugin.app.metadataCache.getFileCache(this.file),!this.cache||!this.cache.sections)throw new Error("Could not read file cache.");this.content=await this.plugin.app.vault.cachedRead(this.file),this.options=this.cache.sections.filter(({type:e,position:t})=>this.types?e=="heading"&&this.types.includes(e)&&this.levels.length?(this.cache.headings??[]).filter(({level:a})=>this.levels.includes(`${a}`)).some(({position:a})=>wa(a,t)):this.types.includes(e):!["yaml","thematicBreak"].includes(e)),this.types&&this.types.includes("listItem")&&this.options.push(...this.cache.listItems),this.loaded=!0,this.trigger("loaded")}async roll(){return new Promise((e,t)=>{if(!this.loaded)this.on("loaded",()=>{let i=[...this.options];this.results=[...Array(this.rolls)].map(()=>{let a=i[this.getRandomBetween(0,i.length-1)];return i.splice(i.indexOf(a),1),a}).filter(a=>a),this.render(),this.trigger("new-result"),this.result=this.results[0],e(this.results[0])});else{let i=[...this.options];this.results=[...Array(this.rolls)].map(()=>{let a=i[this.getRandomBetween(0,i.length-1)];return i.splice(i.indexOf(a),1),a}).filter(a=>a),this.render(),this.trigger("new-result"),this.result=this.results[0],e(this.results[0])}})}toResult(){return{type:"section",result:this.results}}async applyResult(e){e.type==="section"&&(e.result&&(this.results=e.result),await this.render())}},c6=class extends v4{constructor(e,t,i,a,r=e.data.showDice){super(e,t,[i],r);this.plugin=e;this.original=t;this.lexeme=i;this.source=a;this.loaded=!1;if(!this.plugin.canUseDataview)throw new x2.Notice("A tag can only be rolled with the Dataview plugin enabled."),new Error("A tag can only be rolled with the Dataview plugin enabled.");e.data.displayAsEmbed&&this.containerEl.addClasses(["has-embed","markdown-embed"]);let{roll:s=1,tag:o,collapse:c,types:l}=i.value.match(N0).groups;this.collapse=c==="-"?!0:c==="+"?!1:!this.plugin.data.returnAllTags,this.tag=`#${o}`,this.rolls=Number(s),this.types=l,this.getFiles()}get replacer(){return this.result.replacer}get typeText(){return this.types?.length?`|${this.types}`:""}async getFiles(){if(!this.plugin.dataviewAPI){new x2.Notice("Dice Roller: Dataview must be installed and enabled to use tag rollers.");return}await this.plugin.dataviewReady();let e=await this.plugin.dataviewAPI.query(`list from ${this.tag}`);if(!e.successful)throw new Error(`No files found with that tag. Is the tag correct? `+this.tag);let t=new Set(e.value.values.reduce((a,r)=>(r.type=="file"&&a.push(r.path),a),[]));if(t&&t.delete(this.source),!t||!t.size)throw new Error(`No files found with that tag. Is the tag correct? -`+this.tag);let i=Array.from(t).map(a=>`${this.rolls}d[[${a}]]${this.typeText}`);this.results=i.map(a=>new Ct(this.plugin,a,{...this.lexeme,value:a,type:"section"},this.source,!1)),this.loaded=!0,this.trigger("loaded")}async build(){if(this.resultEl.empty(),this.plugin.data.displayResultsInline&&this.resultEl.createSpan({text:this.inlineText}),this.collapse){this.chosen=this.random??this.getRandomBetween(0,this.results.length-1);let e=this.results[this.chosen];this.random=null;let t=this.resultEl.createDiv();t.createEl("h5",{cls:"dice-file-name",text:e.file.basename}),t.appendChild(e.containerEl)}else for(let e of this.results){let t=this.resultEl.createDiv();t.createEl("h5",{cls:"dice-file-name",text:e.file.basename}),t.appendChild(e.containerEl)}}async roll(){return new Promise((e,t)=>{this.loaded?(this.results.forEach(async i=>await i.roll()),this.render(),this.trigger("new-result"),this.result=this.results[0],e(this.result)):this.on("loaded",()=>{this.results.forEach(async i=>await i.roll()),this.render(),this.trigger("new-result"),this.result=this.results[0],e(this.result)})})}get tooltip(){return this.original}toResult(){return{type:"tag",random:this.chosen,result:Object.fromEntries(this.results.map(e=>[e.path,e.toResult()]))}}async applyResult(e){if(e.type==="tag"){if(e.result)for(let t in e.result){let i=this.results.find(a=>a.path===t);!i||i.applyResult(e.result[t])}e.random&&(this.random=e.random),await this.render()}}},c6=class extends g4{constructor(e,t,i,a,r=e.data.showDice){super(e,t,[i],r);this.plugin=e;this.original=t;this.lexeme=i;this.source=a;let{roll:o=1,tag:s}=i.value.match(V0).groups;this.tag=`#${s}`,this.rolls=(o&&!isNaN(Number(o))&&Number(o))??1,this.getFiles()}get replacer(){return`[[${this.result.basename}]]`}get tooltip(){return`${this.original} -${this.result.basename}`}async roll(){return new Promise((e,t)=>{this.loaded?(this.result=this.links[this.getRandomBetween(0,this.links.length-1)],this.render(),this.trigger("new-result"),e(this.result)):this.on("loaded",()=>{this.result=this.links[this.getRandomBetween(0,this.links.length-1)],this.render(),this.trigger("new-result"),e(this.result)})})}async build(){this.resultEl.empty(),this.plugin.data.displayResultsInline&&this.resultEl.createSpan({text:this.inlineText});let e=this.resultEl.createEl("a",{cls:"internal-link",text:this.result.basename});e.onclick=async t=>{t.stopPropagation(),this.plugin.app.workspace.openLinkText(this.result.path,this.plugin.app.workspace.getActiveFile()?.path,t.getModifierState("Control"))},e.onmouseenter=async t=>{this.plugin.app.workspace.trigger("link-hover",this,e,this.result.path,this.plugin.app.workspace.getActiveFile()?.path)}}async getFiles(){if(!this.plugin.dataviewAPI){new s2.Notice("Dice Roller: Dataview must be installed and enabled to use tag rollers.");return}await this.plugin.dataviewReady();let e=await this.plugin.dataviewAPI.query(`list from ${this.tag}`);if(!e.successful)throw new Error(`No files found with that tag. Is the tag correct? +`+this.tag);let i=Array.from(t).map(a=>`${this.rolls}d[[${a}]]${this.typeText}`);this.results=i.map(a=>new Ct(this.plugin,a,{...this.lexeme,value:a,type:"section"},this.source,!1)),this.loaded=!0,this.trigger("loaded")}async build(){if(this.resultEl.empty(),this.plugin.data.displayResultsInline&&this.resultEl.createSpan({text:this.inlineText}),this.collapse){this.chosen=this.random??this.getRandomBetween(0,this.results.length-1);let e=this.results[this.chosen];this.random=null;let t=this.resultEl.createDiv();t.createEl("h5",{cls:"dice-file-name",text:e.file.basename}),t.appendChild(e.containerEl)}else for(let e of this.results){let t=this.resultEl.createDiv();t.createEl("h5",{cls:"dice-file-name",text:e.file.basename}),t.appendChild(e.containerEl)}}async roll(){return new Promise((e,t)=>{this.loaded?(this.results.forEach(async i=>await i.roll()),this.render(),this.trigger("new-result"),this.result=this.results[0],e(this.result)):this.on("loaded",()=>{this.results.forEach(async i=>await i.roll()),this.render(),this.trigger("new-result"),this.result=this.results[0],e(this.result)})})}get tooltip(){return this.original}toResult(){return{type:"tag",random:this.chosen,result:Object.fromEntries(this.results.map(e=>[e.path,e.toResult()]))}}async applyResult(e){if(e.type==="tag"){if(e.result)for(let t in e.result){let i=this.results.find(a=>a.path===t);!i||i.applyResult(e.result[t])}e.random&&(this.random=e.random),await this.render()}}},l6=class extends v4{constructor(e,t,i,a,r=e.data.showDice){super(e,t,[i],r);this.plugin=e;this.original=t;this.lexeme=i;this.source=a;let{roll:s=1,tag:o}=i.value.match(N0).groups;this.tag=`#${o}`,this.rolls=(s&&!isNaN(Number(s))&&Number(s))??1,this.getFiles()}get replacer(){return`[[${this.result.basename}]]`}get tooltip(){return`${this.original} +${this.result.basename}`}async roll(){return new Promise((e,t)=>{this.loaded?(this.result=this.links[this.getRandomBetween(0,this.links.length-1)],this.render(),this.trigger("new-result"),e(this.result)):this.on("loaded",()=>{this.result=this.links[this.getRandomBetween(0,this.links.length-1)],this.render(),this.trigger("new-result"),e(this.result)})})}async build(){this.resultEl.empty(),this.plugin.data.displayResultsInline&&this.resultEl.createSpan({text:this.inlineText});let e=this.resultEl.createEl("a",{cls:"internal-link",text:this.result.basename});e.onclick=async t=>{t.stopPropagation(),this.plugin.app.workspace.openLinkText(this.result.path,this.plugin.app.workspace.getActiveFile()?.path,t.getModifierState("Control"))},e.onmouseenter=async t=>{this.plugin.app.workspace.trigger("link-hover",this,e,this.result.path,this.plugin.app.workspace.getActiveFile()?.path)}}async getFiles(){if(!this.plugin.dataviewAPI){new x2.Notice("Dice Roller: Dataview must be installed and enabled to use tag rollers.");return}await this.plugin.dataviewReady();let e=await this.plugin.dataviewAPI.query(`list from ${this.tag}`);if(!e.successful)throw new Error(`No files found with that tag. Is the tag correct? `+this.tag);let t=new Set(e.value.values.reduce((i,a)=>(a.type=="file"&&i.push(a.path),i),[]));if(t&&t.delete(this.source),!t||!t.size)throw new Error(`No files found with that tag. Is the tag correct? -`+this.tag);this.links=Array.from(t).map(i=>this.plugin.app.metadataCache.getFirstLinkpathDest(i,this.source)),this.loaded=!0,this.trigger("loaded")}toResult(){return{type:"link",result:this.result.path}}async applyResult(e){if(e.type==="link"){if(e.result){let t=this.plugin.app.vault.getAbstractFileByPath(e.result);t&&t instanceof s2.TFile&&(this.result=t)}await this.render()}}},l6=class extends I4{constructor(e,t,i,a,r=!0,o=e.data.showDice){super(e,t,i,a,o);this.plugin=e;this.original=t;this.lexeme=i;this.inline=r;this.containerEl.addClasses(["has-embed","markdown-embed"]),this.resultEl.addClass("internal-embed"),this.resultEl.setAttrs({src:a}),this.copy=this.containerEl.createDiv({cls:"dice-content-copy dice-roller-button no-show",attr:{"aria-label":"Copy Contents"}}),this.copy.addEventListener("click",s=>{s.stopPropagation(),navigator.clipboard.writeText(this.results.join(` -`)).then(async()=>{new s2.Notice("Result copied to clipboard.")})}),(0,s2.setIcon)(this.copy,Te)}get replacer(){return this.result}get tooltip(){return`${this.original} -${this.path}`}async build(){if(this.resultEl.empty(),this.plugin.data.displayResultsInline&&this.inline&&this.resultEl.createSpan({text:this.inlineText}),!this.results||!this.results.length){this.resultEl.createDiv({cls:"dice-no-results",text:"No results."});return}this.plugin.data.copyContentButton&&this.copy.removeClass("no-show");for(let e of this.results){this.resultEl.onclick=async i=>{if(i&&i.getModifierState("Control")||i.getModifierState("Meta")){i.stopPropagation();return}};let t=this.resultEl.createDiv({cls:"markdown-embed"});if(!e){t.createDiv({cls:"dice-no-results",text:"No results."});continue}if(s2.MarkdownRenderer.renderMarkdown(e,t.createDiv(),this.source,null),this.plugin.data.copyContentButton&&this.results.length>1){let i=t.createDiv({cls:"dice-content-copy dice-roller-button",attr:{"aria-label":"Copy Contents"}});i.addEventListener("click",a=>{a.stopPropagation(),navigator.clipboard.writeText(e).then(async()=>{new s2.Notice("Result copied to clipboard.")})}),(0,s2.setIcon)(i,Te)}}}async load(){await this.getOptions()}getPath(){let{groups:e}=this.lexeme.value.match(N0),{roll:t=1,link:i,types:a}=e;if(!i)throw new Error("Could not parse link.");this.rolls=(t&&!isNaN(Number(t))&&Number(t))??1,this.path=i.replace(/(\[|\])/g,""),this.types=a?.split(",")}async getOptions(){if(this.content=await this.plugin.app.vault.cachedRead(this.file),!this.content)throw new Error("Could not read file cache.");this.options=this.content.trim().split(` -`).map(e=>e.trim()).filter(e=>e&&e.length),this.loaded=!0,this.trigger("loaded")}async roll(){return new Promise((e,t)=>{if(!this.loaded)this.on("loaded",()=>{let i=[...this.options];this.results=[...Array(this.rolls)].map(()=>{let a=i[this.getRandomBetween(0,i.length-1)];return i.splice(i.indexOf(a),1),a}).filter(a=>a),this.render(),this.trigger("new-result"),e(this.results[0])});else{let i=[...this.options];this.results=[...Array(this.rolls)].map(()=>{let a=i[this.getRandomBetween(0,i.length-1)];return i.splice(i.indexOf(a),1),a}).filter(a=>a),this.render(),this.trigger("new-result"),e(this.results[0])}})}toResult(){return{type:"section",result:this.results}}async applyResult(e){e.type==="section"&&(e.result&&(this.results=e.result),await this.render())}},Aa=(n,e)=>n.start.col==e.start.col&&n.start.line==e.start.line&&n.start.offset==e.start.offset;var M4=S2(require("obsidian"));var wa=class{constructor(){this.result="";this.combinedTooltip=""}},k4=class extends I4{constructor(){super(...arguments);this.combinedTooltip="";this.prettyTooltip=""}getPath(){let{groups:e}=this.lexeme.value.match(ya),{diceRoll:t="1",link:i,block:a,header:r}=e;if(!i||!a)throw new Error("Could not parse link.");let o=t.match(/(\d*?)[Dd]$/);if(o){let[,s="1"]=o;this.rollsFormula=s}else this.rollsFormula=t;this.rolls=1,this.path=decodeURIComponent(i.replace(/(\[|\]|\(|\))/g,"")),this.block=a.replace(/(\^|#)/g,"").trim().toLowerCase(),this.header=r}get tooltip(){return this.prettyTooltip}get replacer(){return this.result}async build(){this.resultEl.empty();let e=[this.result];this.plugin.data.displayResultsInline&&e.unshift(this.inlineText);let t=createSpan();await M4.MarkdownRenderer.renderMarkdown(e.join(""),t,this.source,null);let i=this.resultEl.createSpan("embedded-table-result");t.childElementCount==1&&t.firstElementChild instanceof HTMLParagraphElement?i.append(...Array.from(t.firstElementChild.childNodes)):i.append(...Array.from(t.childNodes))}prettify(e){let t=/(.*?)(\(|\)|;|\|\|)(.*)/,i=" ",a=0,r="",o=e,s;for(;s=o.match(t);){let[,c,l,u]=s;r+=c,l==")"?(a--,r+=` +`+this.tag);this.links=Array.from(t).map(i=>this.plugin.app.metadataCache.getFirstLinkpathDest(i,this.source)),this.loaded=!0,this.trigger("loaded")}toResult(){return{type:"link",result:this.result.path}}async applyResult(e){if(e.type==="link"){if(e.result){let t=this.plugin.app.vault.getAbstractFileByPath(e.result);t&&t instanceof x2.TFile&&(this.result=t)}await this.render()}}},u6=class extends P0{constructor(e,t,i,a,r=!0,s=e.data.showDice){super(e,t,i,a,s);this.plugin=e;this.original=t;this.lexeme=i}get replacer(){return this.result}get tooltip(){return`${this.original} +${this.path}`}async build(){if(this.resultEl.empty(),this.plugin.data.displayResultsInline&&this.inline&&this.resultEl.createSpan({text:this.inlineText}),!this.results||!this.results.length){this.resultEl.createDiv({cls:"dice-no-results",text:"No results."});return}this.plugin.data.copyContentButton&&this.copy.removeClass("no-show");for(let e of this.results){this.resultEl.onclick=async i=>{if(i&&i.getModifierState("Control")||i.getModifierState("Meta")){i.stopPropagation();return}};let t=this.resultEl.createDiv({cls:this.getEmbedClass()});if(!e){t.createDiv({cls:"dice-no-results",text:"No results."});continue}if(x2.MarkdownRenderer.renderMarkdown(e,t.createDiv(),this.source,null),this.plugin.data.copyContentButton&&this.results.length>1){let i=t.createDiv({cls:"dice-content-copy dice-roller-button",attr:{"aria-label":"Copy Contents"}});i.addEventListener("click",a=>{a.stopPropagation(),navigator.clipboard.writeText(e).then(async()=>{new x2.Notice("Result copied to clipboard.")})}),(0,x2.setIcon)(i,Ke)}}}async load(){await this.getOptions()}getPath(){let{groups:e}=this.lexeme.value.match(R0),{roll:t=1,link:i,types:a}=e;if(!i)throw new Error("Could not parse link.");this.rolls=(t&&!isNaN(Number(t))&&Number(t))??1,this.path=i.replace(/(\[|\])/g,""),this.types=a?.split(",")}async getOptions(){if(this.content=await this.plugin.app.vault.cachedRead(this.file),!this.content)throw new Error("Could not read file cache.");this.options=this.content.trim().split(` +`).map(e=>e.trim()).filter(e=>e&&e.length),this.loaded=!0,this.trigger("loaded")}async roll(){return new Promise((e,t)=>{if(!this.loaded)this.on("loaded",()=>{let i=[...this.options];this.results=[...Array(this.rolls)].map(()=>{let a=i[this.getRandomBetween(0,i.length-1)];return i.splice(i.indexOf(a),1),a}).filter(a=>a),this.render(),this.trigger("new-result"),e(this.results[0])});else{let i=[...this.options];this.results=[...Array(this.rolls)].map(()=>{let a=i[this.getRandomBetween(0,i.length-1)];return i.splice(i.indexOf(a),1),a}).filter(a=>a),this.render(),this.trigger("new-result"),e(this.results[0])}})}toResult(){return{type:"section",result:this.results}}async applyResult(e){e.type==="section"&&(e.result&&(this.results=e.result),await this.render())}},wa=(n,e)=>n.start.col==e.start.col&&n.start.line==e.start.line&&n.start.offset==e.start.offset;var x4=w2(require("obsidian"));var Sa=class{constructor(){this.result="";this.combinedTooltip=""}},I4=class extends yt{constructor(){super(...arguments);this.combinedTooltip="";this.prettyTooltip=""}getPath(){let{groups:e}=this.lexeme.value.match(Ca),{diceRoll:t="1",link:i,block:a,header:r}=e;if(!i||!a)throw new Error("Could not parse link.");let s=t.match(/(\d*?)[Dd]$/);if(s){let[,o="1"]=s;this.rollsFormula=o}else this.rollsFormula=t;this.rolls=1,this.path=decodeURIComponent(i.replace(/(\[|\]|\(|\))/g,"")),this.block=a.replace(/(\^|#)/g,"").trim().toLowerCase(),this.header=r}get tooltip(){return this.prettyTooltip}get replacer(){return this.result}async build(){this.resultEl.empty();let e=[this.result];this.plugin.data.displayResultsInline&&e.unshift(this.inlineText);let t=createSpan();await x4.MarkdownRenderer.renderMarkdown(e.join(""),t,this.source,null);let i=this.resultEl.createSpan("embedded-table-result");t.childElementCount==1&&t.firstElementChild instanceof HTMLParagraphElement?i.append(...Array.from(t.firstElementChild.childNodes)):i.append(...Array.from(t.childNodes))}prettify(e){let t=/(.*?)(\(|\)|;|\|\|)(.*)/,i=" ",a=0,r="",s=e,o;for(;o=s.match(t);){let[,c,l,u]=o;r+=c,l==")"?(a--,r+=` `,r+=i.repeat(a),r+=")"):(l=="("?(a++,r+="("):l==";"?r+=",":l=="||"&&(r+="|"),r+=` -`,r+=i.repeat(a)),o=u}return r+=o,r}async getSubResult(e){let t=new wa;typeof e=="number"?t.result=e.toString():t.result=e;let i=[];if(typeof e=="string"){let a=/(?:\`dice:)(.*?)(?:\`)/g,r=e.matchAll(a);for(let o of r){let s=o[1].trim(),c=await this.plugin.getRoller(s,this.source);await c.roll();let l=await this.getSubResult(c.result),u;if(l.result instanceof M4.TFile?u=l.result.basename:u=l.result,t.result=t.result.replace(o[0],u),c instanceof k4)i.push(c.combinedTooltip);else{let[f,h]=c.tooltip.split(` -`);i.push(f+" --> "+h)}}}return t.combinedTooltip=i.join(";"),t}async getResult(){let e=[],t=[],i=this.original;if(this.rollsFormula)try{let a=await this.plugin.getRoller(this.rollsFormula,this.source);if(!(a instanceof _2))return this.prettyTooltip="TableRoller only supports dice rolls to select multiple elements.",new M4.Notice(this.prettyTooltip),"ERROR";let r=a;await r.roll(),this.rolls=r.result,r.isStatic||(i=i.replace(this.rollsFormula,`${this.rollsFormula.trim()} --> ${r.resultText} > `))}catch{return this.prettyTooltip=`TableRoller: '${this.rollsFormula}' is not a valid dice roll.`,new M4.Notice(this.prettyTooltip),"ERROR"}for(let a=0;au[1]===void 0&&c===u[0]||c>=u[0]&&u[1]>=c);l&&(r=this.lookupRoller.original.trim()+" --> "+`${this.lookupRoller.resultText}${this.header?" | "+this.header:""}`.trim(),s=l[1])}else{let c=[...this.options],l=this.getRandomBetween(0,c.length-1);r=c.length+" rows --> [row "+(l+1)+"]",s=c[l]}o=await this.getSubResult(s),e.push(o.result),o.combinedTooltip&&(r+=" > ("+o.combinedTooltip+")"),t.push(r)}return t.length==0?this.combinedTooltip=i:t.length==1?this.combinedTooltip=i+" "+t.join(""):this.combinedTooltip=i+" ==> ("+t.join(" ||")+")",this.prettyTooltip=this.prettify(this.combinedTooltip),e.join("||")}async roll(){return new Promise(async e=>{this.loaded?(this.result=await this.getResult(),this.render(),this.trigger("new-result"),e(this.result)):this.on("loaded",async()=>{this.result=await this.getResult(),this.render(),this.trigger("new-result"),e(this.result)})})}async load(){await this.getOptions()}async getOptions(){if(this.cache=this.plugin.app.metadataCache.getFileCache(this.file),!this.cache||!this.cache.blocks||!(this.block in this.cache.blocks))throw new Error(`Could not read file cache. Does the block reference exist? +`,r+=i.repeat(a)),s=u}return r+=s,r}async getSubResult(e){let t=new Sa;typeof e=="number"?t.result=e.toString():t.result=e;let i=[];if(typeof e=="string"){let a=/(?:\`dice:)(.*?)(?:\`)/g,r=e.matchAll(a);for(let s of r){let o=s[1].trim(),c=await this.plugin.getRoller(o,this.source);await c.roll();let l=await this.getSubResult(c.result),u;if(l.result instanceof x4.TFile?u=l.result.basename:u=l.result,t.result=t.result.replace(s[0],u),c instanceof I4)i.push(c.combinedTooltip);else{let[f,h]=c.tooltip.split(` +`);i.push(f+" --> "+h)}}}return t.combinedTooltip=i.join(";"),t}async getResult(){let e=[],t=[],i=this.original;if(this.rollsFormula)try{let a=await this.plugin.getRoller(this.rollsFormula,this.source);if(!(a instanceof S2))return this.prettyTooltip="TableRoller only supports dice rolls to select multiple elements.",new x4.Notice(this.prettyTooltip),"ERROR";let r=a;await r.roll(),this.rolls=r.result,r.isStatic||(i=i.replace(this.rollsFormula,`${this.rollsFormula.trim()} --> ${r.resultText} > `))}catch{return this.prettyTooltip=`TableRoller: '${this.rollsFormula}' is not a valid dice roll.`,new x4.Notice(this.prettyTooltip),"ERROR"}for(let a=0;au[1]===void 0&&c===u[0]||c>=u[0]&&u[1]>=c);l&&(r=this.lookupRoller.original.trim()+" --> "+`${this.lookupRoller.resultText}${this.header?" | "+this.header:""}`.trim(),o=l[1])}else{let c=[...this.options],l=this.getRandomBetween(0,c.length-1);r=c.length+" rows --> [row "+(l+1)+"]",o=c[l]}s=await this.getSubResult(o),e.push(s.result),s.combinedTooltip&&(r+=" > ("+s.combinedTooltip+")"),t.push(r)}return t.length==0?this.combinedTooltip=i:t.length==1?this.combinedTooltip=i+" "+t.join(""):this.combinedTooltip=i+" ==> ("+t.join(" ||")+")",this.prettyTooltip=this.prettify(this.combinedTooltip),e.join("||")}async roll(){return new Promise(async e=>{this.loaded?(this.result=await this.getResult(),this.render(),this.trigger("new-result"),e(this.result)):this.on("loaded",async()=>{this.result=await this.getResult(),this.render(),this.trigger("new-result"),e(this.result)})})}async load(){await this.getOptions()}async getOptions(){if(this.cache=this.plugin.app.metadataCache.getFileCache(this.file),!this.cache||!this.cache.blocks||!(this.block in this.cache.blocks))throw new Error(`Could not read file cache. Does the block reference exist? ${this.path} > ${this.block}`);let e=this.cache.sections?.find(t=>t.position==this.cache.blocks[this.block].position);if(this.position=this.cache.blocks[this.block].position,this.content=(await this.plugin.app.vault.cachedRead(this.file))?.slice(this.position.start.offset,this.position.end.offset),e&&e.type==="list")this.options=this.content.split(` -`);else{let t=Ic(this.content);if(t.columns.size===2&&/dice:\s*([\s\S]+)\s*?/.test(Array.from(t.columns.keys())[0])){let i=await this.plugin.getRoller(Array.from(t.columns.keys())[0].split(":").pop(),this.source);console.log("\u{1F680} ~ file: table.ts:315 ~ roller:",i),i instanceof _2&&(this.lookupRoller=i,this.lookupRanges=t.rows.map(a=>{let[r,o]=a.replace(/\\\|/g,"{ESCAPED_PIPE}").split("|").map(l=>l.replace(/{ESCAPED_PIPE}/g,"\\|")).map(l=>l.trim()),[,s,c]=r.match(/(\d+)(?:[^\d]+?(\d+))?/)??[];if(!(!s&&!c))return[[Number(s),c?Number(c):void 0],o]}),this.isLookup=!0)}if(this.header==="xy"&&!t.columns.has("xy")){this.options=[];for(let i of Array.from(t.columns.values()).slice(1))this.options.push(...i)}else if(this.header&&t.columns.has(this.header))this.options=t.columns.get(this.header);else{if(this.header)throw new Error(`Header ${this.header} was not found in table ${this.path} > ${this.block}.`);this.options=t.rows}}this.loaded=!0,this.trigger("loaded")}toResult(){return{type:"table",result:this.result}}async applyResult(e){e.type==="table"&&(e.result&&(this.result=e.result),await this.render())}},Pc=/^\|?([\s\S]+?)\|?$/,Sa=/\|/g;function Ic(n){let e=n.split(` -`),i=e.map(o=>(o.trim().match(Pc)??[,o.trim()])[1])[0].replace("\\|","{ESCAPED_PIPE}").split(Sa),a=[],r=[];for(let o in i){let s=i[o];s.trim().length||(s=o),r.push([s.trim(),[]])}for(let o of e.slice(2)){let s=o.trim().replace(/\\\|/g,"{ESCAPED_PIPE}").split(Sa).map(c=>c.replace(/{ESCAPED_PIPE}/g,"\\|")).map(c=>c.trim()).filter(c=>c.length);a.push(s.join(" | "));for(let c in s){let l=s[c].trim();!l.length||!r[c]||r[c][1].push(l)}}return{columns:new Map(r),rows:a}}var E1=S2(require("obsidian"));var u6=class extends E1.PluginSettingTab{constructor(e,t){super(e,t);this.plugin=t;this.plugin=t}async display(){let{containerEl:e}=this;e.empty(),e.addClass("dice-roller-settings"),e.createEl("h2",{text:"Dice Roller Settings"}),this.buildGenerics(e.createDiv()),this.buildDisplay(e.createDiv()),this.buildDice(e.createDiv()),this.buildTables(e.createDiv()),this.buildSections(e.createDiv()),this.buildTags(e.createDiv()),this.buildView(e.createDiv()),this.buildRender(e.createDiv()),this.buildFormulaSettings(e.createDiv("dice-roller-setting-additional-container")),e.createDiv("coffee").createEl("a",{href:"https://www.buymeacoffee.com/valentine195"}).createEl("img",{attr:{src:"https://img.buymeacoffee.com/button-api/?text=Buy me a coffee&emoji=\u2615&slug=valentine195&button_colour=e3e7ef&font_colour=262626&font_family=Inter&outline_colour=262626&coffee_colour=ff0000"}})}buildGenerics(e){e.empty(),new E1.Setting(e).setName("Globally Save Results").setDesc(createFragment(t=>{t.createSpan({text:"Dice results will be saved by default. This can be overridden using "}),t.createEl("code",{text:"dice-: formula"}),t.createEl("p",{text:"Please note that the plugin will attempt to save the result but may not be able to."})})).addToggle(t=>{t.setValue(this.plugin.data.persistResults),t.onChange(async i=>{this.plugin.data.persistResults=i,await this.plugin.saveSettings()})})}buildDisplay(e){e.empty(),new E1.Setting(e).setHeading().setName("Dice Display"),new E1.Setting(e).setName("Display Formula With Results").setDesc("Both the formula and the results will both be displayed in preview mode.").addToggle(t=>{t.setValue(this.plugin.data.displayResultsInline),t.onChange(async i=>{this.plugin.data.displayResultsInline=i,await this.plugin.saveSettings()})}),new E1.Setting(e).setName("Display Dice Button With Results").setDesc("A dice button will appear next to results.").addToggle(t=>{t.setValue(this.plugin.data.showDice),t.onChange(async i=>{this.plugin.data.showDice=i,await this.plugin.saveSettings()})}),new E1.Setting(e).setName("Add Formula When Using Modify Dice").setDesc(createFragment(t=>{t.createSpan({text:"Both the formula and the results will both be added to the note when using "}),t.createEl("code",{text:"dice-mod"}),t.createSpan({text:"."})})).addToggle(t=>{t.setValue(this.plugin.data.displayFormulaForMod),t.onChange(async i=>{this.plugin.data.displayFormulaForMod=i,await this.plugin.saveSettings()})}),new E1.Setting(e).setName("Display Formula in Parentheses After").setDesc(createFragment(t=>{t.createSpan({text:"For example, "}),t.createEl("code",{text:"`dice: 1d6`"}),t.createSpan({text:" will become "});let i=t.createSpan("dice-roller");i.createSpan({cls:"dice-roller-result",text:"3"}),(0,E1.setIcon)(i.createSpan("dice-roller-button"),Y2),t.createSpan({text:" (1d6). This only affects Dice Rollers."})})).addToggle(t=>{t.setValue(this.plugin.data.displayFormulaAfter),t.onChange(async i=>{this.plugin.data.displayFormulaAfter=i,await this.plugin.saveSettings()})})}buildDice(e){e.empty(),new E1.Setting(e).setHeading().setName("Dice Rollers"),new E1.Setting(e).setName("Default Face").setDesc("Use this as the number of faces when it is omitted.").addText(t=>{t.setValue(`${this.plugin.data.defaultFace}`),t.inputEl.onblur=async()=>{isNaN(Number(t.inputEl.value))&&new E1.Notice("The default face must be a number."),this.plugin.data.defaultFace=Number(t.inputEl.value),await this.plugin.saveSettings()}}),new E1.Setting(e).setName("Round Results").setDesc("Determine the rounding behavior for dice results.").addDropdown(t=>{t.addOptions(pe).setValue(this.plugin.data.round).onChange(i=>{this.plugin.data.round=i,this.plugin.saveSettings()})}),new E1.Setting(e).setName("Always Render Dice").setDesc(createFragment(t=>{t.createSpan({text:"Dice rolled in notes will always be rendered. Use the "}),t.createEl("code",{text:"|norender"}),t.createSpan({text:" flag to prevent it."})})).addToggle(t=>{t.setValue(this.plugin.data.renderAllDice).onChange(i=>{this.plugin.data.renderAllDice=i,this.plugin.saveSettings()})})}buildTables(e){e.empty(),new E1.Setting(e).setHeading().setName("Table Rollers"),new E1.Setting(e).setName("Display Lookup Table Roll").setDesc("Lookup table rolls will display the rolled number along with the result.").addToggle(t=>{t.setValue(this.plugin.data.displayLookupRoll),t.onChange(async i=>{this.plugin.data.displayLookupRoll=i,await this.plugin.saveSettings()})})}buildSections(e){e.empty(),new E1.Setting(e).setHeading().setName("Section Rollers"),new E1.Setting(e).setName("Add Copy Button to Section Results").setDesc("Randomly rolled sections will have a copy-content button to easy add result to clipboard.").addToggle(t=>{t.setValue(this.plugin.data.copyContentButton),t.onChange(async i=>{this.plugin.data.copyContentButton=i,await this.plugin.saveSettings()})})}buildTags(e){e.empty(),new E1.Setting(e).setHeading().setName("Tag Rollers"),new E1.Setting(e).setName("Roll All Files for Tags").setDesc("Return a result for each file when rolling tags.").addToggle(t=>{t.setValue(this.plugin.data.returnAllTags),t.onChange(async i=>{this.plugin.data.returnAllTags=i,await this.plugin.saveSettings()})}),new E1.Setting(e).setName("Always Return Links for Tags").setDesc("Enables random link rolling with the link parameter. Override by specifying a section type.").addToggle(t=>{t.setValue(this.plugin.data.rollLinksForTags),t.onChange(async i=>{this.plugin.data.rollLinksForTags=i,await this.plugin.saveSettings()})})}buildView(e){e.empty(),new E1.Setting(e).setHeading().setName("Dice View"),new E1.Setting(e).setName("Open Dice View on Startup").setDesc("The dice view can always be opened using the command from the command palette.").addToggle(t=>{t.setValue(this.plugin.data.showLeafOnStartup),t.onChange(async i=>{this.plugin.data.showLeafOnStartup=i,await this.plugin.saveSettings()})})}buildRender(e){e.empty(),new E1.Setting(e).setHeading().setName("Graphical Dice"),new E1.Setting(e).setName("Display graphics for Dice View Rolls").setDesc("Dice rolls from dice view will be displayed on screen.").addToggle(a=>{a.setValue(this.plugin.data.renderer),a.onChange(async r=>{this.plugin.data.renderer=r,await this.plugin.saveSettings()})}),new E1.Setting(e).setName("Display Time for Dice Graphics").setDesc("Rendered dice will stay on screen for this number of milliseconds. Leave blank to require a click to clear dice.").addText(a=>{a.inputEl.setAttr("type","number"),a.inputEl.onblur=r=>{Number(a.getValue())<0&&(new E1.Notice("Render time cannot be less than 0."),a.setValue("0"))},a.setValue(`${this.plugin.data.renderTime}`),a.onChange(async r=>{r&&Number(r)<0||isNaN(Number(r))||(this.plugin.data.renderTime=Number(r),await this.plugin.saveSettings())})}).addExtraButton(a=>{a.setIcon("reset").setTooltip("Reset to Default").onClick(async()=>{this.plugin.data.renderTime=h6.renderTime,await this.plugin.saveSettings(),this.buildRender(e)})}),new E1.Setting(e).setName("Dice Base Color").setDesc("Rendered dice will be this color.").controlEl.createEl("input",{type:"color",value:this.plugin.data.diceColor},a=>{a.value=this.plugin.data.diceColor,a.onchange=async({target:r})=>{let o=r.value;this.plugin.data.diceColor=o,await this.plugin.saveSettings(),this.plugin.app.workspace.trigger("dice-roller:update-colors")}}),new E1.Setting(e).setName("Dice Text Color").setDesc("Rendered dice will use this color for their numbers.").controlEl.createEl("input",{type:"color",value:this.plugin.data.textColor},a=>{a.value=this.plugin.data.textColor,a.onchange=async({target:r})=>{let o=r.value;!o||(this.plugin.data.textColor=o,await this.plugin.saveSettings(),this.plugin.app.workspace.trigger("dice-roller:update-colors"))}})}buildFormulaSettings(e){e.empty(),new E1.Setting(e).setHeading().setName("Saved Formulas");let t=e.createDiv();new E1.Setting(t).setName("Add Formula").setDesc("Add a new formula shortcut.").addButton(r=>r.setTooltip("Add Formula").setButtonText("+").onClick(async()=>{let s=await this.buildFormulaForm(t);s&&(this.plugin.data.formulas[s.alias]=s.formula,this.buildFormulaSettings(e),await this.plugin.saveSettings())}));let i=e.createDiv("additional"),a=this.plugin.data.formulas;for(let[r,o]of Object.entries(a)){let s=new E1.Setting(i).setName(r);s.controlEl.createSpan({text:o}),s.addExtraButton(c=>c.setIcon("pencil").setTooltip("Edit").onClick(async()=>{let l=await this.buildFormulaForm(t,{alias:r,formula:o});l&&(delete this.plugin.data.formulas[r],this.plugin.data.formulas[l.alias]=l.formula,this.buildFormulaSettings(e),await this.plugin.saveSettings())})).addExtraButton(c=>c.setIcon("trash").setTooltip("Delete").onClick(async()=>{delete this.plugin.data.formulas[r],await this.plugin.saveSettings(),this.buildFormulaSettings(e)}))}Object.values(a).length||i.createSpan({text:"Create a formula to see it here!",cls:"no-formulas"})}async buildFormulaForm(e,t={alias:null,formula:null}){return new Promise(i=>{let a=e.createDiv("add-new-formula"),r=a.createDiv("formula-data");new E1.Setting(r).setName("Alias").addText(s=>{s.setValue(t.alias).onChange(c=>t.alias=c)}),new E1.Setting(r).setName("Formula").addText(s=>{s.setValue(t.formula).onChange(c=>t.formula=c)});let o=a.createDiv("formula-buttons");new E1.Setting(o).addButton(s=>s.setCta().setButtonText("Save").onClick(async()=>{a.detach(),i(t)})).addExtraButton(s=>s.setIcon("cross").setTooltip("Cancel").onClick(()=>{a.detach(),i(null)}))})}};var L1=S2(require("obsidian"));var b4="DICE_ROLLER_VIEW",kc='',Uc='',Oc='',Gc='',qc='',Wc='',jc='';(0,L1.addIcon)("d4",kc);(0,L1.addIcon)("d6",Uc);(0,L1.addIcon)("d8",Oc);(0,L1.addIcon)("d10",Gc);(0,L1.addIcon)("d12",qc);(0,L1.addIcon)("d20",Wc);(0,L1.addIcon)("d100",jc);(0,L1.addIcon)("dice-roller-save",'');(0,L1.addIcon)("dice-roller-plus",'');(0,L1.addIcon)("dice-roller-minus",'');var Qe=class extends L1.ItemView{constructor(e,t){super(t);this.plugin=e;this.leaf=t;this.dice=Qe.DICE();this.custom="";this.adv=!1;this.dis=!1;this.add=0;this.contentEl.addClass("dice-roller-view"),this.registerEvent(this.plugin.app.workspace.on("dice-roller:update-colors",()=>{this.renderer.factory.updateColors()}))}static DICE(){return{d4:0,d6:0,d8:0,d10:0,d12:0,d20:0,d100:0}}get customFormulas(){return this.plugin.data.customFormulas}get renderer(){return this.plugin.renderer}async onOpen(){this.display()}async display(){this.contentEl.empty(),this.gridEl=this.contentEl.createDiv("dice-roller-grid"),this.formulaEl=this.contentEl.createDiv("dice-roller-formula");let e=this.contentEl.createDiv("dice-roller-results-container"),t=e.createDiv("dice-roller-results-header");t.createEl("h4",{text:"Results"}),new L1.ExtraButtonComponent(t.createDiv("clear-all")).setIcon("trash").setTooltip("Clear All").onClick(()=>{this.resultEl.empty(),this.resultEl.append(this.noResultsEl)}),this.resultEl=e.createDiv("dice-roller-results"),this.noResultsEl=this.resultEl.createSpan({text:"No results yet! Roll some dice to get started :)"}),this.buildButtons(),this.buildFormula()}buildButtons(){this.gridEl.empty();let e=this.gridEl.createDiv("dice-buttons");for(let s in this.dice){let c=new L1.ExtraButtonComponent(e.createDiv("dice-button")).setIcon(s);c.extraSettingsEl.onclick=async l=>{let u=l.getModifierState("Shift")?-1:1;this.dice[s]+=u,this.setFormula();let f=await this.plugin.getRoller(this.formulaComponent.inputEl.value,"view");f instanceof _2&&(this.stack=f)}}let t=this.gridEl.createDiv("advantage-disadvantage"),i=new L1.ButtonComponent(t).setButtonText("ADV").onClick(()=>{this.adv=!this.adv,this.dis=!1,this.adv?(i.setCta(),a.removeCta()):i.removeCta(),this.setFormula()}),a=new L1.ButtonComponent(t).setButtonText("DIS").onClick(()=>{this.dis=!this.dis,this.dis?(a.setCta(),i.removeCta()):a.removeCta(),this.adv=!1,this.setFormula()}),r=this.gridEl.createDiv("dice-context").createDiv("add-subtract");new L1.ExtraButtonComponent(r).setIcon("dice-roller-minus").onClick(()=>{this.add-=1,o.setValue(`${this.add}`),this.setFormula()});let o=new L1.TextComponent(r).setValue(`${this.add?this.add:""}`).onChange(s=>{isNaN(Number(s))||(this.add=Number(s)),this.setFormula()});if(new L1.ExtraButtonComponent(r).setIcon("dice-roller-plus").onClick(()=>{this.add+=1,o.setValue(`${this.add}`),this.setFormula()}),this.customFormulas.length){let s=this.gridEl.createDiv("dice-roller-results-container");s.createDiv("dice-roller-results-header").createEl("h4",{text:"Saved Formulas"});for(let l of this.customFormulas){let u=s.createDiv("dice-custom-formula-container"),f=u.createDiv("dice-custom-formula");new L1.ExtraButtonComponent(f).setIcon(Y2).setTooltip("Roll").onClick(()=>this.roll(l)),f.createSpan({text:l}),new L1.ExtraButtonComponent(u).setIcon("trash").setTooltip("Remove").onClick(()=>{this.plugin.data.customFormulas=this.plugin.data.customFormulas.filter(h=>h!=l),this.plugin.saveSettings(),this.buildButtons()})}}}async roll(e=this.formulaComponent.inputEl.value){if(!e)return;this.rollButton.setDisabled(!0);let t=await this.plugin.getRoller(e,"view");if(!(t instanceof _2)){new L1.Notice("The Dice View only supports dice rolls.");return}if(await t.roll(),!t.dice.length){new L1.Notice("Invalid formula.");return}try{this.plugin.data.renderer&&(this.addChild(this.renderer),this.renderer.setDice(t),await this.renderer.start(),t.recalculate())}catch(i){new L1.Notice("There was an error rendering the roll."),console.error(i)}this.rollButton.setDisabled(!1),this.addResult({result:t.result,original:t.original,resultText:t.resultText}),this.dice=Qe.DICE(),this.add=null,this.adv=!1,this.dis=!1,this.buildButtons(),this.setFormula()}buildFormula(){this.formulaEl.empty(),this.formulaComponent=new L1.TextAreaComponent(this.formulaEl).setPlaceholder("Dice Formula"),this.formulaComponent.onChange((0,L1.debounce)(async t=>{},500,!0));let e=this.formulaEl.createDiv("action-buttons");this.saveButton=new L1.ButtonComponent(e).setIcon("plus-with-circle").setCta().setTooltip("Save Formula").onClick(()=>this.save()),this.saveButton.buttonEl.addClass("dice-roller-roll"),this.rollButton=new L1.ButtonComponent(e).setIcon(Y2).setCta().setTooltip("Roll").onClick(()=>this.roll()),this.rollButton.buttonEl.addClass("dice-roller-roll")}save(){!this.formulaComponent.inputEl.value||(this.plugin.data.customFormulas.push(this.formulaComponent.inputEl.value),this.buildButtons(),this.plugin.saveSettings())}addResult(e){this.noResultsEl&&this.noResultsEl.detach();let t=createDiv("view-result");t.createSpan({text:e.original}),t.createEl("strong",{text:`${e.result}`,attr:{"aria-label":e.resultText}});let i=t.createDiv("result-context");i.createEl("em",{text:new Date().toLocaleString()}),new L1.ExtraButtonComponent(i).setIcon("trash").onClick(()=>{t.detach(),this.resultEl.children.length===0&&this.resultEl.prepend(this.noResultsEl)}),new L1.ExtraButtonComponent(i).setIcon(Te).setTooltip("Copy Result").onClick(async()=>{await navigator.clipboard.writeText(`${e.result}`)}).extraSettingsEl.addClass("dice-content-copy"),new L1.ExtraButtonComponent(i).setIcon(Y2).setTooltip("Roll Again").onClick(()=>this.roll(e.original)).extraSettingsEl.addClass("dice-result-reroll"),this.resultEl.prepend(t)}get formulaString(){let e=[],t=Object.entries(this.dice).filter(([a,r])=>r!=0);if(!t.length)return"";t.sort((a,r)=>Number(r[0].slice(1))-Number(a[0].slice(1)));let i=t.shift();return e.push(`${i[1]}${i[0]}`),this.adv?e.push("kh"):this.dis&&e.push("dh"),t.length&&e.push(...t.map(([a,r])=>`${r>0?"+":"-"}${Math.abs(r)}${a}`)),this.add&&this.add!=0&&(e.push(this.add>0?"+":"-"),e.push(Math.abs(this.add))),e.join("")}setFormula(){this.formulaComponent.setValue(this.formulaString)}getDisplayText(){return"Dice Roller"}getViewType(){return b4}getIcon(){return Y2}async onClose(){await super.onClose(),this.renderer.unload()}};var Xt=S2(require("obsidian"));var E2=class{constructor(e=[0,0,0,0,0,0,0,0,0]){this.elements=void 0,this.elements=e}identity(){let e=this.elements;e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1}setZero(){let e=this.elements;e[0]=0,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=0,e[6]=0,e[7]=0,e[8]=0}setTrace(e){let t=this.elements;t[0]=e.x,t[4]=e.y,t[8]=e.z}getTrace(e=new y){let t=this.elements;return e.x=t[0],e.y=t[4],e.z=t[8],e}vmult(e,t=new y){let i=this.elements,a=e.x,r=e.y,o=e.z;return t.x=i[0]*a+i[1]*r+i[2]*o,t.y=i[3]*a+i[4]*r+i[5]*o,t.z=i[6]*a+i[7]*r+i[8]*o,t}smult(e){for(let t=0;t0){let r=1/a;this.x*=r,this.y*=r,this.z*=r}else this.x=0,this.y=0,this.z=0;return a}unit(e=new y){let t=this.x,i=this.y,a=this.z,r=Math.sqrt(t*t+i*i+a*a);return r>0?(r=1/r,e.x=t*r,e.y=i*r,e.z=a*r):(e.x=1,e.y=0,e.z=0),e}length(){let e=this.x,t=this.y,i=this.z;return Math.sqrt(e*e+t*t+i*i)}lengthSquared(){return this.dot(this)}distanceTo(e){let t=this.x,i=this.y,a=this.z,r=e.x,o=e.y,s=e.z;return Math.sqrt((r-t)*(r-t)+(o-i)*(o-i)+(s-a)*(s-a))}distanceSquared(e){let t=this.x,i=this.y,a=this.z,r=e.x,o=e.y,s=e.z;return(r-t)*(r-t)+(o-i)*(o-i)+(s-a)*(s-a)}scale(e,t=new y){let i=this.x,a=this.y,r=this.z;return t.x=e*i,t.y=e*a,t.z=e*r,t}vmul(e,t=new y){return t.x=e.x*this.x,t.y=e.y*this.y,t.z=e.z*this.z,t}addScaledVector(e,t,i=new y){return i.x=this.x+e*t.x,i.y=this.y+e*t.y,i.z=this.z+e*t.z,i}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}isZero(){return this.x===0&&this.y===0&&this.z===0}negate(e=new y){return e.x=-this.x,e.y=-this.y,e.z=-this.z,e}tangents(e,t){let i=this.length();if(i>0){let a=Zc,r=1/i;a.set(this.x*r,this.y*r,this.z*r);let o=Yc;Math.abs(a.x)<.9?(o.set(1,0,0),a.cross(o,e)):(o.set(0,1,0),a.cross(o,e)),a.cross(e,t)}else e.set(1,0,0),t.set(0,1,0)}toString(){return this.x+","+this.y+","+this.z}toArray(){return[this.x,this.y,this.z]}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}lerp(e,t,i){let a=this.x,r=this.y,o=this.z;i.x=a+(e.x-a)*t,i.y=r+(e.y-r)*t,i.z=o+(e.z-o)*t}almostEquals(e,t=1e-6){return!(Math.abs(this.x-e.x)>t||Math.abs(this.y-e.y)>t||Math.abs(this.z-e.z)>t)}almostZero(e=1e-6){return!(Math.abs(this.x)>e||Math.abs(this.y)>e||Math.abs(this.z)>e)}isAntiparallelTo(e,t){return this.negate(_a),_a.almostEquals(e,t)}clone(){return new y(this.x,this.y,this.z)}};y.ZERO=void 0;y.UNIT_X=void 0;y.UNIT_Y=void 0;y.UNIT_Z=void 0;y.ZERO=new y(0,0,0);y.UNIT_X=new y(1,0,0);y.UNIT_Y=new y(0,1,0);y.UNIT_Z=new y(0,0,1);var Zc=new y,Yc=new y,_a=new y,L2=class{constructor(e={}){this.lowerBound=void 0,this.upperBound=void 0,this.lowerBound=new y,this.upperBound=new y,e.lowerBound&&this.lowerBound.copy(e.lowerBound),e.upperBound&&this.upperBound.copy(e.upperBound)}setFromPoints(e,t,i,a){let r=this.lowerBound,o=this.upperBound,s=i;r.copy(e[0]),s&&s.vmult(r,r),o.copy(r);for(let c=1;co.x&&(o.x=l.x),l.xo.y&&(o.y=l.y),l.yo.z&&(o.z=l.z),l.z=r.x&&t.y<=a.y&&i.y>=r.y&&t.z<=a.z&&i.z>=r.z}getCorners(e,t,i,a,r,o,s,c){let l=this.lowerBound,u=this.upperBound;e.copy(l),t.set(u.x,l.y,l.z),i.set(u.x,u.y,l.z),a.set(l.x,u.y,u.z),r.set(u.x,l.y,u.z),o.set(l.x,u.y,l.z),s.set(l.x,l.y,u.z),c.copy(u)}toLocalFrame(e,t){let i=La,a=i[0],r=i[1],o=i[2],s=i[3],c=i[4],l=i[5],u=i[6],f=i[7];this.getCorners(a,r,o,s,c,l,u,f);for(let h=0;h!==8;h++){let m=i[h];e.pointToLocal(m,m)}return t.setFromPoints(i)}toWorldFrame(e,t){let i=La,a=i[0],r=i[1],o=i[2],s=i[3],c=i[4],l=i[5],u=i[6],f=i[7];this.getCorners(a,r,o,s,c,l,u,f);for(let h=0;h!==8;h++){let m=i[h];e.pointToWorld(m,m)}return t.setFromPoints(i)}overlapsRay(e){let{direction:t,from:i}=e,a=1/t.x,r=1/t.y,o=1/t.z,s=(this.lowerBound.x-i.x)*a,c=(this.upperBound.x-i.x)*a,l=(this.lowerBound.y-i.y)*r,u=(this.upperBound.y-i.y)*r,f=(this.lowerBound.z-i.z)*o,h=(this.upperBound.z-i.z)*o,m=Math.max(Math.max(Math.min(s,c),Math.min(l,u)),Math.min(f,h)),v=Math.min(Math.min(Math.max(s,c),Math.max(l,u)),Math.max(f,h));return!(v<0||m>v)}},Ea=new y,La=[new y,new y,new y,new y,new y,new y,new y,new y],P0=class{constructor(){this.matrix=void 0,this.matrix=[]}get(e,t){let{index:i}=e,{index:a}=t;if(a>i){let r=a;a=i,i=r}return this.matrix[(i*(i+1)>>1)+a-1]}set(e,t,i){let{index:a}=e,{index:r}=t;if(r>a){let o=r;r=a,a=o}this.matrix[(a*(a+1)>>1)+r-1]=i?1:0}reset(){for(let e=0,t=this.matrix.length;e!==t;e++)this.matrix[e]=0}setNumObjects(e){this.matrix.length=e*(e-1)>>1}},I0=class{constructor(){this._listeners=void 0}addEventListener(e,t){this._listeners===void 0&&(this._listeners={});let i=this._listeners;return i[e]===void 0&&(i[e]=[]),i[e].includes(t)||i[e].push(t),this}hasEventListener(e,t){if(this._listeners===void 0)return!1;let i=this._listeners;return!!(i[e]!==void 0&&i[e].includes(t))}hasAnyEventListener(e){return this._listeners===void 0?!1:this._listeners[e]!==void 0}removeEventListener(e,t){if(this._listeners===void 0)return this;let i=this._listeners;if(i[e]===void 0)return this;let a=i[e].indexOf(t);return a!==-1&&i[e].splice(a,1),this}dispatchEvent(e){if(this._listeners===void 0)return this;let i=this._listeners[e.type];if(i!==void 0){e.target=this;for(let a=0,r=i.length;a.499&&(i=2*Math.atan2(o,l),a=Math.PI/2,r=0),u<-.499&&(i=-2*Math.atan2(o,l),a=-Math.PI/2,r=0),i===void 0){let f=o*o,h=s*s,m=c*c;i=Math.atan2(2*s*l-2*o*c,1-2*h-2*m),a=Math.asin(2*u),r=Math.atan2(2*o*l-2*s*c,1-2*f-2*m)}break;default:throw new Error("Euler order "+t+" not supported yet.")}e.y=i,e.z=a,e.x=r}setFromEuler(e,t,i,a="XYZ"){let r=Math.cos(e/2),o=Math.cos(t/2),s=Math.cos(i/2),c=Math.sin(e/2),l=Math.sin(t/2),u=Math.sin(i/2);return a==="XYZ"?(this.x=c*o*s+r*l*u,this.y=r*l*s-c*o*u,this.z=r*o*u+c*l*s,this.w=r*o*s-c*l*u):a==="YXZ"?(this.x=c*o*s+r*l*u,this.y=r*l*s-c*o*u,this.z=r*o*u-c*l*s,this.w=r*o*s+c*l*u):a==="ZXY"?(this.x=c*o*s-r*l*u,this.y=r*l*s+c*o*u,this.z=r*o*u+c*l*s,this.w=r*o*s-c*l*u):a==="ZYX"?(this.x=c*o*s-r*l*u,this.y=r*l*s+c*o*u,this.z=r*o*u-c*l*s,this.w=r*o*s+c*l*u):a==="YZX"?(this.x=c*o*s+r*l*u,this.y=r*l*s+c*o*u,this.z=r*o*u-c*l*s,this.w=r*o*s-c*l*u):a==="XZY"&&(this.x=c*o*s-r*l*u,this.y=r*l*s-c*o*u,this.z=r*o*u+c*l*s,this.w=r*o*s+c*l*u),this}clone(){return new O1(this.x,this.y,this.z,this.w)}slerp(e,t,i=new O1){let a=this.x,r=this.y,o=this.z,s=this.w,c=e.x,l=e.y,u=e.z,f=e.w,h,m,v,g,x;return m=a*c+r*l+o*u+s*f,m<0&&(m=-m,c=-c,l=-l,u=-u,f=-f),1-m>1e-6?(h=Math.acos(m),v=Math.sin(h),g=Math.sin((1-t)*h)/v,x=Math.sin(t*h)/v):(g=1-t,x=t),i.x=g*a+x*c,i.y=g*r+x*l,i.z=g*o+x*u,i.w=g*s+x*f,i}integrate(e,t,i,a=new O1){let r=e.x*i.x,o=e.y*i.y,s=e.z*i.z,c=this.x,l=this.y,u=this.z,f=this.w,h=t*.5;return a.x+=h*(r*f+o*u-s*l),a.y+=h*(o*f+s*c-r*u),a.z+=h*(s*f+r*l-o*c),a.w+=h*(-r*c-o*l-s*u),a}},$c=new y,Kc=new y,Jc={SPHERE:1,PLANE:2,BOX:4,COMPOUND:8,CONVEXPOLYHEDRON:16,HEIGHTFIELD:32,PARTICLE:64,CYLINDER:128,TRIMESH:256},c1=class{constructor(e={}){this.id=void 0,this.type=void 0,this.boundingSphereRadius=void 0,this.collisionResponse=void 0,this.collisionFilterGroup=void 0,this.collisionFilterMask=void 0,this.material=void 0,this.body=void 0,this.id=c1.idCounter++,this.type=e.type||0,this.boundingSphereRadius=0,this.collisionResponse=e.collisionResponse?e.collisionResponse:!0,this.collisionFilterGroup=e.collisionFilterGroup!==void 0?e.collisionFilterGroup:1,this.collisionFilterMask=e.collisionFilterMask!==void 0?e.collisionFilterMask:-1,this.material=e.material?e.material:null,this.body=null}updateBoundingSphereRadius(){throw"computeBoundingSphereRadius() not implemented for shape type "+this.type}volume(){throw"volume() not implemented for shape type "+this.type}calculateLocalInertia(e,t){throw"calculateLocalInertia() not implemented for shape type "+this.type}calculateWorldAABB(e,t,i,a){throw"calculateWorldAABB() not implemented for shape type "+this.type}};c1.idCounter=0;c1.types=Jc;var N1=class{constructor(e={}){this.position=void 0,this.quaternion=void 0,this.position=new y,this.quaternion=new O1,e.position&&this.position.copy(e.position),e.quaternion&&this.quaternion.copy(e.quaternion)}pointToLocal(e,t){return N1.pointToLocalFrame(this.position,this.quaternion,e,t)}pointToWorld(e,t){return N1.pointToWorldFrame(this.position,this.quaternion,e,t)}vectorToWorldFrame(e,t=new y){return this.quaternion.vmult(e,t),t}static pointToLocalFrame(e,t,i,a=new y){return i.vsub(e,a),t.conjugate(Da),Da.vmult(a,a),a}static pointToWorldFrame(e,t,i,a=new y){return t.vmult(i,a),a.vadd(e,a),a}static vectorToWorldFrame(e,t,i=new y){return e.vmult(t,i),i}static vectorToLocalFrame(e,t,i,a=new y){return t.w*=-1,t.vmult(i,a),t.w*=-1,a}},Da=new O1,e4=class extends c1{constructor(e={}){let{vertices:t=[],faces:i=[],normals:a=[],axes:r,boundingSphereRadius:o}=e;super({type:c1.types.CONVEXPOLYHEDRON});this.vertices=void 0,this.faces=void 0,this.faceNormals=void 0,this.worldVertices=void 0,this.worldVerticesNeedsUpdate=void 0,this.worldFaceNormals=void 0,this.worldFaceNormalsNeedsUpdate=void 0,this.uniqueAxes=void 0,this.uniqueEdges=void 0,this.vertices=t,this.faces=i,this.faceNormals=a,this.faceNormals.length===0&&this.computeNormals(),o?this.boundingSphereRadius=o:this.updateBoundingSphereRadius(),this.worldVertices=[],this.worldVerticesNeedsUpdate=!0,this.worldFaceNormals=[],this.worldFaceNormalsNeedsUpdate=!0,this.uniqueAxes=r?r.slice():null,this.uniqueEdges=[],this.computeEdges()}computeEdges(){let e=this.faces,t=this.vertices,i=this.uniqueEdges;i.length=0;let a=new y;for(let r=0;r!==e.length;r++){let o=e[r],s=o.length;for(let c=0;c!==s;c++){let l=(c+1)%s;t[o[c]].vsub(t[o[l]],a),a.normalize();let u=!1;for(let f=0;f!==i.length;f++)if(i[f].almostEquals(a)||i[f].almostEquals(a)){u=!0;break}u||i.push(a.clone())}}}computeNormals(){this.faceNormals.length=this.faces.length;for(let e=0;eh&&(h=g,f=v)}let m=[];for(let v=0;v=0&&this.clipFaceAgainstHull(o,e,t,m,s,c,l)}findSeparatingAxis(e,t,i,a,r,o,s,c){let l=new y,u=new y,f=new y,h=new y,m=new y,v=new y,g=Number.MAX_VALUE,x=this;if(x.uniqueAxes)for(let p=0;p!==x.uniqueAxes.length;p++){i.vmult(x.uniqueAxes[p],l);let d=x.testSepAxis(l,e,t,i,a,r);if(d===!1)return!1;d0&&o.negate(o),!0}testSepAxis(e,t,i,a,r,o){let s=this;e4.project(s,e,i,a,k0),e4.project(t,e,r,o,U0);let c=k0[0],l=k0[1],u=U0[0],f=U0[1];if(c0?1/t:0,this.material=e.material||null,this.linearDamping=typeof e.linearDamping=="number"?e.linearDamping:.01,this.type=t<=0?i1.STATIC:i1.DYNAMIC,typeof e.type==typeof i1.STATIC&&(this.type=e.type),this.allowSleep=typeof e.allowSleep!="undefined"?e.allowSleep:!0,this.sleepState=i1.AWAKE,this.sleepSpeedLimit=typeof e.sleepSpeedLimit!="undefined"?e.sleepSpeedLimit:.1,this.sleepTimeLimit=typeof e.sleepTimeLimit!="undefined"?e.sleepTimeLimit:1,this.timeLastSleepy=0,this.wakeUpAfterNarrowphase=!1,this.torque=new y,this.quaternion=new O1,this.initQuaternion=new O1,this.previousQuaternion=new O1,this.interpolatedQuaternion=new O1,e.quaternion&&(this.quaternion.copy(e.quaternion),this.initQuaternion.copy(e.quaternion),this.previousQuaternion.copy(e.quaternion),this.interpolatedQuaternion.copy(e.quaternion)),this.angularVelocity=new y,e.angularVelocity&&this.angularVelocity.copy(e.angularVelocity),this.initAngularVelocity=new y,this.shapes=[],this.shapeOffsets=[],this.shapeOrientations=[],this.inertia=new y,this.invInertia=new y,this.invInertiaWorld=new E2,this.invMassSolve=0,this.invInertiaSolve=new y,this.invInertiaWorldSolve=new E2,this.fixedRotation=typeof e.fixedRotation!="undefined"?e.fixedRotation:!1,this.angularDamping=typeof e.angularDamping!="undefined"?e.angularDamping:.01,this.linearFactor=new y(1,1,1),e.linearFactor&&this.linearFactor.copy(e.linearFactor),this.angularFactor=new y(1,1,1),e.angularFactor&&this.angularFactor.copy(e.angularFactor),this.aabb=new L2,this.aabbNeedsUpdate=!0,this.boundingRadius=0,this.wlambda=new y,this.isTrigger=Boolean(e.isTrigger),e.shape&&this.addShape(e.shape),this.updateMassProperties()}wakeUp(){let e=this.sleepState;this.sleepState=i1.AWAKE,this.wakeUpAfterNarrowphase=!1,e===i1.SLEEPING&&this.dispatchEvent(i1.wakeupEvent)}sleep(){this.sleepState=i1.SLEEPING,this.velocity.set(0,0,0),this.angularVelocity.set(0,0,0),this.wakeUpAfterNarrowphase=!1}sleepTick(e){if(this.allowSleep){let t=this.sleepState,i=this.velocity.lengthSquared()+this.angularVelocity.lengthSquared(),a=this.sleepSpeedLimit**2;t===i1.AWAKE&&ia?this.wakeUp():t===i1.SLEEPY&&e-this.timeLastSleepy>this.sleepTimeLimit&&(this.sleep(),this.dispatchEvent(i1.sleepEvent))}}updateSolveMassProperties(){this.sleepState===i1.SLEEPING||this.type===i1.KINEMATIC?(this.invMassSolve=0,this.invInertiaSolve.setZero(),this.invInertiaWorldSolve.setZero()):(this.invMassSolve=this.invMass,this.invInertiaSolve.copy(this.invInertia),this.invInertiaWorldSolve.copy(this.invInertiaWorld))}pointToLocalFrame(e,t=new y){return e.vsub(this.position,t),this.quaternion.conjugate().vmult(t,t),t}vectorToLocalFrame(e,t=new y){return this.quaternion.conjugate().vmult(e,t),t}pointToWorldFrame(e,t=new y){return this.quaternion.vmult(e,t),t.vadd(this.position,t),t}vectorToWorldFrame(e,t=new y){return this.quaternion.vmult(e,t),t}addShape(e,t,i){let a=new y,r=new O1;return t&&a.copy(t),i&&r.copy(i),this.shapes.push(e),this.shapeOffsets.push(a),this.shapeOrientations.push(r),this.updateMassProperties(),this.updateBoundingRadius(),this.aabbNeedsUpdate=!0,e.body=this,this}removeShape(e){let t=this.shapes.indexOf(e);return t===-1?(console.warn("Shape does not belong to the body"),this):(this.shapes.splice(t,1),this.shapeOffsets.splice(t,1),this.shapeOrientations.splice(t,1),this.updateMassProperties(),this.updateBoundingRadius(),this.aabbNeedsUpdate=!0,e.body=null,this)}updateBoundingRadius(){let e=this.shapes,t=this.shapeOffsets,i=e.length,a=0;for(let r=0;r!==i;r++){let o=e[r];o.updateBoundingSphereRadius();let s=t[r].length(),c=o.boundingSphereRadius;s+c>a&&(a=s+c)}this.boundingRadius=a}updateAABB(){let e=this.shapes,t=this.shapeOffsets,i=this.shapeOrientations,a=e.length,r=t7,o=i7,s=this.quaternion,c=this.aabb,l=a7;for(let u=0;u!==a;u++){let f=e[u];s.vmult(t[u],r),r.vadd(this.position,r),s.mult(i[u],o),f.calculateWorldAABB(r,o,l.lowerBound,l.upperBound),u===0?c.copy(l):c.extend(l)}this.aabbNeedsUpdate=!1}updateInertiaWorld(e){let t=this.invInertia;if(!(t.x===t.y&&t.y===t.z&&!e)){let i=r7,a=n7;i.setRotationFromQuaternion(this.quaternion),i.transpose(a),i.scale(t,i),i.mmult(a,this.invInertiaWorld)}}applyForce(e,t=new y){if(this.type!==i1.DYNAMIC)return;this.sleepState===i1.SLEEPING&&this.wakeUp();let i=s7;t.cross(e,i),this.force.vadd(e,this.force),this.torque.vadd(i,this.torque)}applyLocalForce(e,t=new y){if(this.type!==i1.DYNAMIC)return;let i=o7,a=c7;this.vectorToWorldFrame(e,i),this.vectorToWorldFrame(t,a),this.applyForce(i,a)}applyTorque(e){this.type===i1.DYNAMIC&&(this.sleepState===i1.SLEEPING&&this.wakeUp(),this.torque.vadd(e,this.torque))}applyImpulse(e,t=new y){if(this.type!==i1.DYNAMIC)return;this.sleepState===i1.SLEEPING&&this.wakeUp();let i=t,a=l7;a.copy(e),a.scale(this.invMass,a),this.velocity.vadd(a,this.velocity);let r=u7;i.cross(e,r),this.invInertiaWorld.vmult(r,r),this.angularVelocity.vadd(r,this.angularVelocity)}applyLocalImpulse(e,t=new y){if(this.type!==i1.DYNAMIC)return;let i=h7,a=f7;this.vectorToWorldFrame(e,i),this.vectorToWorldFrame(t,a),this.applyImpulse(i,a)}updateMassProperties(){let e=d7;this.invMass=this.mass>0?1/this.mass:0;let t=this.inertia,i=this.fixedRotation;this.updateAABB(),e.set((this.aabb.upperBound.x-this.aabb.lowerBound.x)/2,(this.aabb.upperBound.y-this.aabb.lowerBound.y)/2,(this.aabb.upperBound.z-this.aabb.lowerBound.z)/2),f6.calculateInertia(e,this.mass,t),this.invInertia.set(t.x>0&&!i?1/t.x:0,t.y>0&&!i?1/t.y:0,t.z>0&&!i?1/t.z:0),this.updateInertiaWorld(!0)}getVelocityAtWorldPoint(e,t){let i=new y;return e.vsub(this.position,i),this.angularVelocity.cross(i,t),this.velocity.vadd(t,t),t}integrate(e,t,i){if(this.previousPosition.copy(this.position),this.previousQuaternion.copy(this.quaternion),!(this.type===i1.DYNAMIC||this.type===i1.KINEMATIC)||this.sleepState===i1.SLEEPING)return;let a=this.velocity,r=this.angularVelocity,o=this.position,s=this.force,c=this.torque,l=this.quaternion,u=this.invMass,f=this.invInertiaWorld,h=this.linearFactor,m=u*e;a.x+=s.x*m*h.x,a.y+=s.y*m*h.y,a.z+=s.z*m*h.z;let v=f.elements,g=this.angularFactor,x=c.x*g.x,p=c.y*g.y,d=c.z*g.z;r.x+=e*(v[0]*x+v[1]*p+v[2]*d),r.y+=e*(v[3]*x+v[4]*p+v[5]*d),r.z+=e*(v[6]*x+v[7]*p+v[8]*d),o.x+=a.x*e,o.y+=a.y*e,o.z+=a.z*e,l.integrate(this.angularVelocity,e,this.angularFactor,l),t&&(i?l.normalizeFast():l.normalize()),this.aabbNeedsUpdate=!0,this.updateInertiaWorld()}};i1.idCounter=0;i1.COLLIDE_EVENT_NAME="collide";i1.DYNAMIC=O0.DYNAMIC;i1.STATIC=O0.STATIC;i1.KINEMATIC=O0.KINEMATIC;i1.AWAKE=G0.AWAKE;i1.SLEEPY=G0.SLEEPY;i1.SLEEPING=G0.SLEEPING;i1.wakeupEvent={type:"wakeup"};i1.sleepyEvent={type:"sleepy"};i1.sleepEvent={type:"sleep"};var t7=new y,i7=new O1,a7=new L2,r7=new E2,n7=new E2,s7=new y,o7=new y,c7=new y,l7=new y,u7=new y,h7=new y,f7=new y,d7=new y,Ta=class{constructor(){this.world=void 0,this.useBoundingBoxes=void 0,this.dirty=void 0,this.world=null,this.useBoundingBoxes=!1,this.dirty=!0}collisionPairs(e,t,i){throw new Error("collisionPairs not implemented for this BroadPhase class!")}needBroadphaseCollision(e,t){return!((e.collisionFilterGroup&t.collisionFilterMask)==0||(t.collisionFilterGroup&e.collisionFilterMask)==0||((e.type&i1.STATIC)!=0||e.sleepState===i1.SLEEPING)&&((t.type&i1.STATIC)!=0||t.sleepState===i1.SLEEPING))}intersectionTest(e,t,i,a){this.useBoundingBoxes?this.doBoundingBoxBroadphase(e,t,i,a):this.doBoundingSphereBroadphase(e,t,i,a)}doBoundingSphereBroadphase(e,t,i,a){let r=p7;t.position.vsub(e.position,r);let o=(e.boundingRadius+t.boundingRadius)**2;r.lengthSquared()i.lengthSquared()}aabbQuery(e,t,i){return console.warn(".aabbQuery is not implemented in this Broadphase subclass."),[]}},p7=new y,m7={keys:[]},v7=[],g7=[];var Mf=new y,d6=class extends Ta{constructor(){super()}collisionPairs(e,t,i){let a=e.bodies,r=a.length,o,s;for(let c=0;c!==r;c++)for(let l=0;l!==c;l++)o=a[c],s=a[l],!!this.needBroadphaseCollision(o,s)&&this.intersectionTest(o,s,t,i)}aabbQuery(e,t,i=[]){for(let a=0;a{}}intersectWorld(e,t){return this.mode=t.mode||J1.ANY,this.result=t.result||new p6,this.skipBackfaces=!!t.skipBackfaces,this.collisionFilterMask=typeof t.collisionFilterMask!="undefined"?t.collisionFilterMask:-1,this.collisionFilterGroup=typeof t.collisionFilterGroup!="undefined"?t.collisionFilterGroup:-1,this.checkCollisionResponse=typeof t.checkCollisionResponse!="undefined"?t.checkCollisionResponse:!0,t.from&&this.from.copy(t.from),t.to&&this.to.copy(t.to),this.callback=t.callback||(()=>{}),this.hasHit=!1,this.result.reset(),this.updateDirection(),this.getAABB(Ia),W0.length=0,e.broadphase.aabbQuery(e,Ia,W0),this.intersectBodies(W0),this.hasHit}intersectBody(e,t){t&&(this.result=t,this.updateDirection());let i=this.checkCollisionResponse;if(i&&!e.collisionResponse||(this.collisionFilterGroup&e.collisionFilterMask)==0||(e.collisionFilterGroup&this.collisionFilterMask)==0)return;let a=x7,r=M7;for(let o=0,s=e.shapes.length;oe.boundingSphereRadius)return;let s=this[e.type];s&&s.call(this,e,t,i,a,e)}_intersectBox(e,t,i,a,r){return this._intersectConvex(e.convexPolyhedronRepresentation,t,i,a,r)}_intersectPlane(e,t,i,a,r){let o=this.from,s=this.to,c=this.direction,l=new y(0,0,1);t.vmult(l,l);let u=new y;o.vsub(i,u);let f=u.dot(l);s.vsub(i,u);let h=u.dot(l);if(f*h>0||o.distanceTo(s)=0&&g<=1&&(o.lerp(s,g,m),m.vsub(i,v),v.normalize(),this.reportIntersection(v,m,r,a,-1)),this.result.shouldStop)return;x>=0&&x<=1&&(o.lerp(s,x,m),m.vsub(i,v),v.normalize(),this.reportIntersection(v,m,r,a,-1))}}_intersectConvex(e,t,i,a,r,o){let s=A7,c=Ua,l=o&&o.faceList||null,u=e.faces,f=e.vertices,h=e.faceNormals,m=this.direction,v=this.from,g=this.to,x=v.distanceTo(g),p=l?l.length:u.length,d=this.result;for(let A=0;!d.shouldStop&&Ax||this.reportIntersection(s,D2,r,a,b)}}}}_intersectTrimesh(e,t,i,a,r,o){let s=w7,c=T7,l=H7,u=Ua,f=S7,h=_7,m=E7,v=D7,g=L7,x=e.indices;e.vertices;let p=this.from,d=this.to,A=this.direction;l.position.copy(i),l.quaternion.copy(t),N1.vectorToLocalFrame(i,t,A,f),N1.pointToLocalFrame(i,t,p,h),N1.pointToLocalFrame(i,t,d,m),m.x*=e.scale.x,m.y*=e.scale.y,m.z*=e.scale.z,h.x*=e.scale.x,h.y*=e.scale.y,h.z*=e.scale.z,m.vsub(h,f),f.normalize();let b=h.distanceSquared(m);e.tree.rayQuery(this,l,c);for(let C=0,E=c.length;!this.result.shouldStop&&C!==E;C++){let T=c[C];e.getNormal(T,s),e.getVertex(x[T*3],$2),$2.vsub(h,u);let _=f.dot(s),P=s.dot(u)/_;if(P<0)continue;f.scale(P,D2),D2.vadd(h,D2),e.getVertex(x[T*3+1],ve),e.getVertex(x[T*3+2],ge);let F=D2.distanceSquared(h);!(J1.pointInTriangle(D2,ve,$2,ge)||J1.pointInTriangle(D2,$2,ve,ge))||F>b||(N1.vectorToWorldFrame(t,s,g),N1.pointToWorldFrame(i,t,D2,v),this.reportIntersection(g,v,r,a,T))}c.length=0}reportIntersection(e,t,i,a,r){let o=this.from,s=this.to,c=o.distanceTo(t),l=this.result;if(!(this.skipBackfaces&&e.dot(this.direction)>0))switch(l.hitFaceIndex=typeof r!="undefined"?r:-1,this.mode){case J1.ALL:this.hasHit=!0,l.set(o,s,e,t,i,a,c),l.hasHit=!0,this.callback(l);break;case J1.CLOSEST:(c=0&&(f=r*l-o*s)>=0&&u+fT.maxForce&&(m=T.maxForce-x),A[E]+=m,v+=m>0?m:-m,T.addToWlambda(m)}if(v*ve;)t.pop();for(;t.length=0&&u.restitution>=0&&(s.restitution=l.restitution*u.restitution),s.si=r||i,s.sj=o||a,s}createFrictionEquationsFromContact(e,t){let i=e.bi,a=e.bj,r=e.si,o=e.sj,s=this.world,c=this.currentContactMaterial,l=c.friction,u=r.material||i.material,f=o.material||a.material;if(u&&f&&u.friction>=0&&f.friction>=0&&(l=u.friction*f.friction),l>0){let h=l*s.gravity.length(),m=i.invMass+a.invMass;m>0&&(m=1/m);let v=this.frictionEquationPool,g=v.length?v.pop():new Y0(i,a,h*m),x=v.length?v.pop():new Y0(i,a,h*m);return g.bi=x.bi=i,g.bj=x.bj=a,g.minForce=x.minForce=-h*m,g.maxForce=x.maxForce=h*m,g.ri.copy(e.ri),g.rj.copy(e.rj),x.ri.copy(e.ri),x.rj.copy(e.rj),e.ni.tangents(g.t,x.t),g.setSpookParams(c.frictionEquationStiffness,c.frictionEquationRelaxation,s.dt),x.setSpookParams(c.frictionEquationStiffness,c.frictionEquationRelaxation,s.dt),g.enabled=x.enabled=e.enabled,t.push(g,x),!0}return!1}createFrictionFromAverage(e){let t=this.result[this.result.length-1];if(!this.createFrictionEquationsFromContact(t,this.frictionResult)||e===1)return;let i=this.frictionResult[this.frictionResult.length-2],a=this.frictionResult[this.frictionResult.length-1];C4.setZero(),O4.setZero(),G4.setZero();let r=t.bi;t.bj;for(let s=0;s!==e;s++)t=this.result[this.result.length-1-s],t.bi!==r?(C4.vadd(t.ni,C4),O4.vadd(t.ri,O4),G4.vadd(t.rj,G4)):(C4.vsub(t.ni,C4),O4.vadd(t.rj,O4),G4.vadd(t.ri,G4));let o=1/e;O4.scale(o,i.ri),G4.scale(o,i.rj),a.ri.copy(i.ri),a.rj.copy(i.rj),C4.normalize(),C4.tangents(i.t,a.t)}getContacts(e,t,i,a,r,o,s){this.contactPointPool=r,this.frictionEquationPool=s,this.result=a,this.frictionResult=o;let c=$7,l=K7,u=Z7,f=Y7;for(let h=0,m=e.length;h!==m;h++){let v=e[h],g=t[h],x=null;v.material&&g.material&&(x=i.getContactMaterial(v.material,g.material)||null);let p=v.type&i1.KINEMATIC&&g.type&i1.STATIC||v.type&i1.STATIC&&g.type&i1.KINEMATIC||v.type&i1.KINEMATIC&&g.type&i1.KINEMATIC;for(let d=0;dA.boundingSphereRadius+C.boundingSphereRadius)continue;let E=null;A.material&&C.material&&(E=i.getContactMaterial(A.material,C.material)||null),this.currentContactMaterial=E||x||i.defaultContactMaterial;let T=A.type|C.type,_=this[T];if(_){let P=!1;A.type0){let W=yl,X=Cl;W.copy(m[(L+1)%3]),X.copy(m[(L+2)%3]);let Q=W.length(),a1=X.length();W.normalize(),X.normalize();let B=b6.dot(W),M1=b6.dot(X);if(B-Q&&M1-a1){let u1=Math.abs(O-Z-v);if((T===null||u1e.boundingSphereRadius+t.boundingSphereRadius)&&e.findSeparatingAxis(t,i,r,a,o,v,h,m)){let g=[],x=Gl;e.clipAgainstHull(i,r,t,a,o,v,-100,100,g);let p=0;for(let d=0;d!==g.length;d++){if(f)return!0;let A=this.createContactEquation(s,c,e,t,l,u),b=A.ri,C=A.rj;v.negate(A.ni),g[d].normal.negate(x),x.scale(g[d].depth,x),g[d].point.vadd(x,b),C.copy(g[d].point),b.vsub(i,b),C.vsub(a,C),b.vadd(i,b),b.vsub(s.position,b),C.vadd(a,C),C.vsub(c.position,C),this.result.push(A),p++,this.enableFrictionReduction||this.createFrictionEquationsFromContact(A,this.frictionResult)}this.enableFrictionReduction&&p&&this.createFrictionFromAverage(p)}}sphereConvex(e,t,i,a,r,o,s,c,l,u,f){let h=this.v3pool;i.vsub(a,El);let m=t.faceNormals,v=t.faces,g=t.vertices,x=e.radius,p=!1;for(let d=0;d!==g.length;d++){let A=g[d],b=Hl;o.vmult(A,b),a.vadd(b,b);let C=Tl;if(b.vsub(i,C),C.lengthSquared()0){let D=[];for(let z=0,H=C.length;z!==H;z++){let V=h.get();o.vmult(g[C[z]],V),a.vadd(V,V),D.push(V)}if(Ml(D,E,i)){if(f)return!0;p=!0;let z=this.createContactEquation(s,c,e,t,l,u);E.scale(-x,z.ri),E.negate(z.ni);let H=h.get();E.scale(-F,H);let V=h.get();E.scale(-x,V),i.vsub(a,z.rj),z.rj.vadd(V,z.rj),z.rj.vadd(H,z.rj),z.rj.vadd(a,z.rj),z.rj.vsub(c.position,z.rj),z.ri.vadd(i,z.ri),z.ri.vsub(s.position,z.ri),h.release(H),h.release(V),this.result.push(z),this.createFrictionEquationsFromContact(z,this.frictionResult);for(let L=0,N=D.length;L!==N;L++)h.release(D[L]);return}else for(let z=0;z!==C.length;z++){let H=h.get(),V=h.get();o.vmult(g[C[(z+1)%C.length]],H),o.vmult(g[C[(z+2)%C.length]],V),a.vadd(H,H),a.vadd(V,V);let L=Ll;V.vsub(H,L);let N=Dl;L.unit(N);let U=h.get(),Z=h.get();i.vsub(H,Z);let O=Z.dot(N);N.scale(O,U),U.vadd(H,U);let W=h.get();if(U.vsub(i,W),O>0&&O*Oh.length||A>h[0].length)return;p<0&&(p=0),d<0&&(d=0),A<0&&(A=0),b<0&&(b=0),p>=h.length&&(p=h.length-1),d>=h.length&&(d=h.length-1),b>=h[0].length&&(b=h[0].length-1),A>=h[0].length&&(A=h[0].length-1);let C=[];t.getRectMinMax(p,A,d,b,C);let E=C[0],T=C[1];if(x.z-m>T||x.z+m2)return}}boxHeightfield(e,t,i,a,r,o,s,c,l,u,f){return e.convexPolyhedronRepresentation.material=e.material,e.convexPolyhedronRepresentation.collisionResponse=e.collisionResponse,this.convexHeightfield(e.convexPolyhedronRepresentation,t,i,a,r,o,s,c,e,t,f)}convexHeightfield(e,t,i,a,r,o,s,c,l,u,f){let h=t.data,m=t.elementSize,v=e.boundingSphereRadius,g=Jl,x=Ql,p=Kl;N1.pointToLocalFrame(a,o,i,p);let d=Math.floor((p.x-v)/m)-1,A=Math.ceil((p.x+v)/m)+1,b=Math.floor((p.y-v)/m)-1,C=Math.ceil((p.y+v)/m)+1;if(A<0||C<0||d>h.length||b>h[0].length)return;d<0&&(d=0),A<0&&(A=0),b<0&&(b=0),C<0&&(C=0),d>=h.length&&(d=h.length-1),A>=h.length&&(A=h.length-1),C>=h[0].length&&(C=h[0].length-1),b>=h[0].length&&(b=h[0].length-1);let E=[];t.getRectMinMax(d,b,A,C,E);let T=E[0],_=E[1];if(!(p.z-v>_||p.z+v0&&V<0&&(x.vsub(h,p),g.copy(v),g.normalize(),L=p.dot(g),g.scale(L,p),p.vadd(h,p),p.distanceTo(x)0&&i===!0||u<=0&&i===!1){i===null&&(i=u>0);continue}else return!1}return!0}var b6=new y,bl=new y,yl=new y,Cl=new y,zl=[new y,new y,new y,new y,new y,new y],Al=new y,wl=new y,Sl=new y,_l=new y,El=new y,Ll=new y,Dl=new y,Tl=new y,Hl=new y,Vl=new y,Nl=new y,Rl=new y,Fl=new y,Bl=new y,Pl=new y,Il=new y,kl=new y,Ul=new y,Ol=new y,Gl=new y,ql=new y,Wl=new y,jl=new y,Xl=new y,Ar=new O1,Zl=new y,Yl=new y,wr=new y,$l=new y,Kl=new y,Jl=new y,Ql=[0],e9=new y,t9=new y,$0=class{constructor(){this.current=void 0,this.previous=void 0,this.current=[],this.previous=[]}getKey(e,t){if(ta[r];)r++;if(i!==a[r]){for(let o=a.length-1;o>=r;o--)a[o+1]=a[o];a[r]=i}}tick(){let e=this.current;this.current=this.previous,this.previous=e,this.current.length=0}getDiff(e,t){let i=this.current,a=this.previous,r=i.length,o=a.length,s=0;for(let c=0;ca[s];)s++;l=u===a[s],l||Sr(e,u)}s=0;for(let c=0;ci[s];)s++;l=i[s]===u,l||Sr(t,u)}}};function Sr(n,e){n.push((e&4294901760)>>16,e&65535)}var _r=class{constructor(){this.data={keys:[]}}get(e,t){if(e>t){let i=t;t=e,e=i}return this.data[e+"-"+t]}set(e,t,i){if(e>t){let r=t;t=e,e=r}let a=e+"-"+t;this.get(e,t)||this.data.keys.push(a),this.data[a]=i}reset(){let e=this.data,t=e.keys;for(;t.length>0;){let i=t.pop();delete e[i]}}},K0=class extends I0{constructor(e={}){super();this.dt=void 0,this.allowSleep=void 0,this.contacts=void 0,this.frictionEquations=void 0,this.quatNormalizeSkip=void 0,this.quatNormalizeFast=void 0,this.time=void 0,this.stepnumber=void 0,this.default_dt=void 0,this.nextId=void 0,this.gravity=void 0,this.broadphase=void 0,this.bodies=void 0,this.hasActiveBodies=void 0,this.solver=void 0,this.constraints=void 0,this.narrowphase=void 0,this.collisionMatrix=void 0,this.collisionMatrixPrevious=void 0,this.bodyOverlapKeeper=void 0,this.shapeOverlapKeeper=void 0,this.materials=void 0,this.contactmaterials=void 0,this.contactMaterialTable=void 0,this.defaultMaterial=void 0,this.defaultContactMaterial=void 0,this.doProfiling=void 0,this.profile=void 0,this.accumulator=void 0,this.subsystems=void 0,this.addBodyEvent=void 0,this.removeBodyEvent=void 0,this.idToBodyMap=void 0,this.dt=-1,this.allowSleep=!!e.allowSleep,this.contacts=[],this.frictionEquations=[],this.quatNormalizeSkip=e.quatNormalizeSkip!==void 0?e.quatNormalizeSkip:0,this.quatNormalizeFast=e.quatNormalizeFast!==void 0?e.quatNormalizeFast:!1,this.time=0,this.stepnumber=0,this.default_dt=1/60,this.nextId=0,this.gravity=new y,e.gravity&&this.gravity.copy(e.gravity),this.broadphase=e.broadphase!==void 0?e.broadphase:new d6,this.bodies=[],this.hasActiveBodies=!1,this.solver=e.solver!==void 0?e.solver:new Za,this.constraints=[],this.narrowphase=new Cr(this),this.collisionMatrix=new P0,this.collisionMatrixPrevious=new P0,this.bodyOverlapKeeper=new $0,this.shapeOverlapKeeper=new $0,this.materials=[],this.contactmaterials=[],this.contactMaterialTable=new _r,this.defaultMaterial=new Ne("default"),this.defaultContactMaterial=new Ve(this.defaultMaterial,this.defaultMaterial,{friction:.3,restitution:0}),this.doProfiling=!1,this.profile={solve:0,makeContactConstraints:0,broadphase:0,integrate:0,narrowphase:0},this.accumulator=0,this.subsystems=[],this.addBodyEvent={type:"addBody",body:null},this.removeBodyEvent={type:"removeBody",body:null},this.idToBodyMap={},this.broadphase.setWorld(this)}getContactMaterial(e,t){return this.contactMaterialTable.get(e.id,t.id)}numObjects(){return this.bodies.length}collisionMatrixTick(){let e=this.collisionMatrixPrevious;this.collisionMatrixPrevious=this.collisionMatrix,this.collisionMatrix=e,this.collisionMatrix.reset(),this.bodyOverlapKeeper.tick(),this.shapeOverlapKeeper.tick()}addConstraint(e){this.constraints.push(e)}removeConstraint(e){let t=this.constraints.indexOf(e);t!==-1&&this.constraints.splice(t,1)}rayTest(e,t,i){i instanceof p6?this.raycastClosest(e,t,{skipBackfaces:!0},i):this.raycastAll(e,t,{skipBackfaces:!0},i)}raycastAll(e,t,i={},a){return i.mode=J1.ALL,i.from=e,i.to=t,i.callback=a,J0.intersectWorld(this,i)}raycastAny(e,t,i={},a){return i.mode=J1.ANY,i.from=e,i.to=t,i.result=a,J0.intersectWorld(this,i)}raycastClosest(e,t,i={},a){return i.mode=J1.CLOSEST,i.from=e,i.to=t,i.result=a,J0.intersectWorld(this,i)}addBody(e){this.bodies.includes(e)||(e.index=this.bodies.length,this.bodies.push(e),e.world=this,e.initPosition.copy(e.position),e.initVelocity.copy(e.velocity),e.timeLastSleepy=this.time,e instanceof i1&&(e.initAngularVelocity.copy(e.angularVelocity),e.initQuaternion.copy(e.quaternion)),this.collisionMatrix.setNumObjects(this.bodies.length),this.addBodyEvent.body=e,this.idToBodyMap[e.id]=e,this.dispatchEvent(this.addBodyEvent))}removeBody(e){e.world=null;let t=this.bodies.length-1,i=this.bodies,a=i.indexOf(e);if(a!==-1){i.splice(a,1);for(let r=0;r!==i.length;r++)i[r].index=r;this.collisionMatrix.setNumObjects(t),this.removeBodyEvent.body=e,delete this.idToBodyMap[e.id],this.dispatchEvent(this.removeBodyEvent)}}getBodyById(e){return this.idToBodyMap[e]}getShapeById(e){let t=this.bodies;for(let i=0;i=e&&re*1e3)););this.accumulator=this.accumulator%e;let o=this.accumulator/e;for(let s=0;s!==this.bodies.length;s++){let c=this.bodies[s];c.previousPosition.lerp(c.position,o,c.interpolatedPosition),c.previousQuaternion.slerp(c.quaternion,o,c.interpolatedQuaternion),c.previousQuaternion.normalize()}this.time+=t}}internalStep(e){this.dt=e;let t=this.contacts,i=s9,a=o9,r=this.numObjects(),o=this.bodies,s=this.solver,c=this.gravity,l=this.doProfiling,u=this.profile,f=i1.DYNAMIC,h=-1/0,m=this.constraints,v=n9;c.length();let g=c.x,x=c.y,p=c.z,d=0;for(l&&(h=o2.now()),d=0;d!==r;d++){let z=o[d];if(z.type===f){let H=z.force,V=z.mass;H.x+=V*g,H.y+=V*x,H.z+=V*p}}for(let z=0,H=this.subsystems.length;z!==H;z++)this.subsystems[z].update();l&&(h=o2.now()),i.length=0,a.length=0,this.broadphase.collisionPairs(this,i,a),l&&(u.broadphase=o2.now()-h);let A=m.length;for(d=0;d!==A;d++){let z=m[d];if(!z.collideConnected)for(let H=i.length-1;H>=0;H-=1)(z.bodyA===i[H]&&z.bodyB===a[H]||z.bodyB===i[H]&&z.bodyA===a[H])&&(i.splice(H,1),a.splice(H,1))}this.collisionMatrixTick(),l&&(h=o2.now());let b=r9,C=t.length;for(d=0;d!==C;d++)b.push(t[d]);t.length=0;let E=this.frictionEquations.length;for(d=0;d!==E;d++)v.push(this.frictionEquations[d]);for(this.frictionEquations.length=0,this.narrowphase.getContacts(i,a,this,t,b,this.frictionEquations,v),l&&(u.narrowphase=o2.now()-h),l&&(h=o2.now()),d=0;d=0&&L.material.friction>=0&&V.material.friction*L.material.friction,V.material.restitution>=0&&L.material.restitution>=0&&(H.restitution=V.material.restitution*L.material.restitution)),s.addEquation(H),V.allowSleep&&V.type===i1.DYNAMIC&&V.sleepState===i1.SLEEPING&&L.sleepState===i1.AWAKE&&L.type!==i1.STATIC){let O=L.velocity.lengthSquared()+L.angularVelocity.lengthSquared(),W=L.sleepSpeedLimit**2;O>=W*2&&(V.wakeUpAfterNarrowphase=!0)}if(L.allowSleep&&L.type===i1.DYNAMIC&&L.sleepState===i1.SLEEPING&&V.sleepState===i1.AWAKE&&V.type!==i1.STATIC){let O=V.velocity.lengthSquared()+V.angularVelocity.lengthSquared(),W=V.sleepSpeedLimit**2;O>=W*2&&(L.wakeUpAfterNarrowphase=!0)}this.collisionMatrix.set(V,L,!0),this.collisionMatrixPrevious.get(V,L)||(At.body=L,At.contact=H,V.dispatchEvent(At),At.body=V,L.dispatchEvent(At)),this.bodyOverlapKeeper.set(V.id,L.id),this.shapeOverlapKeeper.set(N.id,U.id)}for(this.emitContactEvents(),l&&(u.makeContactConstraints=o2.now()-h,h=o2.now()),d=0;d!==r;d++){let z=o[d];z.wakeUpAfterNarrowphase&&(z.wakeUp(),z.wakeUpAfterNarrowphase=!1)}for(A=m.length,d=0;d!==A;d++){let z=m[d];z.update();for(let H=0,V=z.equations.length;H!==V;H++){let L=z.equations[H];s.addEquation(L)}}s.solve(e,this),l&&(u.solve=o2.now()-h),s.removeAllEquations();let _=Math.pow;for(d=0;d!==r;d++){let z=o[d];if(z.type&f){let H=_(1-z.linearDamping,e),V=z.velocity;V.scale(H,V);let L=z.angularVelocity;if(L){let N=_(1-z.angularDamping,e);L.scale(N,L)}}}for(this.dispatchEvent(a9),d=0;d!==r;d++){let z=o[d];z.preStep&&z.preStep.call(z)}l&&(h=o2.now());let F=this.stepnumber%(this.quatNormalizeSkip+1)==0,M=this.quatNormalizeFast;for(d=0;d!==r;d++)o[d].integrate(e,F,M);for(this.clearForces(),this.broadphase.dirty=!0,l&&(u.integrate=o2.now()-h),this.stepnumber+=1,this.dispatchEvent(i9),d=0;d!==r;d++){let z=o[d],H=z.postStep;H&&H.call(z)}let D=!0;if(this.allowSleep)for(D=!1,d=0;d!==r;d++){let z=o[d];z.sleepTick(this.time),z.sleepState!==i1.SLEEPING&&(D=!0)}this.hasActiveBodies=D}emitContactEvents(){let e=this.hasAnyEventListener("beginContact"),t=this.hasAnyEventListener("endContact");if((e||t)&&this.bodyOverlapKeeper.getDiff(Fe,Be),e){for(let r=0,o=Fe.length;rDate.now()-n}var i9={type:"postStep"},a9={type:"preStep"},At={type:i1.COLLIDE_EVENT_NAME,body:null,contact:null},r9=[],n9=[],s9=[],o9=[],Fe=[],Be=[],wt={type:"beginContact",bodyA:null,bodyB:null},St={type:"endContact",bodyA:null,bodyB:null},Pe={type:"beginShapeContact",bodyA:null,bodyB:null,shapeA:null,shapeB:null},Ie={type:"endShapeContact",bodyA:null,bodyB:null,shapeA:null,shapeB:null};var q1=class{constructor(e=0,t=0,i=0,a=1){this.x=e,this.y=t,this.z=i,this.w=a}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,i,a){return this.x=e,this.y=t,this.z=i,this.w=a,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e,t){return t!==void 0?(console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this)}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e,t){return t!==void 0?(console.warn("THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this)}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){let t=this.x,i=this.y,a=this.z,r=this.w,o=e.elements;return this.x=o[0]*t+o[4]*i+o[8]*a+o[12]*r,this.y=o[1]*t+o[5]*i+o[9]*a+o[13]*r,this.z=o[2]*t+o[6]*i+o[10]*a+o[14]*r,this.w=o[3]*t+o[7]*i+o[11]*a+o[15]*r,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);let t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,i,a,r,o=.01,s=.1,c=e.elements,l=c[0],u=c[4],f=c[8],h=c[1],m=c[5],v=c[9],g=c[2],x=c[6],p=c[10];if(Math.abs(u-h)b&&A>C?AC?b>8&255]+d2[n>>16&255]+d2[n>>24&255]+"-"+d2[e&255]+d2[e>>8&255]+"-"+d2[e>>16&15|64]+d2[e>>24&255]+"-"+d2[t&63|128]+d2[t>>8&255]+"-"+d2[t>>16&255]+d2[t>>24&255]+d2[i&255]+d2[i>>8&255]+d2[i>>16&255]+d2[i>>24&255]).toUpperCase()}function T2(n,e,t){return Math.max(e,Math.min(t,n))}function Er(n,e){return(n%e+e)%e}function C6(n,e,t){return(1-t)*n+t*e}function Q0(n){return(n&n-1)==0&&n!==0}function Lr(n){return Math.pow(2,Math.floor(Math.log(n)/Math.LN2))}var Me=class{constructor(e=0,t=0,i=0,a=1){this._x=e,this._y=t,this._z=i,this._w=a}static slerp(e,t,i,a){return console.warn("THREE.Quaternion: Static .slerp() has been deprecated. Use qm.slerpQuaternions( qa, qb, t ) instead."),i.slerpQuaternions(e,t,a)}static slerpFlat(e,t,i,a,r,o,s){let c=i[a+0],l=i[a+1],u=i[a+2],f=i[a+3],h=r[o+0],m=r[o+1],v=r[o+2],g=r[o+3];if(s===0){e[t+0]=c,e[t+1]=l,e[t+2]=u,e[t+3]=f;return}if(s===1){e[t+0]=h,e[t+1]=m,e[t+2]=v,e[t+3]=g;return}if(f!==g||c!==h||l!==m||u!==v){let x=1-s,p=c*h+l*m+u*v+f*g,d=p>=0?1:-1,A=1-p*p;if(A>Number.EPSILON){let C=Math.sqrt(A),E=Math.atan2(C,p*d);x=Math.sin(x*E)/C,s=Math.sin(s*E)/C}let b=s*d;if(c=c*x+h*b,l=l*x+m*b,u=u*x+v*b,f=f*x+g*b,x===1-s){let C=1/Math.sqrt(c*c+l*l+u*u+f*f);c*=C,l*=C,u*=C,f*=C}}e[t]=c,e[t+1]=l,e[t+2]=u,e[t+3]=f}static multiplyQuaternionsFlat(e,t,i,a,r,o){let s=i[a],c=i[a+1],l=i[a+2],u=i[a+3],f=r[o],h=r[o+1],m=r[o+2],v=r[o+3];return e[t]=s*v+u*f+c*m-l*h,e[t+1]=c*v+u*h+l*f-s*m,e[t+2]=l*v+u*m+s*h-c*f,e[t+3]=u*v-s*f-c*h-l*m,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,i,a){return this._x=e,this._y=t,this._z=i,this._w=a,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t){if(!(e&&e.isEuler))throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");let i=e._x,a=e._y,r=e._z,o=e._order,s=Math.cos,c=Math.sin,l=s(i/2),u=s(a/2),f=s(r/2),h=c(i/2),m=c(a/2),v=c(r/2);switch(o){case"XYZ":this._x=h*u*f+l*m*v,this._y=l*m*f-h*u*v,this._z=l*u*v+h*m*f,this._w=l*u*f-h*m*v;break;case"YXZ":this._x=h*u*f+l*m*v,this._y=l*m*f-h*u*v,this._z=l*u*v-h*m*f,this._w=l*u*f+h*m*v;break;case"ZXY":this._x=h*u*f-l*m*v,this._y=l*m*f+h*u*v,this._z=l*u*v+h*m*f,this._w=l*u*f-h*m*v;break;case"ZYX":this._x=h*u*f-l*m*v,this._y=l*m*f+h*u*v,this._z=l*u*v-h*m*f,this._w=l*u*f+h*m*v;break;case"YZX":this._x=h*u*f+l*m*v,this._y=l*m*f+h*u*v,this._z=l*u*v-h*m*f,this._w=l*u*f-h*m*v;break;case"XZY":this._x=h*u*f-l*m*v,this._y=l*m*f-h*u*v,this._z=l*u*v+h*m*f,this._w=l*u*f+h*m*v;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+o)}return t!==!1&&this._onChangeCallback(),this}setFromAxisAngle(e,t){let i=t/2,a=Math.sin(i);return this._x=e.x*a,this._y=e.y*a,this._z=e.z*a,this._w=Math.cos(i),this._onChangeCallback(),this}setFromRotationMatrix(e){let t=e.elements,i=t[0],a=t[4],r=t[8],o=t[1],s=t[5],c=t[9],l=t[2],u=t[6],f=t[10],h=i+s+f;if(h>0){let m=.5/Math.sqrt(h+1);this._w=.25/m,this._x=(u-c)*m,this._y=(r-l)*m,this._z=(o-a)*m}else if(i>s&&i>f){let m=2*Math.sqrt(1+i-s-f);this._w=(u-c)/m,this._x=.25*m,this._y=(a+o)/m,this._z=(r+l)/m}else if(s>f){let m=2*Math.sqrt(1+s-i-f);this._w=(r-l)/m,this._x=(a+o)/m,this._y=.25*m,this._z=(c+u)/m}else{let m=2*Math.sqrt(1+f-i-s);this._w=(o-a)/m,this._x=(r+l)/m,this._y=(c+u)/m,this._z=.25*m}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let i=e.dot(t)+1;return iMath.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=i):(this._x=0,this._y=-e.z,this._z=e.y,this._w=i)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=i),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(T2(this.dot(e),-1,1)))}rotateTowards(e,t){let i=this.angleTo(e);if(i===0)return this;let a=Math.min(1,t/i);return this.slerp(e,a),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e,t){return t!==void 0?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(e,t)):this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){let i=e._x,a=e._y,r=e._z,o=e._w,s=t._x,c=t._y,l=t._z,u=t._w;return this._x=i*u+o*s+a*l-r*c,this._y=a*u+o*c+r*s-i*l,this._z=r*u+o*l+i*c-a*s,this._w=o*u-i*s-a*c-r*l,this._onChangeCallback(),this}slerp(e,t){if(t===0)return this;if(t===1)return this.copy(e);let i=this._x,a=this._y,r=this._z,o=this._w,s=o*e._w+i*e._x+a*e._y+r*e._z;if(s<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,s=-s):this.copy(e),s>=1)return this._w=o,this._x=i,this._y=a,this._z=r,this;let c=1-s*s;if(c<=Number.EPSILON){let m=1-t;return this._w=m*o+t*this._w,this._x=m*i+t*this._x,this._y=m*a+t*this._y,this._z=m*r+t*this._z,this.normalize(),this._onChangeCallback(),this}let l=Math.sqrt(c),u=Math.atan2(l,s),f=Math.sin((1-t)*u)/l,h=Math.sin(t*u)/l;return this._w=o*f+this._w*h,this._x=i*f+this._x*h,this._y=a*f+this._y*h,this._z=r*f+this._z*h,this._onChangeCallback(),this}slerpQuaternions(e,t,i){return this.copy(e).slerp(t,i)}random(){let e=Math.random(),t=Math.sqrt(1-e),i=Math.sqrt(e),a=2*Math.PI*Math.random(),r=2*Math.PI*Math.random();return this.set(t*Math.cos(a),i*Math.sin(r),i*Math.cos(r),t*Math.sin(a))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}};Me.prototype.isQuaternion=!0;var k=class{constructor(e=0,t=0,i=0){this.x=e,this.y=t,this.z=i}set(e,t,i){return i===void 0&&(i=this.z),this.x=e,this.y=t,this.z=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e,t){return t!==void 0?(console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this.z+=e.z,this)}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e,t){return t!==void 0?(console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this.z-=e.z,this)}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e,t){return t!==void 0?(console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(e,t)):(this.x*=e.x,this.y*=e.y,this.z*=e.z,this)}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return e&&e.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(Dr.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(Dr.setFromAxisAngle(e,t))}applyMatrix3(e){let t=this.x,i=this.y,a=this.z,r=e.elements;return this.x=r[0]*t+r[3]*i+r[6]*a,this.y=r[1]*t+r[4]*i+r[7]*a,this.z=r[2]*t+r[5]*i+r[8]*a,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){let t=this.x,i=this.y,a=this.z,r=e.elements,o=1/(r[3]*t+r[7]*i+r[11]*a+r[15]);return this.x=(r[0]*t+r[4]*i+r[8]*a+r[12])*o,this.y=(r[1]*t+r[5]*i+r[9]*a+r[13])*o,this.z=(r[2]*t+r[6]*i+r[10]*a+r[14])*o,this}applyQuaternion(e){let t=this.x,i=this.y,a=this.z,r=e.x,o=e.y,s=e.z,c=e.w,l=c*t+o*a-s*i,u=c*i+s*t-r*a,f=c*a+r*i-o*t,h=-r*t-o*i-s*a;return this.x=l*c+h*-r+u*-s-f*-o,this.y=u*c+h*-o+f*-r-l*-s,this.z=f*c+h*-s+l*-o-u*-r,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){let t=this.x,i=this.y,a=this.z,r=e.elements;return this.x=r[0]*t+r[4]*i+r[8]*a,this.y=r[1]*t+r[5]*i+r[9]*a,this.z=r[2]*t+r[6]*i+r[10]*a,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this}clampLength(e,t){let i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this}cross(e,t){return t!==void 0?(console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(e,t)):this.crossVectors(this,e)}crossVectors(e,t){let i=e.x,a=e.y,r=e.z,o=t.x,s=t.y,c=t.z;return this.x=a*c-r*s,this.y=r*o-i*c,this.z=i*s-a*o,this}projectOnVector(e){let t=e.lengthSq();if(t===0)return this.set(0,0,0);let i=e.dot(this)/t;return this.copy(e).multiplyScalar(i)}projectOnPlane(e){return e3.copy(this).projectOnVector(e),this.sub(e3)}reflect(e){return this.sub(e3.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){let t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;let i=this.dot(e)/t;return Math.acos(T2(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,i=this.y-e.y,a=this.z-e.z;return t*t+i*i+a*a}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,i){let a=Math.sin(t)*e;return this.x=a*Math.sin(i),this.y=Math.cos(t)*e,this.z=a*Math.cos(i),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,i){return this.x=e*Math.sin(t),this.y=i,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){let t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){let t=this.setFromMatrixColumn(e,0).length(),i=this.setFromMatrixColumn(e,1).length(),a=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=i,this.z=a,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,t*4)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,t*3)}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t,i){return i!==void 0&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){let e=(Math.random()-.5)*2,t=Math.random()*Math.PI*2,i=Math.sqrt(1-e**2);return this.x=i*Math.cos(t),this.y=i*Math.sin(t),this.z=e,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}};k.prototype.isVector3=!0;var e3=new k,Dr=new Me;var z1=class{constructor(e=0,t=0){this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e,t){return t!==void 0?(console.warn("THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this)}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e,t){return t!==void 0?(console.warn("THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this)}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){let t=this.x,i=this.y,a=e.elements;return this.x=a[0]*t+a[3]*i+a[6],this.y=a[1]*t+a[4]*i+a[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this}clampLength(e,t){let i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,i=this.y-e.y;return t*t+i*i}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t,i){return i!==void 0&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){let i=Math.cos(t),a=Math.sin(t),r=this.x-e.x,o=this.y-e.y;return this.x=r*i-o*a+e.x,this.y=r*a+o*i+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}};z1.prototype.isVector2=!0;var Tr={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},K2={h:0,s:0,l:0},z6={h:0,s:0,l:0};function t3(n,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?n+(e-n)*6*t:t<1/2?e:t<2/3?n+(e-n)*6*(2/3-t):n}function z4(n){return n<.04045?n*.0773993808:Math.pow(n*.9478672986+.0521327014,2.4)}function i3(n){return n<.0031308?n*12.92:1.055*Math.pow(n,.41666)-.055}var x1=class{constructor(e,t,i){return t===void 0&&i===void 0?this.set(e):this.setRGB(e,t,i)}set(e){return e&&e.isColor?this.copy(e):typeof e=="number"?this.setHex(e):typeof e=="string"&&this.setStyle(e),this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,this}setRGB(e,t,i){return this.r=e,this.g=t,this.b=i,this}setHSL(e,t,i){if(e=Er(e,1),t=T2(t,0,1),i=T2(i,0,1),t===0)this.r=this.g=this.b=i;else{let a=i<=.5?i*(1+t):i+t-i*t,r=2*i-a;this.r=t3(r,a,e+1/3),this.g=t3(r,a,e),this.b=t3(r,a,e-1/3)}return this}setStyle(e){function t(a){a!==void 0&&parseFloat(a)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let i;if(i=/^((?:rgb|hsl)a?)\(([^\)]*)\)/.exec(e)){let a,r=i[1],o=i[2];switch(r){case"rgb":case"rgba":if(a=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return this.r=Math.min(255,parseInt(a[1],10))/255,this.g=Math.min(255,parseInt(a[2],10))/255,this.b=Math.min(255,parseInt(a[3],10))/255,t(a[4]),this;if(a=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return this.r=Math.min(100,parseInt(a[1],10))/100,this.g=Math.min(100,parseInt(a[2],10))/100,this.b=Math.min(100,parseInt(a[3],10))/100,t(a[4]),this;break;case"hsl":case"hsla":if(a=/^\s*(\d*\.?\d+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o)){let s=parseFloat(a[1])/360,c=parseInt(a[2],10)/100,l=parseInt(a[3],10)/100;return t(a[4]),this.setHSL(s,c,l)}break}}else if(i=/^\#([A-Fa-f\d]+)$/.exec(e)){let a=i[1],r=a.length;if(r===3)return this.r=parseInt(a.charAt(0)+a.charAt(0),16)/255,this.g=parseInt(a.charAt(1)+a.charAt(1),16)/255,this.b=parseInt(a.charAt(2)+a.charAt(2),16)/255,this;if(r===6)return this.r=parseInt(a.charAt(0)+a.charAt(1),16)/255,this.g=parseInt(a.charAt(2)+a.charAt(3),16)/255,this.b=parseInt(a.charAt(4)+a.charAt(5),16)/255,this}return e&&e.length>0?this.setColorName(e):this}setColorName(e){let t=Tr[e.toLowerCase()];return t!==void 0?this.setHex(t):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=z4(e.r),this.g=z4(e.g),this.b=z4(e.b),this}copyLinearToSRGB(e){return this.r=i3(e.r),this.g=i3(e.g),this.b=i3(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(){return this.r*255<<16^this.g*255<<8^this.b*255<<0}getHexString(){return("000000"+this.getHex().toString(16)).slice(-6)}getHSL(e){let t=this.r,i=this.g,a=this.b,r=Math.max(t,i,a),o=Math.min(t,i,a),s,c,l=(o+r)/2;if(o===r)s=0,c=0;else{let u=r-o;switch(c=l<=.5?u/(r+o):u/(2-r-o),r){case t:s=(i-a)/u+(ir&&(r=u),f>o&&(o=f),h>s&&(s=h)}return this.min.set(t,i,a),this.max.set(r,o,s),this}setFromBufferAttribute(e){let t=1/0,i=1/0,a=1/0,r=-1/0,o=-1/0,s=-1/0;for(let c=0,l=e.count;cr&&(r=u),f>o&&(o=f),h>s&&(s=h)}return this.min.set(t,i,a),this.max.set(r,o,s),this}setFromPoints(e){this.makeEmpty();for(let t=0,i=e.length;tthis.max.x||e.ythis.max.y||e.zthis.max.z)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return!(e.max.xthis.max.x||e.max.ythis.max.y||e.max.zthis.max.z)}intersectsSphere(e){return this.clampPoint(e.center,S4),S4.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,i;return e.normal.x>0?(t=e.normal.x*this.min.x,i=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,i=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,i+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,i+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,i+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,i+=e.normal.z*this.min.z),t<=-e.constant&&i>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(Bt),R6.subVectors(this.max,Bt),j4.subVectors(e.a,Bt),X4.subVectors(e.b,Bt),Z4.subVectors(e.c,Bt),s4.subVectors(X4,j4),o4.subVectors(Z4,X4),_4.subVectors(j4,Z4);let t=[0,-s4.z,s4.y,0,-o4.z,o4.y,0,-_4.z,_4.y,s4.z,0,-s4.x,o4.z,0,-o4.x,_4.z,0,-_4.x,-s4.y,s4.x,0,-o4.y,o4.x,0,-_4.y,_4.x,0];return!F3(t,j4,X4,Z4,R6)||(t=[1,0,0,0,1,0,0,0,1],!F3(t,j4,X4,Z4,R6))?!1:(F6.crossVectors(s4,o4),t=[F6.x,F6.y,F6.z],F3(t,j4,X4,Z4,R6))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return S4.copy(e).clamp(this.min,this.max).sub(e).length()}getBoundingSphere(e){return this.getCenter(e.center),e.radius=this.getSize(S4).length()*.5,e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(We[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),We[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),We[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),We[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),We[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),We[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),We[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),We[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(We),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}};qe.prototype.isBox3=!0;var We=[new k,new k,new k,new k,new k,new k,new k,new k],S4=new k,R3=new qe,j4=new k,X4=new k,Z4=new k,s4=new k,o4=new k,_4=new k,Bt=new k,R6=new k,F6=new k,E4=new k;function F3(n,e,t,i,a){for(let r=0,o=n.length-3;r<=o;r+=3){E4.fromArray(n,r);let s=a.x*Math.abs(E4.x)+a.y*Math.abs(E4.y)+a.z*Math.abs(E4.z),c=e.dot(E4),l=t.dot(E4),u=i.dot(E4);if(Math.max(-Math.max(c,l,u),Math.min(c,l,u))>s)return!1}return!0}var B2=class{addEventListener(e,t){this._listeners===void 0&&(this._listeners={});let i=this._listeners;i[e]===void 0&&(i[e]=[]),i[e].indexOf(t)===-1&&i[e].push(t)}hasEventListener(e,t){if(this._listeners===void 0)return!1;let i=this._listeners;return i[e]!==void 0&&i[e].indexOf(t)!==-1}removeEventListener(e,t){if(this._listeners===void 0)return;let a=this._listeners[e];if(a!==void 0){let r=a.indexOf(t);r!==-1&&a.splice(r,1)}}dispatchEvent(e){if(this._listeners===void 0)return;let i=this._listeners[e.type];if(i!==void 0){e.target=this;let a=i.slice(0);for(let r=0,o=a.length;rthis.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){B3.subVectors(e,this.center);let t=B3.lengthSq();if(t>this.radius*this.radius){let i=Math.sqrt(t),a=(i-this.radius)*.5;this.center.add(B3.multiplyScalar(a/i)),this.radius+=a}return this}union(e){return this.center.equals(e.center)===!0?B6.set(0,0,1).multiplyScalar(e.radius):B6.subVectors(e.center,this.center).normalize().multiplyScalar(e.radius),this.expandByPoint(E8.copy(e.center).add(B6)),this.expandByPoint(E8.copy(e.center).sub(B6)),this}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}};var k1=class{constructor(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")}set(e,t,i,a,r,o,s,c,l,u,f,h,m,v,g,x){let p=this.elements;return p[0]=e,p[4]=t,p[8]=i,p[12]=a,p[1]=r,p[5]=o,p[9]=s,p[13]=c,p[2]=l,p[6]=u,p[10]=f,p[14]=h,p[3]=m,p[7]=v,p[11]=g,p[15]=x,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new k1().fromArray(this.elements)}copy(e){let t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],t[9]=i[9],t[10]=i[10],t[11]=i[11],t[12]=i[12],t[13]=i[13],t[14]=i[14],t[15]=i[15],this}copyPosition(e){let t=this.elements,i=e.elements;return t[12]=i[12],t[13]=i[13],t[14]=i[14],this}setFromMatrix3(e){let t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,i){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),i.setFromMatrixColumn(this,2),this}makeBasis(e,t,i){return this.set(e.x,t.x,i.x,0,e.y,t.y,i.y,0,e.z,t.z,i.z,0,0,0,0,1),this}extractRotation(e){let t=this.elements,i=e.elements,a=1/Y4.setFromMatrixColumn(e,0).length(),r=1/Y4.setFromMatrixColumn(e,1).length(),o=1/Y4.setFromMatrixColumn(e,2).length();return t[0]=i[0]*a,t[1]=i[1]*a,t[2]=i[2]*a,t[3]=0,t[4]=i[4]*r,t[5]=i[5]*r,t[6]=i[6]*r,t[7]=0,t[8]=i[8]*o,t[9]=i[9]*o,t[10]=i[10]*o,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){e&&e.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");let t=this.elements,i=e.x,a=e.y,r=e.z,o=Math.cos(i),s=Math.sin(i),c=Math.cos(a),l=Math.sin(a),u=Math.cos(r),f=Math.sin(r);if(e.order==="XYZ"){let h=o*u,m=o*f,v=s*u,g=s*f;t[0]=c*u,t[4]=-c*f,t[8]=l,t[1]=m+v*l,t[5]=h-g*l,t[9]=-s*c,t[2]=g-h*l,t[6]=v+m*l,t[10]=o*c}else if(e.order==="YXZ"){let h=c*u,m=c*f,v=l*u,g=l*f;t[0]=h+g*s,t[4]=v*s-m,t[8]=o*l,t[1]=o*f,t[5]=o*u,t[9]=-s,t[2]=m*s-v,t[6]=g+h*s,t[10]=o*c}else if(e.order==="ZXY"){let h=c*u,m=c*f,v=l*u,g=l*f;t[0]=h-g*s,t[4]=-o*f,t[8]=v+m*s,t[1]=m+v*s,t[5]=o*u,t[9]=g-h*s,t[2]=-o*l,t[6]=s,t[10]=o*c}else if(e.order==="ZYX"){let h=o*u,m=o*f,v=s*u,g=s*f;t[0]=c*u,t[4]=v*l-m,t[8]=h*l+g,t[1]=c*f,t[5]=g*l+h,t[9]=m*l-v,t[2]=-l,t[6]=s*c,t[10]=o*c}else if(e.order==="YZX"){let h=o*c,m=o*l,v=s*c,g=s*l;t[0]=c*u,t[4]=g-h*f,t[8]=v*f+m,t[1]=f,t[5]=o*u,t[9]=-s*u,t[2]=-l*u,t[6]=m*f+v,t[10]=h-g*f}else if(e.order==="XZY"){let h=o*c,m=o*l,v=s*c,g=s*l;t[0]=c*u,t[4]=-f,t[8]=l*u,t[1]=h*f+g,t[5]=o*u,t[9]=m*f-v,t[2]=v*f-m,t[6]=s*u,t[10]=g*f+h}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(l9,e,u9)}lookAt(e,t,i){let a=this.elements;return P2.subVectors(e,t),P2.lengthSq()===0&&(P2.z=1),P2.normalize(),c4.crossVectors(i,P2),c4.lengthSq()===0&&(Math.abs(i.z)===1?P2.x+=1e-4:P2.z+=1e-4,P2.normalize(),c4.crossVectors(i,P2)),c4.normalize(),P6.crossVectors(P2,c4),a[0]=c4.x,a[4]=P6.x,a[8]=P2.x,a[1]=c4.y,a[5]=P6.y,a[9]=P2.y,a[2]=c4.z,a[6]=P6.z,a[10]=P2.z,this}multiply(e,t){return t!==void 0?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),this.multiplyMatrices(e,t)):this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){let i=e.elements,a=t.elements,r=this.elements,o=i[0],s=i[4],c=i[8],l=i[12],u=i[1],f=i[5],h=i[9],m=i[13],v=i[2],g=i[6],x=i[10],p=i[14],d=i[3],A=i[7],b=i[11],C=i[15],E=a[0],T=a[4],_=a[8],P=a[12],F=a[1],M=a[5],D=a[9],z=a[13],H=a[2],V=a[6],L=a[10],N=a[14],U=a[3],Z=a[7],O=a[11],W=a[15];return r[0]=o*E+s*F+c*H+l*U,r[4]=o*T+s*M+c*V+l*Z,r[8]=o*_+s*D+c*L+l*O,r[12]=o*P+s*z+c*N+l*W,r[1]=u*E+f*F+h*H+m*U,r[5]=u*T+f*M+h*V+m*Z,r[9]=u*_+f*D+h*L+m*O,r[13]=u*P+f*z+h*N+m*W,r[2]=v*E+g*F+x*H+p*U,r[6]=v*T+g*M+x*V+p*Z,r[10]=v*_+g*D+x*L+p*O,r[14]=v*P+g*z+x*N+p*W,r[3]=d*E+A*F+b*H+C*U,r[7]=d*T+A*M+b*V+C*Z,r[11]=d*_+A*D+b*L+C*O,r[15]=d*P+A*z+b*N+C*W,this}multiplyScalar(e){let t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){let e=this.elements,t=e[0],i=e[4],a=e[8],r=e[12],o=e[1],s=e[5],c=e[9],l=e[13],u=e[2],f=e[6],h=e[10],m=e[14],v=e[3],g=e[7],x=e[11],p=e[15];return v*(+r*c*f-a*l*f-r*s*h+i*l*h+a*s*m-i*c*m)+g*(+t*c*m-t*l*h+r*o*h-a*o*m+a*l*u-r*c*u)+x*(+t*l*f-t*s*m-r*o*f+i*o*m+r*s*u-i*l*u)+p*(-a*s*u-t*c*f+t*s*h+a*o*f-i*o*h+i*c*u)}transpose(){let e=this.elements,t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,i){let a=this.elements;return e.isVector3?(a[12]=e.x,a[13]=e.y,a[14]=e.z):(a[12]=e,a[13]=t,a[14]=i),this}invert(){let e=this.elements,t=e[0],i=e[1],a=e[2],r=e[3],o=e[4],s=e[5],c=e[6],l=e[7],u=e[8],f=e[9],h=e[10],m=e[11],v=e[12],g=e[13],x=e[14],p=e[15],d=f*x*l-g*h*l+g*c*m-s*x*m-f*c*p+s*h*p,A=v*h*l-u*x*l-v*c*m+o*x*m+u*c*p-o*h*p,b=u*g*l-v*f*l+v*s*m-o*g*m-u*s*p+o*f*p,C=v*f*c-u*g*c-v*s*h+o*g*h+u*s*x-o*f*x,E=t*d+i*A+a*b+r*C;if(E===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);let T=1/E;return e[0]=d*T,e[1]=(g*h*r-f*x*r-g*a*m+i*x*m+f*a*p-i*h*p)*T,e[2]=(s*x*r-g*c*r+g*a*l-i*x*l-s*a*p+i*c*p)*T,e[3]=(f*c*r-s*h*r-f*a*l+i*h*l+s*a*m-i*c*m)*T,e[4]=A*T,e[5]=(u*x*r-v*h*r+v*a*m-t*x*m-u*a*p+t*h*p)*T,e[6]=(v*c*r-o*x*r-v*a*l+t*x*l+o*a*p-t*c*p)*T,e[7]=(o*h*r-u*c*r+u*a*l-t*h*l-o*a*m+t*c*m)*T,e[8]=b*T,e[9]=(v*f*r-u*g*r-v*i*m+t*g*m+u*i*p-t*f*p)*T,e[10]=(o*g*r-v*s*r+v*i*l-t*g*l-o*i*p+t*s*p)*T,e[11]=(u*s*r-o*f*r-u*i*l+t*f*l+o*i*m-t*s*m)*T,e[12]=C*T,e[13]=(u*g*a-v*f*a+v*i*h-t*g*h-u*i*x+t*f*x)*T,e[14]=(v*s*a-o*g*a-v*i*c+t*g*c+o*i*x-t*s*x)*T,e[15]=(o*f*a-u*s*a+u*i*c-t*f*c-o*i*h+t*s*h)*T,this}scale(e){let t=this.elements,i=e.x,a=e.y,r=e.z;return t[0]*=i,t[4]*=a,t[8]*=r,t[1]*=i,t[5]*=a,t[9]*=r,t[2]*=i,t[6]*=a,t[10]*=r,t[3]*=i,t[7]*=a,t[11]*=r,this}getMaxScaleOnAxis(){let e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],i=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],a=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,i,a))}makeTranslation(e,t,i){return this.set(1,0,0,e,0,1,0,t,0,0,1,i,0,0,0,1),this}makeRotationX(e){let t=Math.cos(e),i=Math.sin(e);return this.set(1,0,0,0,0,t,-i,0,0,i,t,0,0,0,0,1),this}makeRotationY(e){let t=Math.cos(e),i=Math.sin(e);return this.set(t,0,i,0,0,1,0,0,-i,0,t,0,0,0,0,1),this}makeRotationZ(e){let t=Math.cos(e),i=Math.sin(e);return this.set(t,-i,0,0,i,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){let i=Math.cos(t),a=Math.sin(t),r=1-i,o=e.x,s=e.y,c=e.z,l=r*o,u=r*s;return this.set(l*o+i,l*s-a*c,l*c+a*s,0,l*s+a*c,u*s+i,u*c-a*o,0,l*c-a*s,u*c+a*o,r*c*c+i,0,0,0,0,1),this}makeScale(e,t,i){return this.set(e,0,0,0,0,t,0,0,0,0,i,0,0,0,0,1),this}makeShear(e,t,i,a,r,o){return this.set(1,i,r,0,e,1,o,0,t,a,1,0,0,0,0,1),this}compose(e,t,i){let a=this.elements,r=t._x,o=t._y,s=t._z,c=t._w,l=r+r,u=o+o,f=s+s,h=r*l,m=r*u,v=r*f,g=o*u,x=o*f,p=s*f,d=c*l,A=c*u,b=c*f,C=i.x,E=i.y,T=i.z;return a[0]=(1-(g+p))*C,a[1]=(m+b)*C,a[2]=(v-A)*C,a[3]=0,a[4]=(m-b)*E,a[5]=(1-(h+p))*E,a[6]=(x+d)*E,a[7]=0,a[8]=(v+A)*T,a[9]=(x-d)*T,a[10]=(1-(h+g))*T,a[11]=0,a[12]=e.x,a[13]=e.y,a[14]=e.z,a[15]=1,this}decompose(e,t,i){let a=this.elements,r=Y4.set(a[0],a[1],a[2]).length(),o=Y4.set(a[4],a[5],a[6]).length(),s=Y4.set(a[8],a[9],a[10]).length();this.determinant()<0&&(r=-r),e.x=a[12],e.y=a[13],e.z=a[14],te.copy(this);let l=1/r,u=1/o,f=1/s;return te.elements[0]*=l,te.elements[1]*=l,te.elements[2]*=l,te.elements[4]*=u,te.elements[5]*=u,te.elements[6]*=u,te.elements[8]*=f,te.elements[9]*=f,te.elements[10]*=f,t.setFromRotationMatrix(te),i.x=r,i.y=o,i.z=s,this}makePerspective(e,t,i,a,r,o){o===void 0&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");let s=this.elements,c=2*r/(t-e),l=2*r/(i-a),u=(t+e)/(t-e),f=(i+a)/(i-a),h=-(o+r)/(o-r),m=-2*o*r/(o-r);return s[0]=c,s[4]=0,s[8]=u,s[12]=0,s[1]=0,s[5]=l,s[9]=f,s[13]=0,s[2]=0,s[6]=0,s[10]=h,s[14]=m,s[3]=0,s[7]=0,s[11]=-1,s[15]=0,this}makeOrthographic(e,t,i,a,r,o){let s=this.elements,c=1/(t-e),l=1/(i-a),u=1/(o-r),f=(t+e)*c,h=(i+a)*l,m=(o+r)*u;return s[0]=2*c,s[4]=0,s[8]=0,s[12]=-f,s[1]=0,s[5]=2*l,s[9]=0,s[13]=-h,s[2]=0,s[6]=0,s[10]=-2*u,s[14]=-m,s[3]=0,s[7]=0,s[11]=0,s[15]=1,this}equals(e){let t=this.elements,i=e.elements;for(let a=0;a<16;a++)if(t[a]!==i[a])return!1;return!0}fromArray(e,t=0){for(let i=0;i<16;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){let i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e[t+9]=i[9],e[t+10]=i[10],e[t+11]=i[11],e[t+12]=i[12],e[t+13]=i[13],e[t+14]=i[14],e[t+15]=i[15],e}};k1.prototype.isMatrix4=!0;var Y4=new k,te=new k1,l9=new k(0,0,0),u9=new k(1,1,1),c4=new k,P6=new k,P2=new k;var L8=new k1,D8=new Me,l4=class{constructor(e=0,t=0,i=0,a=l4.DefaultOrder){this._x=e,this._y=t,this._z=i,this._order=a}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,i,a=this._order){return this._x=e,this._y=t,this._z=i,this._order=a,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t=this._order,i=!0){let a=e.elements,r=a[0],o=a[4],s=a[8],c=a[1],l=a[5],u=a[9],f=a[2],h=a[6],m=a[10];switch(t){case"XYZ":this._y=Math.asin(T2(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(-u,m),this._z=Math.atan2(-o,r)):(this._x=Math.atan2(h,l),this._z=0);break;case"YXZ":this._x=Math.asin(-T2(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(s,m),this._z=Math.atan2(c,l)):(this._y=Math.atan2(-f,r),this._z=0);break;case"ZXY":this._x=Math.asin(T2(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(-f,m),this._z=Math.atan2(-o,l)):(this._y=0,this._z=Math.atan2(c,r));break;case"ZYX":this._y=Math.asin(-T2(f,-1,1)),Math.abs(f)<.9999999?(this._x=Math.atan2(h,m),this._z=Math.atan2(c,r)):(this._x=0,this._z=Math.atan2(-o,l));break;case"YZX":this._z=Math.asin(T2(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(-u,l),this._y=Math.atan2(-f,r)):(this._x=0,this._y=Math.atan2(s,m));break;case"XZY":this._z=Math.asin(-T2(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(h,l),this._y=Math.atan2(s,r)):(this._x=Math.atan2(-u,m),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,i===!0&&this._onChangeCallback(),this}setFromQuaternion(e,t,i){return L8.makeRotationFromQuaternion(e),this.setFromRotationMatrix(L8,t,i)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return D8.setFromEuler(this),this.setFromQuaternion(D8,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e}toVector3(e){return e?e.set(this._x,this._y,this._z):new k(this._x,this._y,this._z)}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}};l4.prototype.isEuler=!0;l4.DefaultOrder="XYZ";l4.RotationOrders=["XYZ","YZX","ZXY","XZY","YXZ","ZYX"];var Pt=class{constructor(){this.mask=1|0}set(e){this.mask=(1<>>0}enable(e){this.mask|=1<0&&console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")}set(e,t,i,a,r,o,s,c,l){let u=this.elements;return u[0]=e,u[1]=a,u[2]=s,u[3]=t,u[4]=r,u[5]=c,u[6]=i,u[7]=o,u[8]=l,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){let t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],this}extractBasis(e,t,i){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),i.setFromMatrix3Column(this,2),this}setFromMatrix4(e){let t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){let i=e.elements,a=t.elements,r=this.elements,o=i[0],s=i[3],c=i[6],l=i[1],u=i[4],f=i[7],h=i[2],m=i[5],v=i[8],g=a[0],x=a[3],p=a[6],d=a[1],A=a[4],b=a[7],C=a[2],E=a[5],T=a[8];return r[0]=o*g+s*d+c*C,r[3]=o*x+s*A+c*E,r[6]=o*p+s*b+c*T,r[1]=l*g+u*d+f*C,r[4]=l*x+u*A+f*E,r[7]=l*p+u*b+f*T,r[2]=h*g+m*d+v*C,r[5]=h*x+m*A+v*E,r[8]=h*p+m*b+v*T,this}multiplyScalar(e){let t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){let e=this.elements,t=e[0],i=e[1],a=e[2],r=e[3],o=e[4],s=e[5],c=e[6],l=e[7],u=e[8];return t*o*u-t*s*l-i*r*u+i*s*c+a*r*l-a*o*c}invert(){let e=this.elements,t=e[0],i=e[1],a=e[2],r=e[3],o=e[4],s=e[5],c=e[6],l=e[7],u=e[8],f=u*o-s*l,h=s*c-u*r,m=l*r-o*c,v=t*f+i*h+a*m;if(v===0)return this.set(0,0,0,0,0,0,0,0,0);let g=1/v;return e[0]=f*g,e[1]=(a*l-u*i)*g,e[2]=(s*i-a*o)*g,e[3]=h*g,e[4]=(u*t-a*c)*g,e[5]=(a*r-s*t)*g,e[6]=m*g,e[7]=(i*c-l*t)*g,e[8]=(o*t-i*r)*g,this}transpose(){let e,t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){let t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,i,a,r,o,s){let c=Math.cos(r),l=Math.sin(r);return this.set(i*c,i*l,-i*(c*o+l*s)+o+e,-a*l,a*c,-a*(-l*o+c*s)+s+t,0,0,1),this}scale(e,t){let i=this.elements;return i[0]*=e,i[3]*=e,i[6]*=e,i[1]*=t,i[4]*=t,i[7]*=t,this}rotate(e){let t=Math.cos(e),i=Math.sin(e),a=this.elements,r=a[0],o=a[3],s=a[6],c=a[1],l=a[4],u=a[7];return a[0]=t*r+i*c,a[3]=t*o+i*l,a[6]=t*s+i*u,a[1]=-i*r+t*c,a[4]=-i*o+t*l,a[7]=-i*s+t*u,this}translate(e,t){let i=this.elements;return i[0]+=e*i[2],i[3]+=e*i[5],i[6]+=e*i[8],i[1]+=t*i[2],i[4]+=t*i[5],i[7]+=t*i[8],this}equals(e){let t=this.elements,i=e.elements;for(let a=0;a<9;a++)if(t[a]!==i[a])return!1;return!0}fromArray(e,t=0){for(let i=0;i<9;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){let i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e}clone(){return new this.constructor().fromArray(this.elements)}};n2.prototype.isMatrix3=!0;var h9=0,T8=new k,$4=new Me,Xe=new k1,I6=new k,It=new k,f9=new k,d9=new Me,H8=new k(1,0,0),V8=new k(0,1,0),N8=new k(0,0,1),p9={type:"added"},R8={type:"removed"},j1=class extends B2{constructor(){super();Object.defineProperty(this,"id",{value:h9++}),this.uuid=ke(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=j1.DefaultUp.clone();let e=new k,t=new l4,i=new Me,a=new k(1,1,1);function r(){i.setFromEuler(t,!1)}function o(){t.setFromQuaternion(i,void 0,!1)}t._onChange(r),i._onChange(o),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:e},rotation:{configurable:!0,enumerable:!0,value:t},quaternion:{configurable:!0,enumerable:!0,value:i},scale:{configurable:!0,enumerable:!0,value:a},modelViewMatrix:{value:new k1},normalMatrix:{value:new n2}}),this.matrix=new k1,this.matrixWorld=new k1,this.matrixAutoUpdate=j1.DefaultMatrixAutoUpdate,this.matrixWorldNeedsUpdate=!1,this.layers=new Pt,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.userData={}}onBeforeRender(){}onAfterRender(){}applyMatrix4(e){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(e),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(e){return this.quaternion.premultiply(e),this}setRotationFromAxisAngle(e,t){this.quaternion.setFromAxisAngle(e,t)}setRotationFromEuler(e){this.quaternion.setFromEuler(e,!0)}setRotationFromMatrix(e){this.quaternion.setFromRotationMatrix(e)}setRotationFromQuaternion(e){this.quaternion.copy(e)}rotateOnAxis(e,t){return $4.setFromAxisAngle(e,t),this.quaternion.multiply($4),this}rotateOnWorldAxis(e,t){return $4.setFromAxisAngle(e,t),this.quaternion.premultiply($4),this}rotateX(e){return this.rotateOnAxis(H8,e)}rotateY(e){return this.rotateOnAxis(V8,e)}rotateZ(e){return this.rotateOnAxis(N8,e)}translateOnAxis(e,t){return T8.copy(e).applyQuaternion(this.quaternion),this.position.add(T8.multiplyScalar(t)),this}translateX(e){return this.translateOnAxis(H8,e)}translateY(e){return this.translateOnAxis(V8,e)}translateZ(e){return this.translateOnAxis(N8,e)}localToWorld(e){return e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return e.applyMatrix4(Xe.copy(this.matrixWorld).invert())}lookAt(e,t,i){e.isVector3?I6.copy(e):I6.set(e,t,i);let a=this.parent;this.updateWorldMatrix(!0,!1),It.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?Xe.lookAt(It,I6,this.up):Xe.lookAt(I6,It,this.up),this.quaternion.setFromRotationMatrix(Xe),a&&(Xe.extractRotation(a.matrixWorld),$4.setFromRotationMatrix(Xe),this.quaternion.premultiply($4.invert()))}add(e){if(arguments.length>1){for(let t=0;t1){for(let i=0;i0){a.children=[];for(let s=0;s0){a.animations=[];for(let s=0;s0&&(i.geometries=s),c.length>0&&(i.materials=c),l.length>0&&(i.textures=l),u.length>0&&(i.images=u),f.length>0&&(i.shapes=f),h.length>0&&(i.skeletons=h),m.length>0&&(i.animations=m)}return i.object=a,i;function o(s){let c=[];for(let l in s){let u=s[l];delete u.metadata,c.push(u)}return c}}clone(e){return new this.constructor().copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.userData=JSON.parse(JSON.stringify(e.userData)),t===!0)for(let i=0;i=0;--e)if(n[e]>65535)return!0;return!1}function L4(n){return document.createElementNS("http://www.w3.org/1999/xhtml",n)}var m9=0,G2=new k1,P3=new j1,K4=new k,I2=new qe,kt=new qe,l2=new k,y2=class extends B2{constructor(){super();Object.defineProperty(this,"id",{value:m9++}),this.uuid=ke(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(e){return Array.isArray(e)?this.index=new(k6(e)?Ft:Rt)(e,1):this.index=e,this}getAttribute(e){return this.attributes[e]}setAttribute(e,t){return this.attributes[e]=t,this}deleteAttribute(e){return delete this.attributes[e],this}hasAttribute(e){return this.attributes[e]!==void 0}addGroup(e,t,i=0){this.groups.push({start:e,count:t,materialIndex:i})}clearGroups(){this.groups=[]}setDrawRange(e,t){this.drawRange.start=e,this.drawRange.count=t}applyMatrix4(e){let t=this.attributes.position;t!==void 0&&(t.applyMatrix4(e),t.needsUpdate=!0);let i=this.attributes.normal;if(i!==void 0){let r=new n2().getNormalMatrix(e);i.applyNormalMatrix(r),i.needsUpdate=!0}let a=this.attributes.tangent;return a!==void 0&&(a.transformDirection(e),a.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}applyQuaternion(e){return G2.makeRotationFromQuaternion(e),this.applyMatrix4(G2),this}rotateX(e){return G2.makeRotationX(e),this.applyMatrix4(G2),this}rotateY(e){return G2.makeRotationY(e),this.applyMatrix4(G2),this}rotateZ(e){return G2.makeRotationZ(e),this.applyMatrix4(G2),this}translate(e,t,i){return G2.makeTranslation(e,t,i),this.applyMatrix4(G2),this}scale(e,t,i){return G2.makeScale(e,t,i),this.applyMatrix4(G2),this}lookAt(e){return P3.lookAt(e),P3.updateMatrix(),this.applyMatrix4(P3.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(K4).negate(),this.translate(K4.x,K4.y,K4.z),this}setFromPoints(e){let t=[];for(let i=0,a=e.length;i0&&(e.userData=this.userData),this.parameters!==void 0){let c=this.parameters;for(let l in c)c[l]!==void 0&&(e[l]=c[l]);return e}e.data={attributes:{}};let t=this.index;t!==null&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});let i=this.attributes;for(let c in i){let l=i[c];e.data.attributes[c]=l.toJSON(e.data)}let a={},r=!1;for(let c in this.morphAttributes){let l=this.morphAttributes[c],u=[];for(let f=0,h=l.length;f0&&(a[c]=u,r=!0)}r&&(e.data.morphAttributes=a,e.data.morphTargetsRelative=this.morphTargetsRelative);let o=this.groups;o.length>0&&(e.data.groups=JSON.parse(JSON.stringify(o)));let s=this.boundingSphere;return s!==null&&(e.data.boundingSphere={center:s.center.toArray(),radius:s.radius}),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;let t={};this.name=e.name;let i=e.index;i!==null&&this.setIndex(i.clone(t));let a=e.attributes;for(let l in a){let u=a[l];this.setAttribute(l,u.clone(t))}let r=e.morphAttributes;for(let l in r){let u=[],f=r[l];for(let h=0,m=f.length;h0!=e>0&&this.version++,this._alphaTest=e}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(let t in e){let i=e[t];if(i===void 0){console.warn("THREE.Material: '"+t+"' parameter is undefined.");continue}if(t==="shading"){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=i===Rr;continue}let a=this[t];if(a===void 0){console.warn("THREE."+this.type+": '"+t+"' is not a property of this material.");continue}a&&a.isColor?a.set(i):a&&a.isVector3&&i&&i.isVector3?a.copy(i):this[t]=i}}toJSON(e){let t=e===void 0||typeof e=="string";t&&(e={textures:{},images:{}});let i={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};i.uuid=this.uuid,i.type=this.type,this.name!==""&&(i.name=this.name),this.color&&this.color.isColor&&(i.color=this.color.getHex()),this.roughness!==void 0&&(i.roughness=this.roughness),this.metalness!==void 0&&(i.metalness=this.metalness),this.sheen!==void 0&&(i.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(i.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(i.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(i.emissive=this.emissive.getHex()),this.emissiveIntensity&&this.emissiveIntensity!==1&&(i.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(i.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(i.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(i.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(i.shininess=this.shininess),this.clearcoat!==void 0&&(i.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(i.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(i.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(i.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(i.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,i.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.map&&this.map.isTexture&&(i.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(i.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(i.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(i.lightMap=this.lightMap.toJSON(e).uuid,i.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(i.aoMap=this.aoMap.toJSON(e).uuid,i.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(i.bumpMap=this.bumpMap.toJSON(e).uuid,i.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(i.normalMap=this.normalMap.toJSON(e).uuid,i.normalMapType=this.normalMapType,i.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(i.displacementMap=this.displacementMap.toJSON(e).uuid,i.displacementScale=this.displacementScale,i.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(i.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(i.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(i.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(i.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(i.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(i.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(i.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(i.combine=this.combine)),this.envMapIntensity!==void 0&&(i.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(i.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(i.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(i.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(i.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(i.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(i.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(i.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&(i.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(i.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(i.size=this.size),this.shadowSide!==null&&(i.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(i.sizeAttenuation=this.sizeAttenuation),this.blending!==w4&&(i.blending=this.blending),this.side!==Ue&&(i.side=this.side),this.vertexColors&&(i.vertexColors=!0),this.opacity<1&&(i.opacity=this.opacity),this.transparent===!0&&(i.transparent=this.transparent),i.depthFunc=this.depthFunc,i.depthTest=this.depthTest,i.depthWrite=this.depthWrite,i.colorWrite=this.colorWrite,i.alphaWrite=this.alphaWrite,i.stencilWrite=this.stencilWrite,i.stencilWriteMask=this.stencilWriteMask,i.stencilFunc=this.stencilFunc,i.stencilRef=this.stencilRef,i.stencilFuncMask=this.stencilFuncMask,i.stencilFail=this.stencilFail,i.stencilZFail=this.stencilZFail,i.stencilZPass=this.stencilZPass,this.rotation&&this.rotation!==0&&(i.rotation=this.rotation),this.polygonOffset===!0&&(i.polygonOffset=!0),this.polygonOffsetFactor!==0&&(i.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(i.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth&&this.linewidth!==1&&(i.linewidth=this.linewidth),this.dashSize!==void 0&&(i.dashSize=this.dashSize),this.gapSize!==void 0&&(i.gapSize=this.gapSize),this.scale!==void 0&&(i.scale=this.scale),this.dithering===!0&&(i.dithering=!0),this.alphaTest>0&&(i.alphaTest=this.alphaTest),this.alphaToCoverage===!0&&(i.alphaToCoverage=this.alphaToCoverage),this.premultipliedAlpha===!0&&(i.premultipliedAlpha=this.premultipliedAlpha),this.wireframe===!0&&(i.wireframe=this.wireframe),this.wireframeLinewidth>1&&(i.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(i.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(i.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(i.flatShading=this.flatShading),this.visible===!1&&(i.visible=!1),this.toneMapped===!1&&(i.toneMapped=!1),JSON.stringify(this.userData)!=="{}"&&(i.userData=this.userData);function a(r){let o=[];for(let s in r){let c=r[s];delete c.metadata,o.push(c)}return o}if(t){let r=a(e.textures),o=a(e.images);r.length>0&&(i.textures=r),o.length>0&&(i.images=o)}return i}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.fog=e.fog,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;let t=e.clippingPlanes,i=null;if(t!==null){let a=t.length;i=new Array(a);for(let r=0;r!==a;++r)i[r]=t[r].clone()}return this.clippingPlanes=i,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.alphaWrite=e.alphaWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}};H2.prototype.isMaterial=!0;var Ut=class extends H2{constructor(e){super();this.type="MeshPhongMaterial",this.color=new x1(16777215),this.specular=new x1(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new x1(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=H6,this.normalScale=new z1(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=q4,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this}};Ut.prototype.isMeshPhongMaterial=!0;var Ze=new k,I3=new k,U6=new k,u4=new k,k3=new k,O6=new k,U3=new k,O3=class{constructor(e=new k,t=new k(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.copy(this.direction).multiplyScalar(e).add(this.origin)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,Ze)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);let i=t.dot(this.direction);return i<0?t.copy(this.origin):t.copy(this.direction).multiplyScalar(i).add(this.origin)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){let t=Ze.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(Ze.copy(this.direction).multiplyScalar(t).add(this.origin),Ze.distanceToSquared(e))}distanceSqToSegment(e,t,i,a){I3.copy(e).add(t).multiplyScalar(.5),U6.copy(t).sub(e).normalize(),u4.copy(this.origin).sub(I3);let r=e.distanceTo(t)*.5,o=-this.direction.dot(U6),s=u4.dot(this.direction),c=-u4.dot(U6),l=u4.lengthSq(),u=Math.abs(1-o*o),f,h,m,v;if(u>0)if(f=o*c-s,h=o*s-c,v=r*u,f>=0)if(h>=-v)if(h<=v){let g=1/u;f*=g,h*=g,m=f*(f+o*h+2*s)+h*(o*f+h+2*c)+l}else h=r,f=Math.max(0,-(o*h+s)),m=-f*f+h*(h+2*c)+l;else h=-r,f=Math.max(0,-(o*h+s)),m=-f*f+h*(h+2*c)+l;else h<=-v?(f=Math.max(0,-(-o*r+s)),h=f>0?-r:Math.min(Math.max(-r,-c),r),m=-f*f+h*(h+2*c)+l):h<=v?(f=0,h=Math.min(Math.max(-r,-c),r),m=h*(h+2*c)+l):(f=Math.max(0,-(o*r+s)),h=f>0?r:Math.min(Math.max(-r,-c),r),m=-f*f+h*(h+2*c)+l);else h=o>0?-r:r,f=Math.max(0,-(o*h+s)),m=-f*f+h*(h+2*c)+l;return i&&i.copy(this.direction).multiplyScalar(f).add(this.origin),a&&a.copy(U6).multiplyScalar(h).add(I3),m}intersectSphere(e,t){Ze.subVectors(e.center,this.origin);let i=Ze.dot(this.direction),a=Ze.dot(Ze)-i*i,r=e.radius*e.radius;if(a>r)return null;let o=Math.sqrt(r-a),s=i-o,c=i+o;return s<0&&c<0?null:s<0?this.at(c,t):this.at(s,t)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){let t=e.normal.dot(this.direction);if(t===0)return e.distanceToPoint(this.origin)===0?0:null;let i=-(this.origin.dot(e.normal)+e.constant)/t;return i>=0?i:null}intersectPlane(e,t){let i=this.distanceToPlane(e);return i===null?null:this.at(i,t)}intersectsPlane(e){let t=e.distanceToPoint(this.origin);return t===0||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let i,a,r,o,s,c,l=1/this.direction.x,u=1/this.direction.y,f=1/this.direction.z,h=this.origin;return l>=0?(i=(e.min.x-h.x)*l,a=(e.max.x-h.x)*l):(i=(e.max.x-h.x)*l,a=(e.min.x-h.x)*l),u>=0?(r=(e.min.y-h.y)*u,o=(e.max.y-h.y)*u):(r=(e.max.y-h.y)*u,o=(e.min.y-h.y)*u),i>o||r>a||((r>i||i!==i)&&(i=r),(o=0?(s=(e.min.z-h.z)*f,c=(e.max.z-h.z)*f):(s=(e.max.z-h.z)*f,c=(e.min.z-h.z)*f),i>c||s>a)||((s>i||i!==i)&&(i=s),(c=0?i:a,t)}intersectsBox(e){return this.intersectBox(e,Ze)!==null}intersectTriangle(e,t,i,a,r){k3.subVectors(t,e),O6.subVectors(i,e),U3.crossVectors(k3,O6);let o=this.direction.dot(U3),s;if(o>0){if(a)return null;s=1}else if(o<0)s=-1,o=-o;else return null;u4.subVectors(this.origin,e);let c=s*this.direction.dot(O6.crossVectors(u4,O6));if(c<0)return null;let l=s*this.direction.dot(k3.cross(u4));if(l<0||c+l>o)return null;let u=-s*u4.dot(U3);return u<0?null:this.at(u/o,r)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}};var ie=new k,Ye=new k,G3=new k,$e=new k,J4=new k,Q4=new k,F8=new k,q3=new k,W3=new k,j3=new k,ae=class{constructor(e=new k,t=new k,i=new k){this.a=e,this.b=t,this.c=i}static getNormal(e,t,i,a){a.subVectors(i,t),ie.subVectors(e,t),a.cross(ie);let r=a.lengthSq();return r>0?a.multiplyScalar(1/Math.sqrt(r)):a.set(0,0,0)}static getBarycoord(e,t,i,a,r){ie.subVectors(a,t),Ye.subVectors(i,t),G3.subVectors(e,t);let o=ie.dot(ie),s=ie.dot(Ye),c=ie.dot(G3),l=Ye.dot(Ye),u=Ye.dot(G3),f=o*l-s*s;if(f===0)return r.set(-2,-1,-1);let h=1/f,m=(l*c-s*u)*h,v=(o*u-s*c)*h;return r.set(1-m-v,v,m)}static containsPoint(e,t,i,a){return this.getBarycoord(e,t,i,a,$e),$e.x>=0&&$e.y>=0&&$e.x+$e.y<=1}static getUV(e,t,i,a,r,o,s,c){return this.getBarycoord(e,t,i,a,$e),c.set(0,0),c.addScaledVector(r,$e.x),c.addScaledVector(o,$e.y),c.addScaledVector(s,$e.z),c}static isFrontFacing(e,t,i,a){return ie.subVectors(i,t),Ye.subVectors(e,t),ie.cross(Ye).dot(a)<0}set(e,t,i){return this.a.copy(e),this.b.copy(t),this.c.copy(i),this}setFromPointsAndIndices(e,t,i,a){return this.a.copy(e[t]),this.b.copy(e[i]),this.c.copy(e[a]),this}setFromAttributeAndIndices(e,t,i,a){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,i),this.c.fromBufferAttribute(e,a),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return ie.subVectors(this.c,this.b),Ye.subVectors(this.a,this.b),ie.cross(Ye).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return ae.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return ae.getBarycoord(e,this.a,this.b,this.c,t)}getUV(e,t,i,a,r){return ae.getUV(e,this.a,this.b,this.c,t,i,a,r)}containsPoint(e){return ae.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return ae.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){let i=this.a,a=this.b,r=this.c,o,s;J4.subVectors(a,i),Q4.subVectors(r,i),q3.subVectors(e,i);let c=J4.dot(q3),l=Q4.dot(q3);if(c<=0&&l<=0)return t.copy(i);W3.subVectors(e,a);let u=J4.dot(W3),f=Q4.dot(W3);if(u>=0&&f<=u)return t.copy(a);let h=c*f-u*l;if(h<=0&&c>=0&&u<=0)return o=c/(c-u),t.copy(i).addScaledVector(J4,o);j3.subVectors(e,r);let m=J4.dot(j3),v=Q4.dot(j3);if(v>=0&&m<=v)return t.copy(r);let g=m*l-c*v;if(g<=0&&l>=0&&v<=0)return s=l/(l-v),t.copy(i).addScaledVector(Q4,s);let x=u*v-m*f;if(x<=0&&f-u>=0&&m-v>=0)return F8.subVectors(r,a),s=(f-u)/(f-u+(m-v)),t.copy(a).addScaledVector(F8,s);let p=1/(x+g+h);return o=g*p,s=h*p,t.copy(i).addScaledVector(J4,o).addScaledVector(Q4,s)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}};var et=class extends H2{constructor(e){super();this.type="MeshBasicMaterial",this.color=new x1(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=q4,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this}};et.prototype.isMeshBasicMaterial=!0;var B8=new k1,tt=new O3,X3=new je,h4=new k,f4=new k,d4=new k,Z3=new k,Y3=new k,$3=new k,G6=new k,q6=new k,W6=new k,j6=new z1,X6=new z1,Z6=new z1,K3=new k,Y6=new k,u2=class extends j1{constructor(e=new y2,t=new et){super();this.type="Mesh",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e){return super.copy(e),e.morphTargetInfluences!==void 0&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),e.morphTargetDictionary!==void 0&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this.material=e.material,this.geometry=e.geometry,this}updateMorphTargets(){let e=this.geometry;if(e.isBufferGeometry){let t=e.morphAttributes,i=Object.keys(t);if(i.length>0){let a=t[i[0]];if(a!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,o=a.length;r0&&console.error("THREE.Mesh.updateMorphTargets() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}}raycast(e,t){let i=this.geometry,a=this.material,r=this.matrixWorld;if(a===void 0||(i.boundingSphere===null&&i.computeBoundingSphere(),X3.copy(i.boundingSphere),X3.applyMatrix4(r),e.ray.intersectsSphere(X3)===!1)||(B8.copy(r).invert(),tt.copy(e.ray).applyMatrix4(B8),i.boundingBox!==null&&tt.intersectsBox(i.boundingBox)===!1))return;let o;if(i.isBufferGeometry){let s=i.index,c=i.attributes.position,l=i.morphAttributes.position,u=i.morphTargetsRelative,f=i.attributes.uv,h=i.attributes.uv2,m=i.groups,v=i.drawRange;if(s!==null)if(Array.isArray(a))for(let g=0,x=m.length;gt.far?null:{distance:l,point:Y6.clone(),object:n}}function $6(n,e,t,i,a,r,o,s,c,l,u,f){h4.fromBufferAttribute(a,l),f4.fromBufferAttribute(a,u),d4.fromBufferAttribute(a,f);let h=n.morphTargetInfluences;if(r&&h){G6.set(0,0,0),q6.set(0,0,0),W6.set(0,0,0);for(let v=0,g=r.length;v2048||t.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),t.toDataURL("image/jpeg",.6)):t.toDataURL("image/png")}static sRGBToLinear(e){if(typeof HTMLImageElement!="undefined"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement!="undefined"&&e instanceof HTMLCanvasElement||typeof ImageBitmap!="undefined"&&e instanceof ImageBitmap){let t=L4("canvas");t.width=e.width,t.height=e.height;let i=t.getContext("2d");i.drawImage(e,0,0,e.width,e.height);let a=i.getImageData(0,0,e.width,e.height),r=a.data;for(let o=0;o1)switch(this.wrapS){case Ht:e.x=e.x-Math.floor(e.x);break;case c2:e.x=e.x<0?0:1;break;case Vt:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x);break}if(e.y<0||e.y>1)switch(this.wrapT){case Ht:e.y=e.y-Math.floor(e.y);break;case c2:e.y=e.y<0?0:1;break;case Vt:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&this.version++}};$1.DEFAULT_IMAGE=void 0;$1.DEFAULT_MAPPING=l3;$1.prototype.isTexture=!0;function J3(n){return typeof HTMLImageElement!="undefined"&&n instanceof HTMLImageElement||typeof HTMLCanvasElement!="undefined"&&n instanceof HTMLCanvasElement||typeof ImageBitmap!="undefined"&&n instanceof ImageBitmap?Ot.getDataURL(n):n.data?{data:Array.prototype.slice.call(n.data),width:n.width,height:n.height,type:n.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}var P8={specular:1515554,color:15790320,shininess:60,flatShading:!0},q2={diceColor:"#202020",textColor:"#ffffff"},re=class{constructor(e,t,i={diceColor:"#202020",textColor:"#aaaaaa"}){this.w=e;this.h=t;this.options=i;this.scale=50;this.labels=[" ","0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20"];this.fontFace="Arial";this.options={...q2,...i}}setColor({diceColor:e,textColor:t}){e&&(this.options.diceColor=e),t&&(this.options.textColor=t)}get radius(){return this.scale*this.scaleFactor}get diceColor(){return this.options.diceColor}get textColor(){return this.options.textColor}get buffer(){return this.geometry.geometry}create(){this.textureSize=this.calculateTextureSize(this.scale/2+this.scale*this.margin)*2;let e=this.getGeometry(),t=this.getMaterials();return this.geometry=new u2(e,t),this.geometry.receiveShadow=!0,this.geometry.castShadow=!0,this.body.position.set(0+this.radius*2*Math.random(),0+this.radius*2*Math.random(),0+this.radius*4),this.body.velocity.x=500*Math.random()*2-1,this.body.velocity.y=500*Math.random()*2-1,this.body.angularVelocity.x=100*Math.random(),this.body.angularVelocity.y=100*Math.random(),this}getGeometry(){let e=new Array(this.vertices.length);for(let i=0;i=0&&u=0&&l!==c+1?s.unshift([r,l],[o,u]):s.push([r,l],[o,u]),c=l)}s.length===4&&i.push([i[s[0][0]][s[0][1]],i[s[1][0]][s[1][1]],i[s[3][0]][s[3][1]],i[s[2][0]][s[2][1]],-1])}for(let r=0;r=0&&u<4){--u==-1&&(u=3);let f=i[l][u];if(o.indexOf(f)>=0){s.push(f);break}}}--c}s.push(-1),i.push(s)}return{vectors:t,faces:i}}makeGeometry(e,t){let i=new y2;for(let f=0;f1&&(s=s/l.length,o.font=`${s}pt '${this.fontFace}'`,c=o.measureText("M").width*1.2,a-=c*l.length/2);for(let f=0,h=l.length;f{let[r,s]=a.replace(/\\\|/g,"{ESCAPED_PIPE}").split("|").map(l=>l.replace(/{ESCAPED_PIPE}/g,"\\|")).map(l=>l.trim()),[,o,c]=r.match(/(\d+)(?:[^\d]+?(\d+))?/)??[];if(!(!o&&!c))return[[Number(o),c?Number(c):void 0],s]}),this.isLookup=!0)}if(this.header==="xy"&&!t.columns.has("xy")){this.options=[];for(let i of Array.from(t.columns.values()).slice(1))this.options.push(...i)}else if(this.header&&t.columns.has(this.header))this.options=t.columns.get(this.header);else{if(this.header)throw new Error(`Header ${this.header} was not found in table ${this.path} > ${this.block}.`);this.options=t.rows}}this.loaded=!0,this.trigger("loaded")}toResult(){return{type:"table",result:this.result}}async applyResult(e){e.type==="table"&&(e.result&&(this.result=e.result),await this.render())}},Ic=/^\|?([\s\S]+?)\|?$/,_a=/\|/g;function kc(n){let e=n.split(` +`),i=e.map(s=>(s.trim().match(Ic)??[,s.trim()])[1])[0].replace("\\|","{ESCAPED_PIPE}").split(_a),a=[],r=[];for(let s in i){let o=i[s];o.trim().length||(o=s),r.push([o.trim(),[]])}for(let s of e.slice(2)){let o=s.trim().replace(/\\\|/g,"{ESCAPED_PIPE}").split(_a).map(c=>c.replace(/{ESCAPED_PIPE}/g,"\\|")).map(c=>c.trim()).filter(c=>c.length);a.push(o.join(" | "));for(let c in o){let l=o[c].trim();!l.length||!r[c]||r[c][1].push(l)}}return{columns:new Map(r),rows:a}}var S1=w2(require("obsidian"));var h6=class extends S1.PluginSettingTab{constructor(e,t){super(e,t);this.plugin=t;this.plugin=t}async display(){let{containerEl:e}=this;e.empty(),e.addClass("dice-roller-settings"),e.createEl("h2",{text:"Dice Roller Settings"}),this.buildGenerics(e.createDiv()),this.buildDisplay(e.createDiv()),this.buildDice(e.createDiv()),this.buildTables(e.createDiv()),this.buildSections(e.createDiv()),this.buildTags(e.createDiv()),this.buildView(e.createDiv()),this.buildRender(e.createDiv()),this.buildFormulaSettings(e.createDiv("dice-roller-setting-additional-container")),e.createDiv("coffee").createEl("a",{href:"https://www.buymeacoffee.com/valentine195"}).createEl("img",{attr:{src:"https://img.buymeacoffee.com/button-api/?text=Buy me a coffee&emoji=\u2615&slug=valentine195&button_colour=e3e7ef&font_colour=262626&font_family=Inter&outline_colour=262626&coffee_colour=ff0000"}})}buildGenerics(e){e.empty(),new S1.Setting(e).setName("Globally Save Results").setDesc(createFragment(t=>{t.createSpan({text:"Dice results will be saved by default. This can be overridden using "}),t.createEl("code",{text:"dice-: formula"}),t.createEl("p",{text:"Please note that the plugin will attempt to save the result but may not be able to."})})).addToggle(t=>{t.setValue(this.plugin.data.persistResults),t.onChange(async i=>{this.plugin.data.persistResults=i,await this.plugin.saveSettings()})})}buildDisplay(e){e.empty(),new S1.Setting(e).setHeading().setName("Dice Display"),new S1.Setting(e).setName("Display Formula With Results").setDesc("Both the formula and the results will both be displayed in preview mode.").addToggle(t=>{t.setValue(this.plugin.data.displayResultsInline),t.onChange(async i=>{this.plugin.data.displayResultsInline=i,await this.plugin.saveSettings()})}),new S1.Setting(e).setName("Display Dice Button With Results").setDesc("A dice button will appear next to results.").addToggle(t=>{t.setValue(this.plugin.data.showDice),t.onChange(async i=>{this.plugin.data.showDice=i,await this.plugin.saveSettings()})}),new S1.Setting(e).setName("Add Formula When Using Modify Dice").setDesc(createFragment(t=>{t.createSpan({text:"Both the formula and the results will both be added to the note when using "}),t.createEl("code",{text:"dice-mod"}),t.createSpan({text:"."})})).addToggle(t=>{t.setValue(this.plugin.data.displayFormulaForMod),t.onChange(async i=>{this.plugin.data.displayFormulaForMod=i,await this.plugin.saveSettings()})}),new S1.Setting(e).setName("Display Formula in Parentheses After").setDesc(createFragment(t=>{t.createSpan({text:"For example, "}),t.createEl("code",{text:"`dice: 1d6`"}),t.createSpan({text:" will become "});let i=t.createSpan("dice-roller");i.createSpan({cls:"dice-roller-result",text:"3"}),(0,S1.setIcon)(i.createSpan("dice-roller-button"),Y2),t.createSpan({text:" (1d6). This only affects Dice Rollers."})})).addToggle(t=>{t.setValue(this.plugin.data.displayFormulaAfter),t.onChange(async i=>{this.plugin.data.displayFormulaAfter=i,await this.plugin.saveSettings()})})}buildDice(e){e.empty(),new S1.Setting(e).setHeading().setName("Dice Rollers"),new S1.Setting(e).setName("Default Face").setDesc("Use this as the number of faces when it is omitted.").addText(t=>{t.setValue(`${this.plugin.data.defaultFace}`),t.inputEl.onblur=async()=>{isNaN(Number(t.inputEl.value))&&new S1.Notice("The default face must be a number."),this.plugin.data.defaultFace=Number(t.inputEl.value),await this.plugin.saveSettings()}}),new S1.Setting(e).setName("Round Results").setDesc("Determine the rounding behavior for dice results.").addDropdown(t=>{t.addOptions(pe).setValue(this.plugin.data.round).onChange(i=>{this.plugin.data.round=i,this.plugin.saveSettings()})}),new S1.Setting(e).setName("Always Render Dice").setDesc(createFragment(t=>{t.createSpan({text:"Dice rolled in notes will always be rendered. Use the "}),t.createEl("code",{text:"|norender"}),t.createSpan({text:" flag to prevent it."})})).addToggle(t=>{t.setValue(this.plugin.data.renderAllDice).onChange(i=>{this.plugin.data.renderAllDice=i,this.plugin.saveSettings()})})}buildTables(e){e.empty(),new S1.Setting(e).setHeading().setName("Table Rollers"),new S1.Setting(e).setName("Display Lookup Table Roll").setDesc("Lookup table rolls will display the rolled number along with the result.").addToggle(t=>{t.setValue(this.plugin.data.displayLookupRoll),t.onChange(async i=>{this.plugin.data.displayLookupRoll=i,await this.plugin.saveSettings()})})}buildSections(e){e.empty(),new S1.Setting(e).setHeading().setName("Section Rollers"),new S1.Setting(e).setName("Add Copy Button to Section Results").setDesc("Randomly rolled sections will have a copy-content button to easy add result to clipboard.").addToggle(t=>{t.setValue(this.plugin.data.copyContentButton),t.onChange(async i=>{this.plugin.data.copyContentButton=i,await this.plugin.saveSettings()})}),new S1.Setting(e).setName("Display As Embeds").setDesc("Sections returned from Section & Tag Rollers will display as embedded fields.").addToggle(t=>{t.setValue(this.plugin.data.displayAsEmbed),t.onChange(async i=>{this.plugin.data.displayAsEmbed=i,await this.plugin.saveSettings()})})}buildTags(e){e.empty(),new S1.Setting(e).setHeading().setName("Tag Rollers"),new S1.Setting(e).setName("Roll All Files for Tags").setDesc("Return a result for each file when rolling tags.").addToggle(t=>{t.setValue(this.plugin.data.returnAllTags),t.onChange(async i=>{this.plugin.data.returnAllTags=i,await this.plugin.saveSettings()})}),new S1.Setting(e).setName("Always Return Links for Tags").setDesc("Enables random link rolling with the link parameter. Override by specifying a section type.").addToggle(t=>{t.setValue(this.plugin.data.rollLinksForTags),t.onChange(async i=>{this.plugin.data.rollLinksForTags=i,await this.plugin.saveSettings()})})}buildView(e){e.empty(),new S1.Setting(e).setHeading().setName("Dice View"),new S1.Setting(e).setName("Open Dice View on Startup").setDesc("The dice view can always be opened using the command from the command palette.").addToggle(t=>{t.setValue(this.plugin.data.showLeafOnStartup),t.onChange(async i=>{this.plugin.data.showLeafOnStartup=i,await this.plugin.saveSettings()})})}buildRender(e){e.empty(),new S1.Setting(e).setHeading().setName("Graphical Dice"),new S1.Setting(e).setName("Display graphics for Dice View Rolls").setDesc("Dice rolls from dice view will be displayed on screen.").addToggle(a=>{a.setValue(this.plugin.data.renderer),a.onChange(async r=>{this.plugin.data.renderer=r,await this.plugin.saveSettings()})}),new S1.Setting(e).setName("Display Time for Dice Graphics").setDesc("Rendered dice will stay on screen for this number of milliseconds. Leave blank to require a click to clear dice.").addText(a=>{a.inputEl.setAttr("type","number"),a.inputEl.onblur=r=>{Number(a.getValue())<0&&(new S1.Notice("Render time cannot be less than 0."),a.setValue("0"))},a.setValue(`${this.plugin.data.renderTime}`),a.onChange(async r=>{r&&Number(r)<0||isNaN(Number(r))||(this.plugin.data.renderTime=Number(r),await this.plugin.saveSettings())})}).addExtraButton(a=>{a.setIcon("reset").setTooltip("Reset to Default").onClick(async()=>{this.plugin.data.renderTime=f6.renderTime,await this.plugin.saveSettings(),this.buildRender(e)})}),new S1.Setting(e).setName("Dice Base Color").setDesc("Rendered dice will be this color.").controlEl.createEl("input",{type:"color",value:this.plugin.data.diceColor},a=>{a.value=this.plugin.data.diceColor,a.onchange=async({target:r})=>{let s=r.value;this.plugin.data.diceColor=s,await this.plugin.saveSettings(),this.plugin.app.workspace.trigger("dice-roller:update-colors")}}),new S1.Setting(e).setName("Dice Text Color").setDesc("Rendered dice will use this color for their numbers.").controlEl.createEl("input",{type:"color",value:this.plugin.data.textColor},a=>{a.value=this.plugin.data.textColor,a.onchange=async({target:r})=>{let s=r.value;!s||(this.plugin.data.textColor=s,await this.plugin.saveSettings(),this.plugin.app.workspace.trigger("dice-roller:update-colors"))}})}buildFormulaSettings(e){e.empty(),new S1.Setting(e).setHeading().setName("Saved Formulas");let t=e.createDiv();new S1.Setting(t).setName("Add Formula").setDesc("Add a new formula shortcut.").addButton(r=>r.setTooltip("Add Formula").setButtonText("+").onClick(async()=>{let o=await this.buildFormulaForm(t);o&&(this.plugin.data.formulas[o.alias]=o.formula,this.buildFormulaSettings(e),await this.plugin.saveSettings())}));let i=e.createDiv("additional"),a=this.plugin.data.formulas;for(let[r,s]of Object.entries(a)){let o=new S1.Setting(i).setName(r);o.controlEl.createSpan({text:s}),o.addExtraButton(c=>c.setIcon("pencil").setTooltip("Edit").onClick(async()=>{let l=await this.buildFormulaForm(t,{alias:r,formula:s});l&&(delete this.plugin.data.formulas[r],this.plugin.data.formulas[l.alias]=l.formula,this.buildFormulaSettings(e),await this.plugin.saveSettings())})).addExtraButton(c=>c.setIcon("trash").setTooltip("Delete").onClick(async()=>{delete this.plugin.data.formulas[r],await this.plugin.saveSettings(),this.buildFormulaSettings(e)}))}Object.values(a).length||i.createSpan({text:"Create a formula to see it here!",cls:"no-formulas"})}async buildFormulaForm(e,t={alias:null,formula:null}){return new Promise(i=>{let a=e.createDiv("add-new-formula"),r=a.createDiv("formula-data");new S1.Setting(r).setName("Alias").addText(o=>{o.setValue(t.alias).onChange(c=>t.alias=c)}),new S1.Setting(r).setName("Formula").addText(o=>{o.setValue(t.formula).onChange(c=>t.formula=c)});let s=a.createDiv("formula-buttons");new S1.Setting(s).addButton(o=>o.setCta().setButtonText("Save").onClick(async()=>{a.detach(),i(t)})).addExtraButton(o=>o.setIcon("cross").setTooltip("Cancel").onClick(()=>{a.detach(),i(null)}))})}};var L1=w2(require("obsidian"));var M4="DICE_ROLLER_VIEW",Uc='',Oc='',Gc='',qc='',Wc='',jc='',Xc='';(0,L1.addIcon)("d4",Uc);(0,L1.addIcon)("d6",Oc);(0,L1.addIcon)("d8",Gc);(0,L1.addIcon)("d10",qc);(0,L1.addIcon)("d12",Wc);(0,L1.addIcon)("d20",jc);(0,L1.addIcon)("d100",Xc);(0,L1.addIcon)("dice-roller-save",'');(0,L1.addIcon)("dice-roller-plus",'');(0,L1.addIcon)("dice-roller-minus",'');var Je=class extends L1.ItemView{constructor(e,t){super(t);this.plugin=e;this.leaf=t;this.dice=Je.DICE();this.custom="";this.adv=!1;this.dis=!1;this.add=0;this.contentEl.addClass("dice-roller-view"),this.registerEvent(this.plugin.app.workspace.on("dice-roller:update-colors",()=>{this.renderer.factory.updateColors()}))}static DICE(){return{d4:0,d6:0,d8:0,d10:0,d12:0,d20:0,d100:0}}get customFormulas(){return this.plugin.data.customFormulas}get renderer(){return this.plugin.renderer}async onOpen(){this.display()}async display(){this.contentEl.empty(),this.gridEl=this.contentEl.createDiv("dice-roller-grid"),this.formulaEl=this.contentEl.createDiv("dice-roller-formula");let e=this.contentEl.createDiv("dice-roller-results-container"),t=e.createDiv("dice-roller-results-header");t.createEl("h4",{text:"Results"}),new L1.ExtraButtonComponent(t.createDiv("clear-all")).setIcon("trash").setTooltip("Clear All").onClick(()=>{this.resultEl.empty(),this.resultEl.append(this.noResultsEl)}),this.resultEl=e.createDiv("dice-roller-results"),this.noResultsEl=this.resultEl.createSpan({text:"No results yet! Roll some dice to get started :)"}),this.buildButtons(),this.buildFormula()}buildButtons(){this.gridEl.empty();let e=this.gridEl.createDiv("dice-buttons");for(let o in this.dice){let c=new L1.ExtraButtonComponent(e.createDiv("dice-button")).setIcon(o);c.extraSettingsEl.onclick=async l=>{let u=l.getModifierState("Shift")?-1:1;this.dice[o]+=u,this.setFormula();let f=await this.plugin.getRoller(this.formulaComponent.inputEl.value,"view");f instanceof S2&&(this.stack=f)}}let t=this.gridEl.createDiv("advantage-disadvantage"),i=new L1.ButtonComponent(t).setButtonText("ADV").onClick(()=>{this.adv=!this.adv,this.dis=!1,this.adv?(i.setCta(),a.removeCta()):i.removeCta(),this.setFormula()}),a=new L1.ButtonComponent(t).setButtonText("DIS").onClick(()=>{this.dis=!this.dis,this.dis?(a.setCta(),i.removeCta()):a.removeCta(),this.adv=!1,this.setFormula()}),r=this.gridEl.createDiv("dice-context").createDiv("add-subtract");new L1.ExtraButtonComponent(r).setIcon("dice-roller-minus").onClick(()=>{this.add-=1,s.setValue(`${this.add}`),this.setFormula()});let s=new L1.TextComponent(r).setValue(`${this.add?this.add:""}`).onChange(o=>{isNaN(Number(o))||(this.add=Number(o)),this.setFormula()});if(new L1.ExtraButtonComponent(r).setIcon("dice-roller-plus").onClick(()=>{this.add+=1,s.setValue(`${this.add}`),this.setFormula()}),this.customFormulas.length){let o=this.gridEl.createDiv("dice-roller-results-container");o.createDiv("dice-roller-results-header").createEl("h4",{text:"Saved Formulas"});for(let l of this.customFormulas){let u=o.createDiv("dice-custom-formula-container"),f=u.createDiv("dice-custom-formula");new L1.ExtraButtonComponent(f).setIcon(Y2).setTooltip("Roll").onClick(()=>this.roll(l)),f.createSpan({text:l}),new L1.ExtraButtonComponent(u).setIcon("trash").setTooltip("Remove").onClick(()=>{this.plugin.data.customFormulas=this.plugin.data.customFormulas.filter(h=>h!=l),this.plugin.saveSettings(),this.buildButtons()})}}}async roll(e=this.formulaComponent.inputEl.value){if(!e)return;this.rollButton.setDisabled(!0);let t=await this.plugin.getRoller(e,"view");if(!(t instanceof S2)){new L1.Notice("The Dice View only supports dice rolls.");return}if(await t.roll(),!t.dice.length){new L1.Notice("Invalid formula.");return}try{this.plugin.data.renderer&&(this.addChild(this.renderer),this.renderer.setDice(t),await this.renderer.start(),t.recalculate())}catch(i){new L1.Notice("There was an error rendering the roll."),console.error(i)}this.rollButton.setDisabled(!1),this.addResult({result:t.result,original:t.original,resultText:t.resultText}),this.dice=Je.DICE(),this.add=null,this.adv=!1,this.dis=!1,this.buildButtons(),this.setFormula()}buildFormula(){this.formulaEl.empty(),this.formulaComponent=new L1.TextAreaComponent(this.formulaEl).setPlaceholder("Dice Formula"),this.formulaComponent.onChange((0,L1.debounce)(async t=>{},500,!0));let e=this.formulaEl.createDiv("action-buttons");this.saveButton=new L1.ButtonComponent(e).setIcon("plus-with-circle").setCta().setTooltip("Save Formula").onClick(()=>this.save()),this.saveButton.buttonEl.addClass("dice-roller-roll"),this.rollButton=new L1.ButtonComponent(e).setIcon(Y2).setCta().setTooltip("Roll").onClick(()=>this.roll()),this.rollButton.buttonEl.addClass("dice-roller-roll")}save(){!this.formulaComponent.inputEl.value||(this.plugin.data.customFormulas.push(this.formulaComponent.inputEl.value),this.buildButtons(),this.plugin.saveSettings())}addResult(e){this.noResultsEl&&this.noResultsEl.detach();let t=createDiv("view-result");t.createSpan({text:e.original}),t.createEl("strong",{text:`${e.result}`,attr:{"aria-label":e.resultText}});let i=t.createDiv("result-context");i.createEl("em",{text:new Date().toLocaleString()}),new L1.ExtraButtonComponent(i).setIcon("trash").onClick(()=>{t.detach(),this.resultEl.children.length===0&&this.resultEl.prepend(this.noResultsEl)}),new L1.ExtraButtonComponent(i).setIcon(Ke).setTooltip("Copy Result").onClick(async()=>{await navigator.clipboard.writeText(`${e.result}`)}).extraSettingsEl.addClass("dice-content-copy"),new L1.ExtraButtonComponent(i).setIcon(Y2).setTooltip("Roll Again").onClick(()=>this.roll(e.original)).extraSettingsEl.addClass("dice-result-reroll"),this.resultEl.prepend(t)}get formulaString(){let e=[],t=Object.entries(this.dice).filter(([a,r])=>r!=0);if(!t.length)return"";t.sort((a,r)=>Number(r[0].slice(1))-Number(a[0].slice(1)));let i=t.shift();return e.push(`${i[1]}${i[0]}`),this.adv?e.push("kh"):this.dis&&e.push("dh"),t.length&&e.push(...t.map(([a,r])=>`${r>0?"+":"-"}${Math.abs(r)}${a}`)),this.add&&this.add!=0&&(e.push(this.add>0?"+":"-"),e.push(Math.abs(this.add))),e.join("")}setFormula(){this.formulaComponent.setValue(this.formulaString)}getDisplayText(){return"Dice Roller"}getViewType(){return M4}getIcon(){return Y2}async onClose(){await super.onClose(),this.renderer.unload()}};var Xt=w2(require("obsidian"));var _2=class{constructor(e=[0,0,0,0,0,0,0,0,0]){this.elements=void 0,this.elements=e}identity(){let e=this.elements;e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1}setZero(){let e=this.elements;e[0]=0,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=0,e[6]=0,e[7]=0,e[8]=0}setTrace(e){let t=this.elements;t[0]=e.x,t[4]=e.y,t[8]=e.z}getTrace(e=new y){let t=this.elements;return e.x=t[0],e.y=t[4],e.z=t[8],e}vmult(e,t=new y){let i=this.elements,a=e.x,r=e.y,s=e.z;return t.x=i[0]*a+i[1]*r+i[2]*s,t.y=i[3]*a+i[4]*r+i[5]*s,t.z=i[6]*a+i[7]*r+i[8]*s,t}smult(e){for(let t=0;t0){let r=1/a;this.x*=r,this.y*=r,this.z*=r}else this.x=0,this.y=0,this.z=0;return a}unit(e=new y){let t=this.x,i=this.y,a=this.z,r=Math.sqrt(t*t+i*i+a*a);return r>0?(r=1/r,e.x=t*r,e.y=i*r,e.z=a*r):(e.x=1,e.y=0,e.z=0),e}length(){let e=this.x,t=this.y,i=this.z;return Math.sqrt(e*e+t*t+i*i)}lengthSquared(){return this.dot(this)}distanceTo(e){let t=this.x,i=this.y,a=this.z,r=e.x,s=e.y,o=e.z;return Math.sqrt((r-t)*(r-t)+(s-i)*(s-i)+(o-a)*(o-a))}distanceSquared(e){let t=this.x,i=this.y,a=this.z,r=e.x,s=e.y,o=e.z;return(r-t)*(r-t)+(s-i)*(s-i)+(o-a)*(o-a)}scale(e,t=new y){let i=this.x,a=this.y,r=this.z;return t.x=e*i,t.y=e*a,t.z=e*r,t}vmul(e,t=new y){return t.x=e.x*this.x,t.y=e.y*this.y,t.z=e.z*this.z,t}addScaledVector(e,t,i=new y){return i.x=this.x+e*t.x,i.y=this.y+e*t.y,i.z=this.z+e*t.z,i}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}isZero(){return this.x===0&&this.y===0&&this.z===0}negate(e=new y){return e.x=-this.x,e.y=-this.y,e.z=-this.z,e}tangents(e,t){let i=this.length();if(i>0){let a=Yc,r=1/i;a.set(this.x*r,this.y*r,this.z*r);let s=$c;Math.abs(a.x)<.9?(s.set(1,0,0),a.cross(s,e)):(s.set(0,1,0),a.cross(s,e)),a.cross(e,t)}else e.set(1,0,0),t.set(0,1,0)}toString(){return this.x+","+this.y+","+this.z}toArray(){return[this.x,this.y,this.z]}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}lerp(e,t,i){let a=this.x,r=this.y,s=this.z;i.x=a+(e.x-a)*t,i.y=r+(e.y-r)*t,i.z=s+(e.z-s)*t}almostEquals(e,t=1e-6){return!(Math.abs(this.x-e.x)>t||Math.abs(this.y-e.y)>t||Math.abs(this.z-e.z)>t)}almostZero(e=1e-6){return!(Math.abs(this.x)>e||Math.abs(this.y)>e||Math.abs(this.z)>e)}isAntiparallelTo(e,t){return this.negate(Ea),Ea.almostEquals(e,t)}clone(){return new y(this.x,this.y,this.z)}};y.ZERO=void 0;y.UNIT_X=void 0;y.UNIT_Y=void 0;y.UNIT_Z=void 0;y.ZERO=new y(0,0,0);y.UNIT_X=new y(1,0,0);y.UNIT_Y=new y(0,1,0);y.UNIT_Z=new y(0,0,1);var Yc=new y,$c=new y,Ea=new y,E2=class{constructor(e={}){this.lowerBound=void 0,this.upperBound=void 0,this.lowerBound=new y,this.upperBound=new y,e.lowerBound&&this.lowerBound.copy(e.lowerBound),e.upperBound&&this.upperBound.copy(e.upperBound)}setFromPoints(e,t,i,a){let r=this.lowerBound,s=this.upperBound,o=i;r.copy(e[0]),o&&o.vmult(r,r),s.copy(r);for(let c=1;cs.x&&(s.x=l.x),l.xs.y&&(s.y=l.y),l.ys.z&&(s.z=l.z),l.z=r.x&&t.y<=a.y&&i.y>=r.y&&t.z<=a.z&&i.z>=r.z}getCorners(e,t,i,a,r,s,o,c){let l=this.lowerBound,u=this.upperBound;e.copy(l),t.set(u.x,l.y,l.z),i.set(u.x,u.y,l.z),a.set(l.x,u.y,u.z),r.set(u.x,l.y,u.z),s.set(l.x,u.y,l.z),o.set(l.x,l.y,u.z),c.copy(u)}toLocalFrame(e,t){let i=Da,a=i[0],r=i[1],s=i[2],o=i[3],c=i[4],l=i[5],u=i[6],f=i[7];this.getCorners(a,r,s,o,c,l,u,f);for(let h=0;h!==8;h++){let p=i[h];e.pointToLocal(p,p)}return t.setFromPoints(i)}toWorldFrame(e,t){let i=Da,a=i[0],r=i[1],s=i[2],o=i[3],c=i[4],l=i[5],u=i[6],f=i[7];this.getCorners(a,r,s,o,c,l,u,f);for(let h=0;h!==8;h++){let p=i[h];e.pointToWorld(p,p)}return t.setFromPoints(i)}overlapsRay(e){let{direction:t,from:i}=e,a=1/t.x,r=1/t.y,s=1/t.z,o=(this.lowerBound.x-i.x)*a,c=(this.upperBound.x-i.x)*a,l=(this.lowerBound.y-i.y)*r,u=(this.upperBound.y-i.y)*r,f=(this.lowerBound.z-i.z)*s,h=(this.upperBound.z-i.z)*s,p=Math.max(Math.max(Math.min(o,c),Math.min(l,u)),Math.min(f,h)),v=Math.min(Math.min(Math.max(o,c),Math.max(l,u)),Math.max(f,h));return!(v<0||p>v)}},La=new y,Da=[new y,new y,new y,new y,new y,new y,new y,new y],I0=class{constructor(){this.matrix=void 0,this.matrix=[]}get(e,t){let{index:i}=e,{index:a}=t;if(a>i){let r=a;a=i,i=r}return this.matrix[(i*(i+1)>>1)+a-1]}set(e,t,i){let{index:a}=e,{index:r}=t;if(r>a){let s=r;r=a,a=s}this.matrix[(a*(a+1)>>1)+r-1]=i?1:0}reset(){for(let e=0,t=this.matrix.length;e!==t;e++)this.matrix[e]=0}setNumObjects(e){this.matrix.length=e*(e-1)>>1}},k0=class{constructor(){this._listeners=void 0}addEventListener(e,t){this._listeners===void 0&&(this._listeners={});let i=this._listeners;return i[e]===void 0&&(i[e]=[]),i[e].includes(t)||i[e].push(t),this}hasEventListener(e,t){if(this._listeners===void 0)return!1;let i=this._listeners;return!!(i[e]!==void 0&&i[e].includes(t))}hasAnyEventListener(e){return this._listeners===void 0?!1:this._listeners[e]!==void 0}removeEventListener(e,t){if(this._listeners===void 0)return this;let i=this._listeners;if(i[e]===void 0)return this;let a=i[e].indexOf(t);return a!==-1&&i[e].splice(a,1),this}dispatchEvent(e){if(this._listeners===void 0)return this;let i=this._listeners[e.type];if(i!==void 0){e.target=this;for(let a=0,r=i.length;a.499&&(i=2*Math.atan2(s,l),a=Math.PI/2,r=0),u<-.499&&(i=-2*Math.atan2(s,l),a=-Math.PI/2,r=0),i===void 0){let f=s*s,h=o*o,p=c*c;i=Math.atan2(2*o*l-2*s*c,1-2*h-2*p),a=Math.asin(2*u),r=Math.atan2(2*s*l-2*o*c,1-2*f-2*p)}break;default:throw new Error("Euler order "+t+" not supported yet.")}e.y=i,e.z=a,e.x=r}setFromEuler(e,t,i,a="XYZ"){let r=Math.cos(e/2),s=Math.cos(t/2),o=Math.cos(i/2),c=Math.sin(e/2),l=Math.sin(t/2),u=Math.sin(i/2);return a==="XYZ"?(this.x=c*s*o+r*l*u,this.y=r*l*o-c*s*u,this.z=r*s*u+c*l*o,this.w=r*s*o-c*l*u):a==="YXZ"?(this.x=c*s*o+r*l*u,this.y=r*l*o-c*s*u,this.z=r*s*u-c*l*o,this.w=r*s*o+c*l*u):a==="ZXY"?(this.x=c*s*o-r*l*u,this.y=r*l*o+c*s*u,this.z=r*s*u+c*l*o,this.w=r*s*o-c*l*u):a==="ZYX"?(this.x=c*s*o-r*l*u,this.y=r*l*o+c*s*u,this.z=r*s*u-c*l*o,this.w=r*s*o+c*l*u):a==="YZX"?(this.x=c*s*o+r*l*u,this.y=r*l*o+c*s*u,this.z=r*s*u-c*l*o,this.w=r*s*o-c*l*u):a==="XZY"&&(this.x=c*s*o-r*l*u,this.y=r*l*o-c*s*u,this.z=r*s*u+c*l*o,this.w=r*s*o+c*l*u),this}clone(){return new O1(this.x,this.y,this.z,this.w)}slerp(e,t,i=new O1){let a=this.x,r=this.y,s=this.z,o=this.w,c=e.x,l=e.y,u=e.z,f=e.w,h,p,v,g,x;return p=a*c+r*l+s*u+o*f,p<0&&(p=-p,c=-c,l=-l,u=-u,f=-f),1-p>1e-6?(h=Math.acos(p),v=Math.sin(h),g=Math.sin((1-t)*h)/v,x=Math.sin(t*h)/v):(g=1-t,x=t),i.x=g*a+x*c,i.y=g*r+x*l,i.z=g*s+x*u,i.w=g*o+x*f,i}integrate(e,t,i,a=new O1){let r=e.x*i.x,s=e.y*i.y,o=e.z*i.z,c=this.x,l=this.y,u=this.z,f=this.w,h=t*.5;return a.x+=h*(r*f+s*u-o*l),a.y+=h*(s*f+o*c-r*u),a.z+=h*(o*f+r*l-s*c),a.w+=h*(-r*c-s*l-o*u),a}},Kc=new y,Jc=new y,Qc={SPHERE:1,PLANE:2,BOX:4,COMPOUND:8,CONVEXPOLYHEDRON:16,HEIGHTFIELD:32,PARTICLE:64,CYLINDER:128,TRIMESH:256},c1=class{constructor(e={}){this.id=void 0,this.type=void 0,this.boundingSphereRadius=void 0,this.collisionResponse=void 0,this.collisionFilterGroup=void 0,this.collisionFilterMask=void 0,this.material=void 0,this.body=void 0,this.id=c1.idCounter++,this.type=e.type||0,this.boundingSphereRadius=0,this.collisionResponse=e.collisionResponse?e.collisionResponse:!0,this.collisionFilterGroup=e.collisionFilterGroup!==void 0?e.collisionFilterGroup:1,this.collisionFilterMask=e.collisionFilterMask!==void 0?e.collisionFilterMask:-1,this.material=e.material?e.material:null,this.body=null}updateBoundingSphereRadius(){throw"computeBoundingSphereRadius() not implemented for shape type "+this.type}volume(){throw"volume() not implemented for shape type "+this.type}calculateLocalInertia(e,t){throw"calculateLocalInertia() not implemented for shape type "+this.type}calculateWorldAABB(e,t,i,a){throw"calculateWorldAABB() not implemented for shape type "+this.type}};c1.idCounter=0;c1.types=Qc;var N1=class{constructor(e={}){this.position=void 0,this.quaternion=void 0,this.position=new y,this.quaternion=new O1,e.position&&this.position.copy(e.position),e.quaternion&&this.quaternion.copy(e.quaternion)}pointToLocal(e,t){return N1.pointToLocalFrame(this.position,this.quaternion,e,t)}pointToWorld(e,t){return N1.pointToWorldFrame(this.position,this.quaternion,e,t)}vectorToWorldFrame(e,t=new y){return this.quaternion.vmult(e,t),t}static pointToLocalFrame(e,t,i,a=new y){return i.vsub(e,a),t.conjugate(Ta),Ta.vmult(a,a),a}static pointToWorldFrame(e,t,i,a=new y){return t.vmult(i,a),a.vadd(e,a),a}static vectorToWorldFrame(e,t,i=new y){return e.vmult(t,i),i}static vectorToLocalFrame(e,t,i,a=new y){return t.w*=-1,t.vmult(i,a),t.w*=-1,a}},Ta=new O1,Qe=class extends c1{constructor(e={}){let{vertices:t=[],faces:i=[],normals:a=[],axes:r,boundingSphereRadius:s}=e;super({type:c1.types.CONVEXPOLYHEDRON});this.vertices=void 0,this.faces=void 0,this.faceNormals=void 0,this.worldVertices=void 0,this.worldVerticesNeedsUpdate=void 0,this.worldFaceNormals=void 0,this.worldFaceNormalsNeedsUpdate=void 0,this.uniqueAxes=void 0,this.uniqueEdges=void 0,this.vertices=t,this.faces=i,this.faceNormals=a,this.faceNormals.length===0&&this.computeNormals(),s?this.boundingSphereRadius=s:this.updateBoundingSphereRadius(),this.worldVertices=[],this.worldVerticesNeedsUpdate=!0,this.worldFaceNormals=[],this.worldFaceNormalsNeedsUpdate=!0,this.uniqueAxes=r?r.slice():null,this.uniqueEdges=[],this.computeEdges()}computeEdges(){let e=this.faces,t=this.vertices,i=this.uniqueEdges;i.length=0;let a=new y;for(let r=0;r!==e.length;r++){let s=e[r],o=s.length;for(let c=0;c!==o;c++){let l=(c+1)%o;t[s[c]].vsub(t[s[l]],a),a.normalize();let u=!1;for(let f=0;f!==i.length;f++)if(i[f].almostEquals(a)||i[f].almostEquals(a)){u=!0;break}u||i.push(a.clone())}}}computeNormals(){this.faceNormals.length=this.faces.length;for(let e=0;eh&&(h=g,f=v)}let p=[];for(let v=0;v=0&&this.clipFaceAgainstHull(s,e,t,p,o,c,l)}findSeparatingAxis(e,t,i,a,r,s,o,c){let l=new y,u=new y,f=new y,h=new y,p=new y,v=new y,g=Number.MAX_VALUE,x=this;if(x.uniqueAxes)for(let m=0;m!==x.uniqueAxes.length;m++){i.vmult(x.uniqueAxes[m],l);let d=x.testSepAxis(l,e,t,i,a,r);if(d===!1)return!1;d0&&s.negate(s),!0}testSepAxis(e,t,i,a,r,s){let o=this;Qe.project(o,e,i,a,U0),Qe.project(t,e,r,s,O0);let c=U0[0],l=U0[1],u=O0[0],f=O0[1];if(c0?1/t:0,this.material=e.material||null,this.linearDamping=typeof e.linearDamping=="number"?e.linearDamping:.01,this.type=t<=0?i1.STATIC:i1.DYNAMIC,typeof e.type==typeof i1.STATIC&&(this.type=e.type),this.allowSleep=typeof e.allowSleep!="undefined"?e.allowSleep:!0,this.sleepState=i1.AWAKE,this.sleepSpeedLimit=typeof e.sleepSpeedLimit!="undefined"?e.sleepSpeedLimit:.1,this.sleepTimeLimit=typeof e.sleepTimeLimit!="undefined"?e.sleepTimeLimit:1,this.timeLastSleepy=0,this.wakeUpAfterNarrowphase=!1,this.torque=new y,this.quaternion=new O1,this.initQuaternion=new O1,this.previousQuaternion=new O1,this.interpolatedQuaternion=new O1,e.quaternion&&(this.quaternion.copy(e.quaternion),this.initQuaternion.copy(e.quaternion),this.previousQuaternion.copy(e.quaternion),this.interpolatedQuaternion.copy(e.quaternion)),this.angularVelocity=new y,e.angularVelocity&&this.angularVelocity.copy(e.angularVelocity),this.initAngularVelocity=new y,this.shapes=[],this.shapeOffsets=[],this.shapeOrientations=[],this.inertia=new y,this.invInertia=new y,this.invInertiaWorld=new _2,this.invMassSolve=0,this.invInertiaSolve=new y,this.invInertiaWorldSolve=new _2,this.fixedRotation=typeof e.fixedRotation!="undefined"?e.fixedRotation:!1,this.angularDamping=typeof e.angularDamping!="undefined"?e.angularDamping:.01,this.linearFactor=new y(1,1,1),e.linearFactor&&this.linearFactor.copy(e.linearFactor),this.angularFactor=new y(1,1,1),e.angularFactor&&this.angularFactor.copy(e.angularFactor),this.aabb=new E2,this.aabbNeedsUpdate=!0,this.boundingRadius=0,this.wlambda=new y,this.isTrigger=Boolean(e.isTrigger),e.shape&&this.addShape(e.shape),this.updateMassProperties()}wakeUp(){let e=this.sleepState;this.sleepState=i1.AWAKE,this.wakeUpAfterNarrowphase=!1,e===i1.SLEEPING&&this.dispatchEvent(i1.wakeupEvent)}sleep(){this.sleepState=i1.SLEEPING,this.velocity.set(0,0,0),this.angularVelocity.set(0,0,0),this.wakeUpAfterNarrowphase=!1}sleepTick(e){if(this.allowSleep){let t=this.sleepState,i=this.velocity.lengthSquared()+this.angularVelocity.lengthSquared(),a=this.sleepSpeedLimit**2;t===i1.AWAKE&&ia?this.wakeUp():t===i1.SLEEPY&&e-this.timeLastSleepy>this.sleepTimeLimit&&(this.sleep(),this.dispatchEvent(i1.sleepEvent))}}updateSolveMassProperties(){this.sleepState===i1.SLEEPING||this.type===i1.KINEMATIC?(this.invMassSolve=0,this.invInertiaSolve.setZero(),this.invInertiaWorldSolve.setZero()):(this.invMassSolve=this.invMass,this.invInertiaSolve.copy(this.invInertia),this.invInertiaWorldSolve.copy(this.invInertiaWorld))}pointToLocalFrame(e,t=new y){return e.vsub(this.position,t),this.quaternion.conjugate().vmult(t,t),t}vectorToLocalFrame(e,t=new y){return this.quaternion.conjugate().vmult(e,t),t}pointToWorldFrame(e,t=new y){return this.quaternion.vmult(e,t),t.vadd(this.position,t),t}vectorToWorldFrame(e,t=new y){return this.quaternion.vmult(e,t),t}addShape(e,t,i){let a=new y,r=new O1;return t&&a.copy(t),i&&r.copy(i),this.shapes.push(e),this.shapeOffsets.push(a),this.shapeOrientations.push(r),this.updateMassProperties(),this.updateBoundingRadius(),this.aabbNeedsUpdate=!0,e.body=this,this}removeShape(e){let t=this.shapes.indexOf(e);return t===-1?(console.warn("Shape does not belong to the body"),this):(this.shapes.splice(t,1),this.shapeOffsets.splice(t,1),this.shapeOrientations.splice(t,1),this.updateMassProperties(),this.updateBoundingRadius(),this.aabbNeedsUpdate=!0,e.body=null,this)}updateBoundingRadius(){let e=this.shapes,t=this.shapeOffsets,i=e.length,a=0;for(let r=0;r!==i;r++){let s=e[r];s.updateBoundingSphereRadius();let o=t[r].length(),c=s.boundingSphereRadius;o+c>a&&(a=o+c)}this.boundingRadius=a}updateAABB(){let e=this.shapes,t=this.shapeOffsets,i=this.shapeOrientations,a=e.length,r=i7,s=a7,o=this.quaternion,c=this.aabb,l=r7;for(let u=0;u!==a;u++){let f=e[u];o.vmult(t[u],r),r.vadd(this.position,r),o.mult(i[u],s),f.calculateWorldAABB(r,s,l.lowerBound,l.upperBound),u===0?c.copy(l):c.extend(l)}this.aabbNeedsUpdate=!1}updateInertiaWorld(e){let t=this.invInertia;if(!(t.x===t.y&&t.y===t.z&&!e)){let i=n7,a=s7;i.setRotationFromQuaternion(this.quaternion),i.transpose(a),i.scale(t,i),i.mmult(a,this.invInertiaWorld)}}applyForce(e,t=new y){if(this.type!==i1.DYNAMIC)return;this.sleepState===i1.SLEEPING&&this.wakeUp();let i=o7;t.cross(e,i),this.force.vadd(e,this.force),this.torque.vadd(i,this.torque)}applyLocalForce(e,t=new y){if(this.type!==i1.DYNAMIC)return;let i=c7,a=l7;this.vectorToWorldFrame(e,i),this.vectorToWorldFrame(t,a),this.applyForce(i,a)}applyTorque(e){this.type===i1.DYNAMIC&&(this.sleepState===i1.SLEEPING&&this.wakeUp(),this.torque.vadd(e,this.torque))}applyImpulse(e,t=new y){if(this.type!==i1.DYNAMIC)return;this.sleepState===i1.SLEEPING&&this.wakeUp();let i=t,a=u7;a.copy(e),a.scale(this.invMass,a),this.velocity.vadd(a,this.velocity);let r=h7;i.cross(e,r),this.invInertiaWorld.vmult(r,r),this.angularVelocity.vadd(r,this.angularVelocity)}applyLocalImpulse(e,t=new y){if(this.type!==i1.DYNAMIC)return;let i=f7,a=d7;this.vectorToWorldFrame(e,i),this.vectorToWorldFrame(t,a),this.applyImpulse(i,a)}updateMassProperties(){let e=p7;this.invMass=this.mass>0?1/this.mass:0;let t=this.inertia,i=this.fixedRotation;this.updateAABB(),e.set((this.aabb.upperBound.x-this.aabb.lowerBound.x)/2,(this.aabb.upperBound.y-this.aabb.lowerBound.y)/2,(this.aabb.upperBound.z-this.aabb.lowerBound.z)/2),d6.calculateInertia(e,this.mass,t),this.invInertia.set(t.x>0&&!i?1/t.x:0,t.y>0&&!i?1/t.y:0,t.z>0&&!i?1/t.z:0),this.updateInertiaWorld(!0)}getVelocityAtWorldPoint(e,t){let i=new y;return e.vsub(this.position,i),this.angularVelocity.cross(i,t),this.velocity.vadd(t,t),t}integrate(e,t,i){if(this.previousPosition.copy(this.position),this.previousQuaternion.copy(this.quaternion),!(this.type===i1.DYNAMIC||this.type===i1.KINEMATIC)||this.sleepState===i1.SLEEPING)return;let a=this.velocity,r=this.angularVelocity,s=this.position,o=this.force,c=this.torque,l=this.quaternion,u=this.invMass,f=this.invInertiaWorld,h=this.linearFactor,p=u*e;a.x+=o.x*p*h.x,a.y+=o.y*p*h.y,a.z+=o.z*p*h.z;let v=f.elements,g=this.angularFactor,x=c.x*g.x,m=c.y*g.y,d=c.z*g.z;r.x+=e*(v[0]*x+v[1]*m+v[2]*d),r.y+=e*(v[3]*x+v[4]*m+v[5]*d),r.z+=e*(v[6]*x+v[7]*m+v[8]*d),s.x+=a.x*e,s.y+=a.y*e,s.z+=a.z*e,l.integrate(this.angularVelocity,e,this.angularFactor,l),t&&(i?l.normalizeFast():l.normalize()),this.aabbNeedsUpdate=!0,this.updateInertiaWorld()}};i1.idCounter=0;i1.COLLIDE_EVENT_NAME="collide";i1.DYNAMIC=G0.DYNAMIC;i1.STATIC=G0.STATIC;i1.KINEMATIC=G0.KINEMATIC;i1.AWAKE=q0.AWAKE;i1.SLEEPY=q0.SLEEPY;i1.SLEEPING=q0.SLEEPING;i1.wakeupEvent={type:"wakeup"};i1.sleepyEvent={type:"sleepy"};i1.sleepEvent={type:"sleep"};var i7=new y,a7=new O1,r7=new E2,n7=new _2,s7=new _2,o7=new y,c7=new y,l7=new y,u7=new y,h7=new y,f7=new y,d7=new y,p7=new y,Ha=class{constructor(){this.world=void 0,this.useBoundingBoxes=void 0,this.dirty=void 0,this.world=null,this.useBoundingBoxes=!1,this.dirty=!0}collisionPairs(e,t,i){throw new Error("collisionPairs not implemented for this BroadPhase class!")}needBroadphaseCollision(e,t){return!((e.collisionFilterGroup&t.collisionFilterMask)==0||(t.collisionFilterGroup&e.collisionFilterMask)==0||((e.type&i1.STATIC)!=0||e.sleepState===i1.SLEEPING)&&((t.type&i1.STATIC)!=0||t.sleepState===i1.SLEEPING))}intersectionTest(e,t,i,a){this.useBoundingBoxes?this.doBoundingBoxBroadphase(e,t,i,a):this.doBoundingSphereBroadphase(e,t,i,a)}doBoundingSphereBroadphase(e,t,i,a){let r=m7;t.position.vsub(e.position,r);let s=(e.boundingRadius+t.boundingRadius)**2;r.lengthSquared()i.lengthSquared()}aabbQuery(e,t,i){return console.warn(".aabbQuery is not implemented in this Broadphase subclass."),[]}},m7=new y,v7={keys:[]},g7=[],x7=[];var bf=new y,p6=class extends Ha{constructor(){super()}collisionPairs(e,t,i){let a=e.bodies,r=a.length,s,o;for(let c=0;c!==r;c++)for(let l=0;l!==c;l++)s=a[c],o=a[l],!!this.needBroadphaseCollision(s,o)&&this.intersectionTest(s,o,t,i)}aabbQuery(e,t,i=[]){for(let a=0;a{}}intersectWorld(e,t){return this.mode=t.mode||Q1.ANY,this.result=t.result||new m6,this.skipBackfaces=!!t.skipBackfaces,this.collisionFilterMask=typeof t.collisionFilterMask!="undefined"?t.collisionFilterMask:-1,this.collisionFilterGroup=typeof t.collisionFilterGroup!="undefined"?t.collisionFilterGroup:-1,this.checkCollisionResponse=typeof t.checkCollisionResponse!="undefined"?t.checkCollisionResponse:!0,t.from&&this.from.copy(t.from),t.to&&this.to.copy(t.to),this.callback=t.callback||(()=>{}),this.hasHit=!1,this.result.reset(),this.updateDirection(),this.getAABB(ka),j0.length=0,e.broadphase.aabbQuery(e,ka,j0),this.intersectBodies(j0),this.hasHit}intersectBody(e,t){t&&(this.result=t,this.updateDirection());let i=this.checkCollisionResponse;if(i&&!e.collisionResponse||(this.collisionFilterGroup&e.collisionFilterMask)==0||(e.collisionFilterGroup&this.collisionFilterMask)==0)return;let a=M7,r=b7;for(let s=0,o=e.shapes.length;se.boundingSphereRadius)return;let o=this[e.type];o&&o.call(this,e,t,i,a,e)}_intersectBox(e,t,i,a,r){return this._intersectConvex(e.convexPolyhedronRepresentation,t,i,a,r)}_intersectPlane(e,t,i,a,r){let s=this.from,o=this.to,c=this.direction,l=new y(0,0,1);t.vmult(l,l);let u=new y;s.vsub(i,u);let f=u.dot(l);o.vsub(i,u);let h=u.dot(l);if(f*h>0||s.distanceTo(o)=0&&g<=1&&(s.lerp(o,g,p),p.vsub(i,v),v.normalize(),this.reportIntersection(v,p,r,a,-1)),this.result.shouldStop)return;x>=0&&x<=1&&(s.lerp(o,x,p),p.vsub(i,v),v.normalize(),this.reportIntersection(v,p,r,a,-1))}}_intersectConvex(e,t,i,a,r,s){let o=w7,c=Oa,l=s&&s.faceList||null,u=e.faces,f=e.vertices,h=e.faceNormals,p=this.direction,v=this.from,g=this.to,x=v.distanceTo(g),m=l?l.length:u.length,d=this.result;for(let A=0;!d.shouldStop&&Ax||this.reportIntersection(o,L2,r,a,b)}}}}_intersectTrimesh(e,t,i,a,r,s){let o=S7,c=H7,l=V7,u=Oa,f=_7,h=E7,p=L7,v=T7,g=D7,x=e.indices;e.vertices;let m=this.from,d=this.to,A=this.direction;l.position.copy(i),l.quaternion.copy(t),N1.vectorToLocalFrame(i,t,A,f),N1.pointToLocalFrame(i,t,m,h),N1.pointToLocalFrame(i,t,d,p),p.x*=e.scale.x,p.y*=e.scale.y,p.z*=e.scale.z,h.x*=e.scale.x,h.y*=e.scale.y,h.z*=e.scale.z,p.vsub(h,f),f.normalize();let b=h.distanceSquared(p);e.tree.rayQuery(this,l,c);for(let C=0,E=c.length;!this.result.shouldStop&&C!==E;C++){let T=c[C];e.getNormal(T,o),e.getVertex(x[T*3],$2),$2.vsub(h,u);let _=f.dot(o),P=o.dot(u)/_;if(P<0)continue;f.scale(P,L2),L2.vadd(h,L2),e.getVertex(x[T*3+1],ve),e.getVertex(x[T*3+2],ge);let F=L2.distanceSquared(h);!(Q1.pointInTriangle(L2,ve,$2,ge)||Q1.pointInTriangle(L2,$2,ve,ge))||F>b||(N1.vectorToWorldFrame(t,o,g),N1.pointToWorldFrame(i,t,L2,v),this.reportIntersection(g,v,r,a,T))}c.length=0}reportIntersection(e,t,i,a,r){let s=this.from,o=this.to,c=s.distanceTo(t),l=this.result;if(!(this.skipBackfaces&&e.dot(this.direction)>0))switch(l.hitFaceIndex=typeof r!="undefined"?r:-1,this.mode){case Q1.ALL:this.hasHit=!0,l.set(s,o,e,t,i,a,c),l.hasHit=!0,this.callback(l);break;case Q1.CLOSEST:(c=0&&(f=r*l-s*o)>=0&&u+fT.maxForce&&(p=T.maxForce-x),A[E]+=p,v+=p>0?p:-p,T.addToWlambda(p)}if(v*ve;)t.pop();for(;t.length=0&&u.restitution>=0&&(o.restitution=l.restitution*u.restitution),o.si=r||i,o.sj=s||a,o}createFrictionEquationsFromContact(e,t){let i=e.bi,a=e.bj,r=e.si,s=e.sj,o=this.world,c=this.currentContactMaterial,l=c.friction,u=r.material||i.material,f=s.material||a.material;if(u&&f&&u.friction>=0&&f.friction>=0&&(l=u.friction*f.friction),l>0){let h=l*o.gravity.length(),p=i.invMass+a.invMass;p>0&&(p=1/p);let v=this.frictionEquationPool,g=v.length?v.pop():new $0(i,a,h*p),x=v.length?v.pop():new $0(i,a,h*p);return g.bi=x.bi=i,g.bj=x.bj=a,g.minForce=x.minForce=-h*p,g.maxForce=x.maxForce=h*p,g.ri.copy(e.ri),g.rj.copy(e.rj),x.ri.copy(e.ri),x.rj.copy(e.rj),e.ni.tangents(g.t,x.t),g.setSpookParams(c.frictionEquationStiffness,c.frictionEquationRelaxation,o.dt),x.setSpookParams(c.frictionEquationStiffness,c.frictionEquationRelaxation,o.dt),g.enabled=x.enabled=e.enabled,t.push(g,x),!0}return!1}createFrictionFromAverage(e){let t=this.result[this.result.length-1];if(!this.createFrictionEquationsFromContact(t,this.frictionResult)||e===1)return;let i=this.frictionResult[this.frictionResult.length-2],a=this.frictionResult[this.frictionResult.length-1];y4.setZero(),U4.setZero(),O4.setZero();let r=t.bi;t.bj;for(let o=0;o!==e;o++)t=this.result[this.result.length-1-o],t.bi!==r?(y4.vadd(t.ni,y4),U4.vadd(t.ri,U4),O4.vadd(t.rj,O4)):(y4.vsub(t.ni,y4),U4.vadd(t.rj,U4),O4.vadd(t.ri,O4));let s=1/e;U4.scale(s,i.ri),O4.scale(s,i.rj),a.ri.copy(i.ri),a.rj.copy(i.rj),y4.normalize(),y4.tangents(i.t,a.t)}getContacts(e,t,i,a,r,s,o){this.contactPointPool=r,this.frictionEquationPool=o,this.result=a,this.frictionResult=s;let c=K7,l=J7,u=Y7,f=$7;for(let h=0,p=e.length;h!==p;h++){let v=e[h],g=t[h],x=null;v.material&&g.material&&(x=i.getContactMaterial(v.material,g.material)||null);let m=v.type&i1.KINEMATIC&&g.type&i1.STATIC||v.type&i1.STATIC&&g.type&i1.KINEMATIC||v.type&i1.KINEMATIC&&g.type&i1.KINEMATIC;for(let d=0;dA.boundingSphereRadius+C.boundingSphereRadius)continue;let E=null;A.material&&C.material&&(E=i.getContactMaterial(A.material,C.material)||null),this.currentContactMaterial=E||x||i.defaultContactMaterial;let T=A.type|C.type,_=this[T];if(_){let P=!1;A.type0){let W=Cl,X=zl;W.copy(p[(L+1)%3]),X.copy(p[(L+2)%3]);let Q=W.length(),a1=X.length();W.normalize(),X.normalize();let B=y6.dot(W),M1=y6.dot(X);if(B-Q&&M1-a1){let u1=Math.abs(O-Z-v);if((T===null||u1e.boundingSphereRadius+t.boundingSphereRadius)&&e.findSeparatingAxis(t,i,r,a,s,v,h,p)){let g=[],x=ql;e.clipAgainstHull(i,r,t,a,s,v,-100,100,g);let m=0;for(let d=0;d!==g.length;d++){if(f)return!0;let A=this.createContactEquation(o,c,e,t,l,u),b=A.ri,C=A.rj;v.negate(A.ni),g[d].normal.negate(x),x.scale(g[d].depth,x),g[d].point.vadd(x,b),C.copy(g[d].point),b.vsub(i,b),C.vsub(a,C),b.vadd(i,b),b.vsub(o.position,b),C.vadd(a,C),C.vsub(c.position,C),this.result.push(A),m++,this.enableFrictionReduction||this.createFrictionEquationsFromContact(A,this.frictionResult)}this.enableFrictionReduction&&m&&this.createFrictionFromAverage(m)}}sphereConvex(e,t,i,a,r,s,o,c,l,u,f){let h=this.v3pool;i.vsub(a,Ll);let p=t.faceNormals,v=t.faces,g=t.vertices,x=e.radius,m=!1;for(let d=0;d!==g.length;d++){let A=g[d],b=Vl;s.vmult(A,b),a.vadd(b,b);let C=Hl;if(b.vsub(i,C),C.lengthSquared()0){let D=[];for(let z=0,H=C.length;z!==H;z++){let V=h.get();s.vmult(g[C[z]],V),a.vadd(V,V),D.push(V)}if(bl(D,E,i)){if(f)return!0;m=!0;let z=this.createContactEquation(o,c,e,t,l,u);E.scale(-x,z.ri),E.negate(z.ni);let H=h.get();E.scale(-F,H);let V=h.get();E.scale(-x,V),i.vsub(a,z.rj),z.rj.vadd(V,z.rj),z.rj.vadd(H,z.rj),z.rj.vadd(a,z.rj),z.rj.vsub(c.position,z.rj),z.ri.vadd(i,z.ri),z.ri.vsub(o.position,z.ri),h.release(H),h.release(V),this.result.push(z),this.createFrictionEquationsFromContact(z,this.frictionResult);for(let L=0,N=D.length;L!==N;L++)h.release(D[L]);return}else for(let z=0;z!==C.length;z++){let H=h.get(),V=h.get();s.vmult(g[C[(z+1)%C.length]],H),s.vmult(g[C[(z+2)%C.length]],V),a.vadd(H,H),a.vadd(V,V);let L=Dl;V.vsub(H,L);let N=Tl;L.unit(N);let U=h.get(),Z=h.get();i.vsub(H,Z);let O=Z.dot(N);N.scale(O,U),U.vadd(H,U);let W=h.get();if(U.vsub(i,W),O>0&&O*Oh.length||A>h[0].length)return;m<0&&(m=0),d<0&&(d=0),A<0&&(A=0),b<0&&(b=0),m>=h.length&&(m=h.length-1),d>=h.length&&(d=h.length-1),b>=h[0].length&&(b=h[0].length-1),A>=h[0].length&&(A=h[0].length-1);let C=[];t.getRectMinMax(m,A,d,b,C);let E=C[0],T=C[1];if(x.z-p>T||x.z+p2)return}}boxHeightfield(e,t,i,a,r,s,o,c,l,u,f){return e.convexPolyhedronRepresentation.material=e.material,e.convexPolyhedronRepresentation.collisionResponse=e.collisionResponse,this.convexHeightfield(e.convexPolyhedronRepresentation,t,i,a,r,s,o,c,e,t,f)}convexHeightfield(e,t,i,a,r,s,o,c,l,u,f){let h=t.data,p=t.elementSize,v=e.boundingSphereRadius,g=Ql,x=e9,m=Jl;N1.pointToLocalFrame(a,s,i,m);let d=Math.floor((m.x-v)/p)-1,A=Math.ceil((m.x+v)/p)+1,b=Math.floor((m.y-v)/p)-1,C=Math.ceil((m.y+v)/p)+1;if(A<0||C<0||d>h.length||b>h[0].length)return;d<0&&(d=0),A<0&&(A=0),b<0&&(b=0),C<0&&(C=0),d>=h.length&&(d=h.length-1),A>=h.length&&(A=h.length-1),C>=h[0].length&&(C=h[0].length-1),b>=h[0].length&&(b=h[0].length-1);let E=[];t.getRectMinMax(d,b,A,C,E);let T=E[0],_=E[1];if(!(m.z-v>_||m.z+v0&&V<0&&(x.vsub(h,m),g.copy(v),g.normalize(),L=m.dot(g),g.scale(L,m),m.vadd(h,m),m.distanceTo(x)0&&i===!0||u<=0&&i===!1){i===null&&(i=u>0);continue}else return!1}return!0}var y6=new y,yl=new y,Cl=new y,zl=new y,Al=[new y,new y,new y,new y,new y,new y],wl=new y,Sl=new y,_l=new y,El=new y,Ll=new y,Dl=new y,Tl=new y,Hl=new y,Vl=new y,Nl=new y,Rl=new y,Fl=new y,Bl=new y,Pl=new y,Il=new y,kl=new y,Ul=new y,Ol=new y,Gl=new y,ql=new y,Wl=new y,jl=new y,Xl=new y,Zl=new y,wr=new O1,Yl=new y,$l=new y,Sr=new y,Kl=new y,Jl=new y,Ql=new y,e9=[0],t9=new y,i9=new y,K0=class{constructor(){this.current=void 0,this.previous=void 0,this.current=[],this.previous=[]}getKey(e,t){if(ta[r];)r++;if(i!==a[r]){for(let s=a.length-1;s>=r;s--)a[s+1]=a[s];a[r]=i}}tick(){let e=this.current;this.current=this.previous,this.previous=e,this.current.length=0}getDiff(e,t){let i=this.current,a=this.previous,r=i.length,s=a.length,o=0;for(let c=0;ca[o];)o++;l=u===a[o],l||_r(e,u)}o=0;for(let c=0;ci[o];)o++;l=i[o]===u,l||_r(t,u)}}};function _r(n,e){n.push((e&4294901760)>>16,e&65535)}var Er=class{constructor(){this.data={keys:[]}}get(e,t){if(e>t){let i=t;t=e,e=i}return this.data[e+"-"+t]}set(e,t,i){if(e>t){let r=t;t=e,e=r}let a=e+"-"+t;this.get(e,t)||this.data.keys.push(a),this.data[a]=i}reset(){let e=this.data,t=e.keys;for(;t.length>0;){let i=t.pop();delete e[i]}}},J0=class extends k0{constructor(e={}){super();this.dt=void 0,this.allowSleep=void 0,this.contacts=void 0,this.frictionEquations=void 0,this.quatNormalizeSkip=void 0,this.quatNormalizeFast=void 0,this.time=void 0,this.stepnumber=void 0,this.default_dt=void 0,this.nextId=void 0,this.gravity=void 0,this.broadphase=void 0,this.bodies=void 0,this.hasActiveBodies=void 0,this.solver=void 0,this.constraints=void 0,this.narrowphase=void 0,this.collisionMatrix=void 0,this.collisionMatrixPrevious=void 0,this.bodyOverlapKeeper=void 0,this.shapeOverlapKeeper=void 0,this.materials=void 0,this.contactmaterials=void 0,this.contactMaterialTable=void 0,this.defaultMaterial=void 0,this.defaultContactMaterial=void 0,this.doProfiling=void 0,this.profile=void 0,this.accumulator=void 0,this.subsystems=void 0,this.addBodyEvent=void 0,this.removeBodyEvent=void 0,this.idToBodyMap=void 0,this.dt=-1,this.allowSleep=!!e.allowSleep,this.contacts=[],this.frictionEquations=[],this.quatNormalizeSkip=e.quatNormalizeSkip!==void 0?e.quatNormalizeSkip:0,this.quatNormalizeFast=e.quatNormalizeFast!==void 0?e.quatNormalizeFast:!1,this.time=0,this.stepnumber=0,this.default_dt=1/60,this.nextId=0,this.gravity=new y,e.gravity&&this.gravity.copy(e.gravity),this.broadphase=e.broadphase!==void 0?e.broadphase:new p6,this.bodies=[],this.hasActiveBodies=!1,this.solver=e.solver!==void 0?e.solver:new Ya,this.constraints=[],this.narrowphase=new zr(this),this.collisionMatrix=new I0,this.collisionMatrixPrevious=new I0,this.bodyOverlapKeeper=new K0,this.shapeOverlapKeeper=new K0,this.materials=[],this.contactmaterials=[],this.contactMaterialTable=new Er,this.defaultMaterial=new He("default"),this.defaultContactMaterial=new Te(this.defaultMaterial,this.defaultMaterial,{friction:.3,restitution:0}),this.doProfiling=!1,this.profile={solve:0,makeContactConstraints:0,broadphase:0,integrate:0,narrowphase:0},this.accumulator=0,this.subsystems=[],this.addBodyEvent={type:"addBody",body:null},this.removeBodyEvent={type:"removeBody",body:null},this.idToBodyMap={},this.broadphase.setWorld(this)}getContactMaterial(e,t){return this.contactMaterialTable.get(e.id,t.id)}numObjects(){return this.bodies.length}collisionMatrixTick(){let e=this.collisionMatrixPrevious;this.collisionMatrixPrevious=this.collisionMatrix,this.collisionMatrix=e,this.collisionMatrix.reset(),this.bodyOverlapKeeper.tick(),this.shapeOverlapKeeper.tick()}addConstraint(e){this.constraints.push(e)}removeConstraint(e){let t=this.constraints.indexOf(e);t!==-1&&this.constraints.splice(t,1)}rayTest(e,t,i){i instanceof m6?this.raycastClosest(e,t,{skipBackfaces:!0},i):this.raycastAll(e,t,{skipBackfaces:!0},i)}raycastAll(e,t,i={},a){return i.mode=Q1.ALL,i.from=e,i.to=t,i.callback=a,Q0.intersectWorld(this,i)}raycastAny(e,t,i={},a){return i.mode=Q1.ANY,i.from=e,i.to=t,i.result=a,Q0.intersectWorld(this,i)}raycastClosest(e,t,i={},a){return i.mode=Q1.CLOSEST,i.from=e,i.to=t,i.result=a,Q0.intersectWorld(this,i)}addBody(e){this.bodies.includes(e)||(e.index=this.bodies.length,this.bodies.push(e),e.world=this,e.initPosition.copy(e.position),e.initVelocity.copy(e.velocity),e.timeLastSleepy=this.time,e instanceof i1&&(e.initAngularVelocity.copy(e.angularVelocity),e.initQuaternion.copy(e.quaternion)),this.collisionMatrix.setNumObjects(this.bodies.length),this.addBodyEvent.body=e,this.idToBodyMap[e.id]=e,this.dispatchEvent(this.addBodyEvent))}removeBody(e){e.world=null;let t=this.bodies.length-1,i=this.bodies,a=i.indexOf(e);if(a!==-1){i.splice(a,1);for(let r=0;r!==i.length;r++)i[r].index=r;this.collisionMatrix.setNumObjects(t),this.removeBodyEvent.body=e,delete this.idToBodyMap[e.id],this.dispatchEvent(this.removeBodyEvent)}}getBodyById(e){return this.idToBodyMap[e]}getShapeById(e){let t=this.bodies;for(let i=0;i=e&&re*1e3)););this.accumulator=this.accumulator%e;let s=this.accumulator/e;for(let o=0;o!==this.bodies.length;o++){let c=this.bodies[o];c.previousPosition.lerp(c.position,s,c.interpolatedPosition),c.previousQuaternion.slerp(c.quaternion,s,c.interpolatedQuaternion),c.previousQuaternion.normalize()}this.time+=t}}internalStep(e){this.dt=e;let t=this.contacts,i=o9,a=c9,r=this.numObjects(),s=this.bodies,o=this.solver,c=this.gravity,l=this.doProfiling,u=this.profile,f=i1.DYNAMIC,h=-1/0,p=this.constraints,v=s9;c.length();let g=c.x,x=c.y,m=c.z,d=0;for(l&&(h=s2.now()),d=0;d!==r;d++){let z=s[d];if(z.type===f){let H=z.force,V=z.mass;H.x+=V*g,H.y+=V*x,H.z+=V*m}}for(let z=0,H=this.subsystems.length;z!==H;z++)this.subsystems[z].update();l&&(h=s2.now()),i.length=0,a.length=0,this.broadphase.collisionPairs(this,i,a),l&&(u.broadphase=s2.now()-h);let A=p.length;for(d=0;d!==A;d++){let z=p[d];if(!z.collideConnected)for(let H=i.length-1;H>=0;H-=1)(z.bodyA===i[H]&&z.bodyB===a[H]||z.bodyB===i[H]&&z.bodyA===a[H])&&(i.splice(H,1),a.splice(H,1))}this.collisionMatrixTick(),l&&(h=s2.now());let b=n9,C=t.length;for(d=0;d!==C;d++)b.push(t[d]);t.length=0;let E=this.frictionEquations.length;for(d=0;d!==E;d++)v.push(this.frictionEquations[d]);for(this.frictionEquations.length=0,this.narrowphase.getContacts(i,a,this,t,b,this.frictionEquations,v),l&&(u.narrowphase=s2.now()-h),l&&(h=s2.now()),d=0;d=0&&L.material.friction>=0&&V.material.friction*L.material.friction,V.material.restitution>=0&&L.material.restitution>=0&&(H.restitution=V.material.restitution*L.material.restitution)),o.addEquation(H),V.allowSleep&&V.type===i1.DYNAMIC&&V.sleepState===i1.SLEEPING&&L.sleepState===i1.AWAKE&&L.type!==i1.STATIC){let O=L.velocity.lengthSquared()+L.angularVelocity.lengthSquared(),W=L.sleepSpeedLimit**2;O>=W*2&&(V.wakeUpAfterNarrowphase=!0)}if(L.allowSleep&&L.type===i1.DYNAMIC&&L.sleepState===i1.SLEEPING&&V.sleepState===i1.AWAKE&&V.type!==i1.STATIC){let O=V.velocity.lengthSquared()+V.angularVelocity.lengthSquared(),W=V.sleepSpeedLimit**2;O>=W*2&&(L.wakeUpAfterNarrowphase=!0)}this.collisionMatrix.set(V,L,!0),this.collisionMatrixPrevious.get(V,L)||(At.body=L,At.contact=H,V.dispatchEvent(At),At.body=V,L.dispatchEvent(At)),this.bodyOverlapKeeper.set(V.id,L.id),this.shapeOverlapKeeper.set(N.id,U.id)}for(this.emitContactEvents(),l&&(u.makeContactConstraints=s2.now()-h,h=s2.now()),d=0;d!==r;d++){let z=s[d];z.wakeUpAfterNarrowphase&&(z.wakeUp(),z.wakeUpAfterNarrowphase=!1)}for(A=p.length,d=0;d!==A;d++){let z=p[d];z.update();for(let H=0,V=z.equations.length;H!==V;H++){let L=z.equations[H];o.addEquation(L)}}o.solve(e,this),l&&(u.solve=s2.now()-h),o.removeAllEquations();let _=Math.pow;for(d=0;d!==r;d++){let z=s[d];if(z.type&f){let H=_(1-z.linearDamping,e),V=z.velocity;V.scale(H,V);let L=z.angularVelocity;if(L){let N=_(1-z.angularDamping,e);L.scale(N,L)}}}for(this.dispatchEvent(r9),d=0;d!==r;d++){let z=s[d];z.preStep&&z.preStep.call(z)}l&&(h=s2.now());let F=this.stepnumber%(this.quatNormalizeSkip+1)==0,M=this.quatNormalizeFast;for(d=0;d!==r;d++)s[d].integrate(e,F,M);for(this.clearForces(),this.broadphase.dirty=!0,l&&(u.integrate=s2.now()-h),this.stepnumber+=1,this.dispatchEvent(a9),d=0;d!==r;d++){let z=s[d],H=z.postStep;H&&H.call(z)}let D=!0;if(this.allowSleep)for(D=!1,d=0;d!==r;d++){let z=s[d];z.sleepTick(this.time),z.sleepState!==i1.SLEEPING&&(D=!0)}this.hasActiveBodies=D}emitContactEvents(){let e=this.hasAnyEventListener("beginContact"),t=this.hasAnyEventListener("endContact");if((e||t)&&this.bodyOverlapKeeper.getDiff(Ne,Re),e){for(let r=0,s=Ne.length;rDate.now()-n}var a9={type:"postStep"},r9={type:"preStep"},At={type:i1.COLLIDE_EVENT_NAME,body:null,contact:null},n9=[],s9=[],o9=[],c9=[],Ne=[],Re=[],wt={type:"beginContact",bodyA:null,bodyB:null},St={type:"endContact",bodyA:null,bodyB:null},Fe={type:"beginShapeContact",bodyA:null,bodyB:null,shapeA:null,shapeB:null},Be={type:"endShapeContact",bodyA:null,bodyB:null,shapeA:null,shapeB:null};var q1=class{constructor(e=0,t=0,i=0,a=1){this.x=e,this.y=t,this.z=i,this.w=a}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,i,a){return this.x=e,this.y=t,this.z=i,this.w=a,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e,t){return t!==void 0?(console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this)}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e,t){return t!==void 0?(console.warn("THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this)}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){let t=this.x,i=this.y,a=this.z,r=this.w,s=e.elements;return this.x=s[0]*t+s[4]*i+s[8]*a+s[12]*r,this.y=s[1]*t+s[5]*i+s[9]*a+s[13]*r,this.z=s[2]*t+s[6]*i+s[10]*a+s[14]*r,this.w=s[3]*t+s[7]*i+s[11]*a+s[15]*r,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);let t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,i,a,r,s=.01,o=.1,c=e.elements,l=c[0],u=c[4],f=c[8],h=c[1],p=c[5],v=c[9],g=c[2],x=c[6],m=c[10];if(Math.abs(u-h)b&&A>C?AC?b>8&255]+f2[n>>16&255]+f2[n>>24&255]+"-"+f2[e&255]+f2[e>>8&255]+"-"+f2[e>>16&15|64]+f2[e>>24&255]+"-"+f2[t&63|128]+f2[t>>8&255]+"-"+f2[t>>16&255]+f2[t>>24&255]+f2[i&255]+f2[i>>8&255]+f2[i>>16&255]+f2[i>>24&255]).toUpperCase()}function D2(n,e,t){return Math.max(e,Math.min(t,n))}function Lr(n,e){return(n%e+e)%e}function z6(n,e,t){return(1-t)*n+t*e}function e3(n){return(n&n-1)==0&&n!==0}function Dr(n){return Math.pow(2,Math.floor(Math.log(n)/Math.LN2))}var Me=class{constructor(e=0,t=0,i=0,a=1){this._x=e,this._y=t,this._z=i,this._w=a}static slerp(e,t,i,a){return console.warn("THREE.Quaternion: Static .slerp() has been deprecated. Use qm.slerpQuaternions( qa, qb, t ) instead."),i.slerpQuaternions(e,t,a)}static slerpFlat(e,t,i,a,r,s,o){let c=i[a+0],l=i[a+1],u=i[a+2],f=i[a+3],h=r[s+0],p=r[s+1],v=r[s+2],g=r[s+3];if(o===0){e[t+0]=c,e[t+1]=l,e[t+2]=u,e[t+3]=f;return}if(o===1){e[t+0]=h,e[t+1]=p,e[t+2]=v,e[t+3]=g;return}if(f!==g||c!==h||l!==p||u!==v){let x=1-o,m=c*h+l*p+u*v+f*g,d=m>=0?1:-1,A=1-m*m;if(A>Number.EPSILON){let C=Math.sqrt(A),E=Math.atan2(C,m*d);x=Math.sin(x*E)/C,o=Math.sin(o*E)/C}let b=o*d;if(c=c*x+h*b,l=l*x+p*b,u=u*x+v*b,f=f*x+g*b,x===1-o){let C=1/Math.sqrt(c*c+l*l+u*u+f*f);c*=C,l*=C,u*=C,f*=C}}e[t]=c,e[t+1]=l,e[t+2]=u,e[t+3]=f}static multiplyQuaternionsFlat(e,t,i,a,r,s){let o=i[a],c=i[a+1],l=i[a+2],u=i[a+3],f=r[s],h=r[s+1],p=r[s+2],v=r[s+3];return e[t]=o*v+u*f+c*p-l*h,e[t+1]=c*v+u*h+l*f-o*p,e[t+2]=l*v+u*p+o*h-c*f,e[t+3]=u*v-o*f-c*h-l*p,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,i,a){return this._x=e,this._y=t,this._z=i,this._w=a,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t){if(!(e&&e.isEuler))throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");let i=e._x,a=e._y,r=e._z,s=e._order,o=Math.cos,c=Math.sin,l=o(i/2),u=o(a/2),f=o(r/2),h=c(i/2),p=c(a/2),v=c(r/2);switch(s){case"XYZ":this._x=h*u*f+l*p*v,this._y=l*p*f-h*u*v,this._z=l*u*v+h*p*f,this._w=l*u*f-h*p*v;break;case"YXZ":this._x=h*u*f+l*p*v,this._y=l*p*f-h*u*v,this._z=l*u*v-h*p*f,this._w=l*u*f+h*p*v;break;case"ZXY":this._x=h*u*f-l*p*v,this._y=l*p*f+h*u*v,this._z=l*u*v+h*p*f,this._w=l*u*f-h*p*v;break;case"ZYX":this._x=h*u*f-l*p*v,this._y=l*p*f+h*u*v,this._z=l*u*v-h*p*f,this._w=l*u*f+h*p*v;break;case"YZX":this._x=h*u*f+l*p*v,this._y=l*p*f+h*u*v,this._z=l*u*v-h*p*f,this._w=l*u*f-h*p*v;break;case"XZY":this._x=h*u*f-l*p*v,this._y=l*p*f-h*u*v,this._z=l*u*v+h*p*f,this._w=l*u*f+h*p*v;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+s)}return t!==!1&&this._onChangeCallback(),this}setFromAxisAngle(e,t){let i=t/2,a=Math.sin(i);return this._x=e.x*a,this._y=e.y*a,this._z=e.z*a,this._w=Math.cos(i),this._onChangeCallback(),this}setFromRotationMatrix(e){let t=e.elements,i=t[0],a=t[4],r=t[8],s=t[1],o=t[5],c=t[9],l=t[2],u=t[6],f=t[10],h=i+o+f;if(h>0){let p=.5/Math.sqrt(h+1);this._w=.25/p,this._x=(u-c)*p,this._y=(r-l)*p,this._z=(s-a)*p}else if(i>o&&i>f){let p=2*Math.sqrt(1+i-o-f);this._w=(u-c)/p,this._x=.25*p,this._y=(a+s)/p,this._z=(r+l)/p}else if(o>f){let p=2*Math.sqrt(1+o-i-f);this._w=(r-l)/p,this._x=(a+s)/p,this._y=.25*p,this._z=(c+u)/p}else{let p=2*Math.sqrt(1+f-i-o);this._w=(s-a)/p,this._x=(r+l)/p,this._y=(c+u)/p,this._z=.25*p}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let i=e.dot(t)+1;return iMath.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=i):(this._x=0,this._y=-e.z,this._z=e.y,this._w=i)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=i),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(D2(this.dot(e),-1,1)))}rotateTowards(e,t){let i=this.angleTo(e);if(i===0)return this;let a=Math.min(1,t/i);return this.slerp(e,a),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e,t){return t!==void 0?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(e,t)):this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){let i=e._x,a=e._y,r=e._z,s=e._w,o=t._x,c=t._y,l=t._z,u=t._w;return this._x=i*u+s*o+a*l-r*c,this._y=a*u+s*c+r*o-i*l,this._z=r*u+s*l+i*c-a*o,this._w=s*u-i*o-a*c-r*l,this._onChangeCallback(),this}slerp(e,t){if(t===0)return this;if(t===1)return this.copy(e);let i=this._x,a=this._y,r=this._z,s=this._w,o=s*e._w+i*e._x+a*e._y+r*e._z;if(o<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,o=-o):this.copy(e),o>=1)return this._w=s,this._x=i,this._y=a,this._z=r,this;let c=1-o*o;if(c<=Number.EPSILON){let p=1-t;return this._w=p*s+t*this._w,this._x=p*i+t*this._x,this._y=p*a+t*this._y,this._z=p*r+t*this._z,this.normalize(),this._onChangeCallback(),this}let l=Math.sqrt(c),u=Math.atan2(l,o),f=Math.sin((1-t)*u)/l,h=Math.sin(t*u)/l;return this._w=s*f+this._w*h,this._x=i*f+this._x*h,this._y=a*f+this._y*h,this._z=r*f+this._z*h,this._onChangeCallback(),this}slerpQuaternions(e,t,i){return this.copy(e).slerp(t,i)}random(){let e=Math.random(),t=Math.sqrt(1-e),i=Math.sqrt(e),a=2*Math.PI*Math.random(),r=2*Math.PI*Math.random();return this.set(t*Math.cos(a),i*Math.sin(r),i*Math.cos(r),t*Math.sin(a))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}};Me.prototype.isQuaternion=!0;var k=class{constructor(e=0,t=0,i=0){this.x=e,this.y=t,this.z=i}set(e,t,i){return i===void 0&&(i=this.z),this.x=e,this.y=t,this.z=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e,t){return t!==void 0?(console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this.z+=e.z,this)}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e,t){return t!==void 0?(console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this.z-=e.z,this)}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e,t){return t!==void 0?(console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(e,t)):(this.x*=e.x,this.y*=e.y,this.z*=e.z,this)}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return e&&e.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(Tr.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(Tr.setFromAxisAngle(e,t))}applyMatrix3(e){let t=this.x,i=this.y,a=this.z,r=e.elements;return this.x=r[0]*t+r[3]*i+r[6]*a,this.y=r[1]*t+r[4]*i+r[7]*a,this.z=r[2]*t+r[5]*i+r[8]*a,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){let t=this.x,i=this.y,a=this.z,r=e.elements,s=1/(r[3]*t+r[7]*i+r[11]*a+r[15]);return this.x=(r[0]*t+r[4]*i+r[8]*a+r[12])*s,this.y=(r[1]*t+r[5]*i+r[9]*a+r[13])*s,this.z=(r[2]*t+r[6]*i+r[10]*a+r[14])*s,this}applyQuaternion(e){let t=this.x,i=this.y,a=this.z,r=e.x,s=e.y,o=e.z,c=e.w,l=c*t+s*a-o*i,u=c*i+o*t-r*a,f=c*a+r*i-s*t,h=-r*t-s*i-o*a;return this.x=l*c+h*-r+u*-o-f*-s,this.y=u*c+h*-s+f*-r-l*-o,this.z=f*c+h*-o+l*-s-u*-r,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){let t=this.x,i=this.y,a=this.z,r=e.elements;return this.x=r[0]*t+r[4]*i+r[8]*a,this.y=r[1]*t+r[5]*i+r[9]*a,this.z=r[2]*t+r[6]*i+r[10]*a,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this}clampLength(e,t){let i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this}cross(e,t){return t!==void 0?(console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(e,t)):this.crossVectors(this,e)}crossVectors(e,t){let i=e.x,a=e.y,r=e.z,s=t.x,o=t.y,c=t.z;return this.x=a*c-r*o,this.y=r*s-i*c,this.z=i*o-a*s,this}projectOnVector(e){let t=e.lengthSq();if(t===0)return this.set(0,0,0);let i=e.dot(this)/t;return this.copy(e).multiplyScalar(i)}projectOnPlane(e){return t3.copy(this).projectOnVector(e),this.sub(t3)}reflect(e){return this.sub(t3.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){let t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;let i=this.dot(e)/t;return Math.acos(D2(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,i=this.y-e.y,a=this.z-e.z;return t*t+i*i+a*a}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,i){let a=Math.sin(t)*e;return this.x=a*Math.sin(i),this.y=Math.cos(t)*e,this.z=a*Math.cos(i),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,i){return this.x=e*Math.sin(t),this.y=i,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){let t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){let t=this.setFromMatrixColumn(e,0).length(),i=this.setFromMatrixColumn(e,1).length(),a=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=i,this.z=a,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,t*4)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,t*3)}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t,i){return i!==void 0&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){let e=(Math.random()-.5)*2,t=Math.random()*Math.PI*2,i=Math.sqrt(1-e**2);return this.x=i*Math.cos(t),this.y=i*Math.sin(t),this.z=e,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}};k.prototype.isVector3=!0;var t3=new k,Tr=new Me;var z1=class{constructor(e=0,t=0){this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e,t){return t!==void 0?(console.warn("THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this)}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e,t){return t!==void 0?(console.warn("THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this)}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){let t=this.x,i=this.y,a=e.elements;return this.x=a[0]*t+a[3]*i+a[6],this.y=a[1]*t+a[4]*i+a[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this}clampLength(e,t){let i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,i=this.y-e.y;return t*t+i*i}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t,i){return i!==void 0&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){let i=Math.cos(t),a=Math.sin(t),r=this.x-e.x,s=this.y-e.y;return this.x=r*i-s*a+e.x,this.y=r*a+s*i+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}};z1.prototype.isVector2=!0;var Hr={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},K2={h:0,s:0,l:0},A6={h:0,s:0,l:0};function i3(n,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?n+(e-n)*6*t:t<1/2?e:t<2/3?n+(e-n)*6*(2/3-t):n}function C4(n){return n<.04045?n*.0773993808:Math.pow(n*.9478672986+.0521327014,2.4)}function a3(n){return n<.0031308?n*12.92:1.055*Math.pow(n,.41666)-.055}var x1=class{constructor(e,t,i){return t===void 0&&i===void 0?this.set(e):this.setRGB(e,t,i)}set(e){return e&&e.isColor?this.copy(e):typeof e=="number"?this.setHex(e):typeof e=="string"&&this.setStyle(e),this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,this}setRGB(e,t,i){return this.r=e,this.g=t,this.b=i,this}setHSL(e,t,i){if(e=Lr(e,1),t=D2(t,0,1),i=D2(i,0,1),t===0)this.r=this.g=this.b=i;else{let a=i<=.5?i*(1+t):i+t-i*t,r=2*i-a;this.r=i3(r,a,e+1/3),this.g=i3(r,a,e),this.b=i3(r,a,e-1/3)}return this}setStyle(e){function t(a){a!==void 0&&parseFloat(a)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let i;if(i=/^((?:rgb|hsl)a?)\(([^\)]*)\)/.exec(e)){let a,r=i[1],s=i[2];switch(r){case"rgb":case"rgba":if(a=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return this.r=Math.min(255,parseInt(a[1],10))/255,this.g=Math.min(255,parseInt(a[2],10))/255,this.b=Math.min(255,parseInt(a[3],10))/255,t(a[4]),this;if(a=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return this.r=Math.min(100,parseInt(a[1],10))/100,this.g=Math.min(100,parseInt(a[2],10))/100,this.b=Math.min(100,parseInt(a[3],10))/100,t(a[4]),this;break;case"hsl":case"hsla":if(a=/^\s*(\d*\.?\d+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s)){let o=parseFloat(a[1])/360,c=parseInt(a[2],10)/100,l=parseInt(a[3],10)/100;return t(a[4]),this.setHSL(o,c,l)}break}}else if(i=/^\#([A-Fa-f\d]+)$/.exec(e)){let a=i[1],r=a.length;if(r===3)return this.r=parseInt(a.charAt(0)+a.charAt(0),16)/255,this.g=parseInt(a.charAt(1)+a.charAt(1),16)/255,this.b=parseInt(a.charAt(2)+a.charAt(2),16)/255,this;if(r===6)return this.r=parseInt(a.charAt(0)+a.charAt(1),16)/255,this.g=parseInt(a.charAt(2)+a.charAt(3),16)/255,this.b=parseInt(a.charAt(4)+a.charAt(5),16)/255,this}return e&&e.length>0?this.setColorName(e):this}setColorName(e){let t=Hr[e.toLowerCase()];return t!==void 0?this.setHex(t):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=C4(e.r),this.g=C4(e.g),this.b=C4(e.b),this}copyLinearToSRGB(e){return this.r=a3(e.r),this.g=a3(e.g),this.b=a3(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(){return this.r*255<<16^this.g*255<<8^this.b*255<<0}getHexString(){return("000000"+this.getHex().toString(16)).slice(-6)}getHSL(e){let t=this.r,i=this.g,a=this.b,r=Math.max(t,i,a),s=Math.min(t,i,a),o,c,l=(s+r)/2;if(s===r)o=0,c=0;else{let u=r-s;switch(c=l<=.5?u/(r+s):u/(2-r-s),r){case t:o=(i-a)/u+(ir&&(r=u),f>s&&(s=f),h>o&&(o=h)}return this.min.set(t,i,a),this.max.set(r,s,o),this}setFromBufferAttribute(e){let t=1/0,i=1/0,a=1/0,r=-1/0,s=-1/0,o=-1/0;for(let c=0,l=e.count;cr&&(r=u),f>s&&(s=f),h>o&&(o=h)}return this.min.set(t,i,a),this.max.set(r,s,o),this}setFromPoints(e){this.makeEmpty();for(let t=0,i=e.length;tthis.max.x||e.ythis.max.y||e.zthis.max.z)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return!(e.max.xthis.max.x||e.max.ythis.max.y||e.max.zthis.max.z)}intersectsSphere(e){return this.clampPoint(e.center,w4),w4.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,i;return e.normal.x>0?(t=e.normal.x*this.min.x,i=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,i=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,i+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,i+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,i+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,i+=e.normal.z*this.min.z),t<=-e.constant&&i>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(Bt),F6.subVectors(this.max,Bt),W4.subVectors(e.a,Bt),j4.subVectors(e.b,Bt),X4.subVectors(e.c,Bt),n4.subVectors(j4,W4),s4.subVectors(X4,j4),S4.subVectors(W4,X4);let t=[0,-n4.z,n4.y,0,-s4.z,s4.y,0,-S4.z,S4.y,n4.z,0,-n4.x,s4.z,0,-s4.x,S4.z,0,-S4.x,-n4.y,n4.x,0,-s4.y,s4.x,0,-S4.y,S4.x,0];return!B3(t,W4,j4,X4,F6)||(t=[1,0,0,0,1,0,0,0,1],!B3(t,W4,j4,X4,F6))?!1:(B6.crossVectors(n4,s4),t=[B6.x,B6.y,B6.z],B3(t,W4,j4,X4,F6))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return w4.copy(e).clamp(this.min,this.max).sub(e).length()}getBoundingSphere(e){return this.getCenter(e.center),e.radius=this.getSize(w4).length()*.5,e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(Ge[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),Ge[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),Ge[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),Ge[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),Ge[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),Ge[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),Ge[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),Ge[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(Ge),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}};Oe.prototype.isBox3=!0;var Ge=[new k,new k,new k,new k,new k,new k,new k,new k],w4=new k,F3=new Oe,W4=new k,j4=new k,X4=new k,n4=new k,s4=new k,S4=new k,Bt=new k,F6=new k,B6=new k,_4=new k;function B3(n,e,t,i,a){for(let r=0,s=n.length-3;r<=s;r+=3){_4.fromArray(n,r);let o=a.x*Math.abs(_4.x)+a.y*Math.abs(_4.y)+a.z*Math.abs(_4.z),c=e.dot(_4),l=t.dot(_4),u=i.dot(_4);if(Math.max(-Math.max(c,l,u),Math.min(c,l,u))>o)return!1}return!0}var F2=class{addEventListener(e,t){this._listeners===void 0&&(this._listeners={});let i=this._listeners;i[e]===void 0&&(i[e]=[]),i[e].indexOf(t)===-1&&i[e].push(t)}hasEventListener(e,t){if(this._listeners===void 0)return!1;let i=this._listeners;return i[e]!==void 0&&i[e].indexOf(t)!==-1}removeEventListener(e,t){if(this._listeners===void 0)return;let a=this._listeners[e];if(a!==void 0){let r=a.indexOf(t);r!==-1&&a.splice(r,1)}}dispatchEvent(e){if(this._listeners===void 0)return;let i=this._listeners[e.type];if(i!==void 0){e.target=this;let a=i.slice(0);for(let r=0,s=a.length;rthis.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){P3.subVectors(e,this.center);let t=P3.lengthSq();if(t>this.radius*this.radius){let i=Math.sqrt(t),a=(i-this.radius)*.5;this.center.add(P3.multiplyScalar(a/i)),this.radius+=a}return this}union(e){return this.center.equals(e.center)===!0?P6.set(0,0,1).multiplyScalar(e.radius):P6.subVectors(e.center,this.center).normalize().multiplyScalar(e.radius),this.expandByPoint(L8.copy(e.center).add(P6)),this.expandByPoint(L8.copy(e.center).sub(P6)),this}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}};var k1=class{constructor(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")}set(e,t,i,a,r,s,o,c,l,u,f,h,p,v,g,x){let m=this.elements;return m[0]=e,m[4]=t,m[8]=i,m[12]=a,m[1]=r,m[5]=s,m[9]=o,m[13]=c,m[2]=l,m[6]=u,m[10]=f,m[14]=h,m[3]=p,m[7]=v,m[11]=g,m[15]=x,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new k1().fromArray(this.elements)}copy(e){let t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],t[9]=i[9],t[10]=i[10],t[11]=i[11],t[12]=i[12],t[13]=i[13],t[14]=i[14],t[15]=i[15],this}copyPosition(e){let t=this.elements,i=e.elements;return t[12]=i[12],t[13]=i[13],t[14]=i[14],this}setFromMatrix3(e){let t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,i){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),i.setFromMatrixColumn(this,2),this}makeBasis(e,t,i){return this.set(e.x,t.x,i.x,0,e.y,t.y,i.y,0,e.z,t.z,i.z,0,0,0,0,1),this}extractRotation(e){let t=this.elements,i=e.elements,a=1/Z4.setFromMatrixColumn(e,0).length(),r=1/Z4.setFromMatrixColumn(e,1).length(),s=1/Z4.setFromMatrixColumn(e,2).length();return t[0]=i[0]*a,t[1]=i[1]*a,t[2]=i[2]*a,t[3]=0,t[4]=i[4]*r,t[5]=i[5]*r,t[6]=i[6]*r,t[7]=0,t[8]=i[8]*s,t[9]=i[9]*s,t[10]=i[10]*s,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){e&&e.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");let t=this.elements,i=e.x,a=e.y,r=e.z,s=Math.cos(i),o=Math.sin(i),c=Math.cos(a),l=Math.sin(a),u=Math.cos(r),f=Math.sin(r);if(e.order==="XYZ"){let h=s*u,p=s*f,v=o*u,g=o*f;t[0]=c*u,t[4]=-c*f,t[8]=l,t[1]=p+v*l,t[5]=h-g*l,t[9]=-o*c,t[2]=g-h*l,t[6]=v+p*l,t[10]=s*c}else if(e.order==="YXZ"){let h=c*u,p=c*f,v=l*u,g=l*f;t[0]=h+g*o,t[4]=v*o-p,t[8]=s*l,t[1]=s*f,t[5]=s*u,t[9]=-o,t[2]=p*o-v,t[6]=g+h*o,t[10]=s*c}else if(e.order==="ZXY"){let h=c*u,p=c*f,v=l*u,g=l*f;t[0]=h-g*o,t[4]=-s*f,t[8]=v+p*o,t[1]=p+v*o,t[5]=s*u,t[9]=g-h*o,t[2]=-s*l,t[6]=o,t[10]=s*c}else if(e.order==="ZYX"){let h=s*u,p=s*f,v=o*u,g=o*f;t[0]=c*u,t[4]=v*l-p,t[8]=h*l+g,t[1]=c*f,t[5]=g*l+h,t[9]=p*l-v,t[2]=-l,t[6]=o*c,t[10]=s*c}else if(e.order==="YZX"){let h=s*c,p=s*l,v=o*c,g=o*l;t[0]=c*u,t[4]=g-h*f,t[8]=v*f+p,t[1]=f,t[5]=s*u,t[9]=-o*u,t[2]=-l*u,t[6]=p*f+v,t[10]=h-g*f}else if(e.order==="XZY"){let h=s*c,p=s*l,v=o*c,g=o*l;t[0]=c*u,t[4]=-f,t[8]=l*u,t[1]=h*f+g,t[5]=s*u,t[9]=p*f-v,t[2]=v*f-p,t[6]=o*u,t[10]=g*f+h}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(u9,e,h9)}lookAt(e,t,i){let a=this.elements;return B2.subVectors(e,t),B2.lengthSq()===0&&(B2.z=1),B2.normalize(),o4.crossVectors(i,B2),o4.lengthSq()===0&&(Math.abs(i.z)===1?B2.x+=1e-4:B2.z+=1e-4,B2.normalize(),o4.crossVectors(i,B2)),o4.normalize(),I6.crossVectors(B2,o4),a[0]=o4.x,a[4]=I6.x,a[8]=B2.x,a[1]=o4.y,a[5]=I6.y,a[9]=B2.y,a[2]=o4.z,a[6]=I6.z,a[10]=B2.z,this}multiply(e,t){return t!==void 0?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),this.multiplyMatrices(e,t)):this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){let i=e.elements,a=t.elements,r=this.elements,s=i[0],o=i[4],c=i[8],l=i[12],u=i[1],f=i[5],h=i[9],p=i[13],v=i[2],g=i[6],x=i[10],m=i[14],d=i[3],A=i[7],b=i[11],C=i[15],E=a[0],T=a[4],_=a[8],P=a[12],F=a[1],M=a[5],D=a[9],z=a[13],H=a[2],V=a[6],L=a[10],N=a[14],U=a[3],Z=a[7],O=a[11],W=a[15];return r[0]=s*E+o*F+c*H+l*U,r[4]=s*T+o*M+c*V+l*Z,r[8]=s*_+o*D+c*L+l*O,r[12]=s*P+o*z+c*N+l*W,r[1]=u*E+f*F+h*H+p*U,r[5]=u*T+f*M+h*V+p*Z,r[9]=u*_+f*D+h*L+p*O,r[13]=u*P+f*z+h*N+p*W,r[2]=v*E+g*F+x*H+m*U,r[6]=v*T+g*M+x*V+m*Z,r[10]=v*_+g*D+x*L+m*O,r[14]=v*P+g*z+x*N+m*W,r[3]=d*E+A*F+b*H+C*U,r[7]=d*T+A*M+b*V+C*Z,r[11]=d*_+A*D+b*L+C*O,r[15]=d*P+A*z+b*N+C*W,this}multiplyScalar(e){let t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){let e=this.elements,t=e[0],i=e[4],a=e[8],r=e[12],s=e[1],o=e[5],c=e[9],l=e[13],u=e[2],f=e[6],h=e[10],p=e[14],v=e[3],g=e[7],x=e[11],m=e[15];return v*(+r*c*f-a*l*f-r*o*h+i*l*h+a*o*p-i*c*p)+g*(+t*c*p-t*l*h+r*s*h-a*s*p+a*l*u-r*c*u)+x*(+t*l*f-t*o*p-r*s*f+i*s*p+r*o*u-i*l*u)+m*(-a*o*u-t*c*f+t*o*h+a*s*f-i*s*h+i*c*u)}transpose(){let e=this.elements,t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,i){let a=this.elements;return e.isVector3?(a[12]=e.x,a[13]=e.y,a[14]=e.z):(a[12]=e,a[13]=t,a[14]=i),this}invert(){let e=this.elements,t=e[0],i=e[1],a=e[2],r=e[3],s=e[4],o=e[5],c=e[6],l=e[7],u=e[8],f=e[9],h=e[10],p=e[11],v=e[12],g=e[13],x=e[14],m=e[15],d=f*x*l-g*h*l+g*c*p-o*x*p-f*c*m+o*h*m,A=v*h*l-u*x*l-v*c*p+s*x*p+u*c*m-s*h*m,b=u*g*l-v*f*l+v*o*p-s*g*p-u*o*m+s*f*m,C=v*f*c-u*g*c-v*o*h+s*g*h+u*o*x-s*f*x,E=t*d+i*A+a*b+r*C;if(E===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);let T=1/E;return e[0]=d*T,e[1]=(g*h*r-f*x*r-g*a*p+i*x*p+f*a*m-i*h*m)*T,e[2]=(o*x*r-g*c*r+g*a*l-i*x*l-o*a*m+i*c*m)*T,e[3]=(f*c*r-o*h*r-f*a*l+i*h*l+o*a*p-i*c*p)*T,e[4]=A*T,e[5]=(u*x*r-v*h*r+v*a*p-t*x*p-u*a*m+t*h*m)*T,e[6]=(v*c*r-s*x*r-v*a*l+t*x*l+s*a*m-t*c*m)*T,e[7]=(s*h*r-u*c*r+u*a*l-t*h*l-s*a*p+t*c*p)*T,e[8]=b*T,e[9]=(v*f*r-u*g*r-v*i*p+t*g*p+u*i*m-t*f*m)*T,e[10]=(s*g*r-v*o*r+v*i*l-t*g*l-s*i*m+t*o*m)*T,e[11]=(u*o*r-s*f*r-u*i*l+t*f*l+s*i*p-t*o*p)*T,e[12]=C*T,e[13]=(u*g*a-v*f*a+v*i*h-t*g*h-u*i*x+t*f*x)*T,e[14]=(v*o*a-s*g*a-v*i*c+t*g*c+s*i*x-t*o*x)*T,e[15]=(s*f*a-u*o*a+u*i*c-t*f*c-s*i*h+t*o*h)*T,this}scale(e){let t=this.elements,i=e.x,a=e.y,r=e.z;return t[0]*=i,t[4]*=a,t[8]*=r,t[1]*=i,t[5]*=a,t[9]*=r,t[2]*=i,t[6]*=a,t[10]*=r,t[3]*=i,t[7]*=a,t[11]*=r,this}getMaxScaleOnAxis(){let e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],i=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],a=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,i,a))}makeTranslation(e,t,i){return this.set(1,0,0,e,0,1,0,t,0,0,1,i,0,0,0,1),this}makeRotationX(e){let t=Math.cos(e),i=Math.sin(e);return this.set(1,0,0,0,0,t,-i,0,0,i,t,0,0,0,0,1),this}makeRotationY(e){let t=Math.cos(e),i=Math.sin(e);return this.set(t,0,i,0,0,1,0,0,-i,0,t,0,0,0,0,1),this}makeRotationZ(e){let t=Math.cos(e),i=Math.sin(e);return this.set(t,-i,0,0,i,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){let i=Math.cos(t),a=Math.sin(t),r=1-i,s=e.x,o=e.y,c=e.z,l=r*s,u=r*o;return this.set(l*s+i,l*o-a*c,l*c+a*o,0,l*o+a*c,u*o+i,u*c-a*s,0,l*c-a*o,u*c+a*s,r*c*c+i,0,0,0,0,1),this}makeScale(e,t,i){return this.set(e,0,0,0,0,t,0,0,0,0,i,0,0,0,0,1),this}makeShear(e,t,i,a,r,s){return this.set(1,i,r,0,e,1,s,0,t,a,1,0,0,0,0,1),this}compose(e,t,i){let a=this.elements,r=t._x,s=t._y,o=t._z,c=t._w,l=r+r,u=s+s,f=o+o,h=r*l,p=r*u,v=r*f,g=s*u,x=s*f,m=o*f,d=c*l,A=c*u,b=c*f,C=i.x,E=i.y,T=i.z;return a[0]=(1-(g+m))*C,a[1]=(p+b)*C,a[2]=(v-A)*C,a[3]=0,a[4]=(p-b)*E,a[5]=(1-(h+m))*E,a[6]=(x+d)*E,a[7]=0,a[8]=(v+A)*T,a[9]=(x-d)*T,a[10]=(1-(h+g))*T,a[11]=0,a[12]=e.x,a[13]=e.y,a[14]=e.z,a[15]=1,this}decompose(e,t,i){let a=this.elements,r=Z4.set(a[0],a[1],a[2]).length(),s=Z4.set(a[4],a[5],a[6]).length(),o=Z4.set(a[8],a[9],a[10]).length();this.determinant()<0&&(r=-r),e.x=a[12],e.y=a[13],e.z=a[14],te.copy(this);let l=1/r,u=1/s,f=1/o;return te.elements[0]*=l,te.elements[1]*=l,te.elements[2]*=l,te.elements[4]*=u,te.elements[5]*=u,te.elements[6]*=u,te.elements[8]*=f,te.elements[9]*=f,te.elements[10]*=f,t.setFromRotationMatrix(te),i.x=r,i.y=s,i.z=o,this}makePerspective(e,t,i,a,r,s){s===void 0&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");let o=this.elements,c=2*r/(t-e),l=2*r/(i-a),u=(t+e)/(t-e),f=(i+a)/(i-a),h=-(s+r)/(s-r),p=-2*s*r/(s-r);return o[0]=c,o[4]=0,o[8]=u,o[12]=0,o[1]=0,o[5]=l,o[9]=f,o[13]=0,o[2]=0,o[6]=0,o[10]=h,o[14]=p,o[3]=0,o[7]=0,o[11]=-1,o[15]=0,this}makeOrthographic(e,t,i,a,r,s){let o=this.elements,c=1/(t-e),l=1/(i-a),u=1/(s-r),f=(t+e)*c,h=(i+a)*l,p=(s+r)*u;return o[0]=2*c,o[4]=0,o[8]=0,o[12]=-f,o[1]=0,o[5]=2*l,o[9]=0,o[13]=-h,o[2]=0,o[6]=0,o[10]=-2*u,o[14]=-p,o[3]=0,o[7]=0,o[11]=0,o[15]=1,this}equals(e){let t=this.elements,i=e.elements;for(let a=0;a<16;a++)if(t[a]!==i[a])return!1;return!0}fromArray(e,t=0){for(let i=0;i<16;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){let i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e[t+9]=i[9],e[t+10]=i[10],e[t+11]=i[11],e[t+12]=i[12],e[t+13]=i[13],e[t+14]=i[14],e[t+15]=i[15],e}};k1.prototype.isMatrix4=!0;var Z4=new k,te=new k1,u9=new k(0,0,0),h9=new k(1,1,1),o4=new k,I6=new k,B2=new k;var D8=new k1,T8=new Me,c4=class{constructor(e=0,t=0,i=0,a=c4.DefaultOrder){this._x=e,this._y=t,this._z=i,this._order=a}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,i,a=this._order){return this._x=e,this._y=t,this._z=i,this._order=a,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t=this._order,i=!0){let a=e.elements,r=a[0],s=a[4],o=a[8],c=a[1],l=a[5],u=a[9],f=a[2],h=a[6],p=a[10];switch(t){case"XYZ":this._y=Math.asin(D2(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(-u,p),this._z=Math.atan2(-s,r)):(this._x=Math.atan2(h,l),this._z=0);break;case"YXZ":this._x=Math.asin(-D2(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(o,p),this._z=Math.atan2(c,l)):(this._y=Math.atan2(-f,r),this._z=0);break;case"ZXY":this._x=Math.asin(D2(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(-f,p),this._z=Math.atan2(-s,l)):(this._y=0,this._z=Math.atan2(c,r));break;case"ZYX":this._y=Math.asin(-D2(f,-1,1)),Math.abs(f)<.9999999?(this._x=Math.atan2(h,p),this._z=Math.atan2(c,r)):(this._x=0,this._z=Math.atan2(-s,l));break;case"YZX":this._z=Math.asin(D2(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(-u,l),this._y=Math.atan2(-f,r)):(this._x=0,this._y=Math.atan2(o,p));break;case"XZY":this._z=Math.asin(-D2(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(h,l),this._y=Math.atan2(o,r)):(this._x=Math.atan2(-u,p),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,i===!0&&this._onChangeCallback(),this}setFromQuaternion(e,t,i){return D8.makeRotationFromQuaternion(e),this.setFromRotationMatrix(D8,t,i)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return T8.setFromEuler(this),this.setFromQuaternion(T8,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e}toVector3(e){return e?e.set(this._x,this._y,this._z):new k(this._x,this._y,this._z)}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}};c4.prototype.isEuler=!0;c4.DefaultOrder="XYZ";c4.RotationOrders=["XYZ","YZX","ZXY","XZY","YXZ","ZYX"];var Pt=class{constructor(){this.mask=1|0}set(e){this.mask=(1<>>0}enable(e){this.mask|=1<0&&console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")}set(e,t,i,a,r,s,o,c,l){let u=this.elements;return u[0]=e,u[1]=a,u[2]=o,u[3]=t,u[4]=r,u[5]=c,u[6]=i,u[7]=s,u[8]=l,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){let t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],this}extractBasis(e,t,i){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),i.setFromMatrix3Column(this,2),this}setFromMatrix4(e){let t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){let i=e.elements,a=t.elements,r=this.elements,s=i[0],o=i[3],c=i[6],l=i[1],u=i[4],f=i[7],h=i[2],p=i[5],v=i[8],g=a[0],x=a[3],m=a[6],d=a[1],A=a[4],b=a[7],C=a[2],E=a[5],T=a[8];return r[0]=s*g+o*d+c*C,r[3]=s*x+o*A+c*E,r[6]=s*m+o*b+c*T,r[1]=l*g+u*d+f*C,r[4]=l*x+u*A+f*E,r[7]=l*m+u*b+f*T,r[2]=h*g+p*d+v*C,r[5]=h*x+p*A+v*E,r[8]=h*m+p*b+v*T,this}multiplyScalar(e){let t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){let e=this.elements,t=e[0],i=e[1],a=e[2],r=e[3],s=e[4],o=e[5],c=e[6],l=e[7],u=e[8];return t*s*u-t*o*l-i*r*u+i*o*c+a*r*l-a*s*c}invert(){let e=this.elements,t=e[0],i=e[1],a=e[2],r=e[3],s=e[4],o=e[5],c=e[6],l=e[7],u=e[8],f=u*s-o*l,h=o*c-u*r,p=l*r-s*c,v=t*f+i*h+a*p;if(v===0)return this.set(0,0,0,0,0,0,0,0,0);let g=1/v;return e[0]=f*g,e[1]=(a*l-u*i)*g,e[2]=(o*i-a*s)*g,e[3]=h*g,e[4]=(u*t-a*c)*g,e[5]=(a*r-o*t)*g,e[6]=p*g,e[7]=(i*c-l*t)*g,e[8]=(s*t-i*r)*g,this}transpose(){let e,t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){let t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,i,a,r,s,o){let c=Math.cos(r),l=Math.sin(r);return this.set(i*c,i*l,-i*(c*s+l*o)+s+e,-a*l,a*c,-a*(-l*s+c*o)+o+t,0,0,1),this}scale(e,t){let i=this.elements;return i[0]*=e,i[3]*=e,i[6]*=e,i[1]*=t,i[4]*=t,i[7]*=t,this}rotate(e){let t=Math.cos(e),i=Math.sin(e),a=this.elements,r=a[0],s=a[3],o=a[6],c=a[1],l=a[4],u=a[7];return a[0]=t*r+i*c,a[3]=t*s+i*l,a[6]=t*o+i*u,a[1]=-i*r+t*c,a[4]=-i*s+t*l,a[7]=-i*o+t*u,this}translate(e,t){let i=this.elements;return i[0]+=e*i[2],i[3]+=e*i[5],i[6]+=e*i[8],i[1]+=t*i[2],i[4]+=t*i[5],i[7]+=t*i[8],this}equals(e){let t=this.elements,i=e.elements;for(let a=0;a<9;a++)if(t[a]!==i[a])return!1;return!0}fromArray(e,t=0){for(let i=0;i<9;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){let i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e}clone(){return new this.constructor().fromArray(this.elements)}};n2.prototype.isMatrix3=!0;var f9=0,H8=new k,Y4=new Me,We=new k1,k6=new k,It=new k,d9=new k,p9=new Me,V8=new k(1,0,0),N8=new k(0,1,0),R8=new k(0,0,1),m9={type:"added"},F8={type:"removed"},j1=class extends F2{constructor(){super();Object.defineProperty(this,"id",{value:f9++}),this.uuid=Pe(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=j1.DefaultUp.clone();let e=new k,t=new c4,i=new Me,a=new k(1,1,1);function r(){i.setFromEuler(t,!1)}function s(){t.setFromQuaternion(i,void 0,!1)}t._onChange(r),i._onChange(s),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:e},rotation:{configurable:!0,enumerable:!0,value:t},quaternion:{configurable:!0,enumerable:!0,value:i},scale:{configurable:!0,enumerable:!0,value:a},modelViewMatrix:{value:new k1},normalMatrix:{value:new n2}}),this.matrix=new k1,this.matrixWorld=new k1,this.matrixAutoUpdate=j1.DefaultMatrixAutoUpdate,this.matrixWorldNeedsUpdate=!1,this.layers=new Pt,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.userData={}}onBeforeRender(){}onAfterRender(){}applyMatrix4(e){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(e),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(e){return this.quaternion.premultiply(e),this}setRotationFromAxisAngle(e,t){this.quaternion.setFromAxisAngle(e,t)}setRotationFromEuler(e){this.quaternion.setFromEuler(e,!0)}setRotationFromMatrix(e){this.quaternion.setFromRotationMatrix(e)}setRotationFromQuaternion(e){this.quaternion.copy(e)}rotateOnAxis(e,t){return Y4.setFromAxisAngle(e,t),this.quaternion.multiply(Y4),this}rotateOnWorldAxis(e,t){return Y4.setFromAxisAngle(e,t),this.quaternion.premultiply(Y4),this}rotateX(e){return this.rotateOnAxis(V8,e)}rotateY(e){return this.rotateOnAxis(N8,e)}rotateZ(e){return this.rotateOnAxis(R8,e)}translateOnAxis(e,t){return H8.copy(e).applyQuaternion(this.quaternion),this.position.add(H8.multiplyScalar(t)),this}translateX(e){return this.translateOnAxis(V8,e)}translateY(e){return this.translateOnAxis(N8,e)}translateZ(e){return this.translateOnAxis(R8,e)}localToWorld(e){return e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return e.applyMatrix4(We.copy(this.matrixWorld).invert())}lookAt(e,t,i){e.isVector3?k6.copy(e):k6.set(e,t,i);let a=this.parent;this.updateWorldMatrix(!0,!1),It.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?We.lookAt(It,k6,this.up):We.lookAt(k6,It,this.up),this.quaternion.setFromRotationMatrix(We),a&&(We.extractRotation(a.matrixWorld),Y4.setFromRotationMatrix(We),this.quaternion.premultiply(Y4.invert()))}add(e){if(arguments.length>1){for(let t=0;t1){for(let i=0;i0){a.children=[];for(let o=0;o0){a.animations=[];for(let o=0;o0&&(i.geometries=o),c.length>0&&(i.materials=c),l.length>0&&(i.textures=l),u.length>0&&(i.images=u),f.length>0&&(i.shapes=f),h.length>0&&(i.skeletons=h),p.length>0&&(i.animations=p)}return i.object=a,i;function s(o){let c=[];for(let l in o){let u=o[l];delete u.metadata,c.push(u)}return c}}clone(e){return new this.constructor().copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.userData=JSON.parse(JSON.stringify(e.userData)),t===!0)for(let i=0;i=0;--e)if(n[e]>65535)return!0;return!1}function E4(n){return document.createElementNS("http://www.w3.org/1999/xhtml",n)}var v9=0,G2=new k1,I3=new j1,$4=new k,P2=new Oe,kt=new Oe,c2=new k,b2=class extends F2{constructor(){super();Object.defineProperty(this,"id",{value:v9++}),this.uuid=Pe(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(e){return Array.isArray(e)?this.index=new(U6(e)?Ft:Rt)(e,1):this.index=e,this}getAttribute(e){return this.attributes[e]}setAttribute(e,t){return this.attributes[e]=t,this}deleteAttribute(e){return delete this.attributes[e],this}hasAttribute(e){return this.attributes[e]!==void 0}addGroup(e,t,i=0){this.groups.push({start:e,count:t,materialIndex:i})}clearGroups(){this.groups=[]}setDrawRange(e,t){this.drawRange.start=e,this.drawRange.count=t}applyMatrix4(e){let t=this.attributes.position;t!==void 0&&(t.applyMatrix4(e),t.needsUpdate=!0);let i=this.attributes.normal;if(i!==void 0){let r=new n2().getNormalMatrix(e);i.applyNormalMatrix(r),i.needsUpdate=!0}let a=this.attributes.tangent;return a!==void 0&&(a.transformDirection(e),a.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}applyQuaternion(e){return G2.makeRotationFromQuaternion(e),this.applyMatrix4(G2),this}rotateX(e){return G2.makeRotationX(e),this.applyMatrix4(G2),this}rotateY(e){return G2.makeRotationY(e),this.applyMatrix4(G2),this}rotateZ(e){return G2.makeRotationZ(e),this.applyMatrix4(G2),this}translate(e,t,i){return G2.makeTranslation(e,t,i),this.applyMatrix4(G2),this}scale(e,t,i){return G2.makeScale(e,t,i),this.applyMatrix4(G2),this}lookAt(e){return I3.lookAt(e),I3.updateMatrix(),this.applyMatrix4(I3.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter($4).negate(),this.translate($4.x,$4.y,$4.z),this}setFromPoints(e){let t=[];for(let i=0,a=e.length;i0&&(e.userData=this.userData),this.parameters!==void 0){let c=this.parameters;for(let l in c)c[l]!==void 0&&(e[l]=c[l]);return e}e.data={attributes:{}};let t=this.index;t!==null&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});let i=this.attributes;for(let c in i){let l=i[c];e.data.attributes[c]=l.toJSON(e.data)}let a={},r=!1;for(let c in this.morphAttributes){let l=this.morphAttributes[c],u=[];for(let f=0,h=l.length;f0&&(a[c]=u,r=!0)}r&&(e.data.morphAttributes=a,e.data.morphTargetsRelative=this.morphTargetsRelative);let s=this.groups;s.length>0&&(e.data.groups=JSON.parse(JSON.stringify(s)));let o=this.boundingSphere;return o!==null&&(e.data.boundingSphere={center:o.center.toArray(),radius:o.radius}),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;let t={};this.name=e.name;let i=e.index;i!==null&&this.setIndex(i.clone(t));let a=e.attributes;for(let l in a){let u=a[l];this.setAttribute(l,u.clone(t))}let r=e.morphAttributes;for(let l in r){let u=[],f=r[l];for(let h=0,p=f.length;h0!=e>0&&this.version++,this._alphaTest=e}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(let t in e){let i=e[t];if(i===void 0){console.warn("THREE.Material: '"+t+"' parameter is undefined.");continue}if(t==="shading"){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=i===Fr;continue}let a=this[t];if(a===void 0){console.warn("THREE."+this.type+": '"+t+"' is not a property of this material.");continue}a&&a.isColor?a.set(i):a&&a.isVector3&&i&&i.isVector3?a.copy(i):this[t]=i}}toJSON(e){let t=e===void 0||typeof e=="string";t&&(e={textures:{},images:{}});let i={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};i.uuid=this.uuid,i.type=this.type,this.name!==""&&(i.name=this.name),this.color&&this.color.isColor&&(i.color=this.color.getHex()),this.roughness!==void 0&&(i.roughness=this.roughness),this.metalness!==void 0&&(i.metalness=this.metalness),this.sheen!==void 0&&(i.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(i.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(i.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(i.emissive=this.emissive.getHex()),this.emissiveIntensity&&this.emissiveIntensity!==1&&(i.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(i.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(i.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(i.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(i.shininess=this.shininess),this.clearcoat!==void 0&&(i.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(i.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(i.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(i.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(i.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,i.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.map&&this.map.isTexture&&(i.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(i.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(i.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(i.lightMap=this.lightMap.toJSON(e).uuid,i.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(i.aoMap=this.aoMap.toJSON(e).uuid,i.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(i.bumpMap=this.bumpMap.toJSON(e).uuid,i.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(i.normalMap=this.normalMap.toJSON(e).uuid,i.normalMapType=this.normalMapType,i.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(i.displacementMap=this.displacementMap.toJSON(e).uuid,i.displacementScale=this.displacementScale,i.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(i.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(i.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(i.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(i.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(i.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(i.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(i.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(i.combine=this.combine)),this.envMapIntensity!==void 0&&(i.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(i.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(i.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(i.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(i.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(i.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(i.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(i.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&(i.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(i.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(i.size=this.size),this.shadowSide!==null&&(i.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(i.sizeAttenuation=this.sizeAttenuation),this.blending!==A4&&(i.blending=this.blending),this.side!==Ie&&(i.side=this.side),this.vertexColors&&(i.vertexColors=!0),this.opacity<1&&(i.opacity=this.opacity),this.transparent===!0&&(i.transparent=this.transparent),i.depthFunc=this.depthFunc,i.depthTest=this.depthTest,i.depthWrite=this.depthWrite,i.colorWrite=this.colorWrite,i.alphaWrite=this.alphaWrite,i.stencilWrite=this.stencilWrite,i.stencilWriteMask=this.stencilWriteMask,i.stencilFunc=this.stencilFunc,i.stencilRef=this.stencilRef,i.stencilFuncMask=this.stencilFuncMask,i.stencilFail=this.stencilFail,i.stencilZFail=this.stencilZFail,i.stencilZPass=this.stencilZPass,this.rotation&&this.rotation!==0&&(i.rotation=this.rotation),this.polygonOffset===!0&&(i.polygonOffset=!0),this.polygonOffsetFactor!==0&&(i.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(i.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth&&this.linewidth!==1&&(i.linewidth=this.linewidth),this.dashSize!==void 0&&(i.dashSize=this.dashSize),this.gapSize!==void 0&&(i.gapSize=this.gapSize),this.scale!==void 0&&(i.scale=this.scale),this.dithering===!0&&(i.dithering=!0),this.alphaTest>0&&(i.alphaTest=this.alphaTest),this.alphaToCoverage===!0&&(i.alphaToCoverage=this.alphaToCoverage),this.premultipliedAlpha===!0&&(i.premultipliedAlpha=this.premultipliedAlpha),this.wireframe===!0&&(i.wireframe=this.wireframe),this.wireframeLinewidth>1&&(i.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(i.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(i.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(i.flatShading=this.flatShading),this.visible===!1&&(i.visible=!1),this.toneMapped===!1&&(i.toneMapped=!1),JSON.stringify(this.userData)!=="{}"&&(i.userData=this.userData);function a(r){let s=[];for(let o in r){let c=r[o];delete c.metadata,s.push(c)}return s}if(t){let r=a(e.textures),s=a(e.images);r.length>0&&(i.textures=r),s.length>0&&(i.images=s)}return i}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.fog=e.fog,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;let t=e.clippingPlanes,i=null;if(t!==null){let a=t.length;i=new Array(a);for(let r=0;r!==a;++r)i[r]=t[r].clone()}return this.clippingPlanes=i,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.alphaWrite=e.alphaWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}};T2.prototype.isMaterial=!0;var Ut=class extends T2{constructor(e){super();this.type="MeshPhongMaterial",this.color=new x1(16777215),this.specular=new x1(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new x1(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=V6,this.normalScale=new z1(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=G4,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this}};Ut.prototype.isMeshPhongMaterial=!0;var je=new k,k3=new k,O6=new k,l4=new k,U3=new k,G6=new k,O3=new k,G3=class{constructor(e=new k,t=new k(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.copy(this.direction).multiplyScalar(e).add(this.origin)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,je)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);let i=t.dot(this.direction);return i<0?t.copy(this.origin):t.copy(this.direction).multiplyScalar(i).add(this.origin)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){let t=je.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(je.copy(this.direction).multiplyScalar(t).add(this.origin),je.distanceToSquared(e))}distanceSqToSegment(e,t,i,a){k3.copy(e).add(t).multiplyScalar(.5),O6.copy(t).sub(e).normalize(),l4.copy(this.origin).sub(k3);let r=e.distanceTo(t)*.5,s=-this.direction.dot(O6),o=l4.dot(this.direction),c=-l4.dot(O6),l=l4.lengthSq(),u=Math.abs(1-s*s),f,h,p,v;if(u>0)if(f=s*c-o,h=s*o-c,v=r*u,f>=0)if(h>=-v)if(h<=v){let g=1/u;f*=g,h*=g,p=f*(f+s*h+2*o)+h*(s*f+h+2*c)+l}else h=r,f=Math.max(0,-(s*h+o)),p=-f*f+h*(h+2*c)+l;else h=-r,f=Math.max(0,-(s*h+o)),p=-f*f+h*(h+2*c)+l;else h<=-v?(f=Math.max(0,-(-s*r+o)),h=f>0?-r:Math.min(Math.max(-r,-c),r),p=-f*f+h*(h+2*c)+l):h<=v?(f=0,h=Math.min(Math.max(-r,-c),r),p=h*(h+2*c)+l):(f=Math.max(0,-(s*r+o)),h=f>0?r:Math.min(Math.max(-r,-c),r),p=-f*f+h*(h+2*c)+l);else h=s>0?-r:r,f=Math.max(0,-(s*h+o)),p=-f*f+h*(h+2*c)+l;return i&&i.copy(this.direction).multiplyScalar(f).add(this.origin),a&&a.copy(O6).multiplyScalar(h).add(k3),p}intersectSphere(e,t){je.subVectors(e.center,this.origin);let i=je.dot(this.direction),a=je.dot(je)-i*i,r=e.radius*e.radius;if(a>r)return null;let s=Math.sqrt(r-a),o=i-s,c=i+s;return o<0&&c<0?null:o<0?this.at(c,t):this.at(o,t)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){let t=e.normal.dot(this.direction);if(t===0)return e.distanceToPoint(this.origin)===0?0:null;let i=-(this.origin.dot(e.normal)+e.constant)/t;return i>=0?i:null}intersectPlane(e,t){let i=this.distanceToPlane(e);return i===null?null:this.at(i,t)}intersectsPlane(e){let t=e.distanceToPoint(this.origin);return t===0||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let i,a,r,s,o,c,l=1/this.direction.x,u=1/this.direction.y,f=1/this.direction.z,h=this.origin;return l>=0?(i=(e.min.x-h.x)*l,a=(e.max.x-h.x)*l):(i=(e.max.x-h.x)*l,a=(e.min.x-h.x)*l),u>=0?(r=(e.min.y-h.y)*u,s=(e.max.y-h.y)*u):(r=(e.max.y-h.y)*u,s=(e.min.y-h.y)*u),i>s||r>a||((r>i||i!==i)&&(i=r),(s=0?(o=(e.min.z-h.z)*f,c=(e.max.z-h.z)*f):(o=(e.max.z-h.z)*f,c=(e.min.z-h.z)*f),i>c||o>a)||((o>i||i!==i)&&(i=o),(c=0?i:a,t)}intersectsBox(e){return this.intersectBox(e,je)!==null}intersectTriangle(e,t,i,a,r){U3.subVectors(t,e),G6.subVectors(i,e),O3.crossVectors(U3,G6);let s=this.direction.dot(O3),o;if(s>0){if(a)return null;o=1}else if(s<0)o=-1,s=-s;else return null;l4.subVectors(this.origin,e);let c=o*this.direction.dot(G6.crossVectors(l4,G6));if(c<0)return null;let l=o*this.direction.dot(U3.cross(l4));if(l<0||c+l>s)return null;let u=-o*l4.dot(O3);return u<0?null:this.at(u/s,r)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}};var ie=new k,Xe=new k,q3=new k,Ze=new k,K4=new k,J4=new k,B8=new k,W3=new k,j3=new k,X3=new k,ae=class{constructor(e=new k,t=new k,i=new k){this.a=e,this.b=t,this.c=i}static getNormal(e,t,i,a){a.subVectors(i,t),ie.subVectors(e,t),a.cross(ie);let r=a.lengthSq();return r>0?a.multiplyScalar(1/Math.sqrt(r)):a.set(0,0,0)}static getBarycoord(e,t,i,a,r){ie.subVectors(a,t),Xe.subVectors(i,t),q3.subVectors(e,t);let s=ie.dot(ie),o=ie.dot(Xe),c=ie.dot(q3),l=Xe.dot(Xe),u=Xe.dot(q3),f=s*l-o*o;if(f===0)return r.set(-2,-1,-1);let h=1/f,p=(l*c-o*u)*h,v=(s*u-o*c)*h;return r.set(1-p-v,v,p)}static containsPoint(e,t,i,a){return this.getBarycoord(e,t,i,a,Ze),Ze.x>=0&&Ze.y>=0&&Ze.x+Ze.y<=1}static getUV(e,t,i,a,r,s,o,c){return this.getBarycoord(e,t,i,a,Ze),c.set(0,0),c.addScaledVector(r,Ze.x),c.addScaledVector(s,Ze.y),c.addScaledVector(o,Ze.z),c}static isFrontFacing(e,t,i,a){return ie.subVectors(i,t),Xe.subVectors(e,t),ie.cross(Xe).dot(a)<0}set(e,t,i){return this.a.copy(e),this.b.copy(t),this.c.copy(i),this}setFromPointsAndIndices(e,t,i,a){return this.a.copy(e[t]),this.b.copy(e[i]),this.c.copy(e[a]),this}setFromAttributeAndIndices(e,t,i,a){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,i),this.c.fromBufferAttribute(e,a),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return ie.subVectors(this.c,this.b),Xe.subVectors(this.a,this.b),ie.cross(Xe).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return ae.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return ae.getBarycoord(e,this.a,this.b,this.c,t)}getUV(e,t,i,a,r){return ae.getUV(e,this.a,this.b,this.c,t,i,a,r)}containsPoint(e){return ae.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return ae.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){let i=this.a,a=this.b,r=this.c,s,o;K4.subVectors(a,i),J4.subVectors(r,i),W3.subVectors(e,i);let c=K4.dot(W3),l=J4.dot(W3);if(c<=0&&l<=0)return t.copy(i);j3.subVectors(e,a);let u=K4.dot(j3),f=J4.dot(j3);if(u>=0&&f<=u)return t.copy(a);let h=c*f-u*l;if(h<=0&&c>=0&&u<=0)return s=c/(c-u),t.copy(i).addScaledVector(K4,s);X3.subVectors(e,r);let p=K4.dot(X3),v=J4.dot(X3);if(v>=0&&p<=v)return t.copy(r);let g=p*l-c*v;if(g<=0&&l>=0&&v<=0)return o=l/(l-v),t.copy(i).addScaledVector(J4,o);let x=u*v-p*f;if(x<=0&&f-u>=0&&p-v>=0)return B8.subVectors(r,a),o=(f-u)/(f-u+(p-v)),t.copy(a).addScaledVector(B8,o);let m=1/(x+g+h);return s=g*m,o=h*m,t.copy(i).addScaledVector(K4,s).addScaledVector(J4,o)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}};var Q4=class extends T2{constructor(e){super();this.type="MeshBasicMaterial",this.color=new x1(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=G4,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this}};Q4.prototype.isMeshBasicMaterial=!0;var P8=new k1,et=new G3,Z3=new qe,u4=new k,h4=new k,f4=new k,Y3=new k,$3=new k,K3=new k,q6=new k,W6=new k,j6=new k,X6=new z1,Z6=new z1,Y6=new z1,J3=new k,$6=new k,l2=class extends j1{constructor(e=new b2,t=new Q4){super();this.type="Mesh",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e){return super.copy(e),e.morphTargetInfluences!==void 0&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),e.morphTargetDictionary!==void 0&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this.material=e.material,this.geometry=e.geometry,this}updateMorphTargets(){let e=this.geometry;if(e.isBufferGeometry){let t=e.morphAttributes,i=Object.keys(t);if(i.length>0){let a=t[i[0]];if(a!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,s=a.length;r0&&console.error("THREE.Mesh.updateMorphTargets() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}}raycast(e,t){let i=this.geometry,a=this.material,r=this.matrixWorld;if(a===void 0||(i.boundingSphere===null&&i.computeBoundingSphere(),Z3.copy(i.boundingSphere),Z3.applyMatrix4(r),e.ray.intersectsSphere(Z3)===!1)||(P8.copy(r).invert(),et.copy(e.ray).applyMatrix4(P8),i.boundingBox!==null&&et.intersectsBox(i.boundingBox)===!1))return;let s;if(i.isBufferGeometry){let o=i.index,c=i.attributes.position,l=i.morphAttributes.position,u=i.morphTargetsRelative,f=i.attributes.uv,h=i.attributes.uv2,p=i.groups,v=i.drawRange;if(o!==null)if(Array.isArray(a))for(let g=0,x=p.length;gt.far?null:{distance:l,point:$6.clone(),object:n}}function K6(n,e,t,i,a,r,s,o,c,l,u,f){u4.fromBufferAttribute(a,l),h4.fromBufferAttribute(a,u),f4.fromBufferAttribute(a,f);let h=n.morphTargetInfluences;if(r&&h){q6.set(0,0,0),W6.set(0,0,0),j6.set(0,0,0);for(let v=0,g=r.length;v2048||t.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),t.toDataURL("image/jpeg",.6)):t.toDataURL("image/png")}static sRGBToLinear(e){if(typeof HTMLImageElement!="undefined"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement!="undefined"&&e instanceof HTMLCanvasElement||typeof ImageBitmap!="undefined"&&e instanceof ImageBitmap){let t=E4("canvas");t.width=e.width,t.height=e.height;let i=t.getContext("2d");i.drawImage(e,0,0,e.width,e.height);let a=i.getImageData(0,0,e.width,e.height),r=a.data;for(let s=0;s1)switch(this.wrapS){case Ht:e.x=e.x-Math.floor(e.x);break;case o2:e.x=e.x<0?0:1;break;case Vt:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x);break}if(e.y<0||e.y>1)switch(this.wrapT){case Ht:e.y=e.y-Math.floor(e.y);break;case o2:e.y=e.y<0?0:1;break;case Vt:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&this.version++}};K1.DEFAULT_IMAGE=void 0;K1.DEFAULT_MAPPING=u3;K1.prototype.isTexture=!0;function Q3(n){return typeof HTMLImageElement!="undefined"&&n instanceof HTMLImageElement||typeof HTMLCanvasElement!="undefined"&&n instanceof HTMLCanvasElement||typeof ImageBitmap!="undefined"&&n instanceof ImageBitmap?Ot.getDataURL(n):n.data?{data:Array.prototype.slice.call(n.data),width:n.width,height:n.height,type:n.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}var I8={specular:1515554,color:15790320,shininess:60,flatShading:!0},q2={diceColor:"#202020",textColor:"#ffffff"},re=class{constructor(e,t,i={diceColor:"#202020",textColor:"#aaaaaa"}){this.w=e;this.h=t;this.options=i;this.scale=50;this.labels=[" ","0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20"];this.fontFace="Arial";this.options={...q2,...i}}setColor({diceColor:e,textColor:t}){e&&(this.options.diceColor=e),t&&(this.options.textColor=t)}get radius(){return this.scale*this.scaleFactor}get diceColor(){return this.options.diceColor}get textColor(){return this.options.textColor}get buffer(){return this.geometry.geometry}create(){this.textureSize=this.calculateTextureSize(this.scale/2+this.scale*this.margin)*2;let e=this.getGeometry(),t=this.getMaterials();return this.geometry=new l2(e,t),this.geometry.receiveShadow=!0,this.geometry.castShadow=!0,this.body.position.set(0+this.radius*2*Math.random(),0+this.radius*2*Math.random(),0+this.radius*4),this.body.velocity.x=500*Math.random()*2-1,this.body.velocity.y=500*Math.random()*2-1,this.body.angularVelocity.x=100*Math.random(),this.body.angularVelocity.y=100*Math.random(),this}getGeometry(){let e=new Array(this.vertices.length);for(let i=0;i=0&&u=0&&l!==c+1?o.unshift([r,l],[s,u]):o.push([r,l],[s,u]),c=l)}o.length===4&&i.push([i[o[0][0]][o[0][1]],i[o[1][0]][o[1][1]],i[o[3][0]][o[3][1]],i[o[2][0]][o[2][1]],-1])}for(let r=0;r=0&&u<4){--u==-1&&(u=3);let f=i[l][u];if(s.indexOf(f)>=0){o.push(f);break}}}--c}o.push(-1),i.push(o)}return{vectors:t,faces:i}}makeGeometry(e,t){let i=new b2;for(let f=0;f1&&(o=o/l.length,s.font=`${o}pt '${this.fontFace}'`,c=s.measureText("M").width*1.2,a-=c*l.length/2);for(let f=0,h=l.length;f0?-1:1)*.9,y:this.h*(r.y>0?-1:1)*.9,z:Math.random()*200+200},s=Math.abs(r.x/r.y);s>1?o.y/=s:o.x*=s;let c=this.makeRandomVector(a),l={x:c.x*i,y:c.y*i,z:-10},u={x:-(Math.random()*r.y*5+this.inertia*r.y),y:Math.random()*r.x*5+this.inertia*r.x,z:0},f={x:Math.random(),y:Math.random(),z:Math.random(),w:Math.random()};return{pos:o,velocity:l,angular:u,axis:f}}makeRandomVector(e){let t=Math.random()*Math.PI/5-Math.PI/5/2,i={x:e.x*Math.cos(t)-e.y*Math.sin(t),y:e.x*Math.sin(t)+e.y*Math.cos(t)};return i.x==0&&(i.x=.01),i.y==0&&(i.y=.01),i}get buffer(){return this.geometry.geometry}get result(){return this.getUpsideValue()}getUpsideValue(){let e=new k(0,0,this.sides==4?-1:1),t,i=Math.PI*2,a=this.buffer.getAttribute("normal").array;for(let o=0,s=this.buffer.groups.length;othis.sides;)o-=this.sides;for(;o<1;)o+=this.sides;t.groups[a].materialIndex=o+1}}this.updateMaterialsForValue(e-i),this.geometry.geometry=t}resetBody(){this.body.vlambda=new y,this.body.position=new y,this.body.previousPosition=new y,this.body.initPosition=new y,this.body.velocity=new y,this.body.initVelocity=new y,this.body.force=new y,this.body.torque=new y,this.body.quaternion=new O1,this.body.initQuaternion=new O1,this.body.angularVelocity=new y,this.body.initAngularVelocity=new y,this.body.interpolatedPosition=new y,this.body.interpolatedQuaternion=new O1,this.body.inertia=new y,this.body.invInertia=new y,this.body.invInertiaWorld=new E2,this.body.invInertiaSolve=new y,this.body.invInertiaWorldSolve=new E2,this.body.wlambda=new y,this.body.updateMassProperties()}updateMaterialsForValue(e){}set(){this.geometry.position.set(this.body.position.x,this.body.position.y,this.body.position.z),this.geometry.quaternion.set(this.body.quaternion.x,this.body.quaternion.y,this.body.quaternion.z,this.body.quaternion.w)}create(){this.body.position.set(this.vector.pos.x,this.vector.pos.y,this.vector.pos.z),this.body.quaternion.setFromAxisAngle(new y(this.vector.axis.x,this.vector.axis.y,this.vector.axis.z),this.vector.axis.w*Math.PI*2),this.body.angularVelocity.set(this.vector.angular.x,this.vector.angular.y,this.vector.angular.z),this.body.velocity.set(this.vector.velocity.x,this.vector.velocity.y,this.vector.velocity.z),this.body.linearDamping=.1,this.body.angularDamping=.1}},vi=class extends D4{constructor(e,t,i,a){super(e,t,i);this.w=e;this.h=t;this.data=i;this.sides=20;this.inertia=6;a&&(this.vector=this.generateVector(a)),this.create()}},gi=class extends D4{constructor(e,t,i,a){super(e,t,i);this.w=e;this.h=t;this.data=i;this.sides=12;this.inertia=8;a&&(this.vector=this.generateVector(a)),this.create()}},T4=class extends D4{constructor(e,t,i,a,r=!1){super(e,t,i);this.w=e;this.h=t;this.data=i;this.isPercentile=r;this.sides=10;this.inertia=9;a&&(this.vector=this.generateVector(a)),this.create()}},xi=class extends D4{constructor(e,t,i,a){super(e,t,i);this.w=e;this.h=t;this.data=i;this.sides=8;this.inertia=10;a&&(this.vector=this.generateVector(a)),this.create()}},Mi=class extends D4{constructor(e,t,i,a){super(e,t,i);this.w=e;this.h=t;this.data=i;this.sides=6;this.inertia=13;a&&(this.vector=this.generateVector(a)),this.create()}},bi=class extends D4{constructor(e,t,i,a){super(e,t,i);this.w=e;this.h=t;this.data=i;this.sides=4;this.inertia=5;a&&(this.vector=this.generateVector(a)),this.create()}};var yi=new k,b9=new k,y9=new n2,ne=class{constructor(e=new k(1,0,0),t=0){this.normal=e,this.constant=t}set(e,t){return this.normal.copy(e),this.constant=t,this}setComponents(e,t,i,a){return this.normal.set(e,t,i),this.constant=a,this}setFromNormalAndCoplanarPoint(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}setFromCoplanarPoints(e,t,i){let a=yi.subVectors(i,t).cross(b9.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(a,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){let e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,t){return t.copy(this.normal).multiplyScalar(-this.distanceToPoint(e)).add(e)}intersectLine(e,t){let i=e.delta(yi),a=this.normal.dot(i);if(a===0)return this.distanceToPoint(e.start)===0?t.copy(e.start):null;let r=-(e.start.dot(this.normal)+this.constant)/a;return r<0||r>1?null:t.copy(i).multiplyScalar(r).add(e.start)}intersectsLine(e){let t=this.distanceToPoint(e.start),i=this.distanceToPoint(e.end);return t<0&&i>0||i<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){let i=t||y9.getNormalMatrix(e),a=this.coplanarPoint(yi).applyMatrix4(e),r=this.normal.applyMatrix3(i).normalize();return this.constant=-a.dot(r),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return new this.constructor().copy(this)}};ne.prototype.isPlane=!0;var at=new je,J6=new k,H4=class{constructor(e=new ne,t=new ne,i=new ne,a=new ne,r=new ne,o=new ne){this.planes=[e,t,i,a,r,o]}set(e,t,i,a,r,o){let s=this.planes;return s[0].copy(e),s[1].copy(t),s[2].copy(i),s[3].copy(a),s[4].copy(r),s[5].copy(o),this}copy(e){let t=this.planes;for(let i=0;i<6;i++)t[i].copy(e.planes[i]);return this}setFromProjectionMatrix(e){let t=this.planes,i=e.elements,a=i[0],r=i[1],o=i[2],s=i[3],c=i[4],l=i[5],u=i[6],f=i[7],h=i[8],m=i[9],v=i[10],g=i[11],x=i[12],p=i[13],d=i[14],A=i[15];return t[0].setComponents(s-a,f-c,g-h,A-x).normalize(),t[1].setComponents(s+a,f+c,g+h,A+x).normalize(),t[2].setComponents(s+r,f+l,g+m,A+p).normalize(),t[3].setComponents(s-r,f-l,g-m,A-p).normalize(),t[4].setComponents(s-o,f-u,g-v,A-d).normalize(),t[5].setComponents(s+o,f+u,g+v,A+d).normalize(),this}intersectsObject(e){let t=e.geometry;return t.boundingSphere===null&&t.computeBoundingSphere(),at.copy(t.boundingSphere).applyMatrix4(e.matrixWorld),this.intersectsSphere(at)}intersectsSprite(e){return at.center.set(0,0,0),at.radius=.7071067811865476,at.applyMatrix4(e.matrixWorld),this.intersectsSphere(at)}intersectsSphere(e){let t=this.planes,i=e.center,a=-e.radius;for(let r=0;r<6;r++)if(t[r].distanceToPoint(i)0?e.max.x:e.min.x,J6.y=a.normal.y>0?e.max.y:e.min.y,J6.z=a.normal.z>0?e.max.z:e.min.z,a.distanceToPoint(J6)<0)return!1}return!0}containsPoint(e){let t=this.planes;for(let i=0;i<6;i++)if(t[i].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}};function Q6(){let n=null,e=!1,t=null,i=null;function a(r,o){t(r,o),i=n.requestAnimationFrame(a)}return{start:function(){e!==!0&&t!==null&&(i=n.requestAnimationFrame(a),e=!0)},stop:function(){n.cancelAnimationFrame(i),e=!1},setAnimationLoop:function(r){t=r},setContext:function(r){n=r}}}function I8(n,e){let t=e.isWebGL2,i=new WeakMap;function a(l,u){let f=l.array,h=l.usage,m=n.createBuffer();n.bindBuffer(u,m),n.bufferData(u,f,h),l.onUploadCallback();let v=n.FLOAT;return f instanceof Float32Array?v=n.FLOAT:f instanceof Float64Array?console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array."):f instanceof Uint16Array?l.isFloat16BufferAttribute?t?v=n.HALF_FLOAT:console.warn("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2."):v=n.UNSIGNED_SHORT:f instanceof Int16Array?v=n.SHORT:f instanceof Uint32Array?v=n.UNSIGNED_INT:f instanceof Int32Array?v=n.INT:f instanceof Int8Array?v=n.BYTE:(f instanceof Uint8Array||f instanceof Uint8ClampedArray)&&(v=n.UNSIGNED_BYTE),{buffer:m,type:v,bytesPerElement:f.BYTES_PER_ELEMENT,version:l.version}}function r(l,u,f){let h=u.array,m=u.updateRange;n.bindBuffer(f,l),m.count===-1?n.bufferSubData(f,0,h):(t?n.bufferSubData(f,m.offset*h.BYTES_PER_ELEMENT,h,m.offset,m.count):n.bufferSubData(f,m.offset*h.BYTES_PER_ELEMENT,h.subarray(m.offset,m.offset+m.count)),m.count=-1)}function o(l){return l.isInterleavedBufferAttribute&&(l=l.data),i.get(l)}function s(l){l.isInterleavedBufferAttribute&&(l=l.data);let u=i.get(l);u&&(n.deleteBuffer(u.buffer),i.delete(l))}function c(l,u){if(l.isGLBufferAttribute){let h=i.get(l);(!h||h.version0?1:-1,u.push(Z.x,Z.y,Z.z),f.push(X/T),f.push(1-O/_),N+=1}}for(let O=0;O<_;O++)for(let W=0;W0?-1:1)*.9,y:this.h*(r.y>0?-1:1)*.9,z:Math.random()*200+200},o=Math.abs(r.x/r.y);o>1?s.y/=o:s.x*=o;let c=this.makeRandomVector(a),l={x:c.x*i,y:c.y*i,z:-10},u={x:-(Math.random()*r.y*5+this.inertia*r.y),y:Math.random()*r.x*5+this.inertia*r.x,z:0},f={x:Math.random(),y:Math.random(),z:Math.random(),w:Math.random()};return{pos:s,velocity:l,angular:u,axis:f}}makeRandomVector(e){let t=Math.random()*Math.PI/5-Math.PI/5/2,i={x:e.x*Math.cos(t)-e.y*Math.sin(t),y:e.x*Math.sin(t)+e.y*Math.cos(t)};return i.x==0&&(i.x=.01),i.y==0&&(i.y=.01),i}get buffer(){return this.geometry.geometry}get result(){return this.getUpsideValue()}getUpsideValue(){let e=new k(0,0,this.sides==4?-1:1),t,i=Math.PI*2,a=this.buffer.getAttribute("normal").array;for(let s=0,o=this.buffer.groups.length;sthis.sides;)s-=this.sides;for(;s<1;)s+=this.sides;t.groups[a].materialIndex=s+1}}this.updateMaterialsForValue(e-i),this.geometry.geometry=t}resetBody(){this.body.vlambda=new y,this.body.position=new y,this.body.previousPosition=new y,this.body.initPosition=new y,this.body.velocity=new y,this.body.initVelocity=new y,this.body.force=new y,this.body.torque=new y,this.body.quaternion=new O1,this.body.initQuaternion=new O1,this.body.angularVelocity=new y,this.body.initAngularVelocity=new y,this.body.interpolatedPosition=new y,this.body.interpolatedQuaternion=new O1,this.body.inertia=new y,this.body.invInertia=new y,this.body.invInertiaWorld=new _2,this.body.invInertiaSolve=new y,this.body.invInertiaWorldSolve=new _2,this.body.wlambda=new y,this.body.updateMassProperties()}updateMaterialsForValue(e){}set(){this.geometry.position.set(this.body.position.x,this.body.position.y,this.body.position.z),this.geometry.quaternion.set(this.body.quaternion.x,this.body.quaternion.y,this.body.quaternion.z,this.body.quaternion.w)}create(){this.body.position.set(this.vector.pos.x,this.vector.pos.y,this.vector.pos.z),this.body.quaternion.setFromAxisAngle(new y(this.vector.axis.x,this.vector.axis.y,this.vector.axis.z),this.vector.axis.w*Math.PI*2),this.body.angularVelocity.set(this.vector.angular.x,this.vector.angular.y,this.vector.angular.z),this.body.velocity.set(this.vector.velocity.x,this.vector.velocity.y,this.vector.velocity.z),this.body.linearDamping=.1,this.body.angularDamping=.1}},gi=class extends L4{constructor(e,t,i,a){super(e,t,i);this.w=e;this.h=t;this.data=i;this.sides=20;this.inertia=6;a&&(this.vector=this.generateVector(a)),this.create()}},xi=class extends L4{constructor(e,t,i,a){super(e,t,i);this.w=e;this.h=t;this.data=i;this.sides=12;this.inertia=8;a&&(this.vector=this.generateVector(a)),this.create()}},D4=class extends L4{constructor(e,t,i,a,r=!1){super(e,t,i);this.w=e;this.h=t;this.data=i;this.isPercentile=r;this.sides=10;this.inertia=9;a&&(this.vector=this.generateVector(a)),this.create()}},Mi=class extends L4{constructor(e,t,i,a){super(e,t,i);this.w=e;this.h=t;this.data=i;this.sides=8;this.inertia=10;a&&(this.vector=this.generateVector(a)),this.create()}},bi=class extends L4{constructor(e,t,i,a){super(e,t,i);this.w=e;this.h=t;this.data=i;this.sides=6;this.inertia=13;a&&(this.vector=this.generateVector(a)),this.create()}},yi=class extends L4{constructor(e,t,i,a){super(e,t,i);this.w=e;this.h=t;this.data=i;this.sides=4;this.inertia=5;a&&(this.vector=this.generateVector(a)),this.create()}};var Ci=new k,y9=new k,C9=new n2,ne=class{constructor(e=new k(1,0,0),t=0){this.normal=e,this.constant=t}set(e,t){return this.normal.copy(e),this.constant=t,this}setComponents(e,t,i,a){return this.normal.set(e,t,i),this.constant=a,this}setFromNormalAndCoplanarPoint(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}setFromCoplanarPoints(e,t,i){let a=Ci.subVectors(i,t).cross(y9.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(a,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){let e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,t){return t.copy(this.normal).multiplyScalar(-this.distanceToPoint(e)).add(e)}intersectLine(e,t){let i=e.delta(Ci),a=this.normal.dot(i);if(a===0)return this.distanceToPoint(e.start)===0?t.copy(e.start):null;let r=-(e.start.dot(this.normal)+this.constant)/a;return r<0||r>1?null:t.copy(i).multiplyScalar(r).add(e.start)}intersectsLine(e){let t=this.distanceToPoint(e.start),i=this.distanceToPoint(e.end);return t<0&&i>0||i<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){let i=t||C9.getNormalMatrix(e),a=this.coplanarPoint(Ci).applyMatrix4(e),r=this.normal.applyMatrix3(i).normalize();return this.constant=-a.dot(r),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return new this.constructor().copy(this)}};ne.prototype.isPlane=!0;var it=new qe,Q6=new k,T4=class{constructor(e=new ne,t=new ne,i=new ne,a=new ne,r=new ne,s=new ne){this.planes=[e,t,i,a,r,s]}set(e,t,i,a,r,s){let o=this.planes;return o[0].copy(e),o[1].copy(t),o[2].copy(i),o[3].copy(a),o[4].copy(r),o[5].copy(s),this}copy(e){let t=this.planes;for(let i=0;i<6;i++)t[i].copy(e.planes[i]);return this}setFromProjectionMatrix(e){let t=this.planes,i=e.elements,a=i[0],r=i[1],s=i[2],o=i[3],c=i[4],l=i[5],u=i[6],f=i[7],h=i[8],p=i[9],v=i[10],g=i[11],x=i[12],m=i[13],d=i[14],A=i[15];return t[0].setComponents(o-a,f-c,g-h,A-x).normalize(),t[1].setComponents(o+a,f+c,g+h,A+x).normalize(),t[2].setComponents(o+r,f+l,g+p,A+m).normalize(),t[3].setComponents(o-r,f-l,g-p,A-m).normalize(),t[4].setComponents(o-s,f-u,g-v,A-d).normalize(),t[5].setComponents(o+s,f+u,g+v,A+d).normalize(),this}intersectsObject(e){let t=e.geometry;return t.boundingSphere===null&&t.computeBoundingSphere(),it.copy(t.boundingSphere).applyMatrix4(e.matrixWorld),this.intersectsSphere(it)}intersectsSprite(e){return it.center.set(0,0,0),it.radius=.7071067811865476,it.applyMatrix4(e.matrixWorld),this.intersectsSphere(it)}intersectsSphere(e){let t=this.planes,i=e.center,a=-e.radius;for(let r=0;r<6;r++)if(t[r].distanceToPoint(i)0?e.max.x:e.min.x,Q6.y=a.normal.y>0?e.max.y:e.min.y,Q6.z=a.normal.z>0?e.max.z:e.min.z,a.distanceToPoint(Q6)<0)return!1}return!0}containsPoint(e){let t=this.planes;for(let i=0;i<6;i++)if(t[i].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}};function e0(){let n=null,e=!1,t=null,i=null;function a(r,s){t(r,s),i=n.requestAnimationFrame(a)}return{start:function(){e!==!0&&t!==null&&(i=n.requestAnimationFrame(a),e=!0)},stop:function(){n.cancelAnimationFrame(i),e=!1},setAnimationLoop:function(r){t=r},setContext:function(r){n=r}}}function k8(n,e){let t=e.isWebGL2,i=new WeakMap;function a(l,u){let f=l.array,h=l.usage,p=n.createBuffer();n.bindBuffer(u,p),n.bufferData(u,f,h),l.onUploadCallback();let v=n.FLOAT;return f instanceof Float32Array?v=n.FLOAT:f instanceof Float64Array?console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array."):f instanceof Uint16Array?l.isFloat16BufferAttribute?t?v=n.HALF_FLOAT:console.warn("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2."):v=n.UNSIGNED_SHORT:f instanceof Int16Array?v=n.SHORT:f instanceof Uint32Array?v=n.UNSIGNED_INT:f instanceof Int32Array?v=n.INT:f instanceof Int8Array?v=n.BYTE:(f instanceof Uint8Array||f instanceof Uint8ClampedArray)&&(v=n.UNSIGNED_BYTE),{buffer:p,type:v,bytesPerElement:f.BYTES_PER_ELEMENT,version:l.version}}function r(l,u,f){let h=u.array,p=u.updateRange;n.bindBuffer(f,l),p.count===-1?n.bufferSubData(f,0,h):(t?n.bufferSubData(f,p.offset*h.BYTES_PER_ELEMENT,h,p.offset,p.count):n.bufferSubData(f,p.offset*h.BYTES_PER_ELEMENT,h.subarray(p.offset,p.offset+p.count)),p.count=-1)}function s(l){return l.isInterleavedBufferAttribute&&(l=l.data),i.get(l)}function o(l){l.isInterleavedBufferAttribute&&(l=l.data);let u=i.get(l);u&&(n.deleteBuffer(u.buffer),i.delete(l))}function c(l,u){if(l.isGLBufferAttribute){let h=i.get(l);(!h||h.version0?1:-1,u.push(Z.x,Z.y,Z.z),f.push(X/T),f.push(1-O/_),N+=1}}for(let O=0;O<_;O++)for(let W=0;W0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader;let i={};for(let a in this.extensions)this.extensions[a]===!0&&(i[a]=!0);return Object.keys(i).length>0&&(t.extensions=i),t}};se.prototype.isShaderMaterial=!0;var G8=` +`;var se=class extends T2{constructor(e){super();this.type="ShaderMaterial",this.defines={},this.uniforms={},this.vertexShader=O8,this.fragmentShader=G8,this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv2:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,this.glslVersion=null,e!==void 0&&(e.attributes!==void 0&&console.error("THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead."),this.setValues(e))}copy(e){return super.copy(e),this.fragmentShader=e.fragmentShader,this.vertexShader=e.vertexShader,this.uniforms=$e(e.uniforms),this.defines=Object.assign({},e.defines),this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.lights=e.lights,this.clipping=e.clipping,this.extensions=Object.assign({},e.extensions),this.glslVersion=e.glslVersion,this}toJSON(e){let t=super.toJSON(e);t.glslVersion=this.glslVersion,t.uniforms={};for(let a in this.uniforms){let s=this.uniforms[a].value;s&&s.isTexture?t.uniforms[a]={type:"t",value:s.toJSON(e).uuid}:s&&s.isColor?t.uniforms[a]={type:"c",value:s.getHex()}:s&&s.isVector2?t.uniforms[a]={type:"v2",value:s.toArray()}:s&&s.isVector3?t.uniforms[a]={type:"v3",value:s.toArray()}:s&&s.isVector4?t.uniforms[a]={type:"v4",value:s.toArray()}:s&&s.isMatrix3?t.uniforms[a]={type:"m3",value:s.toArray()}:s&&s.isMatrix4?t.uniforms[a]={type:"m4",value:s.toArray()}:t.uniforms[a]={value:s}}Object.keys(this.defines).length>0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader;let i={};for(let a in this.extensions)this.extensions[a]===!0&&(i[a]=!0);return Object.keys(i).length>0&&(t.extensions=i),t}};se.prototype.isShaderMaterial=!0;var q8=` #ifdef USE_ALPHAMAP diffuseColor.a *= texture2D( alphaMap, vUv ).g; #endif -`;var q8=` +`;var W8=` #ifdef USE_ALPHAMAP uniform sampler2D alphaMap; #endif -`;var W8=` +`;var j8=` #ifdef USE_ALPHATEST if ( diffuseColor.a < alphaTest ) discard; #endif -`;var j8=` +`;var X8=` #ifdef USE_ALPHATEST uniform float alphaTest; #endif -`;var X8=` +`;var Z8=` #ifdef USE_AOMAP // reads channel R, compatible with a combined OcclusionRoughnessMetallic (RGB) texture @@ -570,16 +570,16 @@ void main() { #endif #endif -`;var Z8=` +`;var Y8=` #ifdef USE_AOMAP uniform sampler2D aoMap; uniform float aoMapIntensity; #endif -`;var Y8=` -vec3 transformed = vec3( position ); `;var $8=` +vec3 transformed = vec3( position ); +`;var K8=` vec3 objectNormal = vec3( normal ); #ifdef USE_TANGENT @@ -587,7 +587,7 @@ vec3 objectNormal = vec3( normal ); vec3 objectTangent = vec3( tangent.xyz ); #endif -`;var K8=` +`;var J8=` vec3 BRDF_Lambert( const in vec3 diffuseColor ) { @@ -844,7 +844,7 @@ vec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 no } #endif -`;var J8=` +`;var Q8=` #ifdef USE_BUMPMAP uniform sampler2D bumpMap; @@ -887,7 +887,7 @@ vec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 no } #endif -`;var Q8=` +`;var en=` #if NUM_CLIPPING_PLANES > 0 vec4 plane; @@ -919,7 +919,7 @@ vec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 no #endif #endif -`;var en=` +`;var tn=` #if NUM_CLIPPING_PLANES > 0 varying vec3 vClipPosition; @@ -927,19 +927,19 @@ vec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 no uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ]; #endif -`;var tn=` +`;var an=` #if NUM_CLIPPING_PLANES > 0 varying vec3 vClipPosition; #endif -`;var an=` +`;var rn=` #if NUM_CLIPPING_PLANES > 0 vClipPosition = - mvPosition.xyz; #endif -`;var rn=` +`;var nn=` #if defined( USE_COLOR_ALPHA ) diffuseColor *= vColor; @@ -949,7 +949,7 @@ vec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 no diffuseColor.rgb *= vColor; #endif -`;var nn=` +`;var sn=` #if defined( USE_COLOR_ALPHA ) varying vec4 vColor; @@ -959,7 +959,7 @@ vec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 no varying vec3 vColor; #endif -`;var sn=` +`;var on=` #if defined( USE_COLOR_ALPHA ) varying vec4 vColor; @@ -969,7 +969,7 @@ vec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 no varying vec3 vColor; #endif -`;var on=` +`;var cn=` #if defined( USE_COLOR_ALPHA ) vColor = vec4( 1.0 ); @@ -991,7 +991,7 @@ vec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 no vColor.xyz *= instanceColor.xyz; #endif -`;var cn=` +`;var ln=` #define PI 3.141592653589793 #define PI2 6.283185307179586 #define PI_HALF 1.5707963267948966 @@ -1106,7 +1106,7 @@ vec2 equirectUv( in vec3 dir ) { return vec2( u, v ); } -`;var ln=` +`;var un=` #ifdef ENVMAP_TYPE_CUBE_UV #define cubeUV_maxMipLevel 8.0 @@ -1297,7 +1297,7 @@ vec2 equirectUv( in vec3 dir ) { } #endif -`;var un=` +`;var hn=` vec3 transformedNormal = objectNormal; #ifdef USE_INSTANCING @@ -1332,7 +1332,7 @@ transformedNormal = normalMatrix * transformedNormal; #endif #endif -`;var hn=` +`;var fn=` #ifdef USE_DISPLACEMENTMAP uniform sampler2D displacementMap; @@ -1340,13 +1340,13 @@ transformedNormal = normalMatrix * transformedNormal; uniform float displacementBias; #endif -`;var fn=` +`;var dn=` #ifdef USE_DISPLACEMENTMAP transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vUv ).x * displacementScale + displacementBias ); #endif -`;var dn=` +`;var pn=` #ifdef USE_EMISSIVEMAP vec4 emissiveColor = texture2D( emissiveMap, vUv ); @@ -1354,15 +1354,15 @@ transformedNormal = normalMatrix * transformedNormal; totalEmissiveRadiance *= emissiveColor.rgb; #endif -`;var pn=` +`;var mn=` #ifdef USE_EMISSIVEMAP uniform sampler2D emissiveMap; #endif -`;var mn=` -gl_FragColor = linearToOutputTexel( gl_FragColor ); `;var vn=` +gl_FragColor = linearToOutputTexel( gl_FragColor ); +`;var gn=` vec4 LinearToLinear( in vec4 value ) { return value; @@ -1372,7 +1372,7 @@ vec4 LinearTosRGB( in vec4 value ) { return vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a ); } -`;var gn=` +`;var xn=` #ifdef USE_ENVMAP #ifdef ENV_WORLDPOS @@ -1437,7 +1437,7 @@ vec4 LinearTosRGB( in vec4 value ) { #endif #endif -`;var xn=` +`;var Mn=` #ifdef USE_ENVMAP uniform float envMapIntensity; @@ -1450,7 +1450,7 @@ vec4 LinearTosRGB( in vec4 value ) { #endif #endif -`;var Mn=` +`;var bn=` #ifdef USE_ENVMAP uniform float reflectivity; @@ -1470,7 +1470,7 @@ vec4 LinearTosRGB( in vec4 value ) { #endif #endif -`;var bn=` +`;var yn=` #ifdef USE_ENVMAP #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) ||defined( PHONG ) @@ -1491,7 +1491,7 @@ vec4 LinearTosRGB( in vec4 value ) { #endif #endif -`;var yn=` +`;var Cn=` #ifdef USE_ENVMAP #ifdef ENV_WORLDPOS @@ -1527,19 +1527,19 @@ vec4 LinearTosRGB( in vec4 value ) { #endif #endif -`;var Cn=` +`;var zn=` #ifdef USE_FOG vFogDepth = - mvPosition.z; #endif -`;var zn=` +`;var An=` #ifdef USE_FOG varying float vFogDepth; #endif -`;var An=` +`;var wn=` #ifdef USE_FOG #ifdef FOG_EXP2 @@ -1555,7 +1555,7 @@ vec4 LinearTosRGB( in vec4 value ) { gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor ); #endif -`;var wn=` +`;var Sn=` #ifdef USE_FOG uniform vec3 fogColor; @@ -1573,7 +1573,7 @@ vec4 LinearTosRGB( in vec4 value ) { #endif #endif -`;var Sn=` +`;var _n=` #ifdef USE_GRADIENTMAP @@ -1598,7 +1598,7 @@ vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { #endif } -`;var _n=` +`;var En=` #ifdef USE_LIGHTMAP vec4 lightMapTexel = texture2D( lightMap, vUv2 ); @@ -1613,14 +1613,14 @@ vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { reflectedLight.indirectDiffuse += lightMapIrradiance; #endif -`;var En=` +`;var Ln=` #ifdef USE_LIGHTMAP uniform sampler2D lightMap; uniform float lightMapIntensity; #endif -`;var Ln=` +`;var Dn=` vec3 diffuse = vec3( 1.0 ); GeometricContext geometry; @@ -1741,7 +1741,7 @@ vIndirectFront += getLightProbeIrradiance( lightProbe, geometry.normal ); #pragma unroll_loop_end #endif -`;var Dn=` +`;var Tn=` uniform bool receiveShadow; uniform vec3 ambientLightColor; uniform vec3 lightProbe[ 9 ]; @@ -1963,7 +1963,7 @@ float getSpotAttenuation( const in float coneCosine, const in float penumbraCosi } #endif -`;var Tn=` +`;var Hn=` #if defined( USE_ENVMAP ) #ifdef ENVMAP_MODE_REFRACTION @@ -2024,10 +2024,10 @@ float getSpotAttenuation( const in float coneCosine, const in float penumbraCosi } #endif -`;var Hn=` +`;var Vn=` ToonMaterial material; material.diffuseColor = diffuseColor.rgb; -`;var Vn=` +`;var Nn=` varying vec3 vViewPosition; struct ToonMaterial { @@ -2054,13 +2054,13 @@ void RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in GeometricContex #define RE_IndirectDiffuse RE_IndirectDiffuse_Toon #define Material_LightProbeLOD( material ) (0) -`;var Nn=` +`;var Rn=` BlinnPhongMaterial material; material.diffuseColor = diffuseColor.rgb; material.specularColor = specular; material.specularShininess = shininess; material.specularStrength = specularStrength; -`;var Rn=` +`;var Fn=` varying vec3 vViewPosition; struct BlinnPhongMaterial { @@ -2093,7 +2093,7 @@ void RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in Geometric #define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong #define Material_LightProbeLOD( material ) (0) -`;var Fn=` +`;var Bn=` PhysicalMaterial material; material.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor ); @@ -2187,7 +2187,7 @@ material.roughness = min( material.roughness, 1.0 ); #endif #endif -`;var Bn=` +`;var Pn=` struct PhysicalMaterial { vec3 diffuseColor; @@ -2400,7 +2400,7 @@ float computeSpecularOcclusion( const in float dotNV, const in float ambientOccl return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion ); } -`;var Pn=` +`;var In=` /** * This is a template that can be used to light a material, it uses pluggable * RenderEquations (RE)for specific lighting scenarios. @@ -2551,7 +2551,7 @@ IncidentLight directLight; vec3 clearcoatRadiance = vec3( 0.0 ); #endif -`;var In=` +`;var kn=` #if defined( RE_IndirectDiffuse ) #ifdef USE_LIGHTMAP @@ -2588,7 +2588,7 @@ IncidentLight directLight; #endif #endif -`;var kn=` +`;var Un=` #if defined( RE_IndirectDiffuse ) RE_IndirectDiffuse( irradiance, geometry, material, reflectedLight ); @@ -2600,7 +2600,7 @@ IncidentLight directLight; RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometry, material, reflectedLight ); #endif -`;var Un=` +`;var On=` #if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) // Doing a strict comparison with == 1.0 can cause noise artifacts @@ -2608,7 +2608,7 @@ IncidentLight directLight; gl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5; #endif -`;var On=` +`;var Gn=` #if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) uniform float logDepthBufFC; @@ -2616,7 +2616,7 @@ IncidentLight directLight; varying float vIsPerspective; #endif -`;var Gn=` +`;var qn=` #ifdef USE_LOGDEPTHBUF #ifdef USE_LOGDEPTHBUF_EXT @@ -2631,7 +2631,7 @@ IncidentLight directLight; #endif #endif -`;var qn=` +`;var Wn=` #ifdef USE_LOGDEPTHBUF #ifdef USE_LOGDEPTHBUF_EXT @@ -2652,7 +2652,7 @@ IncidentLight directLight; #endif #endif -`;var Wn=` +`;var jn=` #ifdef USE_MAP vec4 sampledDiffuseColor = texture2D( map, vUv ); @@ -2668,13 +2668,13 @@ IncidentLight directLight; diffuseColor *= sampledDiffuseColor; #endif -`;var jn=` +`;var Xn=` #ifdef USE_MAP uniform sampler2D map; #endif -`;var Xn=` +`;var Zn=` #if defined( USE_MAP ) || defined( USE_ALPHAMAP ) vec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy; @@ -2692,7 +2692,7 @@ IncidentLight directLight; diffuseColor.a *= texture2D( alphaMap, uv ).g; #endif -`;var Zn=` +`;var Yn=` #if defined( USE_MAP ) || defined( USE_ALPHAMAP ) uniform mat3 uvTransform; @@ -2710,7 +2710,7 @@ IncidentLight directLight; uniform sampler2D alphaMap; #endif -`;var Yn=` +`;var $n=` float metalnessFactor = metalness; #ifdef USE_METALNESSMAP @@ -2721,13 +2721,13 @@ float metalnessFactor = metalness; metalnessFactor *= texelMetalness.b; #endif -`;var $n=` +`;var Kn=` #ifdef USE_METALNESSMAP uniform sampler2D metalnessMap; #endif -`;var Kn=` +`;var Jn=` #ifdef USE_MORPHNORMALS // morphTargetBaseInfluence is set based on BufferGeometry.morphTargetsRelative value: @@ -2753,7 +2753,7 @@ float metalnessFactor = metalness; #endif #endif -`;var Jn=` +`;var Qn=` #ifdef USE_MORPHTARGETS uniform float morphTargetBaseInfluence; @@ -2790,7 +2790,7 @@ float metalnessFactor = metalness; #endif #endif -`;var Qn=` +`;var es=` #ifdef USE_MORPHTARGETS // morphTargetBaseInfluence is set based on BufferGeometry.morphTargetsRelative value: @@ -2833,7 +2833,7 @@ float metalnessFactor = metalness; #endif #endif -`;var es=` +`;var ts=` float faceDirection = gl_FrontFacing ? 1.0 : - 1.0; #ifdef FLAT_SHADED @@ -2880,7 +2880,7 @@ float faceDirection = gl_FrontFacing ? 1.0 : - 1.0; vec3 geometryNormal = normal; -`;var ts=` +`;var is=` #ifdef OBJECTSPACE_NORMALMAP @@ -2920,7 +2920,7 @@ vec3 geometryNormal = normal; normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection ); #endif -`;var is=` +`;var as=` #ifndef FLAT_SHADED varying vec3 vNormal; @@ -2933,7 +2933,7 @@ vec3 geometryNormal = normal; #endif #endif -`;var as=` +`;var rs=` #ifndef FLAT_SHADED varying vec3 vNormal; @@ -2946,7 +2946,7 @@ vec3 geometryNormal = normal; #endif #endif -`;var rs=` +`;var ns=` #ifndef FLAT_SHADED // normal is computed with derivatives when FLAT_SHADED vNormal = normalize( transformedNormal ); @@ -2959,7 +2959,7 @@ vec3 geometryNormal = normal; #endif #endif -`;var ns=` +`;var ss=` #ifdef USE_NORMALMAP uniform sampler2D normalMap; @@ -3003,13 +3003,13 @@ vec3 geometryNormal = normal; } #endif -`;var ss=` +`;var os=` #ifdef USE_CLEARCOAT vec3 clearcoatNormal = geometryNormal; #endif -`;var os=` +`;var cs=` #ifdef USE_CLEARCOAT_NORMALMAP vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vUv ).xyz * 2.0 - 1.0; @@ -3026,7 +3026,7 @@ vec3 geometryNormal = normal; #endif #endif -`;var cs=` +`;var ls=` #ifdef USE_CLEARCOATMAP @@ -3046,7 +3046,7 @@ vec3 geometryNormal = normal; uniform vec2 clearcoatNormalScale; #endif -`;var ls=` +`;var us=` #ifdef OPAQUE diffuseColor.a = 1.0; #endif @@ -3057,7 +3057,7 @@ diffuseColor.a *= transmissionAlpha + 0.1; #endif gl_FragColor = vec4( outgoingLight, diffuseColor.a ); -`;var us=` +`;var hs=` vec3 packNormalToRGB( const in vec3 normal ) { return normalize( normal ) * 0.5 + 0.5; } @@ -3110,14 +3110,14 @@ float viewZToPerspectiveDepth( const in float viewZ, const in float near, const float perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) { return ( near * far ) / ( ( far - near ) * invClipZ - far ); } -`;var hs=` +`;var fs=` #ifdef PREMULTIPLIED_ALPHA // Get get normal blending with premultipled, use with CustomBlending, OneFactor, OneMinusSrcAlphaFactor, AddEquation. gl_FragColor.rgb *= gl_FragColor.a; #endif -`;var fs=` +`;var ds=` vec4 mvPosition = vec4( transformed, 1.0 ); #ifdef USE_INSTANCING @@ -3129,13 +3129,13 @@ vec4 mvPosition = vec4( transformed, 1.0 ); mvPosition = modelViewMatrix * mvPosition; gl_Position = projectionMatrix * mvPosition; -`;var ds=` +`;var ps=` #ifdef DITHERING gl_FragColor.rgb = dithering( gl_FragColor.rgb ); #endif -`;var ps=` +`;var ms=` #ifdef DITHERING // based on https://www.shadertoy.com/view/MslGR8 @@ -3154,7 +3154,7 @@ gl_Position = projectionMatrix * mvPosition; } #endif -`;var ms=` +`;var vs=` float roughnessFactor = roughness; #ifdef USE_ROUGHNESSMAP @@ -3165,13 +3165,13 @@ float roughnessFactor = roughness; roughnessFactor *= texelRoughness.g; #endif -`;var vs=` +`;var gs=` #ifdef USE_ROUGHNESSMAP uniform sampler2D roughnessMap; #endif -`;var gs=` +`;var xs=` #ifdef USE_SHADOWMAP #if NUM_DIR_LIGHT_SHADOWS > 0 @@ -3480,7 +3480,7 @@ float roughnessFactor = roughness; } #endif -`;var xs=` +`;var Ms=` #ifdef USE_SHADOWMAP #if NUM_DIR_LIGHT_SHADOWS > 0 @@ -3542,7 +3542,7 @@ float roughnessFactor = roughness; */ #endif -`;var Ms=` +`;var bs=` #ifdef USE_SHADOWMAP #if NUM_DIR_LIGHT_SHADOWS > 0 || NUM_SPOT_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 @@ -3601,7 +3601,7 @@ float roughnessFactor = roughness; */ #endif -`;var bs=` +`;var ys=` float getShadowMask() { float shadow = 1.0; @@ -3666,7 +3666,7 @@ float getShadowMask() { return shadow; } -`;var ys=` +`;var Cs=` #ifdef USE_SKINNING mat4 boneMatX = getBoneMatrix( skinIndex.x ); @@ -3675,7 +3675,7 @@ float getShadowMask() { mat4 boneMatW = getBoneMatrix( skinIndex.w ); #endif -`;var Cs=` +`;var zs=` #ifdef USE_SKINNING uniform mat4 bindMatrix; @@ -3722,7 +3722,7 @@ float getShadowMask() { #endif #endif -`;var zs=` +`;var As=` #ifdef USE_SKINNING vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 ); @@ -3736,7 +3736,7 @@ float getShadowMask() { transformed = ( bindMatrixInverse * skinned ).xyz; #endif -`;var As=` +`;var ws=` #ifdef USE_SKINNING mat4 skinMatrix = mat4( 0.0 ); @@ -3755,7 +3755,7 @@ float getShadowMask() { #endif #endif -`;var ws=` +`;var Ss=` float specularStrength; #ifdef USE_SPECULARMAP @@ -3768,19 +3768,19 @@ float specularStrength; specularStrength = 1.0; #endif -`;var Ss=` +`;var _s=` #ifdef USE_SPECULARMAP uniform sampler2D specularMap; #endif -`;var _s=` +`;var Es=` #if defined( TONE_MAPPING ) gl_FragColor.rgb = toneMapping( gl_FragColor.rgb ); #endif -`;var Es=` +`;var Ls=` #ifndef saturate // may have defined saturate() already #define saturate( a ) clamp( a, 0.0, 1.0 ) @@ -3856,7 +3856,7 @@ vec3 ACESFilmicToneMapping( vec3 color ) { } vec3 CustomToneMapping( vec3 color ) { return color; } -`;var Ls=` +`;var Ds=` #ifdef USE_TRANSMISSION float transmissionAlpha = 1.0; @@ -3887,7 +3887,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; } totalDiffuse = mix( totalDiffuse, transmission.rgb, transmissionFactor ); transmissionAlpha = mix( transmissionAlpha, transmission.a, transmissionFactor ); #endif -`;var Ds=` +`;var Ts=` #ifdef USE_TRANSMISSION // Transmission code is based on glTF-Sampler-Viewer @@ -4002,13 +4002,13 @@ vec3 CustomToneMapping( vec3 color ) { return color; } } #endif -`;var Ts=` +`;var Hs=` #if ( defined( USE_UV ) && ! defined( UVS_VERTEX_ONLY ) ) varying vec2 vUv; #endif -`;var Hs=` +`;var Vs=` #ifdef USE_UV #ifdef UVS_VERTEX_ONLY @@ -4024,19 +4024,19 @@ vec3 CustomToneMapping( vec3 color ) { return color; } uniform mat3 uvTransform; #endif -`;var Vs=` +`;var Ns=` #ifdef USE_UV vUv = ( uvTransform * vec3( uv, 1 ) ).xy; #endif -`;var Ns=` +`;var Rs=` #if defined( USE_LIGHTMAP ) || defined( USE_AOMAP ) varying vec2 vUv2; #endif -`;var Rs=` +`;var Fs=` #if defined( USE_LIGHTMAP ) || defined( USE_AOMAP ) attribute vec2 uv2; @@ -4045,13 +4045,13 @@ vec3 CustomToneMapping( vec3 color ) { return color; } uniform mat3 uv2Transform; #endif -`;var Fs=` +`;var Bs=` #if defined( USE_LIGHTMAP ) || defined( USE_AOMAP ) vUv2 = ( uv2Transform * vec3( uv2, 1 ) ).xy; #endif -`;var Bs=` +`;var Ps=` #if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) vec4 worldPosition = vec4( transformed, 1.0 ); @@ -4065,7 +4065,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; } worldPosition = modelMatrix * worldPosition; #endif -`;var Ps=` +`;var Is=` varying vec2 vUv; uniform mat3 uvTransform; @@ -4076,7 +4076,7 @@ void main() { gl_Position = vec4( position.xy, 1.0, 1.0 ); } -`,Is=` +`,ks=` uniform sampler2D t2D; varying vec2 vUv; @@ -4089,7 +4089,7 @@ void main() { #include } -`;var ks=` +`;var Us=` varying vec3 vWorldDirection; #include @@ -4104,7 +4104,7 @@ void main() { gl_Position.z = gl_Position.w; // set z to camera.far } -`,Us=` +`,Os=` #include uniform float opacity; @@ -4124,7 +4124,7 @@ void main() { #include } -`;var Os=` +`;var Gs=` #include #include #include @@ -4163,7 +4163,7 @@ void main() { vHighPrecisionZW = gl_Position.zw; } -`,Gs=` +`,qs=` #if DEPTH_PACKING == 3200 uniform float opacity; @@ -4213,7 +4213,7 @@ void main() { #endif } -`;var qs=` +`;var Ws=` #define DISTANCE varying vec3 vWorldPosition; @@ -4250,7 +4250,7 @@ void main() { vWorldPosition = worldPosition.xyz; } -`,Ws=` +`,js=` #define DISTANCE uniform vec3 referencePosition; @@ -4283,7 +4283,7 @@ void main () { gl_FragColor = packDepthToRGBA( dist ); } -`;var js=` +`;var Xs=` varying vec3 vWorldDirection; #include @@ -4296,7 +4296,7 @@ void main() { #include } -`,Xs=` +`,Zs=` uniform sampler2D tEquirect; varying vec3 vWorldDirection; @@ -4315,7 +4315,7 @@ void main() { #include } -`;var Zs=` +`;var Ys=` uniform float scale; attribute float lineDistance; @@ -4341,7 +4341,7 @@ void main() { #include } -`,Ys=` +`,$s=` uniform vec3 diffuse; uniform float opacity; @@ -4381,7 +4381,7 @@ void main() { #include } -`;var $s=` +`;var Ks=` #include #include #include @@ -4421,7 +4421,7 @@ void main() { #include } -`,Ks=` +`,Js=` uniform vec3 diffuse; uniform float opacity; @@ -4493,7 +4493,7 @@ void main() { #include } -`;var Js=` +`;var Qs=` #define LAMBERT varying vec3 vLightFront; @@ -4543,7 +4543,7 @@ void main() { #include #include } -`,Qs=` +`,e5=` uniform vec3 diffuse; uniform vec3 emissive; uniform float opacity; @@ -4640,7 +4640,7 @@ void main() { #include #include } -`;var e5=` +`;var t5=` #define MATCAP varying vec3 vViewPosition; @@ -4681,7 +4681,7 @@ void main() { vViewPosition = - mvPosition.xyz; } -`,t5=` +`,i5=` #define MATCAP uniform vec3 diffuse; @@ -4743,7 +4743,7 @@ void main() { #include } -`;var i5=` +`;var a5=` #define NORMAL #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP ) @@ -4787,7 +4787,7 @@ void main() { #endif } -`,a5=` +`,r5=` #define NORMAL uniform float opacity; @@ -4816,7 +4816,7 @@ void main() { gl_FragColor = vec4( packNormalToRGB( normal ), opacity ); } -`;var r5=` +`;var n5=` #define PHONG varying vec3 vViewPosition; @@ -4864,7 +4864,7 @@ void main() { #include } -`,n5=` +`,s5=` #define PHONG uniform vec3 diffuse; @@ -4938,7 +4938,7 @@ void main() { #include } -`;var s5=` +`;var o5=` #define STANDARD varying vec3 vViewPosition; @@ -4995,7 +4995,7 @@ void main() { #endif } -`,o5=` +`,c5=` #define STANDARD #ifdef PHYSICAL @@ -5141,7 +5141,7 @@ void main() { #include } -`;var c5=` +`;var l5=` #define TOON varying vec3 vViewPosition; @@ -5187,7 +5187,7 @@ void main() { #include } -`,l5=` +`,u5=` #define TOON uniform vec3 diffuse; @@ -5254,7 +5254,7 @@ void main() { #include } -`;var u5=` +`;var h5=` uniform float size; uniform float scale; @@ -5288,7 +5288,7 @@ void main() { #include } -`,h5=` +`,f5=` uniform vec3 diffuse; uniform float opacity; @@ -5321,7 +5321,7 @@ void main() { #include } -`;var f5=` +`;var d5=` #include #include #include @@ -5346,7 +5346,7 @@ void main() { #include } -`,d5=` +`,p5=` uniform vec3 color; uniform float opacity; @@ -5367,7 +5367,7 @@ void main() { #include } -`;var p5=` +`;var m5=` uniform float rotation; uniform vec2 center; @@ -5410,7 +5410,7 @@ void main() { #include } -`,m5=` +`,v5=` uniform vec3 diffuse; uniform float opacity; @@ -5443,7 +5443,7 @@ void main() { #include } -`;var S1={alphamap_fragment:G8,alphamap_pars_fragment:q8,alphatest_fragment:W8,alphatest_pars_fragment:j8,aomap_fragment:X8,aomap_pars_fragment:Z8,begin_vertex:Y8,beginnormal_vertex:$8,bsdfs:K8,bumpmap_pars_fragment:J8,clipping_planes_fragment:Q8,clipping_planes_pars_fragment:en,clipping_planes_pars_vertex:tn,clipping_planes_vertex:an,color_fragment:rn,color_pars_fragment:nn,color_pars_vertex:sn,color_vertex:on,common:cn,cube_uv_reflection_fragment:ln,defaultnormal_vertex:un,displacementmap_pars_vertex:hn,displacementmap_vertex:fn,emissivemap_fragment:dn,emissivemap_pars_fragment:pn,encodings_fragment:mn,encodings_pars_fragment:vn,envmap_fragment:gn,envmap_common_pars_fragment:xn,envmap_pars_fragment:Mn,envmap_pars_vertex:bn,envmap_physical_pars_fragment:Tn,envmap_vertex:yn,fog_vertex:Cn,fog_pars_vertex:zn,fog_fragment:An,fog_pars_fragment:wn,gradientmap_pars_fragment:Sn,lightmap_fragment:_n,lightmap_pars_fragment:En,lights_lambert_vertex:Ln,lights_pars_begin:Dn,lights_toon_fragment:Hn,lights_toon_pars_fragment:Vn,lights_phong_fragment:Nn,lights_phong_pars_fragment:Rn,lights_physical_fragment:Fn,lights_physical_pars_fragment:Bn,lights_fragment_begin:Pn,lights_fragment_maps:In,lights_fragment_end:kn,logdepthbuf_fragment:Un,logdepthbuf_pars_fragment:On,logdepthbuf_pars_vertex:Gn,logdepthbuf_vertex:qn,map_fragment:Wn,map_pars_fragment:jn,map_particle_fragment:Xn,map_particle_pars_fragment:Zn,metalnessmap_fragment:Yn,metalnessmap_pars_fragment:$n,morphnormal_vertex:Kn,morphtarget_pars_vertex:Jn,morphtarget_vertex:Qn,normal_fragment_begin:es,normal_fragment_maps:ts,normal_pars_fragment:is,normal_pars_vertex:as,normal_vertex:rs,normalmap_pars_fragment:ns,clearcoat_normal_fragment_begin:ss,clearcoat_normal_fragment_maps:os,clearcoat_pars_fragment:cs,output_fragment:ls,packing:us,premultiplied_alpha_fragment:hs,project_vertex:fs,dithering_fragment:ds,dithering_pars_fragment:ps,roughnessmap_fragment:ms,roughnessmap_pars_fragment:vs,shadowmap_pars_fragment:gs,shadowmap_pars_vertex:xs,shadowmap_vertex:Ms,shadowmask_pars_fragment:bs,skinbase_vertex:ys,skinning_pars_vertex:Cs,skinning_vertex:zs,skinnormal_vertex:As,specularmap_fragment:ws,specularmap_pars_fragment:Ss,tonemapping_fragment:_s,tonemapping_pars_fragment:Es,transmission_fragment:Ls,transmission_pars_fragment:Ds,uv_pars_fragment:Ts,uv_pars_vertex:Hs,uv_vertex:Vs,uv2_pars_fragment:Ns,uv2_pars_vertex:Rs,uv2_vertex:Fs,worldpos_vertex:Bs,background_vert:Ps,background_frag:Is,cube_vert:ks,cube_frag:Us,depth_vert:Os,depth_frag:Gs,distanceRGBA_vert:qs,distanceRGBA_frag:Ws,equirect_vert:js,equirect_frag:Xs,linedashed_vert:Zs,linedashed_frag:Ys,meshbasic_vert:$s,meshbasic_frag:Ks,meshlambert_vert:Js,meshlambert_frag:Qs,meshmatcap_vert:e5,meshmatcap_frag:t5,meshnormal_vert:i5,meshnormal_frag:a5,meshphong_vert:r5,meshphong_frag:n5,meshphysical_vert:s5,meshphysical_frag:o5,meshtoon_vert:c5,meshtoon_frag:l5,points_vert:u5,points_frag:h5,shadow_vert:f5,shadow_frag:d5,sprite_vert:p5,sprite_frag:m5};var e1={common:{diffuse:{value:new x1(16777215)},opacity:{value:1},map:{value:null},uvTransform:{value:new n2},uv2Transform:{value:new n2},alphaMap:{value:null},alphaTest:{value:0}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new z1(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new x1(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new x1(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new n2}},sprite:{diffuse:{value:new x1(16777215)},opacity:{value:1},center:{value:new z1(.5,.5)},rotation:{value:0},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new n2}}};var W2={basic:{uniforms:p2([e1.common,e1.specularmap,e1.envmap,e1.aomap,e1.lightmap,e1.fog]),vertexShader:S1.meshbasic_vert,fragmentShader:S1.meshbasic_frag},lambert:{uniforms:p2([e1.common,e1.specularmap,e1.envmap,e1.aomap,e1.lightmap,e1.emissivemap,e1.fog,e1.lights,{emissive:{value:new x1(0)}}]),vertexShader:S1.meshlambert_vert,fragmentShader:S1.meshlambert_frag},phong:{uniforms:p2([e1.common,e1.specularmap,e1.envmap,e1.aomap,e1.lightmap,e1.emissivemap,e1.bumpmap,e1.normalmap,e1.displacementmap,e1.fog,e1.lights,{emissive:{value:new x1(0)},specular:{value:new x1(1118481)},shininess:{value:30}}]),vertexShader:S1.meshphong_vert,fragmentShader:S1.meshphong_frag},standard:{uniforms:p2([e1.common,e1.envmap,e1.aomap,e1.lightmap,e1.emissivemap,e1.bumpmap,e1.normalmap,e1.displacementmap,e1.roughnessmap,e1.metalnessmap,e1.fog,e1.lights,{emissive:{value:new x1(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:S1.meshphysical_vert,fragmentShader:S1.meshphysical_frag},toon:{uniforms:p2([e1.common,e1.aomap,e1.lightmap,e1.emissivemap,e1.bumpmap,e1.normalmap,e1.displacementmap,e1.gradientmap,e1.fog,e1.lights,{emissive:{value:new x1(0)}}]),vertexShader:S1.meshtoon_vert,fragmentShader:S1.meshtoon_frag},matcap:{uniforms:p2([e1.common,e1.bumpmap,e1.normalmap,e1.displacementmap,e1.fog,{matcap:{value:null}}]),vertexShader:S1.meshmatcap_vert,fragmentShader:S1.meshmatcap_frag},points:{uniforms:p2([e1.points,e1.fog]),vertexShader:S1.points_vert,fragmentShader:S1.points_frag},dashed:{uniforms:p2([e1.common,e1.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:S1.linedashed_vert,fragmentShader:S1.linedashed_frag},depth:{uniforms:p2([e1.common,e1.displacementmap]),vertexShader:S1.depth_vert,fragmentShader:S1.depth_frag},normal:{uniforms:p2([e1.common,e1.bumpmap,e1.normalmap,e1.displacementmap,{opacity:{value:1}}]),vertexShader:S1.meshnormal_vert,fragmentShader:S1.meshnormal_frag},sprite:{uniforms:p2([e1.sprite,e1.fog]),vertexShader:S1.sprite_vert,fragmentShader:S1.sprite_frag},background:{uniforms:{uvTransform:{value:new n2},t2D:{value:null}},vertexShader:S1.background_vert,fragmentShader:S1.background_frag},cube:{uniforms:p2([e1.envmap,{opacity:{value:1}}]),vertexShader:S1.cube_vert,fragmentShader:S1.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:S1.equirect_vert,fragmentShader:S1.equirect_frag},distanceRGBA:{uniforms:p2([e1.common,e1.displacementmap,{referencePosition:{value:new k},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:S1.distanceRGBA_vert,fragmentShader:S1.distanceRGBA_frag},shadow:{uniforms:p2([e1.lights,e1.fog,{color:{value:new x1(0)},opacity:{value:1}}]),vertexShader:S1.shadow_vert,fragmentShader:S1.shadow_frag}};W2.physical={uniforms:p2([W2.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatNormalScale:{value:new z1(1,1)},clearcoatNormalMap:{value:null},sheen:{value:0},sheenColor:{value:new x1(0)},sheenColorMap:{value:null},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},transmission:{value:0},transmissionMap:{value:null},transmissionSamplerSize:{value:new z1},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},attenuationDistance:{value:0},attenuationColor:{value:new x1(0)},specularIntensity:{value:1},specularIntensityMap:{value:null},specularColor:{value:new x1(1,1,1)},specularColorMap:{value:null}}]),vertexShader:S1.meshphysical_vert,fragmentShader:S1.meshphysical_frag};function v5(n,e,t,i,a,r){let o=new x1(0),s=a===!0?0:1,c,l,u=null,f=0,h=null;function m(g,x){let p=!1,d=x.isScene===!0?x.background:null;d&&d.isTexture&&(d=e.get(d));let A=n.xr,b=A.getSession&&A.getSession();b&&b.environmentBlendMode==="additive"&&(d=null),d===null?v(o,s):d&&d.isColor&&(v(d,1),p=!0),(n.autoClear||p)&&n.clear(n.autoClearColor,n.autoClearDepth,n.autoClearStencil),d&&(d.isCubeTexture||d.mapping===r4)?(l===void 0&&(l=new u2(new Ke(1,1,1),new se({name:"BackgroundCubeMaterial",uniforms:Je(W2.cube.uniforms),vertexShader:W2.cube.vertexShader,fragmentShader:W2.cube.fragmentShader,side:P1,depthTest:!1,depthWrite:!1,fog:!1})),l.geometry.deleteAttribute("normal"),l.geometry.deleteAttribute("uv"),l.onBeforeRender=function(C,E,T){this.matrixWorld.copyPosition(T.matrixWorld)},Object.defineProperty(l.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),i.update(l)),l.material.uniforms.envMap.value=d,l.material.uniforms.flipEnvMap.value=d.isCubeTexture&&d.isRenderTargetTexture===!1?-1:1,(u!==d||f!==d.version||h!==n.toneMapping)&&(l.material.needsUpdate=!0,u=d,f=d.version,h=n.toneMapping),g.unshift(l,l.geometry,l.material,0,0,null)):d&&d.isTexture&&(c===void 0&&(c=new u2(new V4(2,2),new se({name:"BackgroundMaterial",uniforms:Je(W2.background.uniforms),vertexShader:W2.background.vertexShader,fragmentShader:W2.background.fragmentShader,side:Ue,depthTest:!1,depthWrite:!1,fog:!1})),c.geometry.deleteAttribute("normal"),Object.defineProperty(c.material,"map",{get:function(){return this.uniforms.t2D.value}}),i.update(c)),c.material.uniforms.t2D.value=d,d.matrixAutoUpdate===!0&&d.updateMatrix(),c.material.uniforms.uvTransform.value.copy(d.matrix),(u!==d||f!==d.version||h!==n.toneMapping)&&(c.material.needsUpdate=!0,u=d,f=d.version,h=n.toneMapping),g.unshift(c,c.geometry,c.material,0,0,null))}function v(g,x){t.buffers.color.setClear(g.r,g.g,g.b,x,r)}return{getClearColor:function(){return o},setClearColor:function(g,x=1){o.set(g),s=x,v(o,s)},getClearAlpha:function(){return s},setClearAlpha:function(g){s=g,v(o,s)},render:m}}function g5(n,e,t,i){let a=n.getParameter(n.MAX_VERTEX_ATTRIBS),r=i.isWebGL2?null:e.get("OES_vertex_array_object"),o=i.isWebGL2||r!==null,s={},c=g(null),l=c;function u(z,H,V,L,N){let U=!1;if(o){let Z=v(L,V,H);l!==Z&&(l=Z,h(l.object)),U=x(L,N),U&&p(L,N)}else{let Z=H.wireframe===!0;(l.geometry!==L.id||l.program!==V.id||l.wireframe!==Z)&&(l.geometry=L.id,l.program=V.id,l.wireframe=Z,U=!0)}z.isInstancedMesh===!0&&(U=!0),N!==null&&t.update(N,n.ELEMENT_ARRAY_BUFFER),U&&(T(z,H,V,L),N!==null&&n.bindBuffer(n.ELEMENT_ARRAY_BUFFER,t.get(N).buffer))}function f(){return i.isWebGL2?n.createVertexArray():r.createVertexArrayOES()}function h(z){return i.isWebGL2?n.bindVertexArray(z):r.bindVertexArrayOES(z)}function m(z){return i.isWebGL2?n.deleteVertexArray(z):r.deleteVertexArrayOES(z)}function v(z,H,V){let L=V.wireframe===!0,N=s[z.id];N===void 0&&(N={},s[z.id]=N);let U=N[H.id];U===void 0&&(U={},N[H.id]=U);let Z=U[L];return Z===void 0&&(Z=g(f()),U[L]=Z),Z}function g(z){let H=[],V=[],L=[];for(let N=0;N=0){let X=N[O];if(X===void 0&&(O==="instanceMatrix"&&z.instanceMatrix&&(X=z.instanceMatrix),O==="instanceColor"&&z.instanceColor&&(X=z.instanceColor)),X!==void 0){let Q=X.normalized,a1=X.itemSize,B=t.get(X);if(B===void 0)continue;let M1=B.buffer,u1=B.type,v1=B.bytesPerElement;if(X.isInterleavedBufferAttribute){let n1=X.data,T1=n1.stride,A1=X.offset;if(n1&&n1.isInstancedInterleavedBuffer){for(let C1=0;C10&&n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_FLOAT).precision>0)return"highp";T="mediump"}return T==="mediump"&&n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.MEDIUM_FLOAT).precision>0&&n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let o=typeof WebGL2RenderingContext!="undefined"&&n instanceof WebGL2RenderingContext||typeof WebGL2ComputeRenderingContext!="undefined"&&n instanceof WebGL2ComputeRenderingContext,s=t.precision!==void 0?t.precision:"highp",c=r(s);c!==s&&(console.warn("THREE.WebGLRenderer:",s,"not supported, using",c,"instead."),s=c);let l=o||e.has("WEBGL_draw_buffers"),u=t.logarithmicDepthBuffer===!0,f=n.getParameter(n.MAX_TEXTURE_IMAGE_UNITS),h=n.getParameter(n.MAX_VERTEX_TEXTURE_IMAGE_UNITS),m=n.getParameter(n.MAX_TEXTURE_SIZE),v=n.getParameter(n.MAX_CUBE_MAP_TEXTURE_SIZE),g=n.getParameter(n.MAX_VERTEX_ATTRIBS),x=n.getParameter(n.MAX_VERTEX_UNIFORM_VECTORS),p=n.getParameter(n.MAX_VARYING_VECTORS),d=n.getParameter(n.MAX_FRAGMENT_UNIFORM_VECTORS),A=h>0,b=o||e.has("OES_texture_float"),C=A&&b,E=o?n.getParameter(n.MAX_SAMPLES):0;return{isWebGL2:o,drawBuffers:l,getMaxAnisotropy:a,getMaxPrecision:r,precision:s,logarithmicDepthBuffer:u,maxTextures:f,maxVertexTextures:h,maxTextureSize:m,maxCubemapSize:v,maxAttributes:g,maxVertexUniforms:x,maxVaryings:p,maxFragmentUniforms:d,vertexTextures:A,floatFragmentTextures:b,floatVertexTextures:C,maxSamples:E}}function b5(n){let e=this,t=null,i=0,a=!1,r=!1,o=new ne,s=new n2,c={value:null,needsUpdate:!1};this.uniform=c,this.numPlanes=0,this.numIntersection=0,this.init=function(f,h,m){let v=f.length!==0||h||i!==0||a;return a=h,t=u(f,m,0),i=f.length,v},this.beginShadows=function(){r=!0,u(null)},this.endShadows=function(){r=!1,l()},this.setState=function(f,h,m){let v=f.clippingPlanes,g=f.clipIntersection,x=f.clipShadows,p=n.get(f);if(!a||v===null||v.length===0||r&&!x)r?u(null):l();else{let d=r?0:i,A=d*4,b=p.clippingState||null;c.value=b,b=u(v,h,A,m);for(let C=0;C!==A;++C)b[C]=t[C];p.clippingState=b,this.numIntersection=g?this.numPlanes:0,this.numPlanes+=d}};function l(){c.value!==t&&(c.value=t,c.needsUpdate=i>0),e.numPlanes=i,e.numIntersection=0}function u(f,h,m,v){let g=f!==null?f.length:0,x=null;if(g!==0){if(x=c.value,v!==!0||x===null){let p=m+g*4,d=h.matrixWorldInverse;s.getNormalMatrix(d),(x===null||x.length=0){let X=N[O];if(X===void 0&&(O==="instanceMatrix"&&z.instanceMatrix&&(X=z.instanceMatrix),O==="instanceColor"&&z.instanceColor&&(X=z.instanceColor)),X!==void 0){let Q=X.normalized,a1=X.itemSize,B=t.get(X);if(B===void 0)continue;let M1=B.buffer,u1=B.type,v1=B.bytesPerElement;if(X.isInterleavedBufferAttribute){let n1=X.data,T1=n1.stride,A1=X.offset;if(n1&&n1.isInstancedInterleavedBuffer){for(let C1=0;C10&&n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_FLOAT).precision>0)return"highp";T="mediump"}return T==="mediump"&&n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.MEDIUM_FLOAT).precision>0&&n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let s=typeof WebGL2RenderingContext!="undefined"&&n instanceof WebGL2RenderingContext||typeof WebGL2ComputeRenderingContext!="undefined"&&n instanceof WebGL2ComputeRenderingContext,o=t.precision!==void 0?t.precision:"highp",c=r(o);c!==o&&(console.warn("THREE.WebGLRenderer:",o,"not supported, using",c,"instead."),o=c);let l=s||e.has("WEBGL_draw_buffers"),u=t.logarithmicDepthBuffer===!0,f=n.getParameter(n.MAX_TEXTURE_IMAGE_UNITS),h=n.getParameter(n.MAX_VERTEX_TEXTURE_IMAGE_UNITS),p=n.getParameter(n.MAX_TEXTURE_SIZE),v=n.getParameter(n.MAX_CUBE_MAP_TEXTURE_SIZE),g=n.getParameter(n.MAX_VERTEX_ATTRIBS),x=n.getParameter(n.MAX_VERTEX_UNIFORM_VECTORS),m=n.getParameter(n.MAX_VARYING_VECTORS),d=n.getParameter(n.MAX_FRAGMENT_UNIFORM_VECTORS),A=h>0,b=s||e.has("OES_texture_float"),C=A&&b,E=s?n.getParameter(n.MAX_SAMPLES):0;return{isWebGL2:s,drawBuffers:l,getMaxAnisotropy:a,getMaxPrecision:r,precision:o,logarithmicDepthBuffer:u,maxTextures:f,maxVertexTextures:h,maxTextureSize:p,maxCubemapSize:v,maxAttributes:g,maxVertexUniforms:x,maxVaryings:m,maxFragmentUniforms:d,vertexTextures:A,floatFragmentTextures:b,floatVertexTextures:C,maxSamples:E}}function y5(n){let e=this,t=null,i=0,a=!1,r=!1,s=new ne,o=new n2,c={value:null,needsUpdate:!1};this.uniform=c,this.numPlanes=0,this.numIntersection=0,this.init=function(f,h,p){let v=f.length!==0||h||i!==0||a;return a=h,t=u(f,p,0),i=f.length,v},this.beginShadows=function(){r=!0,u(null)},this.endShadows=function(){r=!1,l()},this.setState=function(f,h,p){let v=f.clippingPlanes,g=f.clipIntersection,x=f.clipShadows,m=n.get(f);if(!a||v===null||v.length===0||r&&!x)r?u(null):l();else{let d=r?0:i,A=d*4,b=m.clippingState||null;c.value=b,b=u(v,h,A,p);for(let C=0;C!==A;++C)b[C]=t[C];m.clippingState=b,this.numIntersection=g?this.numPlanes:0,this.numPlanes+=d}};function l(){c.value!==t&&(c.value=t,c.needsUpdate=i>0),e.numPlanes=i,e.numIntersection=0}function u(f,h,p,v){let g=f!==null?f.length:0,x=null;if(g!==0){if(x=c.value,v!==!0||x===null){let m=p+g*4,d=h.matrixWorldInverse;o.getNormalMatrix(d),(x===null||x.length0){let l=new e0(c.height/2);return l.fromEquirectangularTexture(n,o),e.set(o,l),o.addEventListener("dispose",a),t(l.texture,o.mapping)}else return null}}return o}function a(o){let s=o.target;s.removeEventListener("dispose",a);let c=e.get(s);c!==void 0&&(e.delete(s),c.dispose())}function r(){e=new WeakMap}return{get:i,dispose:r}}var t0=class extends rt{constructor(e=-1,t=1,i=1,a=-1,r=.1,o=2e3){super();this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=i,this.bottom=a,this.near=r,this.far=o,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=e.view===null?null:Object.assign({},e.view),this}setViewOffset(e,t,i,a,r,o){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=i,this.view.offsetY=a,this.view.width=r,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){let e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),i=(this.right+this.left)/2,a=(this.top+this.bottom)/2,r=i-e,o=i+e,s=a+t,c=a-t;if(this.view!==null&&this.view.enabled){let l=(this.right-this.left)/this.view.fullWidth/this.zoom,u=(this.top-this.bottom)/this.view.fullHeight/this.zoom;r+=l*this.view.offsetX,o=r+l*this.view.width,s-=u*this.view.offsetY,c=s-u*this.view.height}this.projectionMatrix.makeOrthographic(r,o,s,c,this.near,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){let t=super.toJSON(e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,this.view!==null&&(t.object.view=Object.assign({},this.view)),t}};t0.prototype.isOrthographicCamera=!0;var ct=class extends se{constructor(e){super(e);this.type="RawShaderMaterial"}};ct.prototype.isRawShaderMaterial=!0;var lt=4,p4=8,Ae=Math.pow(2,p4),C5=[.125,.215,.35,.446,.526,.582],z5=p4-lt+1+C5.length,ut=20,zi=new t0,{_lodPlanes:Gt,_sizeLods:A5,_sigmas:i0}=P9(),w5=new x1,Ai=null,N4=(1+Math.sqrt(5))/2,ht=1/N4,S5=[new k(1,1,1),new k(-1,1,1),new k(1,1,-1),new k(-1,1,-1),new k(0,N4,ht),new k(0,N4,-ht),new k(ht,0,N4),new k(-ht,0,N4),new k(N4,ht,0),new k(-N4,ht,0)],a0=class{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._blurMaterial=I9(ut),this._equirectShader=null,this._cubemapShader=null,this._compileMaterial(this._blurMaterial)}fromScene(e,t=0,i=.1,a=100){Ai=this._renderer.getRenderTarget();let r=this._allocateTargets();return this._sceneToCubeUV(e,i,a,r),t>0&&this._blur(r,0,0,t),this._applyPMREM(r),this._cleanup(r),r}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){this._cubemapShader===null&&(this._cubemapShader=L5(),this._compileMaterial(this._cubemapShader))}compileEquirectangularShader(){this._equirectShader===null&&(this._equirectShader=E5(),this._compileMaterial(this._equirectShader))}dispose(){this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose(),this._cubemapShader!==null&&this._cubemapShader.dispose(),this._equirectShader!==null&&this._equirectShader.dispose();for(let e=0;e2?Ae:0,Ae,Ae),u.setRenderTarget(a),g&&u.render(v,s),u.render(e,s)}v.geometry.dispose(),v.material.dispose(),u.toneMapping=h,u.autoClear=f,e.background=x}_textureToCubeUV(e,t){let i=this._renderer,a=e.mapping===be||e.mapping===Oe;a?(this._cubemapShader===null&&(this._cubemapShader=L5()),this._cubemapShader.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectShader===null&&(this._equirectShader=E5());let r=a?this._cubemapShader:this._equirectShader,o=new u2(Gt[0],r),s=r.uniforms;s.envMap.value=e,a||s.texelSize.value.set(1/e.image.width,1/e.image.height),r0(t,0,0,3*Ae,2*Ae),i.setRenderTarget(t),i.render(o,zi)}_applyPMREM(e){let t=this._renderer,i=t.autoClear;t.autoClear=!1;for(let a=1;aut&&console.warn(`sigmaRadians, ${r}, is too large and will clip, as it requested ${x} samples when the maximum is set to ${ut}`);let p=[],d=0;for(let E=0;Ep4-lt?a-p4+lt:0);r0(t,b,C,3*A,2*A),c.setRenderTarget(t),c.render(f,zi)}};function P9(){let n=[],e=[],t=[],i=p4;for(let a=0;ap4-lt?o=C5[a-p4+lt-1]:a===0&&(o=0),t.push(o);let s=1/(r-1),c=-s/2,l=1+s/2,u=[c,c,l,c,l,l,c,c,l,l,c,l],f=6,h=6,m=3,v=2,g=1,x=new Float32Array(m*h*f),p=new Float32Array(v*h*f),d=new Float32Array(g*h*f);for(let b=0;b2?0:-1,T=[C,E,0,C+2/3,E,0,C+2/3,E+1,0,C,E,0,C+2/3,E+1,0,C,E+1,0];x.set(T,m*h*b),p.set(u,v*h*b);let _=[b,b,b,b,b,b];d.set(_,g*h*b)}let A=new y2;A.setAttribute("position",new b2(x,m)),A.setAttribute("uv",new b2(p,v)),A.setAttribute("faceIndex",new b2(d,g)),n.push(A),i>lt&&i--}return{_lodPlanes:n,_sizeLods:e,_sigmas:t}}function _5(n){let e=new m2(3*Ae,3*Ae,n);return e.texture.mapping=r4,e.texture.name="PMREM.cubeUv",e.scissorTest=!0,e}function r0(n,e,t,i,a){n.viewport.set(e,t,i,a),n.scissor.set(e,t,i,a)}function I9(n){let e=new Float32Array(n),t=new k(0,1,0);return new ct({name:"SphericalGaussianBlur",defines:{n},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:e},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:t}},vertexShader:wi(),fragmentShader:` + `},a=new Ye(5,5,5),r=new se({name:"CubemapFromEquirect",uniforms:$e(i.uniforms),vertexShader:i.vertexShader,fragmentShader:i.fragmentShader,side:P1,blending:U2});r.uniforms.tEquirect.value=t;let s=new l2(a,r),o=t.minFilter;return t.minFilter===r4&&(t.minFilter=t2),new zi(1,10,this).update(e,s),t.minFilter=o,s.geometry.dispose(),s.material.dispose(),this}clear(e,t,i,a){let r=e.getRenderTarget();for(let s=0;s<6;s++)e.setRenderTarget(this,s),e.clear(t,i,a);e.setRenderTarget(r)}};t0.prototype.isWebGLCubeRenderTarget=!0;function C5(n){let e=new WeakMap;function t(s,o){return o===Lt?s.mapping=be:o===Dt&&(s.mapping=ke),s}function i(s){if(s&&s.isTexture&&s.isRenderTargetTexture===!1){let o=s.mapping;if(o===Lt||o===Dt)if(e.has(s)){let c=e.get(s).texture;return t(c,s.mapping)}else{let c=s.image;if(c&&c.height>0){let l=new t0(c.height/2);return l.fromEquirectangularTexture(n,s),e.set(s,l),s.addEventListener("dispose",a),t(l.texture,s.mapping)}else return null}}return s}function a(s){let o=s.target;o.removeEventListener("dispose",a);let c=e.get(o);c!==void 0&&(e.delete(o),c.dispose())}function r(){e=new WeakMap}return{get:i,dispose:r}}var i0=class extends at{constructor(e=-1,t=1,i=1,a=-1,r=.1,s=2e3){super();this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=i,this.bottom=a,this.near=r,this.far=s,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=e.view===null?null:Object.assign({},e.view),this}setViewOffset(e,t,i,a,r,s){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=i,this.view.offsetY=a,this.view.width=r,this.view.height=s,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){let e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),i=(this.right+this.left)/2,a=(this.top+this.bottom)/2,r=i-e,s=i+e,o=a+t,c=a-t;if(this.view!==null&&this.view.enabled){let l=(this.right-this.left)/this.view.fullWidth/this.zoom,u=(this.top-this.bottom)/this.view.fullHeight/this.zoom;r+=l*this.view.offsetX,s=r+l*this.view.width,o-=u*this.view.offsetY,c=o-u*this.view.height}this.projectionMatrix.makeOrthographic(r,s,o,c,this.near,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){let t=super.toJSON(e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,this.view!==null&&(t.object.view=Object.assign({},this.view)),t}};i0.prototype.isOrthographicCamera=!0;var ot=class extends se{constructor(e){super(e);this.type="RawShaderMaterial"}};ot.prototype.isRawShaderMaterial=!0;var ct=4,d4=8,Ae=Math.pow(2,d4),z5=[.125,.215,.35,.446,.526,.582],A5=d4-ct+1+z5.length,lt=20,Ai=new i0,{_lodPlanes:Gt,_sizeLods:w5,_sigmas:a0}=I9(),S5=new x1,wi=null,V4=(1+Math.sqrt(5))/2,ut=1/V4,_5=[new k(1,1,1),new k(-1,1,1),new k(1,1,-1),new k(-1,1,-1),new k(0,V4,ut),new k(0,V4,-ut),new k(ut,0,V4),new k(-ut,0,V4),new k(V4,ut,0),new k(-V4,ut,0)],r0=class{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._blurMaterial=k9(lt),this._equirectShader=null,this._cubemapShader=null,this._compileMaterial(this._blurMaterial)}fromScene(e,t=0,i=.1,a=100){wi=this._renderer.getRenderTarget();let r=this._allocateTargets();return this._sceneToCubeUV(e,i,a,r),t>0&&this._blur(r,0,0,t),this._applyPMREM(r),this._cleanup(r),r}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){this._cubemapShader===null&&(this._cubemapShader=D5(),this._compileMaterial(this._cubemapShader))}compileEquirectangularShader(){this._equirectShader===null&&(this._equirectShader=L5(),this._compileMaterial(this._equirectShader))}dispose(){this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose(),this._cubemapShader!==null&&this._cubemapShader.dispose(),this._equirectShader!==null&&this._equirectShader.dispose();for(let e=0;e2?Ae:0,Ae,Ae),u.setRenderTarget(a),g&&u.render(v,o),u.render(e,o)}v.geometry.dispose(),v.material.dispose(),u.toneMapping=h,u.autoClear=f,e.background=x}_textureToCubeUV(e,t){let i=this._renderer,a=e.mapping===be||e.mapping===ke;a?(this._cubemapShader===null&&(this._cubemapShader=D5()),this._cubemapShader.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectShader===null&&(this._equirectShader=L5());let r=a?this._cubemapShader:this._equirectShader,s=new l2(Gt[0],r),o=r.uniforms;o.envMap.value=e,a||o.texelSize.value.set(1/e.image.width,1/e.image.height),n0(t,0,0,3*Ae,2*Ae),i.setRenderTarget(t),i.render(s,Ai)}_applyPMREM(e){let t=this._renderer,i=t.autoClear;t.autoClear=!1;for(let a=1;alt&&console.warn(`sigmaRadians, ${r}, is too large and will clip, as it requested ${x} samples when the maximum is set to ${lt}`);let m=[],d=0;for(let E=0;Ed4-ct?a-d4+ct:0);n0(t,b,C,3*A,2*A),c.setRenderTarget(t),c.render(f,Ai)}};function I9(){let n=[],e=[],t=[],i=d4;for(let a=0;ad4-ct?s=z5[a-d4+ct-1]:a===0&&(s=0),t.push(s);let o=1/(r-1),c=-o/2,l=1+o/2,u=[c,c,l,c,l,l,c,c,l,l,c,l],f=6,h=6,p=3,v=2,g=1,x=new Float32Array(p*h*f),m=new Float32Array(v*h*f),d=new Float32Array(g*h*f);for(let b=0;b2?0:-1,T=[C,E,0,C+2/3,E,0,C+2/3,E+1,0,C,E,0,C+2/3,E+1,0,C,E+1,0];x.set(T,p*h*b),m.set(u,v*h*b);let _=[b,b,b,b,b,b];d.set(_,g*h*b)}let A=new b2;A.setAttribute("position",new M2(x,p)),A.setAttribute("uv",new M2(m,v)),A.setAttribute("faceIndex",new M2(d,g)),n.push(A),i>ct&&i--}return{_lodPlanes:n,_sizeLods:e,_sigmas:t}}function E5(n){let e=new p2(3*Ae,3*Ae,n);return e.texture.mapping=a4,e.texture.name="PMREM.cubeUv",e.scissorTest=!0,e}function n0(n,e,t,i,a){n.viewport.set(e,t,i,a),n.scissor.set(e,t,i,a)}function k9(n){let e=new Float32Array(n),t=new k(0,1,0);return new ot({name:"SphericalGaussianBlur",defines:{n},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:e},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:t}},vertexShader:Si(),fragmentShader:` precision mediump float; precision mediump int; @@ -5538,7 +5538,7 @@ void main() { } } - `,blending:U2,depthTest:!1,depthWrite:!1})}function E5(){let n=new z1(1,1);return new ct({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null},texelSize:{value:n}},vertexShader:wi(),fragmentShader:` + `,blending:U2,depthTest:!1,depthWrite:!1})}function L5(){let n=new z1(1,1);return new ot({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null},texelSize:{value:n}},vertexShader:Si(),fragmentShader:` precision mediump float; precision mediump int; @@ -5572,7 +5572,7 @@ void main() { gl_FragColor.rgb = mix( tm, bm, f.y ); } - `,blending:U2,depthTest:!1,depthWrite:!1})}function L5(){return new ct({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:wi(),fragmentShader:` + `,blending:U2,depthTest:!1,depthWrite:!1})}function D5(){return new ot({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:Si(),fragmentShader:` precision mediump float; precision mediump int; @@ -5588,7 +5588,7 @@ void main() { gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) ); } - `,blending:U2,depthTest:!1,depthWrite:!1})}function wi(){return` + `,blending:U2,depthTest:!1,depthWrite:!1})}function Si(){return` precision mediump float; precision mediump int; @@ -5645,43 +5645,43 @@ void main() { gl_Position = vec4( position, 1.0 ); } - `}function D5(n){let e=new WeakMap,t=null;function i(s){if(s&&s.isTexture){let c=s.mapping,l=c===Lt||c===Dt,u=c===be||c===Oe;if(l||u)if(s.isRenderTargetTexture&&s.needsPMREMUpdate===!0){s.needsPMREMUpdate=!1;let f=e.get(s);return t===null&&(t=new a0(n)),f=l?t.fromEquirectangular(s,f):t.fromCubemap(s,f),e.set(s,f),f.texture}else{if(e.has(s))return e.get(s).texture;{let f=s.image;if(l&&f&&f.height>0||u&&f&&a(f)){t===null&&(t=new a0(n));let h=l?t.fromEquirectangular(s):t.fromCubemap(s);return e.set(s,h),s.addEventListener("dispose",r),h.texture}else return null}}}return s}function a(s){let c=0,l=6;for(let u=0;ue.maxTextureSize&&(_=Math.ceil(T/e.maxTextureSize),T=e.maxTextureSize);let P=new Float32Array(T*_*4*v),F=new ft(P,T,_,v);F.format=W1,F.type=Q2,F.needsUpdate=!0;let M=E*4;for(let z=0;z0)return n;let a=e*t,r=O5[a];if(r===void 0&&(r=new Float32Array(a),O5[a]=r),e!==0){i.toArray(r,0);for(let o=1,s=0;o!==e;++o)s+=t,n[o].toArray(r,s)}return r}function w2(n,e){if(n.length!==e.length)return!1;for(let t=0,i=n.length;t0||u&&f&&a(f)){t===null&&(t=new r0(n));let h=l?t.fromEquirectangular(o):t.fromCubemap(o);return e.set(o,h),o.addEventListener("dispose",r),h.texture}else return null}}}return o}function a(o){let c=0,l=6;for(let u=0;ue.maxTextureSize&&(_=Math.ceil(T/e.maxTextureSize),T=e.maxTextureSize);let P=new Float32Array(T*_*4*v),F=new ht(P,T,_,v);F.format=W1,F.type=Q2,F.needsUpdate=!0;let M=E*4;for(let z=0;z0)return n;let a=e*t,r=G5[a];if(r===void 0&&(r=new Float32Array(a),G5[a]=r),e!==0){i.toArray(r,0);for(let s=1,o=0;s!==e;++s)o+=t,n[s].toArray(r,o)}return r}function A2(n,e){if(n.length!==e.length)return!1;for(let t=0,i=n.length;t/gm;function Ei(n){return n.replace(Pu,Iu)}function Iu(n,e){let t=S1[e];if(t===void 0)throw new Error("Can not resolve #include <"+e+">");return Ei(t)}var ku=/#pragma unroll_loop[\s]+?for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g,Uu=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function Q5(n){return n.replace(Uu,eo).replace(ku,Ou)}function Ou(n,e,t,i){return console.warn("WebGLProgram: #pragma unroll_loop shader syntax is deprecated. Please use #pragma unroll_loop_start syntax instead."),eo(n,e,t,i)}function eo(n,e,t,i){let a="";for(let r=parseInt(e);r/gm;function Li(n){return n.replace(Iu,ku)}function ku(n,e){let t=_1[e];if(t===void 0)throw new Error("Can not resolve #include <"+e+">");return Li(t)}var Uu=/#pragma unroll_loop[\s]+?for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g,Ou=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function eo(n){return n.replace(Ou,to).replace(Uu,Gu)}function Gu(n,e,t,i){return console.warn("WebGLProgram: #pragma unroll_loop shader syntax is deprecated. Please use #pragma unroll_loop_start syntax instead."),to(n,e,t,i)}function to(n,e,t,i){let a="";for(let r=parseInt(e);r0&&(g+=` -`),x=[h,m].filter(qt).join(` +`),x=[h,p].filter(qt).join(` `),x.length>0&&(x+=` -`)):(g=[to(t),"#define SHADER_NAME "+t.shaderName,m,t.instancing?"#define USE_INSTANCING":"",t.instancingColor?"#define USE_INSTANCING_COLOR":"",t.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define MAX_BONES "+t.maxBones,t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.map?"#define USE_MAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+u:"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMap&&t.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",t.normalMap&&t.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.displacementMap&&t.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularIntensityMap?"#define USE_SPECULARINTENSITYMAP":"",t.specularColorMap?"#define USE_SPECULARCOLORMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.sheenColorMap?"#define USE_SHEENCOLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEENROUGHNESSMAP":"",t.vertexTangents?"#define USE_TANGENT":"",t.vertexColors?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUvs?"#define USE_UV":"",t.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",t.flatShading?"#define FLAT_SHADED":"",t.skinning?"#define USE_SKINNING":"",t.useVertexTexture?"#define BONE_TEXTURE":"",t.morphTargets?"#define USE_MORPHTARGETS":"",t.morphNormals&&t.flatShading===!1?"#define USE_MORPHNORMALS":"",t.morphTargets&&t.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",t.morphTargets&&t.isWebGL2?"#define MORPHTARGETS_COUNT "+t.morphTargetsCount:"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+c:"",t.sizeAttenuation?"#define USE_SIZEATTENUATION":"",t.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",t.logarithmicDepthBuffer&&t.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING"," attribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR"," attribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_TANGENT"," attribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )"," attribute vec4 color;","#elif defined( USE_COLOR )"," attribute vec3 color;","#endif","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )"," attribute vec3 morphTarget0;"," attribute vec3 morphTarget1;"," attribute vec3 morphTarget2;"," attribute vec3 morphTarget3;"," #ifdef USE_MORPHNORMALS"," attribute vec3 morphNormal0;"," attribute vec3 morphNormal1;"," attribute vec3 morphNormal2;"," attribute vec3 morphNormal3;"," #else"," attribute vec3 morphTarget4;"," attribute vec3 morphTarget5;"," attribute vec3 morphTarget6;"," attribute vec3 morphTarget7;"," #endif","#endif","#ifdef USE_SKINNING"," attribute vec4 skinIndex;"," attribute vec4 skinWeight;","#endif",` +`)):(g=[io(t),"#define SHADER_NAME "+t.shaderName,p,t.instancing?"#define USE_INSTANCING":"",t.instancingColor?"#define USE_INSTANCING_COLOR":"",t.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define MAX_BONES "+t.maxBones,t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.map?"#define USE_MAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+u:"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMap&&t.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",t.normalMap&&t.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.displacementMap&&t.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularIntensityMap?"#define USE_SPECULARINTENSITYMAP":"",t.specularColorMap?"#define USE_SPECULARCOLORMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.sheenColorMap?"#define USE_SHEENCOLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEENROUGHNESSMAP":"",t.vertexTangents?"#define USE_TANGENT":"",t.vertexColors?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUvs?"#define USE_UV":"",t.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",t.flatShading?"#define FLAT_SHADED":"",t.skinning?"#define USE_SKINNING":"",t.useVertexTexture?"#define BONE_TEXTURE":"",t.morphTargets?"#define USE_MORPHTARGETS":"",t.morphNormals&&t.flatShading===!1?"#define USE_MORPHNORMALS":"",t.morphTargets&&t.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",t.morphTargets&&t.isWebGL2?"#define MORPHTARGETS_COUNT "+t.morphTargetsCount:"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+c:"",t.sizeAttenuation?"#define USE_SIZEATTENUATION":"",t.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",t.logarithmicDepthBuffer&&t.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING"," attribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR"," attribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_TANGENT"," attribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )"," attribute vec4 color;","#elif defined( USE_COLOR )"," attribute vec3 color;","#endif","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )"," attribute vec3 morphTarget0;"," attribute vec3 morphTarget1;"," attribute vec3 morphTarget2;"," attribute vec3 morphTarget3;"," #ifdef USE_MORPHNORMALS"," attribute vec3 morphNormal0;"," attribute vec3 morphNormal1;"," attribute vec3 morphNormal2;"," attribute vec3 morphNormal3;"," #else"," attribute vec3 morphTarget4;"," attribute vec3 morphTarget5;"," attribute vec3 morphTarget6;"," attribute vec3 morphTarget7;"," #endif","#endif","#ifdef USE_SKINNING"," attribute vec4 skinIndex;"," attribute vec4 skinWeight;","#endif",` `].filter(qt).join(` -`),x=[h,to(t),"#define SHADER_NAME "+t.shaderName,m,t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.map?"#define USE_MAP":"",t.matcap?"#define USE_MATCAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+l:"",t.envMap?"#define "+u:"",t.envMap?"#define "+f:"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMap&&t.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",t.normalMap&&t.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",t.clearcoat?"#define USE_CLEARCOAT":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularIntensityMap?"#define USE_SPECULARINTENSITYMAP":"",t.specularColorMap?"#define USE_SPECULARCOLORMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.alphaTest?"#define USE_ALPHATEST":"",t.sheen?"#define USE_SHEEN":"",t.sheenColorMap?"#define USE_SHEENCOLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEENROUGHNESSMAP":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",t.vertexTangents?"#define USE_TANGENT":"",t.vertexColors||t.instancingColor?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUvs?"#define USE_UV":"",t.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",t.gradientMap?"#define USE_GRADIENTMAP":"",t.flatShading?"#define FLAT_SHADED":"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+c:"",t.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",t.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",t.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",t.logarithmicDepthBuffer&&t.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"",(t.extensionShaderTextureLOD||t.envMap)&&t.rendererExtensionShaderTextureLod?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",t.toneMapping!==O2?"#define TONE_MAPPING":"",t.toneMapping!==O2?S1.tonemapping_pars_fragment:"",t.toneMapping!==O2?Nu("toneMapping",t.toneMapping):"",t.dithering?"#define DITHERING":"",t.alphaWrite?"":"#define OPAQUE",S1.encodings_pars_fragment,Vu("linearToOutputTexel",t.outputEncoding),t.depthPacking?"#define DEPTH_PACKING "+t.depthPacking:"",` +`),x=[h,io(t),"#define SHADER_NAME "+t.shaderName,p,t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.map?"#define USE_MAP":"",t.matcap?"#define USE_MATCAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+l:"",t.envMap?"#define "+u:"",t.envMap?"#define "+f:"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMap&&t.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",t.normalMap&&t.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",t.clearcoat?"#define USE_CLEARCOAT":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularIntensityMap?"#define USE_SPECULARINTENSITYMAP":"",t.specularColorMap?"#define USE_SPECULARCOLORMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.alphaTest?"#define USE_ALPHATEST":"",t.sheen?"#define USE_SHEEN":"",t.sheenColorMap?"#define USE_SHEENCOLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEENROUGHNESSMAP":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",t.vertexTangents?"#define USE_TANGENT":"",t.vertexColors||t.instancingColor?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUvs?"#define USE_UV":"",t.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",t.gradientMap?"#define USE_GRADIENTMAP":"",t.flatShading?"#define FLAT_SHADED":"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+c:"",t.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",t.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",t.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",t.logarithmicDepthBuffer&&t.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"",(t.extensionShaderTextureLOD||t.envMap)&&t.rendererExtensionShaderTextureLod?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",t.toneMapping!==O2?"#define TONE_MAPPING":"",t.toneMapping!==O2?_1.tonemapping_pars_fragment:"",t.toneMapping!==O2?Ru("toneMapping",t.toneMapping):"",t.dithering?"#define DITHERING":"",t.alphaWrite?"":"#define OPAQUE",_1.encodings_pars_fragment,Nu("linearToOutputTexel",t.outputEncoding),t.depthPacking?"#define DEPTH_PACKING "+t.depthPacking:"",` `].filter(qt).join(` -`)),o=Ei(o),o=K5(o,t),o=J5(o,t),s=Ei(s),s=K5(s,t),s=J5(s,t),o=Q5(o),s=Q5(s),t.isWebGL2&&t.isRawShaderMaterial!==!0&&(p=`#version 300 es +`)),s=Li(s),s=J5(s,t),s=Q5(s,t),o=Li(o),o=J5(o,t),o=Q5(o,t),s=eo(s),o=eo(o),t.isWebGL2&&t.isRawShaderMaterial!==!0&&(m=`#version 300 es `,g=["precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join(` `)+` -`+g,x=["#define varying in",t.glslVersion===N3?"":"layout(location = 0) out highp vec4 pc_fragColor;",t.glslVersion===N3?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join(` +`+g,x=["#define varying in",t.glslVersion===R3?"":"layout(location = 0) out highp vec4 pc_fragColor;",t.glslVersion===R3?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join(` `)+` -`+x);let d=p+g+o,A=p+x+s,b=_i(a,a.VERTEX_SHADER,d),C=_i(a,a.FRAGMENT_SHADER,A);if(a.attachShader(v,b),a.attachShader(v,C),t.index0AttributeName!==void 0?a.bindAttribLocation(v,0,t.index0AttributeName):t.morphTargets===!0&&a.bindAttribLocation(v,0,"position"),a.linkProgram(v),n.debug.checkShaderErrors){let _=a.getProgramInfoLog(v).trim(),P=a.getShaderInfoLog(b).trim(),F=a.getShaderInfoLog(C).trim(),M=!0,D=!0;if(a.getProgramParameter(v,a.LINK_STATUS)===!1){M=!1;let z=$5(a,b,"vertex"),H=$5(a,C,"fragment");console.error("THREE.WebGLProgram: Shader Error "+a.getError()+" - VALIDATE_STATUS "+a.getProgramParameter(v,a.VALIDATE_STATUS)+` +`+x);let d=m+g+s,A=m+x+o,b=Ei(a,a.VERTEX_SHADER,d),C=Ei(a,a.FRAGMENT_SHADER,A);if(a.attachShader(v,b),a.attachShader(v,C),t.index0AttributeName!==void 0?a.bindAttribLocation(v,0,t.index0AttributeName):t.morphTargets===!0&&a.bindAttribLocation(v,0,"position"),a.linkProgram(v),n.debug.checkShaderErrors){let _=a.getProgramInfoLog(v).trim(),P=a.getShaderInfoLog(b).trim(),F=a.getShaderInfoLog(C).trim(),M=!0,D=!0;if(a.getProgramParameter(v,a.LINK_STATUS)===!1){M=!1;let z=K5(a,b,"vertex"),H=K5(a,C,"fragment");console.error("THREE.WebGLProgram: Shader Error "+a.getError()+" - VALIDATE_STATUS "+a.getProgramParameter(v,a.VALIDATE_STATUS)+` Program Info Log: `+_+` `+z+` -`+H)}else _!==""?console.warn("THREE.WebGLProgram: Program Info Log:",_):(P===""||F==="")&&(D=!1);D&&(this.diagnostics={runnable:M,programLog:_,vertexShader:{log:P,prefix:g},fragmentShader:{log:F,prefix:x}})}a.deleteShader(b),a.deleteShader(C);let E;this.getUniforms=function(){return E===void 0&&(E=new we(a,v)),E};let T;return this.getAttributes=function(){return T===void 0&&(T=Bu(a,v)),T},this.destroy=function(){i.releaseStatesOfProgram(this),a.deleteProgram(v),this.program=void 0},this.name=t.shaderName,this.id=Du++,this.cacheKey=e,this.usedTimes=1,this.program=v,this.vertexShader=b,this.fragmentShader=C,this}var Xu=0,Li=class{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){let t=e.vertexShader,i=e.fragmentShader,a=this._getShaderStage(t),r=this._getShaderStage(i),o=this._getShaderCacheForMaterial(e);return o.has(a)===!1&&(o.add(a),a.usedTimes++),o.has(r)===!1&&(o.add(r),r.usedTimes++),this}remove(e){let t=this.materialCache.get(e);for(let i of t)i.usedTimes--,i.usedTimes===0&&this.shaderCache.delete(i);return this.materialCache.delete(e),this}getVertexShaderID(e){return this._getShaderStage(e.vertexShader).id}getFragmentShaderID(e){return this._getShaderStage(e.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){let t=this.materialCache;return t.has(e)===!1&&t.set(e,new Set),t.get(e)}_getShaderStage(e){let t=this.shaderCache;if(t.has(e)===!1){let i=new ao;t.set(e,i)}return t.get(e)}},ao=class{constructor(){this.id=Xu++,this.usedTimes=0}};function ro(n,e,t,i,a,r,o){let s=new Pt,c=new Li,l=[],u=a.isWebGL2,f=a.logarithmicDepthBuffer,h=a.floatVertexTextures,m=a.maxVertexUniforms,v=a.vertexTextures,g=a.precision,x={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function p(M){let z=M.skeleton.bones;if(h)return 1024;{let V=Math.floor((m-20)/4),L=Math.min(V,z.length);return L0,u1=M.clearcoat>0;return{isWebGL2:u,shaderID:Z,shaderName:M.type,vertexShader:W,fragmentShader:X,defines:M.defines,customVertexShaderID:Q,customFragmentShaderID:a1,isRawShaderMaterial:M.isRawShaderMaterial===!0,glslVersion:M.glslVersion,precision:g,instancing:V.isInstancedMesh===!0,instancingColor:V.isInstancedMesh===!0&&V.instanceColor!==null,supportsVertexTextures:v,outputEncoding:B===null?n.outputEncoding:B.isXRRenderTarget===!0?B.texture.encoding:F2,map:!!M.map,matcap:!!M.matcap,envMap:!!U,envMapMode:U&&U.mapping,envMapCubeUV:!!U&&(U.mapping===r4||U.mapping===Tt),lightMap:!!M.lightMap,aoMap:!!M.aoMap,emissiveMap:!!M.emissiveMap,bumpMap:!!M.bumpMap,normalMap:!!M.normalMap,objectSpaceNormalMap:M.normalMapType===w8,tangentSpaceNormalMap:M.normalMapType===H6,decodeVideoTexture:!!M.map&&M.map.isVideoTexture===!0&&M.map.encoding===I1,clearcoat:u1,clearcoatMap:u1&&!!M.clearcoatMap,clearcoatRoughnessMap:u1&&!!M.clearcoatRoughnessMap,clearcoatNormalMap:u1&&!!M.clearcoatNormalMap,displacementMap:!!M.displacementMap,roughnessMap:!!M.roughnessMap,metalnessMap:!!M.metalnessMap,specularMap:!!M.specularMap,specularIntensityMap:!!M.specularIntensityMap,specularColorMap:!!M.specularColorMap,alphaMap:!!M.alphaMap,alphaTest:M1,alphaWrite:M.alphaWrite||M.transparent,gradientMap:!!M.gradientMap,sheen:M.sheen>0,sheenColorMap:!!M.sheenColorMap,sheenRoughnessMap:!!M.sheenRoughnessMap,transmission:M.transmission>0,transmissionMap:!!M.transmissionMap,thicknessMap:!!M.thicknessMap,combine:M.combine,vertexTangents:!!M.normalMap&&!!V.geometry&&!!V.geometry.attributes.tangent,vertexColors:M.vertexColors,vertexAlphas:M.vertexColors===!0&&!!V.geometry&&!!V.geometry.attributes.color&&V.geometry.attributes.color.itemSize===4,vertexUvs:!!M.map||!!M.bumpMap||!!M.normalMap||!!M.specularMap||!!M.alphaMap||!!M.emissiveMap||!!M.roughnessMap||!!M.metalnessMap||!!M.clearcoatMap||!!M.clearcoatRoughnessMap||!!M.clearcoatNormalMap||!!M.displacementMap||!!M.transmissionMap||!!M.thicknessMap||!!M.specularIntensityMap||!!M.specularColorMap||!!M.sheenColorMap||!!M.sheenRoughnessMap,uvsVertexOnly:!(!!M.map||!!M.bumpMap||!!M.normalMap||!!M.specularMap||!!M.alphaMap||!!M.emissiveMap||!!M.roughnessMap||!!M.metalnessMap||!!M.clearcoatNormalMap||M.transmission>0||!!M.transmissionMap||!!M.thicknessMap||!!M.specularIntensityMap||!!M.specularColorMap||M.sheen>0||!!M.sheenColorMap||!!M.sheenRoughnessMap)&&!!M.displacementMap,fog:!!L,useFog:M.fog,fogExp2:L&&L.isFogExp2,flatShading:!!M.flatShading,sizeAttenuation:M.sizeAttenuation,logarithmicDepthBuffer:f,skinning:V.isSkinnedMesh===!0&&O>0,maxBones:O,useVertexTexture:h,morphTargets:!!V.geometry&&!!V.geometry.morphAttributes.position,morphNormals:!!V.geometry&&!!V.geometry.morphAttributes.normal,morphTargetsCount:!!V.geometry&&!!V.geometry.morphAttributes.position?V.geometry.morphAttributes.position.length:0,numDirLights:D.directional.length,numPointLights:D.point.length,numSpotLights:D.spot.length,numRectAreaLights:D.rectArea.length,numHemiLights:D.hemi.length,numDirLightShadows:D.directionalShadowMap.length,numPointLightShadows:D.pointShadowMap.length,numSpotLightShadows:D.spotShadowMap.length,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:M.dithering,shadowMapEnabled:n.shadowMap.enabled&&z.length>0,shadowMapType:n.shadowMap.type,toneMapping:M.toneMapped?n.toneMapping:O2,physicallyCorrectLights:n.physicallyCorrectLights,premultipliedAlpha:M.premultipliedAlpha,doubleSided:M.side===J2,flipSided:M.side===P1,depthPacking:M.depthPacking!==void 0?M.depthPacking:!1,index0AttributeName:M.index0AttributeName,extensionDerivatives:M.extensions&&M.extensions.derivatives,extensionFragDepth:M.extensions&&M.extensions.fragDepth,extensionDrawBuffers:M.extensions&&M.extensions.drawBuffers,extensionShaderTextureLOD:M.extensions&&M.extensions.shaderTextureLOD,rendererExtensionFragDepth:u||i.has("EXT_frag_depth"),rendererExtensionDrawBuffers:u||i.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:u||i.has("EXT_shader_texture_lod"),customProgramCacheKey:M.customProgramCacheKey()}}function A(M){let D=[];if(M.shaderID?D.push(M.shaderID):(D.push(M.customVertexShaderID),D.push(M.customFragmentShaderID)),M.defines!==void 0)for(let z in M.defines)D.push(z),D.push(M.defines[z]);return M.isRawShaderMaterial===!1&&(b(D,M),C(D,M),D.push(n.outputEncoding)),D.push(M.customProgramCacheKey),D.join()}function b(M,D){M.push(D.precision),M.push(D.outputEncoding),M.push(D.envMapMode),M.push(D.combine),M.push(D.vertexUvs),M.push(D.fogExp2),M.push(D.sizeAttenuation),M.push(D.maxBones),M.push(D.morphTargetsCount),M.push(D.numDirLights),M.push(D.numPointLights),M.push(D.numSpotLights),M.push(D.numHemiLights),M.push(D.numRectAreaLights),M.push(D.numDirLightShadows),M.push(D.numPointLightShadows),M.push(D.numSpotLightShadows),M.push(D.shadowMapType),M.push(D.toneMapping),M.push(D.numClippingPlanes),M.push(D.numClipIntersection),M.push(D.alphaWrite)}function C(M,D){s.disableAll(),D.isWebGL2&&s.enable(0),D.supportsVertexTextures&&s.enable(1),D.instancing&&s.enable(2),D.instancingColor&&s.enable(3),D.map&&s.enable(4),D.matcap&&s.enable(5),D.envMap&&s.enable(6),D.envMapCubeUV&&s.enable(7),D.lightMap&&s.enable(8),D.aoMap&&s.enable(9),D.emissiveMap&&s.enable(10),D.bumpMap&&s.enable(11),D.normalMap&&s.enable(12),D.objectSpaceNormalMap&&s.enable(13),D.tangentSpaceNormalMap&&s.enable(14),D.clearcoat&&s.enable(15),D.clearcoatMap&&s.enable(16),D.clearcoatRoughnessMap&&s.enable(17),D.clearcoatNormalMap&&s.enable(18),D.displacementMap&&s.enable(19),D.specularMap&&s.enable(20),D.roughnessMap&&s.enable(21),D.metalnessMap&&s.enable(22),D.gradientMap&&s.enable(23),D.alphaMap&&s.enable(24),D.alphaTest&&s.enable(25),D.vertexColors&&s.enable(26),D.vertexAlphas&&s.enable(27),D.vertexUvs&&s.enable(28),D.vertexTangents&&s.enable(29),D.uvsVertexOnly&&s.enable(30),D.fog&&s.enable(31),M.push(s.mask),s.disableAll(),D.useFog&&s.enable(0),D.flatShading&&s.enable(1),D.logarithmicDepthBuffer&&s.enable(2),D.skinning&&s.enable(3),D.useVertexTexture&&s.enable(4),D.morphTargets&&s.enable(5),D.morphNormals&&s.enable(6),D.premultipliedAlpha&&s.enable(7),D.shadowMapEnabled&&s.enable(8),D.physicallyCorrectLights&&s.enable(9),D.doubleSided&&s.enable(10),D.flipSided&&s.enable(11),D.depthPacking&&s.enable(12),D.dithering&&s.enable(13),D.specularIntensityMap&&s.enable(14),D.specularColorMap&&s.enable(15),D.transmission&&s.enable(16),D.transmissionMap&&s.enable(17),D.thicknessMap&&s.enable(18),D.sheen&&s.enable(19),D.sheenColorMap&&s.enable(20),D.sheenRoughnessMap&&s.enable(21),D.decodeVideoTexture&&s.enable(22),M.push(s.mask)}function E(M){let D=x[M.type],z;if(D){let H=W2[D];z=k8.clone(H.uniforms)}else z=M.uniforms;return z}function T(M,D){let z;for(let H=0,V=l.length;H0?i.push(p):m.transparent===!0?a.push(p):t.push(p)}function c(f,h,m,v,g,x){let p=o(f,h,m,v,g,x);m.transmission>0?i.unshift(p):m.transparent===!0?a.unshift(p):t.unshift(p)}function l(f,h){t.length>1&&t.sort(f||Zu),i.length>1&&i.sort(h||so),a.length>1&&a.sort(h||so)}function u(){for(let f=e,h=n.length;f=n.get(i).length?(r=new oo,n.get(i).push(r)):r=n.get(i)[a],r}function t(){n=new WeakMap}return{get:e,dispose:t}}function Yu(){let n={};return{get:function(e){if(n[e.id]!==void 0)return n[e.id];let t;switch(e.type){case"DirectionalLight":t={direction:new k,color:new x1};break;case"SpotLight":t={position:new k,direction:new k,color:new x1,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":t={position:new k,color:new x1,distance:0,decay:0};break;case"HemisphereLight":t={direction:new k,skyColor:new x1,groundColor:new x1};break;case"RectAreaLight":t={color:new x1,position:new k,halfWidth:new k,halfHeight:new k};break}return n[e.id]=t,t}}}function $u(){let n={};return{get:function(e){if(n[e.id]!==void 0)return n[e.id];let t;switch(e.type){case"DirectionalLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new z1};break;case"SpotLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new z1};break;case"PointLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new z1,shadowCameraNear:1,shadowCameraFar:1e3};break}return n[e.id]=t,t}}}var Ku=0;function Ju(n,e){return(e.castShadow?1:0)-(n.castShadow?1:0)}function lo(n,e){let t=new Yu,i=$u(),a={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadow:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[]};for(let u=0;u<9;u++)a.probe.push(new k);let r=new k,o=new k1,s=new k1;function c(u,f){let h=0,m=0,v=0;for(let P=0;P<9;P++)a.probe[P].set(0,0,0);let g=0,x=0,p=0,d=0,A=0,b=0,C=0,E=0;u.sort(Ju);let T=f!==!0?Math.PI:1;for(let P=0,F=u.length;P0&&(e.isWebGL2?(a.rectAreaLTC1=e1.LTC_FLOAT_1,a.rectAreaLTC2=e1.LTC_FLOAT_2):n.has("OES_texture_float_linear")===!0?(a.rectAreaLTC1=e1.LTC_FLOAT_1,a.rectAreaLTC2=e1.LTC_FLOAT_2):n.has("OES_texture_half_float_linear")===!0?(a.rectAreaLTC1=e1.LTC_HALF_1,a.rectAreaLTC2=e1.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),a.ambient[0]=h,a.ambient[1]=m,a.ambient[2]=v;let _=a.hash;(_.directionalLength!==g||_.pointLength!==x||_.spotLength!==p||_.rectAreaLength!==d||_.hemiLength!==A||_.numDirectionalShadows!==b||_.numPointShadows!==C||_.numSpotShadows!==E)&&(a.directional.length=g,a.spot.length=p,a.rectArea.length=d,a.point.length=x,a.hemi.length=A,a.directionalShadow.length=b,a.directionalShadowMap.length=b,a.pointShadow.length=C,a.pointShadowMap.length=C,a.spotShadow.length=E,a.spotShadowMap.length=E,a.directionalShadowMatrix.length=b,a.pointShadowMatrix.length=C,a.spotShadowMatrix.length=E,_.directionalLength=g,_.pointLength=x,_.spotLength=p,_.rectAreaLength=d,_.hemiLength=A,_.numDirectionalShadows=b,_.numPointShadows=C,_.numSpotShadows=E,a.version=Ku++)}function l(u,f){let h=0,m=0,v=0,g=0,x=0,p=f.matrixWorldInverse;for(let d=0,A=u.length;d=t.get(r).length?(s=new uo(n,e),t.get(r).push(s)):s=t.get(r)[o],s}function a(){t=new WeakMap}return{get:i,dispose:a}}var o0=class extends H2{constructor(e){super();this.type="MeshDepthMaterial",this.depthPacking=z8,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}};o0.prototype.isMeshDepthMaterial=!0;var c0=class extends H2{constructor(e){super();this.type="MeshDistanceMaterial",this.referencePosition=new k,this.nearDistance=1,this.farDistance=1e3,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.fog=!1,this.setValues(e)}copy(e){return super.copy(e),this.referencePosition.copy(e.referencePosition),this.nearDistance=e.nearDistance,this.farDistance=e.farDistance,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}};c0.prototype.isMeshDistanceMaterial=!0;var fo=` +`+H)}else _!==""?console.warn("THREE.WebGLProgram: Program Info Log:",_):(P===""||F==="")&&(D=!1);D&&(this.diagnostics={runnable:M,programLog:_,vertexShader:{log:P,prefix:g},fragmentShader:{log:F,prefix:x}})}a.deleteShader(b),a.deleteShader(C);let E;this.getUniforms=function(){return E===void 0&&(E=new we(a,v)),E};let T;return this.getAttributes=function(){return T===void 0&&(T=Pu(a,v)),T},this.destroy=function(){i.releaseStatesOfProgram(this),a.deleteProgram(v),this.program=void 0},this.name=t.shaderName,this.id=Tu++,this.cacheKey=e,this.usedTimes=1,this.program=v,this.vertexShader=b,this.fragmentShader=C,this}var Zu=0,Di=class{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){let t=e.vertexShader,i=e.fragmentShader,a=this._getShaderStage(t),r=this._getShaderStage(i),s=this._getShaderCacheForMaterial(e);return s.has(a)===!1&&(s.add(a),a.usedTimes++),s.has(r)===!1&&(s.add(r),r.usedTimes++),this}remove(e){let t=this.materialCache.get(e);for(let i of t)i.usedTimes--,i.usedTimes===0&&this.shaderCache.delete(i);return this.materialCache.delete(e),this}getVertexShaderID(e){return this._getShaderStage(e.vertexShader).id}getFragmentShaderID(e){return this._getShaderStage(e.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){let t=this.materialCache;return t.has(e)===!1&&t.set(e,new Set),t.get(e)}_getShaderStage(e){let t=this.shaderCache;if(t.has(e)===!1){let i=new ro;t.set(e,i)}return t.get(e)}},ro=class{constructor(){this.id=Zu++,this.usedTimes=0}};function no(n,e,t,i,a,r,s){let o=new Pt,c=new Di,l=[],u=a.isWebGL2,f=a.logarithmicDepthBuffer,h=a.floatVertexTextures,p=a.maxVertexUniforms,v=a.vertexTextures,g=a.precision,x={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function m(M){let z=M.skeleton.bones;if(h)return 1024;{let V=Math.floor((p-20)/4),L=Math.min(V,z.length);return L0,u1=M.clearcoat>0;return{isWebGL2:u,shaderID:Z,shaderName:M.type,vertexShader:W,fragmentShader:X,defines:M.defines,customVertexShaderID:Q,customFragmentShaderID:a1,isRawShaderMaterial:M.isRawShaderMaterial===!0,glslVersion:M.glslVersion,precision:g,instancing:V.isInstancedMesh===!0,instancingColor:V.isInstancedMesh===!0&&V.instanceColor!==null,supportsVertexTextures:v,outputEncoding:B===null?n.outputEncoding:B.isXRRenderTarget===!0?B.texture.encoding:R2,map:!!M.map,matcap:!!M.matcap,envMap:!!U,envMapMode:U&&U.mapping,envMapCubeUV:!!U&&(U.mapping===a4||U.mapping===Tt),lightMap:!!M.lightMap,aoMap:!!M.aoMap,emissiveMap:!!M.emissiveMap,bumpMap:!!M.bumpMap,normalMap:!!M.normalMap,objectSpaceNormalMap:M.normalMapType===S8,tangentSpaceNormalMap:M.normalMapType===V6,decodeVideoTexture:!!M.map&&M.map.isVideoTexture===!0&&M.map.encoding===I1,clearcoat:u1,clearcoatMap:u1&&!!M.clearcoatMap,clearcoatRoughnessMap:u1&&!!M.clearcoatRoughnessMap,clearcoatNormalMap:u1&&!!M.clearcoatNormalMap,displacementMap:!!M.displacementMap,roughnessMap:!!M.roughnessMap,metalnessMap:!!M.metalnessMap,specularMap:!!M.specularMap,specularIntensityMap:!!M.specularIntensityMap,specularColorMap:!!M.specularColorMap,alphaMap:!!M.alphaMap,alphaTest:M1,alphaWrite:M.alphaWrite||M.transparent,gradientMap:!!M.gradientMap,sheen:M.sheen>0,sheenColorMap:!!M.sheenColorMap,sheenRoughnessMap:!!M.sheenRoughnessMap,transmission:M.transmission>0,transmissionMap:!!M.transmissionMap,thicknessMap:!!M.thicknessMap,combine:M.combine,vertexTangents:!!M.normalMap&&!!V.geometry&&!!V.geometry.attributes.tangent,vertexColors:M.vertexColors,vertexAlphas:M.vertexColors===!0&&!!V.geometry&&!!V.geometry.attributes.color&&V.geometry.attributes.color.itemSize===4,vertexUvs:!!M.map||!!M.bumpMap||!!M.normalMap||!!M.specularMap||!!M.alphaMap||!!M.emissiveMap||!!M.roughnessMap||!!M.metalnessMap||!!M.clearcoatMap||!!M.clearcoatRoughnessMap||!!M.clearcoatNormalMap||!!M.displacementMap||!!M.transmissionMap||!!M.thicknessMap||!!M.specularIntensityMap||!!M.specularColorMap||!!M.sheenColorMap||!!M.sheenRoughnessMap,uvsVertexOnly:!(!!M.map||!!M.bumpMap||!!M.normalMap||!!M.specularMap||!!M.alphaMap||!!M.emissiveMap||!!M.roughnessMap||!!M.metalnessMap||!!M.clearcoatNormalMap||M.transmission>0||!!M.transmissionMap||!!M.thicknessMap||!!M.specularIntensityMap||!!M.specularColorMap||M.sheen>0||!!M.sheenColorMap||!!M.sheenRoughnessMap)&&!!M.displacementMap,fog:!!L,useFog:M.fog,fogExp2:L&&L.isFogExp2,flatShading:!!M.flatShading,sizeAttenuation:M.sizeAttenuation,logarithmicDepthBuffer:f,skinning:V.isSkinnedMesh===!0&&O>0,maxBones:O,useVertexTexture:h,morphTargets:!!V.geometry&&!!V.geometry.morphAttributes.position,morphNormals:!!V.geometry&&!!V.geometry.morphAttributes.normal,morphTargetsCount:!!V.geometry&&!!V.geometry.morphAttributes.position?V.geometry.morphAttributes.position.length:0,numDirLights:D.directional.length,numPointLights:D.point.length,numSpotLights:D.spot.length,numRectAreaLights:D.rectArea.length,numHemiLights:D.hemi.length,numDirLightShadows:D.directionalShadowMap.length,numPointLightShadows:D.pointShadowMap.length,numSpotLightShadows:D.spotShadowMap.length,numClippingPlanes:s.numPlanes,numClipIntersection:s.numIntersection,dithering:M.dithering,shadowMapEnabled:n.shadowMap.enabled&&z.length>0,shadowMapType:n.shadowMap.type,toneMapping:M.toneMapped?n.toneMapping:O2,physicallyCorrectLights:n.physicallyCorrectLights,premultipliedAlpha:M.premultipliedAlpha,doubleSided:M.side===J2,flipSided:M.side===P1,depthPacking:M.depthPacking!==void 0?M.depthPacking:!1,index0AttributeName:M.index0AttributeName,extensionDerivatives:M.extensions&&M.extensions.derivatives,extensionFragDepth:M.extensions&&M.extensions.fragDepth,extensionDrawBuffers:M.extensions&&M.extensions.drawBuffers,extensionShaderTextureLOD:M.extensions&&M.extensions.shaderTextureLOD,rendererExtensionFragDepth:u||i.has("EXT_frag_depth"),rendererExtensionDrawBuffers:u||i.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:u||i.has("EXT_shader_texture_lod"),customProgramCacheKey:M.customProgramCacheKey()}}function A(M){let D=[];if(M.shaderID?D.push(M.shaderID):(D.push(M.customVertexShaderID),D.push(M.customFragmentShaderID)),M.defines!==void 0)for(let z in M.defines)D.push(z),D.push(M.defines[z]);return M.isRawShaderMaterial===!1&&(b(D,M),C(D,M),D.push(n.outputEncoding)),D.push(M.customProgramCacheKey),D.join()}function b(M,D){M.push(D.precision),M.push(D.outputEncoding),M.push(D.envMapMode),M.push(D.combine),M.push(D.vertexUvs),M.push(D.fogExp2),M.push(D.sizeAttenuation),M.push(D.maxBones),M.push(D.morphTargetsCount),M.push(D.numDirLights),M.push(D.numPointLights),M.push(D.numSpotLights),M.push(D.numHemiLights),M.push(D.numRectAreaLights),M.push(D.numDirLightShadows),M.push(D.numPointLightShadows),M.push(D.numSpotLightShadows),M.push(D.shadowMapType),M.push(D.toneMapping),M.push(D.numClippingPlanes),M.push(D.numClipIntersection),M.push(D.alphaWrite)}function C(M,D){o.disableAll(),D.isWebGL2&&o.enable(0),D.supportsVertexTextures&&o.enable(1),D.instancing&&o.enable(2),D.instancingColor&&o.enable(3),D.map&&o.enable(4),D.matcap&&o.enable(5),D.envMap&&o.enable(6),D.envMapCubeUV&&o.enable(7),D.lightMap&&o.enable(8),D.aoMap&&o.enable(9),D.emissiveMap&&o.enable(10),D.bumpMap&&o.enable(11),D.normalMap&&o.enable(12),D.objectSpaceNormalMap&&o.enable(13),D.tangentSpaceNormalMap&&o.enable(14),D.clearcoat&&o.enable(15),D.clearcoatMap&&o.enable(16),D.clearcoatRoughnessMap&&o.enable(17),D.clearcoatNormalMap&&o.enable(18),D.displacementMap&&o.enable(19),D.specularMap&&o.enable(20),D.roughnessMap&&o.enable(21),D.metalnessMap&&o.enable(22),D.gradientMap&&o.enable(23),D.alphaMap&&o.enable(24),D.alphaTest&&o.enable(25),D.vertexColors&&o.enable(26),D.vertexAlphas&&o.enable(27),D.vertexUvs&&o.enable(28),D.vertexTangents&&o.enable(29),D.uvsVertexOnly&&o.enable(30),D.fog&&o.enable(31),M.push(o.mask),o.disableAll(),D.useFog&&o.enable(0),D.flatShading&&o.enable(1),D.logarithmicDepthBuffer&&o.enable(2),D.skinning&&o.enable(3),D.useVertexTexture&&o.enable(4),D.morphTargets&&o.enable(5),D.morphNormals&&o.enable(6),D.premultipliedAlpha&&o.enable(7),D.shadowMapEnabled&&o.enable(8),D.physicallyCorrectLights&&o.enable(9),D.doubleSided&&o.enable(10),D.flipSided&&o.enable(11),D.depthPacking&&o.enable(12),D.dithering&&o.enable(13),D.specularIntensityMap&&o.enable(14),D.specularColorMap&&o.enable(15),D.transmission&&o.enable(16),D.transmissionMap&&o.enable(17),D.thicknessMap&&o.enable(18),D.sheen&&o.enable(19),D.sheenColorMap&&o.enable(20),D.sheenRoughnessMap&&o.enable(21),D.decodeVideoTexture&&o.enable(22),M.push(o.mask)}function E(M){let D=x[M.type],z;if(D){let H=W2[D];z=U8.clone(H.uniforms)}else z=M.uniforms;return z}function T(M,D){let z;for(let H=0,V=l.length;H0?i.push(m):p.transparent===!0?a.push(m):t.push(m)}function c(f,h,p,v,g,x){let m=s(f,h,p,v,g,x);p.transmission>0?i.unshift(m):p.transparent===!0?a.unshift(m):t.unshift(m)}function l(f,h){t.length>1&&t.sort(f||Yu),i.length>1&&i.sort(h||oo),a.length>1&&a.sort(h||oo)}function u(){for(let f=e,h=n.length;f=n.get(i).length?(r=new co,n.get(i).push(r)):r=n.get(i)[a],r}function t(){n=new WeakMap}return{get:e,dispose:t}}function $u(){let n={};return{get:function(e){if(n[e.id]!==void 0)return n[e.id];let t;switch(e.type){case"DirectionalLight":t={direction:new k,color:new x1};break;case"SpotLight":t={position:new k,direction:new k,color:new x1,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":t={position:new k,color:new x1,distance:0,decay:0};break;case"HemisphereLight":t={direction:new k,skyColor:new x1,groundColor:new x1};break;case"RectAreaLight":t={color:new x1,position:new k,halfWidth:new k,halfHeight:new k};break}return n[e.id]=t,t}}}function Ku(){let n={};return{get:function(e){if(n[e.id]!==void 0)return n[e.id];let t;switch(e.type){case"DirectionalLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new z1};break;case"SpotLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new z1};break;case"PointLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new z1,shadowCameraNear:1,shadowCameraFar:1e3};break}return n[e.id]=t,t}}}var Ju=0;function Qu(n,e){return(e.castShadow?1:0)-(n.castShadow?1:0)}function uo(n,e){let t=new $u,i=Ku(),a={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadow:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[]};for(let u=0;u<9;u++)a.probe.push(new k);let r=new k,s=new k1,o=new k1;function c(u,f){let h=0,p=0,v=0;for(let P=0;P<9;P++)a.probe[P].set(0,0,0);let g=0,x=0,m=0,d=0,A=0,b=0,C=0,E=0;u.sort(Qu);let T=f!==!0?Math.PI:1;for(let P=0,F=u.length;P0&&(e.isWebGL2?(a.rectAreaLTC1=e1.LTC_FLOAT_1,a.rectAreaLTC2=e1.LTC_FLOAT_2):n.has("OES_texture_float_linear")===!0?(a.rectAreaLTC1=e1.LTC_FLOAT_1,a.rectAreaLTC2=e1.LTC_FLOAT_2):n.has("OES_texture_half_float_linear")===!0?(a.rectAreaLTC1=e1.LTC_HALF_1,a.rectAreaLTC2=e1.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),a.ambient[0]=h,a.ambient[1]=p,a.ambient[2]=v;let _=a.hash;(_.directionalLength!==g||_.pointLength!==x||_.spotLength!==m||_.rectAreaLength!==d||_.hemiLength!==A||_.numDirectionalShadows!==b||_.numPointShadows!==C||_.numSpotShadows!==E)&&(a.directional.length=g,a.spot.length=m,a.rectArea.length=d,a.point.length=x,a.hemi.length=A,a.directionalShadow.length=b,a.directionalShadowMap.length=b,a.pointShadow.length=C,a.pointShadowMap.length=C,a.spotShadow.length=E,a.spotShadowMap.length=E,a.directionalShadowMatrix.length=b,a.pointShadowMatrix.length=C,a.spotShadowMatrix.length=E,_.directionalLength=g,_.pointLength=x,_.spotLength=m,_.rectAreaLength=d,_.hemiLength=A,_.numDirectionalShadows=b,_.numPointShadows=C,_.numSpotShadows=E,a.version=Ju++)}function l(u,f){let h=0,p=0,v=0,g=0,x=0,m=f.matrixWorldInverse;for(let d=0,A=u.length;d=t.get(r).length?(o=new ho(n,e),t.get(r).push(o)):o=t.get(r)[s],o}function a(){t=new WeakMap}return{get:i,dispose:a}}var c0=class extends T2{constructor(e){super();this.type="MeshDepthMaterial",this.depthPacking=A8,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}};c0.prototype.isMeshDepthMaterial=!0;var l0=class extends T2{constructor(e){super();this.type="MeshDistanceMaterial",this.referencePosition=new k,this.nearDistance=1,this.farDistance=1e3,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.fog=!1,this.setValues(e)}copy(e){return super.copy(e),this.referencePosition.copy(e.referencePosition),this.nearDistance=e.nearDistance,this.farDistance=e.farDistance,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}};l0.prototype.isMeshDistanceMaterial=!0;var po=` void main() { gl_Position = vec4( position, 1.0 ); } -`,po=` +`,mo=` uniform sampler2D shadow_pass; uniform vec2 resolution; uniform float radius; @@ -5728,13 +5728,13 @@ void main() { gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) ); } -`;function mo(n,e,t){let i=new H4,a=new z1,r=new z1,o=new q1,s=new o0({depthPacking:A8}),c=new c0,l={},u=t.maxTextureSize,f={0:P1,1:Ue,2:J2},h=new se({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new z1},radius:{value:4}},vertexShader:fo,fragmentShader:po}),m=h.clone();m.defines.HORIZONTAL_PASS=1;let v=new y2;v.setAttribute("position",new b2(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));let g=new u2(v,h),x=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=A6,this.render=function(b,C,E){if(x.enabled===!1||x.autoUpdate===!1&&x.needsUpdate===!1||b.length===0)return;let T=n.getRenderTarget(),_=n.getActiveCubeFace(),P=n.getActiveMipmapLevel(),F=n.state;F.setBlending(U2),F.buffers.color.setClear(1,1,1,1),F.buffers.depth.setTest(!0),F.setScissorTest(!1);for(let M=0,D=b.length;Mu||a.y>u)&&(a.x>u&&(r.x=Math.floor(u/V.x),a.x=r.x*V.x,H.mapSize.x=r.x),a.y>u&&(r.y=Math.floor(u/V.y),a.y=r.y*V.y,H.mapSize.y=r.y)),H.map===null&&!H.isPointLightShadow&&this.type===A4){let N={minFilter:t2,magFilter:t2,format:W1};H.map=new m2(a.x,a.y,N),H.map.texture.name=z.name+".shadowMap",H.mapPass=new m2(a.x,a.y,N),H.camera.updateProjectionMatrix()}if(H.map===null){let N={minFilter:Q1,magFilter:Q1,format:W1};H.map=new m2(a.x,a.y,N),H.map.texture.name=z.name+".shadowMap",H.camera.updateProjectionMatrix()}n.setRenderTarget(H.map),n.clear();let L=H.getViewportCount();for(let N=0;N0){let z=M.uuid,H=E.uuid,V=l[z];V===void 0&&(V={},l[z]=V);let L=V[H];L===void 0&&(L=M.clone(),V[H]=L),M=L}return M.visible=E.visible,M.wireframe=E.wireframe,F===A4?M.side=E.shadowSide!==null?E.shadowSide:E.side:M.side=E.shadowSide!==null?E.shadowSide:f[E.side],M.alphaMap=E.alphaMap,M.alphaTest=E.alphaTest,M.clipShadows=E.clipShadows,M.clippingPlanes=E.clippingPlanes,M.clipIntersection=E.clipIntersection,M.displacementMap=E.displacementMap,M.displacementScale=E.displacementScale,M.displacementBias=E.displacementBias,M.wireframeLinewidth=E.wireframeLinewidth,M.linewidth=E.linewidth,T.isPointLight===!0&&M.isMeshDistanceMaterial===!0&&(M.referencePosition.setFromMatrixPosition(T.matrixWorld),M.nearDistance=_,M.farDistance=P),M}function A(b,C,E,T,_){if(b.visible===!1)return;if(b.layers.test(C.layers)&&(b.isMesh||b.isLine||b.isPoints)&&(b.castShadow||b.receiveShadow&&_===A4)&&(!b.frustumCulled||i.intersectsObject(b))){b.modelViewMatrix.multiplyMatrices(E.matrixWorldInverse,b.matrixWorld);let M=e.update(b),D=b.material;if(Array.isArray(D)){let z=M.groups;for(let H=0,V=z.length;H=1):L.indexOf("OpenGL ES")!==-1&&(V=parseFloat(/^OpenGL ES (\d)/.exec(L)[1]),H=V>=2);let N=null,U={},Z=n.getParameter(n.SCISSOR_BOX),O=n.getParameter(n.VIEWPORT),W=new q1().fromArray(Z),X=new q1().fromArray(O);function Q(I,l1,o1){let m1=new Uint8Array(4),$=n.createTexture();n.bindTexture(I,$),n.texParameteri(I,n.TEXTURE_MIN_FILTER,n.NEAREST),n.texParameteri(I,n.TEXTURE_MAG_FILTER,n.NEAREST);for(let p1=0;p1t1||R.height>t1)&&(h1=t1/Math.max(R.width,R.height)),h1<1||w===!0)if(typeof HTMLImageElement!="undefined"&&R instanceof HTMLImageElement||typeof HTMLCanvasElement!="undefined"&&R instanceof HTMLCanvasElement||typeof ImageBitmap!="undefined"&&R instanceof ImageBitmap){let Y=w?Lr:Math.floor,d1=Y(h1*R.width),f1=Y(h1*R.height);g===void 0&&(g=p(d1,f1));let s1=J?p(d1,f1):g;return s1.width=d1,s1.height=f1,s1.getContext("2d").drawImage(R,0,0,d1,f1),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+R.width+"x"+R.height+") to ("+d1+"x"+f1+")."),s1}else return"data"in R&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+R.width+"x"+R.height+")."),R;return R}function A(R){return Q0(R.width)&&Q0(R.height)}function b(R){return s?!1:R.wrapS!==c2||R.wrapT!==c2||R.minFilter!==Q1&&R.minFilter!==t2}function C(R,w){return R.generateMipmaps&&w&&R.minFilter!==Q1&&R.minFilter!==t2}function E(R){n.generateMipmap(R)}function T(R,w,J,t1,h1=!1){if(s===!1)return w;if(R!==null){if(n[R]!==void 0)return n[R];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+R+"'")}let Y=w;return w===n.RED&&(J===n.FLOAT&&(Y=n.R32F),J===n.HALF_FLOAT&&(Y=n.R16F),J===n.UNSIGNED_BYTE&&(Y=n.R8)),w===n.RG&&(J===n.FLOAT&&(Y=n.RG32F),J===n.HALF_FLOAT&&(Y=n.RG16F),J===n.UNSIGNED_BYTE&&(Y=n.RG8)),w===n.RGBA&&(J===n.FLOAT&&(Y=n.RGBA32F),J===n.HALF_FLOAT&&(Y=n.RGBA16F),J===n.UNSIGNED_BYTE&&(Y=t1===I1&&h1===!1?n.SRGB8_ALPHA8:n.RGBA8),J===n.UNSIGNED_SHORT_4_4_4_4&&(Y=n.RGBA4),J===n.UNSIGNED_SHORT_5_5_5_1&&(Y=n.RGB5_A1)),(Y===n.R16F||Y===n.R32F||Y===n.RG16F||Y===n.RG32F||Y===n.RGBA16F||Y===n.RGBA32F)&&e.get("EXT_color_buffer_float"),Y}function _(R,w,J){return C(R,J)===!0||R.isFramebufferTexture&&R.minFilter!==Q1&&R.minFilter!==t2?Math.log2(Math.max(w.width,w.height))+1:R.mipmaps!==void 0&&R.mipmaps.length>0?R.mipmaps.length:R.isCompressedTexture&&Array.isArray(R.image)?w.mipmaps.length:1}function P(R){return R===Q1||R===u3||R===h3?n.NEAREST:n.LINEAR}function F(R){let w=R.target;w.removeEventListener("dispose",F),D(w),w.isVideoTexture&&v.delete(w),o.memory.textures--}function M(R){let w=R.target;w.removeEventListener("dispose",M),z(w)}function D(R){let w=i.get(R);w.__webglInit!==void 0&&(n.deleteTexture(w.__webglTexture),i.remove(R))}function z(R){let w=R.texture,J=i.get(R),t1=i.get(w);if(!!R){if(t1.__webglTexture!==void 0&&(n.deleteTexture(t1.__webglTexture),o.memory.textures--),R.depthTexture&&R.depthTexture.dispose(),R.isWebGLCubeRenderTarget)for(let h1=0;h1<6;h1++)n.deleteFramebuffer(J.__webglFramebuffer[h1]),J.__webglDepthbuffer&&n.deleteRenderbuffer(J.__webglDepthbuffer[h1]);else n.deleteFramebuffer(J.__webglFramebuffer),J.__webglDepthbuffer&&n.deleteRenderbuffer(J.__webglDepthbuffer),J.__webglMultisampledFramebuffer&&n.deleteFramebuffer(J.__webglMultisampledFramebuffer),J.__webglColorRenderbuffer&&n.deleteRenderbuffer(J.__webglColorRenderbuffer),J.__webglDepthRenderbuffer&&n.deleteRenderbuffer(J.__webglDepthRenderbuffer);if(R.isWebGLMultipleRenderTargets)for(let h1=0,Y=w.length;h1=c&&console.warn("THREE.WebGLTextures: Trying to use "+R+" texture units while this GPU supports only "+c),H+=1,R}function N(R,w){let J=i.get(R);if(R.isVideoTexture&&j2(R),R.version>0&&J.__version!==R.version){let t1=R.image;if(t1===void 0)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined");else if(t1.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{B(J,R,w);return}}t.activeTexture(n.TEXTURE0+w),t.bindTexture(n.TEXTURE_2D,J.__webglTexture)}function U(R,w){let J=i.get(R);if(R.version>0&&J.__version!==R.version){B(J,R,w);return}t.activeTexture(n.TEXTURE0+w),t.bindTexture(n.TEXTURE_2D_ARRAY,J.__webglTexture)}function Z(R,w){let J=i.get(R);if(R.version>0&&J.__version!==R.version){B(J,R,w);return}t.activeTexture(n.TEXTURE0+w),t.bindTexture(n.TEXTURE_3D,J.__webglTexture)}function O(R,w){let J=i.get(R);if(R.version>0&&J.__version!==R.version){M1(J,R,w);return}t.activeTexture(n.TEXTURE0+w),t.bindTexture(n.TEXTURE_CUBE_MAP,J.__webglTexture)}let W={[Ht]:n.REPEAT,[c2]:n.CLAMP_TO_EDGE,[Vt]:n.MIRRORED_REPEAT},X={[Q1]:n.NEAREST,[u3]:n.NEAREST_MIPMAP_NEAREST,[h3]:n.NEAREST_MIPMAP_LINEAR,[t2]:n.LINEAR,[c8]:n.LINEAR_MIPMAP_NEAREST,[n4]:n.LINEAR_MIPMAP_LINEAR};function Q(R,w,J){if(J?(n.texParameteri(R,n.TEXTURE_WRAP_S,W[w.wrapS]),n.texParameteri(R,n.TEXTURE_WRAP_T,W[w.wrapT]),(R===n.TEXTURE_3D||R===n.TEXTURE_2D_ARRAY)&&n.texParameteri(R,n.TEXTURE_WRAP_R,W[w.wrapR]),n.texParameteri(R,n.TEXTURE_MAG_FILTER,X[w.magFilter]),n.texParameteri(R,n.TEXTURE_MIN_FILTER,X[w.minFilter])):(n.texParameteri(R,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE),n.texParameteri(R,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE),(R===n.TEXTURE_3D||R===n.TEXTURE_2D_ARRAY)&&n.texParameteri(R,n.TEXTURE_WRAP_R,n.CLAMP_TO_EDGE),(w.wrapS!==c2||w.wrapT!==c2)&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),n.texParameteri(R,n.TEXTURE_MAG_FILTER,P(w.magFilter)),n.texParameteri(R,n.TEXTURE_MIN_FILTER,P(w.minFilter)),w.minFilter!==Q1&&w.minFilter!==t2&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),e.has("EXT_texture_filter_anisotropic")===!0){let t1=e.get("EXT_texture_filter_anisotropic");if(w.type===Q2&&e.has("OES_texture_float_linear")===!1||s===!1&&w.type===ye&&e.has("OES_texture_half_float_linear")===!1)return;(w.anisotropy>1||i.get(w).__currentAnisotropy)&&(n.texParameterf(R,t1.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(w.anisotropy,a.getMaxAnisotropy())),i.get(w).__currentAnisotropy=w.anisotropy)}}function a1(R,w){R.__webglInit===void 0&&(R.__webglInit=!0,w.addEventListener("dispose",F),R.__webglTexture=n.createTexture(),o.memory.textures++)}function B(R,w,J){let t1=n.TEXTURE_2D;w.isDataTexture2DArray&&(t1=n.TEXTURE_2D_ARRAY),w.isDataTexture3D&&(t1=n.TEXTURE_3D),a1(R,w),t.activeTexture(n.TEXTURE0+J),t.bindTexture(t1,R.__webglTexture),n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,w.flipY),n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,w.premultiplyAlpha),n.pixelStorei(n.UNPACK_ALIGNMENT,w.unpackAlignment),n.pixelStorei(n.UNPACK_COLORSPACE_CONVERSION_WEBGL,n.NONE);let h1=b(w)&&A(w.image)===!1,Y=d(w.image,h1,!1,u);Y=v2(w,Y);let d1=A(Y)||s,f1=r.convert(w.format,w.encoding),s1=r.convert(w.type),r1=T(w.internalFormat,f1,s1,w.encoding,w.isVideoTexture);Q(t1,w,d1);let b1,I=w.mipmaps,l1=s&&w.isVideoTexture!==!0,o1=R.__version===void 0,m1=_(w,Y,d1);if(w.isDepthTexture)r1=n.DEPTH_COMPONENT,s?w.type===Q2?r1=n.DEPTH_COMPONENT32F:w.type===W4?r1=n.DEPTH_COMPONENT24:w.type===Ce?r1=n.DEPTH24_STENCIL8:r1=n.DEPTH_COMPONENT16:w.type===Q2&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),w.format===ee&&r1===n.DEPTH_COMPONENT&&w.type!==Ge&&w.type!==W4&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),w.type=Ge,s1=r.convert(w.type)),w.format===ze&&r1===n.DEPTH_COMPONENT&&(r1=n.DEPTH_STENCIL,w.type!==Ce&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),w.type=Ce,s1=r.convert(w.type))),l1&&o1?t.texStorage2D(n.TEXTURE_2D,1,r1,Y.width,Y.height):t.texImage2D(n.TEXTURE_2D,0,r1,Y.width,Y.height,0,f1,s1,null);else if(w.isDataTexture)if(I.length>0&&d1){l1&&o1&&t.texStorage2D(n.TEXTURE_2D,m1,r1,I[0].width,I[0].height);for(let $=0,p1=I.length;$0&&d1){l1&&o1&&t.texStorage2D(n.TEXTURE_2D,m1,r1,I[0].width,I[0].height);for(let $=0,p1=I.length;$0&&o1++,t.texStorage2D(n.TEXTURE_CUBE_MAP,o1,b1,Y[0].width,Y[0].height));for(let $=0;$<6;$++)if(h1){I?t.texSubImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+$,0,0,0,Y[$].width,Y[$].height,s1,r1,Y[$].data):t.texImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+$,0,b1,Y[$].width,Y[$].height,0,s1,r1,Y[$].data);for(let p1=0;p1m+v?(l.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!l.inputState.pinching&&h<=m-v&&(l.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else c!==null&&e.gripSpace&&(r=t.getPose(e.gripSpace,i),r!==null&&(c.matrix.fromArray(r.transform.matrix),c.matrix.decompose(c.position,c.rotation,c.scale),r.linearVelocity?(c.hasLinearVelocity=!0,c.linearVelocity.copy(r.linearVelocity)):c.hasLinearVelocity=!1,r.angularVelocity?(c.hasAngularVelocity=!0,c.angularVelocity.copy(r.angularVelocity)):c.hasAngularVelocity=!1));return s!==null&&(s.visible=a!==null),c!==null&&(c.visible=r!==null),l!==null&&(l.visible=o!==null),this}};var jt=class extends $1{constructor(e,t,i,a,r,o,s,c,l,u){if(u=u!==void 0?u:ee,u!==ee&&u!==ze)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");i===void 0&&u===ee&&(i=Ge),i===void 0&&u===ze&&(i=Ce);super(null,a,r,o,s,c,u,i,l);this.image={width:e,height:t},this.magFilter=s!==void 0?s:Q1,this.minFilter=c!==void 0?c:Q1,this.flipY=!1,this.generateMipmaps=!1}};jt.prototype.isDepthTexture=!0;var Di=class extends B2{constructor(e,t){super();let i=this,a=null,r=1,o=null,s="local-floor",c=e.extensions.has("WEBGL_multisampled_render_to_texture"),l=null,u=null,f=null,h=null,m=!1,v=null,g=t.getContextAttributes(),x=null,p=null,d=[],A=new Map,b=new i2;b.layers.enable(1),b.viewport=new q1;let C=new i2;C.layers.enable(2),C.viewport=new q1;let E=[b,C],T=new l0;T.layers.enable(1),T.layers.enable(2);let _=null,P=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(O){let W=d[O];return W===void 0&&(W=new Wt,d[O]=W),W.getTargetRaySpace()},this.getControllerGrip=function(O){let W=d[O];return W===void 0&&(W=new Wt,d[O]=W),W.getGripSpace()},this.getHand=function(O){let W=d[O];return W===void 0&&(W=new Wt,d[O]=W),W.getHandSpace()};function F(O){let W=A.get(O.inputSource);W&&W.dispatchEvent({type:O.type,data:O.inputSource})}function M(){A.forEach(function(O,W){O.disconnect(W)}),A.clear(),_=null,P=null,e.setRenderTarget(x),h=null,f=null,u=null,a=null,p=null,Z.stop(),i.isPresenting=!1,i.dispatchEvent({type:"sessionend"})}this.setFramebufferScaleFactor=function(O){r=O,i.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(O){s=O,i.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return o},this.getBaseLayer=function(){return f!==null?f:h},this.getBinding=function(){return u},this.getFrame=function(){return v},this.getSession=function(){return a},this.setSession=async function(O){if(a=O,a!==null){if(x=e.getRenderTarget(),a.addEventListener("select",F),a.addEventListener("selectstart",F),a.addEventListener("selectend",F),a.addEventListener("squeeze",F),a.addEventListener("squeezestart",F),a.addEventListener("squeezeend",F),a.addEventListener("end",M),a.addEventListener("inputsourceschange",D),g.xrCompatible!==!0&&await t.makeXRCompatible(),a.renderState.layers===void 0||e.capabilities.isWebGL2===!1){let W={antialias:a.renderState.layers===void 0?g.antialias:!0,alpha:g.alpha,depth:g.depth,stencil:g.stencil,framebufferScaleFactor:r};h=new XRWebGLLayer(a,t,W),a.updateRenderState({baseLayer:h}),p=new m2(h.framebufferWidth,h.framebufferHeight,{format:W1,type:R2,encoding:e.outputEncoding})}else{m=g.antialias;let W=null,X=null,Q=null;g.depth&&(Q=g.stencil?t.DEPTH24_STENCIL8:t.DEPTH_COMPONENT24,W=g.stencil?ze:ee,X=g.stencil?Ce:Ge);let a1={colorFormat:e.outputEncoding===I1?t.SRGB8_ALPHA8:t.RGBA8,depthFormat:Q,scaleFactor:r};u=new XRWebGLBinding(a,t),f=u.createProjectionLayer(a1),a.updateRenderState({layers:[f]}),m?p=new dt(f.textureWidth,f.textureHeight,{format:W1,type:R2,depthTexture:new jt(f.textureWidth,f.textureHeight,X,void 0,void 0,void 0,void 0,void 0,void 0,W),stencilBuffer:g.stencil,ignoreDepth:f.ignoreDepthValues,useRenderToTexture:c,encoding:e.outputEncoding}):p=new m2(f.textureWidth,f.textureHeight,{format:W1,type:R2,depthTexture:new jt(f.textureWidth,f.textureHeight,X,void 0,void 0,void 0,void 0,void 0,void 0,W),stencilBuffer:g.stencil,ignoreDepth:f.ignoreDepthValues,encoding:e.outputEncoding})}p.isXRRenderTarget=!0,this.setFoveation(1),o=await a.requestReferenceSpace(s),Z.setContext(a),Z.start(),i.isPresenting=!0,i.dispatchEvent({type:"sessionstart"})}};function D(O){let W=a.inputSources;for(let X=0;X0&&(p.alphaTest.value=d.alphaTest);let A=n.get(d).envMap;A&&(p.envMap.value=A,p.flipEnvMap.value=A.isCubeTexture&&A.isRenderTargetTexture===!1?-1:1,p.reflectivity.value=d.reflectivity,p.ior.value=d.ior,p.refractionRatio.value=d.refractionRatio),d.lightMap&&(p.lightMap.value=d.lightMap,p.lightMapIntensity.value=d.lightMapIntensity),d.aoMap&&(p.aoMap.value=d.aoMap,p.aoMapIntensity.value=d.aoMapIntensity);let b;d.map?b=d.map:d.specularMap?b=d.specularMap:d.displacementMap?b=d.displacementMap:d.normalMap?b=d.normalMap:d.bumpMap?b=d.bumpMap:d.roughnessMap?b=d.roughnessMap:d.metalnessMap?b=d.metalnessMap:d.alphaMap?b=d.alphaMap:d.emissiveMap?b=d.emissiveMap:d.clearcoatMap?b=d.clearcoatMap:d.clearcoatNormalMap?b=d.clearcoatNormalMap:d.clearcoatRoughnessMap?b=d.clearcoatRoughnessMap:d.specularIntensityMap?b=d.specularIntensityMap:d.specularColorMap?b=d.specularColorMap:d.transmissionMap?b=d.transmissionMap:d.thicknessMap?b=d.thicknessMap:d.sheenColorMap?b=d.sheenColorMap:d.sheenRoughnessMap&&(b=d.sheenRoughnessMap),b!==void 0&&(b.isWebGLRenderTarget&&(b=b.texture),b.matrixAutoUpdate===!0&&b.updateMatrix(),p.uvTransform.value.copy(b.matrix));let C;d.aoMap?C=d.aoMap:d.lightMap&&(C=d.lightMap),C!==void 0&&(C.isWebGLRenderTarget&&(C=C.texture),C.matrixAutoUpdate===!0&&C.updateMatrix(),p.uv2Transform.value.copy(C.matrix))}function a(p,d){p.diffuse.value.copy(d.color),p.opacity.value=d.opacity}function r(p,d){p.dashSize.value=d.dashSize,p.totalSize.value=d.dashSize+d.gapSize,p.scale.value=d.scale}function o(p,d,A,b){p.diffuse.value.copy(d.color),p.opacity.value=d.opacity,p.size.value=d.size*A,p.scale.value=b*.5,d.map&&(p.map.value=d.map),d.alphaMap&&(p.alphaMap.value=d.alphaMap),d.alphaTest>0&&(p.alphaTest.value=d.alphaTest);let C;d.map?C=d.map:d.alphaMap&&(C=d.alphaMap),C!==void 0&&(C.matrixAutoUpdate===!0&&C.updateMatrix(),p.uvTransform.value.copy(C.matrix))}function s(p,d){p.diffuse.value.copy(d.color),p.opacity.value=d.opacity,p.rotation.value=d.rotation,d.map&&(p.map.value=d.map),d.alphaMap&&(p.alphaMap.value=d.alphaMap),d.alphaTest>0&&(p.alphaTest.value=d.alphaTest);let A;d.map?A=d.map:d.alphaMap&&(A=d.alphaMap),A!==void 0&&(A.matrixAutoUpdate===!0&&A.updateMatrix(),p.uvTransform.value.copy(A.matrix))}function c(p,d){d.emissiveMap&&(p.emissiveMap.value=d.emissiveMap)}function l(p,d){p.specular.value.copy(d.specular),p.shininess.value=Math.max(d.shininess,1e-4),d.emissiveMap&&(p.emissiveMap.value=d.emissiveMap),d.bumpMap&&(p.bumpMap.value=d.bumpMap,p.bumpScale.value=d.bumpScale,d.side===P1&&(p.bumpScale.value*=-1)),d.normalMap&&(p.normalMap.value=d.normalMap,p.normalScale.value.copy(d.normalScale),d.side===P1&&p.normalScale.value.negate()),d.displacementMap&&(p.displacementMap.value=d.displacementMap,p.displacementScale.value=d.displacementScale,p.displacementBias.value=d.displacementBias)}function u(p,d){d.gradientMap&&(p.gradientMap.value=d.gradientMap),d.emissiveMap&&(p.emissiveMap.value=d.emissiveMap),d.bumpMap&&(p.bumpMap.value=d.bumpMap,p.bumpScale.value=d.bumpScale,d.side===P1&&(p.bumpScale.value*=-1)),d.normalMap&&(p.normalMap.value=d.normalMap,p.normalScale.value.copy(d.normalScale),d.side===P1&&p.normalScale.value.negate()),d.displacementMap&&(p.displacementMap.value=d.displacementMap,p.displacementScale.value=d.displacementScale,p.displacementBias.value=d.displacementBias)}function f(p,d){p.roughness.value=d.roughness,p.metalness.value=d.metalness,d.roughnessMap&&(p.roughnessMap.value=d.roughnessMap),d.metalnessMap&&(p.metalnessMap.value=d.metalnessMap),d.emissiveMap&&(p.emissiveMap.value=d.emissiveMap),d.bumpMap&&(p.bumpMap.value=d.bumpMap,p.bumpScale.value=d.bumpScale,d.side===P1&&(p.bumpScale.value*=-1)),d.normalMap&&(p.normalMap.value=d.normalMap,p.normalScale.value.copy(d.normalScale),d.side===P1&&p.normalScale.value.negate()),d.displacementMap&&(p.displacementMap.value=d.displacementMap,p.displacementScale.value=d.displacementScale,p.displacementBias.value=d.displacementBias),n.get(d).envMap&&(p.envMapIntensity.value=d.envMapIntensity)}function h(p,d,A){f(p,d),p.ior.value=d.ior,d.sheen>0&&(p.sheenColor.value.copy(d.sheenColor).multiplyScalar(d.sheen),p.sheenRoughness.value=d.sheenRoughness,d.sheenColorMap&&(p.sheenColorMap.value=d.sheenColorMap),d.sheenRoughnessMap&&(p.sheenRoughnessMap.value=d.sheenRoughnessMap)),d.clearcoat>0&&(p.clearcoat.value=d.clearcoat,p.clearcoatRoughness.value=d.clearcoatRoughness,d.clearcoatMap&&(p.clearcoatMap.value=d.clearcoatMap),d.clearcoatRoughnessMap&&(p.clearcoatRoughnessMap.value=d.clearcoatRoughnessMap),d.clearcoatNormalMap&&(p.clearcoatNormalScale.value.copy(d.clearcoatNormalScale),p.clearcoatNormalMap.value=d.clearcoatNormalMap,d.side===P1&&p.clearcoatNormalScale.value.negate())),d.transmission>0&&(p.transmission.value=d.transmission,p.transmissionSamplerMap.value=A.texture,p.transmissionSamplerSize.value.set(A.width,A.height),d.transmissionMap&&(p.transmissionMap.value=d.transmissionMap),p.thickness.value=d.thickness,d.thicknessMap&&(p.thicknessMap.value=d.thicknessMap),p.attenuationDistance.value=d.attenuationDistance,p.attenuationColor.value.copy(d.attenuationColor)),p.specularIntensity.value=d.specularIntensity,p.specularColor.value.copy(d.specularColor),d.specularIntensityMap&&(p.specularIntensityMap.value=d.specularIntensityMap),d.specularColorMap&&(p.specularColorMap.value=d.specularColorMap)}function m(p,d){d.matcap&&(p.matcap.value=d.matcap),d.bumpMap&&(p.bumpMap.value=d.bumpMap,p.bumpScale.value=d.bumpScale,d.side===P1&&(p.bumpScale.value*=-1)),d.normalMap&&(p.normalMap.value=d.normalMap,p.normalScale.value.copy(d.normalScale),d.side===P1&&p.normalScale.value.negate()),d.displacementMap&&(p.displacementMap.value=d.displacementMap,p.displacementScale.value=d.displacementScale,p.displacementBias.value=d.displacementBias)}function v(p,d){d.displacementMap&&(p.displacementMap.value=d.displacementMap,p.displacementScale.value=d.displacementScale,p.displacementBias.value=d.displacementBias)}function g(p,d){d.displacementMap&&(p.displacementMap.value=d.displacementMap,p.displacementScale.value=d.displacementScale,p.displacementBias.value=d.displacementBias),p.referencePosition.value.copy(d.referencePosition),p.nearDistance.value=d.nearDistance,p.farDistance.value=d.farDistance}function x(p,d){d.bumpMap&&(p.bumpMap.value=d.bumpMap,p.bumpScale.value=d.bumpScale,d.side===P1&&(p.bumpScale.value*=-1)),d.normalMap&&(p.normalMap.value=d.normalMap,p.normalScale.value.copy(d.normalScale),d.side===P1&&p.normalScale.value.negate()),d.displacementMap&&(p.displacementMap.value=d.displacementMap,p.displacementScale.value=d.displacementScale,p.displacementBias.value=d.displacementBias)}return{refreshFogUniforms:e,refreshMaterialUniforms:t}}function th(){let n=L4("canvas");return n.style.display="block",n}function Ti(n={}){let e=n.canvas!==void 0?n.canvas:th(),t=n.context!==void 0?n.context:null,i=n.alpha!==void 0?n.alpha:!1,a=n.depth!==void 0?n.depth:!0,r=n.stencil!==void 0?n.stencil:!0,o=n.antialias!==void 0?n.antialias:!1,s=n.premultipliedAlpha!==void 0?n.premultipliedAlpha:!0,c=n.preserveDrawingBuffer!==void 0?n.preserveDrawingBuffer:!1,l=n.powerPreference!==void 0?n.powerPreference:"default",u=n.failIfMajorPerformanceCaveat!==void 0?n.failIfMajorPerformanceCaveat:!1,f=null,h=null,m=[],v=[];this.domElement=e,this.debug={checkShaderErrors:!0},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.outputEncoding=F2,this.physicallyCorrectLights=!1,this.toneMapping=O2,this.toneMappingExposure=1;let g=this,x=!1,p=0,d=0,A=null,b=-1,C=null,E=new q1,T=new q1,_=null,P=e.width,F=e.height,M=1,D=null,z=null,H=new q1(0,0,P,F),V=new q1(0,0,P,F),L=!1,N=new H4,U=!1,Z=!1,O=null,W=new k1,X=new k,Q={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function a1(){return A===null?M:1}let B=t;function M1(S,G){for(let j=0;j0?h=v[v.length-1]:h=null,m.pop(),m.length>0?f=m[m.length-1]:f=null};function Z1(S,G,j,q){if(S.visible===!1)return;if(S.layers.test(G.layers)){if(S.isGroup)j=S.renderOrder;else if(S.isLOD)S.autoUpdate===!0&&S.update(G);else if(S.isLight)h.pushLight(S),S.castShadow&&h.pushShadow(S);else if(S.isSprite){if(!S.frustumCulled||N.intersectsSprite(S)){q&&X.setFromMatrixPosition(S.matrixWorld).applyMatrix4(W);let y1=v2.update(S),_1=S.material;_1.visible&&f.push(S,y1,_1,j,X.z,null)}}else if((S.isMesh||S.isLine||S.isPoints)&&(S.isSkinnedMesh&&S.skeleton.frame!==T1.render.frame&&(S.skeleton.update(),S.skeleton.frame=T1.render.frame),!S.frustumCulled||N.intersectsObject(S))){q&&X.setFromMatrixPosition(S.matrixWorld).applyMatrix4(W);let y1=v2.update(S),_1=S.material;if(Array.isArray(_1)){let w1=y1.groups;for(let B1=0,H1=w1.length;B10&&_e(K,G,j),q&&n1.viewport(E.copy(q)),K.length>0&&Yt(K,G,j),g1.length>0&&Yt(g1,G,j),y1.length>0&&Yt(y1,G,j)}function _e(S,G,j){if(O===null){let y1=o===!0&&v1.isWebGL2===!0?dt:m2;O=new y1(1024,1024,{generateMipmaps:!0,type:d1.convert(ye)!==null?ye:R2,minFilter:n4,magFilter:Q1,wrapS:c2,wrapT:c2,useRenderToTexture:u1.has("WEBGL_multisampled_render_to_texture")})}let q=g.getRenderTarget();g.setRenderTarget(O),g.clear();let K=g.toneMapping;g.toneMapping=O2,Yt(S,G,j),g.toneMapping=K,C1.updateMultisampleRenderTarget(O),C1.updateRenderTargetMipmap(O),g.setRenderTarget(q)}function Yt(S,G,j){let q=G.isScene===!0?G.overrideMaterial:null;for(let K=0,g1=S.length;K=0&&G<=S.width-q&&j>=0&&j<=S.height-K&&B.readPixels(G,j,q,K,d1.convert(B1),d1.convert(H1),g1):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.")}finally{let w1=A!==null?A1.get(A).__webglFramebuffer:null;n1.bindFramebuffer(B.FRAMEBUFFER,w1)}}},this.copyFramebufferToTexture=function(S,G,j=0){if(G.isFramebufferTexture!==!0){console.error("THREE.WebGLRenderer: copyFramebufferToTexture() can only be used with FramebufferTexture.");return}let q=Math.pow(2,-j),K=Math.floor(G.image.width*q),g1=Math.floor(G.image.height*q);C1.setTexture2D(G,0),B.copyTexSubImage2D(B.TEXTURE_2D,j,0,0,S.x,S.y,K,g1),n1.unbindTexture()},this.copyTextureToTexture=function(S,G,j,q=0){let K=G.image.width,g1=G.image.height,y1=d1.convert(j.format),_1=d1.convert(j.type);C1.setTexture2D(j,0),B.pixelStorei(B.UNPACK_FLIP_Y_WEBGL,j.flipY),B.pixelStorei(B.UNPACK_PREMULTIPLY_ALPHA_WEBGL,j.premultiplyAlpha),B.pixelStorei(B.UNPACK_ALIGNMENT,j.unpackAlignment),G.isDataTexture?B.texSubImage2D(B.TEXTURE_2D,q,S.x,S.y,K,g1,y1,_1,G.image.data):G.isCompressedTexture?B.compressedTexSubImage2D(B.TEXTURE_2D,q,S.x,S.y,G.mipmaps[0].width,G.mipmaps[0].height,y1,G.mipmaps[0].data):B.texSubImage2D(B.TEXTURE_2D,q,S.x,S.y,y1,_1,G.image),q===0&&j.generateMipmaps&&B.generateMipmap(B.TEXTURE_2D),n1.unbindTexture()},this.copyTextureToTexture3D=function(S,G,j,q,K=0){if(g.isWebGL1Renderer){console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");return}let g1=S.max.x-S.min.x+1,y1=S.max.y-S.min.y+1,_1=S.max.z-S.min.z+1,w1=d1.convert(q.format),B1=d1.convert(q.type),H1;if(q.isDataTexture3D)C1.setTexture3D(q,0),H1=B.TEXTURE_3D;else if(q.isDataTexture2DArray)C1.setTexture2DArray(q,0),H1=B.TEXTURE_2D_ARRAY;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}B.pixelStorei(B.UNPACK_FLIP_Y_WEBGL,q.flipY),B.pixelStorei(B.UNPACK_PREMULTIPLY_ALPHA_WEBGL,q.premultiplyAlpha),B.pixelStorei(B.UNPACK_ALIGNMENT,q.unpackAlignment);let V1=B.getParameter(B.UNPACK_ROW_LENGTH),Y1=B.getParameter(B.UNPACK_IMAGE_HEIGHT),m4=B.getParameter(B.UNPACK_SKIP_PIXELS),F4=B.getParameter(B.UNPACK_SKIP_ROWS),R1=B.getParameter(B.UNPACK_SKIP_IMAGES),ue=j.isCompressedTexture?j.mipmaps[0]:j.image;B.pixelStorei(B.UNPACK_ROW_LENGTH,ue.width),B.pixelStorei(B.UNPACK_IMAGE_HEIGHT,ue.height),B.pixelStorei(B.UNPACK_SKIP_PIXELS,S.min.x),B.pixelStorei(B.UNPACK_SKIP_ROWS,S.min.y),B.pixelStorei(B.UNPACK_SKIP_IMAGES,S.min.z),j.isDataTexture||j.isDataTexture3D?B.texSubImage3D(H1,K,G.x,G.y,G.z,g1,y1,_1,w1,B1,ue.data):j.isCompressedTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),B.compressedTexSubImage3D(H1,K,G.x,G.y,G.z,g1,y1,_1,w1,ue.data)):B.texSubImage3D(H1,K,G.x,G.y,G.z,g1,y1,_1,w1,B1,ue),B.pixelStorei(B.UNPACK_ROW_LENGTH,V1),B.pixelStorei(B.UNPACK_IMAGE_HEIGHT,Y1),B.pixelStorei(B.UNPACK_SKIP_PIXELS,m4),B.pixelStorei(B.UNPACK_SKIP_ROWS,F4),B.pixelStorei(B.UNPACK_SKIP_IMAGES,R1),K===0&&q.generateMipmaps&&B.generateMipmap(H1),n1.unbindTexture()},this.initTexture=function(S){C1.setTexture2D(S,0),n1.unbindTexture()},this.resetState=function(){p=0,d=0,A=null,n1.reset(),f1.reset()},typeof __THREE_DEVTOOLS__!="undefined"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}Ti.prototype.isWebGLRenderer=!0;var u0=class extends j1{constructor(){super();this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.overrideMaterial=null,this.autoUpdate=!0,typeof __THREE_DEVTOOLS__!="undefined"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(this.fog=e.fog.clone()),e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.autoUpdate=e.autoUpdate,this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){let t=super.toJSON(e);return this.fog!==null&&(t.object.fog=this.fog.toJSON()),t}};u0.prototype.isScene=!0;var mt=class extends j1{constructor(e,t=1){super();this.type="Light",this.color=new x1(e),this.intensity=t}dispose(){}copy(e){return super.copy(e),this.color.copy(e.color),this.intensity=e.intensity,this}toJSON(e){let t=super.toJSON(e);return t.object.color=this.color.getHex(),t.object.intensity=this.intensity,this.groundColor!==void 0&&(t.object.groundColor=this.groundColor.getHex()),this.distance!==void 0&&(t.object.distance=this.distance),this.angle!==void 0&&(t.object.angle=this.angle),this.decay!==void 0&&(t.object.decay=this.decay),this.penumbra!==void 0&&(t.object.penumbra=this.penumbra),this.shadow!==void 0&&(t.object.shadow=this.shadow.toJSON()),t}};mt.prototype.isLight=!0;var h0=class extends mt{constructor(e,t){super(e,t);this.type="AmbientLight"}};h0.prototype.isAmbientLight=!0;var bo=new k1,yo=new k,Co=new k,Hi=class{constructor(e){this.camera=e,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new z1(512,512),this.map=null,this.mapPass=null,this.matrix=new k1,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new H4,this._frameExtents=new z1(1,1),this._viewportCount=1,this._viewports=[new q1(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){let t=this.camera,i=this.matrix;yo.setFromMatrixPosition(e.matrixWorld),t.position.copy(yo),Co.setFromMatrixPosition(e.target.matrixWorld),t.lookAt(Co),t.updateMatrixWorld(),bo.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),this._frustum.setFromProjectionMatrix(bo),i.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),i.multiply(t.projectionMatrix),i.multiply(t.matrixWorldInverse)}getViewport(e){return this._viewports[e]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(e){return this.camera=e.camera.clone(),this.bias=e.bias,this.radius=e.radius,this.mapSize.copy(e.mapSize),this}clone(){return new this.constructor().copy(this)}toJSON(){let e={};return this.bias!==0&&(e.bias=this.bias),this.normalBias!==0&&(e.normalBias=this.normalBias),this.radius!==1&&(e.radius=this.radius),(this.mapSize.x!==512||this.mapSize.y!==512)&&(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}};var f0=class extends Hi{constructor(){super(new i2(50,1,.5,500));this.focus=1}updateMatrices(e){let t=this.camera,i=_t*2*e.angle*this.focus,a=this.mapSize.width/this.mapSize.height,r=e.distance||t.far;(i!==t.fov||a!==t.aspect||r!==t.far)&&(t.fov=i,t.aspect=a,t.far=r,t.updateProjectionMatrix()),super.updateMatrices(e)}copy(e){return super.copy(e),this.focus=e.focus,this}};f0.prototype.isSpotLightShadow=!0;var d0=class extends mt{constructor(e,t,i=0,a=Math.PI/3,r=0,o=1){super(e,t);this.type="SpotLight",this.position.copy(j1.DefaultUp),this.updateMatrix(),this.target=new j1,this.distance=i,this.angle=a,this.penumbra=r,this.decay=o,this.shadow=new f0}get power(){return this.intensity*Math.PI}set power(e){this.intensity=e/Math.PI}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.distance=e.distance,this.angle=e.angle,this.penumbra=e.penumbra,this.decay=e.decay,this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}};d0.prototype.isSpotLight=!0;var p0=class extends H2{constructor(e){super();this.type="ShadowMaterial",this.color=new x1(0),this.transparent=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this}};p0.prototype.isShadowMaterial=!0;var m0=class extends Xt.Component{constructor(e){super();this.plugin=e;this.event=new Xt.Events;this.container=createDiv("renderer-container");this.shadows=!0;this.iterations=0;this.frame_rate=1/60;this.animating=!1;this.factory=new Ao(this.WIDTH,this.HEIGHT,this.plugin);this.colors={ambient:16777215,spotlight:16777215};this.display={currentWidth:null,currentHeight:null,containerWidth:null,containerHeight:null,aspect:null,scale:null};this.cameraHeight={max:null,close:null,medium:null,far:null};this.extraFrames=m0.DEFAULT_EXTRA_FRAMES;this.renderer=new Ti({alpha:!0,antialias:!0})}get WIDTH(){return this.container.clientWidth/2}get HEIGHT(){return this.container.clientHeight/2}get ASPECT(){return this.WIDTH/this.HEIGHT}get scale(){return(this.WIDTH*this.WIDTH+this.HEIGHT*this.HEIGHT)/13}get canvasEl(){return this.renderer?this.renderer.domElement:null}setDice(e){this.animating&&(this.unload(),this.load()),this.stack=e,this.current=this.factory.getDice(this.stack,{x:(Math.random()*2-1)*this.WIDTH,y:-(Math.random()*2-1)*this.HEIGHT}),this.scene.add(...[...this.current.values()].flat().map(t=>t.geometry)),this.world.add(...[...this.current.values()].flat())}onload(){this.addChild(this.factory),this.container.empty(),this.container.style.opacity="1",document.body.appendChild(this.container),this.renderer.shadowMap.enabled=this.shadows,this.renderer.shadowMap.type=w6,this.container.appendChild(this.renderer.domElement),this.renderer.setClearColor(0,0),this.scene=new u0,this.initScene(),this.registerDomEvent(window,"resize",()=>{this.initScene()}),this.initWorld()}async start(){return new Promise(async(e,t)=>{this.current.size||t(),this.event.on("throw-finished",i=>{e(i)}),this.event.on("error",i=>{t(i)}),this.animating=!0,this.extraFrames=m0.DEFAULT_EXTRA_FRAMES,this.render()})}enableShadows(){this.shadows=!0,this.renderer&&(this.renderer.shadowMap.enabled=this.shadows),this.light&&(this.light.castShadow=this.shadows),this.desk&&(this.desk.receiveShadow=this.shadows)}disableShadows(){this.shadows=!1,this.renderer&&(this.renderer.shadowMap.enabled=this.shadows),this.light&&(this.light.castShadow=this.shadows),this.desk&&(this.desk.receiveShadow=this.shadows)}get mw(){return Math.max(this.WIDTH,this.HEIGHT)}setDimensions(e){this.display.currentWidth=this.container.clientWidth/2,this.display.currentHeight=this.container.clientHeight/2,e?(this.display.containerWidth=e.w,this.display.containerHeight=e.h):(this.display.containerWidth=this.display.currentWidth,this.display.containerHeight=this.display.currentHeight),this.display.aspect=Math.min(this.display.currentWidth/this.display.containerWidth,this.display.currentHeight/this.display.containerHeight),this.display.scale=Math.sqrt(this.display.containerWidth*this.display.containerWidth+this.display.containerHeight*this.display.containerHeight)/13,this.renderer.setSize(this.display.currentWidth*2,this.display.currentHeight*2),this.cameraHeight.max=this.display.currentHeight/this.display.aspect/Math.tan(10*Math.PI/180),this.factory.width=this.display.currentWidth,this.factory.height=this.display.currentHeight,this.cameraHeight.medium=this.cameraHeight.max/1.5,this.cameraHeight.far=this.cameraHeight.max,this.cameraHeight.close=this.cameraHeight.max/2}initCamera(){this.camera&&this.scene.remove(this.camera),this.camera=new i2(20,this.display.currentWidth/this.display.currentHeight,1,this.cameraHeight.max*1.3),this.camera.position.z=this.cameraHeight.far,this.camera.lookAt(new k(0,0,0))}initLighting(){let e=Math.max(this.display.containerWidth,this.display.containerHeight);this.light&&this.scene.remove(this.light),this.ambientLight&&this.scene.remove(this.ambientLight),this.light=new d0(this.colors.spotlight,.25),this.light.position.set(-e/2,e/2,e*3),this.light.target.position.set(0,0,0),this.light.distance=e*5,this.light.angle=Math.PI/4,this.light.castShadow=this.shadows,this.light.shadow.camera.near=e/10,this.light.shadow.camera.far=e*5,this.light.shadow.camera.fov=50,this.light.shadow.bias=.001,this.light.shadow.mapSize.width=1024,this.light.shadow.mapSize.height=1024,this.scene.add(this.light),this.ambientLight=new h0(16777215,.9),this.scene.add(this.ambientLight)}initDesk(){this.desk&&this.scene.remove(this.desk);let e=new p0;e.opacity=.5,this.desk=new u2(new V4(this.display.containerWidth*6,this.display.containerHeight*6,1,1),e),this.desk.receiveShadow=this.shadows,this.scene.add(this.desk)}initScene(){this.setDimensions(),this.initCamera(),this.initLighting(),this.initDesk(),this.camera.updateProjectionMatrix(),this.renderer.render(this.scene,this.camera)}initWorld(){this.world=new zo(this.WIDTH,this.HEIGHT),this.iterations=0}getResultsForRoller(e){let t=this.current.get(e),i=t.filter(o=>o instanceof T4&&o.isPercentile),a=[];for(let o=0;o!(o instanceof T4&&o.isPercentile)).map(o=>o.getUpsideValue()).filter(o=>o),...a.map(([o,s])=>{let c=o.getUpsideValue();if(!s)return c;let l=s.getUpsideValue();return c===10&&l==10?100:(l==10&&(l=0),c==10&&(c=0),c*10+l)}).filter(o=>o)]}returnResult(){for(let e of this.stack.dynamic){if(!this.current.has(e))continue;let t=this.getResultsForRoller(e);!t||e.setResults(t)}this.event.trigger("throw-finished",this.stack)}unrender(e=this){e.container.style.opacity="0",e.registerInterval(window.setTimeout(()=>{e.animating=!1,e.unload()},1e3))}render(){if(this.throwFinished())if(this.extraFrames>10)this.extraFrames--;else{try{for(let[e,t]of this.current)if(!(!e.modifiers.size||!this.getResultsForRoller(e))&&e.modifiers.has("r")){let a=t.filter(r=>(e.conditions.length||e.conditions.push({operator:"=",comparer:e.faces.min,value:""}),e.checkCondition(r.result,e.conditions)&&r.rerolled{r.rerolled++;let o={x:(Math.random()*2-1)*this.WIDTH,y:-(Math.random()*2-1)*this.HEIGHT};r.vector=r.generateVector(o),r.create(),r.set(),r.stopped=!1}),this.animation=requestAnimationFrame(()=>this.render());return}}if(this.returnResult(),this.plugin.data.renderTime)this.registerInterval(window.setTimeout(()=>this.unrender(),this.plugin.data.renderTime));else{let t=function(){e.unrender(e),document.body.removeEventListener("click",t)},e=this;this.registerDomEvent(document.body,"click",t)}}catch(e){this.event.trigger("error",e)}return}this.animation=requestAnimationFrame(()=>this.render()),this.world.step(this.frame_rate),this.iterations++,this.current.forEach(e=>{e.map(t=>t.set())}),this.renderer.render(this.scene,this.camera)}dispose(...e){e.forEach(t=>{"dispose"in t&&t.dispose(),t.children&&this.dispose(...t.children)})}detach(){}onunload(){cancelAnimationFrame(this.animation),this.container.detach(),this.container.empty(),this.renderer.domElement.detach(),this.renderer.dispose(),this.factory.dispose(),this.ambientLight.dispose(),this.light.dispose(),this.scene.children.forEach(e=>this.dispose(e)),this.scene.remove(this.scene,...this.scene.children,...[...this.current.values()].flat().map(e=>e.geometry)),this.current.forEach(e=>{e.forEach(t=>{[...Array.isArray(t.geometry.material)?t.geometry.material:[t.geometry.material]].forEach(a=>a&&a.dispose()),this.world.world.removeBody(t.body)})}),this.current=new Map}onThrowFinished(){}throwFinished(){let e=!0,t=4;if(this.iterations<10/this.frame_rate)for(let i of this.current.values())for(let a of i){if(a.stopped===!0)continue;let r=a.body.angularVelocity,o=a.body.velocity;if(Math.abs(r.x)3){a.stopped=!0;continue}}else a.stopped=this.iterations;e=!1}else a.stopped=void 0,e=!1}return e}},Zt=m0;Zt.DEFAULT_EXTRA_FRAMES=30;var zo=class{constructor(e,t){this.WIDTH=e;this.HEIGHT=t;this.world=new K0({gravity:new y(0,0,-9.82*400)});this.ground=this.getPlane();this.diceMaterial=new Ne;this.deskMaterial=new Ne;this.barrierMaterial=new Ne;this.world.broadphase=new d6,this.world.allowSleep=!0,this.ground.position.set(0,0,0),this.world.addBody(this.ground),this.buildWalls()}add(...e){e.forEach(t=>{this.world.addBody(t.body)})}step(e=1/60){let t=performance.now()/1e3;if(!this.lastCallTime)this.world.step(e);else{let i=t-this.lastCallTime;this.world.step(e,i)}this.lastCallTime=t}buildWalls(){this.world.addContactMaterial(new Ve(this.deskMaterial,this.diceMaterial,{friction:.01,restitution:.5,contactEquationRelaxation:3,contactEquationStiffness:1e8})),this.world.addContactMaterial(new Ve(this.barrierMaterial,this.diceMaterial,{friction:.01,restitution:1,contactEquationRelaxation:3,contactEquationStiffness:1e8})),this.world.addContactMaterial(new Ve(this.diceMaterial,this.diceMaterial,{friction:.1,restitution:.5,contactEquationRelaxation:3,contactEquationStiffness:1e8})),this.world.addBody(new i1({allowSleep:!1,mass:0,shape:new i4,material:this.deskMaterial}));let e=new i1({allowSleep:!1,mass:0,shape:new i4,material:this.barrierMaterial});e.quaternion.setFromAxisAngle(new y(1,0,0),Math.PI/2),e.position.set(0,this.HEIGHT*.93,0),this.world.addBody(e),e=new i1({allowSleep:!1,mass:0,shape:new i4,material:this.barrierMaterial}),e.quaternion.setFromAxisAngle(new y(1,0,0),-Math.PI/2),e.position.set(0,-this.HEIGHT*.93,0),this.world.addBody(e),e=new i1({allowSleep:!1,mass:0,shape:new i4,material:this.barrierMaterial}),e.quaternion.setFromAxisAngle(new y(0,1,0),-Math.PI/2),e.position.set(this.WIDTH*.93,0,0),this.world.addBody(e),e=new i1({allowSleep:!1,mass:0,shape:new i4,material:this.barrierMaterial}),e.quaternion.setFromAxisAngle(new y(0,1,0),Math.PI/2),e.position.set(-this.WIDTH*.93,0,0),this.world.addBody(e)}getPlane(){return new i1({type:i1.STATIC,shape:new i4})}},Ao=class extends Xt.Component{constructor(e,t,i){super();this.width=e;this.height=t;this.plugin=i;this.dice={};this.buildDice()}get colors(){return{diceColor:this.plugin.data.diceColor,textColor:this.plugin.data.textColor}}updateColors(){this.dispose(),this.buildDice()}onunload(){this.dispose()}disposeChildren(...e){e.forEach(t=>{"dispose"in t&&t.dispose(),t.children&&this.disposeChildren(...t.children)})}dispose(){for(let e of Object.values(this.dice))this.disposeChildren(e.geometry.children)}getDiceForRoller(e,t){let i=[];switch(e.faces.max){case 4:{i.push(...new Array(e.rolls).fill(0).map(a=>new bi(this.width,this.height,this.clone("d4"),t)));break}case 1:case 6:{i.push(...new Array(e.rolls).fill(0).map(a=>new Mi(this.width,this.height,e.fudge?this.clone("fudge"):this.clone("d6"),t)));break}case 8:{i.push(...new Array(e.rolls).fill(0).map(a=>new xi(this.width,this.height,this.clone("d8"),t)));break}case 10:{i.push(...new Array(e.rolls).fill(0).map(a=>new T4(this.width,this.height,this.clone("d10"),t)));break}case 12:{i.push(...new Array(e.rolls).fill(0).map(a=>new gi(this.width,this.height,this.clone("d12"),t)));break}case 20:{i.push(...new Array(e.rolls).fill(0).map(a=>new vi(this.width,this.height,this.clone("d20"),t)));break}case 100:{i.push(...new Array(e.rolls).fill(0).map(a=>[new T4(this.width,this.height,this.clone("d100"),t,!0),new T4(this.width,this.height,this.clone("d10"),t,!0)]).flat());break}}return i}getDice(e,t){let i=new Map;for(let a of e.dynamic){let r=this.getDiceForRoller(a,t);r.length&&i.set(a,r)}return i}clone(e){if(!(e in this.dice))throw new Error("That dice type does not exist!");return this.dice[e].clone()}buildDice(){this.dice.d100=new ii(this.width,this.height,this.colors).create(),this.dice.d20=new Q3(this.width,this.height,this.colors).create(),this.dice.d12=new ei(this.width,this.height,this.colors).create(),this.dice.d10=new ti(this.width,this.height,this.colors).create(),this.dice.d8=new ai(this.width,this.height,this.colors).create(),this.dice.d6=new ri(this.width,this.height,this.colors).create(),this.dice.d4=new si(this.width,this.height,this.colors).create(),this.dice.fudge=new ni(this.width,this.height,this.colors).create(),this.dice.boost=new pi(this.width,this.height,this.colors).create(),this.dice.ability=new hi(this.width,this.height,this.colors).create(),this.dice.difficulty=new fi(this.width,this.height,this.colors).create(),this.dice.challenge=new li(this.width,this.height,this.colors).create(),this.dice.proficiency=new ci(this.width,this.height,this.colors).create(),this.dice.setback=new mi(this.width,this.height,this.colors).create()}};var _o=S2(So());var Vi=class{constructor(e){this.table=e}parse(e){let t=e.length,i=this.table,a=[],r=[],o=0;for(;of||u===f&&l.associativity==="right")break;a.push(r.shift())}r.unshift(s)}else a.push(s)}}for(;r.length;){let s=r.shift();if(s.value!=="(")a.push(s);else throw new Error("Mismatched parentheses.")}return a}};var ih=/(?:\d+[Dd])?#(?:[\p{Letter}\p{Emoji_Presentation}\w/-]+)(?:\|(?:[+-]))?(?:\|(?:[^+-]+))?/u,ah=/(?:\d+[Dd])?#(?:[\p{Letter}\p{Emoji_Presentation}\w/-]+)(?:\|(?:[+-]))?\|link/u,rh=/(?:.*)?(?:\[.*\]\(|\[\[)(?:.+?)#?\^(?:.+?)(?:\)|\]\])\|?(?:.+)?/u,nh=/(?:\d+[Dd])?(?:\[.*\]\(|\[\[)(?:.+)(?:\)|\]\])\|?(?:.+)?/u,sh=/(?:\d+[Dd])?(?:\[.*\]\(|\[\[)(?:.+)(?:\)|\]\])\|line/u,oh=/[\(\^\+\-\*\/\)]/u,ch=/(?:\d+|\b)[Dd](?:\[?(?:-?\d+[ \t]?,)?[ \t]?(?:-?\d+|%|F)\]?|\b)/u,lh=/(?:=|=!|<|>|<=|>=|=<|=>|-=|=-)\d+/u,g0=class{constructor(e){this.plugin=e;this.lexer=_o.compile({WS:[{match:/[ \t]+/u},{match:/[{}]+/u}],table:rh,line:sh,section:nh,link:ah,tag:ih,condition:lh,kl:{match:/kl\d*/u,value:this.clampInfinite},kh:[{match:/kh\d*/u,value:this.clampInfinite},{match:/k\d*/u,value:this.clampInfinite}],dh:{match:/dh\d*/u,value:this.clampInfinite},dl:[{match:/dl\d*/u,value:this.clampInfinite}],"!!":{match:/!!(?:i|\d+)?/u,value:this.clampInfinite},"!":{match:/!(?:i|\d+)?/u,value:this.clampInfinite},r:{match:/r(?:i|\d+)?/u,value:this.clampInfinite},stunt:/1[Dd]S/u,"%":/\d+[Dd]\d+%/u,dice:[{match:ch,value:e=>{let{roll:t=this.plugin.data.defaultRoll,faces:i=this.plugin.data.defaultFace}=e.match(/(?\d+)?[Dd](?\[?(?:-?\d+[ \t]?,)?[ \t]?(?:-?\d+|%|F)\]?)?/).groups;return`${t}d${i}`}},{match:/\d+/u},{match:/\b[A-Za-z][A-Za-z0-9_]+\b/u,value:e=>this.plugin.inline.has(e)?`${this.plugin.inline.get(e)}`:e}],sort:[{match:/s(?:a|d)*/u,value:e=>e=="s"||e=="sa"?"sa":"sd"}],math:oh});let t={precedence:3,associativity:"right"},i={precedence:2,associativity:"left"},a={precedence:1,associativity:"left"};this.parser=new Vi({"+":a,"-":a,"*":i,"/":i,"^":t})}clampInfinite(e){return/i$/.test(e)?"100":e.replace(/^\D+/g,"")}parse(e){let t=Array.from(this.lexer.reset(e));return this.lexer.reset(),this.parser.parse(this.transform(t))}transform(e){e=e.filter(i=>i.type!="WS");let t=[];for(let i of e)if(i.type=="condition"&&t.length>0){let a=t[t.length-1];a.conditions||(a.conditions=[]);let[r,o,s]=i.value.match(/(?=|=!|<|>|<=|>=|=<|=>|\-=|=\-)(?\d+)/)??[];a.conditions.push({operator:o,comparer:Number(s),value:i.value})}else t.push(i);return t}getTypeFromLexemes(e){return e.some(({type:t})=>t==="table")?"table":e.some(({type:t})=>t==="section")?"section":e.some(({type:t})=>t==="tag")?"tag":e.some(({type:t})=>t==="link")?"link":e.some(({type:t})=>t==="line")?"line":"dice"}};var Se=S2(require("@codemirror/view")),Eo=S2(require("@codemirror/language")),vt=S2(require("obsidian"));function uh(n,e,t){for(let i of n.ranges)if(i.from<=t&&i.to>=e)return!0;return!1}function Lo(n,e){let t=app.workspace.getActiveFile();if(!t)return;let i=[],a=n.state.selection,r=new RegExp(".*?_?inline-code_?.*");for(let{from:o,to:s}of n.visibleRanges)(0,Eo.syntaxTree)(n.state).iterate({from:o,to:s,enter:({node:c})=>{let l=c.type;if(l.name.includes("formatting")||!r.test(l.name))return;let u=c.from,f=c.to;if(uh(a,u,f+1))return;let h=n.state.doc.sliceString(u,f).trim();if(/^dice-mod:\s*([\s\S]+)\s*?/.test(h)){let[,g]=h.match(/dice-mod:\s*([\s\S]+)\s*?/),x=app.workspace.getActiveFile(),p=e.getRollerSync(g,x.path);p.roll().then(d=>{let A=e.data.displayFormulaForMod?`${p.inlineText} **${p.replacer}**`:`${p.replacer}`,b={from:u-1,to:f+1,insert:A},C=n.state.update({changes:b});n.dispatch(C)});return}if(!/^dice(?:\+|\-)?:\s*([\s\S]+)\s*?/.test(h))return;let[,m]=h.match(/^dice(?:\+|\-)?:\s*([\s\S]+)\s*?/),v=e.getRollerSync(m,t.path);i.push(Se.Decoration.replace({widget:new Do(h,v,n),inclusive:!1,block:!1}).range(u-1,f+1))}});return Se.Decoration.set(i,!0)}var Do=class extends Se.WidgetType{constructor(e,t,i){super();this.rawQuery=e;this.roller=t;this.view=i}eq(e){return e.rawQuery===this.rawQuery}toDOM(e){return this.roller.roll(),this.roller.containerEl}ignoreEvent(e){if(e.type==="mousedown"){let t=this.view.posAtCoords({x:e.x,y:e.y});if(e.shiftKey){if(t){let{editor:i}=this.view.state.field(vt.editorEditorField).state.field(vt.editorViewField);i.setCursor(i.offsetToPos(t))}return!1}}return!0}};function To(n){return Se.ViewPlugin.fromClass(class{constructor(e){this.decorations=Lo(e,n)??Se.Decoration.none}update(e){if(!e.state.field(vt.editorLivePreviewField)){this.decorations=Se.Decoration.none;return}(e.docChanged||e.viewportChanged||e.selectionSet)&&(this.decorations=Lo(e.view,n)??Se.Decoration.none)}},{decorations:e=>e.decorations})}String.prototype.matchAll=String.prototype.matchAll||function*(e){let t=e.global?e.flags:e.flags+"g",i=new RegExp(e,t),a;for(;a=i.exec(this);)yield a};var h6={returnAllTags:!0,rollLinksForTags:!1,copyContentButton:!0,customFormulas:[],displayFormulaForMod:!0,displayResultsInline:!1,displayFormulaAfter:!1,displayLookupRoll:!0,formulas:{},persistResults:!1,results:{},defaultRoll:1,defaultFace:100,renderer:!1,renderAllDice:!1,renderTime:2e3,diceColor:"#202020",textColor:"#ffffff",showLeafOnStartup:!0,showDice:!0,round:pe.None},Ri=class extends e2.Plugin{constructor(){super(...arguments);this.fileMap=new Map;this.inline=new Map;this.operators={"+":(e,t)=>e+t,"-":(e,t)=>e-t,"*":(e,t)=>e*t,"/":(e,t)=>e/t,"^":(e,t)=>Math.pow(e,t)};this.parser=new g0(this);this.persistingFiles=new Set}async onload(){console.log("DiceRoller plugin loaded"),this.data=Object.assign({},h6,await this.loadData()),this.renderer=new Zt(this),this.addSettingTab(new u6(this.app,this)),this.registerView(b4,i=>new Qe(this,i)),this.app.workspace.onLayoutReady(()=>this.addDiceView(!0)),this.registerEvent(this.app.workspace.on("dice-roller:update-colors",()=>{this.renderer.factory.updateColors()})),this.registerEvent(this.app.workspace.on("dice-roller:render-dice",async i=>{let a=await this.getRoller(i,"external");if(!(a instanceof _2)){new e2.Notice("The Dice View only supports dice rolls.");return}if(await a.roll(),!a.dice.length){new e2.Notice("Invalid formula.");return}try{this.renderRoll(a)}catch(r){new e2.Notice("There was an error rendering the roll."),console.error(r)}this.app.workspace.trigger("dice-roller:rendered-result",a.result)})),this.addCommand({id:"open-view",name:"Open Dice View",callback:()=>{this.view?this.app.workspace.revealLeaf(this.view.leaf):this.addDiceView()}}),this.addCommand({id:"reroll",name:"Re-roll Dice",checkCallback:i=>{let a=this.app.workspace.getActiveViewOfType(e2.MarkdownView);if(a&&a.getMode()==="preview"&&this.fileMap.has(a.file))return i||this.fileMap.get(a.file).forEach(o=>{o.roll()}),!0}});let e=T0(Ii).html[0];(0,e2.addIcon)(Y2,e);let t=T0(ki).html[0];(0,e2.addIcon)(Te,t),this.registerMarkdownPostProcessor(this.postprocessor.bind(this)),this.registerEditorExtension([To(this)]),this.app.workspace.onLayoutReady(async()=>{await this.registerDataviewInlineFields()})}async postprocessor(e,t){let i=e.querySelectorAll("code");if(!i.length)return;let a=t.sourcePath,r=t.getSectionInfo(e),o=t.getSectionInfo(e)?.lineStart,s=this.app.vault.getAbstractFileByPath(t.sourcePath);if((!s||!(s instanceof e2.TFile))&&a!="STATBLOCK_RENDERER")return;let c={},l,u=!1,f=[];for(let h=0;h{p.on("new-result",async()=>{let b=l.slice(r.lineStart,r.lineEnd+1),C=p.replacer;if(!C){new e2.Notice("Dice Roller: There was an issue modifying the file.");return}let E=x?`${p.inlineText} ${C}`:`${C}`;b=b.join(` +`;function vo(n,e,t){let i=new T4,a=new z1,r=new z1,s=new q1,o=new c0({depthPacking:w8}),c=new l0,l={},u=t.maxTextureSize,f={0:P1,1:Ie,2:J2},h=new se({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new z1},radius:{value:4}},vertexShader:po,fragmentShader:mo}),p=h.clone();p.defines.HORIZONTAL_PASS=1;let v=new b2;v.setAttribute("position",new M2(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));let g=new l2(v,h),x=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=w6,this.render=function(b,C,E){if(x.enabled===!1||x.autoUpdate===!1&&x.needsUpdate===!1||b.length===0)return;let T=n.getRenderTarget(),_=n.getActiveCubeFace(),P=n.getActiveMipmapLevel(),F=n.state;F.setBlending(U2),F.buffers.color.setClear(1,1,1,1),F.buffers.depth.setTest(!0),F.setScissorTest(!1);for(let M=0,D=b.length;Mu||a.y>u)&&(a.x>u&&(r.x=Math.floor(u/V.x),a.x=r.x*V.x,H.mapSize.x=r.x),a.y>u&&(r.y=Math.floor(u/V.y),a.y=r.y*V.y,H.mapSize.y=r.y)),H.map===null&&!H.isPointLightShadow&&this.type===z4){let N={minFilter:t2,magFilter:t2,format:W1};H.map=new p2(a.x,a.y,N),H.map.texture.name=z.name+".shadowMap",H.mapPass=new p2(a.x,a.y,N),H.camera.updateProjectionMatrix()}if(H.map===null){let N={minFilter:e2,magFilter:e2,format:W1};H.map=new p2(a.x,a.y,N),H.map.texture.name=z.name+".shadowMap",H.camera.updateProjectionMatrix()}n.setRenderTarget(H.map),n.clear();let L=H.getViewportCount();for(let N=0;N0){let z=M.uuid,H=E.uuid,V=l[z];V===void 0&&(V={},l[z]=V);let L=V[H];L===void 0&&(L=M.clone(),V[H]=L),M=L}return M.visible=E.visible,M.wireframe=E.wireframe,F===z4?M.side=E.shadowSide!==null?E.shadowSide:E.side:M.side=E.shadowSide!==null?E.shadowSide:f[E.side],M.alphaMap=E.alphaMap,M.alphaTest=E.alphaTest,M.clipShadows=E.clipShadows,M.clippingPlanes=E.clippingPlanes,M.clipIntersection=E.clipIntersection,M.displacementMap=E.displacementMap,M.displacementScale=E.displacementScale,M.displacementBias=E.displacementBias,M.wireframeLinewidth=E.wireframeLinewidth,M.linewidth=E.linewidth,T.isPointLight===!0&&M.isMeshDistanceMaterial===!0&&(M.referencePosition.setFromMatrixPosition(T.matrixWorld),M.nearDistance=_,M.farDistance=P),M}function A(b,C,E,T,_){if(b.visible===!1)return;if(b.layers.test(C.layers)&&(b.isMesh||b.isLine||b.isPoints)&&(b.castShadow||b.receiveShadow&&_===z4)&&(!b.frustumCulled||i.intersectsObject(b))){b.modelViewMatrix.multiplyMatrices(E.matrixWorldInverse,b.matrixWorld);let M=e.update(b),D=b.material;if(Array.isArray(D)){let z=M.groups;for(let H=0,V=z.length;H=1):L.indexOf("OpenGL ES")!==-1&&(V=parseFloat(/^OpenGL ES (\d)/.exec(L)[1]),H=V>=2);let N=null,U={},Z=n.getParameter(n.SCISSOR_BOX),O=n.getParameter(n.VIEWPORT),W=new q1().fromArray(Z),X=new q1().fromArray(O);function Q(I,l1,o1){let m1=new Uint8Array(4),$=n.createTexture();n.bindTexture(I,$),n.texParameteri(I,n.TEXTURE_MIN_FILTER,n.NEAREST),n.texParameteri(I,n.TEXTURE_MAG_FILTER,n.NEAREST);for(let p1=0;p1t1||R.height>t1)&&(h1=t1/Math.max(R.width,R.height)),h1<1||w===!0)if(typeof HTMLImageElement!="undefined"&&R instanceof HTMLImageElement||typeof HTMLCanvasElement!="undefined"&&R instanceof HTMLCanvasElement||typeof ImageBitmap!="undefined"&&R instanceof ImageBitmap){let Y=w?Dr:Math.floor,d1=Y(h1*R.width),f1=Y(h1*R.height);g===void 0&&(g=m(d1,f1));let s1=J?m(d1,f1):g;return s1.width=d1,s1.height=f1,s1.getContext("2d").drawImage(R,0,0,d1,f1),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+R.width+"x"+R.height+") to ("+d1+"x"+f1+")."),s1}else return"data"in R&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+R.width+"x"+R.height+")."),R;return R}function A(R){return e3(R.width)&&e3(R.height)}function b(R){return o?!1:R.wrapS!==o2||R.wrapT!==o2||R.minFilter!==e2&&R.minFilter!==t2}function C(R,w){return R.generateMipmaps&&w&&R.minFilter!==e2&&R.minFilter!==t2}function E(R){n.generateMipmap(R)}function T(R,w,J,t1,h1=!1){if(o===!1)return w;if(R!==null){if(n[R]!==void 0)return n[R];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+R+"'")}let Y=w;return w===n.RED&&(J===n.FLOAT&&(Y=n.R32F),J===n.HALF_FLOAT&&(Y=n.R16F),J===n.UNSIGNED_BYTE&&(Y=n.R8)),w===n.RG&&(J===n.FLOAT&&(Y=n.RG32F),J===n.HALF_FLOAT&&(Y=n.RG16F),J===n.UNSIGNED_BYTE&&(Y=n.RG8)),w===n.RGBA&&(J===n.FLOAT&&(Y=n.RGBA32F),J===n.HALF_FLOAT&&(Y=n.RGBA16F),J===n.UNSIGNED_BYTE&&(Y=t1===I1&&h1===!1?n.SRGB8_ALPHA8:n.RGBA8),J===n.UNSIGNED_SHORT_4_4_4_4&&(Y=n.RGBA4),J===n.UNSIGNED_SHORT_5_5_5_1&&(Y=n.RGB5_A1)),(Y===n.R16F||Y===n.R32F||Y===n.RG16F||Y===n.RG32F||Y===n.RGBA16F||Y===n.RGBA32F)&&e.get("EXT_color_buffer_float"),Y}function _(R,w,J){return C(R,J)===!0||R.isFramebufferTexture&&R.minFilter!==e2&&R.minFilter!==t2?Math.log2(Math.max(w.width,w.height))+1:R.mipmaps!==void 0&&R.mipmaps.length>0?R.mipmaps.length:R.isCompressedTexture&&Array.isArray(R.image)?w.mipmaps.length:1}function P(R){return R===e2||R===h3||R===f3?n.NEAREST:n.LINEAR}function F(R){let w=R.target;w.removeEventListener("dispose",F),D(w),w.isVideoTexture&&v.delete(w),s.memory.textures--}function M(R){let w=R.target;w.removeEventListener("dispose",M),z(w)}function D(R){let w=i.get(R);w.__webglInit!==void 0&&(n.deleteTexture(w.__webglTexture),i.remove(R))}function z(R){let w=R.texture,J=i.get(R),t1=i.get(w);if(!!R){if(t1.__webglTexture!==void 0&&(n.deleteTexture(t1.__webglTexture),s.memory.textures--),R.depthTexture&&R.depthTexture.dispose(),R.isWebGLCubeRenderTarget)for(let h1=0;h1<6;h1++)n.deleteFramebuffer(J.__webglFramebuffer[h1]),J.__webglDepthbuffer&&n.deleteRenderbuffer(J.__webglDepthbuffer[h1]);else n.deleteFramebuffer(J.__webglFramebuffer),J.__webglDepthbuffer&&n.deleteRenderbuffer(J.__webglDepthbuffer),J.__webglMultisampledFramebuffer&&n.deleteFramebuffer(J.__webglMultisampledFramebuffer),J.__webglColorRenderbuffer&&n.deleteRenderbuffer(J.__webglColorRenderbuffer),J.__webglDepthRenderbuffer&&n.deleteRenderbuffer(J.__webglDepthRenderbuffer);if(R.isWebGLMultipleRenderTargets)for(let h1=0,Y=w.length;h1=c&&console.warn("THREE.WebGLTextures: Trying to use "+R+" texture units while this GPU supports only "+c),H+=1,R}function N(R,w){let J=i.get(R);if(R.isVideoTexture&&j2(R),R.version>0&&J.__version!==R.version){let t1=R.image;if(t1===void 0)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined");else if(t1.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{B(J,R,w);return}}t.activeTexture(n.TEXTURE0+w),t.bindTexture(n.TEXTURE_2D,J.__webglTexture)}function U(R,w){let J=i.get(R);if(R.version>0&&J.__version!==R.version){B(J,R,w);return}t.activeTexture(n.TEXTURE0+w),t.bindTexture(n.TEXTURE_2D_ARRAY,J.__webglTexture)}function Z(R,w){let J=i.get(R);if(R.version>0&&J.__version!==R.version){B(J,R,w);return}t.activeTexture(n.TEXTURE0+w),t.bindTexture(n.TEXTURE_3D,J.__webglTexture)}function O(R,w){let J=i.get(R);if(R.version>0&&J.__version!==R.version){M1(J,R,w);return}t.activeTexture(n.TEXTURE0+w),t.bindTexture(n.TEXTURE_CUBE_MAP,J.__webglTexture)}let W={[Ht]:n.REPEAT,[o2]:n.CLAMP_TO_EDGE,[Vt]:n.MIRRORED_REPEAT},X={[e2]:n.NEAREST,[h3]:n.NEAREST_MIPMAP_NEAREST,[f3]:n.NEAREST_MIPMAP_LINEAR,[t2]:n.LINEAR,[l8]:n.LINEAR_MIPMAP_NEAREST,[r4]:n.LINEAR_MIPMAP_LINEAR};function Q(R,w,J){if(J?(n.texParameteri(R,n.TEXTURE_WRAP_S,W[w.wrapS]),n.texParameteri(R,n.TEXTURE_WRAP_T,W[w.wrapT]),(R===n.TEXTURE_3D||R===n.TEXTURE_2D_ARRAY)&&n.texParameteri(R,n.TEXTURE_WRAP_R,W[w.wrapR]),n.texParameteri(R,n.TEXTURE_MAG_FILTER,X[w.magFilter]),n.texParameteri(R,n.TEXTURE_MIN_FILTER,X[w.minFilter])):(n.texParameteri(R,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE),n.texParameteri(R,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE),(R===n.TEXTURE_3D||R===n.TEXTURE_2D_ARRAY)&&n.texParameteri(R,n.TEXTURE_WRAP_R,n.CLAMP_TO_EDGE),(w.wrapS!==o2||w.wrapT!==o2)&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),n.texParameteri(R,n.TEXTURE_MAG_FILTER,P(w.magFilter)),n.texParameteri(R,n.TEXTURE_MIN_FILTER,P(w.minFilter)),w.minFilter!==e2&&w.minFilter!==t2&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),e.has("EXT_texture_filter_anisotropic")===!0){let t1=e.get("EXT_texture_filter_anisotropic");if(w.type===Q2&&e.has("OES_texture_float_linear")===!1||o===!1&&w.type===ye&&e.has("OES_texture_half_float_linear")===!1)return;(w.anisotropy>1||i.get(w).__currentAnisotropy)&&(n.texParameterf(R,t1.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(w.anisotropy,a.getMaxAnisotropy())),i.get(w).__currentAnisotropy=w.anisotropy)}}function a1(R,w){R.__webglInit===void 0&&(R.__webglInit=!0,w.addEventListener("dispose",F),R.__webglTexture=n.createTexture(),s.memory.textures++)}function B(R,w,J){let t1=n.TEXTURE_2D;w.isDataTexture2DArray&&(t1=n.TEXTURE_2D_ARRAY),w.isDataTexture3D&&(t1=n.TEXTURE_3D),a1(R,w),t.activeTexture(n.TEXTURE0+J),t.bindTexture(t1,R.__webglTexture),n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,w.flipY),n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,w.premultiplyAlpha),n.pixelStorei(n.UNPACK_ALIGNMENT,w.unpackAlignment),n.pixelStorei(n.UNPACK_COLORSPACE_CONVERSION_WEBGL,n.NONE);let h1=b(w)&&A(w.image)===!1,Y=d(w.image,h1,!1,u);Y=m2(w,Y);let d1=A(Y)||o,f1=r.convert(w.format,w.encoding),s1=r.convert(w.type),r1=T(w.internalFormat,f1,s1,w.encoding,w.isVideoTexture);Q(t1,w,d1);let b1,I=w.mipmaps,l1=o&&w.isVideoTexture!==!0,o1=R.__version===void 0,m1=_(w,Y,d1);if(w.isDepthTexture)r1=n.DEPTH_COMPONENT,o?w.type===Q2?r1=n.DEPTH_COMPONENT32F:w.type===q4?r1=n.DEPTH_COMPONENT24:w.type===Ce?r1=n.DEPTH24_STENCIL8:r1=n.DEPTH_COMPONENT16:w.type===Q2&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),w.format===ee&&r1===n.DEPTH_COMPONENT&&w.type!==Ue&&w.type!==q4&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),w.type=Ue,s1=r.convert(w.type)),w.format===ze&&r1===n.DEPTH_COMPONENT&&(r1=n.DEPTH_STENCIL,w.type!==Ce&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),w.type=Ce,s1=r.convert(w.type))),l1&&o1?t.texStorage2D(n.TEXTURE_2D,1,r1,Y.width,Y.height):t.texImage2D(n.TEXTURE_2D,0,r1,Y.width,Y.height,0,f1,s1,null);else if(w.isDataTexture)if(I.length>0&&d1){l1&&o1&&t.texStorage2D(n.TEXTURE_2D,m1,r1,I[0].width,I[0].height);for(let $=0,p1=I.length;$0&&d1){l1&&o1&&t.texStorage2D(n.TEXTURE_2D,m1,r1,I[0].width,I[0].height);for(let $=0,p1=I.length;$0&&o1++,t.texStorage2D(n.TEXTURE_CUBE_MAP,o1,b1,Y[0].width,Y[0].height));for(let $=0;$<6;$++)if(h1){I?t.texSubImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+$,0,0,0,Y[$].width,Y[$].height,s1,r1,Y[$].data):t.texImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+$,0,b1,Y[$].width,Y[$].height,0,s1,r1,Y[$].data);for(let p1=0;p1p+v?(l.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!l.inputState.pinching&&h<=p-v&&(l.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else c!==null&&e.gripSpace&&(r=t.getPose(e.gripSpace,i),r!==null&&(c.matrix.fromArray(r.transform.matrix),c.matrix.decompose(c.position,c.rotation,c.scale),r.linearVelocity?(c.hasLinearVelocity=!0,c.linearVelocity.copy(r.linearVelocity)):c.hasLinearVelocity=!1,r.angularVelocity?(c.hasAngularVelocity=!0,c.angularVelocity.copy(r.angularVelocity)):c.hasAngularVelocity=!1));return o!==null&&(o.visible=a!==null),c!==null&&(c.visible=r!==null),l!==null&&(l.visible=s!==null),this}};var jt=class extends K1{constructor(e,t,i,a,r,s,o,c,l,u){if(u=u!==void 0?u:ee,u!==ee&&u!==ze)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");i===void 0&&u===ee&&(i=Ue),i===void 0&&u===ze&&(i=Ce);super(null,a,r,s,o,c,u,i,l);this.image={width:e,height:t},this.magFilter=o!==void 0?o:e2,this.minFilter=c!==void 0?c:e2,this.flipY=!1,this.generateMipmaps=!1}};jt.prototype.isDepthTexture=!0;var Ti=class extends F2{constructor(e,t){super();let i=this,a=null,r=1,s=null,o="local-floor",c=e.extensions.has("WEBGL_multisampled_render_to_texture"),l=null,u=null,f=null,h=null,p=!1,v=null,g=t.getContextAttributes(),x=null,m=null,d=[],A=new Map,b=new i2;b.layers.enable(1),b.viewport=new q1;let C=new i2;C.layers.enable(2),C.viewport=new q1;let E=[b,C],T=new u0;T.layers.enable(1),T.layers.enable(2);let _=null,P=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(O){let W=d[O];return W===void 0&&(W=new Wt,d[O]=W),W.getTargetRaySpace()},this.getControllerGrip=function(O){let W=d[O];return W===void 0&&(W=new Wt,d[O]=W),W.getGripSpace()},this.getHand=function(O){let W=d[O];return W===void 0&&(W=new Wt,d[O]=W),W.getHandSpace()};function F(O){let W=A.get(O.inputSource);W&&W.dispatchEvent({type:O.type,data:O.inputSource})}function M(){A.forEach(function(O,W){O.disconnect(W)}),A.clear(),_=null,P=null,e.setRenderTarget(x),h=null,f=null,u=null,a=null,m=null,Z.stop(),i.isPresenting=!1,i.dispatchEvent({type:"sessionend"})}this.setFramebufferScaleFactor=function(O){r=O,i.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(O){o=O,i.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return s},this.getBaseLayer=function(){return f!==null?f:h},this.getBinding=function(){return u},this.getFrame=function(){return v},this.getSession=function(){return a},this.setSession=async function(O){if(a=O,a!==null){if(x=e.getRenderTarget(),a.addEventListener("select",F),a.addEventListener("selectstart",F),a.addEventListener("selectend",F),a.addEventListener("squeeze",F),a.addEventListener("squeezestart",F),a.addEventListener("squeezeend",F),a.addEventListener("end",M),a.addEventListener("inputsourceschange",D),g.xrCompatible!==!0&&await t.makeXRCompatible(),a.renderState.layers===void 0||e.capabilities.isWebGL2===!1){let W={antialias:a.renderState.layers===void 0?g.antialias:!0,alpha:g.alpha,depth:g.depth,stencil:g.stencil,framebufferScaleFactor:r};h=new XRWebGLLayer(a,t,W),a.updateRenderState({baseLayer:h}),m=new p2(h.framebufferWidth,h.framebufferHeight,{format:W1,type:N2,encoding:e.outputEncoding})}else{p=g.antialias;let W=null,X=null,Q=null;g.depth&&(Q=g.stencil?t.DEPTH24_STENCIL8:t.DEPTH_COMPONENT24,W=g.stencil?ze:ee,X=g.stencil?Ce:Ue);let a1={colorFormat:e.outputEncoding===I1?t.SRGB8_ALPHA8:t.RGBA8,depthFormat:Q,scaleFactor:r};u=new XRWebGLBinding(a,t),f=u.createProjectionLayer(a1),a.updateRenderState({layers:[f]}),p?m=new ft(f.textureWidth,f.textureHeight,{format:W1,type:N2,depthTexture:new jt(f.textureWidth,f.textureHeight,X,void 0,void 0,void 0,void 0,void 0,void 0,W),stencilBuffer:g.stencil,ignoreDepth:f.ignoreDepthValues,useRenderToTexture:c,encoding:e.outputEncoding}):m=new p2(f.textureWidth,f.textureHeight,{format:W1,type:N2,depthTexture:new jt(f.textureWidth,f.textureHeight,X,void 0,void 0,void 0,void 0,void 0,void 0,W),stencilBuffer:g.stencil,ignoreDepth:f.ignoreDepthValues,encoding:e.outputEncoding})}m.isXRRenderTarget=!0,this.setFoveation(1),s=await a.requestReferenceSpace(o),Z.setContext(a),Z.start(),i.isPresenting=!0,i.dispatchEvent({type:"sessionstart"})}};function D(O){let W=a.inputSources;for(let X=0;X0&&(m.alphaTest.value=d.alphaTest);let A=n.get(d).envMap;A&&(m.envMap.value=A,m.flipEnvMap.value=A.isCubeTexture&&A.isRenderTargetTexture===!1?-1:1,m.reflectivity.value=d.reflectivity,m.ior.value=d.ior,m.refractionRatio.value=d.refractionRatio),d.lightMap&&(m.lightMap.value=d.lightMap,m.lightMapIntensity.value=d.lightMapIntensity),d.aoMap&&(m.aoMap.value=d.aoMap,m.aoMapIntensity.value=d.aoMapIntensity);let b;d.map?b=d.map:d.specularMap?b=d.specularMap:d.displacementMap?b=d.displacementMap:d.normalMap?b=d.normalMap:d.bumpMap?b=d.bumpMap:d.roughnessMap?b=d.roughnessMap:d.metalnessMap?b=d.metalnessMap:d.alphaMap?b=d.alphaMap:d.emissiveMap?b=d.emissiveMap:d.clearcoatMap?b=d.clearcoatMap:d.clearcoatNormalMap?b=d.clearcoatNormalMap:d.clearcoatRoughnessMap?b=d.clearcoatRoughnessMap:d.specularIntensityMap?b=d.specularIntensityMap:d.specularColorMap?b=d.specularColorMap:d.transmissionMap?b=d.transmissionMap:d.thicknessMap?b=d.thicknessMap:d.sheenColorMap?b=d.sheenColorMap:d.sheenRoughnessMap&&(b=d.sheenRoughnessMap),b!==void 0&&(b.isWebGLRenderTarget&&(b=b.texture),b.matrixAutoUpdate===!0&&b.updateMatrix(),m.uvTransform.value.copy(b.matrix));let C;d.aoMap?C=d.aoMap:d.lightMap&&(C=d.lightMap),C!==void 0&&(C.isWebGLRenderTarget&&(C=C.texture),C.matrixAutoUpdate===!0&&C.updateMatrix(),m.uv2Transform.value.copy(C.matrix))}function a(m,d){m.diffuse.value.copy(d.color),m.opacity.value=d.opacity}function r(m,d){m.dashSize.value=d.dashSize,m.totalSize.value=d.dashSize+d.gapSize,m.scale.value=d.scale}function s(m,d,A,b){m.diffuse.value.copy(d.color),m.opacity.value=d.opacity,m.size.value=d.size*A,m.scale.value=b*.5,d.map&&(m.map.value=d.map),d.alphaMap&&(m.alphaMap.value=d.alphaMap),d.alphaTest>0&&(m.alphaTest.value=d.alphaTest);let C;d.map?C=d.map:d.alphaMap&&(C=d.alphaMap),C!==void 0&&(C.matrixAutoUpdate===!0&&C.updateMatrix(),m.uvTransform.value.copy(C.matrix))}function o(m,d){m.diffuse.value.copy(d.color),m.opacity.value=d.opacity,m.rotation.value=d.rotation,d.map&&(m.map.value=d.map),d.alphaMap&&(m.alphaMap.value=d.alphaMap),d.alphaTest>0&&(m.alphaTest.value=d.alphaTest);let A;d.map?A=d.map:d.alphaMap&&(A=d.alphaMap),A!==void 0&&(A.matrixAutoUpdate===!0&&A.updateMatrix(),m.uvTransform.value.copy(A.matrix))}function c(m,d){d.emissiveMap&&(m.emissiveMap.value=d.emissiveMap)}function l(m,d){m.specular.value.copy(d.specular),m.shininess.value=Math.max(d.shininess,1e-4),d.emissiveMap&&(m.emissiveMap.value=d.emissiveMap),d.bumpMap&&(m.bumpMap.value=d.bumpMap,m.bumpScale.value=d.bumpScale,d.side===P1&&(m.bumpScale.value*=-1)),d.normalMap&&(m.normalMap.value=d.normalMap,m.normalScale.value.copy(d.normalScale),d.side===P1&&m.normalScale.value.negate()),d.displacementMap&&(m.displacementMap.value=d.displacementMap,m.displacementScale.value=d.displacementScale,m.displacementBias.value=d.displacementBias)}function u(m,d){d.gradientMap&&(m.gradientMap.value=d.gradientMap),d.emissiveMap&&(m.emissiveMap.value=d.emissiveMap),d.bumpMap&&(m.bumpMap.value=d.bumpMap,m.bumpScale.value=d.bumpScale,d.side===P1&&(m.bumpScale.value*=-1)),d.normalMap&&(m.normalMap.value=d.normalMap,m.normalScale.value.copy(d.normalScale),d.side===P1&&m.normalScale.value.negate()),d.displacementMap&&(m.displacementMap.value=d.displacementMap,m.displacementScale.value=d.displacementScale,m.displacementBias.value=d.displacementBias)}function f(m,d){m.roughness.value=d.roughness,m.metalness.value=d.metalness,d.roughnessMap&&(m.roughnessMap.value=d.roughnessMap),d.metalnessMap&&(m.metalnessMap.value=d.metalnessMap),d.emissiveMap&&(m.emissiveMap.value=d.emissiveMap),d.bumpMap&&(m.bumpMap.value=d.bumpMap,m.bumpScale.value=d.bumpScale,d.side===P1&&(m.bumpScale.value*=-1)),d.normalMap&&(m.normalMap.value=d.normalMap,m.normalScale.value.copy(d.normalScale),d.side===P1&&m.normalScale.value.negate()),d.displacementMap&&(m.displacementMap.value=d.displacementMap,m.displacementScale.value=d.displacementScale,m.displacementBias.value=d.displacementBias),n.get(d).envMap&&(m.envMapIntensity.value=d.envMapIntensity)}function h(m,d,A){f(m,d),m.ior.value=d.ior,d.sheen>0&&(m.sheenColor.value.copy(d.sheenColor).multiplyScalar(d.sheen),m.sheenRoughness.value=d.sheenRoughness,d.sheenColorMap&&(m.sheenColorMap.value=d.sheenColorMap),d.sheenRoughnessMap&&(m.sheenRoughnessMap.value=d.sheenRoughnessMap)),d.clearcoat>0&&(m.clearcoat.value=d.clearcoat,m.clearcoatRoughness.value=d.clearcoatRoughness,d.clearcoatMap&&(m.clearcoatMap.value=d.clearcoatMap),d.clearcoatRoughnessMap&&(m.clearcoatRoughnessMap.value=d.clearcoatRoughnessMap),d.clearcoatNormalMap&&(m.clearcoatNormalScale.value.copy(d.clearcoatNormalScale),m.clearcoatNormalMap.value=d.clearcoatNormalMap,d.side===P1&&m.clearcoatNormalScale.value.negate())),d.transmission>0&&(m.transmission.value=d.transmission,m.transmissionSamplerMap.value=A.texture,m.transmissionSamplerSize.value.set(A.width,A.height),d.transmissionMap&&(m.transmissionMap.value=d.transmissionMap),m.thickness.value=d.thickness,d.thicknessMap&&(m.thicknessMap.value=d.thicknessMap),m.attenuationDistance.value=d.attenuationDistance,m.attenuationColor.value.copy(d.attenuationColor)),m.specularIntensity.value=d.specularIntensity,m.specularColor.value.copy(d.specularColor),d.specularIntensityMap&&(m.specularIntensityMap.value=d.specularIntensityMap),d.specularColorMap&&(m.specularColorMap.value=d.specularColorMap)}function p(m,d){d.matcap&&(m.matcap.value=d.matcap),d.bumpMap&&(m.bumpMap.value=d.bumpMap,m.bumpScale.value=d.bumpScale,d.side===P1&&(m.bumpScale.value*=-1)),d.normalMap&&(m.normalMap.value=d.normalMap,m.normalScale.value.copy(d.normalScale),d.side===P1&&m.normalScale.value.negate()),d.displacementMap&&(m.displacementMap.value=d.displacementMap,m.displacementScale.value=d.displacementScale,m.displacementBias.value=d.displacementBias)}function v(m,d){d.displacementMap&&(m.displacementMap.value=d.displacementMap,m.displacementScale.value=d.displacementScale,m.displacementBias.value=d.displacementBias)}function g(m,d){d.displacementMap&&(m.displacementMap.value=d.displacementMap,m.displacementScale.value=d.displacementScale,m.displacementBias.value=d.displacementBias),m.referencePosition.value.copy(d.referencePosition),m.nearDistance.value=d.nearDistance,m.farDistance.value=d.farDistance}function x(m,d){d.bumpMap&&(m.bumpMap.value=d.bumpMap,m.bumpScale.value=d.bumpScale,d.side===P1&&(m.bumpScale.value*=-1)),d.normalMap&&(m.normalMap.value=d.normalMap,m.normalScale.value.copy(d.normalScale),d.side===P1&&m.normalScale.value.negate()),d.displacementMap&&(m.displacementMap.value=d.displacementMap,m.displacementScale.value=d.displacementScale,m.displacementBias.value=d.displacementBias)}return{refreshFogUniforms:e,refreshMaterialUniforms:t}}function ih(){let n=E4("canvas");return n.style.display="block",n}function Hi(n={}){let e=n.canvas!==void 0?n.canvas:ih(),t=n.context!==void 0?n.context:null,i=n.alpha!==void 0?n.alpha:!1,a=n.depth!==void 0?n.depth:!0,r=n.stencil!==void 0?n.stencil:!0,s=n.antialias!==void 0?n.antialias:!1,o=n.premultipliedAlpha!==void 0?n.premultipliedAlpha:!0,c=n.preserveDrawingBuffer!==void 0?n.preserveDrawingBuffer:!1,l=n.powerPreference!==void 0?n.powerPreference:"default",u=n.failIfMajorPerformanceCaveat!==void 0?n.failIfMajorPerformanceCaveat:!1,f=null,h=null,p=[],v=[];this.domElement=e,this.debug={checkShaderErrors:!0},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.outputEncoding=R2,this.physicallyCorrectLights=!1,this.toneMapping=O2,this.toneMappingExposure=1;let g=this,x=!1,m=0,d=0,A=null,b=-1,C=null,E=new q1,T=new q1,_=null,P=e.width,F=e.height,M=1,D=null,z=null,H=new q1(0,0,P,F),V=new q1(0,0,P,F),L=!1,N=new T4,U=!1,Z=!1,O=null,W=new k1,X=new k,Q={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function a1(){return A===null?M:1}let B=t;function M1(S,G){for(let j=0;j0?h=v[v.length-1]:h=null,p.pop(),p.length>0?f=p[p.length-1]:f=null};function Y1(S,G,j,q){if(S.visible===!1)return;if(S.layers.test(G.layers)){if(S.isGroup)j=S.renderOrder;else if(S.isLOD)S.autoUpdate===!0&&S.update(G);else if(S.isLight)h.pushLight(S),S.castShadow&&h.pushShadow(S);else if(S.isSprite){if(!S.frustumCulled||N.intersectsSprite(S)){q&&X.setFromMatrixPosition(S.matrixWorld).applyMatrix4(W);let y1=m2.update(S),E1=S.material;E1.visible&&f.push(S,y1,E1,j,X.z,null)}}else if((S.isMesh||S.isLine||S.isPoints)&&(S.isSkinnedMesh&&S.skeleton.frame!==T1.render.frame&&(S.skeleton.update(),S.skeleton.frame=T1.render.frame),!S.frustumCulled||N.intersectsObject(S))){q&&X.setFromMatrixPosition(S.matrixWorld).applyMatrix4(W);let y1=m2.update(S),E1=S.material;if(Array.isArray(E1)){let w1=y1.groups;for(let B1=0,H1=w1.length;B10&&_e(K,G,j),q&&n1.viewport(E.copy(q)),K.length>0&&Yt(K,G,j),g1.length>0&&Yt(g1,G,j),y1.length>0&&Yt(y1,G,j)}function _e(S,G,j){if(O===null){let y1=s===!0&&v1.isWebGL2===!0?ft:p2;O=new y1(1024,1024,{generateMipmaps:!0,type:d1.convert(ye)!==null?ye:N2,minFilter:r4,magFilter:e2,wrapS:o2,wrapT:o2,useRenderToTexture:u1.has("WEBGL_multisampled_render_to_texture")})}let q=g.getRenderTarget();g.setRenderTarget(O),g.clear();let K=g.toneMapping;g.toneMapping=O2,Yt(S,G,j),g.toneMapping=K,C1.updateMultisampleRenderTarget(O),C1.updateRenderTargetMipmap(O),g.setRenderTarget(q)}function Yt(S,G,j){let q=G.isScene===!0?G.overrideMaterial:null;for(let K=0,g1=S.length;K=0&&G<=S.width-q&&j>=0&&j<=S.height-K&&B.readPixels(G,j,q,K,d1.convert(B1),d1.convert(H1),g1):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.")}finally{let w1=A!==null?A1.get(A).__webglFramebuffer:null;n1.bindFramebuffer(B.FRAMEBUFFER,w1)}}},this.copyFramebufferToTexture=function(S,G,j=0){if(G.isFramebufferTexture!==!0){console.error("THREE.WebGLRenderer: copyFramebufferToTexture() can only be used with FramebufferTexture.");return}let q=Math.pow(2,-j),K=Math.floor(G.image.width*q),g1=Math.floor(G.image.height*q);C1.setTexture2D(G,0),B.copyTexSubImage2D(B.TEXTURE_2D,j,0,0,S.x,S.y,K,g1),n1.unbindTexture()},this.copyTextureToTexture=function(S,G,j,q=0){let K=G.image.width,g1=G.image.height,y1=d1.convert(j.format),E1=d1.convert(j.type);C1.setTexture2D(j,0),B.pixelStorei(B.UNPACK_FLIP_Y_WEBGL,j.flipY),B.pixelStorei(B.UNPACK_PREMULTIPLY_ALPHA_WEBGL,j.premultiplyAlpha),B.pixelStorei(B.UNPACK_ALIGNMENT,j.unpackAlignment),G.isDataTexture?B.texSubImage2D(B.TEXTURE_2D,q,S.x,S.y,K,g1,y1,E1,G.image.data):G.isCompressedTexture?B.compressedTexSubImage2D(B.TEXTURE_2D,q,S.x,S.y,G.mipmaps[0].width,G.mipmaps[0].height,y1,G.mipmaps[0].data):B.texSubImage2D(B.TEXTURE_2D,q,S.x,S.y,y1,E1,G.image),q===0&&j.generateMipmaps&&B.generateMipmap(B.TEXTURE_2D),n1.unbindTexture()},this.copyTextureToTexture3D=function(S,G,j,q,K=0){if(g.isWebGL1Renderer){console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");return}let g1=S.max.x-S.min.x+1,y1=S.max.y-S.min.y+1,E1=S.max.z-S.min.z+1,w1=d1.convert(q.format),B1=d1.convert(q.type),H1;if(q.isDataTexture3D)C1.setTexture3D(q,0),H1=B.TEXTURE_3D;else if(q.isDataTexture2DArray)C1.setTexture2DArray(q,0),H1=B.TEXTURE_2D_ARRAY;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}B.pixelStorei(B.UNPACK_FLIP_Y_WEBGL,q.flipY),B.pixelStorei(B.UNPACK_PREMULTIPLY_ALPHA_WEBGL,q.premultiplyAlpha),B.pixelStorei(B.UNPACK_ALIGNMENT,q.unpackAlignment);let V1=B.getParameter(B.UNPACK_ROW_LENGTH),$1=B.getParameter(B.UNPACK_IMAGE_HEIGHT),p4=B.getParameter(B.UNPACK_SKIP_PIXELS),R4=B.getParameter(B.UNPACK_SKIP_ROWS),R1=B.getParameter(B.UNPACK_SKIP_IMAGES),ue=j.isCompressedTexture?j.mipmaps[0]:j.image;B.pixelStorei(B.UNPACK_ROW_LENGTH,ue.width),B.pixelStorei(B.UNPACK_IMAGE_HEIGHT,ue.height),B.pixelStorei(B.UNPACK_SKIP_PIXELS,S.min.x),B.pixelStorei(B.UNPACK_SKIP_ROWS,S.min.y),B.pixelStorei(B.UNPACK_SKIP_IMAGES,S.min.z),j.isDataTexture||j.isDataTexture3D?B.texSubImage3D(H1,K,G.x,G.y,G.z,g1,y1,E1,w1,B1,ue.data):j.isCompressedTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),B.compressedTexSubImage3D(H1,K,G.x,G.y,G.z,g1,y1,E1,w1,ue.data)):B.texSubImage3D(H1,K,G.x,G.y,G.z,g1,y1,E1,w1,B1,ue),B.pixelStorei(B.UNPACK_ROW_LENGTH,V1),B.pixelStorei(B.UNPACK_IMAGE_HEIGHT,$1),B.pixelStorei(B.UNPACK_SKIP_PIXELS,p4),B.pixelStorei(B.UNPACK_SKIP_ROWS,R4),B.pixelStorei(B.UNPACK_SKIP_IMAGES,R1),K===0&&q.generateMipmaps&&B.generateMipmap(H1),n1.unbindTexture()},this.initTexture=function(S){C1.setTexture2D(S,0),n1.unbindTexture()},this.resetState=function(){m=0,d=0,A=null,n1.reset(),f1.reset()},typeof __THREE_DEVTOOLS__!="undefined"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}Hi.prototype.isWebGLRenderer=!0;var h0=class extends j1{constructor(){super();this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.overrideMaterial=null,this.autoUpdate=!0,typeof __THREE_DEVTOOLS__!="undefined"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(this.fog=e.fog.clone()),e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.autoUpdate=e.autoUpdate,this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){let t=super.toJSON(e);return this.fog!==null&&(t.object.fog=this.fog.toJSON()),t}};h0.prototype.isScene=!0;var pt=class extends j1{constructor(e,t=1){super();this.type="Light",this.color=new x1(e),this.intensity=t}dispose(){}copy(e){return super.copy(e),this.color.copy(e.color),this.intensity=e.intensity,this}toJSON(e){let t=super.toJSON(e);return t.object.color=this.color.getHex(),t.object.intensity=this.intensity,this.groundColor!==void 0&&(t.object.groundColor=this.groundColor.getHex()),this.distance!==void 0&&(t.object.distance=this.distance),this.angle!==void 0&&(t.object.angle=this.angle),this.decay!==void 0&&(t.object.decay=this.decay),this.penumbra!==void 0&&(t.object.penumbra=this.penumbra),this.shadow!==void 0&&(t.object.shadow=this.shadow.toJSON()),t}};pt.prototype.isLight=!0;var f0=class extends pt{constructor(e,t){super(e,t);this.type="AmbientLight"}};f0.prototype.isAmbientLight=!0;var yo=new k1,Co=new k,zo=new k,Vi=class{constructor(e){this.camera=e,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new z1(512,512),this.map=null,this.mapPass=null,this.matrix=new k1,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new T4,this._frameExtents=new z1(1,1),this._viewportCount=1,this._viewports=[new q1(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){let t=this.camera,i=this.matrix;Co.setFromMatrixPosition(e.matrixWorld),t.position.copy(Co),zo.setFromMatrixPosition(e.target.matrixWorld),t.lookAt(zo),t.updateMatrixWorld(),yo.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),this._frustum.setFromProjectionMatrix(yo),i.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),i.multiply(t.projectionMatrix),i.multiply(t.matrixWorldInverse)}getViewport(e){return this._viewports[e]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(e){return this.camera=e.camera.clone(),this.bias=e.bias,this.radius=e.radius,this.mapSize.copy(e.mapSize),this}clone(){return new this.constructor().copy(this)}toJSON(){let e={};return this.bias!==0&&(e.bias=this.bias),this.normalBias!==0&&(e.normalBias=this.normalBias),this.radius!==1&&(e.radius=this.radius),(this.mapSize.x!==512||this.mapSize.y!==512)&&(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}};var d0=class extends Vi{constructor(){super(new i2(50,1,.5,500));this.focus=1}updateMatrices(e){let t=this.camera,i=_t*2*e.angle*this.focus,a=this.mapSize.width/this.mapSize.height,r=e.distance||t.far;(i!==t.fov||a!==t.aspect||r!==t.far)&&(t.fov=i,t.aspect=a,t.far=r,t.updateProjectionMatrix()),super.updateMatrices(e)}copy(e){return super.copy(e),this.focus=e.focus,this}};d0.prototype.isSpotLightShadow=!0;var p0=class extends pt{constructor(e,t,i=0,a=Math.PI/3,r=0,s=1){super(e,t);this.type="SpotLight",this.position.copy(j1.DefaultUp),this.updateMatrix(),this.target=new j1,this.distance=i,this.angle=a,this.penumbra=r,this.decay=s,this.shadow=new d0}get power(){return this.intensity*Math.PI}set power(e){this.intensity=e/Math.PI}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.distance=e.distance,this.angle=e.angle,this.penumbra=e.penumbra,this.decay=e.decay,this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}};p0.prototype.isSpotLight=!0;var m0=class extends T2{constructor(e){super();this.type="ShadowMaterial",this.color=new x1(0),this.transparent=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this}};m0.prototype.isShadowMaterial=!0;var v0=class extends Xt.Component{constructor(e){super();this.plugin=e;this.event=new Xt.Events;this.container=createDiv("renderer-container");this.shadows=!0;this.iterations=0;this.frame_rate=1/60;this.animating=!1;this.factory=new wo(this.WIDTH,this.HEIGHT,this.plugin);this.colors={ambient:16777215,spotlight:16777215};this.display={currentWidth:null,currentHeight:null,containerWidth:null,containerHeight:null,aspect:null,scale:null};this.cameraHeight={max:null,close:null,medium:null,far:null};this.extraFrames=v0.DEFAULT_EXTRA_FRAMES;this.renderer=new Hi({alpha:!0,antialias:!0})}get WIDTH(){return this.container.clientWidth/2}get HEIGHT(){return this.container.clientHeight/2}get ASPECT(){return this.WIDTH/this.HEIGHT}get scale(){return(this.WIDTH*this.WIDTH+this.HEIGHT*this.HEIGHT)/13}get canvasEl(){return this.renderer?this.renderer.domElement:null}setDice(e){this.animating&&(this.unload(),this.load()),this.stack=e,this.current=this.factory.getDice(this.stack,{x:(Math.random()*2-1)*this.WIDTH,y:-(Math.random()*2-1)*this.HEIGHT}),this.scene.add(...[...this.current.values()].flat().map(t=>t.geometry)),this.world.add(...[...this.current.values()].flat())}onload(){this.addChild(this.factory),this.container.empty(),this.container.style.opacity="1",document.body.appendChild(this.container),this.renderer.shadowMap.enabled=this.shadows,this.renderer.shadowMap.type=S6,this.container.appendChild(this.renderer.domElement),this.renderer.setClearColor(0,0),this.scene=new h0,this.initScene(),this.registerDomEvent(window,"resize",()=>{this.initScene()}),this.initWorld()}async start(){return new Promise(async(e,t)=>{this.current.size||t(),this.event.on("throw-finished",i=>{e(i)}),this.event.on("error",i=>{t(i)}),this.animating=!0,this.extraFrames=v0.DEFAULT_EXTRA_FRAMES,this.render()})}enableShadows(){this.shadows=!0,this.renderer&&(this.renderer.shadowMap.enabled=this.shadows),this.light&&(this.light.castShadow=this.shadows),this.desk&&(this.desk.receiveShadow=this.shadows)}disableShadows(){this.shadows=!1,this.renderer&&(this.renderer.shadowMap.enabled=this.shadows),this.light&&(this.light.castShadow=this.shadows),this.desk&&(this.desk.receiveShadow=this.shadows)}get mw(){return Math.max(this.WIDTH,this.HEIGHT)}setDimensions(e){this.display.currentWidth=this.container.clientWidth/2,this.display.currentHeight=this.container.clientHeight/2,e?(this.display.containerWidth=e.w,this.display.containerHeight=e.h):(this.display.containerWidth=this.display.currentWidth,this.display.containerHeight=this.display.currentHeight),this.display.aspect=Math.min(this.display.currentWidth/this.display.containerWidth,this.display.currentHeight/this.display.containerHeight),this.display.scale=Math.sqrt(this.display.containerWidth*this.display.containerWidth+this.display.containerHeight*this.display.containerHeight)/13,this.renderer.setSize(this.display.currentWidth*2,this.display.currentHeight*2),this.cameraHeight.max=this.display.currentHeight/this.display.aspect/Math.tan(10*Math.PI/180),this.factory.width=this.display.currentWidth,this.factory.height=this.display.currentHeight,this.cameraHeight.medium=this.cameraHeight.max/1.5,this.cameraHeight.far=this.cameraHeight.max,this.cameraHeight.close=this.cameraHeight.max/2}initCamera(){this.camera&&this.scene.remove(this.camera),this.camera=new i2(20,this.display.currentWidth/this.display.currentHeight,1,this.cameraHeight.max*1.3),this.camera.position.z=this.cameraHeight.far,this.camera.lookAt(new k(0,0,0))}initLighting(){let e=Math.max(this.display.containerWidth,this.display.containerHeight);this.light&&this.scene.remove(this.light),this.ambientLight&&this.scene.remove(this.ambientLight),this.light=new p0(this.colors.spotlight,.25),this.light.position.set(-e/2,e/2,e*3),this.light.target.position.set(0,0,0),this.light.distance=e*5,this.light.angle=Math.PI/4,this.light.castShadow=this.shadows,this.light.shadow.camera.near=e/10,this.light.shadow.camera.far=e*5,this.light.shadow.camera.fov=50,this.light.shadow.bias=.001,this.light.shadow.mapSize.width=1024,this.light.shadow.mapSize.height=1024,this.scene.add(this.light),this.ambientLight=new f0(16777215,.9),this.scene.add(this.ambientLight)}initDesk(){this.desk&&this.scene.remove(this.desk);let e=new m0;e.opacity=.5,this.desk=new l2(new H4(this.display.containerWidth*6,this.display.containerHeight*6,1,1),e),this.desk.receiveShadow=this.shadows,this.scene.add(this.desk)}initScene(){this.setDimensions(),this.initCamera(),this.initLighting(),this.initDesk(),this.camera.updateProjectionMatrix(),this.renderer.render(this.scene,this.camera)}initWorld(){this.world=new Ao(this.WIDTH,this.HEIGHT),this.iterations=0}getResultsForRoller(e){let t=this.current.get(e),i=t.filter(s=>s instanceof D4&&s.isPercentile),a=[];for(let s=0;s!(s instanceof D4&&s.isPercentile)).map(s=>s.getUpsideValue()).filter(s=>s),...a.map(([s,o])=>{let c=s.getUpsideValue();if(!o)return c;let l=o.getUpsideValue();return c===10&&l==10?100:(l==10&&(l=0),c==10&&(c=0),c*10+l)}).filter(s=>s)]}returnResult(){for(let e of this.stack.dynamic){if(!this.current.has(e))continue;let t=this.getResultsForRoller(e);!t||e.setResults(t)}this.event.trigger("throw-finished",this.stack)}unrender(e=this){e.container.style.opacity="0",e.registerInterval(window.setTimeout(()=>{e.animating=!1,e.unload()},1e3))}render(){if(this.throwFinished())if(this.extraFrames>10)this.extraFrames--;else{try{for(let[e,t]of this.current)if(!(!e.modifiers.size||!this.getResultsForRoller(e))&&e.modifiers.has("r")){let a=t.filter(r=>(e.conditions.length||e.conditions.push({operator:"=",comparer:e.faces.min,value:""}),e.checkCondition(r.result,e.conditions)&&r.rerolled{r.rerolled++;let s={x:(Math.random()*2-1)*this.WIDTH,y:-(Math.random()*2-1)*this.HEIGHT};r.vector=r.generateVector(s),r.create(),r.set(),r.stopped=!1}),this.animation=requestAnimationFrame(()=>this.render());return}}if(this.returnResult(),this.plugin.data.renderTime)this.registerInterval(window.setTimeout(()=>this.unrender(),this.plugin.data.renderTime));else{let t=function(){e.unrender(e),document.body.removeEventListener("click",t)},e=this;this.registerDomEvent(document.body,"click",t)}}catch(e){this.event.trigger("error",e)}return}this.animation=requestAnimationFrame(()=>this.render()),this.world.step(this.frame_rate),this.iterations++,this.current.forEach(e=>{e.map(t=>t.set())}),this.renderer.render(this.scene,this.camera)}dispose(...e){e.forEach(t=>{"dispose"in t&&t.dispose(),t.children&&this.dispose(...t.children)})}detach(){}onunload(){cancelAnimationFrame(this.animation),this.container.detach(),this.container.empty(),this.renderer.domElement.detach(),this.renderer.dispose(),this.factory.dispose(),this.ambientLight.dispose(),this.light.dispose(),this.scene.children.forEach(e=>this.dispose(e)),this.scene.remove(this.scene,...this.scene.children,...[...this.current.values()].flat().map(e=>e.geometry)),this.current.forEach(e=>{e.forEach(t=>{[...Array.isArray(t.geometry.material)?t.geometry.material:[t.geometry.material]].forEach(a=>a&&a.dispose()),this.world.world.removeBody(t.body)})}),this.current=new Map}onThrowFinished(){}throwFinished(){let e=!0,t=4;if(this.iterations<10/this.frame_rate)for(let i of this.current.values())for(let a of i){if(a.stopped===!0)continue;let r=a.body.angularVelocity,s=a.body.velocity;if(Math.abs(r.x)3){a.stopped=!0;continue}}else a.stopped=this.iterations;e=!1}else a.stopped=void 0,e=!1}return e}},Zt=v0;Zt.DEFAULT_EXTRA_FRAMES=30;var Ao=class{constructor(e,t){this.WIDTH=e;this.HEIGHT=t;this.world=new J0({gravity:new y(0,0,-9.82*400)});this.ground=this.getPlane();this.diceMaterial=new He;this.deskMaterial=new He;this.barrierMaterial=new He;this.world.broadphase=new p6,this.world.allowSleep=!0,this.ground.position.set(0,0,0),this.world.addBody(this.ground),this.buildWalls()}add(...e){e.forEach(t=>{this.world.addBody(t.body)})}step(e=1/60){let t=performance.now()/1e3;if(!this.lastCallTime)this.world.step(e);else{let i=t-this.lastCallTime;this.world.step(e,i)}this.lastCallTime=t}buildWalls(){this.world.addContactMaterial(new Te(this.deskMaterial,this.diceMaterial,{friction:.01,restitution:.5,contactEquationRelaxation:3,contactEquationStiffness:1e8})),this.world.addContactMaterial(new Te(this.barrierMaterial,this.diceMaterial,{friction:.01,restitution:1,contactEquationRelaxation:3,contactEquationStiffness:1e8})),this.world.addContactMaterial(new Te(this.diceMaterial,this.diceMaterial,{friction:.1,restitution:.5,contactEquationRelaxation:3,contactEquationStiffness:1e8})),this.world.addBody(new i1({allowSleep:!1,mass:0,shape:new t4,material:this.deskMaterial}));let e=new i1({allowSleep:!1,mass:0,shape:new t4,material:this.barrierMaterial});e.quaternion.setFromAxisAngle(new y(1,0,0),Math.PI/2),e.position.set(0,this.HEIGHT*.93,0),this.world.addBody(e),e=new i1({allowSleep:!1,mass:0,shape:new t4,material:this.barrierMaterial}),e.quaternion.setFromAxisAngle(new y(1,0,0),-Math.PI/2),e.position.set(0,-this.HEIGHT*.93,0),this.world.addBody(e),e=new i1({allowSleep:!1,mass:0,shape:new t4,material:this.barrierMaterial}),e.quaternion.setFromAxisAngle(new y(0,1,0),-Math.PI/2),e.position.set(this.WIDTH*.93,0,0),this.world.addBody(e),e=new i1({allowSleep:!1,mass:0,shape:new t4,material:this.barrierMaterial}),e.quaternion.setFromAxisAngle(new y(0,1,0),Math.PI/2),e.position.set(-this.WIDTH*.93,0,0),this.world.addBody(e)}getPlane(){return new i1({type:i1.STATIC,shape:new t4})}},wo=class extends Xt.Component{constructor(e,t,i){super();this.width=e;this.height=t;this.plugin=i;this.dice={};this.buildDice()}get colors(){return{diceColor:this.plugin.data.diceColor,textColor:this.plugin.data.textColor}}updateColors(){this.dispose(),this.buildDice()}onunload(){this.dispose()}disposeChildren(...e){e.forEach(t=>{"dispose"in t&&t.dispose(),t.children&&this.disposeChildren(...t.children)})}dispose(){for(let e of Object.values(this.dice))this.disposeChildren(e.geometry.children)}getDiceForRoller(e,t){let i=[];switch(e.faces.max){case 4:{i.push(...new Array(e.rolls).fill(0).map(a=>new yi(this.width,this.height,this.clone("d4"),t)));break}case 1:case 6:{i.push(...new Array(e.rolls).fill(0).map(a=>new bi(this.width,this.height,e.fudge?this.clone("fudge"):this.clone("d6"),t)));break}case 8:{i.push(...new Array(e.rolls).fill(0).map(a=>new Mi(this.width,this.height,this.clone("d8"),t)));break}case 10:{i.push(...new Array(e.rolls).fill(0).map(a=>new D4(this.width,this.height,this.clone("d10"),t)));break}case 12:{i.push(...new Array(e.rolls).fill(0).map(a=>new xi(this.width,this.height,this.clone("d12"),t)));break}case 20:{i.push(...new Array(e.rolls).fill(0).map(a=>new gi(this.width,this.height,this.clone("d20"),t)));break}case 100:{i.push(...new Array(e.rolls).fill(0).map(a=>[new D4(this.width,this.height,this.clone("d100"),t,!0),new D4(this.width,this.height,this.clone("d10"),t,!0)]).flat());break}}return i}getDice(e,t){let i=new Map;for(let a of e.dynamic){let r=this.getDiceForRoller(a,t);r.length&&i.set(a,r)}return i}clone(e){if(!(e in this.dice))throw new Error("That dice type does not exist!");return this.dice[e].clone()}buildDice(){this.dice.d100=new ai(this.width,this.height,this.colors).create(),this.dice.d20=new ei(this.width,this.height,this.colors).create(),this.dice.d12=new ti(this.width,this.height,this.colors).create(),this.dice.d10=new ii(this.width,this.height,this.colors).create(),this.dice.d8=new ri(this.width,this.height,this.colors).create(),this.dice.d6=new ni(this.width,this.height,this.colors).create(),this.dice.d4=new oi(this.width,this.height,this.colors).create(),this.dice.fudge=new si(this.width,this.height,this.colors).create(),this.dice.boost=new mi(this.width,this.height,this.colors).create(),this.dice.ability=new fi(this.width,this.height,this.colors).create(),this.dice.difficulty=new di(this.width,this.height,this.colors).create(),this.dice.challenge=new ui(this.width,this.height,this.colors).create(),this.dice.proficiency=new li(this.width,this.height,this.colors).create(),this.dice.setback=new vi(this.width,this.height,this.colors).create()}};var Eo=w2(_o());var Ni=class{constructor(e){this.table=e}parse(e){let t=e.length,i=this.table,a=[],r=[],s=0;for(;sf||u===f&&l.associativity==="right")break;a.push(r.shift())}r.unshift(o)}else a.push(o)}}for(;r.length;){let o=r.shift();if(o.value!=="(")a.push(o);else throw new Error("Mismatched parentheses.")}return a}};var ah=/(?:\d+[Dd])?#(?:[\p{Letter}\p{Emoji_Presentation}\w/-]+)(?:\|(?:[+-]))?(?:\|(?:[^+-]+))?/u,rh=/(?:\d+[Dd])?#(?:[\p{Letter}\p{Emoji_Presentation}\w/-]+)(?:\|(?:[+-]))?\|link/u,nh=/(?:.*)?(?:\[.*\]\(|\[\[)(?:.+?)#?\^(?:.+?)(?:\)|\]\])\|?(?:.+)?/u,sh=/(?:\d+[Dd])?(?:\[.*\]\(|\[\[)(?:.+)(?:\)|\]\])\|?(?:.+)?/u,oh=/(?:\d+[Dd])?(?:\[.*\]\(|\[\[)(?:.+)(?:\)|\]\])\|line/u,ch=/[\(\^\+\-\*\/\)]/u,lh=/(?:\d+|\b)[Dd](?:\[?(?:-?\d+[ \t]?,)?[ \t]?(?:-?\d+|%|F)\]?|\b)/u,uh=/(?:=|=!|<|>|<=|>=|=<|=>|-=|=-)\d+/u,x0=class{constructor(e){this.plugin=e;this.lexer=Eo.compile({WS:[{match:/[ \t]+/u},{match:/[{}]+/u}],table:nh,line:oh,section:sh,link:rh,tag:ah,condition:uh,kl:{match:/kl\d*/u,value:this.clampInfinite},kh:[{match:/kh\d*/u,value:this.clampInfinite},{match:/k\d*/u,value:this.clampInfinite}],dh:{match:/dh\d*/u,value:this.clampInfinite},dl:[{match:/dl\d*/u,value:this.clampInfinite}],"!!":{match:/!!(?:i|\d+)?/u,value:this.clampInfinite},"!":{match:/!(?:i|\d+)?/u,value:this.clampInfinite},r:{match:/r(?:i|\d+)?/u,value:this.clampInfinite},u:/u/u,stunt:/1[Dd]S/u,"%":/\d+[Dd]\d+%/u,dice:[{match:lh,value:e=>{let{roll:t=this.plugin.data.defaultRoll,faces:i=this.plugin.data.defaultFace}=e.match(/(?\d+)?[Dd](?\[?(?:-?\d+[ \t]?,)?[ \t]?(?:-?\d+|%|F)\]?)?/).groups;return`${t}d${i}`}},{match:/\d+/u},{match:/\b[A-Za-z][A-Za-z0-9_]+\b/u,value:e=>this.plugin.inline.has(e)?`${this.plugin.inline.get(e)}`:e}],sort:[{match:/s(?:a|d)*/u,value:e=>e=="s"||e=="sa"?"sa":"sd"}],math:ch});let t={precedence:3,associativity:"right"},i={precedence:2,associativity:"left"},a={precedence:1,associativity:"left"};this.parser=new Ni({"+":a,"-":a,"*":i,"/":i,"^":t})}clampInfinite(e){return/i$/.test(e)?"100":e.replace(/^\D+/g,"")}parse(e){let t=Array.from(this.lexer.reset(e));return this.lexer.reset(),this.parser.parse(this.transform(t))}transform(e){e=e.filter(i=>i.type!="WS");let t=[];for(let i of e)if(i.type=="condition"&&t.length>0){let a=t[t.length-1];a.conditions||(a.conditions=[]);let[r,s,o]=i.value.match(/(?=|=!|<|>|<=|>=|=<|=>|\-=|=\-)(?\d+)/)??[];a.conditions.push({operator:s,comparer:Number(o),value:i.value})}else t.push(i);return t}getTypeFromLexemes(e){return e.some(({type:t})=>t==="table")?"table":e.some(({type:t})=>t==="section")?"section":e.some(({type:t})=>t==="tag")?"tag":e.some(({type:t})=>t==="link")?"link":e.some(({type:t})=>t==="line")?"line":"dice"}};var Se=w2(require("@codemirror/view")),Lo=w2(require("@codemirror/language")),mt=w2(require("obsidian"));function hh(n,e,t){for(let i of n.ranges)if(i.from<=t&&i.to>=e)return!0;return!1}function Do(n,e){let t=app.workspace.getActiveFile();if(!t)return;let i=[],a=n.state.selection,r=new RegExp(".*?_?inline-code_?.*");for(let{from:s,to:o}of n.visibleRanges)(0,Lo.syntaxTree)(n.state).iterate({from:s,to:o,enter:({node:c})=>{let l=c.type;if(l.name.includes("formatting")||!r.test(l.name))return;let u=c.from,f=c.to;if(hh(a,u,f+1))return;let h=n.state.doc.sliceString(u,f).trim();if(/^dice-mod:\s*([\s\S]+)\s*?/.test(h)){let[,x]=h.match(/dice-mod:\s*([\s\S]+)\s*?/),m=app.workspace.getActiveFile(),d=e.getRollerSync(x,m.path);d.roll().then(A=>{let b=e.data.displayFormulaForMod?`${d.inlineText} **${d.replacer}**`:`${d.replacer}`,C={from:u-1,to:f+1,insert:b},E=n.state.update({changes:C});n.dispatch(E)});return}if(!/^dice(?:\+|\-)?:\s*([\s\S]+)\s*?/.test(h))return;let[,p]=h.match(/^dice(?:\+|\-)?:\s*([\s\S]+)\s*?/),v=e.getRollerSync(p,t.path),g=new To(h,v,n,e,t);e.addToFileMap(t,v),i.push(Se.Decoration.replace({widget:g,inclusive:!1,block:!1}).range(u-1,f+1))}});return Se.Decoration.set(i,!0)}var To=class extends Se.WidgetType{constructor(e,t,i,a,r){super();this.rawQuery=e;this.roller=t;this.view=i;this.plugin=a;this.file=r}eq(e){return e.rawQuery===this.rawQuery?!0:(this.plugin.fileMap.get(this.file)?.remove(e.roller),!1)}toDOM(e){return this.roller.roll(),this.roller.containerEl}ignoreEvent(e){if(e.type==="mousedown"){let t=this.view.posAtCoords({x:e.x,y:e.y});if(e.shiftKey){if(t){let{editor:i}=this.view.state.field(mt.editorEditorField).state.field(mt.editorViewField);i.setCursor(i.offsetToPos(t))}return!1}}return!0}};function Ho(n){return Se.ViewPlugin.fromClass(class{constructor(e){this.decorations=Do(e,n)??Se.Decoration.none}update(e){if(!e.state.field(mt.editorLivePreviewField)){this.decorations=Se.Decoration.none;return}(e.docChanged||e.viewportChanged||e.selectionSet)&&(this.decorations=Do(e.view,n)??Se.Decoration.none)}},{decorations:e=>e.decorations})}String.prototype.matchAll=String.prototype.matchAll||function*(e){let t=e.global?e.flags:e.flags+"g",i=new RegExp(e,t),a;for(;a=i.exec(this);)yield a};var f6={returnAllTags:!0,rollLinksForTags:!1,copyContentButton:!0,customFormulas:[],displayFormulaForMod:!0,displayResultsInline:!1,displayFormulaAfter:!1,displayLookupRoll:!0,formulas:{},persistResults:!1,results:{},defaultRoll:1,defaultFace:100,renderer:!1,renderAllDice:!1,renderTime:2e3,diceColor:"#202020",textColor:"#ffffff",showLeafOnStartup:!0,showDice:!0,displayAsEmbed:!0,round:pe.None},Fi=class extends Z1.Plugin{constructor(){super(...arguments);this.fileMap=new Map;this.inline=new Map;this.operators={"+":(e,t)=>e+t,"-":(e,t)=>e-t,"*":(e,t)=>e*t,"/":(e,t)=>e/t,"^":(e,t)=>Math.pow(e,t)};this.parser=new x0(this);this.persistingFiles=new Set}async onload(){console.log("DiceRoller plugin loaded"),this.data=Object.assign({},f6,await this.loadData()),this.renderer=new Zt(this),this.addSettingTab(new h6(this.app,this)),this.registerView(M4,i=>new Je(this,i)),this.app.workspace.onLayoutReady(()=>this.addDiceView(!0)),this.registerEvent(this.app.workspace.on("dice-roller:update-colors",()=>{this.renderer.factory.updateColors()})),this.registerEvent(this.app.workspace.on("dice-roller:render-dice",async i=>{let a=await this.getRoller(i,"external");if(!(a instanceof S2)){new Z1.Notice("The Dice View only supports dice rolls.");return}if(await a.roll(),!a.dice.length){new Z1.Notice("Invalid formula.");return}try{this.renderRoll(a)}catch(r){new Z1.Notice("There was an error rendering the roll."),console.error(r)}this.app.workspace.trigger("dice-roller:rendered-result",a.result)})),this.addCommand({id:"open-view",name:"Open Dice View",callback:()=>{this.view?this.app.workspace.revealLeaf(this.view.leaf):this.addDiceView()}}),this.addCommand({id:"reroll",name:"Re-roll Dice",checkCallback:i=>{let a=this.app.workspace.getActiveViewOfType(Z1.MarkdownView);if(a&&(a.getMode()==="preview"||a.editor.cm.state.field(Z1.editorLivePreviewField))&&this.fileMap.has(a.file))return i||this.fileMap.get(a.file).forEach(s=>{s instanceof o6&&s.roll()}),!0}});let e=H0(ki).html[0];(0,Z1.addIcon)(Y2,e);let t=H0(Ui).html[0];(0,Z1.addIcon)(Ke,t),this.registerMarkdownPostProcessor(this.postprocessor.bind(this)),this.registerEditorExtension([Ho(this)]),this.app.workspace.onLayoutReady(async()=>{await this.registerDataviewInlineFields()})}addToFileMap(e,t){this.fileMap.has(e)||this.fileMap.set(e,[]),this.fileMap.set(e,[...this.fileMap.get(e),t])}async postprocessor(e,t){let i=e.querySelectorAll("code");if(!i.length)return;let a=t.sourcePath,r=t.getSectionInfo(e),s=t.getSectionInfo(e)?.lineStart,o=this.app.vault.getAbstractFileByPath(t.sourcePath);if((!o||!(o instanceof Z1.TFile))&&a!="STATBLOCK_RENDERER")return;let c={},l,u=!1,f=[];for(let h=0;h{m.on("new-result",async()=>{let b=l.slice(r.lineStart,r.lineEnd+1),C=m.replacer;if(!C){new Z1.Notice("Dice Roller: There was an issue modifying the file.");return}let E=x?`${m.inlineText} ${C}`:`${C}`;b=b.join(` `).replace(`\`${v}\``,E.replace(/([\*\[\]])/g,"\\$1")).split(` -`),l.splice(r.lineStart,r.lineEnd-r.lineStart+1,...b),d()})})),await p.roll();continue}catch(v){console.error(v)}if(!!/^dice(?:\+|\-|\-mod)?:\s*([\s\S]+)\s*?/.test(m.innerText))try{let[,v]=m.innerText.match(/^dice(?:\+|\-|\-mod)?:\s*([\s\S]+)\s*?/),g=await this.getRoller(v,t.sourcePath),x=this.data.results?.[a]?.[o]?.[h]??null;(this.data.persistResults&&!/dice\-/.test(m.innerText)||/dice\+/.test(m.innerText))&&(this.persistingFiles.add(t.sourcePath),c[h]=g,g.save=!0);let p=this.data.renderAllDice;v.includes("|render")&&(p=!0),v.includes("|norender")&&(p=!1);let d=async()=>{await g.roll(),g.save&&x&&await g.applyResult(x),g instanceof _2&&(g.shouldRender=p),m.replaceWith(g.containerEl)};if(g.loaded?await d():g.on("loaded",async()=>{await d()}),!s||!(s instanceof e2.TFile))continue;this.fileMap.has(s)||this.fileMap.set(s,[]),this.fileMap.set(s,[...this.fileMap.get(s),g]);let A=this.app.workspace.getActiveViewOfType(e2.MarkdownView);if(A&&this.fileMap.has(s)&&this.fileMap.get(s).length===1){let b=this,C=H0(A,{onUnloadFile:function(E){return async function(T){return T==s&&(b.fileMap.delete(s),C()),await E.call(this,T)}}});A.register(C),A.register(()=>this.fileMap.delete(s))}}catch(v){console.error(v),new e2.Notice(`There was an error parsing the dice string: ${m.innerText}. +`),l.splice(r.lineStart,r.lineEnd-r.lineStart+1,...b),d()})})),await m.roll();continue}catch(v){console.error(v)}if(!!/^dice(?:\+|\-|\-mod)?:\s*([\s\S]+)\s*?/.test(p.innerText))try{let[,v]=p.innerText.match(/^dice(?:\+|\-|\-mod)?:\s*([\s\S]+)\s*?/),g=await this.getRoller(v,t.sourcePath),x=this.data.results?.[a]?.[s]?.[h]??null;(this.data.persistResults&&!/dice\-/.test(p.innerText)||/dice\+/.test(p.innerText))&&(this.persistingFiles.add(t.sourcePath),c[h]=g,g.save=!0);let m=this.data.renderAllDice;v.includes("|render")&&(m=!0),v.includes("|norender")&&(m=!1);let d=async()=>{await g.roll(),g.save&&x&&await g.applyResult(x),g instanceof S2&&(g.shouldRender=m),p.replaceWith(g.containerEl)};if(g.loaded?await d():g.on("loaded",async()=>{await d()}),!o||!(o instanceof Z1.TFile))continue;this.addToFileMap(o,g);let A=this.app.workspace.getActiveViewOfType(Z1.MarkdownView);if(A&&this.fileMap.has(o)&&this.fileMap.get(o).length===1){let b=this,C=V0(A,{onUnloadFile:function(E){return async function(T){return T==o&&(b.fileMap.delete(o),C()),await E.call(this,T)}}});A.register(C),A.register(()=>this.fileMap.delete(o))}}catch(v){console.error(v),new Z1.Notice(`There was an error parsing the dice string: ${p.innerText}. -${v}`,5e3);continue}}if(!(!s||!(s instanceof e2.TFile))&&(u&&f.length&&(await Promise.all(f),await this.app.vault.modify(s,l.join(` -`))),a in this.data.results&&(this.data.results[a][o]={}),Object.entries(c).length)){let h=this.app.workspace.getActiveViewOfType(e2.MarkdownView);if(h){let m=this,v=H0(h,{onUnloadFile:function(g){return async function(x){if(x=s){m.persistingFiles.has(a)&&(m.persistingFiles.delete(a),m.data.results[a]={});for(let p in c){let d=c[p],A=t.getSectionInfo(e)?.lineStart;if(A==null)continue;let b={[A]:{...m.data.results[a]?.[A]??{},[p]:d.toResult()}};m.data.results[a]={...m.data.results[a]??{},...b},await m.saveSettings()}}return v(),await g.call(this,x)}}});h.register(v),h.register(async()=>{this.persistingFiles.has(a)&&(this.persistingFiles.delete(a),this.data.results[a]={});for(let g in c){let x=c[g],p=t.getSectionInfo(e)?.lineStart;if(p==null)continue;let d={[p]:{...this.data.results[a]?.[p]??{},[g]:x.toResult()}};this.data.results[a]={...this.data.results[a]??{},...d},await this.saveSettings()}})}}}get canUseDataview(){return this.app.plugins.getPlugin("dataview")!=null}get dataview(){return this.app.plugins.getPlugin("dataview")}get dataviewAPI(){return(0,Ho.getAPI)()}async dataviewReady(){return new Promise(e=>{this.canUseDataview||e(!1),this.dataview.api&&e(!0),this.registerEvent(this.app.metadataCache.on("dataview:api-ready",()=>{e(!0)}))})}get view(){let e=this.app.workspace.getLeavesOfType(b4),t=e.length?e[0]:null;if(t&&t.view&&t.view instanceof Qe)return t.view}async getArrayRoller(e,t=1){let i=new F0(this,e,t);return await i.roll(),i}async addDiceView(e=!1){e&&!this.data.showLeafOnStartup||this.app.workspace.getLeavesOfType(b4).length||await this.app.workspace.getRightLeaf(!1).setViewState({type:b4})}async registerDataviewInlineFields(){if(!this.canUseDataview)return;await this.dataviewReady(),this.dataview.index.pages.forEach(({fields:t})=>{for(let[i,a]of t)typeof a!="number"||Number.isNaN(a)||a==null||this.inline.set(i,a)}),this.registerEvent(this.app.metadataCache.on("dataview:metadata-change",(t,i)=>{if(t==="update"){let a=this.dataview.api.page(i.path);if(!a)return;for(let r in a){let o=a[r];typeof o!="number"||Number.isNaN(o)||o==null||this.inline.set(r,o)}}}))}async renderRoll(e){if(!(e instanceof _2)||!e?.dice?.length){new e2.Notice(`This dice roll can't be rendered: ${e.original}`);return}this.addChild(this.renderer),this.renderer.setDice(e),await this.renderer.start(),e.recalculate()}async parseDice(e,t){let i=await this.getRoller(e,t);return{result:await i.roll(),roller:i}}parseDiceSync(e,t){let i=this.getRollerSync(e,t);if(i instanceof _2)return{result:i.result,roller:i}}clearEmpties(e){for(var t in e)!e[t]||typeof e[t]!="object"||(this.clearEmpties(e[t]),Object.keys(e[t]).length===0&&delete e[t])}async saveSettings(){this.clearEmpties(this.data.results),await this.saveData(this.data)}get dataview_regex(){let e=Array.from(this.inline.keys());return e.length?new RegExp(`(${e.join("|")})`,"g"):null}async getRoller(e,t="",i=this.data.showDice){e=e.replace(/\\\|/g,"|");let a=e.includes("|nodice")?!1:i,r=this.data.displayResultsInline,o=this.data.displayFormulaAfter,s=f2.Roll,c="",l=/\|text\((.*)\)/;if(e.includes("|form")&&(r=!0),e.includes("|noform")&&(r=!1),e.includes("|avg")&&(s=f2.Average),e.includes("|none")&&(s=f2.None),e.includes("|text(")){let[,h]=e.match(l)??[null,""];c=h}e.includes("|paren")&&(o=!0),e.includes("|noparen")&&(o=!1),e=(0,Ni.decode)(e.replace("|nodice","").replace("|render","").replace("|norender","").replace("|noform","").replace("|form","").replace("|noparen","").replace("|paren","").replace("|avg","").replace("|none","").replace(l,"")),e in this.data.formulas&&(e=this.data.formulas[e]);let u=this.parse(e);switch(this.getTypeFromLexemes(u)){case"dice":{let h=new _2(this,e,u,a,c,s,o);return h.showFormula=r,h}case"table":{let h=new k4(this,e,u[0],t,a);return await h.init,h}case"section":return new Ct(this,e,u[0],t,a);case"tag":{if(!this.canUseDataview)throw new Error("Tags are only supported with the Dataview plugin installed.");return new o6(this,e,u[0],t,a)}case"link":return new c6(this,e,u[0],t,a);case"line":return new l6(this,e,u[0],t,a)}}getRollerSync(e,t,i=this.data.showDice,a){e=e.replace(/\\\|/g,"|");let r=e.includes("|nodice")?!1:i,o=this.data.renderAllDice,s=!1,c=f2.Roll,l="",u=/\|text\((.*)\)/;if(e.includes("|render")&&(o=!0),e.includes("|norender")&&(o=!1),e.includes("|form")&&(s=!0),e.includes("|noform")&&(s=!1),e.includes("|avg")&&(c=f2.Average),e.includes("|none")&&(c=f2.None),e.includes("|text(")){let[,m]=e.match(u)??[null,""];l=m}e=(0,Ni.decode)(e.replace("|nodice","").replace("|render","").replace("|norender","").replace("|noform","").replace("|form","").replace("|avg","").replace("|none","").replace(u,"")),e in this.data.formulas&&(e=this.data.formulas[e]);let f=this.parse(e),h=this.getTypeFromLexemes(f);switch(a==null&&(a=this.data.displayFormulaAfter),h){case"dice":{let m=new _2(this,e,f,r,l,c,a);return m.shouldRender=o,m.showFormula=s,m}case"table":{let m=new k4(this,e,f[0],t,r);return m.init,m}case"section":return new Ct(this,e,f[0],t,r);case"tag":{if(!this.canUseDataview)throw new Error("Tags are only supported with the Dataview plugin installed.");return new o6(this,e,f[0],t,r)}case"link":return new c6(this,e,f[0],t,r);case"line":return new l6(this,e,f[0],t,r)}}getTypeFromLexemes(e){return e.some(({type:t})=>t==="table")?"table":e.some(({type:t})=>t==="section")?"section":e.some(({type:t})=>t==="tag")?"tag":e.some(({type:t})=>t==="link")?"link":e.some(({type:t})=>t==="line")?"line":"dice"}onunload(){console.log("DiceRoller unloaded"),this.app.workspace.getLeavesOfType(b4).forEach(e=>e.detach()),"__THREE__"in window&&delete window.__THREE__,this.renderer.unload(),this.app.workspace.trigger("dice-roller:unload")}parse(e){return this.parser.parse(e)}}; +${v}`,5e3);continue}}if(!(!o||!(o instanceof Z1.TFile))&&(u&&f.length&&(await Promise.all(f),await this.app.vault.modify(o,l.join(` +`))),a in this.data.results&&(this.data.results[a][s]={}),Object.entries(c).length)){let h=this.app.workspace.getActiveViewOfType(Z1.MarkdownView);if(h){let p=this,v=V0(h,{onUnloadFile:function(g){return async function(x){if(x=o){p.persistingFiles.has(a)&&(p.persistingFiles.delete(a),p.data.results[a]={});for(let m in c){let d=c[m],A=t.getSectionInfo(e)?.lineStart;if(A==null)continue;let b={[A]:{...p.data.results[a]?.[A]??{},[m]:d.toResult()}};p.data.results[a]={...p.data.results[a]??{},...b},await p.saveSettings()}}return v(),await g.call(this,x)}}});h.register(v),h.register(async()=>{this.persistingFiles.has(a)&&(this.persistingFiles.delete(a),this.data.results[a]={});for(let g in c){let x=c[g],m=t.getSectionInfo(e)?.lineStart;if(m==null)continue;let d={[m]:{...this.data.results[a]?.[m]??{},[g]:x.toResult()}};this.data.results[a]={...this.data.results[a]??{},...d},await this.saveSettings()}})}}}get canUseDataview(){return this.app.plugins.getPlugin("dataview")!=null}get dataview(){return this.app.plugins.getPlugin("dataview")}get dataviewAPI(){return(0,Vo.getAPI)()}async dataviewReady(){return new Promise(e=>{this.canUseDataview||e(!1),this.dataview.api&&e(!0),this.registerEvent(this.app.metadataCache.on("dataview:api-ready",()=>{e(!0)}))})}get view(){let e=this.app.workspace.getLeavesOfType(M4),t=e.length?e[0]:null;if(t&&t.view&&t.view instanceof Je)return t.view}async getArrayRoller(e,t=1){let i=new B0(this,e,t);return await i.roll(),i}async addDiceView(e=!1){e&&!this.data.showLeafOnStartup||this.app.workspace.getLeavesOfType(M4).length||await this.app.workspace.getRightLeaf(!1).setViewState({type:M4})}async registerDataviewInlineFields(){if(!this.canUseDataview)return;await this.dataviewReady(),this.dataview.index.pages.forEach(({fields:t})=>{for(let[i,a]of t)typeof a!="number"||Number.isNaN(a)||a==null||this.inline.set(i,a)}),this.registerEvent(this.app.metadataCache.on("dataview:metadata-change",(t,i)=>{if(t==="update"){let a=this.dataview.api.page(i.path);if(!a)return;for(let r in a){let s=a[r];typeof s!="number"||Number.isNaN(s)||s==null||this.inline.set(r,s)}}}))}async renderRoll(e){if(!(e instanceof S2)||!e?.dice?.length){new Z1.Notice(`This dice roll can't be rendered: ${e.original}`);return}this.addChild(this.renderer),this.renderer.setDice(e),await this.renderer.start(),e.recalculate()}async parseDice(e,t){let i=await this.getRoller(e,t);return{result:await i.roll(),roller:i}}parseDiceSync(e,t){let i=this.getRollerSync(e,t);if(i instanceof S2)return{result:i.result,roller:i}}clearEmpties(e){for(var t in e)!e[t]||typeof e[t]!="object"||(this.clearEmpties(e[t]),Object.keys(e[t]).length===0&&delete e[t])}async saveSettings(){this.clearEmpties(this.data.results),await this.saveData(this.data)}get dataview_regex(){let e=Array.from(this.inline.keys());return e.length?new RegExp(`(${e.join("|")})`,"g"):null}async getRoller(e,t="",i=this.data.showDice){e=e.replace(/\\\|/g,"|");let a=e.includes("|nodice")?!1:i,r=this.data.renderAllDice,s=this.data.displayResultsInline,o=this.data.displayFormulaAfter,c=h2.Roll,l="",u=/\|text\((.*)\)/;if(e.includes("|render")&&(r=!0),e.includes("|norender")&&(r=!1),e.includes("|form")&&(s=!0),e.includes("|noform")&&(s=!1),e.includes("|avg")&&(c=h2.Average),e.includes("|none")&&(c=h2.None),e.includes("|text(")){let[,p]=e.match(u)??[null,""];l=p}e.includes("|paren")&&(o=!0),e.includes("|noparen")&&(o=!1),e=(0,Ri.decode)(e.replace("|nodice","").replace("|render","").replace("|norender","").replace("|noform","").replace("|form","").replace("|noparen","").replace("|paren","").replace("|avg","").replace("|none","").replace(u,"")),e in this.data.formulas&&(e=this.data.formulas[e]);let f=this.parse(e);switch(this.getTypeFromLexemes(f)){case"dice":{let p=new S2(this,e,f,a,l,c,o);return p.showFormula=s,p.shouldRender=r,p}case"table":{let p=new I4(this,e,f[0],t,a);return await p.init,p}case"section":return new Ct(this,e,f[0],t,a);case"tag":{if(!this.canUseDataview)throw new Error("Tags are only supported with the Dataview plugin installed.");return new c6(this,e,f[0],t,a)}case"link":return new l6(this,e,f[0],t,a);case"line":return new u6(this,e,f[0],t,a)}}getRollerSync(e,t,i=this.data.showDice,a){e=e.replace(/\\\|/g,"|");let r=e.includes("|nodice")?!1:i,s=this.data.renderAllDice,o=!1,c=h2.Roll,l="",u=/\|text\((.*)\)/;if(e.includes("|render")&&(s=!0),e.includes("|norender")&&(s=!1),e.includes("|form")&&(o=!0),e.includes("|noform")&&(o=!1),e.includes("|avg")&&(c=h2.Average),e.includes("|none")&&(c=h2.None),e.includes("|text(")){let[,p]=e.match(u)??[null,""];l=p}e=(0,Ri.decode)(e.replace("|nodice","").replace("|render","").replace("|norender","").replace("|noform","").replace("|form","").replace("|avg","").replace("|none","").replace(u,"")),e in this.data.formulas&&(e=this.data.formulas[e]);let f=this.parse(e),h=this.getTypeFromLexemes(f);switch(a==null&&(a=this.data.displayFormulaAfter),h){case"dice":{let p=new S2(this,e,f,r,l,c,a);return p.shouldRender=s,p.showFormula=o,p}case"table":{let p=new I4(this,e,f[0],t,r);return p.init,p}case"section":return new Ct(this,e,f[0],t,r);case"tag":{if(!this.canUseDataview)throw new Error("Tags are only supported with the Dataview plugin installed.");return new c6(this,e,f[0],t,r)}case"link":return new l6(this,e,f[0],t,r);case"line":return new u6(this,e,f[0],t,r)}}getTypeFromLexemes(e){return e.some(({type:t})=>t==="table")?"table":e.some(({type:t})=>t==="section")?"section":e.some(({type:t})=>t==="tag")?"tag":e.some(({type:t})=>t==="link")?"link":e.some(({type:t})=>t==="line")?"line":"dice"}onunload(){console.log("DiceRoller unloaded"),this.app.workspace.getLeavesOfType(M4).forEach(e=>e.detach()),"__THREE__"in window&&delete window.__THREE__,this.renderer.unload(),this.app.workspace.trigger("dice-roller:unload")}parse(e){return this.parser.parse(e)}}; /*! * Font Awesome Free 5.15.3 by @fontawesome - https://fontawesome.com * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) diff --git a/.obsidian/plugins/obsidian-dice-roller/manifest.json b/.obsidian/plugins/obsidian-dice-roller/manifest.json index 074ae94c..15cbdc84 100644 --- a/.obsidian/plugins/obsidian-dice-roller/manifest.json +++ b/.obsidian/plugins/obsidian-dice-roller/manifest.json @@ -1,7 +1,7 @@ { "id": "obsidian-dice-roller", "name": "Dice Roller", - "version": "8.10.1", + "version": "8.12.3", "minAppVersion": "0.12.15", "description": "Inline dice rolling for Obsidian.md", "author": "Jeremy Valentine", diff --git a/.obsidian/plugins/obsidian-full-calendar/main.js b/.obsidian/plugins/obsidian-full-calendar/main.js index 80e77ecb..6bd6696e 100644 --- a/.obsidian/plugins/obsidian-full-calendar/main.js +++ b/.obsidian/plugins/obsidian-full-calendar/main.js @@ -74,7 +74,7 @@ var __async = (__this, __arguments, generator) => { reject(e3); } }; - var step = (x4) => x4.done ? resolve(x4.value) : Promise.resolve(x4.value).then(fulfilled, rejected); + var step = (x3) => x3.done ? resolve(x3.value) : Promise.resolve(x3.value).then(fulfilled, rejected); step((generator = generator.apply(__this, __arguments)).next()); }); }; @@ -82,30 +82,30 @@ var __async = (__this, __arguments, generator) => { // 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; + var __extends3; + var __assign3; + var __rest3; + var __decorate3; + var __param3; + var __metadata3; + var __awaiter3; + var __generator3; + var __exportStar3; + var __values3; + var __read3; + var __spread3; + var __spreadArrays3; + var __spreadArray3; + var __await3; + var __asyncGenerator3; + var __asyncDelegator3; + var __asyncValues3; + var __makeTemplateObject3; + var __importStar3; + var __importDefault3; + var __classPrivateFieldGet3; + var __classPrivateFieldSet3; + var __createBinding3; (function(factory) { var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {}; if (typeof define === "function" && define.amd) { @@ -137,7 +137,7 @@ var require_tslib = __commonJS({ if (Object.prototype.hasOwnProperty.call(b3, p3)) d2[p3] = b3[p3]; }; - __extends2 = function(d2, b3) { + __extends3 = function(d2, b3) { if (typeof b3 !== "function" && b3 !== null) throw new TypeError("Class extends value " + String(b3) + " is not a constructor or null"); extendStatics(d2, b3); @@ -146,7 +146,7 @@ var require_tslib = __commonJS({ } d2.prototype = b3 === null ? Object.create(b3) : (__.prototype = b3.prototype, new __()); }; - __assign2 = Object.assign || function(t3) { + __assign3 = Object.assign || function(t3) { for (var s4, i3 = 1, n3 = arguments.length; i3 < n3; i3++) { s4 = arguments[i3]; for (var p3 in s4) @@ -155,7 +155,7 @@ var require_tslib = __commonJS({ } return t3; }; - __rest2 = function(s4, e3) { + __rest3 = function(s4, e3) { var t3 = {}; for (var p3 in s4) if (Object.prototype.hasOwnProperty.call(s4, p3) && e3.indexOf(p3) < 0) @@ -167,7 +167,7 @@ var require_tslib = __commonJS({ } return t3; }; - __decorate2 = function(decorators, target, key, desc) { + __decorate3 = function(decorators, target, key, desc) { var c3 = arguments.length, r3 = c3 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d2; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r3 = Reflect.decorate(decorators, target, key, desc); @@ -177,16 +177,16 @@ var require_tslib = __commonJS({ r3 = (c3 < 3 ? d2(r3) : c3 > 3 ? d2(target, key, r3) : d2(target, key)) || r3; return c3 > 3 && r3 && Object.defineProperty(target, key, r3), r3; }; - __param2 = function(paramIndex, decorator) { + __param3 = function(paramIndex, decorator) { return function(target, key) { decorator(target, key, paramIndex); }; }; - __metadata2 = function(metadataKey, metadataValue) { + __metadata3 = function(metadataKey, metadataValue) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); }; - __awaiter2 = function(thisArg, _arguments, P3, generator) { + __awaiter3 = function(thisArg, _arguments, P3, generator) { function adopt(value) { return value instanceof P3 ? value : new P3(function(resolve) { resolve(value); @@ -213,7 +213,7 @@ var require_tslib = __commonJS({ step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - __generator2 = function(thisArg, body) { + __generator3 = function(thisArg, body) { var _3 = { label: 0, sent: function() { if (t3[0] & 1) throw t3[1]; @@ -289,12 +289,12 @@ var require_tslib = __commonJS({ return { value: op[0] ? op[1] : void 0, done: true }; } }; - __exportStar2 = function(m3, o2) { + __exportStar3 = function(m3, o2) { for (var p3 in m3) if (p3 !== "default" && !Object.prototype.hasOwnProperty.call(o2, p3)) - __createBinding2(o2, m3, p3); + __createBinding3(o2, m3, p3); }; - __createBinding2 = Object.create ? function(o2, m3, k3, k22) { + __createBinding3 = Object.create ? function(o2, m3, k3, k22) { if (k22 === void 0) k22 = k3; Object.defineProperty(o2, k22, { enumerable: true, get: function() { @@ -305,7 +305,7 @@ var require_tslib = __commonJS({ k22 = k3; o2[k22] = m3[k3]; }; - __values2 = function(o2) { + __values3 = function(o2) { var s4 = typeof Symbol === "function" && Symbol.iterator, m3 = s4 && o2[s4], i3 = 0; if (m3) return m3.call(o2); @@ -319,7 +319,7 @@ var require_tslib = __commonJS({ }; throw new TypeError(s4 ? "Object is not iterable." : "Symbol.iterator is not defined."); }; - __read2 = function(o2, n3) { + __read3 = function(o2, n3) { var m3 = typeof Symbol === "function" && o2[Symbol.iterator]; if (!m3) return o2; @@ -340,12 +340,12 @@ var require_tslib = __commonJS({ } return ar; }; - __spread2 = function() { + __spread3 = function() { for (var ar = [], i3 = 0; i3 < arguments.length; i3++) - ar = ar.concat(__read2(arguments[i3])); + ar = ar.concat(__read3(arguments[i3])); return ar; }; - __spreadArrays2 = function() { + __spreadArrays3 = function() { for (var s4 = 0, i3 = 0, il = arguments.length; i3 < il; i3++) s4 += arguments[i3].length; for (var r3 = Array(s4), k3 = 0, i3 = 0; i3 < il; i3++) @@ -353,7 +353,7 @@ var require_tslib = __commonJS({ r3[k3] = a3[j4]; return r3; }; - __spreadArray2 = function(to, from, pack) { + __spreadArray3 = function(to, from, pack) { if (pack || arguments.length === 2) for (var i3 = 0, l4 = from.length, ar; i3 < l4; i3++) { if (ar || !(i3 in from)) { @@ -364,10 +364,10 @@ var require_tslib = __commonJS({ } return to.concat(ar || Array.prototype.slice.call(from)); }; - __await2 = function(v3) { - return this instanceof __await2 ? (this.v = v3, this) : new __await2(v3); + __await3 = function(v3) { + return this instanceof __await3 ? (this.v = v3, this) : new __await3(v3); }; - __asyncGenerator2 = function(thisArg, _arguments, generator) { + __asyncGenerator3 = function(thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g4 = generator.apply(thisArg, _arguments || []), i3, q3 = []; @@ -390,7 +390,7 @@ var require_tslib = __commonJS({ } } function step(r3) { - r3.value instanceof __await2 ? Promise.resolve(r3.value.v).then(fulfill, reject) : settle(q3[0][2], r3); + r3.value instanceof __await3 ? Promise.resolve(r3.value.v).then(fulfill, reject) : settle(q3[0][2], r3); } function fulfill(value) { resume("next", value); @@ -403,7 +403,7 @@ var require_tslib = __commonJS({ resume(q3[0][0], q3[0][1]); } }; - __asyncDelegator2 = function(o2) { + __asyncDelegator3 = function(o2) { var i3, p3; return i3 = {}, verb("next"), verb("throw", function(e3) { throw e3; @@ -412,15 +412,15 @@ var require_tslib = __commonJS({ }, i3; function verb(n3, f3) { i3[n3] = o2[n3] ? function(v3) { - return (p3 = !p3) ? { value: __await2(o2[n3](v3)), done: n3 === "return" } : f3 ? f3(v3) : v3; + return (p3 = !p3) ? { value: __await3(o2[n3](v3)), done: n3 === "return" } : f3 ? f3(v3) : v3; } : f3; } }; - __asyncValues2 = function(o2) { + __asyncValues3 = function(o2) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var m3 = o2[Symbol.asyncIterator], i3; - return m3 ? m3.call(o2) : (o2 = typeof __values2 === "function" ? __values2(o2) : o2[Symbol.iterator](), i3 = {}, verb("next"), verb("throw"), verb("return"), i3[Symbol.asyncIterator] = function() { + return m3 ? m3.call(o2) : (o2 = typeof __values3 === "function" ? __values3(o2) : o2[Symbol.iterator](), i3 = {}, verb("next"), verb("throw"), verb("return"), i3[Symbol.asyncIterator] = function() { return this; }, i3); function verb(n3) { @@ -436,7 +436,7 @@ var require_tslib = __commonJS({ }, reject); } }; - __makeTemplateObject2 = function(cooked, raw) { + __makeTemplateObject3 = function(cooked, raw) { if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { @@ -449,29 +449,29 @@ var require_tslib = __commonJS({ } : function(o2, v3) { o2["default"] = v3; }; - __importStar2 = function(mod) { + __importStar3 = function(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) { for (var k3 in mod) if (k3 !== "default" && Object.prototype.hasOwnProperty.call(mod, k3)) - __createBinding2(result, mod, k3); + __createBinding3(result, mod, k3); } __setModuleDefault(result, mod); return result; }; - __importDefault2 = function(mod) { + __importDefault3 = function(mod) { return mod && mod.__esModule ? mod : { "default": mod }; }; - __classPrivateFieldGet2 = function(receiver, state, kind, f3) { + __classPrivateFieldGet3 = function(receiver, state, kind, f3) { if (kind === "a" && !f3) throw new TypeError("Private accessor was defined without a getter"); if (typeof state === "function" ? receiver !== state || !f3 : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); return kind === "m" ? f3 : kind === "a" ? f3.call(receiver) : f3 ? f3.value : state.get(receiver); }; - __classPrivateFieldSet2 = function(receiver, state, value, kind, f3) { + __classPrivateFieldSet3 = function(receiver, state, value, kind, f3) { if (kind === "m") throw new TypeError("Private method is not writable"); if (kind === "a" && !f3) @@ -480,30 +480,537 @@ var require_tslib = __commonJS({ throw new TypeError("Cannot write private member to an object whose class did not declare it"); return kind === "a" ? f3.call(receiver, value) : f3 ? f3.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); + exporter("__extends", __extends3); + exporter("__assign", __assign3); + exporter("__rest", __rest3); + exporter("__decorate", __decorate3); + exporter("__param", __param3); + exporter("__metadata", __metadata3); + exporter("__awaiter", __awaiter3); + exporter("__generator", __generator3); + exporter("__exportStar", __exportStar3); + exporter("__createBinding", __createBinding3); + exporter("__values", __values3); + exporter("__read", __read3); + exporter("__spread", __spread3); + exporter("__spreadArrays", __spreadArrays3); + exporter("__spreadArray", __spreadArray3); + exporter("__await", __await3); + exporter("__asyncGenerator", __asyncGenerator3); + exporter("__asyncDelegator", __asyncDelegator3); + exporter("__asyncValues", __asyncValues3); + exporter("__makeTemplateObject", __makeTemplateObject3); + exporter("__importStar", __importStar3); + exporter("__importDefault", __importDefault3); + exporter("__classPrivateFieldGet", __classPrivateFieldGet3); + exporter("__classPrivateFieldSet", __classPrivateFieldSet3); + }); + } +}); + +// node_modules/rrule/node_modules/tslib/tslib.js +var require_tslib2 = __commonJS({ + "node_modules/rrule/node_modules/tslib/tslib.js"(exports, module2) { + var __extends3; + var __assign3; + var __rest3; + var __decorate3; + var __param3; + var __esDecorate2; + var __runInitializers2; + var __propKey2; + var __setFunctionName2; + var __metadata3; + var __awaiter3; + var __generator3; + var __exportStar3; + var __values3; + var __read3; + var __spread3; + var __spreadArrays3; + var __spreadArray3; + var __await3; + var __asyncGenerator3; + var __asyncDelegator3; + var __asyncValues3; + var __makeTemplateObject3; + var __importStar3; + var __importDefault3; + var __classPrivateFieldGet3; + var __classPrivateFieldSet3; + var __classPrivateFieldIn2; + var __createBinding3; + (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, v3) { + return exports2[id] = previous ? previous(id, v3) : v3; + }; + } + })(function(exporter) { + var extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b3) { + d2.__proto__ = b3; + } || function(d2, b3) { + for (var p3 in b3) + if (Object.prototype.hasOwnProperty.call(b3, p3)) + d2[p3] = b3[p3]; + }; + __extends3 = function(d2, b3) { + if (typeof b3 !== "function" && b3 !== null) + throw new TypeError("Class extends value " + String(b3) + " is not a constructor or null"); + extendStatics(d2, b3); + function __() { + this.constructor = d2; + } + d2.prototype = b3 === null ? Object.create(b3) : (__.prototype = b3.prototype, new __()); + }; + __assign3 = Object.assign || function(t3) { + for (var s4, i3 = 1, n3 = arguments.length; i3 < n3; i3++) { + s4 = arguments[i3]; + for (var p3 in s4) + if (Object.prototype.hasOwnProperty.call(s4, p3)) + t3[p3] = s4[p3]; + } + return t3; + }; + __rest3 = function(s4, e3) { + var t3 = {}; + for (var p3 in s4) + if (Object.prototype.hasOwnProperty.call(s4, p3) && e3.indexOf(p3) < 0) + t3[p3] = s4[p3]; + if (s4 != null && typeof Object.getOwnPropertySymbols === "function") + for (var i3 = 0, p3 = Object.getOwnPropertySymbols(s4); i3 < p3.length; i3++) { + if (e3.indexOf(p3[i3]) < 0 && Object.prototype.propertyIsEnumerable.call(s4, p3[i3])) + t3[p3[i3]] = s4[p3[i3]]; + } + return t3; + }; + __decorate3 = function(decorators, target, key, desc) { + var c3 = arguments.length, r3 = c3 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d2; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") + r3 = Reflect.decorate(decorators, target, key, desc); + else + for (var i3 = decorators.length - 1; i3 >= 0; i3--) + if (d2 = decorators[i3]) + r3 = (c3 < 3 ? d2(r3) : c3 > 3 ? d2(target, key, r3) : d2(target, key)) || r3; + return c3 > 3 && r3 && Object.defineProperty(target, key, r3), r3; + }; + __param3 = function(paramIndex, decorator) { + return function(target, key) { + decorator(target, key, paramIndex); + }; + }; + __esDecorate2 = function(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { + function accept(f3) { + if (f3 !== void 0 && typeof f3 !== "function") + throw new TypeError("Function expected"); + return f3; + } + var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; + var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; + var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); + var _3, done = false; + for (var i3 = decorators.length - 1; i3 >= 0; i3--) { + var context = {}; + for (var p3 in contextIn) + context[p3] = p3 === "access" ? {} : contextIn[p3]; + for (var p3 in contextIn.access) + context.access[p3] = contextIn.access[p3]; + context.addInitializer = function(f3) { + if (done) + throw new TypeError("Cannot add initializers after decoration has completed"); + extraInitializers.push(accept(f3 || null)); + }; + var result = (0, decorators[i3])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context); + if (kind === "accessor") { + if (result === void 0) + continue; + if (result === null || typeof result !== "object") + throw new TypeError("Object expected"); + if (_3 = accept(result.get)) + descriptor.get = _3; + if (_3 = accept(result.set)) + descriptor.set = _3; + if (_3 = accept(result.init)) + initializers.push(_3); + } else if (_3 = accept(result)) { + if (kind === "field") + initializers.push(_3); + else + descriptor[key] = _3; + } + } + if (target) + Object.defineProperty(target, contextIn.name, descriptor); + done = true; + }; + __runInitializers2 = function(thisArg, initializers, value) { + var useValue = arguments.length > 2; + for (var i3 = 0; i3 < initializers.length; i3++) { + value = useValue ? initializers[i3].call(thisArg, value) : initializers[i3].call(thisArg); + } + return useValue ? value : void 0; + }; + __propKey2 = function(x3) { + return typeof x3 === "symbol" ? x3 : "".concat(x3); + }; + __setFunctionName2 = function(f3, name, prefix) { + if (typeof name === "symbol") + name = name.description ? "[".concat(name.description, "]") : ""; + return Object.defineProperty(f3, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); + }; + __metadata3 = function(metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") + return Reflect.metadata(metadataKey, metadataValue); + }; + __awaiter3 = function(thisArg, _arguments, P3, generator) { + function adopt(value) { + return value instanceof P3 ? value : new P3(function(resolve) { + resolve(value); + }); + } + return new (P3 || (P3 = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e3) { + reject(e3); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e3) { + reject(e3); + } + } + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + __generator3 = function(thisArg, body) { + var _3 = { label: 0, sent: function() { + if (t3[0] & 1) + throw t3[1]; + return t3[1]; + }, trys: [], ops: [] }, f3, y3, t3, g4; + return g4 = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g4[Symbol.iterator] = function() { + return this; + }), g4; + function verb(n3) { + return function(v3) { + return step([n3, v3]); + }; + } + function step(op) { + if (f3) + throw new TypeError("Generator is already executing."); + while (g4 && (g4 = 0, op[0] && (_3 = 0)), _3) + try { + if (f3 = 1, y3 && (t3 = op[0] & 2 ? y3["return"] : op[0] ? y3["throw"] || ((t3 = y3["return"]) && t3.call(y3), 0) : y3.next) && !(t3 = t3.call(y3, op[1])).done) + return t3; + if (y3 = 0, t3) + op = [op[0] & 2, t3.value]; + switch (op[0]) { + case 0: + case 1: + t3 = op; + break; + case 4: + _3.label++; + return { value: op[1], done: false }; + case 5: + _3.label++; + y3 = op[1]; + op = [0]; + continue; + case 7: + op = _3.ops.pop(); + _3.trys.pop(); + continue; + default: + if (!(t3 = _3.trys, t3 = t3.length > 0 && t3[t3.length - 1]) && (op[0] === 6 || op[0] === 2)) { + _3 = 0; + continue; + } + if (op[0] === 3 && (!t3 || op[1] > t3[0] && op[1] < t3[3])) { + _3.label = op[1]; + break; + } + if (op[0] === 6 && _3.label < t3[1]) { + _3.label = t3[1]; + t3 = op; + break; + } + if (t3 && _3.label < t3[2]) { + _3.label = t3[2]; + _3.ops.push(op); + break; + } + if (t3[2]) + _3.ops.pop(); + _3.trys.pop(); + continue; + } + op = body.call(thisArg, _3); + } catch (e3) { + op = [6, e3]; + y3 = 0; + } finally { + f3 = t3 = 0; + } + if (op[0] & 5) + throw op[1]; + return { value: op[0] ? op[1] : void 0, done: true }; + } + }; + __exportStar3 = function(m3, o2) { + for (var p3 in m3) + if (p3 !== "default" && !Object.prototype.hasOwnProperty.call(o2, p3)) + __createBinding3(o2, m3, p3); + }; + __createBinding3 = Object.create ? function(o2, m3, k3, k22) { + if (k22 === void 0) + k22 = k3; + var desc = Object.getOwnPropertyDescriptor(m3, k3); + if (!desc || ("get" in desc ? !m3.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m3[k3]; + } }; + } + Object.defineProperty(o2, k22, desc); + } : function(o2, m3, k3, k22) { + if (k22 === void 0) + k22 = k3; + o2[k22] = m3[k3]; + }; + __values3 = function(o2) { + var s4 = typeof Symbol === "function" && Symbol.iterator, m3 = s4 && o2[s4], i3 = 0; + if (m3) + return m3.call(o2); + if (o2 && typeof o2.length === "number") + return { + next: function() { + if (o2 && i3 >= o2.length) + o2 = void 0; + return { value: o2 && o2[i3++], done: !o2 }; + } + }; + throw new TypeError(s4 ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + __read3 = function(o2, n3) { + var m3 = typeof Symbol === "function" && o2[Symbol.iterator]; + if (!m3) + return o2; + var i3 = m3.call(o2), r3, ar = [], e3; + try { + while ((n3 === void 0 || n3-- > 0) && !(r3 = i3.next()).done) + ar.push(r3.value); + } catch (error) { + e3 = { error }; + } finally { + try { + if (r3 && !r3.done && (m3 = i3["return"])) + m3.call(i3); + } finally { + if (e3) + throw e3.error; + } + } + return ar; + }; + __spread3 = function() { + for (var ar = [], i3 = 0; i3 < arguments.length; i3++) + ar = ar.concat(__read3(arguments[i3])); + return ar; + }; + __spreadArrays3 = function() { + for (var s4 = 0, i3 = 0, il = arguments.length; i3 < il; i3++) + s4 += arguments[i3].length; + for (var r3 = Array(s4), k3 = 0, i3 = 0; i3 < il; i3++) + for (var a3 = arguments[i3], j4 = 0, jl = a3.length; j4 < jl; j4++, k3++) + r3[k3] = a3[j4]; + return r3; + }; + __spreadArray3 = function(to, from, pack) { + if (pack || arguments.length === 2) + for (var i3 = 0, l4 = from.length, ar; i3 < l4; i3++) { + if (ar || !(i3 in from)) { + if (!ar) + ar = Array.prototype.slice.call(from, 0, i3); + ar[i3] = from[i3]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); + }; + __await3 = function(v3) { + return this instanceof __await3 ? (this.v = v3, this) : new __await3(v3); + }; + __asyncGenerator3 = function(thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) + throw new TypeError("Symbol.asyncIterator is not defined."); + var g4 = generator.apply(thisArg, _arguments || []), i3, q3 = []; + return i3 = {}, verb("next"), verb("throw"), verb("return"), i3[Symbol.asyncIterator] = function() { + return this; + }, i3; + function verb(n3) { + if (g4[n3]) + i3[n3] = function(v3) { + return new Promise(function(a3, b3) { + q3.push([n3, v3, a3, b3]) > 1 || resume(n3, v3); + }); + }; + } + function resume(n3, v3) { + try { + step(g4[n3](v3)); + } catch (e3) { + settle(q3[0][3], e3); + } + } + function step(r3) { + r3.value instanceof __await3 ? Promise.resolve(r3.value.v).then(fulfill, reject) : settle(q3[0][2], r3); + } + function fulfill(value) { + resume("next", value); + } + function reject(value) { + resume("throw", value); + } + function settle(f3, v3) { + if (f3(v3), q3.shift(), q3.length) + resume(q3[0][0], q3[0][1]); + } + }; + __asyncDelegator3 = function(o2) { + var i3, p3; + return i3 = {}, verb("next"), verb("throw", function(e3) { + throw e3; + }), verb("return"), i3[Symbol.iterator] = function() { + return this; + }, i3; + function verb(n3, f3) { + i3[n3] = o2[n3] ? function(v3) { + return (p3 = !p3) ? { value: __await3(o2[n3](v3)), done: false } : f3 ? f3(v3) : v3; + } : f3; + } + }; + __asyncValues3 = function(o2) { + if (!Symbol.asyncIterator) + throw new TypeError("Symbol.asyncIterator is not defined."); + var m3 = o2[Symbol.asyncIterator], i3; + return m3 ? m3.call(o2) : (o2 = typeof __values3 === "function" ? __values3(o2) : o2[Symbol.iterator](), i3 = {}, verb("next"), verb("throw"), verb("return"), i3[Symbol.asyncIterator] = function() { + return this; + }, i3); + function verb(n3) { + i3[n3] = o2[n3] && function(v3) { + return new Promise(function(resolve, reject) { + v3 = o2[n3](v3), settle(resolve, reject, v3.done, v3.value); + }); + }; + } + function settle(resolve, reject, d2, v3) { + Promise.resolve(v3).then(function(v4) { + resolve({ value: v4, done: d2 }); + }, reject); + } + }; + __makeTemplateObject3 = function(cooked, raw) { + if (Object.defineProperty) { + Object.defineProperty(cooked, "raw", { value: raw }); + } else { + cooked.raw = raw; + } + return cooked; + }; + var __setModuleDefault = Object.create ? function(o2, v3) { + Object.defineProperty(o2, "default", { enumerable: true, value: v3 }); + } : function(o2, v3) { + o2["default"] = v3; + }; + __importStar3 = function(mod) { + if (mod && mod.__esModule) + return mod; + var result = {}; + if (mod != null) { + for (var k3 in mod) + if (k3 !== "default" && Object.prototype.hasOwnProperty.call(mod, k3)) + __createBinding3(result, mod, k3); + } + __setModuleDefault(result, mod); + return result; + }; + __importDefault3 = function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + __classPrivateFieldGet3 = function(receiver, state, kind, f3) { + if (kind === "a" && !f3) + throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f3 : !state.has(receiver)) + throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f3 : kind === "a" ? f3.call(receiver) : f3 ? f3.value : state.get(receiver); + }; + __classPrivateFieldSet3 = function(receiver, state, value, kind, f3) { + if (kind === "m") + throw new TypeError("Private method is not writable"); + if (kind === "a" && !f3) + throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f3 : !state.has(receiver)) + throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return kind === "a" ? f3.call(receiver, value) : f3 ? f3.value = value : state.set(receiver, value), value; + }; + __classPrivateFieldIn2 = function(state, receiver) { + if (receiver === null || typeof receiver !== "object" && typeof receiver !== "function") + throw new TypeError("Cannot use 'in' operator on non-object"); + return typeof state === "function" ? receiver === state : state.has(receiver); + }; + exporter("__extends", __extends3); + exporter("__assign", __assign3); + exporter("__rest", __rest3); + exporter("__decorate", __decorate3); + exporter("__param", __param3); + exporter("__esDecorate", __esDecorate2); + exporter("__runInitializers", __runInitializers2); + exporter("__propKey", __propKey2); + exporter("__setFunctionName", __setFunctionName2); + exporter("__metadata", __metadata3); + exporter("__awaiter", __awaiter3); + exporter("__generator", __generator3); + exporter("__exportStar", __exportStar3); + exporter("__createBinding", __createBinding3); + exporter("__values", __values3); + exporter("__read", __read3); + exporter("__spread", __spread3); + exporter("__spreadArrays", __spreadArrays3); + exporter("__spreadArray", __spreadArray3); + exporter("__await", __await3); + exporter("__asyncGenerator", __asyncGenerator3); + exporter("__asyncDelegator", __asyncDelegator3); + exporter("__asyncValues", __asyncValues3); + exporter("__makeTemplateObject", __makeTemplateObject3); + exporter("__importStar", __importStar3); + exporter("__importDefault", __importDefault3); + exporter("__classPrivateFieldGet", __classPrivateFieldGet3); + exporter("__classPrivateFieldSet", __classPrivateFieldSet3); + exporter("__classPrivateFieldIn", __classPrivateFieldIn2); }); } }); @@ -511,19 +1018,19 @@ var require_tslib = __commonJS({ // node_modules/ical.js/build/ical.js var require_ical = __commonJS({ "node_modules/ical.js/build/ical.js"(exports, module2) { - var ICAL3; + var ICAL2; (function() { if (typeof module2 === "object") { - ICAL3 = module2.exports; + ICAL2 = module2.exports; } else if (typeof HTMLScriptElement !== "undefined" && "noModule" in HTMLScriptElement.prototype) { - window.ICAL = ICAL3 = {}; - } else if (typeof ICAL3 !== "object") { - ICAL3 = {}; + window.ICAL = ICAL2 = {}; + } else if (typeof ICAL2 !== "object") { + ICAL2 = {}; } })(); - ICAL3.foldLength = 75; - ICAL3.newLineChar = "\r\n"; - ICAL3.helpers = { + ICAL2.foldLength = 75; + ICAL2.newLineChar = "\r\n"; + ICAL2.helpers = { updateTimezones: function(vcal) { var allsubs, properties, vtimezones, reqTzid, i3, tzid; if (!vcal || vcal.name !== "vcalendar") { @@ -552,8 +1059,8 @@ var require_ical = __commonJS({ } } for (i3 in reqTzid) { - if (reqTzid.hasOwnProperty(i3) && !vtimezones[i3] && ICAL3.TimezoneService.has(i3)) { - vcal.addSubcomponent(ICAL3.TimezoneService.get(i3).component); + if (reqTzid.hasOwnProperty(i3) && !vtimezones[i3] && ICAL2.TimezoneService.has(i3)) { + vcal.addSubcomponent(ICAL2.TimezoneService.get(i3).component); } } return vcal; @@ -563,7 +1070,7 @@ var require_ical = __commonJS({ }, strictParseInt: function(string) { var result = parseInt(string, 10); - if (ICAL3.helpers.isStrictlyNaN(result)) { + if (ICAL2.helpers.isStrictlyNaN(result)) { throw new Error('Could not extract integer from "' + string + '"'); } return result; @@ -609,19 +1116,19 @@ var require_ical = __commonJS({ return mid; }, dumpn: function() { - if (!ICAL3.debug) { + if (!ICAL2.debug) { return; } if (typeof console !== "undefined" && "log" in console) { - ICAL3.helpers.dumpn = function consoleDumpn(input) { + ICAL2.helpers.dumpn = function consoleDumpn(input) { console.log(input); }; } else { - ICAL3.helpers.dumpn = function geckoDumpn(input) { + ICAL2.helpers.dumpn = function geckoDumpn(input) { dump(input + "\n"); }; } - ICAL3.helpers.dumpn(arguments[0]); + ICAL2.helpers.dumpn(arguments[0]); }, clone: function(aSrc, aDeep) { if (!aSrc || typeof aSrc != "object") { @@ -633,7 +1140,7 @@ var require_ical = __commonJS({ } else if (Array.isArray(aSrc)) { var arr = []; for (var i3 = 0; i3 < aSrc.length; i3++) { - arr.push(aDeep ? ICAL3.helpers.clone(aSrc[i3], true) : aSrc[i3]); + arr.push(aDeep ? ICAL2.helpers.clone(aSrc[i3], true) : aSrc[i3]); } return arr; } else { @@ -641,7 +1148,7 @@ var require_ical = __commonJS({ for (var name in aSrc) { if (Object.prototype.hasOwnProperty.call(aSrc, name)) { if (aDeep) { - obj[name] = ICAL3.helpers.clone(aSrc[name], true); + obj[name] = ICAL2.helpers.clone(aSrc[name], true); } else { obj[name] = aSrc[name]; } @@ -663,15 +1170,15 @@ var require_ical = __commonJS({ line_length += 3; else line_length += 4; - if (line_length < ICAL3.foldLength + 1) + if (line_length < ICAL2.foldLength + 1) pos += cp > 65535 ? 2 : 1; else { - result += ICAL3.newLineChar + " " + line.substring(0, pos); + result += ICAL2.newLineChar + " " + line.substring(0, pos); line = line.substring(pos); pos = line_length = 0; } } - return result.substr(ICAL3.newLineChar.length + 1); + return result.substr(ICAL2.newLineChar.length + 1); }, pad2: function pad(data) { if (typeof data !== "string") { @@ -699,7 +1206,7 @@ var require_ical = __commonJS({ F3.prototype = base.prototype; child.prototype = new F3(); if (extra) { - ICAL3.helpers.extend(extra, child.prototype); + ICAL2.helpers.extend(extra, child.prototype); } }, extend: function(source, target) { @@ -712,7 +1219,7 @@ var require_ical = __commonJS({ return target; } }; - ICAL3.design = function() { + ICAL2.design = function() { "use strict"; var FROM_ICAL_NEWLINE = /\\\\|\\;|\\,|\\[Nn]/g; var TO_ICAL_NEWLINE = /\\|;|,|\n/g; @@ -809,7 +1316,7 @@ var require_ical = __commonJS({ matches: /^[+-]?\d+\.\d+$/, fromICAL: function(aValue) { var parsed = parseFloat(aValue); - if (ICAL3.helpers.isStrictlyNaN(parsed)) { + if (ICAL2.helpers.isStrictlyNaN(parsed)) { return 0; } return parsed; @@ -821,7 +1328,7 @@ var require_ical = __commonJS({ integer: { fromICAL: function(aValue) { var parsed = parseInt(aValue); - if (ICAL3.helpers.isStrictlyNaN(parsed)) { + if (ICAL2.helpers.isStrictlyNaN(parsed)) { return 0; } return parsed; @@ -846,7 +1353,7 @@ var require_ical = __commonJS({ } }, decorate: function(aValue) { - return ICAL3.UtcOffset.fromString(aValue); + return ICAL2.UtcOffset.fromString(aValue); }, undecorate: function(aValue) { return aValue.toString(); @@ -946,12 +1453,12 @@ var require_ical = __commonJS({ allowIanaToken: true } }; - var icalValues = ICAL3.helpers.extend(commonValues, { + var icalValues = ICAL2.helpers.extend(commonValues, { text: createTextType(FROM_ICAL_NEWLINE, TO_ICAL_NEWLINE), uri: {}, "binary": { decorate: function(aString) { - return ICAL3.Binary.fromString(aString); + return ICAL2.Binary.fromString(aString); }, undecorate: function(aBinary) { return aBinary.toString(); @@ -961,9 +1468,9 @@ var require_ical = __commonJS({ "date": { decorate: function(aValue, aProp) { if (design.strict) { - return ICAL3.Time.fromDateString(aValue, aProp); + return ICAL2.Time.fromDateString(aValue, aProp); } else { - return ICAL3.Time.fromString(aValue, aProp); + return ICAL2.Time.fromString(aValue, aProp); } }, undecorate: function(aValue) { @@ -1015,9 +1522,9 @@ var require_ical = __commonJS({ }, decorate: function(aValue, aProp) { if (design.strict) { - return ICAL3.Time.fromDateTimeString(aValue, aProp); + return ICAL2.Time.fromDateTimeString(aValue, aProp); } else { - return ICAL3.Time.fromString(aValue, aProp); + return ICAL2.Time.fromString(aValue, aProp); } }, undecorate: function(aValue) { @@ -1026,7 +1533,7 @@ var require_ical = __commonJS({ }, duration: { decorate: function(aValue) { - return ICAL3.Duration.fromString(aValue); + return ICAL2.Duration.fromString(aValue); }, undecorate: function(aValue) { return aValue.toString(); @@ -1036,7 +1543,7 @@ var require_ical = __commonJS({ fromICAL: function(string) { var parts = string.split("/"); parts[0] = icalValues["date-time"].fromICAL(parts[0]); - if (!ICAL3.Duration.isValueString(parts[1])) { + if (!ICAL2.Duration.isValueString(parts[1])) { parts[1] = icalValues["date-time"].fromICAL(parts[1]); } return parts; @@ -1047,7 +1554,7 @@ var require_ical = __commonJS({ } else { parts[0] = icalValues["date-time"].toICAL(parts[0]); } - if (!ICAL3.Duration.isValueString(parts[1])) { + if (!ICAL2.Duration.isValueString(parts[1])) { if (!design.strict && parts[1].length == 10) { parts[1] = icalValues.date.toICAL(parts[1]); } else { @@ -1057,7 +1564,7 @@ var require_ical = __commonJS({ return parts.join("/"); }, decorate: function(aValue, aProp) { - return ICAL3.Period.fromJSON(aValue, aProp, !design.strict); + return ICAL2.Period.fromJSON(aValue, aProp, !design.strict); }, undecorate: function(aValue) { return aValue.toJSON(); @@ -1065,7 +1572,7 @@ var require_ical = __commonJS({ }, recur: { fromICAL: function(string) { - return ICAL3.Recur._stringToData(string, true); + return ICAL2.Recur._stringToData(string, true); }, toICAL: function(data) { var str = ""; @@ -1082,7 +1589,7 @@ var require_ical = __commonJS({ } } else if (k3 == "wkst") { if (typeof val === "number") { - val = ICAL3.Recur.numericDayToIcalDay(val); + val = ICAL2.Recur.numericDayToIcalDay(val); } } else if (Array.isArray(val)) { val = val.join(","); @@ -1092,7 +1599,7 @@ var require_ical = __commonJS({ return str.substr(0, str.length - 1); }, decorate: function decorate(aValue) { - return ICAL3.Recur.fromData(aValue); + return ICAL2.Recur.fromData(aValue); }, undecorate: function(aRecur) { return aRecur.toJSON(); @@ -1121,7 +1628,7 @@ var require_ical = __commonJS({ } } }); - var icalProperties = ICAL3.helpers.extend(commonProperties, { + var icalProperties = ICAL2.helpers.extend(commonProperties, { "action": DEFAULT_TYPE_TEXT, "attach": { defaultType: "uri" }, "attendee": { defaultType: "cal-address" }, @@ -1180,12 +1687,12 @@ var require_ical = __commonJS({ "tzid": DEFAULT_TYPE_TEXT, "tzname": DEFAULT_TYPE_TEXT }); - var vcardValues = ICAL3.helpers.extend(commonValues, { + var vcardValues = ICAL2.helpers.extend(commonValues, { text: createTextType(FROM_VCARD_NEWLINE, TO_VCARD_NEWLINE), uri: createTextType(FROM_VCARD_NEWLINE, TO_VCARD_NEWLINE), date: { decorate: function(aValue) { - return ICAL3.VCardTime.fromDateAndOrTimeString(aValue, "date"); + return ICAL2.VCardTime.fromDateAndOrTimeString(aValue, "date"); }, undecorate: function(aValue) { return aValue.toString(); @@ -1211,7 +1718,7 @@ var require_ical = __commonJS({ }, time: { decorate: function(aValue) { - return ICAL3.VCardTime.fromDateAndOrTimeString("T" + aValue, "time"); + return ICAL2.VCardTime.fromDateAndOrTimeString("T" + aValue, "time"); }, undecorate: function(aValue) { return aValue.toString(); @@ -1266,7 +1773,7 @@ var require_ical = __commonJS({ }, "date-time": { decorate: function(aValue) { - return ICAL3.VCardTime.fromDateAndOrTimeString(aValue, "date-time"); + return ICAL2.VCardTime.fromDateAndOrTimeString(aValue, "date-time"); }, undecorate: function(aValue) { return aValue.toString(); @@ -1280,7 +1787,7 @@ var require_ical = __commonJS({ }, "date-and-or-time": { decorate: function(aValue) { - return ICAL3.VCardTime.fromDateAndOrTimeString(aValue, "date-and-or-time"); + return ICAL2.VCardTime.fromDateAndOrTimeString(aValue, "date-and-or-time"); }, undecorate: function(aValue) { return aValue.toString(); @@ -1323,7 +1830,7 @@ var require_ical = __commonJS({ allowIanaToken: true } }; - var vcardProperties = ICAL3.helpers.extend(commonProperties, { + var vcardProperties = ICAL2.helpers.extend(commonProperties, { "adr": { defaultType: "text", structuredValue: ";", multiValue: "," }, "anniversary": DEFAULT_TYPE_DATE_ANDOR_TIME, "bday": DEFAULT_TYPE_DATE_ANDOR_TIME, @@ -1356,7 +1863,7 @@ var require_ical = __commonJS({ "tz": { defaultType: "text", allowedTypes: ["text", "utc-offset", "uri"] }, "xml": DEFAULT_TYPE_TEXT }); - var vcard3Values = ICAL3.helpers.extend(commonValues, { + var vcard3Values = ICAL2.helpers.extend(commonValues, { binary: icalValues.binary, date: vcardValues.date, "date-time": vcardValues["date-time"], @@ -1373,7 +1880,7 @@ var require_ical = __commonJS({ return aValue.substr(0, 7); }, decorate: function(aValue) { - return ICAL3.UtcOffset.fromString(aValue); + return ICAL2.UtcOffset.fromString(aValue); }, undecorate: function(aValue) { return aValue.toString(); @@ -1404,7 +1911,7 @@ var require_ical = __commonJS({ allowIanaToken: true } }; - var vcard3Properties = ICAL3.helpers.extend(commonProperties, { + var vcard3Properties = ICAL2.helpers.extend(commonProperties, { fn: DEFAULT_TYPE_TEXT, n: { defaultType: "text", structuredValue: ";", multiValue: "," }, nickname: DEFAULT_TYPE_TEXT_MULTI, @@ -1482,12 +1989,12 @@ var require_ical = __commonJS({ }; return design; }(); - ICAL3.stringify = function() { + ICAL2.stringify = function() { "use strict"; var LINE_ENDING = "\r\n"; var DEFAULT_VALUE_TYPE = "unknown"; - var design = ICAL3.design; - var helpers = ICAL3.helpers; + var design = ICAL2.design; + var helpers = ICAL2.helpers; function stringify(jCal) { if (typeof jCal[0] == "string") { jCal = [jCal]; @@ -1592,7 +2099,7 @@ var require_ical = __commonJS({ } else { line += stringify.value(property[3], valueType, designSet, false); } - return noFold ? line : ICAL3.helpers.foldline(line); + return noFold ? line : ICAL2.helpers.foldline(line); }; stringify.propertyValue = function(value) { if (helpers.unescapedIndexOf(value, ",") === -1 && helpers.unescapedIndexOf(value, ":") === -1 && helpers.unescapedIndexOf(value, ";") === -1) { @@ -1623,14 +2130,14 @@ var require_ical = __commonJS({ return value; }; stringify._rfc6868Unescape = function(val) { - return val.replace(/[\n^"]/g, function(x4) { - return RFC6868_REPLACE_MAP[x4]; + return val.replace(/[\n^"]/g, function(x3) { + return RFC6868_REPLACE_MAP[x3]; }); }; var RFC6868_REPLACE_MAP = { '"': "^'", "\n": "^n", "^": "^^" }; return stringify; }(); - ICAL3.parse = function() { + ICAL2.parse = function() { "use strict"; var CHAR = /[^ \t]/; var MULTIVALUE_DELIMITER = ","; @@ -1639,8 +2146,8 @@ var require_ical = __commonJS({ var PARAM_NAME_DELIMITER = "="; var DEFAULT_VALUE_TYPE = "unknown"; var DEFAULT_PARAM_TYPE = "text"; - var design = ICAL3.design; - var helpers = ICAL3.helpers; + var design = ICAL2.design; + var helpers = ICAL2.helpers; function ParserError(message) { this.message = message; this.name = "ParserError"; @@ -1648,9 +2155,9 @@ var require_ical = __commonJS({ throw new Error(); } catch (e3) { if (e3.stack) { - var split = e3.stack.split("\n"); - split.shift(); - this.stack = split.join("\n"); + var split2 = e3.stack.split("\n"); + split2.shift(); + this.stack = split2.join("\n"); } } } @@ -1875,8 +2382,8 @@ var require_ical = __commonJS({ return [result, value, valuePos]; }; parser._rfc6868Escape = function(val) { - return val.replace(/\^['n^]/g, function(x4) { - return RFC6868_REPLACE_MAP[x4]; + return val.replace(/\^['n^]/g, function(x3) { + return RFC6868_REPLACE_MAP[x3]; }); }; var RFC6868_REPLACE_MAP = { "^'": '"', "^n": "\n", "^^": "^" }; @@ -1940,19 +2447,19 @@ var require_ical = __commonJS({ }; return parser; }(); - ICAL3.Component = function() { + ICAL2.Component = function() { "use strict"; var PROPERTY_INDEX = 1; var COMPONENT_INDEX = 2; var NAME_INDEX = 0; - function Component5(jCal, parent) { + function Component4(jCal, parent) { if (typeof jCal === "string") { jCal = [jCal, [], []]; } this.jCal = jCal; this.parent = parent || null; } - Component5.prototype = { + Component4.prototype = { _hydratedPropertyCount: 0, _hydratedComponentCount: 0, get name() { @@ -1960,7 +2467,7 @@ var require_ical = __commonJS({ }, get _designSet() { var parentDesign = this.parent && this.parent._designSet; - return parentDesign || ICAL3.design.getDesignSet(this.name); + return parentDesign || ICAL2.design.getDesignSet(this.name); }, _hydrateComponent: function(index) { if (!this._components) { @@ -1970,7 +2477,7 @@ var require_ical = __commonJS({ if (this._components[index]) { return this._components[index]; } - var comp = new Component5(this.jCal[COMPONENT_INDEX][index], this); + var comp = new Component4(this.jCal[COMPONENT_INDEX][index], this); this._hydratedComponentCount++; return this._components[index] = comp; }, @@ -1982,7 +2489,7 @@ var require_ical = __commonJS({ if (this._properties[index]) { return this._properties[index]; } - var prop = new ICAL3.Property(this.jCal[PROPERTY_INDEX][index], this); + var prop = new ICAL2.Property(this.jCal[PROPERTY_INDEX][index], this); this._hydratedPropertyCount++; return this._properties[index] = prop; }, @@ -2152,7 +2659,7 @@ var require_ical = __commonJS({ return removed; }, addProperty: function(property) { - if (!(property instanceof ICAL3.Property)) { + if (!(property instanceof ICAL2.Property)) { throw new TypeError("must instance of ICAL.Property"); } if (!this._properties) { @@ -2169,7 +2676,7 @@ var require_ical = __commonJS({ return property; }, addPropertyWithValue: function(name, value) { - var prop = new ICAL3.Property(name); + var prop = new ICAL2.Property(name); prop.setValue(value); this.addProperty(prop); return prop; @@ -2199,21 +2706,21 @@ var require_ical = __commonJS({ return this.jCal; }, toString: function() { - return ICAL3.stringify.component(this.jCal, this._designSet); + return ICAL2.stringify.component(this.jCal, this._designSet); } }; - Component5.fromString = function(str) { - return new Component5(ICAL3.parse.component(str)); + Component4.fromString = function(str) { + return new Component4(ICAL2.parse.component(str)); }; - return Component5; + return Component4; }(); - ICAL3.Property = function() { + ICAL2.Property = function() { "use strict"; var NAME_INDEX = 0; var PROP_INDEX = 1; var TYPE_INDEX = 2; var VALUE_INDEX = 3; - var design = ICAL3.design; + var design = ICAL2.design; function Property(jCal, parent) { this._parent = parent || null; if (typeof jCal === "string") { @@ -2391,15 +2898,15 @@ var require_ical = __commonJS({ return this.jCal; }, toICALString: function() { - return ICAL3.stringify.property(this.jCal, this._designSet, true); + return ICAL2.stringify.property(this.jCal, this._designSet, true); } }; Property.fromString = function(str, designSet) { - return new Property(ICAL3.parse.property(str, designSet)); + return new Property(ICAL2.parse.property(str, designSet)); }; return Property; }(); - ICAL3.UtcOffset = function() { + ICAL2.UtcOffset = function() { function UtcOffset(aData) { this.fromData(aData); } @@ -2409,7 +2916,7 @@ var require_ical = __commonJS({ factor: 1, icaltype: "utc-offset", clone: function() { - return ICAL3.UtcOffset.fromSeconds(this.toSeconds()); + return ICAL2.UtcOffset.fromSeconds(this.toSeconds()); }, fromData: function(aData) { if (aData) { @@ -2424,9 +2931,9 @@ var require_ical = __commonJS({ fromSeconds: function(aSeconds) { var secs = Math.abs(aSeconds); this.factor = aSeconds < 0 ? -1 : 1; - this.hours = ICAL3.helpers.trunc(secs / 3600); + this.hours = ICAL2.helpers.trunc(secs / 3600); secs -= this.hours * 3600; - this.minutes = ICAL3.helpers.trunc(secs / 60); + this.minutes = ICAL2.helpers.trunc(secs / 60); return this; }, toSeconds: function() { @@ -2452,18 +2959,18 @@ var require_ical = __commonJS({ } }, toICALString: function() { - return ICAL3.design.icalendar.value["utc-offset"].toICAL(this.toString()); + return ICAL2.design.icalendar.value["utc-offset"].toICAL(this.toString()); }, toString: function toString() { - return (this.factor == 1 ? "+" : "-") + ICAL3.helpers.pad2(this.hours) + ":" + ICAL3.helpers.pad2(this.minutes); + return (this.factor == 1 ? "+" : "-") + ICAL2.helpers.pad2(this.hours) + ":" + ICAL2.helpers.pad2(this.minutes); } }; UtcOffset.fromString = function(aString) { var options = {}; options.factor = aString[0] === "+" ? 1 : -1; - options.hours = ICAL3.helpers.strictParseInt(aString.substr(1, 2)); - options.minutes = ICAL3.helpers.strictParseInt(aString.substr(4, 2)); - return new ICAL3.UtcOffset(options); + options.hours = ICAL2.helpers.strictParseInt(aString.substr(1, 2)); + options.minutes = ICAL2.helpers.strictParseInt(aString.substr(4, 2)); + return new ICAL2.UtcOffset(options); }; UtcOffset.fromSeconds = function(aSeconds) { var instance = new UtcOffset(); @@ -2472,7 +2979,7 @@ var require_ical = __commonJS({ }; return UtcOffset; }(); - ICAL3.Binary = function() { + ICAL2.Binary = function() { function Binary(aValue) { this.value = aValue; } @@ -2542,10 +3049,10 @@ var require_ical = __commonJS({ return Binary; }(); (function() { - ICAL3.Period = function icalperiod(aData) { + ICAL2.Period = function icalperiod(aData) { this.wrappedJSObject = this; if (aData && "start" in aData) { - if (aData.start && !(aData.start instanceof ICAL3.Time)) { + if (aData.start && !(aData.start instanceof ICAL2.Time)) { throw new TypeError(".start must be an instance of ICAL.Time"); } this.start = aData.start; @@ -2554,26 +3061,26 @@ var require_ical = __commonJS({ throw new Error("cannot accept both end and duration"); } if (aData && "end" in aData) { - if (aData.end && !(aData.end instanceof ICAL3.Time)) { + if (aData.end && !(aData.end instanceof ICAL2.Time)) { throw new TypeError(".end must be an instance of ICAL.Time"); } this.end = aData.end; } if (aData && "duration" in aData) { - if (aData.duration && !(aData.duration instanceof ICAL3.Duration)) { + if (aData.duration && !(aData.duration instanceof ICAL2.Duration)) { throw new TypeError(".duration must be an instance of ICAL.Duration"); } this.duration = aData.duration; } }; - ICAL3.Period.prototype = { + ICAL2.Period.prototype = { start: null, end: null, duration: null, icalclass: "icalperiod", icaltype: "period", clone: function() { - return ICAL3.Period.fromData({ + return ICAL2.Period.fromData({ start: this.start ? this.start.clone() : null, end: this.end ? this.end.clone() : null, duration: this.duration ? this.duration.clone() : null @@ -2605,40 +3112,40 @@ var require_ical = __commonJS({ return this.start.toICALString() + "/" + (this.end || this.duration).toICALString(); } }; - ICAL3.Period.fromString = function fromString(str, prop) { + ICAL2.Period.fromString = function fromString(str, prop) { var parts = str.split("/"); if (parts.length !== 2) { throw new Error('Invalid string value: "' + str + '" must contain a "/" char.'); } var options = { - start: ICAL3.Time.fromDateTimeString(parts[0], prop) + start: ICAL2.Time.fromDateTimeString(parts[0], prop) }; var end = parts[1]; - if (ICAL3.Duration.isValueString(end)) { - options.duration = ICAL3.Duration.fromString(end); + if (ICAL2.Duration.isValueString(end)) { + options.duration = ICAL2.Duration.fromString(end); } else { - options.end = ICAL3.Time.fromDateTimeString(end, prop); + options.end = ICAL2.Time.fromDateTimeString(end, prop); } - return new ICAL3.Period(options); + return new ICAL2.Period(options); }; - ICAL3.Period.fromData = function fromData(aData) { - return new ICAL3.Period(aData); + ICAL2.Period.fromData = function fromData(aData) { + return new ICAL2.Period(aData); }; - ICAL3.Period.fromJSON = function(aData, aProp, aLenient) { + ICAL2.Period.fromJSON = function(aData, aProp, aLenient) { function fromDateOrDateTimeString(aValue, aProp2) { if (aLenient) { - return ICAL3.Time.fromString(aValue, aProp2); + return ICAL2.Time.fromString(aValue, aProp2); } else { - return ICAL3.Time.fromDateTimeString(aValue, aProp2); + return ICAL2.Time.fromDateTimeString(aValue, aProp2); } } - if (ICAL3.Duration.isValueString(aData[1])) { - return ICAL3.Period.fromData({ + if (ICAL2.Duration.isValueString(aData[1])) { + return ICAL2.Period.fromData({ start: fromDateOrDateTimeString(aData[0], aProp), - duration: ICAL3.Duration.fromString(aData[1]) + duration: ICAL2.Duration.fromString(aData[1]) }); } else { - return ICAL3.Period.fromData({ + return ICAL2.Period.fromData({ start: fromDateOrDateTimeString(aData[0], aProp), end: fromDateOrDateTimeString(aData[1], aProp) }); @@ -2647,11 +3154,11 @@ var require_ical = __commonJS({ })(); (function() { var DURATION_LETTERS = /([PDWHMTS]{1,1})/; - ICAL3.Duration = function icalduration(data) { + ICAL2.Duration = function icalduration(data) { this.wrappedJSObject = this; this.fromData(data); }; - ICAL3.Duration.prototype = { + ICAL2.Duration.prototype = { weeks: 0, days: 0, hours: 0, @@ -2660,8 +3167,8 @@ var require_ical = __commonJS({ isNegative: false, icalclass: "icalduration", icaltype: "duration", - clone: function clone3() { - return ICAL3.Duration.fromData(this); + clone: function clone4() { + return ICAL2.Duration.fromData(this); }, toSeconds: function toSeconds() { var seconds = this.seconds + 60 * this.minutes + 3600 * this.hours + 86400 * this.days + 7 * 86400 * this.weeks; @@ -2670,7 +3177,7 @@ var require_ical = __commonJS({ fromSeconds: function fromSeconds(aSeconds) { var secs = Math.abs(aSeconds); this.isNegative = aSeconds < 0; - this.days = ICAL3.helpers.trunc(secs / 86400); + this.days = ICAL2.helpers.trunc(secs / 86400); if (this.days % 7 == 0) { this.weeks = this.days / 7; this.days = 0; @@ -2678,9 +3185,9 @@ var require_ical = __commonJS({ this.weeks = 0; } secs -= (this.days + 7 * this.weeks) * 86400; - this.hours = ICAL3.helpers.trunc(secs / 3600); + this.hours = ICAL2.helpers.trunc(secs / 3600); secs -= this.hours * 3600; - this.minutes = ICAL3.helpers.trunc(secs / 60); + this.minutes = ICAL2.helpers.trunc(secs / 60); secs -= this.minutes * 60; this.seconds = secs; return this; @@ -2750,8 +3257,8 @@ var require_ical = __commonJS({ return this.toString(); } }; - ICAL3.Duration.fromSeconds = function icalduration_from_seconds(aSeconds) { - return new ICAL3.Duration().fromSeconds(aSeconds); + ICAL2.Duration.fromSeconds = function icalduration_from_seconds(aSeconds) { + return new ICAL2.Duration().fromSeconds(aSeconds); }; function parseDurationChunk(letter, number, object) { var type; @@ -2786,17 +3293,17 @@ var require_ical = __commonJS({ throw new Error('invalid duration value: Missing number before "' + letter + '"'); } var num = parseInt(number, 10); - if (ICAL3.helpers.isStrictlyNaN(num)) { + if (ICAL2.helpers.isStrictlyNaN(num)) { throw new Error('invalid duration value: Invalid number "' + number + '" before "' + letter + '"'); } object[type] = num; } return 1; } - ICAL3.Duration.isValueString = function(string) { + ICAL2.Duration.isValueString = function(string) { return string[0] === "P" || string[1] === "P"; }; - ICAL3.Duration.fromString = function icalduration_from_string(aStr) { + ICAL2.Duration.fromString = function icalduration_from_string(aStr) { var pos = 0; var dict = Object.create(null); var chunks = 0; @@ -2809,10 +3316,10 @@ var require_ical = __commonJS({ if (chunks < 2) { throw new Error('invalid duration value: Not enough duration components in "' + aStr + '"'); } - return new ICAL3.Duration(dict); + return new ICAL2.Duration(dict); }; - ICAL3.Duration.fromData = function icalduration_from_data(aData) { - return new ICAL3.Duration(aData); + ICAL2.Duration.fromData = function icalduration_from_data(aData) { + return new ICAL2.Duration(aData); }; })(); (function() { @@ -2823,11 +3330,11 @@ var require_ical = __commonJS({ "latitude", "longitude" ]; - ICAL3.Timezone = function icaltimezone(data) { + ICAL2.Timezone = function icaltimezone(data) { this.wrappedJSObject = this; this.fromData(data); }; - ICAL3.Timezone.prototype = { + ICAL2.Timezone.prototype = { tzid: "", location: "", tznames: "", @@ -2839,14 +3346,14 @@ var require_ical = __commonJS({ fromData: function fromData(aData) { this.expandedUntilYear = 0; this.changes = []; - if (aData instanceof ICAL3.Component) { + if (aData instanceof ICAL2.Component) { this.component = aData; } else { if (aData && "component" in aData) { if (typeof aData.component == "string") { - var jCal = ICAL3.parse(aData.component); - this.component = new ICAL3.Component(jCal); - } else if (aData.component instanceof ICAL3.Component) { + var jCal = ICAL2.parse(aData.component); + this.component = new ICAL2.Component(jCal); + } else if (aData.component instanceof ICAL2.Component) { this.component = aData.component; } else { this.component = null; @@ -2861,13 +3368,13 @@ var require_ical = __commonJS({ } } } - if (this.component instanceof ICAL3.Component && !this.tzid) { + if (this.component instanceof ICAL2.Component && !this.tzid) { this.tzid = this.component.getFirstPropertyValue("tzid"); } return this; }, utcOffset: function utcOffset(tt) { - if (this == ICAL3.Timezone.utcTimezone || this == ICAL3.Timezone.localTimezone) { + if (this == ICAL2.Timezone.utcTimezone || this == ICAL2.Timezone.localTimezone) { return 0; } this._ensureCoverage(tt.year); @@ -2886,13 +3393,13 @@ var require_ical = __commonJS({ var change_num_to_use = -1; var step = 1; for (; ; ) { - var change = ICAL3.helpers.clone(this.changes[change_num], true); + var change = ICAL2.helpers.clone(this.changes[change_num], true); if (change.utcOffset < change.prevUtcOffset) { - ICAL3.Timezone.adjust_change(change, 0, 0, 0, change.utcOffset); + ICAL2.Timezone.adjust_change(change, 0, 0, 0, change.utcOffset); } else { - ICAL3.Timezone.adjust_change(change, 0, 0, 0, change.prevUtcOffset); + ICAL2.Timezone.adjust_change(change, 0, 0, 0, change.prevUtcOffset); } - var cmp = ICAL3.Timezone._compare_change_fn(tt_change, change); + var cmp = ICAL2.Timezone._compare_change_fn(tt_change, change); if (cmp >= 0) { change_num_to_use = change_num; } else { @@ -2912,9 +3419,9 @@ var require_ical = __commonJS({ var zone_change = this.changes[change_num_to_use]; var utcOffset_change = zone_change.utcOffset - zone_change.prevUtcOffset; if (utcOffset_change < 0 && change_num_to_use > 0) { - var tmp_change = ICAL3.helpers.clone(zone_change, true); - ICAL3.Timezone.adjust_change(tmp_change, 0, 0, 0, tmp_change.prevUtcOffset); - if (ICAL3.Timezone._compare_change_fn(tt_change, tmp_change) < 0) { + var tmp_change = ICAL2.helpers.clone(zone_change, true); + ICAL2.Timezone.adjust_change(tmp_change, 0, 0, 0, tmp_change.prevUtcOffset); + if (ICAL2.Timezone._compare_change_fn(tt_change, tmp_change) < 0) { var prev_zone_change = this.changes[change_num_to_use - 1]; var want_daylight = false; if (zone_change.is_daylight != want_daylight && prev_zone_change.is_daylight == want_daylight) { @@ -2925,24 +3432,24 @@ var require_ical = __commonJS({ return zone_change.utcOffset; }, _findNearbyChange: function icaltimezone_find_nearby_change(change) { - var idx = ICAL3.helpers.binsearchInsert(this.changes, change, ICAL3.Timezone._compare_change_fn); + var idx = ICAL2.helpers.binsearchInsert(this.changes, change, ICAL2.Timezone._compare_change_fn); if (idx >= this.changes.length) { return this.changes.length - 1; } return idx; }, _ensureCoverage: function(aYear) { - if (ICAL3.Timezone._minimumExpansionYear == -1) { - var today = ICAL3.Time.now(); - ICAL3.Timezone._minimumExpansionYear = today.year; + if (ICAL2.Timezone._minimumExpansionYear == -1) { + var today = ICAL2.Time.now(); + ICAL2.Timezone._minimumExpansionYear = today.year; } var changesEndYear = aYear; - if (changesEndYear < ICAL3.Timezone._minimumExpansionYear) { - changesEndYear = ICAL3.Timezone._minimumExpansionYear; + if (changesEndYear < ICAL2.Timezone._minimumExpansionYear) { + changesEndYear = ICAL2.Timezone._minimumExpansionYear; } - changesEndYear += ICAL3.Timezone.EXTRA_COVERAGE; - if (changesEndYear > ICAL3.Timezone.MAX_YEAR) { - changesEndYear = ICAL3.Timezone.MAX_YEAR; + changesEndYear += ICAL2.Timezone.EXTRA_COVERAGE; + if (changesEndYear > ICAL2.Timezone.MAX_YEAR) { + changesEndYear = ICAL2.Timezone.MAX_YEAR; } if (!this.changes.length || this.expandedUntilYear < aYear) { var subcomps = this.component.getAllSubcomponents(); @@ -2951,7 +3458,7 @@ var require_ical = __commonJS({ for (; compIdx < compLen; compIdx++) { this._expandComponent(subcomps[compIdx], changesEndYear, this.changes); } - this.changes.sort(ICAL3.Timezone._compare_change_fn); + this.changes.sort(ICAL2.Timezone._compare_change_fn); this.expandedUntilYear = changesEndYear; } }, @@ -2979,7 +3486,7 @@ var require_ical = __commonJS({ change.hour = dtstart.hour; change.minute = dtstart.minute; change.second = dtstart.second; - ICAL3.Timezone.adjust_change(change, 0, 0, 0, -change.prevUtcOffset); + ICAL2.Timezone.adjust_change(change, 0, 0, 0, -change.prevUtcOffset); changes.push(change); } else { var props = aComponent.getAllProperties("rdate"); @@ -2997,15 +3504,15 @@ var require_ical = __commonJS({ change.hour = dtstart.hour; change.minute = dtstart.minute; change.second = dtstart.second; - if (dtstart.zone != ICAL3.Timezone.utcTimezone) { - ICAL3.Timezone.adjust_change(change, 0, 0, 0, -change.prevUtcOffset); + if (dtstart.zone != ICAL2.Timezone.utcTimezone) { + ICAL2.Timezone.adjust_change(change, 0, 0, 0, -change.prevUtcOffset); } } else { change.hour = time.hour; change.minute = time.minute; change.second = time.second; - if (time.zone != ICAL3.Timezone.utcTimezone) { - ICAL3.Timezone.adjust_change(change, 0, 0, 0, -change.prevUtcOffset); + if (time.zone != ICAL2.Timezone.utcTimezone) { + ICAL2.Timezone.adjust_change(change, 0, 0, 0, -change.prevUtcOffset); } } changes.push(change); @@ -3014,9 +3521,9 @@ var require_ical = __commonJS({ if (rrule) { rrule = rrule.getFirstValue(); change = init_changes(); - if (rrule.until && rrule.until.zone == ICAL3.Timezone.utcTimezone) { + if (rrule.until && rrule.until.zone == ICAL2.Timezone.utcTimezone) { rrule.until.adjust(0, 0, 0, change.prevUtcOffset); - rrule.until.zone = ICAL3.Timezone.localTimezone; + rrule.until.zone = ICAL2.Timezone.localTimezone; } var iterator = rrule.iterator(dtstart); var occ; @@ -3032,7 +3539,7 @@ var require_ical = __commonJS({ change.minute = occ.minute; change.second = occ.second; change.isDate = occ.isDate; - ICAL3.Timezone.adjust_change(change, 0, 0, 0, -change.prevUtcOffset); + ICAL2.Timezone.adjust_change(change, 0, 0, 0, -change.prevUtcOffset); changes.push(change); } } @@ -3043,7 +3550,7 @@ var require_ical = __commonJS({ return this.tznames ? this.tznames : this.tzid; } }; - ICAL3.Timezone._compare_change_fn = function icaltimezone_compare_change_fn(a3, b3) { + ICAL2.Timezone._compare_change_fn = function icaltimezone_compare_change_fn(a3, b3) { if (a3.year < b3.year) return -1; else if (a3.year > b3.year) @@ -3070,8 +3577,8 @@ var require_ical = __commonJS({ return 1; return 0; }; - ICAL3.Timezone.convert_time = function icaltimezone_convert_time(tt, from_zone, to_zone) { - if (tt.isDate || from_zone.tzid == to_zone.tzid || from_zone == ICAL3.Timezone.localTimezone || to_zone == ICAL3.Timezone.localTimezone) { + ICAL2.Timezone.convert_time = function icaltimezone_convert_time(tt, from_zone, to_zone) { + if (tt.isDate || from_zone.tzid == to_zone.tzid || from_zone == ICAL2.Timezone.localTimezone || to_zone == ICAL2.Timezone.localTimezone) { tt.zone = to_zone; return tt; } @@ -3081,24 +3588,24 @@ var require_ical = __commonJS({ tt.adjust(0, 0, 0, utcOffset); return null; }; - ICAL3.Timezone.fromData = function icaltimezone_fromData(aData) { - var tt = new ICAL3.Timezone(); + ICAL2.Timezone.fromData = function icaltimezone_fromData(aData) { + var tt = new ICAL2.Timezone(); return tt.fromData(aData); }; - ICAL3.Timezone.utcTimezone = ICAL3.Timezone.fromData({ + ICAL2.Timezone.utcTimezone = ICAL2.Timezone.fromData({ tzid: "UTC" }); - ICAL3.Timezone.localTimezone = ICAL3.Timezone.fromData({ + ICAL2.Timezone.localTimezone = ICAL2.Timezone.fromData({ tzid: "floating" }); - ICAL3.Timezone.adjust_change = function icaltimezone_adjust_change(change, days, hours, minutes, seconds) { - return ICAL3.Time.prototype.adjust.call(change, days, hours, minutes, seconds, change); + ICAL2.Timezone.adjust_change = function icaltimezone_adjust_change(change, days, hours, minutes, seconds) { + return ICAL2.Time.prototype.adjust.call(change, days, hours, minutes, seconds, change); }; - ICAL3.Timezone._minimumExpansionYear = -1; - ICAL3.Timezone.MAX_YEAR = 2035; - ICAL3.Timezone.EXTRA_COVERAGE = 5; + ICAL2.Timezone._minimumExpansionYear = -1; + ICAL2.Timezone.MAX_YEAR = 2035; + ICAL2.Timezone.EXTRA_COVERAGE = 5; })(); - ICAL3.TimezoneService = function() { + ICAL2.TimezoneService = function() { var zones; var TimezoneService = { get count() { @@ -3106,7 +3613,7 @@ var require_ical = __commonJS({ }, reset: function() { zones = Object.create(null); - var utc = ICAL3.Timezone.utcTimezone; + var utc = ICAL2.Timezone.utcTimezone; zones.Z = utc; zones.UTC = utc; zones.GMT = utc; @@ -3118,13 +3625,13 @@ var require_ical = __commonJS({ return zones[tzid]; }, register: function(name, timezone) { - if (name instanceof ICAL3.Component) { + if (name instanceof ICAL2.Component) { if (name.name === "vtimezone") { - timezone = new ICAL3.Timezone(name); + timezone = new ICAL2.Timezone(name); name = timezone.tzid; } } - if (timezone instanceof ICAL3.Timezone) { + if (timezone instanceof ICAL2.Timezone) { zones[name] = timezone; } else { throw new TypeError("timezone must be ICAL.Timezone or ICAL.Component"); @@ -3138,7 +3645,7 @@ var require_ical = __commonJS({ return TimezoneService; }(); (function() { - ICAL3.Time = function icaltime(data, zone) { + ICAL2.Time = function icaltime(data, zone) { this.wrappedJSObject = this; var time = this._time = Object.create(null); time.year = 0; @@ -3150,9 +3657,9 @@ var require_ical = __commonJS({ time.isDate = false; this.fromData(data, zone); }; - ICAL3.Time._dowCache = {}; - ICAL3.Time._wnCache = {}; - ICAL3.Time.prototype = { + ICAL2.Time._dowCache = {}; + ICAL2.Time._wnCache = {}; + ICAL2.Time.prototype = { icalclass: "icaltime", _cachedUnixTime: null, get icaltype() { @@ -3161,11 +3668,11 @@ var require_ical = __commonJS({ zone: null, _pendingNormalization: false, clone: function() { - return new ICAL3.Time(this._time, this.zone); + return new ICAL2.Time(this._time, this.zone); }, reset: function icaltime_reset() { - this.fromData(ICAL3.Time.epochTime); - this.zone = ICAL3.Timezone.utcTimezone; + this.fromData(ICAL2.Time.epochTime); + this.zone = ICAL2.Timezone.utcTimezone; }, resetTo: function icaltime_resetTo(year, month, day, hour, minute, second, timezone) { this.fromData({ @@ -3183,7 +3690,7 @@ var require_ical = __commonJS({ this.reset(); } else { if (useUTC) { - this.zone = ICAL3.Timezone.utcTimezone; + this.zone = ICAL2.Timezone.utcTimezone; this.year = aDate.getUTCFullYear(); this.month = aDate.getUTCMonth() + 1; this.day = aDate.getUTCDate(); @@ -3191,7 +3698,7 @@ var require_ical = __commonJS({ this.minute = aDate.getUTCMinutes(); this.second = aDate.getUTCSeconds(); } else { - this.zone = ICAL3.Timezone.localTimezone; + this.zone = ICAL2.Timezone.localTimezone; this.year = aDate.getFullYear(); this.month = aDate.getMonth() + 1; this.day = aDate.getDate(); @@ -3222,44 +3729,44 @@ var require_ical = __commonJS({ this.isDate = aData.isDate; } if (aData && "timezone" in aData) { - var zone = ICAL3.TimezoneService.get(aData.timezone); - this.zone = zone || ICAL3.Timezone.localTimezone; + var zone = ICAL2.TimezoneService.get(aData.timezone); + this.zone = zone || ICAL2.Timezone.localTimezone; } if (aData && "zone" in aData) { this.zone = aData.zone; } if (!this.zone) { - this.zone = ICAL3.Timezone.localTimezone; + this.zone = ICAL2.Timezone.localTimezone; } this._cachedUnixTime = null; return this; }, dayOfWeek: function icaltime_dayOfWeek(aWeekStart) { - var firstDow = aWeekStart || ICAL3.Time.SUNDAY; + var firstDow = aWeekStart || ICAL2.Time.SUNDAY; var dowCacheKey = (this.year << 12) + (this.month << 8) + (this.day << 3) + firstDow; - if (dowCacheKey in ICAL3.Time._dowCache) { - return ICAL3.Time._dowCache[dowCacheKey]; + if (dowCacheKey in ICAL2.Time._dowCache) { + return ICAL2.Time._dowCache[dowCacheKey]; } var q3 = this.day; var m3 = this.month + (this.month < 3 ? 12 : 0); var Y = this.year - (this.month < 3 ? 1 : 0); - var h3 = q3 + Y + ICAL3.helpers.trunc((m3 + 1) * 26 / 10) + ICAL3.helpers.trunc(Y / 4); + var h3 = q3 + Y + ICAL2.helpers.trunc((m3 + 1) * 26 / 10) + ICAL2.helpers.trunc(Y / 4); if (true) { - h3 += ICAL3.helpers.trunc(Y / 100) * 6 + ICAL3.helpers.trunc(Y / 400); + h3 += ICAL2.helpers.trunc(Y / 100) * 6 + ICAL2.helpers.trunc(Y / 400); } else { h3 += 5; } h3 = (h3 + 7 - firstDow) % 7 + 1; - ICAL3.Time._dowCache[dowCacheKey] = h3; + ICAL2.Time._dowCache[dowCacheKey] = h3; return h3; }, dayOfYear: function dayOfYear() { - var is_leap = ICAL3.Time.isLeapYear(this.year) ? 1 : 0; - var diypm = ICAL3.Time.daysInYearPassedMonth; + var is_leap = ICAL2.Time.isLeapYear(this.year) ? 1 : 0; + var diypm = ICAL2.Time.daysInYearPassedMonth; return diypm[is_leap][this.month - 1] + this.day; }, startOfWeek: function startOfWeek(aWeekStart) { - var firstDow = aWeekStart || ICAL3.Time.SUNDAY; + var firstDow = aWeekStart || ICAL2.Time.SUNDAY; var result = this.clone(); result.day -= (this.dayOfWeek() + 7 - firstDow) % 7; result.isDate = true; @@ -3269,9 +3776,9 @@ var require_ical = __commonJS({ return result; }, endOfWeek: function endOfWeek(aWeekStart) { - var firstDow = aWeekStart || ICAL3.Time.SUNDAY; + var firstDow = aWeekStart || ICAL2.Time.SUNDAY; var result = this.clone(); - result.day += (7 - this.dayOfWeek() + firstDow - ICAL3.Time.SUNDAY) % 7; + result.day += (7 - this.dayOfWeek() + firstDow - ICAL2.Time.SUNDAY) % 7; result.isDate = true; result.hour = 0; result.minute = 0; @@ -3289,7 +3796,7 @@ var require_ical = __commonJS({ }, endOfMonth: function endOfMonth() { var result = this.clone(); - result.day = ICAL3.Time.daysInMonth(result.month, result.year); + result.day = ICAL2.Time.daysInMonth(result.month, result.year); result.isDate = true; result.hour = 0; result.minute = 0; @@ -3317,17 +3824,17 @@ var require_ical = __commonJS({ return result; }, startDoyWeek: function startDoyWeek(aFirstDayOfWeek) { - var firstDow = aFirstDayOfWeek || ICAL3.Time.SUNDAY; + var firstDow = aFirstDayOfWeek || ICAL2.Time.SUNDAY; var delta = this.dayOfWeek() - firstDow; if (delta < 0) delta += 7; return this.dayOfYear() - delta; }, getDominicalLetter: function() { - return ICAL3.Time.getDominicalLetter(this.year); + return ICAL2.Time.getDominicalLetter(this.year); }, nthWeekDay: function icaltime_nthWeekDay(aDayOfWeek, aPos) { - var daysInMonth2 = ICAL3.Time.daysInMonth(this.month, this.year); + var daysInMonth2 = ICAL2.Time.daysInMonth(this.month, this.year); var weekday; var pos = aPos; var start = 0; @@ -3371,29 +3878,29 @@ var require_ical = __commonJS({ }, weekNumber: function weekNumber(aWeekStart) { var wnCacheKey = (this.year << 12) + (this.month << 8) + (this.day << 3) + aWeekStart; - if (wnCacheKey in ICAL3.Time._wnCache) { - return ICAL3.Time._wnCache[wnCacheKey]; + if (wnCacheKey in ICAL2.Time._wnCache) { + return ICAL2.Time._wnCache[wnCacheKey]; } var week1; var dt = this.clone(); dt.isDate = true; var isoyear = this.year; if (dt.month == 12 && dt.day > 25) { - week1 = ICAL3.Time.weekOneStarts(isoyear + 1, aWeekStart); + week1 = ICAL2.Time.weekOneStarts(isoyear + 1, aWeekStart); if (dt.compare(week1) < 0) { - week1 = ICAL3.Time.weekOneStarts(isoyear, aWeekStart); + week1 = ICAL2.Time.weekOneStarts(isoyear, aWeekStart); } else { isoyear++; } } else { - week1 = ICAL3.Time.weekOneStarts(isoyear, aWeekStart); + week1 = ICAL2.Time.weekOneStarts(isoyear, aWeekStart); if (dt.compare(week1) < 0) { - week1 = ICAL3.Time.weekOneStarts(--isoyear, aWeekStart); + week1 = ICAL2.Time.weekOneStarts(--isoyear, aWeekStart); } } - var daysBetween = dt.subtractDate(week1).toSeconds() / 86400; - var answer = ICAL3.helpers.trunc(daysBetween / 7) + 1; - ICAL3.Time._wnCache[wnCacheKey] = answer; + var daysBetween2 = dt.subtractDate(week1).toSeconds() / 86400; + var answer = ICAL2.helpers.trunc(daysBetween2 / 7) + 1; + ICAL2.Time._wnCache[wnCacheKey] = answer; return answer; }, addDuration: function icaltime_add(aDuration) { @@ -3416,12 +3923,12 @@ var require_ical = __commonJS({ subtractDate: function icaltime_subtract(aDate) { var unixTime = this.toUnixTime() + this.utcOffset(); var other = aDate.toUnixTime() + aDate.utcOffset(); - return ICAL3.Duration.fromSeconds(unixTime - other); + return ICAL2.Duration.fromSeconds(unixTime - other); }, subtractDateTz: function icaltime_subtract_abs(aDate) { var unixTime = this.toUnixTime(); var other = aDate.toUnixTime(); - return ICAL3.Duration.fromSeconds(unixTime - other); + return ICAL2.Duration.fromSeconds(unixTime - other); }, compare: function icaltime_compare(other) { var a3 = this.toUnixTime(); @@ -3434,7 +3941,7 @@ var require_ical = __commonJS({ }, compareDateOnlyTz: function icaltime_compareDateOnlyTz(other, tz) { function cmp(attr) { - return ICAL3.Time._cmp_attr(a3, b3, attr); + return ICAL2.Time._cmp_attr(a3, b3, attr); } var a3 = this.convertToZone(tz); var b3 = other.convertToZone(tz); @@ -3451,13 +3958,13 @@ var require_ical = __commonJS({ var copy = this.clone(); var zone_equals = this.zone.tzid == zone.tzid; if (!this.isDate && !zone_equals) { - ICAL3.Timezone.convert_time(copy, this.zone, zone); + ICAL2.Timezone.convert_time(copy, this.zone, zone); } copy.zone = zone; return copy; }, utcOffset: function utc_offset() { - if (this.zone == ICAL3.Timezone.localTimezone || this.zone == ICAL3.Timezone.utcTimezone) { + if (this.zone == ICAL2.Timezone.localTimezone || this.zone == ICAL2.Timezone.utcTimezone) { return 0; } else { return this.zone.utcOffset(this); @@ -3466,23 +3973,23 @@ var require_ical = __commonJS({ toICALString: function() { var string = this.toString(); if (string.length > 10) { - return ICAL3.design.icalendar.value["date-time"].toICAL(string); + return ICAL2.design.icalendar.value["date-time"].toICAL(string); } else { - return ICAL3.design.icalendar.value.date.toICAL(string); + return ICAL2.design.icalendar.value.date.toICAL(string); } }, toString: function toString() { - var result = this.year + "-" + ICAL3.helpers.pad2(this.month) + "-" + ICAL3.helpers.pad2(this.day); + var result = this.year + "-" + ICAL2.helpers.pad2(this.month) + "-" + ICAL2.helpers.pad2(this.day); if (!this.isDate) { - result += "T" + ICAL3.helpers.pad2(this.hour) + ":" + ICAL3.helpers.pad2(this.minute) + ":" + ICAL3.helpers.pad2(this.second); - if (this.zone === ICAL3.Timezone.utcTimezone) { + result += "T" + ICAL2.helpers.pad2(this.hour) + ":" + ICAL2.helpers.pad2(this.minute) + ":" + ICAL2.helpers.pad2(this.second); + if (this.zone === ICAL2.Timezone.utcTimezone) { result += "Z"; } } return result; }, toJSDate: function toJSDate() { - if (this.zone == ICAL3.Timezone.localTimezone) { + if (this.zone == ICAL2.Timezone.localTimezone) { if (this.isDate) { return new Date(this.year, this.month - 1, this.day); } else { @@ -3493,7 +4000,7 @@ var require_ical = __commonJS({ } }, _normalize: function icaltime_normalize() { - var isDate2 = this._time.isDate; + var isDate3 = this._time.isDate; if (this._time.isDate) { this._time.hour = 0; this._time.minute = 0; @@ -3510,37 +4017,37 @@ var require_ical = __commonJS({ if (!time.isDate) { second = time.second + aExtraSeconds; time.second = second % 60; - minutesOverflow = ICAL3.helpers.trunc(second / 60); + minutesOverflow = ICAL2.helpers.trunc(second / 60); if (time.second < 0) { time.second += 60; minutesOverflow--; } minute = time.minute + aExtraMinutes + minutesOverflow; time.minute = minute % 60; - hoursOverflow = ICAL3.helpers.trunc(minute / 60); + hoursOverflow = ICAL2.helpers.trunc(minute / 60); if (time.minute < 0) { time.minute += 60; hoursOverflow--; } hour = time.hour + aExtraHours + hoursOverflow; time.hour = hour % 24; - daysOverflow = ICAL3.helpers.trunc(hour / 24); + daysOverflow = ICAL2.helpers.trunc(hour / 24); if (time.hour < 0) { time.hour += 24; daysOverflow--; } } if (time.month > 12) { - yearsOverflow = ICAL3.helpers.trunc((time.month - 1) / 12); + yearsOverflow = ICAL2.helpers.trunc((time.month - 1) / 12); } else if (time.month < 1) { - yearsOverflow = ICAL3.helpers.trunc(time.month / 12) - 1; + yearsOverflow = ICAL2.helpers.trunc(time.month / 12) - 1; } time.year += yearsOverflow; time.month -= 12 * yearsOverflow; day = time.day + aExtraDays + daysOverflow; if (day > 0) { for (; ; ) { - daysInMonth2 = ICAL3.Time.daysInMonth(time.month, time.year); + daysInMonth2 = ICAL2.Time.daysInMonth(time.month, time.year); if (day <= daysInMonth2) { break; } @@ -3559,7 +4066,7 @@ var require_ical = __commonJS({ } else { time.month--; } - day += ICAL3.Time.daysInMonth(time.month, time.year); + day += ICAL2.Time.daysInMonth(time.month, time.year); } } time.day = day; @@ -3567,8 +4074,8 @@ var require_ical = __commonJS({ return this; }, fromUnixTime: function fromUnixTime(seconds) { - this.zone = ICAL3.Timezone.utcTimezone; - var epoch = ICAL3.Time.epochTime.clone(); + this.zone = ICAL2.Timezone.utcTimezone; + var epoch = ICAL2.Time.epochTime.clone(); epoch.adjust(0, 0, 0, seconds); this.year = epoch.year; this.month = epoch.month; @@ -3613,7 +4120,7 @@ var require_ical = __commonJS({ }; (function setupNormalizeAttributes() { function defineAttr(attr) { - Object.defineProperty(ICAL3.Time.prototype, attr, { + Object.defineProperty(ICAL2.Time.prototype, attr, { get: function getTimeAttr() { if (this._pendingNormalization) { this._normalize(); @@ -3642,70 +4149,70 @@ var require_ical = __commonJS({ defineAttr("isDate"); } })(); - ICAL3.Time.daysInMonth = function icaltime_daysInMonth(month, year) { + ICAL2.Time.daysInMonth = function icaltime_daysInMonth(month, year) { var _daysInMonth = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; var days = 30; if (month < 1 || month > 12) return days; days = _daysInMonth[month]; if (month == 2) { - days += ICAL3.Time.isLeapYear(year); + days += ICAL2.Time.isLeapYear(year); } return days; }; - ICAL3.Time.isLeapYear = function isLeapYear2(year) { + ICAL2.Time.isLeapYear = function isLeapYear3(year) { if (year <= 1752) { return year % 4 == 0; } else { return year % 4 == 0 && year % 100 != 0 || year % 400 == 0; } }; - ICAL3.Time.fromDayOfYear = function icaltime_fromDayOfYear(aDayOfYear, aYear) { + ICAL2.Time.fromDayOfYear = function icaltime_fromDayOfYear(aDayOfYear, aYear) { var year = aYear; var doy = aDayOfYear; - var tt = new ICAL3.Time(); + var tt = new ICAL2.Time(); tt.auto_normalize = false; - var is_leap = ICAL3.Time.isLeapYear(year) ? 1 : 0; + var is_leap = ICAL2.Time.isLeapYear(year) ? 1 : 0; if (doy < 1) { year--; - is_leap = ICAL3.Time.isLeapYear(year) ? 1 : 0; - doy += ICAL3.Time.daysInYearPassedMonth[is_leap][12]; - return ICAL3.Time.fromDayOfYear(doy, year); - } else if (doy > ICAL3.Time.daysInYearPassedMonth[is_leap][12]) { - is_leap = ICAL3.Time.isLeapYear(year) ? 1 : 0; - doy -= ICAL3.Time.daysInYearPassedMonth[is_leap][12]; + is_leap = ICAL2.Time.isLeapYear(year) ? 1 : 0; + doy += ICAL2.Time.daysInYearPassedMonth[is_leap][12]; + return ICAL2.Time.fromDayOfYear(doy, year); + } else if (doy > ICAL2.Time.daysInYearPassedMonth[is_leap][12]) { + is_leap = ICAL2.Time.isLeapYear(year) ? 1 : 0; + doy -= ICAL2.Time.daysInYearPassedMonth[is_leap][12]; year++; - return ICAL3.Time.fromDayOfYear(doy, year); + return ICAL2.Time.fromDayOfYear(doy, year); } tt.year = year; tt.isDate = true; for (var month = 11; month >= 0; month--) { - if (doy > ICAL3.Time.daysInYearPassedMonth[is_leap][month]) { + if (doy > ICAL2.Time.daysInYearPassedMonth[is_leap][month]) { tt.month = month + 1; - tt.day = doy - ICAL3.Time.daysInYearPassedMonth[is_leap][month]; + tt.day = doy - ICAL2.Time.daysInYearPassedMonth[is_leap][month]; break; } } tt.auto_normalize = true; return tt; }; - ICAL3.Time.fromStringv2 = function fromString(str) { - return new ICAL3.Time({ + ICAL2.Time.fromStringv2 = function fromString(str) { + return new ICAL2.Time({ year: parseInt(str.substr(0, 4), 10), month: parseInt(str.substr(5, 2), 10), day: parseInt(str.substr(8, 2), 10), isDate: true }); }; - ICAL3.Time.fromDateString = function(aValue) { - return new ICAL3.Time({ - year: ICAL3.helpers.strictParseInt(aValue.substr(0, 4)), - month: ICAL3.helpers.strictParseInt(aValue.substr(5, 2)), - day: ICAL3.helpers.strictParseInt(aValue.substr(8, 2)), + ICAL2.Time.fromDateString = function(aValue) { + return new ICAL2.Time({ + year: ICAL2.helpers.strictParseInt(aValue.substr(0, 4)), + month: ICAL2.helpers.strictParseInt(aValue.substr(5, 2)), + day: ICAL2.helpers.strictParseInt(aValue.substr(8, 2)), isDate: true }); }; - ICAL3.Time.fromDateTimeString = function(aValue, prop) { + ICAL2.Time.fromDateTimeString = function(aValue, prop) { if (aValue.length < 19) { throw new Error('invalid date-time value: "' + aValue + '"'); } @@ -3715,64 +4222,64 @@ var require_ical = __commonJS({ } else if (prop) { zone = prop.getParameter("tzid"); } - var time = new ICAL3.Time({ - year: ICAL3.helpers.strictParseInt(aValue.substr(0, 4)), - month: ICAL3.helpers.strictParseInt(aValue.substr(5, 2)), - day: ICAL3.helpers.strictParseInt(aValue.substr(8, 2)), - hour: ICAL3.helpers.strictParseInt(aValue.substr(11, 2)), - minute: ICAL3.helpers.strictParseInt(aValue.substr(14, 2)), - second: ICAL3.helpers.strictParseInt(aValue.substr(17, 2)), + var time = new ICAL2.Time({ + year: ICAL2.helpers.strictParseInt(aValue.substr(0, 4)), + month: ICAL2.helpers.strictParseInt(aValue.substr(5, 2)), + day: ICAL2.helpers.strictParseInt(aValue.substr(8, 2)), + hour: ICAL2.helpers.strictParseInt(aValue.substr(11, 2)), + minute: ICAL2.helpers.strictParseInt(aValue.substr(14, 2)), + second: ICAL2.helpers.strictParseInt(aValue.substr(17, 2)), timezone: zone }); return time; }; - ICAL3.Time.fromString = function fromString(aValue, aProperty) { + ICAL2.Time.fromString = function fromString(aValue, aProperty) { if (aValue.length > 10) { - return ICAL3.Time.fromDateTimeString(aValue, aProperty); + return ICAL2.Time.fromDateTimeString(aValue, aProperty); } else { - return ICAL3.Time.fromDateString(aValue); + return ICAL2.Time.fromDateString(aValue); } }; - ICAL3.Time.fromJSDate = function fromJSDate(aDate, useUTC) { - var tt = new ICAL3.Time(); + ICAL2.Time.fromJSDate = function fromJSDate(aDate, useUTC) { + var tt = new ICAL2.Time(); return tt.fromJSDate(aDate, useUTC); }; - ICAL3.Time.fromData = function fromData(aData, aZone) { - var t3 = new ICAL3.Time(); + ICAL2.Time.fromData = function fromData(aData, aZone) { + var t3 = new ICAL2.Time(); return t3.fromData(aData, aZone); }; - ICAL3.Time.now = function icaltime_now() { - return ICAL3.Time.fromJSDate(new Date(), false); + ICAL2.Time.now = function icaltime_now() { + return ICAL2.Time.fromJSDate(new Date(), false); }; - ICAL3.Time.weekOneStarts = function weekOneStarts(aYear, aWeekStart) { - var t3 = ICAL3.Time.fromData({ + ICAL2.Time.weekOneStarts = function weekOneStarts(aYear, aWeekStart) { + var t3 = ICAL2.Time.fromData({ year: aYear, month: 1, day: 1, isDate: true }); var dow = t3.dayOfWeek(); - var wkst = aWeekStart || ICAL3.Time.DEFAULT_WEEK_START; - if (dow > ICAL3.Time.THURSDAY) { + var wkst = aWeekStart || ICAL2.Time.DEFAULT_WEEK_START; + if (dow > ICAL2.Time.THURSDAY) { t3.day += 7; } - if (wkst > ICAL3.Time.THURSDAY) { + if (wkst > ICAL2.Time.THURSDAY) { t3.day -= 7; } t3.day -= dow - wkst; return t3; }; - ICAL3.Time.getDominicalLetter = function(yr) { + ICAL2.Time.getDominicalLetter = function(yr) { var LTRS = "GFEDCBA"; var dom = (yr + (yr / 4 | 0) + (yr / 400 | 0) - (yr / 100 | 0) - 1) % 7; - var isLeap = ICAL3.Time.isLeapYear(yr); + var isLeap = ICAL2.Time.isLeapYear(yr); if (isLeap) { return LTRS[(dom + 6) % 7] + LTRS[dom]; } else { return LTRS[dom]; } }; - ICAL3.Time.epochTime = ICAL3.Time.fromData({ + ICAL2.Time.epochTime = ICAL2.Time.fromData({ year: 1970, month: 1, day: 1, @@ -3782,28 +4289,28 @@ var require_ical = __commonJS({ isDate: false, timezone: "Z" }); - ICAL3.Time._cmp_attr = function _cmp_attr(a3, b3, attr) { + ICAL2.Time._cmp_attr = function _cmp_attr(a3, b3, attr) { if (a3[attr] > b3[attr]) return 1; if (a3[attr] < b3[attr]) return -1; return 0; }; - ICAL3.Time.daysInYearPassedMonth = [ + ICAL2.Time.daysInYearPassedMonth = [ [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365], [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366] ]; - ICAL3.Time.SUNDAY = 1; - ICAL3.Time.MONDAY = 2; - ICAL3.Time.TUESDAY = 3; - ICAL3.Time.WEDNESDAY = 4; - ICAL3.Time.THURSDAY = 5; - ICAL3.Time.FRIDAY = 6; - ICAL3.Time.SATURDAY = 7; - ICAL3.Time.DEFAULT_WEEK_START = ICAL3.Time.MONDAY; + ICAL2.Time.SUNDAY = 1; + ICAL2.Time.MONDAY = 2; + ICAL2.Time.TUESDAY = 3; + ICAL2.Time.WEDNESDAY = 4; + ICAL2.Time.THURSDAY = 5; + ICAL2.Time.FRIDAY = 6; + ICAL2.Time.SATURDAY = 7; + ICAL2.Time.DEFAULT_WEEK_START = ICAL2.Time.MONDAY; })(); (function() { - ICAL3.VCardTime = function(data, zone, icaltype) { + ICAL2.VCardTime = function(data, zone, icaltype) { this.wrappedJSObject = this; var time = this._time = Object.create(null); time.year = null; @@ -3815,28 +4322,28 @@ var require_ical = __commonJS({ this.icaltype = icaltype || "date-and-or-time"; this.fromData(data, zone); }; - ICAL3.helpers.inherits(ICAL3.Time, ICAL3.VCardTime, { + ICAL2.helpers.inherits(ICAL2.Time, ICAL2.VCardTime, { icalclass: "vcardtime", icaltype: "date-and-or-time", zone: null, clone: function() { - return new ICAL3.VCardTime(this._time, this.zone, this.icaltype); + return new ICAL2.VCardTime(this._time, this.zone, this.icaltype); }, _normalize: function() { return this; }, utcOffset: function() { - if (this.zone instanceof ICAL3.UtcOffset) { + if (this.zone instanceof ICAL2.UtcOffset) { return this.zone.toSeconds(); } else { - return ICAL3.Time.prototype.utcOffset.apply(this, arguments); + return ICAL2.Time.prototype.utcOffset.apply(this, arguments); } }, toICALString: function() { - return ICAL3.design.vcard.value[this.icaltype].toICAL(this.toString()); + return ICAL2.design.vcard.value[this.icaltype].toICAL(this.toString()); }, toString: function toString() { - var p22 = ICAL3.helpers.pad2; + var p22 = ICAL2.helpers.pad2; var y3 = this.year, m3 = this.month, d2 = this.day; var h3 = this.hour, mm = this.minute, s4 = this.second; var hasYear = y3 !== null, hasMonth = m3 !== null, hasDay = d2 !== null; @@ -3844,14 +4351,14 @@ var require_ical = __commonJS({ var datepart = (hasYear ? p22(y3) + (hasMonth || hasDay ? "-" : "") : hasMonth || hasDay ? "--" : "") + (hasMonth ? p22(m3) : "") + (hasDay ? "-" + p22(d2) : ""); var timepart = (hasHour ? p22(h3) : "-") + (hasHour && hasMinute ? ":" : "") + (hasMinute ? p22(mm) : "") + (!hasHour && !hasMinute ? "-" : "") + (hasMinute && hasSecond ? ":" : "") + (hasSecond ? p22(s4) : ""); var zone; - if (this.zone === ICAL3.Timezone.utcTimezone) { + if (this.zone === ICAL2.Timezone.utcTimezone) { zone = "Z"; - } else if (this.zone instanceof ICAL3.UtcOffset) { + } else if (this.zone instanceof ICAL2.UtcOffset) { zone = this.zone.toString(); - } else if (this.zone === ICAL3.Timezone.localTimezone) { + } else if (this.zone === ICAL2.Timezone.localTimezone) { zone = ""; - } else if (this.zone instanceof ICAL3.Timezone) { - var offset2 = ICAL3.UtcOffset.fromSeconds(this.zone.utcOffset(this)); + } else if (this.zone instanceof ICAL2.Timezone) { + var offset2 = ICAL2.UtcOffset.fromSeconds(this.zone.utcOffset(this)); zone = offset2.toString(); } else { zone = ""; @@ -3868,15 +4375,15 @@ var require_ical = __commonJS({ return null; } }); - ICAL3.VCardTime.fromDateAndOrTimeString = function(aValue, aIcalType) { + ICAL2.VCardTime.fromDateAndOrTimeString = function(aValue, aIcalType) { function part(v3, s4, e3) { - return v3 ? ICAL3.helpers.strictParseInt(v3.substr(s4, e3)) : null; + return v3 ? ICAL2.helpers.strictParseInt(v3.substr(s4, e3)) : null; } var parts = aValue.split("T"); var dt = parts[0], tmz = parts[1]; - var splitzone = tmz ? ICAL3.design.vcard.value.time._splitZone(tmz) : []; + var splitzone = tmz ? ICAL2.design.vcard.value.time._splitZone(tmz) : []; var zone = splitzone[0], tm = splitzone[1]; - var stoi = ICAL3.helpers.strictParseInt; + var stoi = ICAL2.helpers.strictParseInt; var dtlen = dt ? dt.length : 0; var tmlen = tm ? tm.length : 0; var hasDashDate = dt && dt[0] == "-" && dt[1] == "-"; @@ -3890,24 +4397,24 @@ var require_ical = __commonJS({ second: tmlen == 4 ? part(tm, 2, 2) : tmlen == 6 ? part(tm, 4, 2) : tmlen == 8 ? part(tm, 6, 2) : null }; if (zone == "Z") { - zone = ICAL3.Timezone.utcTimezone; + zone = ICAL2.Timezone.utcTimezone; } else if (zone && zone[3] == ":") { - zone = ICAL3.UtcOffset.fromString(zone); + zone = ICAL2.UtcOffset.fromString(zone); } else { zone = null; } - return new ICAL3.VCardTime(o2, zone, aIcalType); + return new ICAL2.VCardTime(o2, zone, aIcalType); }; })(); (function() { var DOW_MAP = { - SU: ICAL3.Time.SUNDAY, - MO: ICAL3.Time.MONDAY, - TU: ICAL3.Time.TUESDAY, - WE: ICAL3.Time.WEDNESDAY, - TH: ICAL3.Time.THURSDAY, - FR: ICAL3.Time.FRIDAY, - SA: ICAL3.Time.SATURDAY + SU: ICAL2.Time.SUNDAY, + MO: ICAL2.Time.MONDAY, + TU: ICAL2.Time.TUESDAY, + WE: ICAL2.Time.WEDNESDAY, + TH: ICAL2.Time.THURSDAY, + FR: ICAL2.Time.FRIDAY, + SA: ICAL2.Time.SATURDAY }; var REVERSE_DOW_MAP = {}; for (var key in DOW_MAP) { @@ -3926,30 +4433,30 @@ var require_ical = __commonJS({ "BYMONTH", "BYSETPOS" ]; - ICAL3.Recur = function icalrecur(data) { + ICAL2.Recur = function icalrecur(data) { this.wrappedJSObject = this; this.parts = {}; if (data && typeof data === "object") { this.fromData(data); } }; - ICAL3.Recur.prototype = { + ICAL2.Recur.prototype = { parts: null, interval: 1, - wkst: ICAL3.Time.MONDAY, + wkst: ICAL2.Time.MONDAY, until: null, count: null, freq: null, icalclass: "icalrecur", icaltype: "recur", iterator: function(aStart) { - return new ICAL3.RecurIterator({ + return new ICAL2.RecurIterator({ rule: this, dtstart: aStart }); }, - clone: function clone3() { - return new ICAL3.Recur(this.toJSON()); + clone: function clone4() { + return new ICAL2.Recur(this.toJSON()); }, isFinite: function isfinite() { return !!(this.count || this.until); @@ -3973,10 +4480,10 @@ var require_ical = __commonJS({ return ucname in this.parts ? this.parts[ucname].slice() : []; }, getNextOccurrence: function getNextOccurrence(aStartTime, aRecurrenceId) { - var iter = this.iterator(aStartTime); + var iter2 = this.iterator(aStartTime); var next, cdt; do { - next = iter.next(); + next = iter2.next(); } while (next && next.compare(aRecurrenceId) <= 0); if (next && aRecurrenceId.zone) { next.zone = aRecurrenceId.zone; @@ -4000,10 +4507,10 @@ var require_ical = __commonJS({ optionDesign.INTERVAL(this.interval, this); } if (this.wkst && typeof this.wkst != "number") { - this.wkst = ICAL3.Recur.icalDayToNumericDay(this.wkst); + this.wkst = ICAL2.Recur.icalDayToNumericDay(this.wkst); } - if (this.until && !(this.until instanceof ICAL3.Time)) { - this.until = ICAL3.Time.fromString(this.until); + if (this.until && !(this.until instanceof ICAL2.Time)) { + this.until = ICAL2.Time.fromString(this.until); } }, toJSON: function() { @@ -4023,14 +4530,14 @@ var require_ical = __commonJS({ if (Array.isArray(kparts) && kparts.length == 1) { res[k3.toLowerCase()] = kparts[0]; } else { - res[k3.toLowerCase()] = ICAL3.helpers.clone(this.parts[k3]); + res[k3.toLowerCase()] = ICAL2.helpers.clone(this.parts[k3]); } } if (this.until) { res.until = this.until.toString(); } - if ("wkst" in this && this.wkst !== ICAL3.Time.DEFAULT_WEEK_START) { - res.wkst = ICAL3.Recur.numericDayToIcalDay(this.wkst); + if ("wkst" in this && this.wkst !== ICAL2.Time.DEFAULT_WEEK_START) { + res.wkst = ICAL2.Recur.numericDayToIcalDay(this.wkst); } return res; }, @@ -4050,8 +4557,8 @@ var require_ical = __commonJS({ if (this.until) { str += ";UNTIL=" + this.until.toICALString(); } - if ("wkst" in this && this.wkst !== ICAL3.Time.DEFAULT_WEEK_START) { - str += ";WKST=" + ICAL3.Recur.numericDayToIcalDay(this.wkst); + if ("wkst" in this && this.wkst !== ICAL2.Time.DEFAULT_WEEK_START) { + str += ";WKST=" + ICAL2.Recur.numericDayToIcalDay(this.wkst); } return str; } @@ -4061,7 +4568,7 @@ var require_ical = __commonJS({ if (value[0] === "+") { result = value.substr(1); } - result = ICAL3.helpers.strictParseInt(result); + result = ICAL2.helpers.strictParseInt(result); if (min !== void 0 && value < min) { throw new Error(type + ': invalid value "' + value + '" must be > ' + min); } @@ -4070,13 +4577,13 @@ var require_ical = __commonJS({ } return result; } - ICAL3.Recur.icalDayToNumericDay = function toNumericDay(string, aWeekStart) { - var firstDow = aWeekStart || ICAL3.Time.SUNDAY; + ICAL2.Recur.icalDayToNumericDay = function toNumericDay(string, aWeekStart) { + var firstDow = aWeekStart || ICAL2.Time.SUNDAY; return (DOW_MAP[string] - firstDow + 7) % 7 + 1; }; - ICAL3.Recur.numericDayToIcalDay = function toIcalDay(num, aWeekStart) { - var firstDow = aWeekStart || ICAL3.Time.SUNDAY; - var dow = num + firstDow - ICAL3.Time.SUNDAY; + ICAL2.Recur.numericDayToIcalDay = function toIcalDay(num, aWeekStart) { + var firstDow = aWeekStart || ICAL2.Time.SUNDAY; + var dow = num + firstDow - ICAL2.Time.SUNDAY; if (dow > 7) { dow -= 7; } @@ -4102,27 +4609,27 @@ var require_ical = __commonJS({ } }, COUNT: function(value, dict, fmtIcal) { - dict.count = ICAL3.helpers.strictParseInt(value); + dict.count = ICAL2.helpers.strictParseInt(value); }, INTERVAL: function(value, dict, fmtIcal) { - dict.interval = ICAL3.helpers.strictParseInt(value); + dict.interval = ICAL2.helpers.strictParseInt(value); if (dict.interval < 1) { dict.interval = 1; } }, UNTIL: function(value, dict, fmtIcal) { if (value.length > 10) { - dict.until = ICAL3.design.icalendar.value["date-time"].fromICAL(value); + dict.until = ICAL2.design.icalendar.value["date-time"].fromICAL(value); } else { - dict.until = ICAL3.design.icalendar.value.date.fromICAL(value); + dict.until = ICAL2.design.icalendar.value.date.fromICAL(value); } if (!fmtIcal) { - dict.until = ICAL3.Time.fromString(dict.until); + dict.until = ICAL2.Time.fromString(dict.until); } }, WKST: function(value, dict, fmtIcal) { if (VALID_DAY_NAMES.test(value)) { - dict.wkst = ICAL3.Recur.icalDayToNumericDay(value); + dict.wkst = ICAL2.Recur.icalDayToNumericDay(value); } else { throw new Error('invalid WKST value "' + value + '"'); } @@ -4145,14 +4652,14 @@ var require_ical = __commonJS({ BYMONTH: parseNumericValue.bind(this, "BYMONTH", 1, 12), BYSETPOS: parseNumericValue.bind(this, "BYSETPOS", -366, 366) }; - ICAL3.Recur.fromString = function(string) { - var data = ICAL3.Recur._stringToData(string, false); - return new ICAL3.Recur(data); + ICAL2.Recur.fromString = function(string) { + var data = ICAL2.Recur._stringToData(string, false); + return new ICAL2.Recur(data); }; - ICAL3.Recur.fromData = function(aData) { - return new ICAL3.Recur(aData); + ICAL2.Recur.fromData = function(aData) { + return new ICAL2.Recur(aData); }; - ICAL3.Recur._stringToData = function(string, fmtIcal) { + ICAL2.Recur._stringToData = function(string, fmtIcal) { var dict = Object.create(null); var values = string.split(";"); var len = values.length; @@ -4179,7 +4686,7 @@ var require_ical = __commonJS({ return dict; }; })(); - ICAL3.RecurIterator = function() { + ICAL2.RecurIterator = function() { function icalrecur_iterator(options) { this.fromData(options); } @@ -4195,24 +4702,24 @@ var require_ical = __commonJS({ days: null, days_index: 0, fromData: function(options) { - this.rule = ICAL3.helpers.formatClassType(options.rule, ICAL3.Recur); + this.rule = ICAL2.helpers.formatClassType(options.rule, ICAL2.Recur); if (!this.rule) { throw new Error("iterator requires a (ICAL.Recur) rule"); } - this.dtstart = ICAL3.helpers.formatClassType(options.dtstart, ICAL3.Time); + this.dtstart = ICAL2.helpers.formatClassType(options.dtstart, ICAL2.Time); if (!this.dtstart) { throw new Error("iterator requires a (ICAL.Time) dtstart"); } if (options.by_data) { this.by_data = options.by_data; } else { - this.by_data = ICAL3.helpers.clone(this.rule.parts, true); + this.by_data = ICAL2.helpers.clone(this.rule.parts, true); } if (options.occurrence_number) this.occurrence_number = options.occurrence_number; this.days = options.days || []; if (options.last) { - this.last = ICAL3.helpers.formatClassType(options.last, ICAL3.Time); + this.last = ICAL2.helpers.formatClassType(options.last, ICAL2.Time); } this.by_indices = options.by_indices; if (!this.by_indices) { @@ -4270,7 +4777,7 @@ var require_ical = __commonJS({ this.last.day += wkdy; } } else { - var dayName = ICAL3.Recur.numericDayToIcalDay(this.dtstart.dayOfWeek()); + var dayName = ICAL2.Recur.numericDayToIcalDay(this.dtstart.dayOfWeek()); parts.BYDAY = [dayName]; } } @@ -4287,7 +4794,7 @@ var require_ical = __commonJS({ if (this.rule.freq == "MONTHLY" && this.has_by_data("BYDAY")) { var tempLast = null; var initLast = this.last.clone(); - var daysInMonth2 = ICAL3.Time.daysInMonth(this.last.month, this.last.year); + var daysInMonth2 = ICAL2.Time.daysInMonth(this.last.month, this.last.year); for (var i3 in this.by_data.BYDAY) { if (!this.by_data.BYDAY.hasOwnProperty(i3)) { continue; @@ -4306,7 +4813,7 @@ var require_ical = __commonJS({ } while (dayOfMonth > daysInMonth2 || dayOfMonth <= 0) { this.increment_month(); - daysInMonth2 = ICAL3.Time.daysInMonth(this.last.month, this.last.year); + daysInMonth2 = ICAL2.Time.daysInMonth(this.last.month, this.last.year); dayOfMonth = this.last.nthWeekDay(dow, pos); } } @@ -4324,7 +4831,7 @@ var require_ical = __commonJS({ } } else if (this.has_by_data("BYMONTHDAY")) { if (this.last.day < 0) { - var daysInMonth2 = ICAL3.Time.daysInMonth(this.last.month, this.last.year); + var daysInMonth2 = ICAL2.Time.daysInMonth(this.last.month, this.last.year); this.last.day = daysInMonth2 + this.last.day + 1; } } @@ -4434,7 +4941,7 @@ var require_ical = __commonJS({ return end_of_data; }, normalizeByMonthDayRules: function(year, month, rules) { - var daysInMonth2 = ICAL3.Time.daysInMonth(month, year); + var daysInMonth2 = ICAL2.Time.daysInMonth(month, year); var newRules = []; var ruleIdx = 0; var len = rules.length; @@ -4469,7 +4976,7 @@ var require_ical = __commonJS({ var self2 = this; var lastDay = this.last.day; function initMonth() { - daysInMonth2 = ICAL3.Time.daysInMonth(self2.last.month, self2.last.year); + daysInMonth2 = ICAL2.Time.daysInMonth(self2.last.month, self2.last.year); byMonthDay = self2.normalizeByMonthDayRules(self2.last.year, self2.last.month, self2.by_data.BYMONTHDAY); dateLen = byMonthDay.length; while (byMonthDay[dateIdx] <= lastDay && !(isInit && byMonthDay[dateIdx] == lastDay) && dateIdx < dateLen - 1) { @@ -4530,7 +5037,7 @@ var require_ical = __commonJS({ if (this.has_by_data("BYDAY") && this.has_by_data("BYMONTHDAY")) { data_valid = this._byDayAndMonthDay(); } else if (this.has_by_data("BYDAY")) { - var daysInMonth2 = ICAL3.Time.daysInMonth(this.last.month, this.last.year); + var daysInMonth2 = ICAL2.Time.daysInMonth(this.last.month, this.last.year); var setpos = 0; var setpos_total = 0; if (this.has_by_data("BYSETPOS")) { @@ -4573,7 +5080,7 @@ var require_ical = __commonJS({ this.by_indices.BYMONTHDAY = 0; this.increment_month(); } - var daysInMonth2 = ICAL3.Time.daysInMonth(this.last.month, this.last.year); + var daysInMonth2 = ICAL2.Time.daysInMonth(this.last.month, this.last.year); var day = this.by_data.BYMONTHDAY[this.by_indices.BYMONTHDAY]; if (day < 0) { day = daysInMonth2 + day + 1; @@ -4586,7 +5093,7 @@ var require_ical = __commonJS({ } } else { this.increment_month(); - var daysInMonth2 = ICAL3.Time.daysInMonth(this.last.month, this.last.year); + var daysInMonth2 = ICAL2.Time.daysInMonth(this.last.month, this.last.year); if (this.by_data.BYMONTHDAY[0] > daysInMonth2) { data_valid = 0; } else { @@ -4604,7 +5111,7 @@ var require_ical = __commonJS({ return 1; } for (; ; ) { - var tt = new ICAL3.Time(); + var tt = new ICAL2.Time(); this.by_indices.BYDAY++; if (this.by_indices.BYDAY == Object.keys(this.by_data.BYDAY).length) { this.by_indices.BYDAY = 0; @@ -4626,7 +5133,7 @@ var require_ical = __commonJS({ continue; } } - var next = ICAL3.Time.fromDayOfYear(startOfWeek + dow, this.last.year); + var next = ICAL2.Time.fromDayOfYear(startOfWeek + dow, this.last.year); this.last.year = next.year; this.last.month = next.month; this.last.day = next.day; @@ -4654,7 +5161,7 @@ var require_ical = __commonJS({ doy += 1; year += 1; } - var next = ICAL3.Time.fromDayOfYear(doy, year); + var next = ICAL2.Time.fromDayOfYear(doy, year); this.last.day = next.day; this.last.month = next.month; }, @@ -4662,7 +5169,7 @@ var require_ical = __commonJS({ var matches = dow.match(/([+-]?[0-9])?(MO|TU|WE|TH|FR|SA|SU)/); if (matches) { var pos = parseInt(matches[1] || 0, 10); - dow = ICAL3.Recur.icalDayToNumericDay(matches[2], aWeekStart); + dow = ICAL2.Recur.icalDayToNumericDay(matches[2], aWeekStart); return [pos, dow]; } else { return [0, 0]; @@ -4694,7 +5201,7 @@ var require_ical = __commonJS({ }, increment_monthday: function increment_monthday(inc) { for (var i3 = 0; i3 < inc; i3++) { - var daysInMonth2 = ICAL3.Time.daysInMonth(this.last.month, this.last.year); + var daysInMonth2 = ICAL2.Time.daysInMonth(this.last.month, this.last.year); this.last.day++; if (this.last.day > daysInMonth2) { this.last.day -= daysInMonth2; @@ -4718,7 +5225,7 @@ var require_ical = __commonJS({ this.last.month++; } this.last.month--; - var years = ICAL3.helpers.trunc(this.last.month / 12); + var years = ICAL2.helpers.trunc(this.last.month / 12); this.last.month %= 12; this.last.month++; if (years != 0) { @@ -4731,7 +5238,7 @@ var require_ical = __commonJS({ }, increment_generic: function increment_generic(inc, aDateAttr, aFactor, aNextIncrement) { this.last[aDateAttr] += inc; - var nextunit = ICAL3.helpers.trunc(this.last[aDateAttr] / aFactor); + var nextunit = ICAL2.helpers.trunc(this.last[aDateAttr] / aFactor); this.last[aDateAttr] %= aFactor; if (nextunit != 0) { this["increment_" + aNextIncrement](nextunit); @@ -4741,7 +5248,7 @@ var require_ical = __commonJS({ return aRuleType in this.rule.parts; }, expand_year_days: function expand_year_days(aYear) { - var t3 = new ICAL3.Time(); + var t3 = new ICAL2.Time(); this.days = []; var parts = {}; var rules = ["BYDAY", "BYWEEKNO", "BYMONTHDAY", "BYMONTH", "BYYEARDAY"]; @@ -4763,7 +5270,7 @@ var require_ical = __commonJS({ t3.month = month; t3.day = 1; var first_week = t3.weekNumber(this.rule.wkst); - t3.day = ICAL3.Time.daysInMonth(month, aYear); + t3.day = ICAL2.Time.daysInMonth(month, aYear); var last_week = t3.weekNumber(this.rule.wkst); for (monthIdx = first_week; monthIdx < last_week; monthIdx++) { validWeeks[monthIdx] = 1; @@ -4807,7 +5314,7 @@ var require_ical = __commonJS({ var t32 = this.dtstart.clone(); var day_ = this.by_data.BYMONTHDAY[monthdaykey]; if (day_ < 0) { - var daysInMonth2 = ICAL3.Time.daysInMonth(t32.month, aYear); + var daysInMonth2 = ICAL2.Time.daysInMonth(t32.month, aYear); day_ = day_ + daysInMonth2 + 1; } t32.day = day_; @@ -4821,7 +5328,7 @@ var require_ical = __commonJS({ continue; } var month_ = this.by_data.BYMONTH[monthkey]; - var daysInMonth2 = ICAL3.Time.daysInMonth(month_, aYear); + var daysInMonth2 = ICAL2.Time.daysInMonth(month_, aYear); for (var monthdaykey in this.by_data.BYMONTHDAY) { if (!this.by_data.BYMONTHDAY.hasOwnProperty(monthdaykey)) { continue; @@ -4847,7 +5354,7 @@ var require_ical = __commonJS({ continue; } var month = this.by_data.BYMONTH[monthkey]; - var daysInMonth2 = ICAL3.Time.daysInMonth(month, aYear); + var daysInMonth2 = ICAL2.Time.daysInMonth(month, aYear); t3.year = aYear; t3.month = this.by_data.BYMONTH[monthkey]; t3.day = 1; @@ -4910,7 +5417,7 @@ var require_ical = __commonJS({ continue; } var day = expandedDays[daykey]; - var tt = ICAL3.Time.fromDayOfYear(day, aYear); + var tt = ICAL2.Time.fromDayOfYear(day, aYear); if (this.by_data.BYMONTHDAY.indexOf(tt.day) >= 0) { this.days.push(day); } @@ -4922,7 +5429,7 @@ var require_ical = __commonJS({ continue; } var day = expandedDays[daykey]; - var tt = ICAL3.Time.fromDayOfYear(day, aYear); + var tt = ICAL2.Time.fromDayOfYear(day, aYear); if (this.by_data.BYMONTH.indexOf(tt.month) >= 0 && this.by_data.BYMONTHDAY.indexOf(tt.day) >= 0) { this.days.push(day); } @@ -4934,7 +5441,7 @@ var require_ical = __commonJS({ continue; } var day = expandedDays[daykey]; - var tt = ICAL3.Time.fromDayOfYear(day, aYear); + var tt = ICAL2.Time.fromDayOfYear(day, aYear); var weekno = tt.weekNumber(this.rule.wkst); if (this.by_data.BYWEEKNO.indexOf(weekno)) { this.days.push(day); @@ -5054,7 +5561,7 @@ var require_ical = __commonJS({ var dow = this.last.dayOfWeek(); var weekNo = this.last.weekNumber(this.rule.wkst); var doy = this.last.dayOfYear(); - return this.check_contract_restriction("BYSECOND", this.last.second) && this.check_contract_restriction("BYMINUTE", this.last.minute) && this.check_contract_restriction("BYHOUR", this.last.hour) && this.check_contract_restriction("BYDAY", ICAL3.Recur.numericDayToIcalDay(dow)) && this.check_contract_restriction("BYWEEKNO", weekNo) && this.check_contract_restriction("BYMONTHDAY", this.last.day) && this.check_contract_restriction("BYMONTH", this.last.month) && this.check_contract_restriction("BYYEARDAY", doy); + return this.check_contract_restriction("BYSECOND", this.last.second) && this.check_contract_restriction("BYMINUTE", this.last.minute) && this.check_contract_restriction("BYHOUR", this.last.hour) && this.check_contract_restriction("BYDAY", ICAL2.Recur.numericDayToIcalDay(dow)) && this.check_contract_restriction("BYWEEKNO", weekNo) && this.check_contract_restriction("BYMONTHDAY", this.last.day) && this.check_contract_restriction("BYMONTH", this.last.month) && this.check_contract_restriction("BYYEARDAY", doy); }, setup_defaults: function setup_defaults(aRuleType, req, deftime) { var indexMapValue = icalrecur_iterator._indexMap[aRuleType]; @@ -5108,9 +5615,9 @@ var require_ical = __commonJS({ icalrecur_iterator.ILLEGAL = 3; return icalrecur_iterator; }(); - ICAL3.RecurExpansion = function() { + ICAL2.RecurExpansion = function() { function formatTime(item) { - return ICAL3.helpers.formatClassType(item, ICAL3.Time); + return ICAL2.helpers.formatClassType(item, ICAL2.Time); } function compareTime(a3, b3) { return a3.compare(b3); @@ -5135,7 +5642,7 @@ var require_ical = __commonJS({ dtstart: null, last: null, fromData: function(options) { - var start = ICAL3.helpers.formatClassType(options.dtstart, ICAL3.Time); + var start = ICAL2.helpers.formatClassType(options.dtstart, ICAL2.Time); if (!start) { throw new Error(".dtstart (ICAL.Time) must be given"); } else { @@ -5149,7 +5656,7 @@ var require_ical = __commonJS({ throw new Error(".ruleIterators or .component must be given"); } this.ruleIterators = options.ruleIterators.map(function(item) { - return ICAL3.helpers.formatClassType(item, ICAL3.RecurIterator); + return ICAL2.helpers.formatClassType(item, ICAL2.RecurIterator); }); this.ruleDateInc = options.ruleDateInc; this.exDateInc = options.exDateInc; @@ -5167,7 +5674,7 @@ var require_ical = __commonJS({ } }, next: function() { - var iter; + var iter2; var ruleOfDay; var next; var compare; @@ -5178,14 +5685,14 @@ var require_ical = __commonJS({ throw new Error("max tries have occured, rule may be impossible to forfill."); } next = this.ruleDate; - iter = this._nextRecurrenceIter(this.last); - if (!next && !iter) { + iter2 = this._nextRecurrenceIter(this.last); + if (!next && !iter2) { this.complete = true; break; } - if (!next || iter && next.compare(iter.last) > 0) { - next = iter.last.clone(); - iter.next(); + if (!next || iter2 && next.compare(iter2.last) > 0) { + next = iter2.last.clone(); + iter2.next(); } if (this.ruleDate === next) { this._nextRuleDay(); @@ -5225,7 +5732,7 @@ var require_ical = __commonJS({ }, _extractDates: function(component, propertyName) { function handleProp(prop2) { - idx = ICAL3.helpers.binsearchInsert(result, prop2, compareTime); + idx = ICAL2.helpers.binsearchInsert(result, prop2, compareTime); result.splice(idx, 0, prop2); } var result = []; @@ -5253,7 +5760,7 @@ var require_ical = __commonJS({ this.ruleDateInc = 0; this.last = this.ruleDates[0].clone(); } else { - this.ruleDateInc = ICAL3.helpers.binsearchInsert(this.ruleDates, this.last, compareTime); + this.ruleDateInc = ICAL2.helpers.binsearchInsert(this.ruleDates, this.last, compareTime); } this.ruleDate = this.ruleDates[this.ruleDateInc]; } @@ -5262,17 +5769,17 @@ var require_ical = __commonJS({ var i3 = 0; var len = rules.length; var rule; - var iter; + var iter2; for (; i3 < len; i3++) { rule = rules[i3].getFirstValue(); - iter = rule.iterator(this.dtstart); - this.ruleIterators.push(iter); - iter.next(); + iter2 = rule.iterator(this.dtstart); + this.ruleIterators.push(iter2); + iter2.next(); } } if (component.hasProperty("exdate")) { this.exDates = this._extractDates(component, "exdate"); - this.exDateInc = ICAL3.helpers.binsearchInsert(this.exDates, this.last, compareTime); + this.exDateInc = ICAL2.helpers.binsearchInsert(this.exDates, this.last, compareTime); this.exDate = this.exDates[this.exDateInc]; } }, @@ -5288,14 +5795,14 @@ var require_ical = __commonJS({ return null; } var len = iters.length; - var iter; + var iter2; var iterTime; var iterIdx = 0; var chosenIter; for (; iterIdx < len; iterIdx++) { - iter = iters[iterIdx]; - iterTime = iter.last; - if (iter.completed) { + iter2 = iters[iterIdx]; + iterTime = iter2.last; + if (iter2.completed) { len--; if (iterIdx !== 0) { iterIdx--; @@ -5304,7 +5811,7 @@ var require_ical = __commonJS({ continue; } if (!chosenIter || chosenIter.last.compare(iterTime) > 0) { - chosenIter = iter; + chosenIter = iter2; } } return chosenIter; @@ -5312,16 +5819,16 @@ var require_ical = __commonJS({ }; return RecurExpansion; }(); - ICAL3.Event = function() { - function Event3(component, options) { - if (!(component instanceof ICAL3.Component)) { + ICAL2.Event = function() { + function Event2(component, options) { + if (!(component instanceof ICAL2.Component)) { options = component; component = null; } if (component) { this.component = component; } else { - this.component = new ICAL3.Component("vevent"); + this.component = new ICAL2.Component("vevent"); } this._rangeExceptionCache = Object.create(null); this.exceptions = Object.create(null); @@ -5339,7 +5846,7 @@ var require_ical = __commonJS({ }, this); } } - Event3.prototype = { + Event2.prototype = { THISANDFUTURE: "THISANDFUTURE", exceptions: null, strictExceptions: false, @@ -5347,8 +5854,8 @@ var require_ical = __commonJS({ if (this.isRecurrenceException()) { throw new Error("cannot relate exception to exceptions"); } - if (obj instanceof ICAL3.Component) { - obj = new ICAL3.Event(obj); + if (obj instanceof ICAL2.Component) { + obj = new ICAL2.Event(obj); } if (this.strictExceptions && obj.uid !== this.uid) { throw new Error("attempted to relate unrelated exception"); @@ -5360,7 +5867,7 @@ var require_ical = __commonJS({ obj.recurrenceId.toUnixTime(), id ]; - var idx = ICAL3.helpers.binsearchInsert(this.rangeExceptions, item, compareRangeException); + var idx = ICAL2.helpers.binsearchInsert(this.rangeExceptions, item, compareRangeException); this.rangeExceptions.splice(idx, 0, item); } }, @@ -5368,15 +5875,15 @@ var require_ical = __commonJS({ if (!this.component.hasProperty("recurrence-id")) { return false; } - var range = this.component.getFirstProperty("recurrence-id").getParameter("range"); - return range === this.THISANDFUTURE; + var range2 = this.component.getFirstProperty("recurrence-id").getParameter("range"); + return range2 === this.THISANDFUTURE; }, findRangeException: function(time) { if (!this.rangeExceptions.length) { return null; } var utc = time.toUnixTime(); - var idx = ICAL3.helpers.binsearchInsert(this.rangeExceptions, [utc], compareRangeException); + var idx = ICAL2.helpers.binsearchInsert(this.rangeExceptions, [utc], compareRangeException); idx -= 1; if (idx < 0) { return null; @@ -5389,7 +5896,7 @@ var require_ical = __commonJS({ }, getOccurrenceDetails: function(occurrence) { var id = occurrence.toString(); - var utcId = occurrence.convertToZone(ICAL3.Timezone.utcTimezone).toString(); + var utcId = occurrence.convertToZone(ICAL2.Timezone.utcTimezone).toString(); var item; var result = { recurrenceId: occurrence @@ -5436,7 +5943,7 @@ var require_ical = __commonJS({ return result; }, iterator: function(startTime) { - return new ICAL3.RecurExpansion({ + return new ICAL2.RecurExpansion({ component: this.component, dtstart: startTime || this.startDate }); @@ -5551,10 +6058,10 @@ var require_ical = __commonJS({ _setTime: function(propName, time) { var prop = this.component.getFirstProperty(propName); if (!prop) { - prop = new ICAL3.Property(propName); + prop = new ICAL2.Property(propName); this.component.addProperty(prop); } - if (time.zone === ICAL3.Timezone.localTimezone || time.zone === ICAL3.Timezone.utcTimezone) { + if (time.zone === ICAL2.Timezone.localTimezone || time.zone === ICAL2.Timezone.utcTimezone) { prop.removeParameter("tzid"); } else { prop.setParameter("tzid", time.zone.tzid); @@ -5578,9 +6085,9 @@ var require_ical = __commonJS({ return -1; return 0; } - return Event3; + return Event2; }(); - ICAL3.ComponentParser = function() { + ICAL2.ComponentParser = function() { function ComponentParser(options) { if (typeof options === "undefined") { options = {}; @@ -5603,14 +6110,14 @@ var require_ical = __commonJS({ }, onevent: function(component) { }, - process: function(ical) { - if (typeof ical === "string") { - ical = ICAL3.parse(ical); + process: function(ical2) { + if (typeof ical2 === "string") { + ical2 = ICAL2.parse(ical2); } - if (!(ical instanceof ICAL3.Component)) { - ical = new ICAL3.Component(ical); + if (!(ical2 instanceof ICAL2.Component)) { + ical2 = new ICAL2.Component(ical2); } - var components = ical.getAllSubcomponents(); + var components = ical2.getAllSubcomponents(); var i3 = 0; var len = components.length; var component; @@ -5621,7 +6128,7 @@ var require_ical = __commonJS({ if (this.parseTimezone) { var tzid = component.getFirstPropertyValue("tzid"); if (tzid) { - this.ontimezone(new ICAL3.Timezone({ + this.ontimezone(new ICAL2.Timezone({ tzid, component })); @@ -5630,7 +6137,7 @@ var require_ical = __commonJS({ break; case "vevent": if (this.parseEvent) { - this.onevent(new ICAL3.Event(component)); + this.onevent(new ICAL2.Event(component)); } break; default: @@ -5889,14 +6396,14 @@ var require_react_development = __commonJS({ { Object.freeze(emptyObject); } - function Component5(props, context, updater) { + function Component4(props, context, updater) { this.props = props; this.context = context; this.refs = emptyObject; this.updater = updater || ReactNoopUpdateQueue; } - Component5.prototype.isReactComponent = {}; - Component5.prototype.setState = function(partialState, callback) { + Component4.prototype.isReactComponent = {}; + Component4.prototype.setState = function(partialState, callback) { if (!(typeof partialState === "object" || typeof partialState === "function" || partialState == null)) { { throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables."); @@ -5904,7 +6411,7 @@ var require_react_development = __commonJS({ } this.updater.enqueueSetState(this, partialState, callback, "setState"); }; - Component5.prototype.forceUpdate = function(callback) { + Component4.prototype.forceUpdate = function(callback) { this.updater.enqueueForceUpdate(this, callback, "forceUpdate"); }; { @@ -5913,7 +6420,7 @@ var require_react_development = __commonJS({ replaceState: ["replaceState", "Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."] }; var defineDeprecationWarning = function(methodName, info) { - Object.defineProperty(Component5.prototype, methodName, { + Object.defineProperty(Component4.prototype, methodName, { get: function() { warn("%s(...) is deprecated in plain JavaScript React classes. %s", info[0], info[1]); return void 0; @@ -5928,7 +6435,7 @@ var require_react_development = __commonJS({ } function ComponentDummy() { } - ComponentDummy.prototype = Component5.prototype; + ComponentDummy.prototype = Component4.prototype; function PureComponent2(props, context, updater) { this.props = props; this.context = context; @@ -5937,7 +6444,7 @@ var require_react_development = __commonJS({ } var pureComponentPrototype = PureComponent2.prototype = new ComponentDummy(); pureComponentPrototype.constructor = PureComponent2; - _assign(pureComponentPrototype, Component5.prototype); + _assign(pureComponentPrototype, Component4.prototype); pureComponentPrototype.isPureReactComponent = true; function createRef2() { var refObject = { @@ -6004,7 +6511,7 @@ var require_react_development = __commonJS({ var init = lazyComponent._init; try { return getComponentName(init(payload)); - } catch (x4) { + } catch (x3) { return null; } } @@ -6367,7 +6874,7 @@ var require_react_development = __commonJS({ forEachFunc.apply(this, arguments); }, forEachContext); } - function toArray(children) { + function toArray2(children) { return mapChildren(children, function(child) { return child; }) || []; @@ -6791,8 +7298,8 @@ var require_react_development = __commonJS({ if (prefix === void 0) { try { throw Error(); - } catch (x4) { - var match2 = x4.stack.trim().match(/\n( *(at )?)/); + } catch (x3) { + var match2 = x3.stack.trim().match(/\n( *(at )?)/); prefix = match2 && match2[1] || ""; } } @@ -6838,23 +7345,23 @@ var require_react_development = __commonJS({ if (typeof Reflect === "object" && Reflect.construct) { try { Reflect.construct(Fake, []); - } catch (x4) { - control = x4; + } catch (x3) { + control = x3; } Reflect.construct(fn, [], Fake); } else { try { Fake.call(); - } catch (x4) { - control = x4; + } catch (x3) { + control = x3; } fn.call(Fake.prototype); } } else { try { throw Error(); - } catch (x4) { - control = x4; + } catch (x3) { + control = x3; } fn(); } @@ -6910,8 +7417,8 @@ var require_react_development = __commonJS({ return describeNativeComponentFrame(fn, false); } } - function shouldConstruct(Component6) { - var prototype = Component6.prototype; + function shouldConstruct(Component5) { + var prototype = Component5.prototype; return !!(prototype && prototype.isReactComponent); } function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) { @@ -6946,7 +7453,7 @@ var require_react_development = __commonJS({ var init = lazyComponent._init; try { return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn); - } catch (x4) { + } catch (x3) { } } } @@ -7231,11 +7738,11 @@ var require_react_development = __commonJS({ map: mapChildren, forEach: forEachChildren, count: countChildren, - toArray, + toArray: toArray2, only: onlyChild }; exports.Children = Children; - exports.Component = Component5; + exports.Component = Component4; exports.PureComponent = PureComponent2; exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals; exports.cloneElement = cloneElement$1; @@ -8713,8 +9220,8 @@ var require_react_dom_development = __commonJS({ if (prefix === void 0) { try { throw Error(); - } catch (x4) { - var match2 = x4.stack.trim().match(/\n( *(at )?)/); + } catch (x3) { + var match2 = x3.stack.trim().match(/\n( *(at )?)/); prefix = match2 && match2[1] || ""; } } @@ -8760,23 +9267,23 @@ var require_react_dom_development = __commonJS({ if (typeof Reflect === "object" && Reflect.construct) { try { Reflect.construct(Fake, []); - } catch (x4) { - control = x4; + } catch (x3) { + control = x3; } Reflect.construct(fn, [], Fake); } else { try { Fake.call(); - } catch (x4) { - control = x4; + } catch (x3) { + control = x3; } fn.call(Fake.prototype); } } else { try { throw Error(); - } catch (x4) { - control = x4; + } catch (x3) { + control = x3; } fn(); } @@ -8837,8 +9344,8 @@ var require_react_dom_development = __commonJS({ return describeNativeComponentFrame(fn, false); } } - function shouldConstruct(Component5) { - var prototype = Component5.prototype; + function shouldConstruct(Component4) { + var prototype = Component4.prototype; return !!(prototype && prototype.isReactComponent); } function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) { @@ -8873,7 +9380,7 @@ var require_react_dom_development = __commonJS({ var init = lazyComponent._init; try { return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn); - } catch (x4) { + } catch (x3) { } } } @@ -8915,8 +9422,8 @@ var require_react_dom_development = __commonJS({ node = node.return; } while (node); return info; - } catch (x4) { - return "\nError generating stack: " + x4.message + "\n" + x4.stack; + } catch (x3) { + return "\nError generating stack: " + x3.message + "\n" + x3.stack; } } function getWrappedName(outerType, innerType, wrapperName) { @@ -8975,7 +9482,7 @@ var require_react_dom_development = __commonJS({ var init = lazyComponent._init; try { return getComponentName(init(payload)); - } catch (x4) { + } catch (x3) { return null; } } @@ -9384,10 +9891,10 @@ var require_react_dom_development = __commonJS({ if (props[propName] == null) { continue; } - var isArray2 = Array.isArray(props[propName]); - if (props.multiple && !isArray2) { + var isArray3 = Array.isArray(props[propName]); + if (props.multiple && !isArray3) { error("The `%s` prop supplied to must be a scalar value if `multiple` is false.%s", propName, getDeclarationErrorAddendum()); } } @@ -13152,8 +13659,8 @@ var require_react_dom_development = __commonJS({ } accumulateEnterLeaveTwoPhaseListeners(dispatchQueue, leave, enter, from, to); } - function is(x4, y3) { - return x4 === y3 && (x4 !== 0 || 1 / x4 === 1 / y3) || x4 !== x4 && y3 !== y3; + function is(x3, y3) { + return x3 === y3 && (x3 !== 0 || 1 / x3 === 1 / y3) || x3 !== x3 && y3 !== y3; } var objectIs = typeof Object.is === "function" ? Object.is : is; var hasOwnProperty$2 = Object.prototype.hasOwnProperty; @@ -13298,15 +13805,15 @@ var require_react_dom_development = __commonJS({ if (selection.rangeCount === 1 && selection.anchorNode === startMarker.node && selection.anchorOffset === startMarker.offset && selection.focusNode === endMarker.node && selection.focusOffset === endMarker.offset) { return; } - var range = doc.createRange(); - range.setStart(startMarker.node, startMarker.offset); + var range2 = doc.createRange(); + range2.setStart(startMarker.node, startMarker.offset); selection.removeAllRanges(); if (start > end) { - selection.addRange(range); + selection.addRange(range2); selection.extend(endMarker.node, endMarker.offset); } else { - range.setEnd(endMarker.node, endMarker.offset); - selection.addRange(range); + range2.setEnd(endMarker.node, endMarker.offset); + selection.addRange(range2); } } } @@ -13879,16 +14386,16 @@ var require_react_dom_development = __commonJS({ } return null; } - function accumulateEnterLeaveListenersForEvent(dispatchQueue, event, target, common, inCapturePhase) { + function accumulateEnterLeaveListenersForEvent(dispatchQueue, event, target, common2, inCapturePhase) { var registrationName = event._reactName; var listeners = []; var instance = target; while (instance !== null) { - if (instance === common) { + if (instance === common2) { break; } var _instance4 = instance, alternate = _instance4.alternate, stateNode = _instance4.stateNode, tag = _instance4.tag; - if (alternate !== null && alternate === common) { + if (alternate !== null && alternate === common2) { break; } if (tag === HostComponent && stateNode !== null) { @@ -13915,12 +14422,12 @@ var require_react_dom_development = __commonJS({ } } function accumulateEnterLeaveTwoPhaseListeners(dispatchQueue, leaveEvent, enterEvent, from, to) { - var common = from && to ? getLowestCommonAncestor(from, to) : null; + var common2 = from && to ? getLowestCommonAncestor(from, to) : null; if (from !== null) { - accumulateEnterLeaveListenersForEvent(dispatchQueue, leaveEvent, from, common, false); + accumulateEnterLeaveListenersForEvent(dispatchQueue, leaveEvent, from, common2, false); } if (to !== null && enterEvent !== null) { - accumulateEnterLeaveListenersForEvent(dispatchQueue, enterEvent, to, common, true); + accumulateEnterLeaveListenersForEvent(dispatchQueue, enterEvent, to, common2, true); } } function getListenerSetKey(domEventName, capture) { @@ -15428,9 +15935,9 @@ var require_react_dom_development = __commonJS({ var contextStackCursor = createCursor(emptyContextObject); var didPerformWorkStackCursor = createCursor(false); var previousContext = emptyContextObject; - function getUnmaskedContext(workInProgress2, Component5, didPushOwnContextIfProvider) { + function getUnmaskedContext(workInProgress2, Component4, didPushOwnContextIfProvider) { { - if (didPushOwnContextIfProvider && isContextProvider(Component5)) { + if (didPushOwnContextIfProvider && isContextProvider(Component4)) { return previousContext; } return contextStackCursor.current; @@ -15575,8 +16082,8 @@ var require_react_dom_development = __commonJS({ case HostRoot: return node.stateNode.context; case ClassComponent: { - var Component5 = node.type; - if (isContextProvider(Component5)) { + var Component4 = node.type; + if (isContextProvider(Component4)) { return node.stateNode.__reactInternalMemoizedMergedChildContext; } break; @@ -15988,10 +16495,10 @@ var require_react_dom_development = __commonJS({ pendingLegacyContextWarning = new Map(); }; } - function resolveDefaultProps(Component5, baseProps) { - if (Component5 && Component5.defaultProps) { + function resolveDefaultProps(Component4, baseProps) { + if (Component4 && Component4.defaultProps) { var props = _assign({}, baseProps); - var defaultProps = Component5.defaultProps; + var defaultProps = Component4.defaultProps; for (var propName in defaultProps) { if (props[propName] === void 0) { props[propName] = defaultProps[propName]; @@ -16218,14 +16725,14 @@ var require_react_dom_development = __commonJS({ var queue = workInProgress2.updateQueue; var currentQueue = current2.updateQueue; if (queue === currentQueue) { - var clone3 = { + var clone4 = { baseState: currentQueue.baseState, firstBaseUpdate: currentQueue.firstBaseUpdate, lastBaseUpdate: currentQueue.lastBaseUpdate, shared: currentQueue.shared, effects: currentQueue.effects }; - workInProgress2.updateQueue = clone3; + workInProgress2.updateQueue = clone4; } } function createUpdate(eventTime, lane) { @@ -16272,7 +16779,7 @@ var require_react_dom_development = __commonJS({ if (firstBaseUpdate !== null) { var update = firstBaseUpdate; do { - var clone3 = { + var clone4 = { eventTime: update.eventTime, lane: update.lane, tag: update.tag, @@ -16281,10 +16788,10 @@ var require_react_dom_development = __commonJS({ next: null }; if (newLast === null) { - newFirst = newLast = clone3; + newFirst = newLast = clone4; } else { - newLast.next = clone3; - newLast = clone3; + newLast.next = clone4; + newLast = clone4; } update = update.next; } while (update !== null); @@ -16422,7 +16929,7 @@ var require_react_dom_development = __commonJS({ var updateLane = update.lane; var updateEventTime = update.eventTime; if (!isSubsetOfLanes(renderLanes2, updateLane)) { - var clone3 = { + var clone4 = { eventTime: updateEventTime, lane: updateLane, tag: update.tag, @@ -16431,10 +16938,10 @@ var require_react_dom_development = __commonJS({ next: null }; if (newLastBaseUpdate === null) { - newFirstBaseUpdate = newLastBaseUpdate = clone3; + newFirstBaseUpdate = newLastBaseUpdate = clone4; newBaseState = newState; } else { - newLastBaseUpdate = newLastBaseUpdate.next = clone3; + newLastBaseUpdate = newLastBaseUpdate.next = clone4; } newLanes = mergeLanes(newLanes, updateLane); } else { @@ -16519,7 +17026,7 @@ var require_react_dom_development = __commonJS({ } } var fakeInternalInstance = {}; - var isArray = Array.isArray; + var isArray2 = Array.isArray; var emptyRefsObject = new React5.Component().refs; var didWarnAboutStateAssignmentForComponent; var didWarnAboutUninitializedState; @@ -16742,7 +17249,7 @@ var require_react_dom_development = __commonJS({ error("%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.", name); } var _state = instance.state; - if (_state && (typeof _state !== "object" || isArray(_state))) { + if (_state && (typeof _state !== "object" || isArray2(_state))) { error("%s.state: must be set to an object or null", name); } if (typeof instance.getChildContext === "function" && typeof ctor.childContextTypes !== "object") { @@ -17225,10 +17732,10 @@ var require_react_dom_development = __commonJS({ return existingChildren; } function useFiber(fiber, pendingProps) { - var clone3 = createWorkInProgress(fiber, pendingProps); - clone3.index = 0; - clone3.sibling = null; - return clone3; + var clone4 = createWorkInProgress(fiber, pendingProps); + clone4.index = 0; + clone4.sibling = null; + return clone4; } function placeChild(newFiber, lastPlacedIndex, newIndex) { newFiber.index = newIndex; @@ -18307,7 +18814,7 @@ var require_react_dom_development = __commonJS({ } return true; } - function renderWithHooks(current2, workInProgress2, Component5, props, secondArg, nextRenderLanes) { + function renderWithHooks(current2, workInProgress2, Component4, props, secondArg, nextRenderLanes) { renderLanes = nextRenderLanes; currentlyRenderingFiber$1 = workInProgress2; { @@ -18327,7 +18834,7 @@ var require_react_dom_development = __commonJS({ ReactCurrentDispatcher$1.current = HooksDispatcherOnMountInDEV; } } - var children = Component5(props, secondArg); + var children = Component4(props, secondArg); if (didScheduleRenderPhaseUpdateDuringThisPass) { var numberOfReRenders = 0; do { @@ -18348,7 +18855,7 @@ var require_react_dom_development = __commonJS({ hookTypesUpdateIndexDev = -1; } ReactCurrentDispatcher$1.current = HooksDispatcherOnRerenderInDEV; - children = Component5(props, secondArg); + children = Component4(props, secondArg); } while (didScheduleRenderPhaseUpdateDuringThisPass); } ReactCurrentDispatcher$1.current = ContextOnlyDispatcher; @@ -18525,7 +19032,7 @@ var require_react_dom_development = __commonJS({ do { var updateLane = update.lane; if (!isSubsetOfLanes(renderLanes, updateLane)) { - var clone3 = { + var clone4 = { lane: updateLane, action: update.action, eagerReducer: update.eagerReducer, @@ -18533,10 +19040,10 @@ var require_react_dom_development = __commonJS({ next: null }; if (newBaseQueueLast === null) { - newBaseQueueFirst = newBaseQueueLast = clone3; + newBaseQueueFirst = newBaseQueueLast = clone4; newBaseState = newState; } else { - newBaseQueueLast = newBaseQueueLast.next = clone3; + newBaseQueueLast = newBaseQueueLast.next = clone4; } currentlyRenderingFiber$1.lanes = mergeLanes(currentlyRenderingFiber$1.lanes, updateLane); markSkippedUpdateLanes(updateLane); @@ -19935,16 +20442,16 @@ var require_react_dom_development = __commonJS({ workInProgress2.child = reconcileChildFibers(workInProgress2, current2.child, null, renderLanes2); workInProgress2.child = reconcileChildFibers(workInProgress2, null, nextChildren, renderLanes2); } - function updateForwardRef(current2, workInProgress2, Component5, nextProps, renderLanes2) { + function updateForwardRef(current2, workInProgress2, Component4, nextProps, renderLanes2) { { if (workInProgress2.type !== workInProgress2.elementType) { - var innerPropTypes = Component5.propTypes; + var innerPropTypes = Component4.propTypes; if (innerPropTypes) { - checkPropTypes(innerPropTypes, nextProps, "prop", getComponentName(Component5)); + checkPropTypes(innerPropTypes, nextProps, "prop", getComponentName(Component4)); } } } - var render5 = Component5.render; + var render5 = Component4.render; var ref = workInProgress2.ref; var nextChildren; prepareToReadContext(workInProgress2, renderLanes2); @@ -19970,10 +20477,10 @@ var require_react_dom_development = __commonJS({ reconcileChildren(current2, workInProgress2, nextChildren, renderLanes2); return workInProgress2.child; } - function updateMemoComponent(current2, workInProgress2, Component5, nextProps, updateLanes, renderLanes2) { + function updateMemoComponent(current2, workInProgress2, Component4, nextProps, updateLanes, renderLanes2) { if (current2 === null) { - var type = Component5.type; - if (isSimpleFunctionComponent(type) && Component5.compare === null && Component5.defaultProps === void 0) { + var type = Component4.type; + if (isSimpleFunctionComponent(type) && Component4.compare === null && Component4.defaultProps === void 0) { var resolvedType = type; { resolvedType = resolveFunctionForHotReloading(type); @@ -19991,14 +20498,14 @@ var require_react_dom_development = __commonJS({ checkPropTypes(innerPropTypes, nextProps, "prop", getComponentName(type)); } } - var child = createFiberFromTypeAndProps(Component5.type, null, nextProps, workInProgress2, workInProgress2.mode, renderLanes2); + var child = createFiberFromTypeAndProps(Component4.type, null, nextProps, workInProgress2, workInProgress2.mode, renderLanes2); child.ref = workInProgress2.ref; child.return = workInProgress2; workInProgress2.child = child; return child; } { - var _type = Component5.type; + var _type = Component4.type; var _innerPropTypes = _type.propTypes; if (_innerPropTypes) { checkPropTypes(_innerPropTypes, nextProps, "prop", getComponentName(_type)); @@ -20007,7 +20514,7 @@ var require_react_dom_development = __commonJS({ var currentChild = current2.child; if (!includesSomeLane(updateLanes, renderLanes2)) { var prevProps = currentChild.memoizedProps; - var compare = Component5.compare; + var compare = Component4.compare; compare = compare !== null ? compare : shallowEqual; if (compare(prevProps, nextProps) && current2.ref === workInProgress2.ref) { return bailoutOnAlreadyFinishedWork(current2, workInProgress2, renderLanes2); @@ -20020,7 +20527,7 @@ var require_react_dom_development = __commonJS({ workInProgress2.child = newChild; return newChild; } - function updateSimpleMemoComponent(current2, workInProgress2, Component5, nextProps, updateLanes, renderLanes2) { + function updateSimpleMemoComponent(current2, workInProgress2, Component4, nextProps, updateLanes, renderLanes2) { { if (workInProgress2.type !== workInProgress2.elementType) { var outerMemoType = workInProgress2.elementType; @@ -20030,7 +20537,7 @@ var require_react_dom_development = __commonJS({ var init = lazyComponent._init; try { outerMemoType = init(payload); - } catch (x4) { + } catch (x3) { outerMemoType = null; } var outerPropTypes = outerMemoType && outerMemoType.propTypes; @@ -20052,7 +20559,7 @@ var require_react_dom_development = __commonJS({ } } } - return updateFunctionComponent(current2, workInProgress2, Component5, nextProps, renderLanes2); + return updateFunctionComponent(current2, workInProgress2, Component4, nextProps, renderLanes2); } function updateOffscreenComponent(current2, workInProgress2, renderLanes2) { var nextProps = workInProgress2.pendingProps; @@ -20133,18 +20640,18 @@ var require_react_dom_development = __commonJS({ workInProgress2.flags |= Ref; } } - function updateFunctionComponent(current2, workInProgress2, Component5, nextProps, renderLanes2) { + function updateFunctionComponent(current2, workInProgress2, Component4, nextProps, renderLanes2) { { if (workInProgress2.type !== workInProgress2.elementType) { - var innerPropTypes = Component5.propTypes; + var innerPropTypes = Component4.propTypes; if (innerPropTypes) { - checkPropTypes(innerPropTypes, nextProps, "prop", getComponentName(Component5)); + checkPropTypes(innerPropTypes, nextProps, "prop", getComponentName(Component4)); } } } var context; { - var unmaskedContext = getUnmaskedContext(workInProgress2, Component5, true); + var unmaskedContext = getUnmaskedContext(workInProgress2, Component4, true); context = getMaskedContext(workInProgress2, unmaskedContext); } var nextChildren; @@ -20152,11 +20659,11 @@ var require_react_dom_development = __commonJS({ { ReactCurrentOwner$1.current = workInProgress2; setIsRendering(true); - nextChildren = renderWithHooks(current2, workInProgress2, Component5, nextProps, context, renderLanes2); + nextChildren = renderWithHooks(current2, workInProgress2, Component4, nextProps, context, renderLanes2); if (workInProgress2.mode & StrictMode) { disableLogs(); try { - nextChildren = renderWithHooks(current2, workInProgress2, Component5, nextProps, context, renderLanes2); + nextChildren = renderWithHooks(current2, workInProgress2, Component4, nextProps, context, renderLanes2); } finally { reenableLogs(); } @@ -20171,17 +20678,17 @@ var require_react_dom_development = __commonJS({ reconcileChildren(current2, workInProgress2, nextChildren, renderLanes2); return workInProgress2.child; } - function updateClassComponent(current2, workInProgress2, Component5, nextProps, renderLanes2) { + function updateClassComponent(current2, workInProgress2, Component4, nextProps, renderLanes2) { { if (workInProgress2.type !== workInProgress2.elementType) { - var innerPropTypes = Component5.propTypes; + var innerPropTypes = Component4.propTypes; if (innerPropTypes) { - checkPropTypes(innerPropTypes, nextProps, "prop", getComponentName(Component5)); + checkPropTypes(innerPropTypes, nextProps, "prop", getComponentName(Component4)); } } } var hasContext; - if (isContextProvider(Component5)) { + if (isContextProvider(Component4)) { hasContext = true; pushContextProvider(workInProgress2); } else { @@ -20196,15 +20703,15 @@ var require_react_dom_development = __commonJS({ workInProgress2.alternate = null; workInProgress2.flags |= Placement; } - constructClassInstance(workInProgress2, Component5, nextProps); - mountClassInstance(workInProgress2, Component5, nextProps, renderLanes2); + constructClassInstance(workInProgress2, Component4, nextProps); + mountClassInstance(workInProgress2, Component4, nextProps, renderLanes2); shouldUpdate = true; } else if (current2 === null) { - shouldUpdate = resumeMountClassInstance(workInProgress2, Component5, nextProps, renderLanes2); + shouldUpdate = resumeMountClassInstance(workInProgress2, Component4, nextProps, renderLanes2); } else { - shouldUpdate = updateClassInstance(current2, workInProgress2, Component5, nextProps, renderLanes2); + shouldUpdate = updateClassInstance(current2, workInProgress2, Component4, nextProps, renderLanes2); } - var nextUnitOfWork = finishClassComponent(current2, workInProgress2, Component5, shouldUpdate, hasContext, renderLanes2); + var nextUnitOfWork = finishClassComponent(current2, workInProgress2, Component4, shouldUpdate, hasContext, renderLanes2); { var inst = workInProgress2.stateNode; if (shouldUpdate && inst.props !== nextProps) { @@ -20216,19 +20723,19 @@ var require_react_dom_development = __commonJS({ } return nextUnitOfWork; } - function finishClassComponent(current2, workInProgress2, Component5, shouldUpdate, hasContext, renderLanes2) { + function finishClassComponent(current2, workInProgress2, Component4, shouldUpdate, hasContext, renderLanes2) { markRef(current2, workInProgress2); var didCaptureError = (workInProgress2.flags & DidCapture) !== NoFlags; if (!shouldUpdate && !didCaptureError) { if (hasContext) { - invalidateContextProvider(workInProgress2, Component5, false); + invalidateContextProvider(workInProgress2, Component4, false); } return bailoutOnAlreadyFinishedWork(current2, workInProgress2, renderLanes2); } var instance = workInProgress2.stateNode; ReactCurrentOwner$1.current = workInProgress2; var nextChildren; - if (didCaptureError && typeof Component5.getDerivedStateFromError !== "function") { + if (didCaptureError && typeof Component4.getDerivedStateFromError !== "function") { nextChildren = null; { stopProfilerTimerIfRunning(); @@ -20256,7 +20763,7 @@ var require_react_dom_development = __commonJS({ } workInProgress2.memoizedState = instance.state; if (hasContext) { - invalidateContextProvider(workInProgress2, Component5, true); + invalidateContextProvider(workInProgress2, Component4, true); } return workInProgress2.child; } @@ -20348,60 +20855,60 @@ var require_react_dom_development = __commonJS({ var lazyComponent = elementType; var payload = lazyComponent._payload; var init = lazyComponent._init; - var Component5 = init(payload); - workInProgress2.type = Component5; - var resolvedTag = workInProgress2.tag = resolveLazyComponentTag(Component5); - var resolvedProps = resolveDefaultProps(Component5, props); + var Component4 = init(payload); + workInProgress2.type = Component4; + var resolvedTag = workInProgress2.tag = resolveLazyComponentTag(Component4); + var resolvedProps = resolveDefaultProps(Component4, props); var child; switch (resolvedTag) { case FunctionComponent: { { - validateFunctionComponentInDev(workInProgress2, Component5); - workInProgress2.type = Component5 = resolveFunctionForHotReloading(Component5); + validateFunctionComponentInDev(workInProgress2, Component4); + workInProgress2.type = Component4 = resolveFunctionForHotReloading(Component4); } - child = updateFunctionComponent(null, workInProgress2, Component5, resolvedProps, renderLanes2); + child = updateFunctionComponent(null, workInProgress2, Component4, resolvedProps, renderLanes2); return child; } case ClassComponent: { { - workInProgress2.type = Component5 = resolveClassForHotReloading(Component5); + workInProgress2.type = Component4 = resolveClassForHotReloading(Component4); } - child = updateClassComponent(null, workInProgress2, Component5, resolvedProps, renderLanes2); + child = updateClassComponent(null, workInProgress2, Component4, resolvedProps, renderLanes2); return child; } case ForwardRef: { { - workInProgress2.type = Component5 = resolveForwardRefForHotReloading(Component5); + workInProgress2.type = Component4 = resolveForwardRefForHotReloading(Component4); } - child = updateForwardRef(null, workInProgress2, Component5, resolvedProps, renderLanes2); + child = updateForwardRef(null, workInProgress2, Component4, resolvedProps, renderLanes2); return child; } case MemoComponent: { { if (workInProgress2.type !== workInProgress2.elementType) { - var outerPropTypes = Component5.propTypes; + var outerPropTypes = Component4.propTypes; if (outerPropTypes) { - checkPropTypes(outerPropTypes, resolvedProps, "prop", getComponentName(Component5)); + checkPropTypes(outerPropTypes, resolvedProps, "prop", getComponentName(Component4)); } } } - child = updateMemoComponent(null, workInProgress2, Component5, resolveDefaultProps(Component5.type, resolvedProps), updateLanes, renderLanes2); + child = updateMemoComponent(null, workInProgress2, Component4, resolveDefaultProps(Component4.type, resolvedProps), updateLanes, renderLanes2); return child; } } var hint = ""; { - if (Component5 !== null && typeof Component5 === "object" && Component5.$$typeof === REACT_LAZY_TYPE) { + if (Component4 !== null && typeof Component4 === "object" && Component4.$$typeof === REACT_LAZY_TYPE) { hint = " Did you wrap a component in React.lazy() more than once?"; } } { { - throw Error("Element type is invalid. Received a promise that resolves to: " + Component5 + ". Lazy element type must resolve to a class or function." + hint); + throw Error("Element type is invalid. Received a promise that resolves to: " + Component4 + ". Lazy element type must resolve to a class or function." + hint); } } } - function mountIncompleteClassComponent(_current, workInProgress2, Component5, nextProps, renderLanes2) { + function mountIncompleteClassComponent(_current, workInProgress2, Component4, nextProps, renderLanes2) { if (_current !== null) { _current.alternate = null; workInProgress2.alternate = null; @@ -20409,18 +20916,18 @@ var require_react_dom_development = __commonJS({ } workInProgress2.tag = ClassComponent; var hasContext; - if (isContextProvider(Component5)) { + if (isContextProvider(Component4)) { hasContext = true; pushContextProvider(workInProgress2); } else { hasContext = false; } prepareToReadContext(workInProgress2, renderLanes2); - constructClassInstance(workInProgress2, Component5, nextProps); - mountClassInstance(workInProgress2, Component5, nextProps, renderLanes2); - return finishClassComponent(null, workInProgress2, Component5, true, hasContext, renderLanes2); + constructClassInstance(workInProgress2, Component4, nextProps); + mountClassInstance(workInProgress2, Component4, nextProps, renderLanes2); + return finishClassComponent(null, workInProgress2, Component4, true, hasContext, renderLanes2); } - function mountIndeterminateComponent(_current, workInProgress2, Component5, renderLanes2) { + function mountIndeterminateComponent(_current, workInProgress2, Component4, renderLanes2) { if (_current !== null) { _current.alternate = null; workInProgress2.alternate = null; @@ -20429,14 +20936,14 @@ var require_react_dom_development = __commonJS({ var props = workInProgress2.pendingProps; var context; { - var unmaskedContext = getUnmaskedContext(workInProgress2, Component5, false); + var unmaskedContext = getUnmaskedContext(workInProgress2, Component4, false); context = getMaskedContext(workInProgress2, unmaskedContext); } prepareToReadContext(workInProgress2, renderLanes2); var value; { - if (Component5.prototype && typeof Component5.prototype.render === "function") { - var componentName = getComponentName(Component5) || "Unknown"; + if (Component4.prototype && typeof Component4.prototype.render === "function") { + var componentName = getComponentName(Component4) || "Unknown"; if (!didWarnAboutBadClass[componentName]) { error("The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.", componentName, componentName); didWarnAboutBadClass[componentName] = true; @@ -20447,13 +20954,13 @@ var require_react_dom_development = __commonJS({ } setIsRendering(true); ReactCurrentOwner$1.current = workInProgress2; - value = renderWithHooks(null, workInProgress2, Component5, props, context, renderLanes2); + value = renderWithHooks(null, workInProgress2, Component4, props, context, renderLanes2); setIsRendering(false); } workInProgress2.flags |= PerformedWork; { if (typeof value === "object" && value !== null && typeof value.render === "function" && value.$$typeof === void 0) { - var _componentName = getComponentName(Component5) || "Unknown"; + var _componentName = getComponentName(Component4) || "Unknown"; if (!didWarnAboutModulePatternComponent[_componentName]) { error("The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.", _componentName, _componentName, _componentName); didWarnAboutModulePatternComponent[_componentName] = true; @@ -20462,7 +20969,7 @@ var require_react_dom_development = __commonJS({ } if (typeof value === "object" && value !== null && typeof value.render === "function" && value.$$typeof === void 0) { { - var _componentName2 = getComponentName(Component5) || "Unknown"; + var _componentName2 = getComponentName(Component4) || "Unknown"; if (!didWarnAboutModulePatternComponent[_componentName2]) { error("The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.", _componentName2, _componentName2, _componentName2); didWarnAboutModulePatternComponent[_componentName2] = true; @@ -20472,7 +20979,7 @@ var require_react_dom_development = __commonJS({ workInProgress2.memoizedState = null; workInProgress2.updateQueue = null; var hasContext = false; - if (isContextProvider(Component5)) { + if (isContextProvider(Component4)) { hasContext = true; pushContextProvider(workInProgress2); } else { @@ -20480,20 +20987,20 @@ var require_react_dom_development = __commonJS({ } workInProgress2.memoizedState = value.state !== null && value.state !== void 0 ? value.state : null; initializeUpdateQueue(workInProgress2); - var getDerivedStateFromProps = Component5.getDerivedStateFromProps; + var getDerivedStateFromProps = Component4.getDerivedStateFromProps; if (typeof getDerivedStateFromProps === "function") { - applyDerivedStateFromProps(workInProgress2, Component5, getDerivedStateFromProps, props); + applyDerivedStateFromProps(workInProgress2, Component4, getDerivedStateFromProps, props); } adoptClassInstance(workInProgress2, value); - mountClassInstance(workInProgress2, Component5, props, renderLanes2); - return finishClassComponent(null, workInProgress2, Component5, true, hasContext, renderLanes2); + mountClassInstance(workInProgress2, Component4, props, renderLanes2); + return finishClassComponent(null, workInProgress2, Component4, true, hasContext, renderLanes2); } else { workInProgress2.tag = FunctionComponent; { if (workInProgress2.mode & StrictMode) { disableLogs(); try { - value = renderWithHooks(null, workInProgress2, Component5, props, context, renderLanes2); + value = renderWithHooks(null, workInProgress2, Component4, props, context, renderLanes2); } finally { reenableLogs(); } @@ -20501,16 +21008,16 @@ var require_react_dom_development = __commonJS({ } reconcileChildren(null, workInProgress2, value, renderLanes2); { - validateFunctionComponentInDev(workInProgress2, Component5); + validateFunctionComponentInDev(workInProgress2, Component4); } return workInProgress2.child; } } - function validateFunctionComponentInDev(workInProgress2, Component5) { + function validateFunctionComponentInDev(workInProgress2, Component4) { { - if (Component5) { - if (Component5.childContextTypes) { - error("%s(...): childContextTypes cannot be defined on a function component.", Component5.displayName || Component5.name || "Component"); + if (Component4) { + if (Component4.childContextTypes) { + error("%s(...): childContextTypes cannot be defined on a function component.", Component4.displayName || Component4.name || "Component"); } } if (workInProgress2.ref !== null) { @@ -20529,15 +21036,15 @@ var require_react_dom_development = __commonJS({ error("Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?%s", info); } } - if (typeof Component5.getDerivedStateFromProps === "function") { - var _componentName3 = getComponentName(Component5) || "Unknown"; + if (typeof Component4.getDerivedStateFromProps === "function") { + var _componentName3 = getComponentName(Component4) || "Unknown"; if (!didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3]) { error("%s: Function components do not support getDerivedStateFromProps.", _componentName3); didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3] = true; } } - if (typeof Component5.contextType === "object" && Component5.contextType !== null) { - var _componentName4 = getComponentName(Component5) || "Unknown"; + if (typeof Component4.contextType === "object" && Component4.contextType !== null) { + var _componentName4 = getComponentName(Component4) || "Unknown"; if (!didWarnAboutContextTypeOnFunctionComponent[_componentName4]) { error("%s: Function components do not support contextType.", _componentName4); didWarnAboutContextTypeOnFunctionComponent[_componentName4] = true; @@ -20855,10 +21362,10 @@ var require_react_dom_development = __commonJS({ } function validateSuspenseListNestedChild(childSlot, index2) { { - var isArray2 = Array.isArray(childSlot); - var isIterable = !isArray2 && typeof getIteratorFn(childSlot) === "function"; - if (isArray2 || isIterable) { - var type = isArray2 ? "array" : "iterable"; + var isArray3 = Array.isArray(childSlot); + var isIterable = !isArray3 && typeof getIteratorFn(childSlot) === "function"; + if (isArray3 || isIterable) { + var type = isArray3 ? "array" : "iterable"; error("A nested %s was passed to row #%s in . Wrap it in an additional SuspenseList to configure its revealOrder: ... {%s} ... ", type, index2, type); return false; } @@ -21146,8 +21653,8 @@ var require_react_dom_development = __commonJS({ pushHostContext(workInProgress2); break; case ClassComponent: { - var Component5 = workInProgress2.type; - if (isContextProvider(Component5)) { + var Component4 = workInProgress2.type; + if (isContextProvider(Component4)) { pushContextProvider(workInProgress2); } break; @@ -21442,8 +21949,8 @@ var require_react_dom_development = __commonJS({ case MemoComponent: return null; case ClassComponent: { - var Component5 = workInProgress2.type; - if (isContextProvider(Component5)) { + var Component4 = workInProgress2.type; + if (isContextProvider(Component4)) { popContext(workInProgress2); } return null; @@ -21725,8 +22232,8 @@ var require_react_dom_development = __commonJS({ function unwindWork(workInProgress2, renderLanes2) { switch (workInProgress2.tag) { case ClassComponent: { - var Component5 = workInProgress2.type; - if (isContextProvider(Component5)) { + var Component4 = workInProgress2.type; + if (isContextProvider(Component4)) { popContext(workInProgress2); } var flags = workInProgress2.flags; @@ -24892,18 +25399,18 @@ For more info, visit https://reactjs.org/link/mock-scheduler`); var createFiber = function(tag, pendingProps, key, mode) { return new FiberNode(tag, pendingProps, key, mode); }; - function shouldConstruct$1(Component5) { - var prototype = Component5.prototype; + function shouldConstruct$1(Component4) { + var prototype = Component4.prototype; return !!(prototype && prototype.isReactComponent); } function isSimpleFunctionComponent(type) { return typeof type === "function" && !shouldConstruct$1(type) && type.defaultProps === void 0; } - function resolveLazyComponentTag(Component5) { - if (typeof Component5 === "function") { - return shouldConstruct$1(Component5) ? ClassComponent : FunctionComponent; - } else if (Component5 !== void 0 && Component5 !== null) { - var $$typeof = Component5.$$typeof; + function resolveLazyComponentTag(Component4) { + if (typeof Component4 === "function") { + return shouldConstruct$1(Component4) ? ClassComponent : FunctionComponent; + } else if (Component4 !== void 0 && Component4 !== null) { + var $$typeof = Component4.$$typeof; if ($$typeof === REACT_FORWARD_REF_TYPE) { return ForwardRef; } @@ -25342,9 +25849,9 @@ For more info, visit https://reactjs.org/link/mock-scheduler`); var fiber = get(parentComponent); var parentContext = findCurrentUnmaskedContext(fiber); if (fiber.tag === ClassComponent) { - var Component5 = fiber.type; - if (isContextProvider(Component5)) { - return processChildContext(fiber, Component5, parentContext); + var Component4 = fiber.type; + if (isContextProvider(Component4)) { + return processChildContext(fiber, Component4, parentContext); } } return parentContext; @@ -26043,11518 +26550,14806 @@ var require_react_dom = __commonJS({ } }); -// node_modules/moment/moment.js -var require_moment = __commonJS({ - "node_modules/moment/moment.js"(exports, module2) { - (function(global2, factory) { - typeof exports === "object" && typeof module2 !== "undefined" ? module2.exports = factory() : typeof define === "function" && define.amd ? define(factory) : global2.moment = factory(); - })(exports, function() { - "use strict"; - var hookCallback; - function hooks() { - return hookCallback.apply(null, arguments); - } - function setHookCallback(callback) { - hookCallback = callback; - } - function isArray(input) { - return input instanceof Array || Object.prototype.toString.call(input) === "[object Array]"; - } - function isObject(input) { - return input != null && Object.prototype.toString.call(input) === "[object Object]"; - } - function hasOwnProp(a3, b3) { - return Object.prototype.hasOwnProperty.call(a3, b3); - } - function isObjectEmpty(obj) { - if (Object.getOwnPropertyNames) { - return Object.getOwnPropertyNames(obj).length === 0; - } else { - var k3; - for (k3 in obj) { - if (hasOwnProp(obj, k3)) { - return false; - } - } - return true; - } - } - function isUndefined2(input) { - return input === void 0; - } - function isNumber2(input) { - return typeof input === "number" || Object.prototype.toString.call(input) === "[object Number]"; - } - function isDate2(input) { - return input instanceof Date || Object.prototype.toString.call(input) === "[object Date]"; - } - function map(arr, fn) { - var res = [], i3, arrLen = arr.length; - for (i3 = 0; i3 < arrLen; ++i3) { - res.push(fn(arr[i3], i3)); +// node_modules/obsidian-daily-notes-interface/dist/main.js +var require_main = __commonJS({ + "node_modules/obsidian-daily-notes-interface/dist/main.js"(exports) { + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + var obsidian = require("obsidian"); + var DEFAULT_DAILY_NOTE_FORMAT = "YYYY-MM-DD"; + var DEFAULT_WEEKLY_NOTE_FORMAT = "gggg-[W]ww"; + var DEFAULT_MONTHLY_NOTE_FORMAT = "YYYY-MM"; + var DEFAULT_QUARTERLY_NOTE_FORMAT = "YYYY-[Q]Q"; + var DEFAULT_YEARLY_NOTE_FORMAT = "YYYY"; + function shouldUsePeriodicNotesSettings(periodicity) { + var _a, _b; + const periodicNotes = window.app.plugins.getPlugin("periodic-notes"); + return periodicNotes && ((_b = (_a = periodicNotes.settings) == null ? void 0 : _a[periodicity]) == null ? void 0 : _b.enabled); + } + function getDailyNoteSettings3() { + var _a, _b, _c, _d; + try { + const { internalPlugins, plugins } = window.app; + if (shouldUsePeriodicNotesSettings("daily")) { + const { format: format2, folder: folder2, template: template2 } = ((_b = (_a = plugins.getPlugin("periodic-notes")) == null ? void 0 : _a.settings) == null ? void 0 : _b.daily) || {}; + return { + format: format2 || DEFAULT_DAILY_NOTE_FORMAT, + folder: (folder2 == null ? void 0 : folder2.trim()) || "", + template: (template2 == null ? void 0 : template2.trim()) || "" + }; } - return res; + const { folder, format, template } = ((_d = (_c = internalPlugins.getPluginById("daily-notes")) == null ? void 0 : _c.instance) == null ? void 0 : _d.options) || {}; + return { + format: format || DEFAULT_DAILY_NOTE_FORMAT, + folder: (folder == null ? void 0 : folder.trim()) || "", + template: (template == null ? void 0 : template.trim()) || "" + }; + } catch (err) { + console.info("No custom daily note settings found!", err); } - function extend(a3, b3) { - for (var i3 in b3) { - if (hasOwnProp(b3, i3)) { - a3[i3] = b3[i3]; - } - } - if (hasOwnProp(b3, "toString")) { - a3.toString = b3.toString; - } - if (hasOwnProp(b3, "valueOf")) { - a3.valueOf = b3.valueOf; + } + function getWeeklyNoteSettings() { + var _a, _b, _c, _d, _e, _f, _g; + try { + const pluginManager = window.app.plugins; + const calendarSettings = (_a = pluginManager.getPlugin("calendar")) == null ? void 0 : _a.options; + const periodicNotesSettings = (_c = (_b = pluginManager.getPlugin("periodic-notes")) == null ? void 0 : _b.settings) == null ? void 0 : _c.weekly; + if (shouldUsePeriodicNotesSettings("weekly")) { + return { + format: periodicNotesSettings.format || DEFAULT_WEEKLY_NOTE_FORMAT, + folder: ((_d = periodicNotesSettings.folder) == null ? void 0 : _d.trim()) || "", + template: ((_e = periodicNotesSettings.template) == null ? void 0 : _e.trim()) || "" + }; } - return a3; - } - function createUTC(input, format2, locale2, strict) { - return createLocalOrUTC(input, format2, locale2, strict, true).utc(); + const settings = calendarSettings || {}; + return { + format: settings.weeklyNoteFormat || DEFAULT_WEEKLY_NOTE_FORMAT, + folder: ((_f = settings.weeklyNoteFolder) == null ? void 0 : _f.trim()) || "", + template: ((_g = settings.weeklyNoteTemplate) == null ? void 0 : _g.trim()) || "" + }; + } catch (err) { + console.info("No custom weekly note settings found!", err); } - function defaultParsingFlags() { + } + function getMonthlyNoteSettings() { + var _a, _b, _c, _d; + const pluginManager = window.app.plugins; + try { + const settings = shouldUsePeriodicNotesSettings("monthly") && ((_b = (_a = pluginManager.getPlugin("periodic-notes")) == null ? void 0 : _a.settings) == null ? void 0 : _b.monthly) || {}; return { - empty: false, - unusedTokens: [], - unusedInput: [], - overflow: -2, - charsLeftOver: 0, - nullInput: false, - invalidEra: null, - invalidMonth: null, - invalidFormat: false, - userInvalidated: false, - iso: false, - parsedDateParts: [], - era: null, - meridiem: null, - rfc2822: false, - weekdayMismatch: false + format: settings.format || DEFAULT_MONTHLY_NOTE_FORMAT, + folder: ((_c = settings.folder) == null ? void 0 : _c.trim()) || "", + template: ((_d = settings.template) == null ? void 0 : _d.trim()) || "" }; + } catch (err) { + console.info("No custom monthly note settings found!", err); } - function getParsingFlags(m3) { - if (m3._pf == null) { - m3._pf = defaultParsingFlags(); - } - return m3._pf; + } + function getQuarterlyNoteSettings() { + var _a, _b, _c, _d; + const pluginManager = window.app.plugins; + try { + const settings = shouldUsePeriodicNotesSettings("quarterly") && ((_b = (_a = pluginManager.getPlugin("periodic-notes")) == null ? void 0 : _a.settings) == null ? void 0 : _b.quarterly) || {}; + return { + format: settings.format || DEFAULT_QUARTERLY_NOTE_FORMAT, + folder: ((_c = settings.folder) == null ? void 0 : _c.trim()) || "", + template: ((_d = settings.template) == null ? void 0 : _d.trim()) || "" + }; + } catch (err) { + console.info("No custom quarterly note settings found!", err); } - var some; - if (Array.prototype.some) { - some = Array.prototype.some; - } else { - some = function(fun) { - var t3 = Object(this), len = t3.length >>> 0, i3; - for (i3 = 0; i3 < len; i3++) { - if (i3 in t3 && fun.call(this, t3[i3], i3, t3)) { - return true; - } - } - return false; + } + function getYearlyNoteSettings() { + var _a, _b, _c, _d; + const pluginManager = window.app.plugins; + try { + const settings = shouldUsePeriodicNotesSettings("yearly") && ((_b = (_a = pluginManager.getPlugin("periodic-notes")) == null ? void 0 : _a.settings) == null ? void 0 : _b.yearly) || {}; + return { + format: settings.format || DEFAULT_YEARLY_NOTE_FORMAT, + folder: ((_c = settings.folder) == null ? void 0 : _c.trim()) || "", + template: ((_d = settings.template) == null ? void 0 : _d.trim()) || "" }; + } catch (err) { + console.info("No custom yearly note settings found!", err); } - function isValid(m3) { - if (m3._isValid == null) { - var flags = getParsingFlags(m3), parsedParts = some.call(flags.parsedDateParts, function(i3) { - return i3 != null; - }), isNowValid = !isNaN(m3._d.getTime()) && flags.overflow < 0 && !flags.empty && !flags.invalidEra && !flags.invalidMonth && !flags.invalidWeekday && !flags.weekdayMismatch && !flags.nullInput && !flags.invalidFormat && !flags.userInvalidated && (!flags.meridiem || flags.meridiem && parsedParts); - if (m3._strict) { - isNowValid = isNowValid && flags.charsLeftOver === 0 && flags.unusedTokens.length === 0 && flags.bigHour === void 0; - } - if (Object.isFrozen == null || !Object.isFrozen(m3)) { - m3._isValid = isNowValid; - } else { - return isNowValid; - } - } - return m3._isValid; + } + function join(...partSegments) { + let parts = []; + for (let i3 = 0, l4 = partSegments.length; i3 < l4; i3++) { + parts = parts.concat(partSegments[i3].split("/")); } - function createInvalid(flags) { - var m3 = createUTC(NaN); - if (flags != null) { - extend(getParsingFlags(m3), flags); - } else { - getParsingFlags(m3).userInvalidated = true; - } - return m3; + const newParts = []; + for (let i3 = 0, l4 = parts.length; i3 < l4; i3++) { + const part = parts[i3]; + if (!part || part === ".") + continue; + else + newParts.push(part); } - var momentProperties = hooks.momentProperties = [], updateInProgress = false; - function copyConfig(to2, from2) { - var i3, prop, val, momentPropertiesLen = momentProperties.length; - if (!isUndefined2(from2._isAMomentObject)) { - to2._isAMomentObject = from2._isAMomentObject; - } - if (!isUndefined2(from2._i)) { - to2._i = from2._i; - } - if (!isUndefined2(from2._f)) { - to2._f = from2._f; - } - if (!isUndefined2(from2._l)) { - to2._l = from2._l; - } - if (!isUndefined2(from2._strict)) { - to2._strict = from2._strict; - } - if (!isUndefined2(from2._tzm)) { - to2._tzm = from2._tzm; - } - if (!isUndefined2(from2._isUTC)) { - to2._isUTC = from2._isUTC; - } - if (!isUndefined2(from2._offset)) { - to2._offset = from2._offset; - } - if (!isUndefined2(from2._pf)) { - to2._pf = getParsingFlags(from2); - } - if (!isUndefined2(from2._locale)) { - to2._locale = from2._locale; - } - if (momentPropertiesLen > 0) { - for (i3 = 0; i3 < momentPropertiesLen; i3++) { - prop = momentProperties[i3]; - val = from2[prop]; - if (!isUndefined2(val)) { - to2[prop] = val; - } + if (parts[0] === "") + newParts.unshift(""); + return newParts.join("/"); + } + function basename(fullPath) { + let base = fullPath.substring(fullPath.lastIndexOf("/") + 1); + if (base.lastIndexOf(".") != -1) + base = base.substring(0, base.lastIndexOf(".")); + return base; + } + function ensureFolderExists(path) { + return __async(this, null, function* () { + const dirs = path.replace(/\\/g, "/").split("/"); + dirs.pop(); + if (dirs.length) { + const dir = join(...dirs); + if (!window.app.vault.getAbstractFileByPath(dir)) { + yield window.app.vault.createFolder(dir); } } - return to2; - } - function Moment(config2) { - copyConfig(this, config2); - this._d = new Date(config2._d != null ? config2._d.getTime() : NaN); - if (!this.isValid()) { - this._d = new Date(NaN); - } - if (updateInProgress === false) { - updateInProgress = true; - hooks.updateOffset(this); - updateInProgress = false; - } - } - function isMoment(obj) { - return obj instanceof Moment || obj != null && obj._isAMomentObject != null; - } - function warn(msg) { - if (hooks.suppressDeprecationWarnings === false && typeof console !== "undefined" && console.warn) { - console.warn("Deprecation warning: " + msg); + }); + } + function getNotePath(directory, filename) { + return __async(this, null, function* () { + if (!filename.endsWith(".md")) { + filename += ".md"; } - } - function deprecate(msg, fn) { - var firstTime = true; - return extend(function() { - if (hooks.deprecationHandler != null) { - hooks.deprecationHandler(null, msg); - } - if (firstTime) { - var args = [], arg, i3, key, argLen = arguments.length; - for (i3 = 0; i3 < argLen; i3++) { - arg = ""; - if (typeof arguments[i3] === "object") { - arg += "\n[" + i3 + "] "; - for (key in arguments[0]) { - if (hasOwnProp(arguments[0], key)) { - arg += key + ": " + arguments[0][key] + ", "; - } - } - arg = arg.slice(0, -2); - } else { - arg = arguments[i3]; - } - args.push(arg); - } - warn(msg + "\nArguments: " + Array.prototype.slice.call(args).join("") + "\n" + new Error().stack); - firstTime = false; - } - return fn.apply(this, arguments); - }, fn); - } - var deprecations = {}; - function deprecateSimple(name, msg) { - if (hooks.deprecationHandler != null) { - hooks.deprecationHandler(name, msg); + const path = obsidian.normalizePath(join(directory, filename)); + yield ensureFolderExists(path); + return path; + }); + } + function getTemplateInfo(template) { + return __async(this, null, function* () { + const { metadataCache, vault } = window.app; + const templatePath = obsidian.normalizePath(template); + if (templatePath === "/") { + return Promise.resolve(["", null]); } - if (!deprecations[name]) { - warn(msg); - deprecations[name] = true; + try { + const templateFile = metadataCache.getFirstLinkpathDest(templatePath, ""); + const contents = yield vault.cachedRead(templateFile); + const IFoldInfo = window.app.foldManager.load(templateFile); + return [contents, IFoldInfo]; + } catch (err) { + console.error(`Failed to read the daily note template '${templatePath}'`, err); + new obsidian.Notice("Failed to read the daily note template"); + return ["", null]; } + }); + } + function getDateUID(date, granularity = "day") { + const ts = date.clone().startOf(granularity).format(); + return `${granularity}-${ts}`; + } + function removeEscapedCharacters(format) { + return format.replace(/\[[^\]]*\]/g, ""); + } + function isFormatAmbiguous(format, granularity) { + if (granularity === "week") { + const cleanFormat = removeEscapedCharacters(format); + return /w{1,2}/i.test(cleanFormat) && (/M{1,4}/.test(cleanFormat) || /D{1,4}/.test(cleanFormat)); } - hooks.suppressDeprecationWarnings = false; - hooks.deprecationHandler = null; - function isFunction(input) { - return typeof Function !== "undefined" && input instanceof Function || Object.prototype.toString.call(input) === "[object Function]"; + return false; + } + function getDateFromFile2(file, granularity) { + return getDateFromFilename(file.basename, granularity); + } + function getDateFromPath(path, granularity) { + return getDateFromFilename(basename(path), granularity); + } + function getDateFromFilename(filename, granularity) { + const getSettings = { + day: getDailyNoteSettings3, + week: getWeeklyNoteSettings, + month: getMonthlyNoteSettings, + quarter: getQuarterlyNoteSettings, + year: getYearlyNoteSettings + }; + const format = getSettings[granularity]().format.split("/").pop(); + const noteDate = window.moment(filename, format, true); + if (!noteDate.isValid()) { + return null; } - function set(config2) { - var prop, i3; - for (i3 in config2) { - if (hasOwnProp(config2, i3)) { - prop = config2[i3]; - if (isFunction(prop)) { - this[i3] = prop; - } else { - this["_" + i3] = prop; - } + if (isFormatAmbiguous(format, granularity)) { + if (granularity === "week") { + const cleanFormat = removeEscapedCharacters(format); + if (/w{1,2}/i.test(cleanFormat)) { + return window.moment(filename, format.replace(/M{1,4}/g, "").replace(/D{1,4}/g, ""), false); } } - this._config = config2; - this._dayOfMonthOrdinalParseLenient = new RegExp((this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) + "|" + /\d{1,2}/.source); } - function mergeConfigs(parentConfig, childConfig) { - var res = extend({}, parentConfig), prop; - for (prop in childConfig) { - if (hasOwnProp(childConfig, prop)) { - if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) { - res[prop] = {}; - extend(res[prop], parentConfig[prop]); - extend(res[prop], childConfig[prop]); - } else if (childConfig[prop] != null) { - res[prop] = childConfig[prop]; - } else { - delete res[prop]; + return noteDate; + } + var DailyNotesFolderMissingError = class extends Error { + }; + function createDailyNote2(date) { + return __async(this, null, function* () { + const app = window.app; + const { vault } = app; + const moment2 = window.moment; + const { template, format, folder } = getDailyNoteSettings3(); + const [templateContents, IFoldInfo] = yield getTemplateInfo(template); + const filename = date.format(format); + const normalizedPath = yield getNotePath(folder, filename); + try { + const createdFile = yield vault.create(normalizedPath, templateContents.replace(/{{\s*date\s*}}/gi, filename).replace(/{{\s*time\s*}}/gi, moment2().format("HH:mm")).replace(/{{\s*title\s*}}/gi, filename).replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi, (_3, _timeOrDate, calc, timeDelta, unit, momentFormat) => { + const now2 = moment2(); + const currentDate = date.clone().set({ + hour: now2.get("hour"), + minute: now2.get("minute"), + second: now2.get("second") + }); + if (calc) { + currentDate.add(parseInt(timeDelta, 10), unit); } - } - } - for (prop in parentConfig) { - if (hasOwnProp(parentConfig, prop) && !hasOwnProp(childConfig, prop) && isObject(parentConfig[prop])) { - res[prop] = extend({}, res[prop]); - } + if (momentFormat) { + return currentDate.format(momentFormat.substring(1).trim()); + } + return currentDate.format(format); + }).replace(/{{\s*yesterday\s*}}/gi, date.clone().subtract(1, "day").format(format)).replace(/{{\s*tomorrow\s*}}/gi, date.clone().add(1, "d").format(format))); + app.foldManager.save(createdFile, IFoldInfo); + return createdFile; + } catch (err) { + console.error(`Failed to create file: '${normalizedPath}'`, err); + new obsidian.Notice("Unable to create new file."); } - return res; + }); + } + function getDailyNote2(date, dailyNotes) { + var _a; + return (_a = dailyNotes[getDateUID(date, "day")]) != null ? _a : null; + } + function getAllDailyNotes2() { + const { vault } = window.app; + const { folder } = getDailyNoteSettings3(); + const dailyNotesFolder = vault.getAbstractFileByPath(obsidian.normalizePath(folder)); + if (!dailyNotesFolder) { + throw new DailyNotesFolderMissingError("Failed to find daily notes folder"); } - function Locale2(config2) { - if (config2 != null) { - this.set(config2); + const dailyNotes = {}; + obsidian.Vault.recurseChildren(dailyNotesFolder, (note) => { + if (note instanceof obsidian.TFile) { + const date = getDateFromFile2(note, "day"); + if (date) { + const dateString = getDateUID(date, "day"); + dailyNotes[dateString] = note; + } } + }); + return dailyNotes; + } + var WeeklyNotesFolderMissingError = class extends Error { + }; + function getDaysOfWeek() { + const { moment: moment2 } = window; + let weekStart = moment2.localeData()._week.dow; + const daysOfWeek = [ + "sunday", + "monday", + "tuesday", + "wednesday", + "thursday", + "friday", + "saturday" + ]; + while (weekStart) { + daysOfWeek.push(daysOfWeek.shift()); + weekStart--; } - var keys; - if (Object.keys) { - keys = Object.keys; - } else { - keys = function(obj) { - var i3, res = []; - for (i3 in obj) { - if (hasOwnProp(obj, i3)) { - res.push(i3); + return daysOfWeek; + } + function getDayOfWeekNumericalValue(dayOfWeekName) { + return getDaysOfWeek().indexOf(dayOfWeekName.toLowerCase()); + } + function createWeeklyNote(date) { + return __async(this, null, function* () { + const { vault } = window.app; + const { template, format, folder } = getWeeklyNoteSettings(); + const [templateContents, IFoldInfo] = yield getTemplateInfo(template); + const filename = date.format(format); + const normalizedPath = yield getNotePath(folder, filename); + try { + const createdFile = yield vault.create(normalizedPath, templateContents.replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi, (_3, _timeOrDate, calc, timeDelta, unit, momentFormat) => { + const now2 = window.moment(); + const currentDate = date.clone().set({ + hour: now2.get("hour"), + minute: now2.get("minute"), + second: now2.get("second") + }); + if (calc) { + currentDate.add(parseInt(timeDelta, 10), unit); } - } - return res; - }; - } - var defaultCalendar = { - sameDay: "[Today at] LT", - nextDay: "[Tomorrow at] LT", - nextWeek: "dddd [at] LT", - lastDay: "[Yesterday at] LT", - lastWeek: "[Last] dddd [at] LT", - sameElse: "L" - }; - function calendar(key, mom, now3) { - var output = this._calendar[key] || this._calendar["sameElse"]; - return isFunction(output) ? output.call(mom, now3) : output; - } - function zeroFill(number, targetLength, forceSign) { - var absNumber = "" + Math.abs(number), zerosToFill = targetLength - absNumber.length, sign2 = number >= 0; - return (sign2 ? forceSign ? "+" : "" : "-") + Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber; - } - var formattingTokens = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g, localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g, formatFunctions = {}, formatTokenFunctions = {}; - function addFormatToken(token2, padded, ordinal2, callback) { - var func = callback; - if (typeof callback === "string") { - func = function() { - return this[callback](); - }; - } - if (token2) { - formatTokenFunctions[token2] = func; - } - if (padded) { - formatTokenFunctions[padded[0]] = function() { - return zeroFill(func.apply(this, arguments), padded[1], padded[2]); - }; - } - if (ordinal2) { - formatTokenFunctions[ordinal2] = function() { - return this.localeData().ordinal(func.apply(this, arguments), token2); - }; + if (momentFormat) { + return currentDate.format(momentFormat.substring(1).trim()); + } + return currentDate.format(format); + }).replace(/{{\s*title\s*}}/gi, filename).replace(/{{\s*time\s*}}/gi, window.moment().format("HH:mm")).replace(/{{\s*(sunday|monday|tuesday|wednesday|thursday|friday|saturday)\s*:(.*?)}}/gi, (_3, dayOfWeek2, momentFormat) => { + const day = getDayOfWeekNumericalValue(dayOfWeek2); + return date.weekday(day).format(momentFormat.trim()); + })); + window.app.foldManager.save(createdFile, IFoldInfo); + return createdFile; + } catch (err) { + console.error(`Failed to create file: '${normalizedPath}'`, err); + new obsidian.Notice("Unable to create new file."); } + }); + } + function getWeeklyNote(date, weeklyNotes) { + var _a; + return (_a = weeklyNotes[getDateUID(date, "week")]) != null ? _a : null; + } + function getAllWeeklyNotes() { + const weeklyNotes = {}; + if (!appHasWeeklyNotesPluginLoaded()) { + return weeklyNotes; } - function removeFormattingTokens(input) { - if (input.match(/\[[\s\S]/)) { - return input.replace(/^\[|\]$/g, ""); - } - return input.replace(/\\/g, ""); + const { vault } = window.app; + const { folder } = getWeeklyNoteSettings(); + const weeklyNotesFolder = vault.getAbstractFileByPath(obsidian.normalizePath(folder)); + if (!weeklyNotesFolder) { + throw new WeeklyNotesFolderMissingError("Failed to find weekly notes folder"); } - function makeFormatFunction(format2) { - var array = format2.match(formattingTokens), i3, length; - for (i3 = 0, length = array.length; i3 < length; i3++) { - if (formatTokenFunctions[array[i3]]) { - array[i3] = formatTokenFunctions[array[i3]]; - } else { - array[i3] = removeFormattingTokens(array[i3]); - } - } - return function(mom) { - var output = "", i4; - for (i4 = 0; i4 < length; i4++) { - output += isFunction(array[i4]) ? array[i4].call(mom, format2) : array[i4]; + obsidian.Vault.recurseChildren(weeklyNotesFolder, (note) => { + if (note instanceof obsidian.TFile) { + const date = getDateFromFile2(note, "week"); + if (date) { + const dateString = getDateUID(date, "week"); + weeklyNotes[dateString] = note; } - return output; - }; - } - function formatMoment(m3, format2) { - if (!m3.isValid()) { - return m3.localeData().invalidDate(); - } - format2 = expandFormat(format2, m3.localeData()); - formatFunctions[format2] = formatFunctions[format2] || makeFormatFunction(format2); - return formatFunctions[format2](m3); - } - function expandFormat(format2, locale2) { - var i3 = 5; - function replaceLongDateFormatTokens(input) { - return locale2.longDateFormat(input) || input; - } - localFormattingTokens.lastIndex = 0; - while (i3 >= 0 && localFormattingTokens.test(format2)) { - format2 = format2.replace(localFormattingTokens, replaceLongDateFormatTokens); - localFormattingTokens.lastIndex = 0; - i3 -= 1; - } - return format2; - } - var defaultLongDateFormat = { - LTS: "h:mm:ss A", - LT: "h:mm A", - L: "MM/DD/YYYY", - LL: "MMMM D, YYYY", - LLL: "MMMM D, YYYY h:mm A", - LLLL: "dddd, MMMM D, YYYY h:mm A" - }; - function longDateFormat(key) { - var format2 = this._longDateFormat[key], formatUpper = this._longDateFormat[key.toUpperCase()]; - if (format2 || !formatUpper) { - return format2; } - this._longDateFormat[key] = formatUpper.match(formattingTokens).map(function(tok) { - if (tok === "MMMM" || tok === "MM" || tok === "DD" || tok === "dddd") { - return tok.slice(1); - } - return tok; - }).join(""); - return this._longDateFormat[key]; - } - var defaultInvalidDate = "Invalid date"; - function invalidDate() { - return this._invalidDate; - } - var defaultOrdinal = "%d", defaultDayOfMonthOrdinalParse = /\d{1,2}/; - function ordinal(number) { - return this._ordinal.replace("%d", number); - } - var defaultRelativeTime = { - future: "in %s", - past: "%s ago", - s: "a few seconds", - ss: "%d seconds", - m: "a minute", - mm: "%d minutes", - h: "an hour", - hh: "%d hours", - d: "a day", - dd: "%d days", - w: "a week", - ww: "%d weeks", - M: "a month", - MM: "%d months", - y: "a year", - yy: "%d years" - }; - function relativeTime(number, withoutSuffix, string, isFuture) { - var output = this._relativeTime[string]; - return isFunction(output) ? output(number, withoutSuffix, string, isFuture) : output.replace(/%d/i, number); - } - function pastFuture(diff2, output) { - var format2 = this._relativeTime[diff2 > 0 ? "future" : "past"]; - return isFunction(format2) ? format2(output) : format2.replace(/%s/i, output); - } - var aliases = {}; - function addUnitAlias(unit, shorthand) { - var lowerCase = unit.toLowerCase(); - aliases[lowerCase] = aliases[lowerCase + "s"] = aliases[shorthand] = unit; - } - function normalizeUnits(units) { - return typeof units === "string" ? aliases[units] || aliases[units.toLowerCase()] : void 0; - } - function normalizeObjectUnits(inputObject) { - var normalizedInput = {}, normalizedProp, prop; - for (prop in inputObject) { - if (hasOwnProp(inputObject, prop)) { - normalizedProp = normalizeUnits(prop); - if (normalizedProp) { - normalizedInput[normalizedProp] = inputObject[prop]; + }); + return weeklyNotes; + } + var MonthlyNotesFolderMissingError = class extends Error { + }; + function createMonthlyNote(date) { + return __async(this, null, function* () { + const { vault } = window.app; + const { template, format, folder } = getMonthlyNoteSettings(); + const [templateContents, IFoldInfo] = yield getTemplateInfo(template); + const filename = date.format(format); + const normalizedPath = yield getNotePath(folder, filename); + try { + const createdFile = yield vault.create(normalizedPath, templateContents.replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi, (_3, _timeOrDate, calc, timeDelta, unit, momentFormat) => { + const now2 = window.moment(); + const currentDate = date.clone().set({ + hour: now2.get("hour"), + minute: now2.get("minute"), + second: now2.get("second") + }); + if (calc) { + currentDate.add(parseInt(timeDelta, 10), unit); } - } + if (momentFormat) { + return currentDate.format(momentFormat.substring(1).trim()); + } + return currentDate.format(format); + }).replace(/{{\s*date\s*}}/gi, filename).replace(/{{\s*time\s*}}/gi, window.moment().format("HH:mm")).replace(/{{\s*title\s*}}/gi, filename)); + window.app.foldManager.save(createdFile, IFoldInfo); + return createdFile; + } catch (err) { + console.error(`Failed to create file: '${normalizedPath}'`, err); + new obsidian.Notice("Unable to create new file."); } - return normalizedInput; + }); + } + function getMonthlyNote(date, monthlyNotes) { + var _a; + return (_a = monthlyNotes[getDateUID(date, "month")]) != null ? _a : null; + } + function getAllMonthlyNotes() { + const monthlyNotes = {}; + if (!appHasMonthlyNotesPluginLoaded()) { + return monthlyNotes; } - var priorities = {}; - function addUnitPriority(unit, priority) { - priorities[unit] = priority; + const { vault } = window.app; + const { folder } = getMonthlyNoteSettings(); + const monthlyNotesFolder = vault.getAbstractFileByPath(obsidian.normalizePath(folder)); + if (!monthlyNotesFolder) { + throw new MonthlyNotesFolderMissingError("Failed to find monthly notes folder"); } - function getPrioritizedUnits(unitsObj) { - var units = [], u3; - for (u3 in unitsObj) { - if (hasOwnProp(unitsObj, u3)) { - units.push({ unit: u3, priority: priorities[u3] }); + obsidian.Vault.recurseChildren(monthlyNotesFolder, (note) => { + if (note instanceof obsidian.TFile) { + const date = getDateFromFile2(note, "month"); + if (date) { + const dateString = getDateUID(date, "month"); + monthlyNotes[dateString] = note; } } - units.sort(function(a3, b3) { - return a3.priority - b3.priority; - }); - return units; - } - function isLeapYear2(year) { - return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0; - } - function absFloor(number) { - if (number < 0) { - return Math.ceil(number) || 0; - } else { - return Math.floor(number); - } - } - function toInt(argumentForCoercion) { - var coercedNumber = +argumentForCoercion, value = 0; - if (coercedNumber !== 0 && isFinite(coercedNumber)) { - value = absFloor(coercedNumber); - } - return value; - } - function makeGetSet(unit, keepTime) { - return function(value) { - if (value != null) { - set$1(this, unit, value); - hooks.updateOffset(this, keepTime); - return this; - } else { - return get(this, unit); - } - }; - } - function get(mom, unit) { - return mom.isValid() ? mom._d["get" + (mom._isUTC ? "UTC" : "") + unit]() : NaN; - } - function set$1(mom, unit, value) { - if (mom.isValid() && !isNaN(value)) { - if (unit === "FullYear" && isLeapYear2(mom.year()) && mom.month() === 1 && mom.date() === 29) { - value = toInt(value); - mom._d["set" + (mom._isUTC ? "UTC" : "") + unit](value, mom.month(), daysInMonth2(value, mom.month())); - } else { - mom._d["set" + (mom._isUTC ? "UTC" : "") + unit](value); - } + }); + return monthlyNotes; + } + var QuarterlyNotesFolderMissingError = class extends Error { + }; + function createQuarterlyNote(date) { + return __async(this, null, function* () { + const { vault } = window.app; + const { template, format, folder } = getQuarterlyNoteSettings(); + const [templateContents, IFoldInfo] = yield getTemplateInfo(template); + const filename = date.format(format); + const normalizedPath = yield getNotePath(folder, filename); + try { + const createdFile = yield vault.create(normalizedPath, templateContents.replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi, (_3, _timeOrDate, calc, timeDelta, unit, momentFormat) => { + const now2 = window.moment(); + const currentDate = date.clone().set({ + hour: now2.get("hour"), + minute: now2.get("minute"), + second: now2.get("second") + }); + if (calc) { + currentDate.add(parseInt(timeDelta, 10), unit); + } + if (momentFormat) { + return currentDate.format(momentFormat.substring(1).trim()); + } + return currentDate.format(format); + }).replace(/{{\s*date\s*}}/gi, filename).replace(/{{\s*time\s*}}/gi, window.moment().format("HH:mm")).replace(/{{\s*title\s*}}/gi, filename)); + window.app.foldManager.save(createdFile, IFoldInfo); + return createdFile; + } catch (err) { + console.error(`Failed to create file: '${normalizedPath}'`, err); + new obsidian.Notice("Unable to create new file."); } + }); + } + function getQuarterlyNote(date, quarterly) { + var _a; + return (_a = quarterly[getDateUID(date, "quarter")]) != null ? _a : null; + } + function getAllQuarterlyNotes() { + const quarterly = {}; + if (!appHasQuarterlyNotesPluginLoaded()) { + return quarterly; } - function stringGet(units) { - units = normalizeUnits(units); - if (isFunction(this[units])) { - return this[units](); - } - return this; + const { vault } = window.app; + const { folder } = getQuarterlyNoteSettings(); + const quarterlyFolder = vault.getAbstractFileByPath(obsidian.normalizePath(folder)); + if (!quarterlyFolder) { + throw new QuarterlyNotesFolderMissingError("Failed to find quarterly notes folder"); } - function stringSet(units, value) { - if (typeof units === "object") { - units = normalizeObjectUnits(units); - var prioritized = getPrioritizedUnits(units), i3, prioritizedLen = prioritized.length; - for (i3 = 0; i3 < prioritizedLen; i3++) { - this[prioritized[i3].unit](units[prioritized[i3].unit]); - } - } else { - units = normalizeUnits(units); - if (isFunction(this[units])) { - return this[units](value); + obsidian.Vault.recurseChildren(quarterlyFolder, (note) => { + if (note instanceof obsidian.TFile) { + const date = getDateFromFile2(note, "quarter"); + if (date) { + const dateString = getDateUID(date, "quarter"); + quarterly[dateString] = note; } } - return this; - } - var match1 = /\d/, match2 = /\d\d/, match3 = /\d{3}/, match4 = /\d{4}/, match6 = /[+-]?\d{6}/, match1to2 = /\d\d?/, match3to4 = /\d\d\d\d?/, match5to6 = /\d\d\d\d\d\d?/, match1to3 = /\d{1,3}/, match1to4 = /\d{1,4}/, match1to6 = /[+-]?\d{1,6}/, matchUnsigned = /\d+/, matchSigned = /[+-]?\d+/, matchOffset = /Z|[+-]\d\d:?\d\d/gi, matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi, matchTimestamp = /[+-]?\d+(\.\d{1,3})?/, matchWord = /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i, regexes; - regexes = {}; - function addRegexToken(token2, regex, strictRegex) { - regexes[token2] = isFunction(regex) ? regex : function(isStrict, localeData2) { - return isStrict && strictRegex ? strictRegex : regex; - }; - } - function getParseRegexForToken(token2, config2) { - if (!hasOwnProp(regexes, token2)) { - return new RegExp(unescapeFormat(token2)); - } - return regexes[token2](config2._strict, config2._locale); - } - function unescapeFormat(s4) { - return regexEscape(s4.replace("\\", "").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function(matched, p1, p22, p3, p4) { - return p1 || p22 || p3 || p4; - })); - } - function regexEscape(s4) { - return s4.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&"); - } - var tokens = {}; - function addParseToken(token2, callback) { - var i3, func = callback, tokenLen; - if (typeof token2 === "string") { - token2 = [token2]; - } - if (isNumber2(callback)) { - func = function(input, array) { - array[callback] = toInt(input); - }; - } - tokenLen = token2.length; - for (i3 = 0; i3 < tokenLen; i3++) { - tokens[token2[i3]] = func; - } - } - function addWeekParseToken(token2, callback) { - addParseToken(token2, function(input, array, config2, token3) { - config2._w = config2._w || {}; - callback(input, config2._w, config2, token3); - }); - } - function addTimeToArrayFromToken(token2, input, config2) { - if (input != null && hasOwnProp(tokens, token2)) { - tokens[token2](input, config2._a, config2, token2); + }); + return quarterly; + } + var YearlyNotesFolderMissingError = class extends Error { + }; + function createYearlyNote(date) { + return __async(this, null, function* () { + const { vault } = window.app; + const { template, format, folder } = getYearlyNoteSettings(); + const [templateContents, IFoldInfo] = yield getTemplateInfo(template); + const filename = date.format(format); + const normalizedPath = yield getNotePath(folder, filename); + try { + const createdFile = yield vault.create(normalizedPath, templateContents.replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi, (_3, _timeOrDate, calc, timeDelta, unit, momentFormat) => { + const now2 = window.moment(); + const currentDate = date.clone().set({ + hour: now2.get("hour"), + minute: now2.get("minute"), + second: now2.get("second") + }); + if (calc) { + currentDate.add(parseInt(timeDelta, 10), unit); + } + if (momentFormat) { + return currentDate.format(momentFormat.substring(1).trim()); + } + return currentDate.format(format); + }).replace(/{{\s*date\s*}}/gi, filename).replace(/{{\s*time\s*}}/gi, window.moment().format("HH:mm")).replace(/{{\s*title\s*}}/gi, filename)); + window.app.foldManager.save(createdFile, IFoldInfo); + return createdFile; + } catch (err) { + console.error(`Failed to create file: '${normalizedPath}'`, err); + new obsidian.Notice("Unable to create new file."); } + }); + } + function getYearlyNote(date, yearlyNotes) { + var _a; + return (_a = yearlyNotes[getDateUID(date, "year")]) != null ? _a : null; + } + function getAllYearlyNotes() { + const yearlyNotes = {}; + if (!appHasYearlyNotesPluginLoaded()) { + return yearlyNotes; } - var YEAR = 0, MONTH = 1, DATE = 2, HOUR = 3, MINUTE = 4, SECOND = 5, MILLISECOND = 6, WEEK = 7, WEEKDAY = 8; - function mod(n3, x4) { - return (n3 % x4 + x4) % x4; + const { vault } = window.app; + const { folder } = getYearlyNoteSettings(); + const yearlyNotesFolder = vault.getAbstractFileByPath(obsidian.normalizePath(folder)); + if (!yearlyNotesFolder) { + throw new YearlyNotesFolderMissingError("Failed to find yearly notes folder"); } - var indexOf; - if (Array.prototype.indexOf) { - indexOf = Array.prototype.indexOf; - } else { - indexOf = function(o2) { - var i3; - for (i3 = 0; i3 < this.length; ++i3) { - if (this[i3] === o2) { - return i3; - } + obsidian.Vault.recurseChildren(yearlyNotesFolder, (note) => { + if (note instanceof obsidian.TFile) { + const date = getDateFromFile2(note, "year"); + if (date) { + const dateString = getDateUID(date, "year"); + yearlyNotes[dateString] = note; } - return -1; - }; - } - function daysInMonth2(year, month) { - if (isNaN(year) || isNaN(month)) { - return NaN; } - var modMonth = mod(month, 12); - year += (month - modMonth) / 12; - return modMonth === 1 ? isLeapYear2(year) ? 29 : 28 : 31 - modMonth % 7 % 2; - } - addFormatToken("M", ["MM", 2], "Mo", function() { - return this.month() + 1; }); - addFormatToken("MMM", 0, 0, function(format2) { - return this.localeData().monthsShort(this, format2); - }); - addFormatToken("MMMM", 0, 0, function(format2) { - return this.localeData().months(this, format2); - }); - addUnitAlias("month", "M"); - addUnitPriority("month", 8); - addRegexToken("M", match1to2); - addRegexToken("MM", match1to2, match2); - addRegexToken("MMM", function(isStrict, locale2) { - return locale2.monthsShortRegex(isStrict); - }); - addRegexToken("MMMM", function(isStrict, locale2) { - return locale2.monthsRegex(isStrict); - }); - addParseToken(["M", "MM"], function(input, array) { - array[MONTH] = toInt(input) - 1; - }); - addParseToken(["MMM", "MMMM"], function(input, array, config2, token2) { - var month = config2._locale.monthsParse(input, token2, config2._strict); - if (month != null) { - array[MONTH] = month; + return yearlyNotes; + } + function appHasDailyNotesPluginLoaded2() { + var _a, _b; + const { app } = window; + const dailyNotesPlugin = app.internalPlugins.plugins["daily-notes"]; + if (dailyNotesPlugin && dailyNotesPlugin.enabled) { + return true; + } + const periodicNotes = app.plugins.getPlugin("periodic-notes"); + return periodicNotes && ((_b = (_a = periodicNotes.settings) == null ? void 0 : _a.daily) == null ? void 0 : _b.enabled); + } + function appHasWeeklyNotesPluginLoaded() { + var _a, _b; + const { app } = window; + if (app.plugins.getPlugin("calendar")) { + return true; + } + const periodicNotes = app.plugins.getPlugin("periodic-notes"); + return periodicNotes && ((_b = (_a = periodicNotes.settings) == null ? void 0 : _a.weekly) == null ? void 0 : _b.enabled); + } + function appHasMonthlyNotesPluginLoaded() { + var _a, _b; + const { app } = window; + const periodicNotes = app.plugins.getPlugin("periodic-notes"); + return periodicNotes && ((_b = (_a = periodicNotes.settings) == null ? void 0 : _a.monthly) == null ? void 0 : _b.enabled); + } + function appHasQuarterlyNotesPluginLoaded() { + var _a, _b; + const { app } = window; + const periodicNotes = app.plugins.getPlugin("periodic-notes"); + return periodicNotes && ((_b = (_a = periodicNotes.settings) == null ? void 0 : _a.quarterly) == null ? void 0 : _b.enabled); + } + function appHasYearlyNotesPluginLoaded() { + var _a, _b; + const { app } = window; + const periodicNotes = app.plugins.getPlugin("periodic-notes"); + return periodicNotes && ((_b = (_a = periodicNotes.settings) == null ? void 0 : _a.yearly) == null ? void 0 : _b.enabled); + } + function getPeriodicNoteSettings(granularity) { + const getSettings = { + day: getDailyNoteSettings3, + week: getWeeklyNoteSettings, + month: getMonthlyNoteSettings, + quarter: getQuarterlyNoteSettings, + year: getYearlyNoteSettings + }[granularity]; + return getSettings(); + } + function createPeriodicNote(granularity, date) { + const createFn = { + day: createDailyNote2, + month: createMonthlyNote, + week: createWeeklyNote + }; + return createFn[granularity](date); + } + exports.DEFAULT_DAILY_NOTE_FORMAT = DEFAULT_DAILY_NOTE_FORMAT; + exports.DEFAULT_MONTHLY_NOTE_FORMAT = DEFAULT_MONTHLY_NOTE_FORMAT; + exports.DEFAULT_QUARTERLY_NOTE_FORMAT = DEFAULT_QUARTERLY_NOTE_FORMAT; + exports.DEFAULT_WEEKLY_NOTE_FORMAT = DEFAULT_WEEKLY_NOTE_FORMAT; + exports.DEFAULT_YEARLY_NOTE_FORMAT = DEFAULT_YEARLY_NOTE_FORMAT; + exports.appHasDailyNotesPluginLoaded = appHasDailyNotesPluginLoaded2; + exports.appHasMonthlyNotesPluginLoaded = appHasMonthlyNotesPluginLoaded; + exports.appHasQuarterlyNotesPluginLoaded = appHasQuarterlyNotesPluginLoaded; + exports.appHasWeeklyNotesPluginLoaded = appHasWeeklyNotesPluginLoaded; + exports.appHasYearlyNotesPluginLoaded = appHasYearlyNotesPluginLoaded; + exports.createDailyNote = createDailyNote2; + exports.createMonthlyNote = createMonthlyNote; + exports.createPeriodicNote = createPeriodicNote; + exports.createQuarterlyNote = createQuarterlyNote; + exports.createWeeklyNote = createWeeklyNote; + exports.createYearlyNote = createYearlyNote; + exports.getAllDailyNotes = getAllDailyNotes2; + exports.getAllMonthlyNotes = getAllMonthlyNotes; + exports.getAllQuarterlyNotes = getAllQuarterlyNotes; + exports.getAllWeeklyNotes = getAllWeeklyNotes; + exports.getAllYearlyNotes = getAllYearlyNotes; + exports.getDailyNote = getDailyNote2; + exports.getDailyNoteSettings = getDailyNoteSettings3; + exports.getDateFromFile = getDateFromFile2; + exports.getDateFromPath = getDateFromPath; + exports.getDateUID = getDateUID; + exports.getMonthlyNote = getMonthlyNote; + exports.getMonthlyNoteSettings = getMonthlyNoteSettings; + exports.getPeriodicNoteSettings = getPeriodicNoteSettings; + exports.getQuarterlyNote = getQuarterlyNote; + exports.getQuarterlyNoteSettings = getQuarterlyNoteSettings; + exports.getTemplateInfo = getTemplateInfo; + exports.getWeeklyNote = getWeeklyNote; + exports.getWeeklyNoteSettings = getWeeklyNoteSettings; + exports.getYearlyNote = getYearlyNote; + exports.getYearlyNoteSettings = getYearlyNoteSettings; + } +}); + +// node_modules/color-name/index.js +var require_color_name = __commonJS({ + "node_modules/color-name/index.js"(exports, module2) { + "use strict"; + module2.exports = { + "aliceblue": [240, 248, 255], + "antiquewhite": [250, 235, 215], + "aqua": [0, 255, 255], + "aquamarine": [127, 255, 212], + "azure": [240, 255, 255], + "beige": [245, 245, 220], + "bisque": [255, 228, 196], + "black": [0, 0, 0], + "blanchedalmond": [255, 235, 205], + "blue": [0, 0, 255], + "blueviolet": [138, 43, 226], + "brown": [165, 42, 42], + "burlywood": [222, 184, 135], + "cadetblue": [95, 158, 160], + "chartreuse": [127, 255, 0], + "chocolate": [210, 105, 30], + "coral": [255, 127, 80], + "cornflowerblue": [100, 149, 237], + "cornsilk": [255, 248, 220], + "crimson": [220, 20, 60], + "cyan": [0, 255, 255], + "darkblue": [0, 0, 139], + "darkcyan": [0, 139, 139], + "darkgoldenrod": [184, 134, 11], + "darkgray": [169, 169, 169], + "darkgreen": [0, 100, 0], + "darkgrey": [169, 169, 169], + "darkkhaki": [189, 183, 107], + "darkmagenta": [139, 0, 139], + "darkolivegreen": [85, 107, 47], + "darkorange": [255, 140, 0], + "darkorchid": [153, 50, 204], + "darkred": [139, 0, 0], + "darksalmon": [233, 150, 122], + "darkseagreen": [143, 188, 143], + "darkslateblue": [72, 61, 139], + "darkslategray": [47, 79, 79], + "darkslategrey": [47, 79, 79], + "darkturquoise": [0, 206, 209], + "darkviolet": [148, 0, 211], + "deeppink": [255, 20, 147], + "deepskyblue": [0, 191, 255], + "dimgray": [105, 105, 105], + "dimgrey": [105, 105, 105], + "dodgerblue": [30, 144, 255], + "firebrick": [178, 34, 34], + "floralwhite": [255, 250, 240], + "forestgreen": [34, 139, 34], + "fuchsia": [255, 0, 255], + "gainsboro": [220, 220, 220], + "ghostwhite": [248, 248, 255], + "gold": [255, 215, 0], + "goldenrod": [218, 165, 32], + "gray": [128, 128, 128], + "green": [0, 128, 0], + "greenyellow": [173, 255, 47], + "grey": [128, 128, 128], + "honeydew": [240, 255, 240], + "hotpink": [255, 105, 180], + "indianred": [205, 92, 92], + "indigo": [75, 0, 130], + "ivory": [255, 255, 240], + "khaki": [240, 230, 140], + "lavender": [230, 230, 250], + "lavenderblush": [255, 240, 245], + "lawngreen": [124, 252, 0], + "lemonchiffon": [255, 250, 205], + "lightblue": [173, 216, 230], + "lightcoral": [240, 128, 128], + "lightcyan": [224, 255, 255], + "lightgoldenrodyellow": [250, 250, 210], + "lightgray": [211, 211, 211], + "lightgreen": [144, 238, 144], + "lightgrey": [211, 211, 211], + "lightpink": [255, 182, 193], + "lightsalmon": [255, 160, 122], + "lightseagreen": [32, 178, 170], + "lightskyblue": [135, 206, 250], + "lightslategray": [119, 136, 153], + "lightslategrey": [119, 136, 153], + "lightsteelblue": [176, 196, 222], + "lightyellow": [255, 255, 224], + "lime": [0, 255, 0], + "limegreen": [50, 205, 50], + "linen": [250, 240, 230], + "magenta": [255, 0, 255], + "maroon": [128, 0, 0], + "mediumaquamarine": [102, 205, 170], + "mediumblue": [0, 0, 205], + "mediumorchid": [186, 85, 211], + "mediumpurple": [147, 112, 219], + "mediumseagreen": [60, 179, 113], + "mediumslateblue": [123, 104, 238], + "mediumspringgreen": [0, 250, 154], + "mediumturquoise": [72, 209, 204], + "mediumvioletred": [199, 21, 133], + "midnightblue": [25, 25, 112], + "mintcream": [245, 255, 250], + "mistyrose": [255, 228, 225], + "moccasin": [255, 228, 181], + "navajowhite": [255, 222, 173], + "navy": [0, 0, 128], + "oldlace": [253, 245, 230], + "olive": [128, 128, 0], + "olivedrab": [107, 142, 35], + "orange": [255, 165, 0], + "orangered": [255, 69, 0], + "orchid": [218, 112, 214], + "palegoldenrod": [238, 232, 170], + "palegreen": [152, 251, 152], + "paleturquoise": [175, 238, 238], + "palevioletred": [219, 112, 147], + "papayawhip": [255, 239, 213], + "peachpuff": [255, 218, 185], + "peru": [205, 133, 63], + "pink": [255, 192, 203], + "plum": [221, 160, 221], + "powderblue": [176, 224, 230], + "purple": [128, 0, 128], + "rebeccapurple": [102, 51, 153], + "red": [255, 0, 0], + "rosybrown": [188, 143, 143], + "royalblue": [65, 105, 225], + "saddlebrown": [139, 69, 19], + "salmon": [250, 128, 114], + "sandybrown": [244, 164, 96], + "seagreen": [46, 139, 87], + "seashell": [255, 245, 238], + "sienna": [160, 82, 45], + "silver": [192, 192, 192], + "skyblue": [135, 206, 235], + "slateblue": [106, 90, 205], + "slategray": [112, 128, 144], + "slategrey": [112, 128, 144], + "snow": [255, 250, 250], + "springgreen": [0, 255, 127], + "steelblue": [70, 130, 180], + "tan": [210, 180, 140], + "teal": [0, 128, 128], + "thistle": [216, 191, 216], + "tomato": [255, 99, 71], + "turquoise": [64, 224, 208], + "violet": [238, 130, 238], + "wheat": [245, 222, 179], + "white": [255, 255, 255], + "whitesmoke": [245, 245, 245], + "yellow": [255, 255, 0], + "yellowgreen": [154, 205, 50] + }; + } +}); + +// node_modules/simple-swizzle/node_modules/is-arrayish/index.js +var require_is_arrayish = __commonJS({ + "node_modules/simple-swizzle/node_modules/is-arrayish/index.js"(exports, module2) { + module2.exports = function isArrayish(obj) { + if (!obj || typeof obj === "string") { + return false; + } + return obj instanceof Array || Array.isArray(obj) || obj.length >= 0 && (obj.splice instanceof Function || Object.getOwnPropertyDescriptor(obj, obj.length - 1) && obj.constructor.name !== "String"); + }; + } +}); + +// node_modules/simple-swizzle/index.js +var require_simple_swizzle = __commonJS({ + "node_modules/simple-swizzle/index.js"(exports, module2) { + "use strict"; + var isArrayish = require_is_arrayish(); + var concat = Array.prototype.concat; + var slice = Array.prototype.slice; + var swizzle = module2.exports = function swizzle2(args) { + var results = []; + for (var i3 = 0, len = args.length; i3 < len; i3++) { + var arg = args[i3]; + if (isArrayish(arg)) { + results = concat.call(results, slice.call(arg)); } else { - getParsingFlags(config2).invalidMonth = input; - } - }); - var defaultLocaleMonths = "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), defaultLocaleMonthsShort = "Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"), MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/, defaultMonthsShortRegex = matchWord, defaultMonthsRegex = matchWord; - function localeMonths(m3, format2) { - if (!m3) { - return isArray(this._months) ? this._months : this._months["standalone"]; + results.push(arg); } - return isArray(this._months) ? this._months[m3.month()] : this._months[(this._months.isFormat || MONTHS_IN_FORMAT).test(format2) ? "format" : "standalone"][m3.month()]; } - function localeMonthsShort(m3, format2) { - if (!m3) { - return isArray(this._monthsShort) ? this._monthsShort : this._monthsShort["standalone"]; - } - return isArray(this._monthsShort) ? this._monthsShort[m3.month()] : this._monthsShort[MONTHS_IN_FORMAT.test(format2) ? "format" : "standalone"][m3.month()]; + return results; + }; + swizzle.wrap = function(fn) { + return function() { + return fn(swizzle(arguments)); + }; + }; + } +}); + +// node_modules/color-string/index.js +var require_color_string = __commonJS({ + "node_modules/color-string/index.js"(exports, module2) { + var colorNames = require_color_name(); + var swizzle = require_simple_swizzle(); + var hasOwnProperty3 = Object.hasOwnProperty; + var reverseNames = Object.create(null); + for (name in colorNames) { + if (hasOwnProperty3.call(colorNames, name)) { + reverseNames[colorNames[name]] = name; } - function handleStrictParse(monthName, format2, strict) { - var i3, ii, mom, llc = monthName.toLocaleLowerCase(); - if (!this._monthsParse) { - this._monthsParse = []; - this._longMonthsParse = []; - this._shortMonthsParse = []; - for (i3 = 0; i3 < 12; ++i3) { - mom = createUTC([2e3, i3]); - this._shortMonthsParse[i3] = this.monthsShort(mom, "").toLocaleLowerCase(); - this._longMonthsParse[i3] = this.months(mom, "").toLocaleLowerCase(); - } + } + var name; + var cs = module2.exports = { + to: {}, + get: {} + }; + cs.get = function(string) { + var prefix = string.substring(0, 3).toLowerCase(); + var val; + var model; + switch (prefix) { + case "hsl": + val = cs.get.hsl(string); + model = "hsl"; + break; + case "hwb": + val = cs.get.hwb(string); + model = "hwb"; + break; + default: + val = cs.get.rgb(string); + model = "rgb"; + break; + } + if (!val) { + return null; + } + return { model, value: val }; + }; + cs.get.rgb = function(string) { + if (!string) { + return null; + } + var abbr = /^#([a-f0-9]{3,4})$/i; + var hex = /^#([a-f0-9]{6})([a-f0-9]{2})?$/i; + var rgba = /^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/; + var per = /^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/; + var keyword = /^(\w+)$/; + var rgb = [0, 0, 0, 1]; + var match2; + var i3; + var hexAlpha; + if (match2 = string.match(hex)) { + hexAlpha = match2[2]; + match2 = match2[1]; + for (i3 = 0; i3 < 3; i3++) { + var i22 = i3 * 2; + rgb[i3] = parseInt(match2.slice(i22, i22 + 2), 16); } - if (strict) { - if (format2 === "MMM") { - ii = indexOf.call(this._shortMonthsParse, llc); - return ii !== -1 ? ii : null; - } else { - ii = indexOf.call(this._longMonthsParse, llc); - return ii !== -1 ? ii : null; - } - } else { - if (format2 === "MMM") { - ii = indexOf.call(this._shortMonthsParse, llc); - if (ii !== -1) { - return ii; - } - ii = indexOf.call(this._longMonthsParse, llc); - return ii !== -1 ? ii : null; - } else { - ii = indexOf.call(this._longMonthsParse, llc); - if (ii !== -1) { - return ii; - } - ii = indexOf.call(this._shortMonthsParse, llc); - return ii !== -1 ? ii : null; - } + if (hexAlpha) { + rgb[3] = parseInt(hexAlpha, 16) / 255; } - } - function localeMonthsParse(monthName, format2, strict) { - var i3, mom, regex; - if (this._monthsParseExact) { - return handleStrictParse.call(this, monthName, format2, strict); + } else if (match2 = string.match(abbr)) { + match2 = match2[1]; + hexAlpha = match2[3]; + for (i3 = 0; i3 < 3; i3++) { + rgb[i3] = parseInt(match2[i3] + match2[i3], 16); } - if (!this._monthsParse) { - this._monthsParse = []; - this._longMonthsParse = []; - this._shortMonthsParse = []; + if (hexAlpha) { + rgb[3] = parseInt(hexAlpha + hexAlpha, 16) / 255; } - for (i3 = 0; i3 < 12; i3++) { - mom = createUTC([2e3, i3]); - if (strict && !this._longMonthsParse[i3]) { - this._longMonthsParse[i3] = new RegExp("^" + this.months(mom, "").replace(".", "") + "$", "i"); - this._shortMonthsParse[i3] = new RegExp("^" + this.monthsShort(mom, "").replace(".", "") + "$", "i"); - } - if (!strict && !this._monthsParse[i3]) { - regex = "^" + this.months(mom, "") + "|^" + this.monthsShort(mom, ""); - this._monthsParse[i3] = new RegExp(regex.replace(".", ""), "i"); - } - if (strict && format2 === "MMMM" && this._longMonthsParse[i3].test(monthName)) { - return i3; - } else if (strict && format2 === "MMM" && this._shortMonthsParse[i3].test(monthName)) { - return i3; - } else if (!strict && this._monthsParse[i3].test(monthName)) { - return i3; + } else if (match2 = string.match(rgba)) { + for (i3 = 0; i3 < 3; i3++) { + rgb[i3] = parseInt(match2[i3 + 1], 0); + } + if (match2[4]) { + if (match2[5]) { + rgb[3] = parseFloat(match2[4]) * 0.01; + } else { + rgb[3] = parseFloat(match2[4]); } } - } - function setMonth(mom, value) { - var dayOfMonth; - if (!mom.isValid()) { - return mom; + } else if (match2 = string.match(per)) { + for (i3 = 0; i3 < 3; i3++) { + rgb[i3] = Math.round(parseFloat(match2[i3 + 1]) * 2.55); } - if (typeof value === "string") { - if (/^\d+$/.test(value)) { - value = toInt(value); + if (match2[4]) { + if (match2[5]) { + rgb[3] = parseFloat(match2[4]) * 0.01; } else { - value = mom.localeData().monthsParse(value); - if (!isNumber2(value)) { - return mom; - } + rgb[3] = parseFloat(match2[4]); } } - dayOfMonth = Math.min(mom.date(), daysInMonth2(mom.year(), value)); - mom._d["set" + (mom._isUTC ? "UTC" : "") + "Month"](value, dayOfMonth); - return mom; - } - function getSetMonth(value) { - if (value != null) { - setMonth(this, value); - hooks.updateOffset(this, true); - return this; - } else { - return get(this, "Month"); + } else if (match2 = string.match(keyword)) { + if (match2[1] === "transparent") { + return [0, 0, 0, 0]; + } + if (!hasOwnProperty3.call(colorNames, match2[1])) { + return null; } + rgb = colorNames[match2[1]]; + rgb[3] = 1; + return rgb; + } else { + return null; } - function getDaysInMonth() { - return daysInMonth2(this.year(), this.month()); + for (i3 = 0; i3 < 3; i3++) { + rgb[i3] = clamp(rgb[i3], 0, 255); } - function monthsShortRegex(isStrict) { - if (this._monthsParseExact) { - if (!hasOwnProp(this, "_monthsRegex")) { - computeMonthsParse.call(this); - } - if (isStrict) { - return this._monthsShortStrictRegex; - } else { - return this._monthsShortRegex; - } - } else { - if (!hasOwnProp(this, "_monthsShortRegex")) { - this._monthsShortRegex = defaultMonthsShortRegex; - } - return this._monthsShortStrictRegex && isStrict ? this._monthsShortStrictRegex : this._monthsShortRegex; - } + rgb[3] = clamp(rgb[3], 0, 1); + return rgb; + }; + cs.get.hsl = function(string) { + if (!string) { + return null; } - function monthsRegex(isStrict) { - if (this._monthsParseExact) { - if (!hasOwnProp(this, "_monthsRegex")) { - computeMonthsParse.call(this); - } - if (isStrict) { - return this._monthsStrictRegex; - } else { - return this._monthsRegex; - } - } else { - if (!hasOwnProp(this, "_monthsRegex")) { - this._monthsRegex = defaultMonthsRegex; - } - return this._monthsStrictRegex && isStrict ? this._monthsStrictRegex : this._monthsRegex; - } - } - function computeMonthsParse() { - function cmpLenRev(a3, b3) { - return b3.length - a3.length; - } - var shortPieces = [], longPieces = [], mixedPieces = [], i3, mom; - for (i3 = 0; i3 < 12; i3++) { - mom = createUTC([2e3, i3]); - shortPieces.push(this.monthsShort(mom, "")); - longPieces.push(this.months(mom, "")); - mixedPieces.push(this.months(mom, "")); - mixedPieces.push(this.monthsShort(mom, "")); - } - shortPieces.sort(cmpLenRev); - longPieces.sort(cmpLenRev); - mixedPieces.sort(cmpLenRev); - for (i3 = 0; i3 < 12; i3++) { - shortPieces[i3] = regexEscape(shortPieces[i3]); - longPieces[i3] = regexEscape(longPieces[i3]); - } - for (i3 = 0; i3 < 24; i3++) { - mixedPieces[i3] = regexEscape(mixedPieces[i3]); - } - this._monthsRegex = new RegExp("^(" + mixedPieces.join("|") + ")", "i"); - this._monthsShortRegex = this._monthsRegex; - this._monthsStrictRegex = new RegExp("^(" + longPieces.join("|") + ")", "i"); - this._monthsShortStrictRegex = new RegExp("^(" + shortPieces.join("|") + ")", "i"); + var hsl = /^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/; + var match2 = string.match(hsl); + if (match2) { + var alpha = parseFloat(match2[4]); + var h3 = (parseFloat(match2[1]) % 360 + 360) % 360; + var s4 = clamp(parseFloat(match2[2]), 0, 100); + var l4 = clamp(parseFloat(match2[3]), 0, 100); + var a3 = clamp(isNaN(alpha) ? 1 : alpha, 0, 1); + return [h3, s4, l4, a3]; } - addFormatToken("Y", 0, 0, function() { - var y3 = this.year(); - return y3 <= 9999 ? zeroFill(y3, 4) : "+" + y3; - }); - addFormatToken(0, ["YY", 2], 0, function() { - return this.year() % 100; - }); - addFormatToken(0, ["YYYY", 4], 0, "year"); - addFormatToken(0, ["YYYYY", 5], 0, "year"); - addFormatToken(0, ["YYYYYY", 6, true], 0, "year"); - addUnitAlias("year", "y"); - addUnitPriority("year", 1); - addRegexToken("Y", matchSigned); - addRegexToken("YY", match1to2, match2); - addRegexToken("YYYY", match1to4, match4); - addRegexToken("YYYYY", match1to6, match6); - addRegexToken("YYYYYY", match1to6, match6); - addParseToken(["YYYYY", "YYYYYY"], YEAR); - addParseToken("YYYY", function(input, array) { - array[YEAR] = input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input); - }); - addParseToken("YY", function(input, array) { - array[YEAR] = hooks.parseTwoDigitYear(input); - }); - addParseToken("Y", function(input, array) { - array[YEAR] = parseInt(input, 10); - }); - function daysInYear2(year) { - return isLeapYear2(year) ? 366 : 365; + return null; + }; + cs.get.hwb = function(string) { + if (!string) { + return null; } - hooks.parseTwoDigitYear = function(input) { - return toInt(input) + (toInt(input) > 68 ? 1900 : 2e3); - }; - var getSetYear = makeGetSet("FullYear", true); - function getIsLeapYear() { - return isLeapYear2(this.year()); + var hwb = /^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/; + var match2 = string.match(hwb); + if (match2) { + var alpha = parseFloat(match2[4]); + var h3 = (parseFloat(match2[1]) % 360 + 360) % 360; + var w4 = clamp(parseFloat(match2[2]), 0, 100); + var b3 = clamp(parseFloat(match2[3]), 0, 100); + var a3 = clamp(isNaN(alpha) ? 1 : alpha, 0, 1); + return [h3, w4, b3, a3]; } - function createDate(y3, m3, d2, h3, M2, s4, ms) { - var date; - if (y3 < 100 && y3 >= 0) { - date = new Date(y3 + 400, m3, d2, h3, M2, s4, ms); - if (isFinite(date.getFullYear())) { - date.setFullYear(y3); - } - } else { - date = new Date(y3, m3, d2, h3, M2, s4, ms); - } - return date; + return null; + }; + cs.to.hex = function() { + var rgba = swizzle(arguments); + return "#" + hexDouble(rgba[0]) + hexDouble(rgba[1]) + hexDouble(rgba[2]) + (rgba[3] < 1 ? hexDouble(Math.round(rgba[3] * 255)) : ""); + }; + cs.to.rgb = function() { + var rgba = swizzle(arguments); + return rgba.length < 4 || rgba[3] === 1 ? "rgb(" + Math.round(rgba[0]) + ", " + Math.round(rgba[1]) + ", " + Math.round(rgba[2]) + ")" : "rgba(" + Math.round(rgba[0]) + ", " + Math.round(rgba[1]) + ", " + Math.round(rgba[2]) + ", " + rgba[3] + ")"; + }; + cs.to.rgb.percent = function() { + var rgba = swizzle(arguments); + var r3 = Math.round(rgba[0] / 255 * 100); + var g4 = Math.round(rgba[1] / 255 * 100); + var b3 = Math.round(rgba[2] / 255 * 100); + return rgba.length < 4 || rgba[3] === 1 ? "rgb(" + r3 + "%, " + g4 + "%, " + b3 + "%)" : "rgba(" + r3 + "%, " + g4 + "%, " + b3 + "%, " + rgba[3] + ")"; + }; + cs.to.hsl = function() { + var hsla = swizzle(arguments); + return hsla.length < 4 || hsla[3] === 1 ? "hsl(" + hsla[0] + ", " + hsla[1] + "%, " + hsla[2] + "%)" : "hsla(" + hsla[0] + ", " + hsla[1] + "%, " + hsla[2] + "%, " + hsla[3] + ")"; + }; + cs.to.hwb = function() { + var hwba = swizzle(arguments); + var a3 = ""; + if (hwba.length >= 4 && hwba[3] !== 1) { + a3 = ", " + hwba[3]; } - function createUTCDate(y3) { - var date, args; - if (y3 < 100 && y3 >= 0) { - args = Array.prototype.slice.call(arguments); - args[0] = y3 + 400; - date = new Date(Date.UTC.apply(null, args)); - if (isFinite(date.getUTCFullYear())) { - date.setUTCFullYear(y3); - } - } else { - date = new Date(Date.UTC.apply(null, arguments)); - } - return date; + return "hwb(" + hwba[0] + ", " + hwba[1] + "%, " + hwba[2] + "%" + a3 + ")"; + }; + cs.to.keyword = function(rgb) { + return reverseNames[rgb.slice(0, 3)]; + }; + function clamp(num, min, max) { + return Math.min(Math.max(min, num), max); + } + function hexDouble(num) { + var str = Math.round(num).toString(16).toUpperCase(); + return str.length < 2 ? "0" + str : str; + } + } +}); + +// node_modules/color-convert/conversions.js +var require_conversions = __commonJS({ + "node_modules/color-convert/conversions.js"(exports, module2) { + var cssKeywords = require_color_name(); + var reverseKeywords = {}; + for (const key of Object.keys(cssKeywords)) { + reverseKeywords[cssKeywords[key]] = key; + } + var convert2 = { + rgb: { channels: 3, labels: "rgb" }, + hsl: { channels: 3, labels: "hsl" }, + hsv: { channels: 3, labels: "hsv" }, + hwb: { channels: 3, labels: "hwb" }, + cmyk: { channels: 4, labels: "cmyk" }, + xyz: { channels: 3, labels: "xyz" }, + lab: { channels: 3, labels: "lab" }, + lch: { channels: 3, labels: "lch" }, + hex: { channels: 1, labels: ["hex"] }, + keyword: { channels: 1, labels: ["keyword"] }, + ansi16: { channels: 1, labels: ["ansi16"] }, + ansi256: { channels: 1, labels: ["ansi256"] }, + hcg: { channels: 3, labels: ["h", "c", "g"] }, + apple: { channels: 3, labels: ["r16", "g16", "b16"] }, + gray: { channels: 1, labels: ["gray"] } + }; + module2.exports = convert2; + for (const model of Object.keys(convert2)) { + if (!("channels" in convert2[model])) { + throw new Error("missing channels property: " + model); } - function firstWeekOffset2(year, dow, doy) { - var fwd = 7 + dow - doy, fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7; - return -fwdlw + fwd - 1; + if (!("labels" in convert2[model])) { + throw new Error("missing channel labels property: " + model); } - function dayOfYearFromWeeks(year, week, weekday, dow, doy) { - var localWeekday = (7 + weekday - dow) % 7, weekOffset = firstWeekOffset2(year, dow, doy), dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset, resYear, resDayOfYear; - if (dayOfYear <= 0) { - resYear = year - 1; - resDayOfYear = daysInYear2(resYear) + dayOfYear; - } else if (dayOfYear > daysInYear2(year)) { - resYear = year + 1; - resDayOfYear = dayOfYear - daysInYear2(year); - } else { - resYear = year; - resDayOfYear = dayOfYear; - } - return { - year: resYear, - dayOfYear: resDayOfYear - }; + if (convert2[model].labels.length !== convert2[model].channels) { + throw new Error("channel and label counts mismatch: " + model); } - function weekOfYear2(mom, dow, doy) { - var weekOffset = firstWeekOffset2(mom.year(), dow, doy), week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1, resWeek, resYear; - if (week < 1) { - resYear = mom.year() - 1; - resWeek = week + weeksInYear(resYear, dow, doy); - } else if (week > weeksInYear(mom.year(), dow, doy)) { - resWeek = week - weeksInYear(mom.year(), dow, doy); - resYear = mom.year() + 1; - } else { - resYear = mom.year(); - resWeek = week; - } - return { - week: resWeek, - year: resYear - }; + const { channels, labels } = convert2[model]; + delete convert2[model].channels; + delete convert2[model].labels; + Object.defineProperty(convert2[model], "channels", { value: channels }); + Object.defineProperty(convert2[model], "labels", { value: labels }); + } + convert2.rgb.hsl = function(rgb) { + const r3 = rgb[0] / 255; + const g4 = rgb[1] / 255; + const b3 = rgb[2] / 255; + const min = Math.min(r3, g4, b3); + const max = Math.max(r3, g4, b3); + const delta = max - min; + let h3; + let s4; + if (max === min) { + h3 = 0; + } else if (r3 === max) { + h3 = (g4 - b3) / delta; + } else if (g4 === max) { + h3 = 2 + (b3 - r3) / delta; + } else if (b3 === max) { + h3 = 4 + (r3 - g4) / delta; } - function weeksInYear(year, dow, doy) { - var weekOffset = firstWeekOffset2(year, dow, doy), weekOffsetNext = firstWeekOffset2(year + 1, dow, doy); - return (daysInYear2(year) - weekOffset + weekOffsetNext) / 7; + h3 = Math.min(h3 * 60, 360); + if (h3 < 0) { + h3 += 360; } - addFormatToken("w", ["ww", 2], "wo", "week"); - addFormatToken("W", ["WW", 2], "Wo", "isoWeek"); - addUnitAlias("week", "w"); - addUnitAlias("isoWeek", "W"); - addUnitPriority("week", 5); - addUnitPriority("isoWeek", 5); - addRegexToken("w", match1to2); - addRegexToken("ww", match1to2, match2); - addRegexToken("W", match1to2); - addRegexToken("WW", match1to2, match2); - addWeekParseToken(["w", "ww", "W", "WW"], function(input, week, config2, token2) { - week[token2.substr(0, 1)] = toInt(input); - }); - function localeWeek(mom) { - return weekOfYear2(mom, this._week.dow, this._week.doy).week; + const l4 = (min + max) / 2; + if (max === min) { + s4 = 0; + } else if (l4 <= 0.5) { + s4 = delta / (max + min); + } else { + s4 = delta / (2 - max - min); } - var defaultLocaleWeek = { - dow: 0, - doy: 6 + return [h3, s4 * 100, l4 * 100]; + }; + convert2.rgb.hsv = function(rgb) { + let rdif; + let gdif; + let bdif; + let h3; + let s4; + const r3 = rgb[0] / 255; + const g4 = rgb[1] / 255; + const b3 = rgb[2] / 255; + const v3 = Math.max(r3, g4, b3); + const diff = v3 - Math.min(r3, g4, b3); + const diffc = function(c3) { + return (v3 - c3) / 6 / diff + 1 / 2; }; - function localeFirstDayOfWeek() { - return this._week.dow; - } - function localeFirstDayOfYear() { - return this._week.doy; - } - function getSetWeek(input) { - var week = this.localeData().week(this); - return input == null ? week : this.add((input - week) * 7, "d"); - } - function getSetISOWeek(input) { - var week = weekOfYear2(this, 1, 4).week; - return input == null ? week : this.add((input - week) * 7, "d"); - } - addFormatToken("d", 0, "do", "day"); - addFormatToken("dd", 0, 0, function(format2) { - return this.localeData().weekdaysMin(this, format2); - }); - addFormatToken("ddd", 0, 0, function(format2) { - return this.localeData().weekdaysShort(this, format2); - }); - addFormatToken("dddd", 0, 0, function(format2) { - return this.localeData().weekdays(this, format2); - }); - addFormatToken("e", 0, 0, "weekday"); - addFormatToken("E", 0, 0, "isoWeekday"); - addUnitAlias("day", "d"); - addUnitAlias("weekday", "e"); - addUnitAlias("isoWeekday", "E"); - addUnitPriority("day", 11); - addUnitPriority("weekday", 11); - addUnitPriority("isoWeekday", 11); - addRegexToken("d", match1to2); - addRegexToken("e", match1to2); - addRegexToken("E", match1to2); - addRegexToken("dd", function(isStrict, locale2) { - return locale2.weekdaysMinRegex(isStrict); - }); - addRegexToken("ddd", function(isStrict, locale2) { - return locale2.weekdaysShortRegex(isStrict); - }); - addRegexToken("dddd", function(isStrict, locale2) { - return locale2.weekdaysRegex(isStrict); - }); - addWeekParseToken(["dd", "ddd", "dddd"], function(input, week, config2, token2) { - var weekday = config2._locale.weekdaysParse(input, token2, config2._strict); - if (weekday != null) { - week.d = weekday; - } else { - getParsingFlags(config2).invalidWeekday = input; - } - }); - addWeekParseToken(["d", "e", "E"], function(input, week, config2, token2) { - week[token2] = toInt(input); - }); - function parseWeekday(input, locale2) { - if (typeof input !== "string") { - return input; - } - if (!isNaN(input)) { - return parseInt(input, 10); - } - input = locale2.weekdaysParse(input); - if (typeof input === "number") { - return input; + if (diff === 0) { + h3 = 0; + s4 = 0; + } else { + s4 = diff / v3; + rdif = diffc(r3); + gdif = diffc(g4); + bdif = diffc(b3); + if (r3 === v3) { + h3 = bdif - gdif; + } else if (g4 === v3) { + h3 = 1 / 3 + rdif - bdif; + } else if (b3 === v3) { + h3 = 2 / 3 + gdif - rdif; } - return null; - } - function parseIsoWeekday(input, locale2) { - if (typeof input === "string") { - return locale2.weekdaysParse(input) % 7 || 7; + if (h3 < 0) { + h3 += 1; + } else if (h3 > 1) { + h3 -= 1; } - return isNaN(input) ? null : input; } - function shiftWeekdays(ws, n3) { - return ws.slice(n3, 7).concat(ws.slice(0, n3)); + return [ + h3 * 360, + s4 * 100, + v3 * 100 + ]; + }; + convert2.rgb.hwb = function(rgb) { + const r3 = rgb[0]; + const g4 = rgb[1]; + let b3 = rgb[2]; + const h3 = convert2.rgb.hsl(rgb)[0]; + const w4 = 1 / 255 * Math.min(r3, Math.min(g4, b3)); + b3 = 1 - 1 / 255 * Math.max(r3, Math.max(g4, b3)); + return [h3, w4 * 100, b3 * 100]; + }; + convert2.rgb.cmyk = function(rgb) { + const r3 = rgb[0] / 255; + const g4 = rgb[1] / 255; + const b3 = rgb[2] / 255; + const k3 = Math.min(1 - r3, 1 - g4, 1 - b3); + const c3 = (1 - r3 - k3) / (1 - k3) || 0; + const m3 = (1 - g4 - k3) / (1 - k3) || 0; + const y3 = (1 - b3 - k3) / (1 - k3) || 0; + return [c3 * 100, m3 * 100, y3 * 100, k3 * 100]; + }; + function comparativeDistance(x3, y3) { + return (x3[0] - y3[0]) ** 2 + (x3[1] - y3[1]) ** 2 + (x3[2] - y3[2]) ** 2; + } + convert2.rgb.keyword = function(rgb) { + const reversed = reverseKeywords[rgb]; + if (reversed) { + return reversed; } - var defaultLocaleWeekdays = "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), defaultLocaleWeekdaysShort = "Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"), defaultLocaleWeekdaysMin = "Su_Mo_Tu_We_Th_Fr_Sa".split("_"), defaultWeekdaysRegex = matchWord, defaultWeekdaysShortRegex = matchWord, defaultWeekdaysMinRegex = matchWord; - function localeWeekdays(m3, format2) { - var weekdays2 = isArray(this._weekdays) ? this._weekdays : this._weekdays[m3 && m3 !== true && this._weekdays.isFormat.test(format2) ? "format" : "standalone"]; - return m3 === true ? shiftWeekdays(weekdays2, this._week.dow) : m3 ? weekdays2[m3.day()] : weekdays2; + let currentClosestDistance = Infinity; + let currentClosestKeyword; + for (const keyword of Object.keys(cssKeywords)) { + const value = cssKeywords[keyword]; + const distance = comparativeDistance(rgb, value); + if (distance < currentClosestDistance) { + currentClosestDistance = distance; + currentClosestKeyword = keyword; + } } - function localeWeekdaysShort(m3) { - return m3 === true ? shiftWeekdays(this._weekdaysShort, this._week.dow) : m3 ? this._weekdaysShort[m3.day()] : this._weekdaysShort; + return currentClosestKeyword; + }; + convert2.keyword.rgb = function(keyword) { + return cssKeywords[keyword]; + }; + convert2.rgb.xyz = function(rgb) { + let r3 = rgb[0] / 255; + let g4 = rgb[1] / 255; + let b3 = rgb[2] / 255; + r3 = r3 > 0.04045 ? ((r3 + 0.055) / 1.055) ** 2.4 : r3 / 12.92; + g4 = g4 > 0.04045 ? ((g4 + 0.055) / 1.055) ** 2.4 : g4 / 12.92; + b3 = b3 > 0.04045 ? ((b3 + 0.055) / 1.055) ** 2.4 : b3 / 12.92; + const x3 = r3 * 0.4124 + g4 * 0.3576 + b3 * 0.1805; + const y3 = r3 * 0.2126 + g4 * 0.7152 + b3 * 0.0722; + const z3 = r3 * 0.0193 + g4 * 0.1192 + b3 * 0.9505; + return [x3 * 100, y3 * 100, z3 * 100]; + }; + convert2.rgb.lab = function(rgb) { + const xyz = convert2.rgb.xyz(rgb); + let x3 = xyz[0]; + let y3 = xyz[1]; + let z3 = xyz[2]; + x3 /= 95.047; + y3 /= 100; + z3 /= 108.883; + x3 = x3 > 8856e-6 ? x3 ** (1 / 3) : 7.787 * x3 + 16 / 116; + y3 = y3 > 8856e-6 ? y3 ** (1 / 3) : 7.787 * y3 + 16 / 116; + z3 = z3 > 8856e-6 ? z3 ** (1 / 3) : 7.787 * z3 + 16 / 116; + const l4 = 116 * y3 - 16; + const a3 = 500 * (x3 - y3); + const b3 = 200 * (y3 - z3); + return [l4, a3, b3]; + }; + convert2.hsl.rgb = function(hsl) { + const h3 = hsl[0] / 360; + const s4 = hsl[1] / 100; + const l4 = hsl[2] / 100; + let t22; + let t3; + let val; + if (s4 === 0) { + val = l4 * 255; + return [val, val, val]; } - function localeWeekdaysMin(m3) { - return m3 === true ? shiftWeekdays(this._weekdaysMin, this._week.dow) : m3 ? this._weekdaysMin[m3.day()] : this._weekdaysMin; + if (l4 < 0.5) { + t22 = l4 * (1 + s4); + } else { + t22 = l4 + s4 - l4 * s4; } - function handleStrictParse$1(weekdayName, format2, strict) { - var i3, ii, mom, llc = weekdayName.toLocaleLowerCase(); - if (!this._weekdaysParse) { - this._weekdaysParse = []; - this._shortWeekdaysParse = []; - this._minWeekdaysParse = []; - for (i3 = 0; i3 < 7; ++i3) { - mom = createUTC([2e3, 1]).day(i3); - this._minWeekdaysParse[i3] = this.weekdaysMin(mom, "").toLocaleLowerCase(); - this._shortWeekdaysParse[i3] = this.weekdaysShort(mom, "").toLocaleLowerCase(); - this._weekdaysParse[i3] = this.weekdays(mom, "").toLocaleLowerCase(); - } + const t1 = 2 * l4 - t22; + const rgb = [0, 0, 0]; + for (let i3 = 0; i3 < 3; i3++) { + t3 = h3 + 1 / 3 * -(i3 - 1); + if (t3 < 0) { + t3++; } - if (strict) { - if (format2 === "dddd") { - ii = indexOf.call(this._weekdaysParse, llc); - return ii !== -1 ? ii : null; - } else if (format2 === "ddd") { - ii = indexOf.call(this._shortWeekdaysParse, llc); - return ii !== -1 ? ii : null; - } else { - ii = indexOf.call(this._minWeekdaysParse, llc); - return ii !== -1 ? ii : null; - } - } else { - if (format2 === "dddd") { - ii = indexOf.call(this._weekdaysParse, llc); - if (ii !== -1) { - return ii; - } - ii = indexOf.call(this._shortWeekdaysParse, llc); - if (ii !== -1) { - return ii; - } - ii = indexOf.call(this._minWeekdaysParse, llc); - return ii !== -1 ? ii : null; - } else if (format2 === "ddd") { - ii = indexOf.call(this._shortWeekdaysParse, llc); - if (ii !== -1) { - return ii; - } - ii = indexOf.call(this._weekdaysParse, llc); - if (ii !== -1) { - return ii; - } - ii = indexOf.call(this._minWeekdaysParse, llc); - return ii !== -1 ? ii : null; - } else { - ii = indexOf.call(this._minWeekdaysParse, llc); - if (ii !== -1) { - return ii; - } - ii = indexOf.call(this._weekdaysParse, llc); - if (ii !== -1) { - return ii; - } - ii = indexOf.call(this._shortWeekdaysParse, llc); - return ii !== -1 ? ii : null; - } - } - } - function localeWeekdaysParse(weekdayName, format2, strict) { - var i3, mom, regex; - if (this._weekdaysParseExact) { - return handleStrictParse$1.call(this, weekdayName, format2, strict); - } - if (!this._weekdaysParse) { - this._weekdaysParse = []; - this._minWeekdaysParse = []; - this._shortWeekdaysParse = []; - this._fullWeekdaysParse = []; - } - for (i3 = 0; i3 < 7; i3++) { - mom = createUTC([2e3, 1]).day(i3); - if (strict && !this._fullWeekdaysParse[i3]) { - this._fullWeekdaysParse[i3] = new RegExp("^" + this.weekdays(mom, "").replace(".", "\\.?") + "$", "i"); - this._shortWeekdaysParse[i3] = new RegExp("^" + this.weekdaysShort(mom, "").replace(".", "\\.?") + "$", "i"); - this._minWeekdaysParse[i3] = new RegExp("^" + this.weekdaysMin(mom, "").replace(".", "\\.?") + "$", "i"); - } - if (!this._weekdaysParse[i3]) { - regex = "^" + this.weekdays(mom, "") + "|^" + this.weekdaysShort(mom, "") + "|^" + this.weekdaysMin(mom, ""); - this._weekdaysParse[i3] = new RegExp(regex.replace(".", ""), "i"); - } - if (strict && format2 === "dddd" && this._fullWeekdaysParse[i3].test(weekdayName)) { - return i3; - } else if (strict && format2 === "ddd" && this._shortWeekdaysParse[i3].test(weekdayName)) { - return i3; - } else if (strict && format2 === "dd" && this._minWeekdaysParse[i3].test(weekdayName)) { - return i3; - } else if (!strict && this._weekdaysParse[i3].test(weekdayName)) { - return i3; - } - } - } - function getSetDayOfWeek(input) { - if (!this.isValid()) { - return input != null ? this : NaN; + if (t3 > 1) { + t3--; } - var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay(); - if (input != null) { - input = parseWeekday(input, this.localeData()); - return this.add(input - day, "d"); + if (6 * t3 < 1) { + val = t1 + (t22 - t1) * 6 * t3; + } else if (2 * t3 < 1) { + val = t22; + } else if (3 * t3 < 2) { + val = t1 + (t22 - t1) * (2 / 3 - t3) * 6; } else { - return day; + val = t1; } + rgb[i3] = val * 255; } - function getSetLocaleDayOfWeek(input) { - if (!this.isValid()) { - return input != null ? this : NaN; - } - var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7; - return input == null ? weekday : this.add(input - weekday, "d"); + return rgb; + }; + convert2.hsl.hsv = function(hsl) { + const h3 = hsl[0]; + let s4 = hsl[1] / 100; + let l4 = hsl[2] / 100; + let smin = s4; + const lmin = Math.max(l4, 0.01); + l4 *= 2; + s4 *= l4 <= 1 ? l4 : 2 - l4; + smin *= lmin <= 1 ? lmin : 2 - lmin; + const v3 = (l4 + s4) / 2; + const sv = l4 === 0 ? 2 * smin / (lmin + smin) : 2 * s4 / (l4 + s4); + return [h3, sv * 100, v3 * 100]; + }; + convert2.hsv.rgb = function(hsv) { + const h3 = hsv[0] / 60; + const s4 = hsv[1] / 100; + let v3 = hsv[2] / 100; + const hi = Math.floor(h3) % 6; + const f3 = h3 - Math.floor(h3); + const p3 = 255 * v3 * (1 - s4); + const q3 = 255 * v3 * (1 - s4 * f3); + const t3 = 255 * v3 * (1 - s4 * (1 - f3)); + v3 *= 255; + switch (hi) { + case 0: + return [v3, t3, p3]; + case 1: + return [q3, v3, p3]; + case 2: + return [p3, v3, t3]; + case 3: + return [p3, q3, v3]; + case 4: + return [t3, p3, v3]; + case 5: + return [v3, p3, q3]; } - function getSetISODayOfWeek(input) { - if (!this.isValid()) { - return input != null ? this : NaN; - } - if (input != null) { - var weekday = parseIsoWeekday(input, this.localeData()); - return this.day(this.day() % 7 ? weekday : weekday - 7); - } else { - return this.day() || 7; - } + }; + convert2.hsv.hsl = function(hsv) { + const h3 = hsv[0]; + const s4 = hsv[1] / 100; + const v3 = hsv[2] / 100; + const vmin = Math.max(v3, 0.01); + let sl; + let l4; + l4 = (2 - s4) * v3; + const lmin = (2 - s4) * vmin; + sl = s4 * vmin; + sl /= lmin <= 1 ? lmin : 2 - lmin; + sl = sl || 0; + l4 /= 2; + return [h3, sl * 100, l4 * 100]; + }; + convert2.hwb.rgb = function(hwb) { + const h3 = hwb[0] / 360; + let wh = hwb[1] / 100; + let bl = hwb[2] / 100; + const ratio = wh + bl; + let f3; + if (ratio > 1) { + wh /= ratio; + bl /= ratio; } - function weekdaysRegex(isStrict) { - if (this._weekdaysParseExact) { - if (!hasOwnProp(this, "_weekdaysRegex")) { - computeWeekdaysParse.call(this); - } - if (isStrict) { - return this._weekdaysStrictRegex; - } else { - return this._weekdaysRegex; - } - } else { - if (!hasOwnProp(this, "_weekdaysRegex")) { - this._weekdaysRegex = defaultWeekdaysRegex; - } - return this._weekdaysStrictRegex && isStrict ? this._weekdaysStrictRegex : this._weekdaysRegex; - } + const i3 = Math.floor(6 * h3); + const v3 = 1 - bl; + f3 = 6 * h3 - i3; + if ((i3 & 1) !== 0) { + f3 = 1 - f3; } - function weekdaysShortRegex(isStrict) { - if (this._weekdaysParseExact) { - if (!hasOwnProp(this, "_weekdaysRegex")) { - computeWeekdaysParse.call(this); - } - if (isStrict) { - return this._weekdaysShortStrictRegex; - } else { - return this._weekdaysShortRegex; - } - } else { - if (!hasOwnProp(this, "_weekdaysShortRegex")) { - this._weekdaysShortRegex = defaultWeekdaysShortRegex; - } - return this._weekdaysShortStrictRegex && isStrict ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex; - } + const n3 = wh + f3 * (v3 - wh); + let r3; + let g4; + let b3; + switch (i3) { + default: + case 6: + case 0: + r3 = v3; + g4 = n3; + b3 = wh; + break; + case 1: + r3 = n3; + g4 = v3; + b3 = wh; + break; + case 2: + r3 = wh; + g4 = v3; + b3 = n3; + break; + case 3: + r3 = wh; + g4 = n3; + b3 = v3; + break; + case 4: + r3 = n3; + g4 = wh; + b3 = v3; + break; + case 5: + r3 = v3; + g4 = wh; + b3 = n3; + break; } - function weekdaysMinRegex(isStrict) { - if (this._weekdaysParseExact) { - if (!hasOwnProp(this, "_weekdaysRegex")) { - computeWeekdaysParse.call(this); - } - if (isStrict) { - return this._weekdaysMinStrictRegex; - } else { - return this._weekdaysMinRegex; - } - } else { - if (!hasOwnProp(this, "_weekdaysMinRegex")) { - this._weekdaysMinRegex = defaultWeekdaysMinRegex; - } - return this._weekdaysMinStrictRegex && isStrict ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex; - } + return [r3 * 255, g4 * 255, b3 * 255]; + }; + convert2.cmyk.rgb = function(cmyk) { + const c3 = cmyk[0] / 100; + const m3 = cmyk[1] / 100; + const y3 = cmyk[2] / 100; + const k3 = cmyk[3] / 100; + const r3 = 1 - Math.min(1, c3 * (1 - k3) + k3); + const g4 = 1 - Math.min(1, m3 * (1 - k3) + k3); + const b3 = 1 - Math.min(1, y3 * (1 - k3) + k3); + return [r3 * 255, g4 * 255, b3 * 255]; + }; + convert2.xyz.rgb = function(xyz) { + const x3 = xyz[0] / 100; + const y3 = xyz[1] / 100; + const z3 = xyz[2] / 100; + let r3; + let g4; + let b3; + r3 = x3 * 3.2406 + y3 * -1.5372 + z3 * -0.4986; + g4 = x3 * -0.9689 + y3 * 1.8758 + z3 * 0.0415; + b3 = x3 * 0.0557 + y3 * -0.204 + z3 * 1.057; + r3 = r3 > 31308e-7 ? 1.055 * r3 ** (1 / 2.4) - 0.055 : r3 * 12.92; + g4 = g4 > 31308e-7 ? 1.055 * g4 ** (1 / 2.4) - 0.055 : g4 * 12.92; + b3 = b3 > 31308e-7 ? 1.055 * b3 ** (1 / 2.4) - 0.055 : b3 * 12.92; + r3 = Math.min(Math.max(0, r3), 1); + g4 = Math.min(Math.max(0, g4), 1); + b3 = Math.min(Math.max(0, b3), 1); + return [r3 * 255, g4 * 255, b3 * 255]; + }; + convert2.xyz.lab = function(xyz) { + let x3 = xyz[0]; + let y3 = xyz[1]; + let z3 = xyz[2]; + x3 /= 95.047; + y3 /= 100; + z3 /= 108.883; + x3 = x3 > 8856e-6 ? x3 ** (1 / 3) : 7.787 * x3 + 16 / 116; + y3 = y3 > 8856e-6 ? y3 ** (1 / 3) : 7.787 * y3 + 16 / 116; + z3 = z3 > 8856e-6 ? z3 ** (1 / 3) : 7.787 * z3 + 16 / 116; + const l4 = 116 * y3 - 16; + const a3 = 500 * (x3 - y3); + const b3 = 200 * (y3 - z3); + return [l4, a3, b3]; + }; + convert2.lab.xyz = function(lab) { + const l4 = lab[0]; + const a3 = lab[1]; + const b3 = lab[2]; + let x3; + let y3; + let z3; + y3 = (l4 + 16) / 116; + x3 = a3 / 500 + y3; + z3 = y3 - b3 / 200; + const y22 = y3 ** 3; + const x22 = x3 ** 3; + const z22 = z3 ** 3; + y3 = y22 > 8856e-6 ? y22 : (y3 - 16 / 116) / 7.787; + x3 = x22 > 8856e-6 ? x22 : (x3 - 16 / 116) / 7.787; + z3 = z22 > 8856e-6 ? z22 : (z3 - 16 / 116) / 7.787; + x3 *= 95.047; + y3 *= 100; + z3 *= 108.883; + return [x3, y3, z3]; + }; + convert2.lab.lch = function(lab) { + const l4 = lab[0]; + const a3 = lab[1]; + const b3 = lab[2]; + let h3; + const hr = Math.atan2(b3, a3); + h3 = hr * 360 / 2 / Math.PI; + if (h3 < 0) { + h3 += 360; } - function computeWeekdaysParse() { - function cmpLenRev(a3, b3) { - return b3.length - a3.length; + const c3 = Math.sqrt(a3 * a3 + b3 * b3); + return [l4, c3, h3]; + }; + convert2.lch.lab = function(lch) { + const l4 = lch[0]; + const c3 = lch[1]; + const h3 = lch[2]; + const hr = h3 / 360 * 2 * Math.PI; + const a3 = c3 * Math.cos(hr); + const b3 = c3 * Math.sin(hr); + return [l4, a3, b3]; + }; + convert2.rgb.ansi16 = function(args, saturation = null) { + const [r3, g4, b3] = args; + let value = saturation === null ? convert2.rgb.hsv(args)[2] : saturation; + value = Math.round(value / 50); + if (value === 0) { + return 30; + } + let ansi = 30 + (Math.round(b3 / 255) << 2 | Math.round(g4 / 255) << 1 | Math.round(r3 / 255)); + if (value === 2) { + ansi += 60; + } + return ansi; + }; + convert2.hsv.ansi16 = function(args) { + return convert2.rgb.ansi16(convert2.hsv.rgb(args), args[2]); + }; + convert2.rgb.ansi256 = function(args) { + const r3 = args[0]; + const g4 = args[1]; + const b3 = args[2]; + if (r3 === g4 && g4 === b3) { + if (r3 < 8) { + return 16; } - var minPieces = [], shortPieces = [], longPieces = [], mixedPieces = [], i3, mom, minp, shortp, longp; - for (i3 = 0; i3 < 7; i3++) { - mom = createUTC([2e3, 1]).day(i3); - minp = regexEscape(this.weekdaysMin(mom, "")); - shortp = regexEscape(this.weekdaysShort(mom, "")); - longp = regexEscape(this.weekdays(mom, "")); - minPieces.push(minp); - shortPieces.push(shortp); - longPieces.push(longp); - mixedPieces.push(minp); - mixedPieces.push(shortp); - mixedPieces.push(longp); + if (r3 > 248) { + return 231; } - minPieces.sort(cmpLenRev); - shortPieces.sort(cmpLenRev); - longPieces.sort(cmpLenRev); - mixedPieces.sort(cmpLenRev); - this._weekdaysRegex = new RegExp("^(" + mixedPieces.join("|") + ")", "i"); - this._weekdaysShortRegex = this._weekdaysRegex; - this._weekdaysMinRegex = this._weekdaysRegex; - this._weekdaysStrictRegex = new RegExp("^(" + longPieces.join("|") + ")", "i"); - this._weekdaysShortStrictRegex = new RegExp("^(" + shortPieces.join("|") + ")", "i"); - this._weekdaysMinStrictRegex = new RegExp("^(" + minPieces.join("|") + ")", "i"); + return Math.round((r3 - 8) / 247 * 24) + 232; } - function hFormat() { - return this.hours() % 12 || 12; + const ansi = 16 + 36 * Math.round(r3 / 255 * 5) + 6 * Math.round(g4 / 255 * 5) + Math.round(b3 / 255 * 5); + return ansi; + }; + convert2.ansi16.rgb = function(args) { + let color = args % 10; + if (color === 0 || color === 7) { + if (args > 50) { + color += 3.5; + } + color = color / 10.5 * 255; + return [color, color, color]; } - function kFormat() { - return this.hours() || 24; + const mult = (~~(args > 50) + 1) * 0.5; + const r3 = (color & 1) * mult * 255; + const g4 = (color >> 1 & 1) * mult * 255; + const b3 = (color >> 2 & 1) * mult * 255; + return [r3, g4, b3]; + }; + convert2.ansi256.rgb = function(args) { + if (args >= 232) { + const c3 = (args - 232) * 10 + 8; + return [c3, c3, c3]; } - addFormatToken("H", ["HH", 2], 0, "hour"); - addFormatToken("h", ["hh", 2], 0, hFormat); - addFormatToken("k", ["kk", 2], 0, kFormat); - addFormatToken("hmm", 0, 0, function() { - return "" + hFormat.apply(this) + zeroFill(this.minutes(), 2); - }); - addFormatToken("hmmss", 0, 0, function() { - return "" + hFormat.apply(this) + zeroFill(this.minutes(), 2) + zeroFill(this.seconds(), 2); - }); - addFormatToken("Hmm", 0, 0, function() { - return "" + this.hours() + zeroFill(this.minutes(), 2); - }); - addFormatToken("Hmmss", 0, 0, function() { - return "" + this.hours() + zeroFill(this.minutes(), 2) + zeroFill(this.seconds(), 2); - }); - function meridiem(token2, lowercase) { - addFormatToken(token2, 0, 0, function() { - return this.localeData().meridiem(this.hours(), this.minutes(), lowercase); - }); + args -= 16; + let rem; + const r3 = Math.floor(args / 36) / 5 * 255; + const g4 = Math.floor((rem = args % 36) / 6) / 5 * 255; + const b3 = rem % 6 / 5 * 255; + return [r3, g4, b3]; + }; + convert2.rgb.hex = function(args) { + const integer = ((Math.round(args[0]) & 255) << 16) + ((Math.round(args[1]) & 255) << 8) + (Math.round(args[2]) & 255); + const string = integer.toString(16).toUpperCase(); + return "000000".substring(string.length) + string; + }; + convert2.hex.rgb = function(args) { + const match2 = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i); + if (!match2) { + return [0, 0, 0]; } - meridiem("a", true); - meridiem("A", false); - addUnitAlias("hour", "h"); - addUnitPriority("hour", 13); - function matchMeridiem(isStrict, locale2) { - return locale2._meridiemParse; + let colorString = match2[0]; + if (match2[0].length === 3) { + colorString = colorString.split("").map((char) => { + return char + char; + }).join(""); } - addRegexToken("a", matchMeridiem); - addRegexToken("A", matchMeridiem); - addRegexToken("H", match1to2); - addRegexToken("h", match1to2); - addRegexToken("k", match1to2); - addRegexToken("HH", match1to2, match2); - addRegexToken("hh", match1to2, match2); - addRegexToken("kk", match1to2, match2); - addRegexToken("hmm", match3to4); - addRegexToken("hmmss", match5to6); - addRegexToken("Hmm", match3to4); - addRegexToken("Hmmss", match5to6); - addParseToken(["H", "HH"], HOUR); - addParseToken(["k", "kk"], function(input, array, config2) { - var kInput = toInt(input); - array[HOUR] = kInput === 24 ? 0 : kInput; - }); - addParseToken(["a", "A"], function(input, array, config2) { - config2._isPm = config2._locale.isPM(input); - config2._meridiem = input; - }); - addParseToken(["h", "hh"], function(input, array, config2) { - array[HOUR] = toInt(input); - getParsingFlags(config2).bigHour = true; - }); - addParseToken("hmm", function(input, array, config2) { - var pos = input.length - 2; - array[HOUR] = toInt(input.substr(0, pos)); - array[MINUTE] = toInt(input.substr(pos)); - getParsingFlags(config2).bigHour = true; - }); - addParseToken("hmmss", function(input, array, config2) { - var pos1 = input.length - 4, pos2 = input.length - 2; - array[HOUR] = toInt(input.substr(0, pos1)); - array[MINUTE] = toInt(input.substr(pos1, 2)); - array[SECOND] = toInt(input.substr(pos2)); - getParsingFlags(config2).bigHour = true; - }); - addParseToken("Hmm", function(input, array, config2) { - var pos = input.length - 2; - array[HOUR] = toInt(input.substr(0, pos)); - array[MINUTE] = toInt(input.substr(pos)); - }); - addParseToken("Hmmss", function(input, array, config2) { - var pos1 = input.length - 4, pos2 = input.length - 2; - array[HOUR] = toInt(input.substr(0, pos1)); - array[MINUTE] = toInt(input.substr(pos1, 2)); - array[SECOND] = toInt(input.substr(pos2)); - }); - function localeIsPM(input) { - return (input + "").toLowerCase().charAt(0) === "p"; + const integer = parseInt(colorString, 16); + const r3 = integer >> 16 & 255; + const g4 = integer >> 8 & 255; + const b3 = integer & 255; + return [r3, g4, b3]; + }; + convert2.rgb.hcg = function(rgb) { + const r3 = rgb[0] / 255; + const g4 = rgb[1] / 255; + const b3 = rgb[2] / 255; + const max = Math.max(Math.max(r3, g4), b3); + const min = Math.min(Math.min(r3, g4), b3); + const chroma = max - min; + let grayscale; + let hue; + if (chroma < 1) { + grayscale = min / (1 - chroma); + } else { + grayscale = 0; } - var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i, getSetHour = makeGetSet("Hours", true); - function localeMeridiem(hours2, minutes2, isLower) { - if (hours2 > 11) { - return isLower ? "pm" : "PM"; - } else { - return isLower ? "am" : "AM"; - } + if (chroma <= 0) { + hue = 0; + } else if (max === r3) { + hue = (g4 - b3) / chroma % 6; + } else if (max === g4) { + hue = 2 + (b3 - r3) / chroma; + } else { + hue = 4 + (r3 - g4) / chroma; } - var baseConfig = { - calendar: defaultCalendar, - longDateFormat: defaultLongDateFormat, - invalidDate: defaultInvalidDate, - ordinal: defaultOrdinal, - dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse, - relativeTime: defaultRelativeTime, - months: defaultLocaleMonths, - monthsShort: defaultLocaleMonthsShort, - week: defaultLocaleWeek, - weekdays: defaultLocaleWeekdays, - weekdaysMin: defaultLocaleWeekdaysMin, - weekdaysShort: defaultLocaleWeekdaysShort, - meridiemParse: defaultLocaleMeridiemParse - }; - var locales = {}, localeFamilies = {}, globalLocale; - function commonPrefix(arr1, arr2) { - var i3, minl = Math.min(arr1.length, arr2.length); - for (i3 = 0; i3 < minl; i3 += 1) { - if (arr1[i3] !== arr2[i3]) { - return i3; - } - } - return minl; + hue /= 6; + hue %= 1; + return [hue * 360, chroma * 100, grayscale * 100]; + }; + convert2.hsl.hcg = function(hsl) { + const s4 = hsl[1] / 100; + const l4 = hsl[2] / 100; + const c3 = l4 < 0.5 ? 2 * s4 * l4 : 2 * s4 * (1 - l4); + let f3 = 0; + if (c3 < 1) { + f3 = (l4 - 0.5 * c3) / (1 - c3); } - function normalizeLocale(key) { - return key ? key.toLowerCase().replace("_", "-") : key; + return [hsl[0], c3 * 100, f3 * 100]; + }; + convert2.hsv.hcg = function(hsv) { + const s4 = hsv[1] / 100; + const v3 = hsv[2] / 100; + const c3 = s4 * v3; + let f3 = 0; + if (c3 < 1) { + f3 = (v3 - c3) / (1 - c3); } - function chooseLocale(names) { - var i3 = 0, j4, next, locale2, split; - while (i3 < names.length) { - split = normalizeLocale(names[i3]).split("-"); - j4 = split.length; - next = normalizeLocale(names[i3 + 1]); - next = next ? next.split("-") : null; - while (j4 > 0) { - locale2 = loadLocale(split.slice(0, j4).join("-")); - if (locale2) { - return locale2; - } - if (next && next.length >= j4 && commonPrefix(split, next) >= j4 - 1) { - break; - } - j4--; - } - i3++; - } - return globalLocale; + return [hsv[0], c3 * 100, f3 * 100]; + }; + convert2.hcg.rgb = function(hcg) { + const h3 = hcg[0] / 360; + const c3 = hcg[1] / 100; + const g4 = hcg[2] / 100; + if (c3 === 0) { + return [g4 * 255, g4 * 255, g4 * 255]; } - function isLocaleNameSane(name) { - return name.match("^[^/\\\\]*$") != null; + const pure = [0, 0, 0]; + const hi = h3 % 1 * 6; + const v3 = hi % 1; + const w4 = 1 - v3; + let mg = 0; + switch (Math.floor(hi)) { + case 0: + pure[0] = 1; + pure[1] = v3; + pure[2] = 0; + break; + case 1: + pure[0] = w4; + pure[1] = 1; + pure[2] = 0; + break; + case 2: + pure[0] = 0; + pure[1] = 1; + pure[2] = v3; + break; + case 3: + pure[0] = 0; + pure[1] = w4; + pure[2] = 1; + break; + case 4: + pure[0] = v3; + pure[1] = 0; + pure[2] = 1; + break; + default: + pure[0] = 1; + pure[1] = 0; + pure[2] = w4; } - function loadLocale(name) { - var oldLocale = null, aliasedRequire; - if (locales[name] === void 0 && typeof module2 !== "undefined" && module2 && module2.exports && isLocaleNameSane(name)) { - try { - oldLocale = globalLocale._abbr; - aliasedRequire = require; - aliasedRequire("./locale/" + name); - getSetGlobalLocale(oldLocale); - } catch (e3) { - locales[name] = null; - } - } - return locales[name]; + mg = (1 - c3) * g4; + return [ + (c3 * pure[0] + mg) * 255, + (c3 * pure[1] + mg) * 255, + (c3 * pure[2] + mg) * 255 + ]; + }; + convert2.hcg.hsv = function(hcg) { + const c3 = hcg[1] / 100; + const g4 = hcg[2] / 100; + const v3 = c3 + g4 * (1 - c3); + let f3 = 0; + if (v3 > 0) { + f3 = c3 / v3; } - function getSetGlobalLocale(key, values) { - var data; - if (key) { - if (isUndefined2(values)) { - data = getLocale(key); - } else { - data = defineLocale(key, values); - } - if (data) { - globalLocale = data; - } else { - if (typeof console !== "undefined" && console.warn) { - console.warn("Locale " + key + " not found. Did you forget to load it?"); - } + return [hcg[0], f3 * 100, v3 * 100]; + }; + convert2.hcg.hsl = function(hcg) { + const c3 = hcg[1] / 100; + const g4 = hcg[2] / 100; + const l4 = g4 * (1 - c3) + 0.5 * c3; + let s4 = 0; + if (l4 > 0 && l4 < 0.5) { + s4 = c3 / (2 * l4); + } else if (l4 >= 0.5 && l4 < 1) { + s4 = c3 / (2 * (1 - l4)); + } + return [hcg[0], s4 * 100, l4 * 100]; + }; + convert2.hcg.hwb = function(hcg) { + const c3 = hcg[1] / 100; + const g4 = hcg[2] / 100; + const v3 = c3 + g4 * (1 - c3); + return [hcg[0], (v3 - c3) * 100, (1 - v3) * 100]; + }; + convert2.hwb.hcg = function(hwb) { + const w4 = hwb[1] / 100; + const b3 = hwb[2] / 100; + const v3 = 1 - b3; + const c3 = v3 - w4; + let g4 = 0; + if (c3 < 1) { + g4 = (v3 - c3) / (1 - c3); + } + return [hwb[0], c3 * 100, g4 * 100]; + }; + convert2.apple.rgb = function(apple) { + return [apple[0] / 65535 * 255, apple[1] / 65535 * 255, apple[2] / 65535 * 255]; + }; + convert2.rgb.apple = function(rgb) { + return [rgb[0] / 255 * 65535, rgb[1] / 255 * 65535, rgb[2] / 255 * 65535]; + }; + convert2.gray.rgb = function(args) { + return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255]; + }; + convert2.gray.hsl = function(args) { + return [0, 0, args[0]]; + }; + convert2.gray.hsv = convert2.gray.hsl; + convert2.gray.hwb = function(gray) { + return [0, 100, gray[0]]; + }; + convert2.gray.cmyk = function(gray) { + return [0, 0, 0, gray[0]]; + }; + convert2.gray.lab = function(gray) { + return [gray[0], 0, 0]; + }; + convert2.gray.hex = function(gray) { + const val = Math.round(gray[0] / 100 * 255) & 255; + const integer = (val << 16) + (val << 8) + val; + const string = integer.toString(16).toUpperCase(); + return "000000".substring(string.length) + string; + }; + convert2.rgb.gray = function(rgb) { + const val = (rgb[0] + rgb[1] + rgb[2]) / 3; + return [val / 255 * 100]; + }; + } +}); + +// node_modules/color-convert/route.js +var require_route = __commonJS({ + "node_modules/color-convert/route.js"(exports, module2) { + var conversions = require_conversions(); + function buildGraph() { + const graph = {}; + const models = Object.keys(conversions); + for (let len = models.length, i3 = 0; i3 < len; i3++) { + graph[models[i3]] = { + distance: -1, + parent: null + }; + } + return graph; + } + function deriveBFS(fromModel) { + const graph = buildGraph(); + const queue = [fromModel]; + graph[fromModel].distance = 0; + while (queue.length) { + const current = queue.pop(); + const adjacents = Object.keys(conversions[current]); + for (let len = adjacents.length, i3 = 0; i3 < len; i3++) { + const adjacent = adjacents[i3]; + const node = graph[adjacent]; + if (node.distance === -1) { + node.distance = graph[current].distance + 1; + node.parent = current; + queue.unshift(adjacent); } } - return globalLocale._abbr; } - function defineLocale(name, config2) { - if (config2 !== null) { - var locale2, parentConfig = baseConfig; - config2.abbr = name; - if (locales[name] != null) { - deprecateSimple("defineLocaleOverride", "use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."); - parentConfig = locales[name]._config; - } else if (config2.parentLocale != null) { - if (locales[config2.parentLocale] != null) { - parentConfig = locales[config2.parentLocale]._config; - } else { - locale2 = loadLocale(config2.parentLocale); - if (locale2 != null) { - parentConfig = locale2._config; - } else { - if (!localeFamilies[config2.parentLocale]) { - localeFamilies[config2.parentLocale] = []; - } - localeFamilies[config2.parentLocale].push({ - name, - config: config2 - }); - return null; - } - } - } - locales[name] = new Locale2(mergeConfigs(parentConfig, config2)); - if (localeFamilies[name]) { - localeFamilies[name].forEach(function(x4) { - defineLocale(x4.name, x4.config); - }); - } - getSetGlobalLocale(name); - return locales[name]; - } else { - delete locales[name]; - return null; + return graph; + } + function link(from, to) { + return function(args) { + return to(from(args)); + }; + } + function wrapConversion(toModel, graph) { + const path = [graph[toModel].parent, toModel]; + let fn = conversions[graph[toModel].parent][toModel]; + let cur = graph[toModel].parent; + while (graph[cur].parent) { + path.unshift(graph[cur].parent); + fn = link(conversions[graph[cur].parent][cur], fn); + cur = graph[cur].parent; + } + fn.conversion = path; + return fn; + } + module2.exports = function(fromModel) { + const graph = deriveBFS(fromModel); + const conversion = {}; + const models = Object.keys(graph); + for (let len = models.length, i3 = 0; i3 < len; i3++) { + const toModel = models[i3]; + const node = graph[toModel]; + if (node.parent === null) { + continue; } + conversion[toModel] = wrapConversion(toModel, graph); } - function updateLocale(name, config2) { - if (config2 != null) { - var locale2, tmpLocale, parentConfig = baseConfig; - if (locales[name] != null && locales[name].parentLocale != null) { - locales[name].set(mergeConfigs(locales[name]._config, config2)); - } else { - tmpLocale = loadLocale(name); - if (tmpLocale != null) { - parentConfig = tmpLocale._config; - } - config2 = mergeConfigs(parentConfig, config2); - if (tmpLocale == null) { - config2.abbr = name; - } - locale2 = new Locale2(config2); - locale2.parentLocale = locales[name]; - locales[name] = locale2; - } - getSetGlobalLocale(name); - } else { - if (locales[name] != null) { - if (locales[name].parentLocale != null) { - locales[name] = locales[name].parentLocale; - if (name === getSetGlobalLocale()) { - getSetGlobalLocale(name); - } - } else if (locales[name] != null) { - delete locales[name]; - } - } + return conversion; + }; + } +}); + +// node_modules/color-convert/index.js +var require_color_convert = __commonJS({ + "node_modules/color-convert/index.js"(exports, module2) { + var conversions = require_conversions(); + var route = require_route(); + var convert2 = {}; + var models = Object.keys(conversions); + function wrapRaw(fn) { + const wrappedFn = function(...args) { + const arg0 = args[0]; + if (arg0 === void 0 || arg0 === null) { + return arg0; } - return locales[name]; + if (arg0.length > 1) { + args = arg0; + } + return fn(args); + }; + if ("conversion" in fn) { + wrappedFn.conversion = fn.conversion; } - function getLocale(key) { - var locale2; - if (key && key._locale && key._locale._abbr) { - key = key._locale._abbr; + return wrappedFn; + } + function wrapRounded(fn) { + const wrappedFn = function(...args) { + const arg0 = args[0]; + if (arg0 === void 0 || arg0 === null) { + return arg0; } - if (!key) { - return globalLocale; + if (arg0.length > 1) { + args = arg0; } - if (!isArray(key)) { - locale2 = loadLocale(key); - if (locale2) { - return locale2; + const result = fn(args); + if (typeof result === "object") { + for (let len = result.length, i3 = 0; i3 < len; i3++) { + result[i3] = Math.round(result[i3]); } - key = [key]; } - return chooseLocale(key); + return result; + }; + if ("conversion" in fn) { + wrappedFn.conversion = fn.conversion; } - function listLocales() { - return keys(locales); + return wrappedFn; + } + models.forEach((fromModel) => { + convert2[fromModel] = {}; + Object.defineProperty(convert2[fromModel], "channels", { value: conversions[fromModel].channels }); + Object.defineProperty(convert2[fromModel], "labels", { value: conversions[fromModel].labels }); + const routes = route(fromModel); + const routeModels = Object.keys(routes); + routeModels.forEach((toModel) => { + const fn = routes[toModel]; + convert2[fromModel][toModel] = wrapRounded(fn); + convert2[fromModel][toModel].raw = wrapRaw(fn); + }); + }); + module2.exports = convert2; + } +}); + +// node_modules/color/index.js +var require_color = __commonJS({ + "node_modules/color/index.js"(exports, module2) { + var colorString = require_color_string(); + var convert2 = require_color_convert(); + var skippedModels = [ + "keyword", + "gray", + "hex" + ]; + var hashedModelKeys = {}; + for (const model of Object.keys(convert2)) { + hashedModelKeys[[...convert2[model].labels].sort().join("")] = model; + } + var limiters = {}; + function Color2(object, model) { + if (!(this instanceof Color2)) { + return new Color2(object, model); } - function checkOverflow(m3) { - var overflow, a3 = m3._a; - if (a3 && getParsingFlags(m3).overflow === -2) { - overflow = a3[MONTH] < 0 || a3[MONTH] > 11 ? MONTH : a3[DATE] < 1 || a3[DATE] > daysInMonth2(a3[YEAR], a3[MONTH]) ? DATE : a3[HOUR] < 0 || a3[HOUR] > 24 || a3[HOUR] === 24 && (a3[MINUTE] !== 0 || a3[SECOND] !== 0 || a3[MILLISECOND] !== 0) ? HOUR : a3[MINUTE] < 0 || a3[MINUTE] > 59 ? MINUTE : a3[SECOND] < 0 || a3[SECOND] > 59 ? SECOND : a3[MILLISECOND] < 0 || a3[MILLISECOND] > 999 ? MILLISECOND : -1; - if (getParsingFlags(m3)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) { - overflow = DATE; - } - if (getParsingFlags(m3)._overflowWeeks && overflow === -1) { - overflow = WEEK; - } - if (getParsingFlags(m3)._overflowWeekday && overflow === -1) { - overflow = WEEKDAY; - } - getParsingFlags(m3).overflow = overflow; + if (model && model in skippedModels) { + model = null; + } + if (model && !(model in convert2)) { + throw new Error("Unknown model: " + model); + } + let i3; + let channels; + if (object == null) { + this.model = "rgb"; + this.color = [0, 0, 0]; + this.valpha = 1; + } else if (object instanceof Color2) { + this.model = object.model; + this.color = [...object.color]; + this.valpha = object.valpha; + } else if (typeof object === "string") { + const result = colorString.get(object); + if (result === null) { + throw new Error("Unable to parse color from string: " + object); } - return m3; + this.model = result.model; + channels = convert2[this.model].channels; + this.color = result.value.slice(0, channels); + this.valpha = typeof result.value[channels] === "number" ? result.value[channels] : 1; + } else if (object.length > 0) { + this.model = model || "rgb"; + channels = convert2[this.model].channels; + const newArray = Array.prototype.slice.call(object, 0, channels); + this.color = zeroArray(newArray, channels); + this.valpha = typeof object[channels] === "number" ? object[channels] : 1; + } else if (typeof object === "number") { + this.model = "rgb"; + this.color = [ + object >> 16 & 255, + object >> 8 & 255, + object & 255 + ]; + this.valpha = 1; + } else { + this.valpha = 1; + const keys = Object.keys(object); + if ("alpha" in object) { + keys.splice(keys.indexOf("alpha"), 1); + this.valpha = typeof object.alpha === "number" ? object.alpha : 0; + } + const hashedKeys = keys.sort().join(""); + if (!(hashedKeys in hashedModelKeys)) { + throw new Error("Unable to parse color from object: " + JSON.stringify(object)); + } + this.model = hashedModelKeys[hashedKeys]; + const { labels } = convert2[this.model]; + const color = []; + for (i3 = 0; i3 < labels.length; i3++) { + color.push(object[labels[i3]]); + } + this.color = zeroArray(color); } - var extendedIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/, basicIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/, tzRegex = /Z|[+-]\d\d(?::?\d\d)?/, isoDates = [ - ["YYYYYY-MM-DD", /[+-]\d{6}-\d\d-\d\d/], - ["YYYY-MM-DD", /\d{4}-\d\d-\d\d/], - ["GGGG-[W]WW-E", /\d{4}-W\d\d-\d/], - ["GGGG-[W]WW", /\d{4}-W\d\d/, false], - ["YYYY-DDD", /\d{4}-\d{3}/], - ["YYYY-MM", /\d{4}-\d\d/, false], - ["YYYYYYMMDD", /[+-]\d{10}/], - ["YYYYMMDD", /\d{8}/], - ["GGGG[W]WWE", /\d{4}W\d{3}/], - ["GGGG[W]WW", /\d{4}W\d{2}/, false], - ["YYYYDDD", /\d{7}/], - ["YYYYMM", /\d{6}/, false], - ["YYYY", /\d{4}/, false] - ], isoTimes = [ - ["HH:mm:ss.SSSS", /\d\d:\d\d:\d\d\.\d+/], - ["HH:mm:ss,SSSS", /\d\d:\d\d:\d\d,\d+/], - ["HH:mm:ss", /\d\d:\d\d:\d\d/], - ["HH:mm", /\d\d:\d\d/], - ["HHmmss.SSSS", /\d\d\d\d\d\d\.\d+/], - ["HHmmss,SSSS", /\d\d\d\d\d\d,\d+/], - ["HHmmss", /\d\d\d\d\d\d/], - ["HHmm", /\d\d\d\d/], - ["HH", /\d\d/] - ], aspNetJsonRegex = /^\/?Date\((-?\d+)/i, rfc28222 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/, obsOffsets2 = { - UT: 0, - GMT: 0, - EDT: -4 * 60, - EST: -5 * 60, - CDT: -5 * 60, - CST: -6 * 60, - MDT: -6 * 60, - MST: -7 * 60, - PDT: -7 * 60, - PST: -8 * 60 - }; - function configFromISO(config2) { - var i3, l4, string = config2._i, match5 = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string), allowTime, dateFormat, timeFormat, tzFormat, isoDatesLen = isoDates.length, isoTimesLen = isoTimes.length; - if (match5) { - getParsingFlags(config2).iso = true; - for (i3 = 0, l4 = isoDatesLen; i3 < l4; i3++) { - if (isoDates[i3][1].exec(match5[1])) { - dateFormat = isoDates[i3][0]; - allowTime = isoDates[i3][2] !== false; - break; - } - } - if (dateFormat == null) { - config2._isValid = false; - return; - } - if (match5[3]) { - for (i3 = 0, l4 = isoTimesLen; i3 < l4; i3++) { - if (isoTimes[i3][1].exec(match5[3])) { - timeFormat = (match5[2] || " ") + isoTimes[i3][0]; - break; - } - } - if (timeFormat == null) { - config2._isValid = false; - return; - } - } - if (!allowTime && timeFormat != null) { - config2._isValid = false; - return; - } - if (match5[4]) { - if (tzRegex.exec(match5[4])) { - tzFormat = "Z"; - } else { - config2._isValid = false; - return; - } - } - config2._f = dateFormat + (timeFormat || "") + (tzFormat || ""); - configFromStringAndFormat(config2); - } else { - config2._isValid = false; - } - } - function extractFromRFC2822Strings(yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) { - var result = [ - untruncateYear2(yearStr), - defaultLocaleMonthsShort.indexOf(monthStr), - parseInt(dayStr, 10), - parseInt(hourStr, 10), - parseInt(minuteStr, 10) - ]; - if (secondStr) { - result.push(parseInt(secondStr, 10)); - } - return result; - } - function untruncateYear2(yearStr) { - var year = parseInt(yearStr, 10); - if (year <= 49) { - return 2e3 + year; - } else if (year <= 999) { - return 1900 + year; - } - return year; - } - function preprocessRFC28222(s4) { - return s4.replace(/\([^()]*\)|[\n\t]/g, " ").replace(/(\s\s+)/g, " ").replace(/^\s\s*/, "").replace(/\s\s*$/, ""); - } - function checkWeekday(weekdayStr, parsedInput, config2) { - if (weekdayStr) { - var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr), weekdayActual = new Date(parsedInput[0], parsedInput[1], parsedInput[2]).getDay(); - if (weekdayProvided !== weekdayActual) { - getParsingFlags(config2).weekdayMismatch = true; - config2._isValid = false; - return false; + if (limiters[this.model]) { + channels = convert2[this.model].channels; + for (i3 = 0; i3 < channels; i3++) { + const limit = limiters[this.model][i3]; + if (limit) { + this.color[i3] = limit(this.color[i3]); } } - return true; } - function calculateOffset(obsOffset, militaryOffset, numOffset) { - if (obsOffset) { - return obsOffsets2[obsOffset]; - } else if (militaryOffset) { - return 0; - } else { - var hm = parseInt(numOffset, 10), m3 = hm % 100, h3 = (hm - m3) / 100; - return h3 * 60 + m3; - } + this.valpha = Math.max(0, Math.min(1, this.valpha)); + if (Object.freeze) { + Object.freeze(this); } - function configFromRFC2822(config2) { - var match5 = rfc28222.exec(preprocessRFC28222(config2._i)), parsedArray; - if (match5) { - parsedArray = extractFromRFC2822Strings(match5[4], match5[3], match5[2], match5[5], match5[6], match5[7]); - if (!checkWeekday(match5[1], parsedArray, config2)) { - return; - } - config2._a = parsedArray; - config2._tzm = calculateOffset(match5[8], match5[9], match5[10]); - config2._d = createUTCDate.apply(null, config2._a); - config2._d.setUTCMinutes(config2._d.getUTCMinutes() - config2._tzm); - getParsingFlags(config2).rfc2822 = true; - } else { - config2._isValid = false; + } + Color2.prototype = { + toString() { + return this.string(); + }, + toJSON() { + return this[this.model](); + }, + string(places) { + let self2 = this.model in colorString.to ? this : this.rgb(); + self2 = self2.round(typeof places === "number" ? places : 1); + const args = self2.valpha === 1 ? self2.color : [...self2.color, this.valpha]; + return colorString.to[self2.model](args); + }, + percentString(places) { + const self2 = this.rgb().round(typeof places === "number" ? places : 1); + const args = self2.valpha === 1 ? self2.color : [...self2.color, this.valpha]; + return colorString.to.rgb.percent(args); + }, + array() { + return this.valpha === 1 ? [...this.color] : [...this.color, this.valpha]; + }, + object() { + const result = {}; + const { channels } = convert2[this.model]; + const { labels } = convert2[this.model]; + for (let i3 = 0; i3 < channels; i3++) { + result[labels[i3]] = this.color[i3]; } - } - function configFromString(config2) { - var matched = aspNetJsonRegex.exec(config2._i); - if (matched !== null) { - config2._d = new Date(+matched[1]); - return; + if (this.valpha !== 1) { + result.alpha = this.valpha; } - configFromISO(config2); - if (config2._isValid === false) { - delete config2._isValid; - } else { - return; + return result; + }, + unitArray() { + const rgb = this.rgb().color; + rgb[0] /= 255; + rgb[1] /= 255; + rgb[2] /= 255; + if (this.valpha !== 1) { + rgb.push(this.valpha); } - configFromRFC2822(config2); - if (config2._isValid === false) { - delete config2._isValid; - } else { - return; + return rgb; + }, + unitObject() { + const rgb = this.rgb().object(); + rgb.r /= 255; + rgb.g /= 255; + rgb.b /= 255; + if (this.valpha !== 1) { + rgb.alpha = this.valpha; } - if (config2._strict) { - config2._isValid = false; - } else { - hooks.createFromInputFallback(config2); + return rgb; + }, + round(places) { + places = Math.max(places || 0, 0); + return new Color2([...this.color.map(roundToPlace(places)), this.valpha], this.model); + }, + alpha(value) { + if (value !== void 0) { + return new Color2([...this.color, Math.max(0, Math.min(1, value))], this.model); } - } - hooks.createFromInputFallback = deprecate("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.", function(config2) { - config2._d = new Date(config2._i + (config2._useUTC ? " UTC" : "")); - }); - function defaults(a3, b3, c3) { - if (a3 != null) { - return a3; + return this.valpha; + }, + red: getset("rgb", 0, maxfn(255)), + green: getset("rgb", 1, maxfn(255)), + blue: getset("rgb", 2, maxfn(255)), + hue: getset(["hsl", "hsv", "hsl", "hwb", "hcg"], 0, (value) => (value % 360 + 360) % 360), + saturationl: getset("hsl", 1, maxfn(100)), + lightness: getset("hsl", 2, maxfn(100)), + saturationv: getset("hsv", 1, maxfn(100)), + value: getset("hsv", 2, maxfn(100)), + chroma: getset("hcg", 1, maxfn(100)), + gray: getset("hcg", 2, maxfn(100)), + white: getset("hwb", 1, maxfn(100)), + wblack: getset("hwb", 2, maxfn(100)), + cyan: getset("cmyk", 0, maxfn(100)), + magenta: getset("cmyk", 1, maxfn(100)), + yellow: getset("cmyk", 2, maxfn(100)), + black: getset("cmyk", 3, maxfn(100)), + x: getset("xyz", 0, maxfn(95.047)), + y: getset("xyz", 1, maxfn(100)), + z: getset("xyz", 2, maxfn(108.833)), + l: getset("lab", 0, maxfn(100)), + a: getset("lab", 1), + b: getset("lab", 2), + keyword(value) { + if (value !== void 0) { + return new Color2(value); } - if (b3 != null) { - return b3; + return convert2[this.model].keyword(this.color); + }, + hex(value) { + if (value !== void 0) { + return new Color2(value); } - return c3; - } - function currentDateArray(config2) { - var nowValue = new Date(hooks.now()); - if (config2._useUTC) { - return [ - nowValue.getUTCFullYear(), - nowValue.getUTCMonth(), - nowValue.getUTCDate() - ]; + return colorString.to.hex(this.rgb().round().color); + }, + hexa(value) { + if (value !== void 0) { + return new Color2(value); } - return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()]; - } - function configFromArray(config2) { - var i3, date, input = [], currentDate, expectedWeekday, yearToUse; - if (config2._d) { - return; + const rgbArray = this.rgb().round().color; + let alphaHex = Math.round(this.valpha * 255).toString(16).toUpperCase(); + if (alphaHex.length === 1) { + alphaHex = "0" + alphaHex; } - currentDate = currentDateArray(config2); - if (config2._w && config2._a[DATE] == null && config2._a[MONTH] == null) { - dayOfYearFromWeekInfo(config2); + return colorString.to.hex(rgbArray) + alphaHex; + }, + rgbNumber() { + const rgb = this.rgb().color; + return (rgb[0] & 255) << 16 | (rgb[1] & 255) << 8 | rgb[2] & 255; + }, + luminosity() { + const rgb = this.rgb().color; + const lum = []; + for (const [i3, element] of rgb.entries()) { + const chan = element / 255; + lum[i3] = chan <= 0.04045 ? chan / 12.92 : ((chan + 0.055) / 1.055) ** 2.4; } - if (config2._dayOfYear != null) { - yearToUse = defaults(config2._a[YEAR], currentDate[YEAR]); - if (config2._dayOfYear > daysInYear2(yearToUse) || config2._dayOfYear === 0) { - getParsingFlags(config2)._overflowDayOfYear = true; - } - date = createUTCDate(yearToUse, 0, config2._dayOfYear); - config2._a[MONTH] = date.getUTCMonth(); - config2._a[DATE] = date.getUTCDate(); + return 0.2126 * lum[0] + 0.7152 * lum[1] + 0.0722 * lum[2]; + }, + contrast(color2) { + const lum1 = this.luminosity(); + const lum2 = color2.luminosity(); + if (lum1 > lum2) { + return (lum1 + 0.05) / (lum2 + 0.05); } - for (i3 = 0; i3 < 3 && config2._a[i3] == null; ++i3) { - config2._a[i3] = input[i3] = currentDate[i3]; + return (lum2 + 0.05) / (lum1 + 0.05); + }, + level(color2) { + const contrastRatio = this.contrast(color2); + if (contrastRatio >= 7) { + return "AAA"; } - for (; i3 < 7; i3++) { - config2._a[i3] = input[i3] = config2._a[i3] == null ? i3 === 2 ? 1 : 0 : config2._a[i3]; + return contrastRatio >= 4.5 ? "AA" : ""; + }, + isDark() { + const rgb = this.rgb().color; + const yiq = (rgb[0] * 2126 + rgb[1] * 7152 + rgb[2] * 722) / 1e4; + return yiq < 128; + }, + isLight() { + return !this.isDark(); + }, + negate() { + const rgb = this.rgb(); + for (let i3 = 0; i3 < 3; i3++) { + rgb.color[i3] = 255 - rgb.color[i3]; } - if (config2._a[HOUR] === 24 && config2._a[MINUTE] === 0 && config2._a[SECOND] === 0 && config2._a[MILLISECOND] === 0) { - config2._nextDay = true; - config2._a[HOUR] = 0; + return rgb; + }, + lighten(ratio) { + const hsl = this.hsl(); + hsl.color[2] += hsl.color[2] * ratio; + return hsl; + }, + darken(ratio) { + const hsl = this.hsl(); + hsl.color[2] -= hsl.color[2] * ratio; + return hsl; + }, + saturate(ratio) { + const hsl = this.hsl(); + hsl.color[1] += hsl.color[1] * ratio; + return hsl; + }, + desaturate(ratio) { + const hsl = this.hsl(); + hsl.color[1] -= hsl.color[1] * ratio; + return hsl; + }, + whiten(ratio) { + const hwb = this.hwb(); + hwb.color[1] += hwb.color[1] * ratio; + return hwb; + }, + blacken(ratio) { + const hwb = this.hwb(); + hwb.color[2] += hwb.color[2] * ratio; + return hwb; + }, + grayscale() { + const rgb = this.rgb().color; + const value = rgb[0] * 0.3 + rgb[1] * 0.59 + rgb[2] * 0.11; + return Color2.rgb(value, value, value); + }, + fade(ratio) { + return this.alpha(this.valpha - this.valpha * ratio); + }, + opaquer(ratio) { + return this.alpha(this.valpha + this.valpha * ratio); + }, + rotate(degrees) { + const hsl = this.hsl(); + let hue = hsl.color[0]; + hue = (hue + degrees) % 360; + hue = hue < 0 ? 360 + hue : hue; + hsl.color[0] = hue; + return hsl; + }, + mix(mixinColor, weight) { + if (!mixinColor || !mixinColor.rgb) { + throw new Error('Argument to "mix" was not a Color instance, but rather an instance of ' + typeof mixinColor); } - config2._d = (config2._useUTC ? createUTCDate : createDate).apply(null, input); - expectedWeekday = config2._useUTC ? config2._d.getUTCDay() : config2._d.getDay(); - if (config2._tzm != null) { - config2._d.setUTCMinutes(config2._d.getUTCMinutes() - config2._tzm); + const color1 = mixinColor.rgb(); + const color2 = this.rgb(); + const p3 = weight === void 0 ? 0.5 : weight; + const w4 = 2 * p3 - 1; + const a3 = color1.alpha() - color2.alpha(); + const w1 = ((w4 * a3 === -1 ? w4 : (w4 + a3) / (1 + w4 * a3)) + 1) / 2; + const w22 = 1 - w1; + return Color2.rgb(w1 * color1.red() + w22 * color2.red(), w1 * color1.green() + w22 * color2.green(), w1 * color1.blue() + w22 * color2.blue(), color1.alpha() * p3 + color2.alpha() * (1 - p3)); + } + }; + for (const model of Object.keys(convert2)) { + if (skippedModels.includes(model)) { + continue; + } + const { channels } = convert2[model]; + Color2.prototype[model] = function(...args) { + if (this.model === model) { + return new Color2(this); } - if (config2._nextDay) { - config2._a[HOUR] = 24; + if (args.length > 0) { + return new Color2(args, model); } - if (config2._w && typeof config2._w.d !== "undefined" && config2._w.d !== expectedWeekday) { - getParsingFlags(config2).weekdayMismatch = true; + return new Color2([...assertArray(convert2[this.model][model].raw(this.color)), this.valpha], model); + }; + Color2[model] = function(...args) { + let color = args[0]; + if (typeof color === "number") { + color = zeroArray(args, channels); } + return new Color2(color, model); + }; + } + function roundTo2(number, places) { + return Number(number.toFixed(places)); + } + function roundToPlace(places) { + return function(number) { + return roundTo2(number, places); + }; + } + function getset(model, channel, modifier) { + model = Array.isArray(model) ? model : [model]; + for (const m3 of model) { + (limiters[m3] || (limiters[m3] = []))[channel] = modifier; } - function dayOfYearFromWeekInfo(config2) { - var w4, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek; - w4 = config2._w; - if (w4.GG != null || w4.W != null || w4.E != null) { - dow = 1; - doy = 4; - weekYear = defaults(w4.GG, config2._a[YEAR], weekOfYear2(createLocal(), 1, 4).year); - week = defaults(w4.W, 1); - weekday = defaults(w4.E, 1); - if (weekday < 1 || weekday > 7) { - weekdayOverflow = true; - } - } else { - dow = config2._locale._week.dow; - doy = config2._locale._week.doy; - curWeek = weekOfYear2(createLocal(), dow, doy); - weekYear = defaults(w4.gg, config2._a[YEAR], curWeek.year); - week = defaults(w4.w, curWeek.week); - if (w4.d != null) { - weekday = w4.d; - if (weekday < 0 || weekday > 6) { - weekdayOverflow = true; - } - } else if (w4.e != null) { - weekday = w4.e + dow; - if (w4.e < 0 || w4.e > 6) { - weekdayOverflow = true; - } - } else { - weekday = dow; + model = model[0]; + return function(value) { + let result; + if (value !== void 0) { + if (modifier) { + value = modifier(value); } + result = this[model](); + result.color[channel] = value; + return result; } - if (week < 1 || week > weeksInYear(weekYear, dow, doy)) { - getParsingFlags(config2)._overflowWeeks = true; - } else if (weekdayOverflow != null) { - getParsingFlags(config2)._overflowWeekday = true; - } else { - temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy); - config2._a[YEAR] = temp.year; - config2._dayOfYear = temp.dayOfYear; + result = this[model]().color[channel]; + if (modifier) { + result = modifier(result); } - } - hooks.ISO_8601 = function() { + return result; }; - hooks.RFC_2822 = function() { + } + function maxfn(max) { + return function(v3) { + return Math.max(0, Math.min(max, v3)); }; - function configFromStringAndFormat(config2) { - if (config2._f === hooks.ISO_8601) { - configFromISO(config2); - return; - } - if (config2._f === hooks.RFC_2822) { - configFromRFC2822(config2); - return; - } - config2._a = []; - getParsingFlags(config2).empty = true; - var string = "" + config2._i, i3, parsedInput, tokens2, token2, skipped, stringLength = string.length, totalParsedInputLength = 0, era, tokenLen; - tokens2 = expandFormat(config2._f, config2._locale).match(formattingTokens) || []; - tokenLen = tokens2.length; - for (i3 = 0; i3 < tokenLen; i3++) { - token2 = tokens2[i3]; - parsedInput = (string.match(getParseRegexForToken(token2, config2)) || [])[0]; - if (parsedInput) { - skipped = string.substr(0, string.indexOf(parsedInput)); - if (skipped.length > 0) { - getParsingFlags(config2).unusedInput.push(skipped); - } - string = string.slice(string.indexOf(parsedInput) + parsedInput.length); - totalParsedInputLength += parsedInput.length; - } - if (formatTokenFunctions[token2]) { - if (parsedInput) { - getParsingFlags(config2).empty = false; - } else { - getParsingFlags(config2).unusedTokens.push(token2); - } - addTimeToArrayFromToken(token2, parsedInput, config2); - } else if (config2._strict && !parsedInput) { - getParsingFlags(config2).unusedTokens.push(token2); - } - } - getParsingFlags(config2).charsLeftOver = stringLength - totalParsedInputLength; - if (string.length > 0) { - getParsingFlags(config2).unusedInput.push(string); - } - if (config2._a[HOUR] <= 12 && getParsingFlags(config2).bigHour === true && config2._a[HOUR] > 0) { - getParsingFlags(config2).bigHour = void 0; - } - getParsingFlags(config2).parsedDateParts = config2._a.slice(0); - getParsingFlags(config2).meridiem = config2._meridiem; - config2._a[HOUR] = meridiemFixWrap(config2._locale, config2._a[HOUR], config2._meridiem); - era = getParsingFlags(config2).era; - if (era !== null) { - config2._a[YEAR] = config2._locale.erasConvertYear(era, config2._a[YEAR]); + } + function assertArray(value) { + return Array.isArray(value) ? value : [value]; + } + function zeroArray(array, length) { + for (let i3 = 0; i3 < length; i3++) { + if (typeof array[i3] !== "number") { + array[i3] = 0; } - configFromArray(config2); - checkOverflow(config2); } - function meridiemFixWrap(locale2, hour, meridiem2) { - var isPm; - if (meridiem2 == null) { - return hour; - } - if (locale2.meridiemHour != null) { - return locale2.meridiemHour(hour, meridiem2); - } else if (locale2.isPM != null) { - isPm = locale2.isPM(meridiem2); - if (isPm && hour < 12) { - hour += 12; - } - if (!isPm && hour === 12) { - hour = 0; - } - return hour; - } else { - return hour; + return array; + } + module2.exports = Color2; + } +}); + +// node_modules/dav/dav.js +var require_dav = __commonJS({ + "node_modules/dav/dav.js"(exports, module2) { + if (!Array.prototype.find) { + Array.prototype.find = function(predicate) { + if (this == null) { + throw new TypeError("Array.prototype.find called on null or undefined"); } - } - function configFromStringAndArray(config2) { - var tempConfig, bestMoment, scoreToBeat, i3, currentScore, validFormatFound, bestFormatIsValid = false, configfLen = config2._f.length; - if (configfLen === 0) { - getParsingFlags(config2).invalidFormat = true; - config2._d = new Date(NaN); - return; + if (typeof predicate !== "function") { + throw new TypeError("predicate must be a function"); } - for (i3 = 0; i3 < configfLen; i3++) { - currentScore = 0; - validFormatFound = false; - tempConfig = copyConfig({}, config2); - if (config2._useUTC != null) { - tempConfig._useUTC = config2._useUTC; + var list = Object(this); + var length = list.length >>> 0; + var thisArg = arguments[1]; + var value; + for (var i3 = 0; i3 < length; i3++) { + value = list[i3]; + if (predicate.call(thisArg, value, i3, list)) { + return value; } - tempConfig._f = config2._f[i3]; - configFromStringAndFormat(tempConfig); - if (isValid(tempConfig)) { - validFormatFound = true; + } + return void 0; + }; + } + if (!Object.assign) { + Object.defineProperty(Object, "assign", { + enumerable: false, + configurable: true, + writable: true, + value: function(target, firstSource) { + "use strict"; + if (target === void 0 || target === null) { + throw new TypeError("Cannot convert first argument to object"); } - currentScore += getParsingFlags(tempConfig).charsLeftOver; - currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10; - getParsingFlags(tempConfig).score = currentScore; - if (!bestFormatIsValid) { - if (scoreToBeat == null || currentScore < scoreToBeat || validFormatFound) { - scoreToBeat = currentScore; - bestMoment = tempConfig; - if (validFormatFound) { - bestFormatIsValid = true; - } + var to = Object(target); + for (var i3 = 1; i3 < arguments.length; i3++) { + var nextSource = arguments[i3]; + if (nextSource === void 0 || nextSource === null) { + continue; } - } else { - if (currentScore < scoreToBeat) { - scoreToBeat = currentScore; - bestMoment = tempConfig; + nextSource = Object(nextSource); + var keysArray = Object.keys(Object(nextSource)); + for (var nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex++) { + var nextKey = keysArray[nextIndex]; + var desc = Object.getOwnPropertyDescriptor(nextSource, nextKey); + if (desc !== void 0 && desc.enumerable) { + to[nextKey] = nextSource[nextKey]; + } } } + return to; } - extend(config2, bestMoment || tempConfig); - } - function configFromObject(config2) { - if (config2._d) { - return; + }); + } + !function(global2) { + "use strict"; + var hasOwn = Object.prototype.hasOwnProperty; + var undefined2; + var iteratorSymbol = typeof Symbol === "function" && Symbol.iterator || "@@iterator"; + var inModule = typeof module2 === "object"; + var runtime = global2.regeneratorRuntime; + if (runtime) { + if (inModule) { + module2.exports = runtime; } - var i3 = normalizeObjectUnits(config2._i), dayOrDate = i3.day === void 0 ? i3.date : i3.day; - config2._a = map([i3.year, i3.month, dayOrDate, i3.hour, i3.minute, i3.second, i3.millisecond], function(obj) { - return obj && parseInt(obj, 10); - }); - configFromArray(config2); + return; } - function createFromConfig(config2) { - var res = new Moment(checkOverflow(prepareConfig(config2))); - if (res._nextDay) { - res.add(1, "d"); - res._nextDay = void 0; - } - return res; + runtime = global2.regeneratorRuntime = inModule ? module2.exports : {}; + function wrap(innerFn, outerFn, self2, tryLocsList) { + var generator = Object.create((outerFn || Generator).prototype); + generator._invoke = makeInvokeMethod(innerFn, self2 || null, new Context(tryLocsList || [])); + return generator; } - function prepareConfig(config2) { - var input = config2._i, format2 = config2._f; - config2._locale = config2._locale || getLocale(config2._l); - if (input === null || format2 === void 0 && input === "") { - return createInvalid({ nullInput: true }); - } - if (typeof input === "string") { - config2._i = input = config2._locale.preparse(input); - } - if (isMoment(input)) { - return new Moment(checkOverflow(input)); - } else if (isDate2(input)) { - config2._d = input; - } else if (isArray(format2)) { - configFromStringAndArray(config2); - } else if (format2) { - configFromStringAndFormat(config2); - } else { - configFromInput(config2); - } - if (!isValid(config2)) { - config2._d = null; + runtime.wrap = wrap; + function tryCatch(fn, obj, arg) { + try { + return { type: "normal", arg: fn.call(obj, arg) }; + } catch (err) { + return { type: "throw", arg: err }; } - return config2; } - function configFromInput(config2) { - var input = config2._i; - if (isUndefined2(input)) { - config2._d = new Date(hooks.now()); - } else if (isDate2(input)) { - config2._d = new Date(input.valueOf()); - } else if (typeof input === "string") { - configFromString(config2); - } else if (isArray(input)) { - config2._a = map(input.slice(0), function(obj) { - return parseInt(obj, 10); - }); - configFromArray(config2); - } else if (isObject(input)) { - configFromObject(config2); - } else if (isNumber2(input)) { - config2._d = new Date(input); - } else { - hooks.createFromInputFallback(config2); - } + var GenStateSuspendedStart = "suspendedStart"; + var GenStateSuspendedYield = "suspendedYield"; + var GenStateExecuting = "executing"; + var GenStateCompleted = "completed"; + var ContinueSentinel = {}; + function Generator() { } - function createLocalOrUTC(input, format2, locale2, strict, isUTC) { - var c3 = {}; - if (format2 === true || format2 === false) { - strict = format2; - format2 = void 0; - } - if (locale2 === true || locale2 === false) { - strict = locale2; - locale2 = void 0; - } - if (isObject(input) && isObjectEmpty(input) || isArray(input) && input.length === 0) { - input = void 0; - } - c3._isAMomentObject = true; - c3._useUTC = c3._isUTC = isUTC; - c3._l = locale2; - c3._i = input; - c3._f = format2; - c3._strict = strict; - return createFromConfig(c3); + function GeneratorFunction() { } - function createLocal(input, format2, locale2, strict) { - return createLocalOrUTC(input, format2, locale2, strict, false); + function GeneratorFunctionPrototype() { } - var prototypeMin = deprecate("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/", function() { - var other = createLocal.apply(null, arguments); - if (this.isValid() && other.isValid()) { - return other < this ? this : other; - } else { - return createInvalid(); - } - }), prototypeMax = deprecate("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/", function() { - var other = createLocal.apply(null, arguments); - if (this.isValid() && other.isValid()) { - return other > this ? this : other; - } else { - return createInvalid(); - } - }); - function pickBy(fn, moments) { - var res, i3; - if (moments.length === 1 && isArray(moments[0])) { - moments = moments[0]; - } - if (!moments.length) { - return createLocal(); - } - res = moments[0]; - for (i3 = 1; i3 < moments.length; ++i3) { - if (!moments[i3].isValid() || moments[i3][fn](res)) { - res = moments[i3]; + var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype; + GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype; + GeneratorFunctionPrototype.constructor = GeneratorFunction; + GeneratorFunction.displayName = "GeneratorFunction"; + runtime.isGeneratorFunction = function(genFun) { + var ctor = typeof genFun === "function" && genFun.constructor; + return ctor ? ctor === GeneratorFunction || (ctor.displayName || ctor.name) === "GeneratorFunction" : false; + }; + runtime.mark = function(genFun) { + genFun.__proto__ = GeneratorFunctionPrototype; + genFun.prototype = Object.create(Gp); + return genFun; + }; + runtime.async = function(innerFn, outerFn, self2, tryLocsList) { + return new Promise(function(resolve, reject) { + var generator = wrap(innerFn, outerFn, self2, tryLocsList); + var callNext = step.bind(generator, "next"); + var callThrow = step.bind(generator, "throw"); + function step(method, arg) { + var record = tryCatch(generator[method], generator, arg); + if (record.type === "throw") { + reject(record.arg); + return; + } + var info = record.arg; + if (info.done) { + resolve(info.value); + } else { + Promise.resolve(info.value).then(callNext, callThrow); + } } - } - return res; - } - function min() { - var args = [].slice.call(arguments, 0); - return pickBy("isBefore", args); - } - function max() { - var args = [].slice.call(arguments, 0); - return pickBy("isAfter", args); - } - var now2 = function() { - return Date.now ? Date.now() : +new Date(); + callNext(); + }); }; - var ordering = [ - "year", - "quarter", - "month", - "week", - "day", - "hour", - "minute", - "second", - "millisecond" - ]; - function isDurationValid(m3) { - var key, unitHasDecimal = false, i3, orderLen = ordering.length; - for (key in m3) { - if (hasOwnProp(m3, key) && !(indexOf.call(ordering, key) !== -1 && (m3[key] == null || !isNaN(m3[key])))) { - return false; + function makeInvokeMethod(innerFn, self2, context) { + var state = GenStateSuspendedStart; + return function invoke(method, arg) { + if (state === GenStateExecuting) { + throw new Error("Generator is already running"); } - } - for (i3 = 0; i3 < orderLen; ++i3) { - if (m3[ordering[i3]]) { - if (unitHasDecimal) { - return false; + if (state === GenStateCompleted) { + return doneResult(); + } + while (true) { + var delegate = context.delegate; + if (delegate) { + if (method === "return" || method === "throw" && delegate.iterator[method] === undefined2) { + context.delegate = null; + var returnMethod = delegate.iterator["return"]; + if (returnMethod) { + var record = tryCatch(returnMethod, delegate.iterator, arg); + if (record.type === "throw") { + method = "throw"; + arg = record.arg; + continue; + } + } + if (method === "return") { + continue; + } + } + var record = tryCatch(delegate.iterator[method], delegate.iterator, arg); + if (record.type === "throw") { + context.delegate = null; + method = "throw"; + arg = record.arg; + continue; + } + method = "next"; + arg = undefined2; + var info = record.arg; + if (info.done) { + context[delegate.resultName] = info.value; + context.next = delegate.nextLoc; + } else { + state = GenStateSuspendedYield; + return info; + } + context.delegate = null; } - if (parseFloat(m3[ordering[i3]]) !== toInt(m3[ordering[i3]])) { - unitHasDecimal = true; + if (method === "next") { + if (state === GenStateSuspendedYield) { + context.sent = arg; + } else { + delete context.sent; + } + } else if (method === "throw") { + if (state === GenStateSuspendedStart) { + state = GenStateCompleted; + throw arg; + } + if (context.dispatchException(arg)) { + method = "next"; + arg = undefined2; + } + } else if (method === "return") { + context.abrupt("return", arg); + } + state = GenStateExecuting; + var record = tryCatch(innerFn, self2, context); + if (record.type === "normal") { + state = context.done ? GenStateCompleted : GenStateSuspendedYield; + var info = { + value: record.arg, + done: context.done + }; + if (record.arg === ContinueSentinel) { + if (context.delegate && method === "next") { + arg = undefined2; + } + } else { + return info; + } + } else if (record.type === "throw") { + state = GenStateCompleted; + method = "throw"; + arg = record.arg; } } - } - return true; + }; } - function isValid$1() { - return this._isValid; + function defineGeneratorMethod(method) { + Gp[method] = function(arg) { + return this._invoke(method, arg); + }; } - function createInvalid$1() { - return createDuration2(NaN); + defineGeneratorMethod("next"); + defineGeneratorMethod("throw"); + defineGeneratorMethod("return"); + Gp[iteratorSymbol] = function() { + return this; + }; + Gp.toString = function() { + return "[object Generator]"; + }; + function pushTryEntry(locs) { + var entry = { tryLoc: locs[0] }; + if (1 in locs) { + entry.catchLoc = locs[1]; + } + if (2 in locs) { + entry.finallyLoc = locs[2]; + entry.afterLoc = locs[3]; + } + this.tryEntries.push(entry); } - function Duration2(duration) { - var normalizedInput = normalizeObjectUnits(duration), years2 = normalizedInput.year || 0, quarters = normalizedInput.quarter || 0, months3 = normalizedInput.month || 0, weeks2 = normalizedInput.week || normalizedInput.isoWeek || 0, days2 = normalizedInput.day || 0, hours2 = normalizedInput.hour || 0, minutes2 = normalizedInput.minute || 0, seconds2 = normalizedInput.second || 0, milliseconds2 = normalizedInput.millisecond || 0; - this._isValid = isDurationValid(normalizedInput); - this._milliseconds = +milliseconds2 + seconds2 * 1e3 + minutes2 * 6e4 + hours2 * 1e3 * 60 * 60; - this._days = +days2 + weeks2 * 7; - this._months = +months3 + quarters * 3 + years2 * 12; - this._data = {}; - this._locale = getLocale(); - this._bubble(); + function resetTryEntry(entry) { + var record = entry.completion || {}; + record.type = "normal"; + delete record.arg; + entry.completion = record; } - function isDuration(obj) { - return obj instanceof Duration2; + function Context(tryLocsList) { + this.tryEntries = [{ tryLoc: "root" }]; + tryLocsList.forEach(pushTryEntry, this); + this.reset(); } - function absRound(number) { - if (number < 0) { - return Math.round(-1 * number) * -1; - } else { - return Math.round(number); + runtime.keys = function(object) { + var keys = []; + for (var key in object) { + keys.push(key); } - } - function compareArrays(array1, array2, dontConvert) { - var len = Math.min(array1.length, array2.length), lengthDiff = Math.abs(array1.length - array2.length), diffs = 0, i3; - for (i3 = 0; i3 < len; i3++) { - if (dontConvert && array1[i3] !== array2[i3] || !dontConvert && toInt(array1[i3]) !== toInt(array2[i3])) { - diffs++; + keys.reverse(); + return function next() { + while (keys.length) { + var key2 = keys.pop(); + if (key2 in object) { + next.value = key2; + next.done = false; + return next; + } } - } - return diffs + lengthDiff; - } - function offset2(token2, separator) { - addFormatToken(token2, 0, 0, function() { - var offset3 = this.utcOffset(), sign2 = "+"; - if (offset3 < 0) { - offset3 = -offset3; - sign2 = "-"; + next.done = true; + return next; + }; + }; + function values(iterable) { + if (iterable) { + var iteratorMethod = iterable[iteratorSymbol]; + if (iteratorMethod) { + return iteratorMethod.call(iterable); + } + if (typeof iterable.next === "function") { + return iterable; + } + if (!isNaN(iterable.length)) { + var i3 = -1, next = function next2() { + while (++i3 < iterable.length) { + if (hasOwn.call(iterable, i3)) { + next2.value = iterable[i3]; + next2.done = false; + return next2; + } + } + next2.value = undefined2; + next2.done = true; + return next2; + }; + return next.next = next; } - return sign2 + zeroFill(~~(offset3 / 60), 2) + separator + zeroFill(~~offset3 % 60, 2); - }); - } - offset2("Z", ":"); - offset2("ZZ", ""); - addRegexToken("Z", matchShortOffset); - addRegexToken("ZZ", matchShortOffset); - addParseToken(["Z", "ZZ"], function(input, array, config2) { - config2._useUTC = true; - config2._tzm = offsetFromString(matchShortOffset, input); - }); - var chunkOffset = /([\+\-]|\d\d)/gi; - function offsetFromString(matcher, string) { - var matches = (string || "").match(matcher), chunk, parts, minutes2; - if (matches === null) { - return null; - } - chunk = matches[matches.length - 1] || []; - parts = (chunk + "").match(chunkOffset) || ["-", 0, 0]; - minutes2 = +(parts[1] * 60) + toInt(parts[2]); - return minutes2 === 0 ? 0 : parts[0] === "+" ? minutes2 : -minutes2; - } - function cloneWithOffset(input, model) { - var res, diff2; - if (model._isUTC) { - res = model.clone(); - diff2 = (isMoment(input) || isDate2(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf(); - res._d.setTime(res._d.valueOf() + diff2); - hooks.updateOffset(res, false); - return res; - } else { - return createLocal(input).local(); } + return { next: doneResult }; } - function getDateOffset(m3) { - return -Math.round(m3._d.getTimezoneOffset()); + runtime.values = values; + function doneResult() { + return { value: undefined2, done: true }; } - hooks.updateOffset = function() { - }; - function getSetOffset(input, keepLocalTime, keepMinutes) { - var offset3 = this._offset || 0, localAdjust; - if (!this.isValid()) { - return input != null ? this : NaN; - } - if (input != null) { - if (typeof input === "string") { - input = offsetFromString(matchShortOffset, input); - if (input === null) { - return this; - } - } else if (Math.abs(input) < 16 && !keepMinutes) { - input = input * 60; + Context.prototype = { + constructor: Context, + reset: function() { + this.prev = 0; + this.next = 0; + this.sent = undefined2; + this.done = false; + this.delegate = null; + this.tryEntries.forEach(resetTryEntry); + for (var tempIndex = 0, tempName; hasOwn.call(this, tempName = "t" + tempIndex) || tempIndex < 20; ++tempIndex) { + this[tempName] = null; } - if (!this._isUTC && keepLocalTime) { - localAdjust = getDateOffset(this); + }, + stop: function() { + this.done = true; + var rootEntry = this.tryEntries[0]; + var rootRecord = rootEntry.completion; + if (rootRecord.type === "throw") { + throw rootRecord.arg; } - this._offset = input; - this._isUTC = true; - if (localAdjust != null) { - this.add(localAdjust, "m"); + return this.rval; + }, + dispatchException: function(exception) { + if (this.done) { + throw exception; } - if (offset3 !== input) { - if (!keepLocalTime || this._changeInProgress) { - addSubtract(this, createDuration2(input - offset3, "m"), 1, false); - } else if (!this._changeInProgress) { - this._changeInProgress = true; - hooks.updateOffset(this, true); - this._changeInProgress = null; + var context = this; + function handle(loc, caught) { + record.type = "throw"; + record.arg = exception; + context.next = loc; + return !!caught; + } + for (var i3 = this.tryEntries.length - 1; i3 >= 0; --i3) { + var entry = this.tryEntries[i3]; + var record = entry.completion; + if (entry.tryLoc === "root") { + return handle("end"); + } + if (entry.tryLoc <= this.prev) { + var hasCatch = hasOwn.call(entry, "catchLoc"); + var hasFinally = hasOwn.call(entry, "finallyLoc"); + if (hasCatch && hasFinally) { + if (this.prev < entry.catchLoc) { + return handle(entry.catchLoc, true); + } else if (this.prev < entry.finallyLoc) { + return handle(entry.finallyLoc); + } + } else if (hasCatch) { + if (this.prev < entry.catchLoc) { + return handle(entry.catchLoc, true); + } + } else if (hasFinally) { + if (this.prev < entry.finallyLoc) { + return handle(entry.finallyLoc); + } + } else { + throw new Error("try statement without catch or finally"); + } } } - return this; - } else { - return this._isUTC ? offset3 : getDateOffset(this); - } - } - function getSetZone(input, keepLocalTime) { - if (input != null) { - if (typeof input !== "string") { - input = -input; + }, + abrupt: function(type, arg) { + for (var i3 = this.tryEntries.length - 1; i3 >= 0; --i3) { + var entry = this.tryEntries[i3]; + if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { + var finallyEntry = entry; + break; + } } - this.utcOffset(input, keepLocalTime); - return this; - } else { - return -this.utcOffset(); - } - } - function setOffsetToUTC(keepLocalTime) { - return this.utcOffset(0, keepLocalTime); - } - function setOffsetToLocal(keepLocalTime) { - if (this._isUTC) { - this.utcOffset(0, keepLocalTime); - this._isUTC = false; - if (keepLocalTime) { - this.subtract(getDateOffset(this), "m"); + if (finallyEntry && (type === "break" || type === "continue") && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc) { + finallyEntry = null; } - } - return this; - } - function setOffsetToParsedOffset() { - if (this._tzm != null) { - this.utcOffset(this._tzm, false, true); - } else if (typeof this._i === "string") { - var tZone = offsetFromString(matchOffset, this._i); - if (tZone != null) { - this.utcOffset(tZone); + var record = finallyEntry ? finallyEntry.completion : {}; + record.type = type; + record.arg = arg; + if (finallyEntry) { + this.next = finallyEntry.finallyLoc; } else { - this.utcOffset(0, true); + this.complete(record); } - } - return this; - } - function hasAlignedHourOffset(input) { - if (!this.isValid()) { - return false; - } - input = input ? createLocal(input).utcOffset() : 0; - return (this.utcOffset() - input) % 60 === 0; - } - function isDaylightSavingTime() { - return this.utcOffset() > this.clone().month(0).utcOffset() || this.utcOffset() > this.clone().month(5).utcOffset(); - } - function isDaylightSavingTimeShifted() { - if (!isUndefined2(this._isDSTShifted)) { - return this._isDSTShifted; - } - var c3 = {}, other; - copyConfig(c3, this); - c3 = prepareConfig(c3); - if (c3._a) { - other = c3._isUTC ? createUTC(c3._a) : createLocal(c3._a); - this._isDSTShifted = this.isValid() && compareArrays(c3._a, other.toArray()) > 0; - } else { - this._isDSTShifted = false; - } - return this._isDSTShifted; - } - function isLocal() { - return this.isValid() ? !this._isUTC : false; - } - function isUtcOffset() { - return this.isValid() ? this._isUTC : false; - } - function isUtc() { - return this.isValid() ? this._isUTC && this._offset === 0 : false; - } - var aspNetRegex = /^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/, isoRegex = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/; - function createDuration2(input, key) { - var duration = input, match5 = null, sign2, ret, diffRes; - if (isDuration(input)) { - duration = { - ms: input._milliseconds, - d: input._days, - M: input._months - }; - } else if (isNumber2(input) || !isNaN(+input)) { - duration = {}; - if (key) { - duration[key] = +input; - } else { - duration.milliseconds = +input; + return ContinueSentinel; + }, + complete: function(record, afterLoc) { + if (record.type === "throw") { + throw record.arg; } - } else if (match5 = aspNetRegex.exec(input)) { - sign2 = match5[1] === "-" ? -1 : 1; - duration = { - y: 0, - d: toInt(match5[DATE]) * sign2, - h: toInt(match5[HOUR]) * sign2, - m: toInt(match5[MINUTE]) * sign2, - s: toInt(match5[SECOND]) * sign2, - ms: toInt(absRound(match5[MILLISECOND] * 1e3)) * sign2 - }; - } else if (match5 = isoRegex.exec(input)) { - sign2 = match5[1] === "-" ? -1 : 1; - duration = { - y: parseIso(match5[2], sign2), - M: parseIso(match5[3], sign2), - w: parseIso(match5[4], sign2), - d: parseIso(match5[5], sign2), - h: parseIso(match5[6], sign2), - m: parseIso(match5[7], sign2), - s: parseIso(match5[8], sign2) + if (record.type === "break" || record.type === "continue") { + this.next = record.arg; + } else if (record.type === "return") { + this.rval = record.arg; + this.next = "end"; + } else if (record.type === "normal" && afterLoc) { + this.next = afterLoc; + } + }, + finish: function(finallyLoc) { + for (var i3 = this.tryEntries.length - 1; i3 >= 0; --i3) { + var entry = this.tryEntries[i3]; + if (entry.finallyLoc === finallyLoc) { + this.complete(entry.completion, entry.afterLoc); + resetTryEntry(entry); + return ContinueSentinel; + } + } + }, + "catch": function(tryLoc) { + for (var i3 = this.tryEntries.length - 1; i3 >= 0; --i3) { + var entry = this.tryEntries[i3]; + if (entry.tryLoc === tryLoc) { + var record = entry.completion; + if (record.type === "throw") { + var thrown = record.arg; + resetTryEntry(entry); + } + return thrown; + } + } + throw new Error("illegal catch attempt"); + }, + delegateYield: function(iterable, resultName, nextLoc) { + this.delegate = { + iterator: values(iterable), + resultName, + nextLoc }; - } else if (duration == null) { - duration = {}; - } else if (typeof duration === "object" && ("from" in duration || "to" in duration)) { - diffRes = momentsDifference(createLocal(duration.from), createLocal(duration.to)); - duration = {}; - duration.ms = diffRes.milliseconds; - duration.M = diffRes.months; - } - ret = new Duration2(duration); - if (isDuration(input) && hasOwnProp(input, "_locale")) { - ret._locale = input._locale; - } - if (isDuration(input) && hasOwnProp(input, "_isValid")) { - ret._isValid = input._isValid; - } - return ret; - } - createDuration2.fn = Duration2.prototype; - createDuration2.invalid = createInvalid$1; - function parseIso(inp, sign2) { - var res = inp && parseFloat(inp.replace(",", ".")); - return (isNaN(res) ? 0 : res) * sign2; - } - function positiveMomentsDifference(base, other) { - var res = {}; - res.months = other.month() - base.month() + (other.year() - base.year()) * 12; - if (base.clone().add(res.months, "M").isAfter(other)) { - --res.months; - } - res.milliseconds = +other - +base.clone().add(res.months, "M"); - return res; - } - function momentsDifference(base, other) { - var res; - if (!(base.isValid() && other.isValid())) { - return { milliseconds: 0, months: 0 }; + return ContinueSentinel; } - other = cloneWithOffset(other, base); - if (base.isBefore(other)) { - res = positiveMomentsDifference(base, other); + }; + }(typeof global === "object" ? global : typeof window === "object" ? window : typeof self === "object" ? self : exports); + (function(f3) { + if (typeof exports === "object" && typeof module2 !== "undefined") { + module2.exports = f3(); + } else if (typeof define === "function" && define.amd) { + define([], f3); + } else { + var g4; + if (typeof window !== "undefined") { + g4 = window; + } else if (typeof global !== "undefined") { + g4 = global; + } else if (typeof self !== "undefined") { + g4 = self; } else { - res = positiveMomentsDifference(other, base); - res.milliseconds = -res.milliseconds; - res.months = -res.months; + g4 = this; } - return res; + g4.dav = f3(); } - function createAdder(direction, name) { - return function(val, period) { - var dur, tmp; - if (period !== null && !isNaN(+period)) { - deprecateSimple(name, "moment()." + name + "(period, number) is deprecated. Please use moment()." + name + "(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."); - tmp = val; - val = period; - period = tmp; + })(function() { + var define2, module3, exports2; + return function e3(t3, n3, r3) { + function s4(o3, u3) { + if (!n3[o3]) { + if (!t3[o3]) { + var a3 = typeof require == "function" && require; + if (!u3 && a3) + return a3(o3, true); + if (i3) + return i3(o3, true); + var f3 = new Error("Cannot find module '" + o3 + "'"); + throw f3.code = "MODULE_NOT_FOUND", f3; + } + var l4 = n3[o3] = { exports: {} }; + t3[o3][0].call(l4.exports, function(e4) { + var n4 = t3[o3][1][e4]; + return s4(n4 ? n4 : e4); + }, l4, l4.exports, e3, t3, n3, r3); } - dur = createDuration2(val, period); - addSubtract(this, dur, direction); - return this; - }; - } - function addSubtract(mom, duration, isAdding, updateOffset) { - var milliseconds2 = duration._milliseconds, days2 = absRound(duration._days), months3 = absRound(duration._months); - if (!mom.isValid()) { - return; - } - updateOffset = updateOffset == null ? true : updateOffset; - if (months3) { - setMonth(mom, get(mom, "Month") + months3 * isAdding); - } - if (days2) { - set$1(mom, "Date", get(mom, "Date") + days2 * isAdding); - } - if (milliseconds2) { - mom._d.setTime(mom._d.valueOf() + milliseconds2 * isAdding); - } - if (updateOffset) { - hooks.updateOffset(mom, days2 || months3); - } - } - var add2 = createAdder(1, "add"), subtract = createAdder(-1, "subtract"); - function isString2(input) { - return typeof input === "string" || input instanceof String; - } - function isMomentInput(input) { - return isMoment(input) || isDate2(input) || isString2(input) || isNumber2(input) || isNumberOrStringArray(input) || isMomentInputObject(input) || input === null || input === void 0; - } - function isMomentInputObject(input) { - var objectTest = isObject(input) && !isObjectEmpty(input), propertyTest = false, properties = [ - "years", - "year", - "y", - "months", - "month", - "M", - "days", - "day", - "d", - "dates", - "date", - "D", - "hours", - "hour", - "h", - "minutes", - "minute", - "m", - "seconds", - "second", - "s", - "milliseconds", - "millisecond", - "ms" - ], i3, property, propertyLen = properties.length; - for (i3 = 0; i3 < propertyLen; i3 += 1) { - property = properties[i3]; - propertyTest = propertyTest || hasOwnProp(input, property); + return n3[o3].exports; } - return objectTest && propertyTest; - } - function isNumberOrStringArray(input) { - var arrayTest = isArray(input), dataTypeTest = false; - if (arrayTest) { - dataTypeTest = input.filter(function(item) { - return !isNumber2(item) && isString2(input); - }).length === 0; + var i3 = typeof require == "function" && require; + for (var o2 = 0; o2 < r3.length; o2++) + s4(r3[o2]); + return s4; + }({ 1: [function(require2, module4, exports3) { + "use strict"; + function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) + newObj[key] = obj[key]; + } + } + newObj["default"] = obj; + return newObj; + } } - return arrayTest && dataTypeTest; - } - function isCalendarSpec(input) { - var objectTest = isObject(input) && !isObjectEmpty(input), propertyTest = false, properties = [ - "sameDay", - "nextDay", - "lastDay", - "nextWeek", - "lastWeek", - "sameElse" - ], i3, property; - for (i3 = 0; i3 < properties.length; i3 += 1) { - property = properties[i3]; - propertyTest = propertyTest || hasOwnProp(input, property); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { "default": obj }; } - return objectTest && propertyTest; - } - function getCalendarFormat(myMoment, now3) { - var diff2 = myMoment.diff(now3, "days", true); - return diff2 < -6 ? "sameElse" : diff2 < -1 ? "lastWeek" : diff2 < 0 ? "lastDay" : diff2 < 1 ? "sameDay" : diff2 < 2 ? "nextDay" : diff2 < 7 ? "nextWeek" : "sameElse"; - } - function calendar$1(time, formats) { - if (arguments.length === 1) { - if (!arguments[0]) { - time = void 0; - formats = void 0; - } else if (isMomentInput(arguments[0])) { - time = arguments[0]; - formats = void 0; - } else if (isCalendarSpec(arguments[0])) { - formats = arguments[0]; - time = void 0; - } - } - var now3 = time || createLocal(), sod = cloneWithOffset(now3, this).startOf("day"), format2 = hooks.calendarFormat(this, sod) || "sameElse", output = formats && (isFunction(formats[format2]) ? formats[format2].call(this, now3) : formats[format2]); - return this.format(output || this.localeData().calendar(format2, this, createLocal(now3))); - } - function clone3() { - return new Moment(this); - } - function isAfter(input, units) { - var localInput = isMoment(input) ? input : createLocal(input); - if (!(this.isValid() && localInput.isValid())) { - return false; - } - units = normalizeUnits(units) || "millisecond"; - if (units === "millisecond") { - return this.valueOf() > localInput.valueOf(); - } else { - return localInput.valueOf() < this.clone().startOf(units).valueOf(); - } - } - function isBefore(input, units) { - var localInput = isMoment(input) ? input : createLocal(input); - if (!(this.isValid() && localInput.isValid())) { - return false; - } - units = normalizeUnits(units) || "millisecond"; - if (units === "millisecond") { - return this.valueOf() < localInput.valueOf(); - } else { - return this.clone().endOf(units).valueOf() < localInput.valueOf(); - } - } - function isBetween(from2, to2, units, inclusivity) { - var localFrom = isMoment(from2) ? from2 : createLocal(from2), localTo = isMoment(to2) ? to2 : createLocal(to2); - if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) { - return false; - } - inclusivity = inclusivity || "()"; - return (inclusivity[0] === "(" ? this.isAfter(localFrom, units) : !this.isBefore(localFrom, units)) && (inclusivity[1] === ")" ? this.isBefore(localTo, units) : !this.isAfter(localTo, units)); - } - function isSame(input, units) { - var localInput = isMoment(input) ? input : createLocal(input), inputMs; - if (!(this.isValid() && localInput.isValid())) { - return false; - } - units = normalizeUnits(units) || "millisecond"; - if (units === "millisecond") { - return this.valueOf() === localInput.valueOf(); - } else { - inputMs = localInput.valueOf(); - return this.clone().startOf(units).valueOf() <= inputMs && inputMs <= this.clone().endOf(units).valueOf(); - } - } - function isSameOrAfter(input, units) { - return this.isSame(input, units) || this.isAfter(input, units); - } - function isSameOrBefore(input, units) { - return this.isSame(input, units) || this.isBefore(input, units); - } - function diff(input, units, asFloat) { - var that, zoneDelta, output; - if (!this.isValid()) { - return NaN; - } - that = cloneWithOffset(input, this); - if (!that.isValid()) { - return NaN; - } - zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4; - units = normalizeUnits(units); - switch (units) { - case "year": - output = monthDiff(this, that) / 12; - break; - case "month": - output = monthDiff(this, that); - break; - case "quarter": - output = monthDiff(this, that) / 3; - break; - case "second": - output = (this - that) / 1e3; - break; - case "minute": - output = (this - that) / 6e4; - break; - case "hour": - output = (this - that) / 36e5; - break; - case "day": - output = (this - that - zoneDelta) / 864e5; - break; - case "week": - output = (this - that - zoneDelta) / 6048e5; - break; - default: - output = this - that; - } - return asFloat ? output : absFloor(output); - } - function monthDiff(a3, b3) { - if (a3.date() < b3.date()) { - return -monthDiff(b3, a3); - } - var wholeMonthDiff = (b3.year() - a3.year()) * 12 + (b3.month() - a3.month()), anchor = a3.clone().add(wholeMonthDiff, "months"), anchor2, adjust; - if (b3 - anchor < 0) { - anchor2 = a3.clone().add(wholeMonthDiff - 1, "months"); - adjust = (b3 - anchor) / (anchor - anchor2); - } else { - anchor2 = a3.clone().add(wholeMonthDiff + 1, "months"); - adjust = (b3 - anchor) / (anchor2 - anchor); - } - return -(wholeMonthDiff + adjust) || 0; - } - hooks.defaultFormat = "YYYY-MM-DDTHH:mm:ssZ"; - hooks.defaultFormatUtc = "YYYY-MM-DDTHH:mm:ss[Z]"; - function toString() { - return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ"); - } - function toISOString(keepOffset) { - if (!this.isValid()) { - return null; - } - var utc = keepOffset !== true, m3 = utc ? this.clone().utc() : this; - if (m3.year() < 0 || m3.year() > 9999) { - return formatMoment(m3, utc ? "YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]" : "YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"); - } - if (isFunction(Date.prototype.toISOString)) { - if (utc) { - return this.toDate().toISOString(); + var _co = require2("co"); + var _co2 = _interopRequireDefault(_co); + var _url = require2("url"); + var _url2 = _interopRequireDefault(_url); + var _calendars = require2("./calendars"); + var _contacts = require2("./contacts"); + var _fuzzy_url_equals = require2("./fuzzy_url_equals"); + var _fuzzy_url_equals2 = _interopRequireDefault(_fuzzy_url_equals); + var _model = require2("./model"); + var _namespace = require2("./namespace"); + var ns = _interopRequireWildcard(_namespace); + var _request = require2("./request"); + var request2 = _interopRequireWildcard(_request); + var debug = require2("./debug")("dav:accounts"); + var defaults = { + accountType: "caldav", + loadCollections: true, + loadObjects: false + }; + var serviceDiscovery = _co2["default"].wrap(regeneratorRuntime.mark(function callee$0$0(account, options) { + var endpoint, uri, req, xhr, _location; + return regeneratorRuntime.wrap(function callee$0$0$(context$1$0) { + while (1) + switch (context$1$0.prev = context$1$0.next) { + case 0: + debug("Attempt service discovery."); + endpoint = _url2["default"].parse(account.server); + endpoint.protocol = endpoint.protocol || "http"; + uri = _url2["default"].format({ + protocol: endpoint.protocol, + host: endpoint.host, + pathname: "/.well-known/" + options.accountType + }); + req = request2.basic({ method: "GET" }); + context$1$0.prev = 5; + context$1$0.next = 8; + return options.xhr.send(req, uri, { sandbox: options.sandbox }); + case 8: + xhr = context$1$0.sent; + if (!(xhr.status >= 300 && xhr.status < 400)) { + context$1$0.next = 14; + break; + } + _location = xhr.getResponseHeader("Location"); + if (!(typeof _location === "string" && _location.length)) { + context$1$0.next = 14; + break; + } + debug("Discovery redirected to " + _location); + return context$1$0.abrupt("return", _url2["default"].format({ + protocol: endpoint.protocol, + host: endpoint.host, + pathname: _location + })); + case 14: + context$1$0.next = 19; + break; + case 16: + context$1$0.prev = 16; + context$1$0.t0 = context$1$0["catch"](5); + debug("Discovery failed... failover to the provided url"); + case 19: + return context$1$0.abrupt("return", endpoint.href); + case 20: + case "end": + return context$1$0.stop(); + } + }, callee$0$0, this, [[5, 16]]); + })); + var principalUrl = _co2["default"].wrap(regeneratorRuntime.mark(function callee$0$0(account, options) { + var req, res, container; + return regeneratorRuntime.wrap(function callee$0$0$(context$1$0) { + while (1) + switch (context$1$0.prev = context$1$0.next) { + case 0: + debug("Fetch principal url from context path " + account.rootUrl + "."); + req = request2.propfind({ + props: [{ name: "current-user-principal", namespace: ns.DAV }], + depth: 0, + mergeResponses: true + }); + context$1$0.next = 4; + return options.xhr.send(req, account.rootUrl, { + sandbox: options.sandbox + }); + case 4: + res = context$1$0.sent; + container = res.props; + debug("Received principal: " + container.currentUserPrincipal); + return context$1$0.abrupt("return", _url2["default"].resolve(account.rootUrl, container.currentUserPrincipal)); + case 8: + case "end": + return context$1$0.stop(); + } + }, callee$0$0, this); + })); + var homeUrl = _co2["default"].wrap(regeneratorRuntime.mark(function callee$0$0(account, options) { + var prop, req, responses, response, container, href; + return regeneratorRuntime.wrap(function callee$0$0$(context$1$0) { + while (1) + switch (context$1$0.prev = context$1$0.next) { + case 0: + debug("Fetch home url from principal url " + account.principalUrl + "."); + prop = void 0; + if (options.accountType === "caldav") { + prop = { name: "calendar-home-set", namespace: ns.CALDAV }; + } else if (options.accountType === "carddav") { + prop = { name: "addressbook-home-set", namespace: ns.CARDDAV }; + } + req = request2.propfind({ props: [prop] }); + context$1$0.next = 6; + return options.xhr.send(req, account.principalUrl, { + sandbox: options.sandbox + }); + case 6: + responses = context$1$0.sent; + response = responses.find(function(response2) { + return (0, _fuzzy_url_equals2["default"])(account.principalUrl, response2.href); + }); + container = response.props; + href = void 0; + if (options.accountType === "caldav") { + debug("Received home: " + container.calendarHomeSet); + href = container.calendarHomeSet; + } else if (options.accountType === "carddav") { + debug("Received home: " + container.addressbookHomeSet); + href = container.addressbookHomeSet; + } + return context$1$0.abrupt("return", _url2["default"].resolve(account.rootUrl, href)); + case 12: + case "end": + return context$1$0.stop(); + } + }, callee$0$0, this); + })); + exports3.createAccount = _co2["default"].wrap(regeneratorRuntime.mark(function callee$0$0(options) { + var account, key, loadCollections, loadObjects, collections; + return regeneratorRuntime.wrap(function callee$0$0$(context$1$0) { + while (1) + switch (context$1$0.prev = context$1$0.next) { + case 0: + options = Object.assign({}, defaults, options); + if (typeof options.loadObjects !== "boolean") { + options.loadObjects = options.loadCollections; + } + account = new _model.Account({ + server: options.server, + credentials: options.xhr.credentials + }); + context$1$0.next = 5; + return serviceDiscovery(account, options); + case 5: + account.rootUrl = context$1$0.sent; + context$1$0.next = 8; + return principalUrl(account, options); + case 8: + account.principalUrl = context$1$0.sent; + context$1$0.next = 11; + return homeUrl(account, options); + case 11: + account.homeUrl = context$1$0.sent; + if (options.loadCollections) { + context$1$0.next = 14; + break; + } + return context$1$0.abrupt("return", account); + case 14: + key = void 0, loadCollections = void 0, loadObjects = void 0; + if (options.accountType === "caldav") { + key = "calendars"; + loadCollections = _calendars.listCalendars; + loadObjects = _calendars.listCalendarObjects; + } else if (options.accountType === "carddav") { + key = "addressBooks"; + loadCollections = _contacts.listAddressBooks; + loadObjects = _contacts.listVCards; + } + context$1$0.next = 18; + return loadCollections(account, options); + case 18: + collections = context$1$0.sent; + account[key] = collections; + if (options.loadObjects) { + context$1$0.next = 22; + break; + } + return context$1$0.abrupt("return", account); + case 22: + context$1$0.next = 24; + return collections.map(_co2["default"].wrap(regeneratorRuntime.mark(function callee$1$0(collection) { + return regeneratorRuntime.wrap(function callee$1$0$(context$2$0) { + while (1) + switch (context$2$0.prev = context$2$0.next) { + case 0: + context$2$0.prev = 0; + context$2$0.next = 3; + return loadObjects(collection, options); + case 3: + collection.objects = context$2$0.sent; + context$2$0.next = 9; + break; + case 6: + context$2$0.prev = 6; + context$2$0.t0 = context$2$0["catch"](0); + collection.error = context$2$0.t0; + case 9: + case "end": + return context$2$0.stop(); + } + }, callee$1$0, this, [[0, 6]]); + }))); + case 24: + account[key] = account[key].filter(function(collection) { + return !collection.error; + }); + return context$1$0.abrupt("return", account); + case 26: + case "end": + return context$1$0.stop(); + } + }, callee$0$0, this); + })); + }, { "./calendars": 2, "./contacts": 5, "./debug": 6, "./fuzzy_url_equals": 7, "./model": 9, "./namespace": 10, "./request": 12, "co": 24, "url": 29 }], 2: [function(require2, module4, exports3) { + "use strict"; + Object.defineProperty(exports3, "__esModule", { + value: true + }); + exports3.createCalendarObject = createCalendarObject; + exports3.updateCalendarObject = updateCalendarObject; + exports3.deleteCalendarObject = deleteCalendarObject; + exports3.syncCalendar = syncCalendar; + function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; } else { - return new Date(this.valueOf() + this.utcOffset() * 60 * 1e3).toISOString().replace("Z", formatMoment(m3, "Z")); + var newObj = {}; + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) + newObj[key] = obj[key]; + } + } + newObj["default"] = obj; + return newObj; } } - return formatMoment(m3, utc ? "YYYY-MM-DD[T]HH:mm:ss.SSS[Z]" : "YYYY-MM-DD[T]HH:mm:ss.SSSZ"); - } - function inspect() { - if (!this.isValid()) { - return "moment.invalid(/* " + this._i + " */)"; - } - var func = "moment", zone = "", prefix, year, datetime, suffix; - if (!this.isLocal()) { - func = this.utcOffset() === 0 ? "moment.utc" : "moment.parseZone"; - zone = "Z"; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { "default": obj }; } - prefix = "[" + func + '("]'; - year = 0 <= this.year() && this.year() <= 9999 ? "YYYY" : "YYYYYY"; - datetime = "-MM-DD[T]HH:mm:ss.SSS"; - suffix = zone + '[")]'; - return this.format(prefix + year + datetime + suffix); - } - function format(inputString) { - if (!inputString) { - inputString = this.isUtc() ? hooks.defaultFormatUtc : hooks.defaultFormat; + var _co = require2("co"); + var _co2 = _interopRequireDefault(_co); + var _url = require2("url"); + var _url2 = _interopRequireDefault(_url); + var _fuzzy_url_equals = require2("./fuzzy_url_equals"); + var _fuzzy_url_equals2 = _interopRequireDefault(_fuzzy_url_equals); + var _model = require2("./model"); + var _namespace = require2("./namespace"); + var ns = _interopRequireWildcard(_namespace); + var _request = require2("./request"); + var request2 = _interopRequireWildcard(_request); + var _webdav = require2("./webdav"); + var webdav = _interopRequireWildcard(_webdav); + var debug = require2("./debug")("dav:calendars"); + var ICAL_OBJS = new Set(["VEVENT", "VTODO", "VJOURNAL", "VFREEBUSY", "VTIMEZONE", "VALARM"]); + var listCalendars = _co2["default"].wrap(regeneratorRuntime.mark(function callee$0$0(account, options) { + var req, responses, cals; + return regeneratorRuntime.wrap(function callee$0$0$(context$1$0) { + while (1) + switch (context$1$0.prev = context$1$0.next) { + case 0: + debug("Fetch calendars from home url " + account.homeUrl); + req = request2.propfind({ + props: [{ name: "calendar-description", namespace: ns.CALDAV }, { name: "calendar-timezone", namespace: ns.CALDAV }, { name: "displayname", namespace: ns.DAV }, { name: "getctag", namespace: ns.CALENDAR_SERVER }, { name: "resourcetype", namespace: ns.DAV }, { name: "supported-calendar-component-set", namespace: ns.CALDAV }, { name: "sync-token", namespace: ns.DAV }], + depth: 1 + }); + context$1$0.next = 4; + return options.xhr.send(req, account.homeUrl, { + sandbox: options.sandbox + }); + case 4: + responses = context$1$0.sent; + debug("Found " + responses.length + " calendars."); + cals = responses.filter(function(res) { + return res.props.resourcetype.includes("calendar"); + }).filter(function(res) { + var components = res.props.supportedCalendarComponentSet || []; + return components.reduce(function(hasObjs, component) { + return hasObjs || ICAL_OBJS.has(component); + }, false); + }).map(function(res) { + debug("Found calendar " + res.props.displayname + ",\n props: " + JSON.stringify(res.props)); + return new _model.Calendar({ + data: res, + account, + description: res.props.calendarDescription, + timezone: res.props.calendarTimezone, + url: _url2["default"].resolve(account.rootUrl, res.href), + ctag: res.props.getctag, + displayName: res.props.displayname, + components: res.props.supportedCalendarComponentSet, + resourcetype: res.props.resourcetype, + syncToken: res.props.syncToken + }); + }); + context$1$0.next = 9; + return cals.map(_co2["default"].wrap(regeneratorRuntime.mark(function callee$1$0(cal) { + return regeneratorRuntime.wrap(function callee$1$0$(context$2$0) { + while (1) + switch (context$2$0.prev = context$2$0.next) { + case 0: + context$2$0.next = 2; + return webdav.supportedReportSet(cal, options); + case 2: + cal.reports = context$2$0.sent; + case 3: + case "end": + return context$2$0.stop(); + } + }, callee$1$0, this); + }))); + case 9: + return context$1$0.abrupt("return", cals); + case 10: + case "end": + return context$1$0.stop(); + } + }, callee$0$0, this); + })); + exports3.listCalendars = listCalendars; + function createCalendarObject(calendar, options) { + var objectUrl = _url2["default"].resolve(calendar.url, options.filename); + options.contentType = options.contentType || "text/calendar; charset=utf-8"; + return webdav.createObject(objectUrl, options.data, options); } - var output = formatMoment(this, inputString); - return this.localeData().postformat(output); - } - function from(time, withoutSuffix) { - if (this.isValid() && (isMoment(time) && time.isValid() || createLocal(time).isValid())) { - return createDuration2({ to: this, from: time }).locale(this.locale()).humanize(!withoutSuffix); - } else { - return this.localeData().invalidDate(); + ; + function updateCalendarObject(calendarObject, options) { + options.contentType = options.contentType || "text/calendar; charset=utf-8"; + return webdav.updateObject(calendarObject.url, calendarObject.calendarData, calendarObject.etag, options); } - } - function fromNow(withoutSuffix) { - return this.from(createLocal(), withoutSuffix); - } - function to(time, withoutSuffix) { - if (this.isValid() && (isMoment(time) && time.isValid() || createLocal(time).isValid())) { - return createDuration2({ from: this, to: time }).locale(this.locale()).humanize(!withoutSuffix); - } else { - return this.localeData().invalidDate(); + function deleteCalendarObject(calendarObject, options) { + return webdav.deleteObject(calendarObject.url, calendarObject.etag, options); } - } - function toNow(withoutSuffix) { - return this.to(createLocal(), withoutSuffix); - } - function locale(key) { - var newLocaleData; - if (key === void 0) { - return this._locale._abbr; - } else { - newLocaleData = getLocale(key); - if (newLocaleData != null) { - this._locale = newLocaleData; - } - return this; - } - } - var lang = deprecate("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.", function(key) { - if (key === void 0) { - return this.localeData(); - } else { - return this.locale(key); - } - }); - function localeData() { - return this._locale; - } - var MS_PER_SECOND = 1e3, MS_PER_MINUTE = 60 * MS_PER_SECOND, MS_PER_HOUR = 60 * MS_PER_MINUTE, MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR; - function mod$1(dividend, divisor) { - return (dividend % divisor + divisor) % divisor; - } - function localStartOfDate(y3, m3, d2) { - if (y3 < 100 && y3 >= 0) { - return new Date(y3 + 400, m3, d2) - MS_PER_400_YEARS; - } else { - return new Date(y3, m3, d2).valueOf(); - } - } - function utcStartOfDate(y3, m3, d2) { - if (y3 < 100 && y3 >= 0) { - return Date.UTC(y3 + 400, m3, d2) - MS_PER_400_YEARS; - } else { - return Date.UTC(y3, m3, d2); - } - } - function startOf(units) { - var time, startOfDate; - units = normalizeUnits(units); - if (units === void 0 || units === "millisecond" || !this.isValid()) { - return this; - } - startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate; - switch (units) { - case "year": - time = startOfDate(this.year(), 0, 1); - break; - case "quarter": - time = startOfDate(this.year(), this.month() - this.month() % 3, 1); - break; - case "month": - time = startOfDate(this.year(), this.month(), 1); - break; - case "week": - time = startOfDate(this.year(), this.month(), this.date() - this.weekday()); - break; - case "isoWeek": - time = startOfDate(this.year(), this.month(), this.date() - (this.isoWeekday() - 1)); - break; - case "day": - case "date": - time = startOfDate(this.year(), this.month(), this.date()); - break; - case "hour": - time = this._d.valueOf(); - time -= mod$1(time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), MS_PER_HOUR); - break; - case "minute": - time = this._d.valueOf(); - time -= mod$1(time, MS_PER_MINUTE); - break; - case "second": - time = this._d.valueOf(); - time -= mod$1(time, MS_PER_SECOND); - break; - } - this._d.setTime(time); - hooks.updateOffset(this, true); - return this; - } - function endOf(units) { - var time, startOfDate; - units = normalizeUnits(units); - if (units === void 0 || units === "millisecond" || !this.isValid()) { - return this; - } - startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate; - switch (units) { - case "year": - time = startOfDate(this.year() + 1, 0, 1) - 1; - break; - case "quarter": - time = startOfDate(this.year(), this.month() - this.month() % 3 + 3, 1) - 1; - break; - case "month": - time = startOfDate(this.year(), this.month() + 1, 1) - 1; - break; - case "week": - time = startOfDate(this.year(), this.month(), this.date() - this.weekday() + 7) - 1; - break; - case "isoWeek": - time = startOfDate(this.year(), this.month(), this.date() - (this.isoWeekday() - 1) + 7) - 1; - break; - case "day": - case "date": - time = startOfDate(this.year(), this.month(), this.date() + 1) - 1; - break; - case "hour": - time = this._d.valueOf(); - time += MS_PER_HOUR - mod$1(time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), MS_PER_HOUR) - 1; - break; - case "minute": - time = this._d.valueOf(); - time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1; - break; - case "second": - time = this._d.valueOf(); - time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1; - break; - } - this._d.setTime(time); - hooks.updateOffset(this, true); - return this; - } - function valueOf() { - return this._d.valueOf() - (this._offset || 0) * 6e4; - } - function unix() { - return Math.floor(this.valueOf() / 1e3); - } - function toDate() { - return new Date(this.valueOf()); - } - function toArray() { - var m3 = this; - return [ - m3.year(), - m3.month(), - m3.date(), - m3.hour(), - m3.minute(), - m3.second(), - m3.millisecond() - ]; - } - function toObject() { - var m3 = this; - return { - years: m3.year(), - months: m3.month(), - date: m3.date(), - hours: m3.hours(), - minutes: m3.minutes(), - seconds: m3.seconds(), - milliseconds: m3.milliseconds() - }; - } - function toJSON() { - return this.isValid() ? this.toISOString() : null; - } - function isValid$2() { - return isValid(this); - } - function parsingFlags() { - return extend({}, getParsingFlags(this)); - } - function invalidAt() { - return getParsingFlags(this).overflow; - } - function creationData() { - return { - input: this._i, - format: this._f, - locale: this._locale, - isUTC: this._isUTC, - strict: this._strict - }; - } - addFormatToken("N", 0, 0, "eraAbbr"); - addFormatToken("NN", 0, 0, "eraAbbr"); - addFormatToken("NNN", 0, 0, "eraAbbr"); - addFormatToken("NNNN", 0, 0, "eraName"); - addFormatToken("NNNNN", 0, 0, "eraNarrow"); - addFormatToken("y", ["y", 1], "yo", "eraYear"); - addFormatToken("y", ["yy", 2], 0, "eraYear"); - addFormatToken("y", ["yyy", 3], 0, "eraYear"); - addFormatToken("y", ["yyyy", 4], 0, "eraYear"); - addRegexToken("N", matchEraAbbr); - addRegexToken("NN", matchEraAbbr); - addRegexToken("NNN", matchEraAbbr); - addRegexToken("NNNN", matchEraName); - addRegexToken("NNNNN", matchEraNarrow); - addParseToken(["N", "NN", "NNN", "NNNN", "NNNNN"], function(input, array, config2, token2) { - var era = config2._locale.erasParse(input, token2, config2._strict); - if (era) { - getParsingFlags(config2).era = era; - } else { - getParsingFlags(config2).invalidEra = input; - } - }); - addRegexToken("y", matchUnsigned); - addRegexToken("yy", matchUnsigned); - addRegexToken("yyy", matchUnsigned); - addRegexToken("yyyy", matchUnsigned); - addRegexToken("yo", matchEraYearOrdinal); - addParseToken(["y", "yy", "yyy", "yyyy"], YEAR); - addParseToken(["yo"], function(input, array, config2, token2) { - var match5; - if (config2._locale._eraYearOrdinalRegex) { - match5 = input.match(config2._locale._eraYearOrdinalRegex); + var listCalendarObjects = _co2["default"].wrap(regeneratorRuntime.mark(function callee$0$0(calendar, options) { + var filters, req, responses; + return regeneratorRuntime.wrap(function callee$0$0$(context$1$0) { + while (1) + switch (context$1$0.prev = context$1$0.next) { + case 0: + debug("Doing REPORT on calendar " + calendar.url + " which belongs to\n " + calendar.account.credentials.username); + filters = options.filters || [{ + type: "comp-filter", + attrs: { name: "VCALENDAR" }, + children: [{ + type: "comp-filter", + attrs: { name: "VEVENT" } + }] + }]; + req = request2.calendarQuery({ + depth: 1, + props: [{ name: "getetag", namespace: ns.DAV }, { name: "calendar-data", namespace: ns.CALDAV }], + filters + }); + context$1$0.next = 5; + return options.xhr.send(req, calendar.url, { + sandbox: options.sandbox + }); + case 5: + responses = context$1$0.sent; + return context$1$0.abrupt("return", responses.map(function(res) { + debug("Found calendar object with url " + res.href); + return new _model.CalendarObject({ + data: res, + calendar, + url: _url2["default"].resolve(calendar.account.rootUrl, res.href), + etag: res.props.getetag, + calendarData: res.props.calendarData + }); + })); + case 7: + case "end": + return context$1$0.stop(); + } + }, callee$0$0, this); + })); + exports3.listCalendarObjects = listCalendarObjects; + function syncCalendar(calendar, options) { + options.basicSync = basicSync; + options.webdavSync = webdavSync; + return webdav.syncCollection(calendar, options); } - if (config2._locale.eraYearOrdinalParse) { - array[YEAR] = config2._locale.eraYearOrdinalParse(input, match5); - } else { - array[YEAR] = parseInt(input, 10); + var syncCaldavAccount = _co2["default"].wrap(regeneratorRuntime.mark(function callee$0$0(account) { + var options = arguments.length <= 1 || arguments[1] === void 0 ? {} : arguments[1]; + var cals; + return regeneratorRuntime.wrap(function callee$0$0$(context$1$0) { + while (1) + switch (context$1$0.prev = context$1$0.next) { + case 0: + options.loadObjects = false; + if (!account.calendars) + account.calendars = []; + context$1$0.next = 4; + return listCalendars(account, options); + case 4: + cals = context$1$0.sent; + cals.filter(function(cal) { + return account.calendars.every(function(prev) { + return !(0, _fuzzy_url_equals2["default"])(prev.url, cal.url); + }); + }).forEach(function(cal) { + account.calendars.push(cal); + }); + options.loadObjects = true; + context$1$0.next = 9; + return account.calendars.map(_co2["default"].wrap(regeneratorRuntime.mark(function callee$1$0(cal, index) { + return regeneratorRuntime.wrap(function callee$1$0$(context$2$0) { + while (1) + switch (context$2$0.prev = context$2$0.next) { + case 0: + context$2$0.prev = 0; + context$2$0.next = 3; + return syncCalendar(cal, options); + case 3: + context$2$0.next = 9; + break; + case 5: + context$2$0.prev = 5; + context$2$0.t0 = context$2$0["catch"](0); + debug("Sync calendar " + cal.displayName + " failed with " + context$2$0.t0); + account.calendars.splice(index, 1); + case 9: + case "end": + return context$2$0.stop(); + } + }, callee$1$0, this, [[0, 5]]); + }))); + case 9: + return context$1$0.abrupt("return", account); + case 10: + case "end": + return context$1$0.stop(); + } + }, callee$0$0, this); + })); + exports3.syncCaldavAccount = syncCaldavAccount; + var basicSync = _co2["default"].wrap(regeneratorRuntime.mark(function callee$0$0(calendar, options) { + var sync; + return regeneratorRuntime.wrap(function callee$0$0$(context$1$0) { + while (1) + switch (context$1$0.prev = context$1$0.next) { + case 0: + context$1$0.next = 2; + return webdav.isCollectionDirty(calendar, options); + case 2: + sync = context$1$0.sent; + if (sync) { + context$1$0.next = 6; + break; + } + debug("Local ctag matched remote! No need to sync :)."); + return context$1$0.abrupt("return", calendar); + case 6: + debug("ctag changed so we need to fetch stuffs."); + context$1$0.next = 9; + return listCalendarObjects(calendar, options); + case 9: + calendar.objects = context$1$0.sent; + return context$1$0.abrupt("return", calendar); + case 11: + case "end": + return context$1$0.stop(); + } + }, callee$0$0, this); + })); + var webdavSync = _co2["default"].wrap(regeneratorRuntime.mark(function callee$0$0(calendar, options) { + var req, result; + return regeneratorRuntime.wrap(function callee$0$0$(context$1$0) { + while (1) + switch (context$1$0.prev = context$1$0.next) { + case 0: + req = request2.syncCollection({ + props: [{ name: "getetag", namespace: ns.DAV }, { name: "calendar-data", namespace: ns.CALDAV }], + syncLevel: 1, + syncToken: calendar.syncToken + }); + context$1$0.next = 3; + return options.xhr.send(req, calendar.url, { + sandbox: options.sandbox + }); + case 3: + result = context$1$0.sent; + result.responses.forEach(function(response) { + var calendarObject = calendar.objects.filter(function(object) { + return (0, _fuzzy_url_equals2["default"])(object.url, response.href); + })[0]; + if (!calendarObject) { + return; + } + calendarObject.etag = response.props.getetag; + calendarObject.calendarData = response.props.calendarData; + }); + calendar.syncToken = result.syncToken; + return context$1$0.abrupt("return", calendar); + case 7: + case "end": + return context$1$0.stop(); + } + }, callee$0$0, this); + })); + }, { "./debug": 6, "./fuzzy_url_equals": 7, "./model": 9, "./namespace": 10, "./request": 12, "./webdav": 22, "co": 24, "url": 29 }], 3: [function(require2, module4, exports3) { + "use strict"; + Object.defineProperty(exports3, "__esModule", { + value: true + }); + exports3["default"] = camelize; + function camelize(str) { + var delimiter = arguments.length <= 1 || arguments[1] === void 0 ? "_" : arguments[1]; + var words = str.split(delimiter); + return [words[0]].concat(words.slice(1).map(function(word) { + return word.charAt(0).toUpperCase() + word.slice(1); + })).join(""); } - }); - function localeEras(m3, format2) { - var i3, l4, date, eras2 = this._eras || getLocale("en")._eras; - for (i3 = 0, l4 = eras2.length; i3 < l4; ++i3) { - switch (typeof eras2[i3].since) { - case "string": - date = hooks(eras2[i3].since).startOf("day"); - eras2[i3].since = date.valueOf(); - break; - } - switch (typeof eras2[i3].until) { - case "undefined": - eras2[i3].until = Infinity; - break; - case "string": - date = hooks(eras2[i3].until).startOf("day").valueOf(); - eras2[i3].until = date.valueOf(); - break; + module4.exports = exports3["default"]; + }, {}], 4: [function(require2, module4, exports3) { + "use strict"; + Object.defineProperty(exports3, "__esModule", { + value: true + }); + var _createClass = function() { + function defineProperties(target, props) { + for (var i3 = 0; i3 < props.length; i3++) { + var descriptor = props[i3]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) + descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } } - } - return eras2; - } - function localeErasParse(eraName, format2, strict) { - var i3, l4, eras2 = this.eras(), name, abbr, narrow; - eraName = eraName.toUpperCase(); - for (i3 = 0, l4 = eras2.length; i3 < l4; ++i3) { - name = eras2[i3].name.toUpperCase(); - abbr = eras2[i3].abbr.toUpperCase(); - narrow = eras2[i3].narrow.toUpperCase(); - if (strict) { - switch (format2) { - case "N": - case "NN": - case "NNN": - if (abbr === eraName) { - return eras2[i3]; - } - break; - case "NNNN": - if (name === eraName) { - return eras2[i3]; - } - break; - case "NNNNN": - if (narrow === eraName) { - return eras2[i3]; - } - break; + return function(Constructor, protoProps, staticProps) { + if (protoProps) + defineProperties(Constructor.prototype, protoProps); + if (staticProps) + defineProperties(Constructor, staticProps); + return Constructor; + }; + }(); + function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) + newObj[key] = obj[key]; + } } - } else if ([name, abbr, narrow].indexOf(eraName) >= 0) { - return eras2[i3]; + newObj["default"] = obj; + return newObj; } } - } - function localeErasConvertYear(era, year) { - var dir = era.since <= era.until ? 1 : -1; - if (year === void 0) { - return hooks(era.since).year(); - } else { - return hooks(era.since).year() + (year - era.offset) * dir; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { "default": obj }; } - } - function getEraName() { - var i3, l4, val, eras2 = this.localeData().eras(); - for (i3 = 0, l4 = eras2.length; i3 < l4; ++i3) { - val = this.clone().startOf("day").valueOf(); - if (eras2[i3].since <= val && val <= eras2[i3].until) { - return eras2[i3].name; - } - if (eras2[i3].until <= val && val <= eras2[i3].since) { - return eras2[i3].name; + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); } } - return ""; - } - function getEraNarrow() { - var i3, l4, val, eras2 = this.localeData().eras(); - for (i3 = 0, l4 = eras2.length; i3 < l4; ++i3) { - val = this.clone().startOf("day").valueOf(); - if (eras2[i3].since <= val && val <= eras2[i3].until) { - return eras2[i3].narrow; - } - if (eras2[i3].until <= val && val <= eras2[i3].since) { - return eras2[i3].narrow; + var _url = require2("url"); + var _url2 = _interopRequireDefault(_url); + var _accounts = require2("./accounts"); + var accounts = _interopRequireWildcard(_accounts); + var _calendars = require2("./calendars"); + var calendars = _interopRequireWildcard(_calendars); + var _contacts = require2("./contacts"); + var contacts = _interopRequireWildcard(_contacts); + var Client = function() { + function Client2(xhr) { + var options = arguments.length <= 1 || arguments[1] === void 0 ? {} : arguments[1]; + _classCallCheck(this, Client2); + this.xhr = xhr; + Object.assign(this, options); + this._accounts = accounts; + this._calendars = calendars; + this._contacts = contacts; } - } - return ""; - } - function getEraAbbr() { - var i3, l4, val, eras2 = this.localeData().eras(); - for (i3 = 0, l4 = eras2.length; i3 < l4; ++i3) { - val = this.clone().startOf("day").valueOf(); - if (eras2[i3].since <= val && val <= eras2[i3].until) { - return eras2[i3].abbr; - } - if (eras2[i3].until <= val && val <= eras2[i3].since) { - return eras2[i3].abbr; + _createClass(Client2, [{ + key: "send", + value: function send(req, uri, options) { + if (this.baseUrl) { + var urlObj = _url2["default"].parse(uri); + uri = _url2["default"].resolve(this.baseUrl, urlObj.path); + } + return this.xhr.send(req, uri, options); + } + }, { + key: "createAccount", + value: function createAccount() { + var options = arguments.length <= 0 || arguments[0] === void 0 ? {} : arguments[0]; + options.xhr = options.xhr || this.xhr; + return accounts.createAccount(options); + } + }, { + key: "createCalendarObject", + value: function createCalendarObject(calendar) { + var options = arguments.length <= 1 || arguments[1] === void 0 ? {} : arguments[1]; + options.xhr = options.xhr || this.xhr; + return calendars.createCalendarObject(calendar, options); + } + }, { + key: "updateCalendarObject", + value: function updateCalendarObject(calendarObject) { + var options = arguments.length <= 1 || arguments[1] === void 0 ? {} : arguments[1]; + options.xhr = options.xhr || this.xhr; + return calendars.updateCalendarObject(calendarObject, options); + } + }, { + key: "deleteCalendarObject", + value: function deleteCalendarObject(calendarObject) { + var options = arguments.length <= 1 || arguments[1] === void 0 ? {} : arguments[1]; + options.xhr = options.xhr || this.xhr; + return calendars.deleteCalendarObject(calendarObject, options); + } + }, { + key: "syncCalendar", + value: function syncCalendar(calendar) { + var options = arguments.length <= 1 || arguments[1] === void 0 ? {} : arguments[1]; + options.xhr = options.xhr || this.xhr; + return calendars.syncCalendar(calendar, options); + } + }, { + key: "syncCaldavAccount", + value: function syncCaldavAccount(account) { + var options = arguments.length <= 1 || arguments[1] === void 0 ? {} : arguments[1]; + options.xhr = options.xhr || this.xhr; + return calendars.syncCaldavAccount(account, options); + } + }, { + key: "createCard", + value: function createCard(addressBook) { + var options = arguments.length <= 1 || arguments[1] === void 0 ? {} : arguments[1]; + options.xhr = options.xhr || this.xhr; + return contacts.createCard(addressBook, options); + } + }, { + key: "updateCard", + value: function updateCard(card) { + var options = arguments.length <= 1 || arguments[1] === void 0 ? {} : arguments[1]; + options.xhr = options.xhr || this.xhr; + return contacts.updateCard(card, options); + } + }, { + key: "deleteCard", + value: function deleteCard(card) { + var options = arguments.length <= 1 || arguments[1] === void 0 ? {} : arguments[1]; + options.xhr = options.xhr || this.xhr; + return contacts.deleteCard(card, options); + } + }, { + key: "syncAddressBook", + value: function syncAddressBook(addressBook) { + var options = arguments.length <= 1 || arguments[1] === void 0 ? {} : arguments[1]; + options.xhr = options.xhr || this.xhr; + return contacts.syncAddressBook(addressBook, options); + } + }, { + key: "syncCarddavAccount", + value: function syncCarddavAccount(account) { + var options = arguments.length <= 1 || arguments[1] === void 0 ? {} : arguments[1]; + options.xhr = options.xhr || this.xhr; + return contacts.syncCarddavAccount(account, options); + } + }]); + return Client2; + }(); + exports3.Client = Client; + }, { "./accounts": 1, "./calendars": 2, "./contacts": 5, "url": 29 }], 5: [function(require2, module4, exports3) { + "use strict"; + Object.defineProperty(exports3, "__esModule", { + value: true + }); + exports3.createCard = createCard; + exports3.updateCard = updateCard; + exports3.deleteCard = deleteCard; + exports3.syncAddressBook = syncAddressBook; + function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) + newObj[key] = obj[key]; + } + } + newObj["default"] = obj; + return newObj; } } - return ""; - } - function getEraYear() { - var i3, l4, dir, val, eras2 = this.localeData().eras(); - for (i3 = 0, l4 = eras2.length; i3 < l4; ++i3) { - dir = eras2[i3].since <= eras2[i3].until ? 1 : -1; - val = this.clone().startOf("day").valueOf(); - if (eras2[i3].since <= val && val <= eras2[i3].until || eras2[i3].until <= val && val <= eras2[i3].since) { - return (this.year() - hooks(eras2[i3].since).year()) * dir + eras2[i3].offset; - } + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { "default": obj }; } - return this.year(); - } - function erasNameRegex(isStrict) { - if (!hasOwnProp(this, "_erasNameRegex")) { - computeErasParse.call(this); + var _co = require2("co"); + var _co2 = _interopRequireDefault(_co); + var _url = require2("url"); + var _url2 = _interopRequireDefault(_url); + var _fuzzy_url_equals = require2("./fuzzy_url_equals"); + var _fuzzy_url_equals2 = _interopRequireDefault(_fuzzy_url_equals); + var _model = require2("./model"); + var _namespace = require2("./namespace"); + var ns = _interopRequireWildcard(_namespace); + var _request = require2("./request"); + var request2 = _interopRequireWildcard(_request); + var _webdav = require2("./webdav"); + var webdav = _interopRequireWildcard(_webdav); + var debug = require2("./debug")("dav:contacts"); + var listAddressBooks = _co2["default"].wrap(regeneratorRuntime.mark(function callee$0$0(account, options) { + var req, responses, addressBooks; + return regeneratorRuntime.wrap(function callee$0$0$(context$1$0) { + while (1) + switch (context$1$0.prev = context$1$0.next) { + case 0: + debug("Fetch address books from home url " + account.homeUrl); + req = request2.propfind({ + props: [{ name: "displayname", namespace: ns.DAV }, { name: "getctag", namespace: ns.CALENDAR_SERVER }, { name: "resourcetype", namespace: ns.DAV }, { name: "sync-token", namespace: ns.DAV }], + depth: 1 + }); + context$1$0.next = 4; + return options.xhr.send(req, account.homeUrl, { + sandbox: options.sandbox + }); + case 4: + responses = context$1$0.sent; + addressBooks = responses.filter(function(res) { + return typeof res.props.displayname === "string"; + }).map(function(res) { + debug("Found address book named " + res.props.displayname + ",\n props: " + JSON.stringify(res.props)); + return new _model.AddressBook({ + data: res, + account, + url: _url2["default"].resolve(account.rootUrl, res.href), + ctag: res.props.getctag, + displayName: res.props.displayname, + resourcetype: res.props.resourcetype, + syncToken: res.props.syncToken + }); + }); + context$1$0.next = 8; + return addressBooks.map(_co2["default"].wrap(regeneratorRuntime.mark(function callee$1$0(addressBook) { + return regeneratorRuntime.wrap(function callee$1$0$(context$2$0) { + while (1) + switch (context$2$0.prev = context$2$0.next) { + case 0: + context$2$0.next = 2; + return webdav.supportedReportSet(addressBook, options); + case 2: + addressBook.reports = context$2$0.sent; + case 3: + case "end": + return context$2$0.stop(); + } + }, callee$1$0, this); + }))); + case 8: + return context$1$0.abrupt("return", addressBooks); + case 9: + case "end": + return context$1$0.stop(); + } + }, callee$0$0, this); + })); + exports3.listAddressBooks = listAddressBooks; + function createCard(addressBook, options) { + var objectUrl = _url2["default"].resolve(addressBook.url, options.filename); + return webdav.createObject(objectUrl, options.data, options); } - return isStrict ? this._erasNameRegex : this._erasRegex; - } - function erasAbbrRegex(isStrict) { - if (!hasOwnProp(this, "_erasAbbrRegex")) { - computeErasParse.call(this); + var listVCards = _co2["default"].wrap(regeneratorRuntime.mark(function callee$0$0(addressBook, options) { + var req, responses; + return regeneratorRuntime.wrap(function callee$0$0$(context$1$0) { + while (1) + switch (context$1$0.prev = context$1$0.next) { + case 0: + debug("Doing REPORT on address book " + addressBook.url + " which belongs to\n " + addressBook.account.credentials.username); + req = request2.addressBookQuery({ + depth: 1, + props: [{ name: "getetag", namespace: ns.DAV }, { name: "address-data", namespace: ns.CARDDAV }] + }); + context$1$0.next = 4; + return options.xhr.send(req, addressBook.url, { + sandbox: options.sandbox + }); + case 4: + responses = context$1$0.sent; + return context$1$0.abrupt("return", responses.map(function(res) { + debug("Found vcard with url " + res.href); + return new _model.VCard({ + data: res, + addressBook, + url: _url2["default"].resolve(addressBook.account.rootUrl, res.href), + etag: res.props.getetag, + addressData: res.props.addressData + }); + })); + case 6: + case "end": + return context$1$0.stop(); + } + }, callee$0$0, this); + })); + exports3.listVCards = listVCards; + function updateCard(card, options) { + return webdav.updateObject(card.url, card.addressData, card.etag, options); } - return isStrict ? this._erasAbbrRegex : this._erasRegex; - } - function erasNarrowRegex(isStrict) { - if (!hasOwnProp(this, "_erasNarrowRegex")) { - computeErasParse.call(this); + function deleteCard(card, options) { + return webdav.deleteObject(card.url, card.etag, options); } - return isStrict ? this._erasNarrowRegex : this._erasRegex; - } - function matchEraAbbr(isStrict, locale2) { - return locale2.erasAbbrRegex(isStrict); - } - function matchEraName(isStrict, locale2) { - return locale2.erasNameRegex(isStrict); - } - function matchEraNarrow(isStrict, locale2) { - return locale2.erasNarrowRegex(isStrict); - } - function matchEraYearOrdinal(isStrict, locale2) { - return locale2._eraYearOrdinalRegex || matchUnsigned; - } - function computeErasParse() { - var abbrPieces = [], namePieces = [], narrowPieces = [], mixedPieces = [], i3, l4, eras2 = this.eras(); - for (i3 = 0, l4 = eras2.length; i3 < l4; ++i3) { - namePieces.push(regexEscape(eras2[i3].name)); - abbrPieces.push(regexEscape(eras2[i3].abbr)); - narrowPieces.push(regexEscape(eras2[i3].narrow)); - mixedPieces.push(regexEscape(eras2[i3].name)); - mixedPieces.push(regexEscape(eras2[i3].abbr)); - mixedPieces.push(regexEscape(eras2[i3].narrow)); + function syncAddressBook(addressBook, options) { + options.basicSync = basicSync; + options.webdavSync = webdavSync; + return webdav.syncCollection(addressBook, options); } - this._erasRegex = new RegExp("^(" + mixedPieces.join("|") + ")", "i"); - this._erasNameRegex = new RegExp("^(" + namePieces.join("|") + ")", "i"); - this._erasAbbrRegex = new RegExp("^(" + abbrPieces.join("|") + ")", "i"); - this._erasNarrowRegex = new RegExp("^(" + narrowPieces.join("|") + ")", "i"); - } - addFormatToken(0, ["gg", 2], 0, function() { - return this.weekYear() % 100; - }); - addFormatToken(0, ["GG", 2], 0, function() { - return this.isoWeekYear() % 100; - }); - function addWeekYearFormatToken(token2, getter) { - addFormatToken(0, [token2, token2.length], 0, getter); - } - addWeekYearFormatToken("gggg", "weekYear"); - addWeekYearFormatToken("ggggg", "weekYear"); - addWeekYearFormatToken("GGGG", "isoWeekYear"); - addWeekYearFormatToken("GGGGG", "isoWeekYear"); - addUnitAlias("weekYear", "gg"); - addUnitAlias("isoWeekYear", "GG"); - addUnitPriority("weekYear", 1); - addUnitPriority("isoWeekYear", 1); - addRegexToken("G", matchSigned); - addRegexToken("g", matchSigned); - addRegexToken("GG", match1to2, match2); - addRegexToken("gg", match1to2, match2); - addRegexToken("GGGG", match1to4, match4); - addRegexToken("gggg", match1to4, match4); - addRegexToken("GGGGG", match1to6, match6); - addRegexToken("ggggg", match1to6, match6); - addWeekParseToken(["gggg", "ggggg", "GGGG", "GGGGG"], function(input, week, config2, token2) { - week[token2.substr(0, 2)] = toInt(input); - }); - addWeekParseToken(["gg", "GG"], function(input, week, config2, token2) { - week[token2] = hooks.parseTwoDigitYear(input); - }); - function getSetWeekYear(input) { - return getSetWeekYearHelper.call(this, input, this.week(), this.weekday(), this.localeData()._week.dow, this.localeData()._week.doy); - } - function getSetISOWeekYear(input) { - return getSetWeekYearHelper.call(this, input, this.isoWeek(), this.isoWeekday(), 1, 4); - } - function getISOWeeksInYear() { - return weeksInYear(this.year(), 1, 4); - } - function getISOWeeksInISOWeekYear() { - return weeksInYear(this.isoWeekYear(), 1, 4); - } - function getWeeksInYear() { - var weekInfo = this.localeData()._week; - return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy); - } - function getWeeksInWeekYear() { - var weekInfo = this.localeData()._week; - return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy); - } - function getSetWeekYearHelper(input, week, weekday, dow, doy) { - var weeksTarget; - if (input == null) { - return weekOfYear2(this, dow, doy).year; - } else { - weeksTarget = weeksInYear(input, dow, doy); - if (week > weeksTarget) { - week = weeksTarget; + var syncCarddavAccount = _co2["default"].wrap(regeneratorRuntime.mark(function callee$0$0(account) { + var options = arguments.length <= 1 || arguments[1] === void 0 ? {} : arguments[1]; + var addressBooks; + return regeneratorRuntime.wrap(function callee$0$0$(context$1$0) { + while (1) + switch (context$1$0.prev = context$1$0.next) { + case 0: + options.loadObjects = false; + if (!account.addressBooks) { + account.addressBooks = []; + } + context$1$0.next = 4; + return listAddressBooks(account, options); + case 4: + addressBooks = context$1$0.sent; + addressBooks.filter(function(addressBook) { + return account.addressBooks.every(function(prev) { + return !(0, _fuzzy_url_equals2["default"])(prev.url, addressBook.url); + }); + }).forEach(function(addressBook) { + return account.addressBooks.push(addressBook); + }); + options.loadObjects = true; + context$1$0.next = 9; + return account.addressBooks.map(_co2["default"].wrap(regeneratorRuntime.mark(function callee$1$0(addressBook, index) { + return regeneratorRuntime.wrap(function callee$1$0$(context$2$0) { + while (1) + switch (context$2$0.prev = context$2$0.next) { + case 0: + context$2$0.prev = 0; + context$2$0.next = 3; + return syncAddressBook(addressBook, options); + case 3: + context$2$0.next = 9; + break; + case 5: + context$2$0.prev = 5; + context$2$0.t0 = context$2$0["catch"](0); + debug("Syncing " + addressBook.displayName + " failed with " + context$2$0.t0); + account.addressBooks.splice(index, 1); + case 9: + case "end": + return context$2$0.stop(); + } + }, callee$1$0, this, [[0, 5]]); + }))); + case 9: + return context$1$0.abrupt("return", account); + case 10: + case "end": + return context$1$0.stop(); + } + }, callee$0$0, this); + })); + exports3.syncCarddavAccount = syncCarddavAccount; + var basicSync = _co2["default"].wrap(regeneratorRuntime.mark(function callee$0$0(addressBook, options) { + var sync; + return regeneratorRuntime.wrap(function callee$0$0$(context$1$0) { + while (1) + switch (context$1$0.prev = context$1$0.next) { + case 0: + sync = webdav.isCollectionDirty(addressBook, options); + if (sync) { + context$1$0.next = 4; + break; + } + debug("Local ctag matched remote! No need to sync :)."); + return context$1$0.abrupt("return", addressBook); + case 4: + debug("ctag changed so we need to fetch stuffs."); + context$1$0.next = 7; + return listVCards(addressBook, options); + case 7: + addressBook.objects = context$1$0.sent; + return context$1$0.abrupt("return", addressBook); + case 9: + case "end": + return context$1$0.stop(); + } + }, callee$0$0, this); + })); + var webdavSync = _co2["default"].wrap(regeneratorRuntime.mark(function callee$0$0(addressBook, options) { + var req, result; + return regeneratorRuntime.wrap(function callee$0$0$(context$1$0) { + while (1) + switch (context$1$0.prev = context$1$0.next) { + case 0: + req = request2.syncCollection({ + props: [{ name: "getetag", namespace: ns.DAV }, { name: "address-data", namespace: ns.CARDDAV }], + syncLevel: 1, + syncToken: addressBook.syncToken + }); + context$1$0.next = 3; + return options.xhr.send(req, addressBook.url, { + sandbox: options.sandbox + }); + case 3: + result = context$1$0.sent; + result.responses.forEach(function(response) { + var vcard = addressBook.objects.filter(function(object) { + return (0, _fuzzy_url_equals2["default"])(object.url, response.href); + })[0]; + if (!vcard) + return; + vcard.etag = response.props.getetag; + vcard.addressData = response.props.addressData; + }); + addressBook.syncToken = result.syncToken; + return context$1$0.abrupt("return", addressBook); + case 7: + case "end": + return context$1$0.stop(); + } + }, callee$0$0, this); + })); + }, { "./debug": 6, "./fuzzy_url_equals": 7, "./model": 9, "./namespace": 10, "./request": 12, "./webdav": 22, "co": 24, "url": 29 }], 6: [function(require2, module4, exports3) { + "use strict"; + Object.defineProperty(exports3, "__esModule", { + value: true + }); + exports3["default"] = debug; + function debug(topic) { + return function(message) { + if (debug.enabled) { + console.log("[" + topic + "] " + message); + } + }; + } + module4.exports = exports3["default"]; + }, {}], 7: [function(require2, module4, exports3) { + "use strict"; + Object.defineProperty(exports3, "__esModule", { + value: true + }); + exports3["default"] = fuzzyUrlEquals; + function fuzzyUrlEquals(one, other) { + return fuzzyIncludes(one, other) || fuzzyIncludes(other, one); + } + ; + function fuzzyIncludes(one, other) { + return one.indexOf(other) !== -1 || other.charAt(other.length - 1) === "/" && one.indexOf(other.slice(0, -1)) !== -1; + } + module4.exports = exports3["default"]; + }, {}], 8: [function(require2, module4, exports3) { + "use strict"; + Object.defineProperty(exports3, "__esModule", { + value: true + }); + function _interopExportWildcard(obj, defaults) { + var newObj = defaults({}, obj); + delete newObj["default"]; + return newObj; + } + function _defaults(obj, defaults) { + var keys = Object.getOwnPropertyNames(defaults); + for (var i3 = 0; i3 < keys.length; i3++) { + var key = keys[i3]; + var value = Object.getOwnPropertyDescriptor(defaults, key); + if (value && value.configurable && obj[key] === void 0) { + Object.defineProperty(obj, key, value); + } } - return setWeekAll.call(this, input, week, weekday, dow, doy); + return obj; } - } - function setWeekAll(weekYear, week, weekday, dow, doy) { - var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy), date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear); - this.year(date.getUTCFullYear()); - this.month(date.getUTCMonth()); - this.date(date.getUTCDate()); - return this; - } - addFormatToken("Q", 0, "Qo", "quarter"); - addUnitAlias("quarter", "Q"); - addUnitPriority("quarter", 7); - addRegexToken("Q", match1); - addParseToken("Q", function(input, array) { - array[MONTH] = (toInt(input) - 1) * 3; - }); - function getSetQuarter(input) { - return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3); - } - addFormatToken("D", ["DD", 2], "Do", "date"); - addUnitAlias("date", "D"); - addUnitPriority("date", 9); - addRegexToken("D", match1to2); - addRegexToken("DD", match1to2, match2); - addRegexToken("Do", function(isStrict, locale2) { - return isStrict ? locale2._dayOfMonthOrdinalParse || locale2._ordinalParse : locale2._dayOfMonthOrdinalParseLenient; - }); - addParseToken(["D", "DD"], DATE); - addParseToken("Do", function(input, array) { - array[DATE] = toInt(input.match(match1to2)[0]); - }); - var getSetDayOfMonth = makeGetSet("Date", true); - addFormatToken("DDD", ["DDDD", 3], "DDDo", "dayOfYear"); - addUnitAlias("dayOfYear", "DDD"); - addUnitPriority("dayOfYear", 4); - addRegexToken("DDD", match1to3); - addRegexToken("DDDD", match3); - addParseToken(["DDD", "DDDD"], function(input, array, config2) { - config2._dayOfYear = toInt(input); - }); - function getSetDayOfYear(input) { - var dayOfYear = Math.round((this.clone().startOf("day") - this.clone().startOf("year")) / 864e5) + 1; - return input == null ? dayOfYear : this.add(input - dayOfYear, "d"); - } - addFormatToken("m", ["mm", 2], 0, "minute"); - addUnitAlias("minute", "m"); - addUnitPriority("minute", 14); - addRegexToken("m", match1to2); - addRegexToken("mm", match1to2, match2); - addParseToken(["m", "mm"], MINUTE); - var getSetMinute = makeGetSet("Minutes", false); - addFormatToken("s", ["ss", 2], 0, "second"); - addUnitAlias("second", "s"); - addUnitPriority("second", 15); - addRegexToken("s", match1to2); - addRegexToken("ss", match1to2, match2); - addParseToken(["s", "ss"], SECOND); - var getSetSecond = makeGetSet("Seconds", false); - addFormatToken("S", 0, 0, function() { - return ~~(this.millisecond() / 100); - }); - addFormatToken(0, ["SS", 2], 0, function() { - return ~~(this.millisecond() / 10); - }); - addFormatToken(0, ["SSS", 3], 0, "millisecond"); - addFormatToken(0, ["SSSS", 4], 0, function() { - return this.millisecond() * 10; - }); - addFormatToken(0, ["SSSSS", 5], 0, function() { - return this.millisecond() * 100; - }); - addFormatToken(0, ["SSSSSS", 6], 0, function() { - return this.millisecond() * 1e3; - }); - addFormatToken(0, ["SSSSSSS", 7], 0, function() { - return this.millisecond() * 1e4; - }); - addFormatToken(0, ["SSSSSSSS", 8], 0, function() { - return this.millisecond() * 1e5; - }); - addFormatToken(0, ["SSSSSSSSS", 9], 0, function() { - return this.millisecond() * 1e6; - }); - addUnitAlias("millisecond", "ms"); - addUnitPriority("millisecond", 16); - addRegexToken("S", match1to3, match1); - addRegexToken("SS", match1to3, match2); - addRegexToken("SSS", match1to3, match3); - var token, getSetMillisecond; - for (token = "SSSS"; token.length <= 9; token += "S") { - addRegexToken(token, matchUnsigned); - } - function parseMs(input, array) { - array[MILLISECOND] = toInt(("0." + input) * 1e3); - } - for (token = "S"; token.length <= 9; token += "S") { - addParseToken(token, parseMs); - } - getSetMillisecond = makeGetSet("Milliseconds", false); - addFormatToken("z", 0, 0, "zoneAbbr"); - addFormatToken("zz", 0, 0, "zoneName"); - function getZoneAbbr() { - return this._isUTC ? "UTC" : ""; - } - function getZoneName() { - return this._isUTC ? "Coordinated Universal Time" : ""; - } - var proto = Moment.prototype; - proto.add = add2; - proto.calendar = calendar$1; - proto.clone = clone3; - proto.diff = diff; - proto.endOf = endOf; - proto.format = format; - proto.from = from; - proto.fromNow = fromNow; - proto.to = to; - proto.toNow = toNow; - proto.get = stringGet; - proto.invalidAt = invalidAt; - proto.isAfter = isAfter; - proto.isBefore = isBefore; - proto.isBetween = isBetween; - proto.isSame = isSame; - proto.isSameOrAfter = isSameOrAfter; - proto.isSameOrBefore = isSameOrBefore; - proto.isValid = isValid$2; - proto.lang = lang; - proto.locale = locale; - proto.localeData = localeData; - proto.max = prototypeMax; - proto.min = prototypeMin; - proto.parsingFlags = parsingFlags; - proto.set = stringSet; - proto.startOf = startOf; - proto.subtract = subtract; - proto.toArray = toArray; - proto.toObject = toObject; - proto.toDate = toDate; - proto.toISOString = toISOString; - proto.inspect = inspect; - if (typeof Symbol !== "undefined" && Symbol.for != null) { - proto[Symbol.for("nodejs.util.inspect.custom")] = function() { - return "Moment<" + this.format() + ">"; - }; - } - proto.toJSON = toJSON; - proto.toString = toString; - proto.unix = unix; - proto.valueOf = valueOf; - proto.creationData = creationData; - proto.eraName = getEraName; - proto.eraNarrow = getEraNarrow; - proto.eraAbbr = getEraAbbr; - proto.eraYear = getEraYear; - proto.year = getSetYear; - proto.isLeapYear = getIsLeapYear; - proto.weekYear = getSetWeekYear; - proto.isoWeekYear = getSetISOWeekYear; - proto.quarter = proto.quarters = getSetQuarter; - proto.month = getSetMonth; - proto.daysInMonth = getDaysInMonth; - proto.week = proto.weeks = getSetWeek; - proto.isoWeek = proto.isoWeeks = getSetISOWeek; - proto.weeksInYear = getWeeksInYear; - proto.weeksInWeekYear = getWeeksInWeekYear; - proto.isoWeeksInYear = getISOWeeksInYear; - proto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear; - proto.date = getSetDayOfMonth; - proto.day = proto.days = getSetDayOfWeek; - proto.weekday = getSetLocaleDayOfWeek; - proto.isoWeekday = getSetISODayOfWeek; - proto.dayOfYear = getSetDayOfYear; - proto.hour = proto.hours = getSetHour; - proto.minute = proto.minutes = getSetMinute; - proto.second = proto.seconds = getSetSecond; - proto.millisecond = proto.milliseconds = getSetMillisecond; - proto.utcOffset = getSetOffset; - proto.utc = setOffsetToUTC; - proto.local = setOffsetToLocal; - proto.parseZone = setOffsetToParsedOffset; - proto.hasAlignedHourOffset = hasAlignedHourOffset; - proto.isDST = isDaylightSavingTime; - proto.isLocal = isLocal; - proto.isUtcOffset = isUtcOffset; - proto.isUtc = isUtc; - proto.isUTC = isUtc; - proto.zoneAbbr = getZoneAbbr; - proto.zoneName = getZoneName; - proto.dates = deprecate("dates accessor is deprecated. Use date instead.", getSetDayOfMonth); - proto.months = deprecate("months accessor is deprecated. Use month instead", getSetMonth); - proto.years = deprecate("years accessor is deprecated. Use year instead", getSetYear); - proto.zone = deprecate("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/", getSetZone); - proto.isDSTShifted = deprecate("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information", isDaylightSavingTimeShifted); - function createUnix(input) { - return createLocal(input * 1e3); - } - function createInZone() { - return createLocal.apply(null, arguments).parseZone(); - } - function preParsePostFormat(string) { - return string; - } - var proto$1 = Locale2.prototype; - proto$1.calendar = calendar; - proto$1.longDateFormat = longDateFormat; - proto$1.invalidDate = invalidDate; - proto$1.ordinal = ordinal; - proto$1.preparse = preParsePostFormat; - proto$1.postformat = preParsePostFormat; - proto$1.relativeTime = relativeTime; - proto$1.pastFuture = pastFuture; - proto$1.set = set; - proto$1.eras = localeEras; - proto$1.erasParse = localeErasParse; - proto$1.erasConvertYear = localeErasConvertYear; - proto$1.erasAbbrRegex = erasAbbrRegex; - proto$1.erasNameRegex = erasNameRegex; - proto$1.erasNarrowRegex = erasNarrowRegex; - proto$1.months = localeMonths; - proto$1.monthsShort = localeMonthsShort; - proto$1.monthsParse = localeMonthsParse; - proto$1.monthsRegex = monthsRegex; - proto$1.monthsShortRegex = monthsShortRegex; - proto$1.week = localeWeek; - proto$1.firstDayOfYear = localeFirstDayOfYear; - proto$1.firstDayOfWeek = localeFirstDayOfWeek; - proto$1.weekdays = localeWeekdays; - proto$1.weekdaysMin = localeWeekdaysMin; - proto$1.weekdaysShort = localeWeekdaysShort; - proto$1.weekdaysParse = localeWeekdaysParse; - proto$1.weekdaysRegex = weekdaysRegex; - proto$1.weekdaysShortRegex = weekdaysShortRegex; - proto$1.weekdaysMinRegex = weekdaysMinRegex; - proto$1.isPM = localeIsPM; - proto$1.meridiem = localeMeridiem; - function get$1(format2, index, field, setter) { - var locale2 = getLocale(), utc = createUTC().set(setter, index); - return locale2[field](utc, format2); - } - function listMonthsImpl(format2, index, field) { - if (isNumber2(format2)) { - index = format2; - format2 = void 0; - } - format2 = format2 || ""; - if (index != null) { - return get$1(format2, index, field, "month"); + function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) + newObj[key] = obj[key]; + } + } + newObj["default"] = obj; + return newObj; + } } - var i3, out = []; - for (i3 = 0; i3 < 12; i3++) { - out[i3] = get$1(format2, i3, field, "month"); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { "default": obj }; } - return out; - } - function listWeekdaysImpl(localeSorted, format2, index, field) { - if (typeof localeSorted === "boolean") { - if (isNumber2(format2)) { - index = format2; - format2 = void 0; + var _debug = require2("./debug"); + var _debug2 = _interopRequireDefault(_debug); + var _namespace = require2("./namespace"); + var ns = _interopRequireWildcard(_namespace); + var _request = require2("./request"); + var request2 = _interopRequireWildcard(_request); + var _transport = require2("./transport"); + var transport4 = _interopRequireWildcard(_transport); + var _package = require2("../package"); + Object.defineProperty(exports3, "version", { + enumerable: true, + get: function get() { + return _package.version; } - format2 = format2 || ""; - } else { - format2 = localeSorted; - index = format2; - localeSorted = false; - if (isNumber2(format2)) { - index = format2; - format2 = void 0; + }); + var _accounts = require2("./accounts"); + Object.defineProperty(exports3, "createAccount", { + enumerable: true, + get: function get() { + return _accounts.createAccount; } - format2 = format2 || ""; - } - var locale2 = getLocale(), shift = localeSorted ? locale2._week.dow : 0, i3, out = []; - if (index != null) { - return get$1(format2, (index + shift) % 7, field, "day"); - } - for (i3 = 0; i3 < 7; i3++) { - out[i3] = get$1(format2, (i3 + shift) % 7, field, "day"); - } - return out; - } - function listMonths(format2, index) { - return listMonthsImpl(format2, index, "months"); - } - function listMonthsShort(format2, index) { - return listMonthsImpl(format2, index, "monthsShort"); - } - function listWeekdays(localeSorted, format2, index) { - return listWeekdaysImpl(localeSorted, format2, index, "weekdays"); - } - function listWeekdaysShort(localeSorted, format2, index) { - return listWeekdaysImpl(localeSorted, format2, index, "weekdaysShort"); - } - function listWeekdaysMin(localeSorted, format2, index) { - return listWeekdaysImpl(localeSorted, format2, index, "weekdaysMin"); - } - getSetGlobalLocale("en", { - eras: [ - { - since: "0001-01-01", - until: Infinity, - offset: 1, - name: "Anno Domini", - narrow: "AD", - abbr: "AD" - }, - { - since: "0000-12-31", - until: -Infinity, - offset: 1, - name: "Before Christ", - narrow: "BC", - abbr: "BC" + }); + var _calendars = require2("./calendars"); + _defaults(exports3, _interopExportWildcard(_calendars, _defaults)); + var _client = require2("./client"); + Object.defineProperty(exports3, "Client", { + enumerable: true, + get: function get() { + return _client.Client; } - ], - dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/, - ordinal: function(number) { - var b3 = number % 10, output = toInt(number % 100 / 10) === 1 ? "th" : b3 === 1 ? "st" : b3 === 2 ? "nd" : b3 === 3 ? "rd" : "th"; - return number + output; - } - }); - hooks.lang = deprecate("moment.lang is deprecated. Use moment.locale instead.", getSetGlobalLocale); - hooks.langData = deprecate("moment.langData is deprecated. Use moment.localeData instead.", getLocale); - var mathAbs = Math.abs; - function abs() { - var data = this._data; - this._milliseconds = mathAbs(this._milliseconds); - this._days = mathAbs(this._days); - this._months = mathAbs(this._months); - data.milliseconds = mathAbs(data.milliseconds); - data.seconds = mathAbs(data.seconds); - data.minutes = mathAbs(data.minutes); - data.hours = mathAbs(data.hours); - data.months = mathAbs(data.months); - data.years = mathAbs(data.years); - return this; - } - function addSubtract$1(duration, input, value, direction) { - var other = createDuration2(input, value); - duration._milliseconds += direction * other._milliseconds; - duration._days += direction * other._days; - duration._months += direction * other._months; - return duration._bubble(); - } - function add$1(input, value) { - return addSubtract$1(this, input, value, 1); - } - function subtract$1(input, value) { - return addSubtract$1(this, input, value, -1); - } - function absCeil(number) { - if (number < 0) { - return Math.floor(number); - } else { - return Math.ceil(number); - } - } - function bubble() { - var milliseconds2 = this._milliseconds, days2 = this._days, months3 = this._months, data = this._data, seconds2, minutes2, hours2, years2, monthsFromDays; - if (!(milliseconds2 >= 0 && days2 >= 0 && months3 >= 0 || milliseconds2 <= 0 && days2 <= 0 && months3 <= 0)) { - milliseconds2 += absCeil(monthsToDays(months3) + days2) * 864e5; - days2 = 0; - months3 = 0; - } - data.milliseconds = milliseconds2 % 1e3; - seconds2 = absFloor(milliseconds2 / 1e3); - data.seconds = seconds2 % 60; - minutes2 = absFloor(seconds2 / 60); - data.minutes = minutes2 % 60; - hours2 = absFloor(minutes2 / 60); - data.hours = hours2 % 24; - days2 += absFloor(hours2 / 24); - monthsFromDays = absFloor(daysToMonths(days2)); - months3 += monthsFromDays; - days2 -= absCeil(monthsToDays(monthsFromDays)); - years2 = absFloor(months3 / 12); - months3 %= 12; - data.days = days2; - data.months = months3; - data.years = years2; - return this; - } - function daysToMonths(days2) { - return days2 * 4800 / 146097; - } - function monthsToDays(months3) { - return months3 * 146097 / 4800; - } - function as(units) { - if (!this.isValid()) { - return NaN; - } - var days2, months3, milliseconds2 = this._milliseconds; - units = normalizeUnits(units); - if (units === "month" || units === "quarter" || units === "year") { - days2 = this._days + milliseconds2 / 864e5; - months3 = this._months + daysToMonths(days2); - switch (units) { - case "month": - return months3; - case "quarter": - return months3 / 3; - case "year": - return months3 / 12; + }); + var _contacts = require2("./contacts"); + _defaults(exports3, _interopExportWildcard(_contacts, _defaults)); + var _model = require2("./model"); + _defaults(exports3, _interopExportWildcard(_model, _defaults)); + Object.defineProperty(exports3, "Request", { + enumerable: true, + get: function get() { + return _request.Request; } - } else { - days2 = this._days + Math.round(monthsToDays(this._months)); - switch (units) { - case "week": - return days2 / 7 + milliseconds2 / 6048e5; - case "day": - return days2 + milliseconds2 / 864e5; - case "hour": - return days2 * 24 + milliseconds2 / 36e5; - case "minute": - return days2 * 1440 + milliseconds2 / 6e4; - case "second": - return days2 * 86400 + milliseconds2 / 1e3; - case "millisecond": - return Math.floor(days2 * 864e5) + milliseconds2; - default: - throw new Error("Unknown unit " + units); + }); + var _sandbox = require2("./sandbox"); + Object.defineProperty(exports3, "Sandbox", { + enumerable: true, + get: function get() { + return _sandbox.Sandbox; + } + }); + Object.defineProperty(exports3, "createSandbox", { + enumerable: true, + get: function get() { + return _sandbox.createSandbox; + } + }); + exports3.debug = _debug2["default"]; + exports3.ns = ns; + exports3.request = request2; + exports3.transport = transport4; + }, { "../package": 33, "./accounts": 1, "./calendars": 2, "./client": 4, "./contacts": 5, "./debug": 6, "./model": 9, "./namespace": 10, "./request": 12, "./sandbox": 13, "./transport": 21 }], 9: [function(require2, module4, exports3) { + "use strict"; + Object.defineProperty(exports3, "__esModule", { + value: true + }); + var _get = function get(_x, _x2, _x3) { + var _again = true; + _function: + while (_again) { + var object = _x, property = _x2, receiver = _x3; + _again = false; + if (object === null) + object = Function.prototype; + var desc = Object.getOwnPropertyDescriptor(object, property); + if (desc === void 0) { + var parent = Object.getPrototypeOf(object); + if (parent === null) { + return void 0; + } else { + _x = parent; + _x2 = property; + _x3 = receiver; + _again = true; + desc = parent = void 0; + continue _function; + } + } else if ("value" in desc) { + return desc.value; + } else { + var getter = desc.get; + if (getter === void 0) { + return void 0; + } + return getter.call(receiver); + } + } + }; + function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } + subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); + if (superClass) + Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - } - function valueOf$1() { - if (!this.isValid()) { - return NaN; + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } } - return this._milliseconds + this._days * 864e5 + this._months % 12 * 2592e6 + toInt(this._months / 12) * 31536e6; - } - function makeAs(alias) { - return function() { - return this.as(alias); + var Account = function Account2(options) { + _classCallCheck(this, Account2); + Object.assign(this, { + server: null, + credentials: null, + rootUrl: null, + principalUrl: null, + homeUrl: null, + calendars: null, + addressBooks: null + }, options); }; - } - var asMilliseconds = makeAs("ms"), asSeconds = makeAs("s"), asMinutes = makeAs("m"), asHours = makeAs("h"), asDays = makeAs("d"), asWeeks = makeAs("w"), asMonths = makeAs("M"), asQuarters = makeAs("Q"), asYears = makeAs("y"); - function clone$1() { - return createDuration2(this); - } - function get$2(units) { - units = normalizeUnits(units); - return this.isValid() ? this[units + "s"]() : NaN; - } - function makeGetter(name) { - return function() { - return this.isValid() ? this._data[name] : NaN; + exports3.Account = Account; + var Credentials2 = function Credentials3(options) { + _classCallCheck(this, Credentials3); + Object.assign(this, { + username: null, + password: null, + clientId: null, + clientSecret: null, + authorizationCode: null, + redirectUrl: null, + tokenUrl: null, + accessToken: null, + refreshToken: null, + expiration: null + }, options); }; - } - var milliseconds = makeGetter("milliseconds"), seconds = makeGetter("seconds"), minutes = makeGetter("minutes"), hours = makeGetter("hours"), days = makeGetter("days"), months2 = makeGetter("months"), years = makeGetter("years"); - function weeks() { - return absFloor(this.days() / 7); - } - var round = Math.round, thresholds = { - ss: 44, - s: 45, - m: 45, - h: 22, - d: 26, - w: null, - M: 11 - }; - function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale2) { - return locale2.relativeTime(number || 1, !!withoutSuffix, string, isFuture); - } - function relativeTime$1(posNegDuration, withoutSuffix, thresholds2, locale2) { - var duration = createDuration2(posNegDuration).abs(), seconds2 = round(duration.as("s")), minutes2 = round(duration.as("m")), hours2 = round(duration.as("h")), days2 = round(duration.as("d")), months3 = round(duration.as("M")), weeks2 = round(duration.as("w")), years2 = round(duration.as("y")), a3 = seconds2 <= thresholds2.ss && ["s", seconds2] || seconds2 < thresholds2.s && ["ss", seconds2] || minutes2 <= 1 && ["m"] || minutes2 < thresholds2.m && ["mm", minutes2] || hours2 <= 1 && ["h"] || hours2 < thresholds2.h && ["hh", hours2] || days2 <= 1 && ["d"] || days2 < thresholds2.d && ["dd", days2]; - if (thresholds2.w != null) { - a3 = a3 || weeks2 <= 1 && ["w"] || weeks2 < thresholds2.w && ["ww", weeks2]; + exports3.Credentials = Credentials2; + var DAVCollection = function DAVCollection2(options) { + _classCallCheck(this, DAVCollection2); + Object.assign(this, { + data: null, + objects: null, + account: null, + ctag: null, + description: null, + displayName: null, + reports: null, + resourcetype: null, + syncToken: null, + url: null + }, options); + }; + exports3.DAVCollection = DAVCollection; + var AddressBook = function(_DAVCollection) { + _inherits(AddressBook2, _DAVCollection); + function AddressBook2(options) { + _classCallCheck(this, AddressBook2); + _get(Object.getPrototypeOf(AddressBook2.prototype), "constructor", this).call(this, options); + } + return AddressBook2; + }(DAVCollection); + exports3.AddressBook = AddressBook; + var Calendar3 = function(_DAVCollection2) { + _inherits(Calendar4, _DAVCollection2); + function Calendar4(options) { + _classCallCheck(this, Calendar4); + _get(Object.getPrototypeOf(Calendar4.prototype), "constructor", this).call(this, options); + Object.assign(this, { + components: null, + timezone: null + }, options); + } + return Calendar4; + }(DAVCollection); + exports3.Calendar = Calendar3; + var DAVObject = function DAVObject2(options) { + _classCallCheck(this, DAVObject2); + Object.assign(this, { + data: null, + etag: null, + url: null + }, options); + }; + exports3.DAVObject = DAVObject; + var CalendarObject = function(_DAVObject) { + _inherits(CalendarObject2, _DAVObject); + function CalendarObject2(options) { + _classCallCheck(this, CalendarObject2); + _get(Object.getPrototypeOf(CalendarObject2.prototype), "constructor", this).call(this, options); + Object.assign(this, { + calendar: null, + calendarData: null + }, options); + } + return CalendarObject2; + }(DAVObject); + exports3.CalendarObject = CalendarObject; + var VCard = function(_DAVObject2) { + _inherits(VCard2, _DAVObject2); + function VCard2(options) { + _classCallCheck(this, VCard2); + _get(Object.getPrototypeOf(VCard2.prototype), "constructor", this).call(this, options); + Object.assign(this, { + addressBook: null, + addressData: null + }, options); + } + return VCard2; + }(DAVObject); + exports3.VCard = VCard; + }, {}], 10: [function(require2, module4, exports3) { + "use strict"; + Object.defineProperty(exports3, "__esModule", { + value: true + }); + var CALENDAR_SERVER = "http://calendarserver.org/ns/"; + exports3.CALENDAR_SERVER = CALENDAR_SERVER; + var CALDAV_APPLE = "http://apple.com/ns/ical/"; + exports3.CALDAV_APPLE = CALDAV_APPLE; + var CALDAV = "urn:ietf:params:xml:ns:caldav"; + exports3.CALDAV = CALDAV; + var CARDDAV = "urn:ietf:params:xml:ns:carddav"; + exports3.CARDDAV = CARDDAV; + var DAV = "DAV:"; + exports3.DAV = DAV; + }, {}], 11: [function(require2, module4, exports3) { + "use strict"; + Object.defineProperty(exports3, "__esModule", { + value: true + }); + exports3.multistatus = multistatus; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { "default": obj }; } - a3 = a3 || months3 <= 1 && ["M"] || months3 < thresholds2.M && ["MM", months3] || years2 <= 1 && ["y"] || ["yy", years2]; - a3[2] = withoutSuffix; - a3[3] = +posNegDuration > 0; - a3[4] = locale2; - return substituteTimeAgo.apply(null, a3); - } - function getSetRelativeTimeRounding(roundingFunction) { - if (roundingFunction === void 0) { - return round; + var _camelize = require2("./camelize"); + var _camelize2 = _interopRequireDefault(_camelize); + var debug = require2("./debug")("dav:parser"); + var DOMParser = void 0; + if (typeof self !== "undefined" && "DOMParser" in self) { + DOMParser = self.DOMParser; + } else { + DOMParser = require2("xmldom").DOMParser; } - if (typeof roundingFunction === "function") { - round = roundingFunction; - return true; + function multistatus(string) { + var parser = new DOMParser(); + var doc = parser.parseFromString(string, "text/xml"); + var result = traverse.multistatus(child(doc, "multistatus")); + debug("input:\n" + string + "\noutput:\n" + JSON.stringify(result) + "\n"); + return result; } - return false; - } - function getSetRelativeTimeThreshold(threshold, limit) { - if (thresholds[threshold] === void 0) { - return false; + var traverse = { + multistatus: function multistatus2(node) { + return complex(node, { response: true }); + }, + response: function response(node) { + return complex(node, { propstat: true, href: false }); + }, + propstat: function propstat(node) { + return complex(node, { prop: false }); + }, + prop: function prop(node) { + return complex(node, { + resourcetype: false, + supportedCalendarComponentSet: false, + supportedReportSet: false, + currentUserPrincipal: false + }); + }, + resourcetype: function resourcetype(node) { + return childNodes(node).map(function(childNode) { + return childNode.localName; + }); + }, + supportedCalendarComponentSet: function supportedCalendarComponentSet(node) { + return complex(node, { comp: true }, "comp"); + }, + supportedReportSet: function supportedReportSet(node) { + return complex(node, { supportedReport: true }, "supportedReport"); + }, + comp: function comp(node) { + return node.getAttribute("name"); + }, + supportedReport: function supportedReport(node) { + return complex(node, { report: false }, "report"); + }, + report: function report(node) { + return childNodes(node).map(function(childNode) { + return childNode.localName; + }); + }, + href: function href(node) { + return decodeURIComponent(childNodes(node)[0].nodeValue); + }, + currentUserPrincipal: function currentUserPrincipal(node) { + return complex(node, { href: false }, "href"); + } + }; + function complex(node, childspec, collapse) { + var result = {}; + for (var key in childspec) { + if (childspec[key]) { + result[key] = []; + } + } + childNodes(node).forEach(function(childNode) { + return traverseChild(node, childNode, childspec, result); + }); + return maybeCollapse(result, childspec, collapse); } - if (limit === void 0) { - return thresholds[threshold]; + function traverseChild(node, childNode, childspec, result) { + if (childNode.nodeType === 3 && /^\s+$/.test(childNode.nodeValue)) { + return; + } + var localName = (0, _camelize2["default"])(childNode.localName, "-"); + if (!(localName in childspec)) { + debug("Unexpected node of type " + localName + " encountered while parsing " + node.localName + " node!"); + var value = childNode.textContent; + if (localName in result) { + if (!Array.isArray(result[localName])) { + result[localName] = [result[localName]]; + } + result[localName].push(value); + return; + } + result[localName] = value; + return; + } + var traversal = traverse[localName](childNode); + if (childspec[localName]) { + result[localName].push(traversal); + } else { + result[localName] = traversal; + } } - thresholds[threshold] = limit; - if (threshold === "s") { - thresholds.ss = limit - 1; + function maybeCollapse(result, childspec, collapse) { + if (!collapse) { + return result; + } + if (!childspec[collapse]) { + return result[collapse]; + } + return result[collapse].reduce(function(a3, b3) { + return a3.concat(b3); + }, []); } - return true; - } - function humanize(argWithSuffix, argThresholds) { - if (!this.isValid()) { - return this.localeData().invalidDate(); + function childNodes(node) { + var result = node.childNodes; + if (!Array.isArray(result)) { + result = Array.prototype.slice.call(result); + } + return result; } - var withSuffix = false, th = thresholds, locale2, output; - if (typeof argWithSuffix === "object") { - argThresholds = argWithSuffix; - argWithSuffix = false; + function children(node, localName) { + return childNodes(node).filter(function(childNode) { + return childNode.localName === localName; + }); } - if (typeof argWithSuffix === "boolean") { - withSuffix = argWithSuffix; + function child(node, localName) { + return children(node, localName)[0]; } - if (typeof argThresholds === "object") { - th = Object.assign({}, thresholds, argThresholds); - if (argThresholds.s != null && argThresholds.ss == null) { - th.ss = argThresholds.s - 1; + }, { "./camelize": 3, "./debug": 6, "xmldom": 30 }], 12: [function(require2, module4, exports3) { + "use strict"; + Object.defineProperty(exports3, "__esModule", { + value: true + }); + exports3.addressBookQuery = addressBookQuery; + exports3.basic = basic; + exports3.calendarQuery = calendarQuery; + exports3.collectionQuery = collectionQuery; + exports3.propfind = propfind; + exports3.syncCollection = syncCollection; + exports3.mergeProps = mergeProps2; + exports3.getProps = getProps; + exports3.setRequestHeaders = setRequestHeaders; + function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) + newObj[key] = obj[key]; + } + } + newObj["default"] = obj; + return newObj; } } - locale2 = this.localeData(); - output = relativeTime$1(this, !withSuffix, th, locale2); - if (withSuffix) { - output = locale2.pastFuture(+this, output); - } - return locale2.postformat(output); - } - var abs$1 = Math.abs; - function sign(x4) { - return (x4 > 0) - (x4 < 0) || +x4; - } - function toISOString$1() { - if (!this.isValid()) { - return this.localeData().invalidDate(); + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } } - var seconds2 = abs$1(this._milliseconds) / 1e3, days2 = abs$1(this._days), months3 = abs$1(this._months), minutes2, hours2, years2, s4, total = this.asSeconds(), totalSign, ymSign, daysSign, hmsSign; - if (!total) { - return "P0D"; + var _parser = require2("./parser"); + var _template = require2("./template"); + var template = _interopRequireWildcard(_template); + function addressBookQuery(options) { + return collectionQuery(template.addressBookQuery({ props: options.props || [] }), { depth: options.depth }); } - minutes2 = absFloor(seconds2 / 60); - hours2 = absFloor(minutes2 / 60); - seconds2 %= 60; - minutes2 %= 60; - years2 = absFloor(months3 / 12); - months3 %= 12; - s4 = seconds2 ? seconds2.toFixed(3).replace(/\.?0+$/, "") : ""; - totalSign = total < 0 ? "-" : ""; - ymSign = sign(this._months) !== sign(total) ? "-" : ""; - daysSign = sign(this._days) !== sign(total) ? "-" : ""; - hmsSign = sign(this._milliseconds) !== sign(total) ? "-" : ""; - return totalSign + "P" + (years2 ? ymSign + years2 + "Y" : "") + (months3 ? ymSign + months3 + "M" : "") + (days2 ? daysSign + days2 + "D" : "") + (hours2 || minutes2 || seconds2 ? "T" : "") + (hours2 ? hmsSign + hours2 + "H" : "") + (minutes2 ? hmsSign + minutes2 + "M" : "") + (seconds2 ? hmsSign + s4 + "S" : ""); - } - var proto$2 = Duration2.prototype; - proto$2.isValid = isValid$1; - proto$2.abs = abs; - proto$2.add = add$1; - proto$2.subtract = subtract$1; - proto$2.as = as; - proto$2.asMilliseconds = asMilliseconds; - proto$2.asSeconds = asSeconds; - proto$2.asMinutes = asMinutes; - proto$2.asHours = asHours; - proto$2.asDays = asDays; - proto$2.asWeeks = asWeeks; - proto$2.asMonths = asMonths; - proto$2.asQuarters = asQuarters; - proto$2.asYears = asYears; - proto$2.valueOf = valueOf$1; - proto$2._bubble = bubble; - proto$2.clone = clone$1; - proto$2.get = get$2; - proto$2.milliseconds = milliseconds; - proto$2.seconds = seconds; - proto$2.minutes = minutes; - proto$2.hours = hours; - proto$2.days = days; - proto$2.weeks = weeks; - proto$2.months = months2; - proto$2.years = years; - proto$2.humanize = humanize; - proto$2.toISOString = toISOString$1; - proto$2.toString = toISOString$1; - proto$2.toJSON = toISOString$1; - proto$2.locale = locale; - proto$2.localeData = localeData; - proto$2.toIsoString = deprecate("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)", toISOString$1); - proto$2.lang = lang; - addFormatToken("X", 0, 0, "unix"); - addFormatToken("x", 0, 0, "valueOf"); - addRegexToken("x", matchSigned); - addRegexToken("X", matchTimestamp); - addParseToken("X", function(input, array, config2) { - config2._d = new Date(parseFloat(input) * 1e3); - }); - addParseToken("x", function(input, array, config2) { - config2._d = new Date(toInt(input)); - }); - hooks.version = "2.29.4"; - setHookCallback(createLocal); - hooks.fn = proto; - hooks.min = min; - hooks.max = max; - hooks.now = now2; - hooks.utc = createUTC; - hooks.unix = createUnix; - hooks.months = listMonths; - hooks.isDate = isDate2; - hooks.locale = getSetGlobalLocale; - hooks.invalid = createInvalid; - hooks.duration = createDuration2; - hooks.isMoment = isMoment; - hooks.weekdays = listWeekdays; - hooks.parseZone = createInZone; - hooks.localeData = getLocale; - hooks.isDuration = isDuration; - hooks.monthsShort = listMonthsShort; - hooks.weekdaysMin = listWeekdaysMin; - hooks.defineLocale = defineLocale; - hooks.updateLocale = updateLocale; - hooks.locales = listLocales; - hooks.weekdaysShort = listWeekdaysShort; - hooks.normalizeUnits = normalizeUnits; - hooks.relativeTimeRounding = getSetRelativeTimeRounding; - hooks.relativeTimeThreshold = getSetRelativeTimeThreshold; - hooks.calendarFormat = getCalendarFormat; - hooks.prototype = proto; - hooks.HTML5_FMT = { - DATETIME_LOCAL: "YYYY-MM-DDTHH:mm", - DATETIME_LOCAL_SECONDS: "YYYY-MM-DDTHH:mm:ss", - DATETIME_LOCAL_MS: "YYYY-MM-DDTHH:mm:ss.SSS", - DATE: "YYYY-MM-DD", - TIME: "HH:mm", - TIME_SECONDS: "HH:mm:ss", - TIME_MS: "HH:mm:ss.SSS", - WEEK: "GGGG-[W]WW", - MONTH: "YYYY-MM" - }; - return hooks; - }); - } -}); - -// node_modules/obsidian-daily-notes-interface/dist/main.js -var require_main = __commonJS({ - "node_modules/obsidian-daily-notes-interface/dist/main.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - var obsidian = require("obsidian"); - var DEFAULT_DAILY_NOTE_FORMAT = "YYYY-MM-DD"; - var DEFAULT_WEEKLY_NOTE_FORMAT = "gggg-[W]ww"; - var DEFAULT_MONTHLY_NOTE_FORMAT = "YYYY-MM"; - var DEFAULT_QUARTERLY_NOTE_FORMAT = "YYYY-[Q]Q"; - var DEFAULT_YEARLY_NOTE_FORMAT = "YYYY"; - function shouldUsePeriodicNotesSettings(periodicity) { - var _a, _b; - const periodicNotes = window.app.plugins.getPlugin("periodic-notes"); - return periodicNotes && ((_b = (_a = periodicNotes.settings) == null ? void 0 : _a[periodicity]) == null ? void 0 : _b.enabled); - } - function getDailyNoteSettings4() { - var _a, _b, _c, _d; - try { - const { internalPlugins, plugins } = window.app; - if (shouldUsePeriodicNotesSettings("daily")) { - const { format: format2, folder: folder2, template: template2 } = ((_b = (_a = plugins.getPlugin("periodic-notes")) == null ? void 0 : _a.settings) == null ? void 0 : _b.daily) || {}; - return { - format: format2 || DEFAULT_DAILY_NOTE_FORMAT, - folder: (folder2 == null ? void 0 : folder2.trim()) || "", - template: (template2 == null ? void 0 : template2.trim()) || "" - }; + function basic(options) { + function transformRequest(xhr) { + setRequestHeaders(xhr, options); + } + return new Request2({ + method: options.method, + requestData: options.data, + transformRequest + }); } - const { folder, format, template } = ((_d = (_c = internalPlugins.getPluginById("daily-notes")) == null ? void 0 : _c.instance) == null ? void 0 : _d.options) || {}; - return { - format: format || DEFAULT_DAILY_NOTE_FORMAT, - folder: (folder == null ? void 0 : folder.trim()) || "", - template: (template == null ? void 0 : template.trim()) || "" - }; - } catch (err) { - console.info("No custom daily note settings found!", err); - } - } - function getWeeklyNoteSettings() { - var _a, _b, _c, _d, _e, _f, _g; - try { - const pluginManager = window.app.plugins; - const calendarSettings = (_a = pluginManager.getPlugin("calendar")) == null ? void 0 : _a.options; - const periodicNotesSettings = (_c = (_b = pluginManager.getPlugin("periodic-notes")) == null ? void 0 : _b.settings) == null ? void 0 : _c.weekly; - if (shouldUsePeriodicNotesSettings("weekly")) { - return { - format: periodicNotesSettings.format || DEFAULT_WEEKLY_NOTE_FORMAT, - folder: ((_d = periodicNotesSettings.folder) == null ? void 0 : _d.trim()) || "", - template: ((_e = periodicNotesSettings.template) == null ? void 0 : _e.trim()) || "" - }; + function calendarQuery(options) { + return collectionQuery(template.calendarQuery({ + props: options.props || [], + filters: options.filters || [], + timezone: options.timezone + }), { + depth: options.depth + }); } - const settings = calendarSettings || {}; - return { - format: settings.weeklyNoteFormat || DEFAULT_WEEKLY_NOTE_FORMAT, - folder: ((_f = settings.weeklyNoteFolder) == null ? void 0 : _f.trim()) || "", - template: ((_g = settings.weeklyNoteTemplate) == null ? void 0 : _g.trim()) || "" - }; - } catch (err) { - console.info("No custom weekly note settings found!", err); - } - } - function getMonthlyNoteSettings() { - var _a, _b, _c, _d; - const pluginManager = window.app.plugins; - try { - const settings = shouldUsePeriodicNotesSettings("monthly") && ((_b = (_a = pluginManager.getPlugin("periodic-notes")) == null ? void 0 : _a.settings) == null ? void 0 : _b.monthly) || {}; - return { - format: settings.format || DEFAULT_MONTHLY_NOTE_FORMAT, - folder: ((_c = settings.folder) == null ? void 0 : _c.trim()) || "", - template: ((_d = settings.template) == null ? void 0 : _d.trim()) || "" - }; - } catch (err) { - console.info("No custom monthly note settings found!", err); - } - } - function getQuarterlyNoteSettings() { - var _a, _b, _c, _d; - const pluginManager = window.app.plugins; - try { - const settings = shouldUsePeriodicNotesSettings("quarterly") && ((_b = (_a = pluginManager.getPlugin("periodic-notes")) == null ? void 0 : _a.settings) == null ? void 0 : _b.quarterly) || {}; - return { - format: settings.format || DEFAULT_QUARTERLY_NOTE_FORMAT, - folder: ((_c = settings.folder) == null ? void 0 : _c.trim()) || "", - template: ((_d = settings.template) == null ? void 0 : _d.trim()) || "" - }; - } catch (err) { - console.info("No custom quarterly note settings found!", err); - } - } - function getYearlyNoteSettings() { - var _a, _b, _c, _d; - const pluginManager = window.app.plugins; - try { - const settings = shouldUsePeriodicNotesSettings("yearly") && ((_b = (_a = pluginManager.getPlugin("periodic-notes")) == null ? void 0 : _a.settings) == null ? void 0 : _b.yearly) || {}; - return { - format: settings.format || DEFAULT_YEARLY_NOTE_FORMAT, - folder: ((_c = settings.folder) == null ? void 0 : _c.trim()) || "", - template: ((_d = settings.template) == null ? void 0 : _d.trim()) || "" - }; - } catch (err) { - console.info("No custom yearly note settings found!", err); - } - } - function join(...partSegments) { - let parts = []; - for (let i3 = 0, l4 = partSegments.length; i3 < l4; i3++) { - parts = parts.concat(partSegments[i3].split("/")); - } - const newParts = []; - for (let i3 = 0, l4 = parts.length; i3 < l4; i3++) { - const part = parts[i3]; - if (!part || part === ".") - continue; - else - newParts.push(part); - } - if (parts[0] === "") - newParts.unshift(""); - return newParts.join("/"); - } - function basename(fullPath) { - let base = fullPath.substring(fullPath.lastIndexOf("/") + 1); - if (base.lastIndexOf(".") != -1) - base = base.substring(0, base.lastIndexOf(".")); - return base; - } - function ensureFolderExists(path) { - return __async(this, null, function* () { - const dirs = path.replace(/\\/g, "/").split("/"); - dirs.pop(); - if (dirs.length) { - const dir = join(...dirs); - if (!window.app.vault.getAbstractFileByPath(dir)) { - yield window.app.vault.createFolder(dir); + function collectionQuery(requestData, options) { + function transformRequest(xhr) { + setRequestHeaders(xhr, options); } - } - }); - } - function getNotePath(directory, filename) { - return __async(this, null, function* () { - if (!filename.endsWith(".md")) { - filename += ".md"; - } - const path = obsidian.normalizePath(join(directory, filename)); - yield ensureFolderExists(path); - return path; - }); - } - function getTemplateInfo(template) { - return __async(this, null, function* () { - const { metadataCache, vault } = window.app; - const templatePath = obsidian.normalizePath(template); - if (templatePath === "/") { - return Promise.resolve(["", null]); - } - try { - const templateFile = metadataCache.getFirstLinkpathDest(templatePath, ""); - const contents = yield vault.cachedRead(templateFile); - const IFoldInfo = window.app.foldManager.load(templateFile); - return [contents, IFoldInfo]; - } catch (err) { - console.error(`Failed to read the daily note template '${templatePath}'`, err); - new obsidian.Notice("Failed to read the daily note template"); - return ["", null]; - } - }); - } - function getDateUID(date, granularity = "day") { - const ts = date.clone().startOf(granularity).format(); - return `${granularity}-${ts}`; - } - function removeEscapedCharacters(format) { - return format.replace(/\[[^\]]*\]/g, ""); - } - function isFormatAmbiguous(format, granularity) { - if (granularity === "week") { - const cleanFormat = removeEscapedCharacters(format); - return /w{1,2}/i.test(cleanFormat) && (/M{1,4}/.test(cleanFormat) || /D{1,4}/.test(cleanFormat)); - } - return false; - } - function getDateFromFile(file, granularity) { - return getDateFromFilename(file.basename, granularity); - } - function getDateFromPath3(path, granularity) { - return getDateFromFilename(basename(path), granularity); - } - function getDateFromFilename(filename, granularity) { - const getSettings = { - day: getDailyNoteSettings4, - week: getWeeklyNoteSettings, - month: getMonthlyNoteSettings, - quarter: getQuarterlyNoteSettings, - year: getYearlyNoteSettings - }; - const format = getSettings[granularity]().format.split("/").pop(); - const noteDate = window.moment(filename, format, true); - if (!noteDate.isValid()) { - return null; - } - if (isFormatAmbiguous(format, granularity)) { - if (granularity === "week") { - const cleanFormat = removeEscapedCharacters(format); - if (/w{1,2}/i.test(cleanFormat)) { - return window.moment(filename, format.replace(/M{1,4}/g, "").replace(/D{1,4}/g, ""), false); + function transformResponse(xhr) { + return (0, _parser.multistatus)(xhr.responseText).response.map(function(res) { + return { href: res.href, props: getProps(res.propstat) }; + }); } + return new Request2({ + method: "REPORT", + requestData, + transformRequest, + transformResponse + }); } - } - return noteDate; - } - var DailyNotesFolderMissingError = class extends Error { - }; - function createDailyNote2(date) { - return __async(this, null, function* () { - const app = window.app; - const { vault } = app; - const moment2 = window.moment; - const { template, format, folder } = getDailyNoteSettings4(); - const [templateContents, IFoldInfo] = yield getTemplateInfo(template); - const filename = date.format(format); - const normalizedPath = yield getNotePath(folder, filename); - try { - const createdFile = yield vault.create(normalizedPath, templateContents.replace(/{{\s*date\s*}}/gi, filename).replace(/{{\s*time\s*}}/gi, moment2().format("HH:mm")).replace(/{{\s*title\s*}}/gi, filename).replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi, (_3, _timeOrDate, calc, timeDelta, unit, momentFormat) => { - const now2 = moment2(); - const currentDate = date.clone().set({ - hour: now2.get("hour"), - minute: now2.get("minute"), - second: now2.get("second") + function propfind(options) { + var requestData = template.propfind({ props: options.props }); + function transformRequest(xhr) { + setRequestHeaders(xhr, options); + } + function transformResponse(xhr) { + var responses = (0, _parser.multistatus)(xhr.responseText).response.map(function(res) { + return { href: res.href, props: getProps(res.propstat) }; }); - if (calc) { - currentDate.add(parseInt(timeDelta, 10), unit); - } - if (momentFormat) { - return currentDate.format(momentFormat.substring(1).trim()); + if (!options.mergeResponses) { + return responses; } - return currentDate.format(format); - }).replace(/{{\s*yesterday\s*}}/gi, date.clone().subtract(1, "day").format(format)).replace(/{{\s*tomorrow\s*}}/gi, date.clone().add(1, "d").format(format))); - app.foldManager.save(createdFile, IFoldInfo); - return createdFile; - } catch (err) { - console.error(`Failed to create file: '${normalizedPath}'`, err); - new obsidian.Notice("Unable to create new file."); - } - }); - } - function getDailyNote2(date, dailyNotes) { - var _a; - return (_a = dailyNotes[getDateUID(date, "day")]) != null ? _a : null; - } - function getAllDailyNotes3() { - const { vault } = window.app; - const { folder } = getDailyNoteSettings4(); - const dailyNotesFolder = vault.getAbstractFileByPath(obsidian.normalizePath(folder)); - if (!dailyNotesFolder) { - throw new DailyNotesFolderMissingError("Failed to find daily notes folder"); - } - const dailyNotes = {}; - obsidian.Vault.recurseChildren(dailyNotesFolder, (note) => { - if (note instanceof obsidian.TFile) { - const date = getDateFromFile(note, "day"); - if (date) { - const dateString = getDateUID(date, "day"); - dailyNotes[dateString] = note; + var merged = mergeProps2(responses.map(function(res) { + return res.props; + })); + var hrefs = responses.map(function(res) { + return res.href; + }); + return { props: merged, hrefs }; } + return new Request2({ + method: "PROPFIND", + requestData, + transformRequest, + transformResponse + }); } - }); - return dailyNotes; - } - var WeeklyNotesFolderMissingError = class extends Error { - }; - function getDaysOfWeek() { - const { moment: moment2 } = window; - let weekStart = moment2.localeData()._week.dow; - const daysOfWeek = [ - "sunday", - "monday", - "tuesday", - "wednesday", - "thursday", - "friday", - "saturday" - ]; - while (weekStart) { - daysOfWeek.push(daysOfWeek.shift()); - weekStart--; - } - return daysOfWeek; - } - function getDayOfWeekNumericalValue(dayOfWeekName) { - return getDaysOfWeek().indexOf(dayOfWeekName.toLowerCase()); - } - function createWeeklyNote(date) { - return __async(this, null, function* () { - const { vault } = window.app; - const { template, format, folder } = getWeeklyNoteSettings(); - const [templateContents, IFoldInfo] = yield getTemplateInfo(template); - const filename = date.format(format); - const normalizedPath = yield getNotePath(folder, filename); - try { - const createdFile = yield vault.create(normalizedPath, templateContents.replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi, (_3, _timeOrDate, calc, timeDelta, unit, momentFormat) => { - const now2 = window.moment(); - const currentDate = date.clone().set({ - hour: now2.get("hour"), - minute: now2.get("minute"), - second: now2.get("second") + function syncCollection(options) { + var requestData = template.syncCollection({ + props: options.props, + syncLevel: options.syncLevel, + syncToken: options.syncToken + }); + function transformRequest(xhr) { + setRequestHeaders(xhr, options); + } + function transformResponse(xhr) { + var object = (0, _parser.multistatus)(xhr.responseText); + var responses = object.response.map(function(res) { + return { href: res.href, props: getProps(res.propstat) }; }); - if (calc) { - currentDate.add(parseInt(timeDelta, 10), unit); - } - if (momentFormat) { - return currentDate.format(momentFormat.substring(1).trim()); - } - return currentDate.format(format); - }).replace(/{{\s*title\s*}}/gi, filename).replace(/{{\s*time\s*}}/gi, window.moment().format("HH:mm")).replace(/{{\s*(sunday|monday|tuesday|wednesday|thursday|friday|saturday)\s*:(.*?)}}/gi, (_3, dayOfWeek2, momentFormat) => { - const day = getDayOfWeekNumericalValue(dayOfWeek2); - return date.weekday(day).format(momentFormat.trim()); + return { responses, syncToken: object.syncToken }; + } + return new Request2({ + method: "REPORT", + requestData, + transformRequest, + transformResponse + }); + } + var Request2 = function Request3() { + var options = arguments.length <= 0 || arguments[0] === void 0 ? {} : arguments[0]; + _classCallCheck(this, Request3); + Object.assign(this, { + method: null, + requestData: null, + transformRequest: null, + transformResponse: null, + onerror: null + }, options); + }; + exports3.Request = Request2; + function getProp(propstat) { + if (/404/g.test(propstat.status)) { + return null; + } + if (/5\d{2}/g.test(propstat.status) || /4\d{2}/g.test(propstat.status)) { + throw new Error("Bad status on propstat: " + propstat.status); + } + return "prop" in propstat ? propstat.prop : null; + } + function mergeProps2(props) { + return props.reduce(function(a3, b3) { + return Object.assign(a3, b3); + }, {}); + } + function getProps(propstats) { + return mergeProps2(propstats.map(getProp).filter(function(prop) { + return prop && typeof prop === "object"; })); - window.app.foldManager.save(createdFile, IFoldInfo); - return createdFile; - } catch (err) { - console.error(`Failed to create file: '${normalizedPath}'`, err); - new obsidian.Notice("Unable to create new file."); } - }); - } - function getWeeklyNote(date, weeklyNotes) { - var _a; - return (_a = weeklyNotes[getDateUID(date, "week")]) != null ? _a : null; - } - function getAllWeeklyNotes() { - const weeklyNotes = {}; - if (!appHasWeeklyNotesPluginLoaded()) { - return weeklyNotes; - } - const { vault } = window.app; - const { folder } = getWeeklyNoteSettings(); - const weeklyNotesFolder = vault.getAbstractFileByPath(obsidian.normalizePath(folder)); - if (!weeklyNotesFolder) { - throw new WeeklyNotesFolderMissingError("Failed to find weekly notes folder"); - } - obsidian.Vault.recurseChildren(weeklyNotesFolder, (note) => { - if (note instanceof obsidian.TFile) { - const date = getDateFromFile(note, "week"); - if (date) { - const dateString = getDateUID(date, "week"); - weeklyNotes[dateString] = note; + function setRequestHeaders(request2, options) { + request2.setRequestHeader("Content-Type", options.contentType || "application/xml;charset=utf-8"); + if ("depth" in options) { + request2.setRequestHeader("Depth", options.depth); + } + if ("etag" in options && options.etag) { + request2.setRequestHeader("If-Match", options.etag); } } - }); - return weeklyNotes; - } - var MonthlyNotesFolderMissingError = class extends Error { - }; - function createMonthlyNote(date) { - return __async(this, null, function* () { - const { vault } = window.app; - const { template, format, folder } = getMonthlyNoteSettings(); - const [templateContents, IFoldInfo] = yield getTemplateInfo(template); - const filename = date.format(format); - const normalizedPath = yield getNotePath(folder, filename); - try { - const createdFile = yield vault.create(normalizedPath, templateContents.replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi, (_3, _timeOrDate, calc, timeDelta, unit, momentFormat) => { - const now2 = window.moment(); - const currentDate = date.clone().set({ - hour: now2.get("hour"), - minute: now2.get("minute"), - second: now2.get("second") - }); - if (calc) { - currentDate.add(parseInt(timeDelta, 10), unit); - } - if (momentFormat) { - return currentDate.format(momentFormat.substring(1).trim()); + }, { "./parser": 11, "./template": 17 }], 13: [function(require2, module4, exports3) { + "use strict"; + Object.defineProperty(exports3, "__esModule", { + value: true + }); + var _createClass = function() { + function defineProperties(target, props) { + for (var i3 = 0; i3 < props.length; i3++) { + var descriptor = props[i3]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) + descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); } - return currentDate.format(format); - }).replace(/{{\s*date\s*}}/gi, filename).replace(/{{\s*time\s*}}/gi, window.moment().format("HH:mm")).replace(/{{\s*title\s*}}/gi, filename)); - window.app.foldManager.save(createdFile, IFoldInfo); - return createdFile; - } catch (err) { - console.error(`Failed to create file: '${normalizedPath}'`, err); - new obsidian.Notice("Unable to create new file."); - } - }); - } - function getMonthlyNote(date, monthlyNotes) { - var _a; - return (_a = monthlyNotes[getDateUID(date, "month")]) != null ? _a : null; - } - function getAllMonthlyNotes() { - const monthlyNotes = {}; - if (!appHasMonthlyNotesPluginLoaded()) { - return monthlyNotes; - } - const { vault } = window.app; - const { folder } = getMonthlyNoteSettings(); - const monthlyNotesFolder = vault.getAbstractFileByPath(obsidian.normalizePath(folder)); - if (!monthlyNotesFolder) { - throw new MonthlyNotesFolderMissingError("Failed to find monthly notes folder"); - } - obsidian.Vault.recurseChildren(monthlyNotesFolder, (note) => { - if (note instanceof obsidian.TFile) { - const date = getDateFromFile(note, "month"); - if (date) { - const dateString = getDateUID(date, "month"); - monthlyNotes[dateString] = note; + } + return function(Constructor, protoProps, staticProps) { + if (protoProps) + defineProperties(Constructor.prototype, protoProps); + if (staticProps) + defineProperties(Constructor, staticProps); + return Constructor; + }; + }(); + exports3.createSandbox = createSandbox; + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); } } - }); - return monthlyNotes; - } - var QuarterlyNotesFolderMissingError = class extends Error { - }; - function createQuarterlyNote(date) { - return __async(this, null, function* () { - const { vault } = window.app; - const { template, format, folder } = getQuarterlyNoteSettings(); - const [templateContents, IFoldInfo] = yield getTemplateInfo(template); - const filename = date.format(format); - const normalizedPath = yield getNotePath(folder, filename); - try { - const createdFile = yield vault.create(normalizedPath, templateContents.replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi, (_3, _timeOrDate, calc, timeDelta, unit, momentFormat) => { - const now2 = window.moment(); - const currentDate = date.clone().set({ - hour: now2.get("hour"), - minute: now2.get("minute"), - second: now2.get("second") - }); - if (calc) { - currentDate.add(parseInt(timeDelta, 10), unit); + var debug = require2("./debug")("dav:sandbox"); + var Sandbox = function() { + function Sandbox2() { + _classCallCheck(this, Sandbox2); + this.requestList = []; + } + _createClass(Sandbox2, [{ + key: "add", + value: function add2(request2) { + debug("Adding request to sandbox."); + this.requestList.push(request2); } - if (momentFormat) { - return currentDate.format(momentFormat.substring(1).trim()); + }, { + key: "abort", + value: function abort() { + debug("Aborting sandboxed requests."); + this.requestList.forEach(function(request2) { + return request2.abort(); + }); } - return currentDate.format(format); - }).replace(/{{\s*date\s*}}/gi, filename).replace(/{{\s*time\s*}}/gi, window.moment().format("HH:mm")).replace(/{{\s*title\s*}}/gi, filename)); - window.app.foldManager.save(createdFile, IFoldInfo); - return createdFile; - } catch (err) { - console.error(`Failed to create file: '${normalizedPath}'`, err); - new obsidian.Notice("Unable to create new file."); + }]); + return Sandbox2; + }(); + exports3.Sandbox = Sandbox; + function createSandbox() { + return new Sandbox(); } - }); - } - function getQuarterlyNote(date, quarterly) { - var _a; - return (_a = quarterly[getDateUID(date, "quarter")]) != null ? _a : null; - } - function getAllQuarterlyNotes() { - const quarterly = {}; - if (!appHasQuarterlyNotesPluginLoaded()) { - return quarterly; - } - const { vault } = window.app; - const { folder } = getQuarterlyNoteSettings(); - const quarterlyFolder = vault.getAbstractFileByPath(obsidian.normalizePath(folder)); - if (!quarterlyFolder) { - throw new QuarterlyNotesFolderMissingError("Failed to find quarterly notes folder"); - } - obsidian.Vault.recurseChildren(quarterlyFolder, (note) => { - if (note instanceof obsidian.TFile) { - const date = getDateFromFile(note, "quarter"); - if (date) { - const dateString = getDateUID(date, "quarter"); - quarterly[dateString] = note; - } + }, { "./debug": 6 }], 14: [function(require2, module4, exports3) { + "use strict"; + Object.defineProperty(exports3, "__esModule", { + value: true + }); + exports3["default"] = addressBookQuery; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { "default": obj }; } - }); - return quarterly; - } - var YearlyNotesFolderMissingError = class extends Error { - }; - function createYearlyNote(date) { - return __async(this, null, function* () { - const { vault } = window.app; - const { template, format, folder } = getYearlyNoteSettings(); - const [templateContents, IFoldInfo] = yield getTemplateInfo(template); - const filename = date.format(format); - const normalizedPath = yield getNotePath(folder, filename); - try { - const createdFile = yield vault.create(normalizedPath, templateContents.replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi, (_3, _timeOrDate, calc, timeDelta, unit, momentFormat) => { - const now2 = window.moment(); - const currentDate = date.clone().set({ - hour: now2.get("hour"), - minute: now2.get("minute"), - second: now2.get("second") - }); - if (calc) { - currentDate.add(parseInt(timeDelta, 10), unit); + var _prop = require2("./prop"); + var _prop2 = _interopRequireDefault(_prop); + function addressBookQuery(object) { + return '\n \n ' + object.props.map(_prop2["default"]) + ` + + + + + + + `; + } + module4.exports = exports3["default"]; + }, { "./prop": 18 }], 15: [function(require2, module4, exports3) { + "use strict"; + Object.defineProperty(exports3, "__esModule", { + value: true + }); + exports3["default"] = calendarQuery; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { "default": obj }; + } + var _filter = require2("./filter"); + var _filter2 = _interopRequireDefault(_filter); + var _prop = require2("./prop"); + var _prop2 = _interopRequireDefault(_prop); + function calendarQuery(object) { + return '\n \n ' + object.props.map(_prop2["default"]) + "\n \n \n " + object.filters.map(_filter2["default"]) + "\n \n " + (object.timezone ? "" + object.timezone + "" : "") + "\n "; + } + module4.exports = exports3["default"]; + }, { "./filter": 16, "./prop": 18 }], 16: [function(require2, module4, exports3) { + "use strict"; + Object.defineProperty(exports3, "__esModule", { + value: true + }); + exports3["default"] = filter; + function filter(item) { + if (!item.children || !item.children.length) { + if (typeof item.value === "undefined") { + return ""; } - if (momentFormat) { - return currentDate.format(momentFormat.substring(1).trim()); + return "" + item.value + ""; + } + var children = item.children.map(filter); + return "\n " + children + "\n "; + } + function formatAttrs(attrs) { + if (typeof attrs !== "object") { + return ""; + } + return Object.keys(attrs).map(function(attr) { + return attr + '="' + attrs[attr] + '"'; + }).join(" "); + } + module4.exports = exports3["default"]; + }, {}], 17: [function(require2, module4, exports3) { + "use strict"; + exports3.addressBookQuery = require2("./address_book_query"); + exports3.calendarQuery = require2("./calendar_query"); + exports3.propfind = require2("./propfind"); + exports3.syncCollection = require2("./sync_collection"); + }, { "./address_book_query": 14, "./calendar_query": 15, "./propfind": 19, "./sync_collection": 20 }], 18: [function(require2, module4, exports3) { + "use strict"; + Object.defineProperty(exports3, "__esModule", { + value: true + }); + exports3["default"] = prop; + function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) + newObj[key] = obj[key]; + } } - return currentDate.format(format); - }).replace(/{{\s*date\s*}}/gi, filename).replace(/{{\s*time\s*}}/gi, window.moment().format("HH:mm")).replace(/{{\s*title\s*}}/gi, filename)); - window.app.foldManager.save(createdFile, IFoldInfo); - return createdFile; - } catch (err) { - console.error(`Failed to create file: '${normalizedPath}'`, err); - new obsidian.Notice("Unable to create new file."); + newObj["default"] = obj; + return newObj; + } } - }); - } - function getYearlyNote(date, yearlyNotes) { - var _a; - return (_a = yearlyNotes[getDateUID(date, "year")]) != null ? _a : null; - } - function getAllYearlyNotes() { - const yearlyNotes = {}; - if (!appHasYearlyNotesPluginLoaded()) { - return yearlyNotes; - } - const { vault } = window.app; - const { folder } = getYearlyNoteSettings(); - const yearlyNotesFolder = vault.getAbstractFileByPath(obsidian.normalizePath(folder)); - if (!yearlyNotesFolder) { - throw new YearlyNotesFolderMissingError("Failed to find yearly notes folder"); - } - obsidian.Vault.recurseChildren(yearlyNotesFolder, (note) => { - if (note instanceof obsidian.TFile) { - const date = getDateFromFile(note, "year"); - if (date) { - const dateString = getDateUID(date, "year"); - yearlyNotes[dateString] = note; + var _namespace = require2("../namespace"); + var ns = _interopRequireWildcard(_namespace); + function prop(item) { + return "<" + xmlnsPrefix(item.namespace) + ":" + item.name + " />"; + } + function xmlnsPrefix(namespace) { + switch (namespace) { + case ns.DAV: + return "d"; + case ns.CALENDAR_SERVER: + return "cs"; + case ns.CALDAV_APPLE: + return "ca"; + case ns.CALDAV: + return "c"; + case ns.CARDDAV: + return "card"; + default: + throw new Error("Unrecognized xmlns " + namespace); } } - }); - return yearlyNotes; - } - function appHasDailyNotesPluginLoaded2() { - var _a, _b; - const { app } = window; - const dailyNotesPlugin = app.internalPlugins.plugins["daily-notes"]; - if (dailyNotesPlugin && dailyNotesPlugin.enabled) { - return true; - } - const periodicNotes = app.plugins.getPlugin("periodic-notes"); - return periodicNotes && ((_b = (_a = periodicNotes.settings) == null ? void 0 : _a.daily) == null ? void 0 : _b.enabled); - } - function appHasWeeklyNotesPluginLoaded() { - var _a, _b; - const { app } = window; - if (app.plugins.getPlugin("calendar")) { - return true; - } - const periodicNotes = app.plugins.getPlugin("periodic-notes"); - return periodicNotes && ((_b = (_a = periodicNotes.settings) == null ? void 0 : _a.weekly) == null ? void 0 : _b.enabled); - } - function appHasMonthlyNotesPluginLoaded() { - var _a, _b; - const { app } = window; - const periodicNotes = app.plugins.getPlugin("periodic-notes"); - return periodicNotes && ((_b = (_a = periodicNotes.settings) == null ? void 0 : _a.monthly) == null ? void 0 : _b.enabled); - } - function appHasQuarterlyNotesPluginLoaded() { - var _a, _b; - const { app } = window; - const periodicNotes = app.plugins.getPlugin("periodic-notes"); - return periodicNotes && ((_b = (_a = periodicNotes.settings) == null ? void 0 : _a.quarterly) == null ? void 0 : _b.enabled); - } - function appHasYearlyNotesPluginLoaded() { - var _a, _b; - const { app } = window; - const periodicNotes = app.plugins.getPlugin("periodic-notes"); - return periodicNotes && ((_b = (_a = periodicNotes.settings) == null ? void 0 : _a.yearly) == null ? void 0 : _b.enabled); - } - function getPeriodicNoteSettings(granularity) { - const getSettings = { - day: getDailyNoteSettings4, - week: getWeeklyNoteSettings, - month: getMonthlyNoteSettings, - quarter: getQuarterlyNoteSettings, - year: getYearlyNoteSettings - }[granularity]; - return getSettings(); - } - function createPeriodicNote(granularity, date) { - const createFn = { - day: createDailyNote2, - month: createMonthlyNote, - week: createWeeklyNote - }; - return createFn[granularity](date); - } - exports.DEFAULT_DAILY_NOTE_FORMAT = DEFAULT_DAILY_NOTE_FORMAT; - exports.DEFAULT_MONTHLY_NOTE_FORMAT = DEFAULT_MONTHLY_NOTE_FORMAT; - exports.DEFAULT_QUARTERLY_NOTE_FORMAT = DEFAULT_QUARTERLY_NOTE_FORMAT; - exports.DEFAULT_WEEKLY_NOTE_FORMAT = DEFAULT_WEEKLY_NOTE_FORMAT; - exports.DEFAULT_YEARLY_NOTE_FORMAT = DEFAULT_YEARLY_NOTE_FORMAT; - exports.appHasDailyNotesPluginLoaded = appHasDailyNotesPluginLoaded2; - exports.appHasMonthlyNotesPluginLoaded = appHasMonthlyNotesPluginLoaded; - exports.appHasQuarterlyNotesPluginLoaded = appHasQuarterlyNotesPluginLoaded; - exports.appHasWeeklyNotesPluginLoaded = appHasWeeklyNotesPluginLoaded; - exports.appHasYearlyNotesPluginLoaded = appHasYearlyNotesPluginLoaded; - exports.createDailyNote = createDailyNote2; - exports.createMonthlyNote = createMonthlyNote; - exports.createPeriodicNote = createPeriodicNote; - exports.createQuarterlyNote = createQuarterlyNote; - exports.createWeeklyNote = createWeeklyNote; - exports.createYearlyNote = createYearlyNote; - exports.getAllDailyNotes = getAllDailyNotes3; - exports.getAllMonthlyNotes = getAllMonthlyNotes; - exports.getAllQuarterlyNotes = getAllQuarterlyNotes; - exports.getAllWeeklyNotes = getAllWeeklyNotes; - exports.getAllYearlyNotes = getAllYearlyNotes; - exports.getDailyNote = getDailyNote2; - exports.getDailyNoteSettings = getDailyNoteSettings4; - exports.getDateFromFile = getDateFromFile; - exports.getDateFromPath = getDateFromPath3; - exports.getDateUID = getDateUID; - exports.getMonthlyNote = getMonthlyNote; - exports.getMonthlyNoteSettings = getMonthlyNoteSettings; - exports.getPeriodicNoteSettings = getPeriodicNoteSettings; - exports.getQuarterlyNote = getQuarterlyNote; - exports.getQuarterlyNoteSettings = getQuarterlyNoteSettings; - exports.getTemplateInfo = getTemplateInfo; - exports.getWeeklyNote = getWeeklyNote; - exports.getWeeklyNoteSettings = getWeeklyNoteSettings; - exports.getYearlyNote = getYearlyNote; - exports.getYearlyNoteSettings = getYearlyNoteSettings; - } -}); - -// node_modules/color-name/index.js -var require_color_name = __commonJS({ - "node_modules/color-name/index.js"(exports, module2) { - "use strict"; - module2.exports = { - "aliceblue": [240, 248, 255], - "antiquewhite": [250, 235, 215], - "aqua": [0, 255, 255], - "aquamarine": [127, 255, 212], - "azure": [240, 255, 255], - "beige": [245, 245, 220], - "bisque": [255, 228, 196], - "black": [0, 0, 0], - "blanchedalmond": [255, 235, 205], - "blue": [0, 0, 255], - "blueviolet": [138, 43, 226], - "brown": [165, 42, 42], - "burlywood": [222, 184, 135], - "cadetblue": [95, 158, 160], - "chartreuse": [127, 255, 0], - "chocolate": [210, 105, 30], - "coral": [255, 127, 80], - "cornflowerblue": [100, 149, 237], - "cornsilk": [255, 248, 220], - "crimson": [220, 20, 60], - "cyan": [0, 255, 255], - "darkblue": [0, 0, 139], - "darkcyan": [0, 139, 139], - "darkgoldenrod": [184, 134, 11], - "darkgray": [169, 169, 169], - "darkgreen": [0, 100, 0], - "darkgrey": [169, 169, 169], - "darkkhaki": [189, 183, 107], - "darkmagenta": [139, 0, 139], - "darkolivegreen": [85, 107, 47], - "darkorange": [255, 140, 0], - "darkorchid": [153, 50, 204], - "darkred": [139, 0, 0], - "darksalmon": [233, 150, 122], - "darkseagreen": [143, 188, 143], - "darkslateblue": [72, 61, 139], - "darkslategray": [47, 79, 79], - "darkslategrey": [47, 79, 79], - "darkturquoise": [0, 206, 209], - "darkviolet": [148, 0, 211], - "deeppink": [255, 20, 147], - "deepskyblue": [0, 191, 255], - "dimgray": [105, 105, 105], - "dimgrey": [105, 105, 105], - "dodgerblue": [30, 144, 255], - "firebrick": [178, 34, 34], - "floralwhite": [255, 250, 240], - "forestgreen": [34, 139, 34], - "fuchsia": [255, 0, 255], - "gainsboro": [220, 220, 220], - "ghostwhite": [248, 248, 255], - "gold": [255, 215, 0], - "goldenrod": [218, 165, 32], - "gray": [128, 128, 128], - "green": [0, 128, 0], - "greenyellow": [173, 255, 47], - "grey": [128, 128, 128], - "honeydew": [240, 255, 240], - "hotpink": [255, 105, 180], - "indianred": [205, 92, 92], - "indigo": [75, 0, 130], - "ivory": [255, 255, 240], - "khaki": [240, 230, 140], - "lavender": [230, 230, 250], - "lavenderblush": [255, 240, 245], - "lawngreen": [124, 252, 0], - "lemonchiffon": [255, 250, 205], - "lightblue": [173, 216, 230], - "lightcoral": [240, 128, 128], - "lightcyan": [224, 255, 255], - "lightgoldenrodyellow": [250, 250, 210], - "lightgray": [211, 211, 211], - "lightgreen": [144, 238, 144], - "lightgrey": [211, 211, 211], - "lightpink": [255, 182, 193], - "lightsalmon": [255, 160, 122], - "lightseagreen": [32, 178, 170], - "lightskyblue": [135, 206, 250], - "lightslategray": [119, 136, 153], - "lightslategrey": [119, 136, 153], - "lightsteelblue": [176, 196, 222], - "lightyellow": [255, 255, 224], - "lime": [0, 255, 0], - "limegreen": [50, 205, 50], - "linen": [250, 240, 230], - "magenta": [255, 0, 255], - "maroon": [128, 0, 0], - "mediumaquamarine": [102, 205, 170], - "mediumblue": [0, 0, 205], - "mediumorchid": [186, 85, 211], - "mediumpurple": [147, 112, 219], - "mediumseagreen": [60, 179, 113], - "mediumslateblue": [123, 104, 238], - "mediumspringgreen": [0, 250, 154], - "mediumturquoise": [72, 209, 204], - "mediumvioletred": [199, 21, 133], - "midnightblue": [25, 25, 112], - "mintcream": [245, 255, 250], - "mistyrose": [255, 228, 225], - "moccasin": [255, 228, 181], - "navajowhite": [255, 222, 173], - "navy": [0, 0, 128], - "oldlace": [253, 245, 230], - "olive": [128, 128, 0], - "olivedrab": [107, 142, 35], - "orange": [255, 165, 0], - "orangered": [255, 69, 0], - "orchid": [218, 112, 214], - "palegoldenrod": [238, 232, 170], - "palegreen": [152, 251, 152], - "paleturquoise": [175, 238, 238], - "palevioletred": [219, 112, 147], - "papayawhip": [255, 239, 213], - "peachpuff": [255, 218, 185], - "peru": [205, 133, 63], - "pink": [255, 192, 203], - "plum": [221, 160, 221], - "powderblue": [176, 224, 230], - "purple": [128, 0, 128], - "rebeccapurple": [102, 51, 153], - "red": [255, 0, 0], - "rosybrown": [188, 143, 143], - "royalblue": [65, 105, 225], - "saddlebrown": [139, 69, 19], - "salmon": [250, 128, 114], - "sandybrown": [244, 164, 96], - "seagreen": [46, 139, 87], - "seashell": [255, 245, 238], - "sienna": [160, 82, 45], - "silver": [192, 192, 192], - "skyblue": [135, 206, 235], - "slateblue": [106, 90, 205], - "slategray": [112, 128, 144], - "slategrey": [112, 128, 144], - "snow": [255, 250, 250], - "springgreen": [0, 255, 127], - "steelblue": [70, 130, 180], - "tan": [210, 180, 140], - "teal": [0, 128, 128], - "thistle": [216, 191, 216], - "tomato": [255, 99, 71], - "turquoise": [64, 224, 208], - "violet": [238, 130, 238], - "wheat": [245, 222, 179], - "white": [255, 255, 255], - "whitesmoke": [245, 245, 245], - "yellow": [255, 255, 0], - "yellowgreen": [154, 205, 50] - }; - } -}); - -// node_modules/is-arrayish/index.js -var require_is_arrayish = __commonJS({ - "node_modules/is-arrayish/index.js"(exports, module2) { - module2.exports = function isArrayish(obj) { - if (!obj || typeof obj === "string") { - return false; - } - return obj instanceof Array || Array.isArray(obj) || obj.length >= 0 && (obj.splice instanceof Function || Object.getOwnPropertyDescriptor(obj, obj.length - 1) && obj.constructor.name !== "String"); - }; - } -}); - -// node_modules/simple-swizzle/index.js -var require_simple_swizzle = __commonJS({ - "node_modules/simple-swizzle/index.js"(exports, module2) { - "use strict"; - var isArrayish = require_is_arrayish(); - var concat = Array.prototype.concat; - var slice = Array.prototype.slice; - var swizzle = module2.exports = function swizzle2(args) { - var results = []; - for (var i3 = 0, len = args.length; i3 < len; i3++) { - var arg = args[i3]; - if (isArrayish(arg)) { - results = concat.call(results, slice.call(arg)); - } else { - results.push(arg); + module4.exports = exports3["default"]; + }, { "../namespace": 10 }], 19: [function(require2, module4, exports3) { + "use strict"; + Object.defineProperty(exports3, "__esModule", { + value: true + }); + exports3["default"] = propfind; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { "default": obj }; } - } - return results; - }; - swizzle.wrap = function(fn) { - return function() { - return fn(swizzle(arguments)); - }; - }; - } -}); - -// node_modules/color-string/index.js -var require_color_string = __commonJS({ - "node_modules/color-string/index.js"(exports, module2) { - var colorNames = require_color_name(); - var swizzle = require_simple_swizzle(); - var hasOwnProperty3 = Object.hasOwnProperty; - var reverseNames = Object.create(null); - for (name in colorNames) { - if (hasOwnProperty3.call(colorNames, name)) { - reverseNames[colorNames[name]] = name; - } - } - var name; - var cs = module2.exports = { - to: {}, - get: {} - }; - cs.get = function(string) { - var prefix = string.substring(0, 3).toLowerCase(); - var val; - var model; - switch (prefix) { - case "hsl": - val = cs.get.hsl(string); - model = "hsl"; - break; - case "hwb": - val = cs.get.hwb(string); - model = "hwb"; - break; - default: - val = cs.get.rgb(string); - model = "rgb"; - break; - } - if (!val) { - return null; - } - return { model, value: val }; - }; - cs.get.rgb = function(string) { - if (!string) { - return null; - } - var abbr = /^#([a-f0-9]{3,4})$/i; - var hex = /^#([a-f0-9]{6})([a-f0-9]{2})?$/i; - var rgba = /^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/; - var per = /^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/; - var keyword = /^(\w+)$/; - var rgb = [0, 0, 0, 1]; - var match2; - var i3; - var hexAlpha; - if (match2 = string.match(hex)) { - hexAlpha = match2[2]; - match2 = match2[1]; - for (i3 = 0; i3 < 3; i3++) { - var i22 = i3 * 2; - rgb[i3] = parseInt(match2.slice(i22, i22 + 2), 16); + var _prop = require2("./prop"); + var _prop2 = _interopRequireDefault(_prop); + function propfind(object) { + return '\n \n ' + object.props.map(_prop2["default"]) + "\n \n "; } - if (hexAlpha) { - rgb[3] = parseInt(hexAlpha, 16) / 255; + module4.exports = exports3["default"]; + }, { "./prop": 18 }], 20: [function(require2, module4, exports3) { + "use strict"; + Object.defineProperty(exports3, "__esModule", { + value: true + }); + exports3["default"] = syncCollection; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { "default": obj }; } - } else if (match2 = string.match(abbr)) { - match2 = match2[1]; - hexAlpha = match2[3]; - for (i3 = 0; i3 < 3; i3++) { - rgb[i3] = parseInt(match2[i3] + match2[i3], 16); + var _prop = require2("./prop"); + var _prop2 = _interopRequireDefault(_prop); + function syncCollection(object) { + return '\n ' + object.syncLevel + "\n " + object.syncToken + "\n \n " + object.props.map(_prop2["default"]) + "\n \n "; } - if (hexAlpha) { - rgb[3] = parseInt(hexAlpha + hexAlpha, 16) / 255; + module4.exports = exports3["default"]; + }, { "./prop": 18 }], 21: [function(require2, module4, exports3) { + "use strict"; + Object.defineProperty(exports3, "__esModule", { + value: true + }); + var _get = function get(_x2, _x3, _x4) { + var _again = true; + _function: + while (_again) { + var object = _x2, property = _x3, receiver = _x4; + _again = false; + if (object === null) + object = Function.prototype; + var desc = Object.getOwnPropertyDescriptor(object, property); + if (desc === void 0) { + var parent = Object.getPrototypeOf(object); + if (parent === null) { + return void 0; + } else { + _x2 = parent; + _x3 = property; + _x4 = receiver; + _again = true; + desc = parent = void 0; + continue _function; + } + } else if ("value" in desc) { + return desc.value; + } else { + var getter = desc.get; + if (getter === void 0) { + return void 0; + } + return getter.call(receiver); + } + } + }; + var _createClass = function() { + function defineProperties(target, props) { + for (var i3 = 0; i3 < props.length; i3++) { + var descriptor = props[i3]; + 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; + }; + }(); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { "default": obj }; } - } else if (match2 = string.match(rgba)) { - for (i3 = 0; i3 < 3; i3++) { - rgb[i3] = parseInt(match2[i3 + 1], 0); + function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); + } + subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); + if (superClass) + Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - if (match2[4]) { - if (match2[5]) { - rgb[3] = parseFloat(match2[4]) * 0.01; + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } + } + var _co = require2("co"); + var _co2 = _interopRequireDefault(_co); + var _querystring = require2("querystring"); + var _querystring2 = _interopRequireDefault(_querystring); + var _xmlhttprequest = require2("./xmlhttprequest"); + var _xmlhttprequest2 = _interopRequireDefault(_xmlhttprequest); + var Transport = function() { + function Transport2(credentials) { + _classCallCheck(this, Transport2); + this.credentials = credentials || null; + } + _createClass(Transport2, [{ + key: "send", + value: function send() { + } + }]); + return Transport2; + }(); + exports3.Transport = Transport; + var Basic2 = function(_Transport) { + _inherits(Basic3, _Transport); + function Basic3(credentials) { + _classCallCheck(this, Basic3); + _get(Object.getPrototypeOf(Basic3.prototype), "constructor", this).call(this, credentials); + } + _createClass(Basic3, [{ + key: "send", + value: function send(request2, url, options) { + return (0, _co2["default"])(regeneratorRuntime.mark(function callee$2$0() { + var sandbox, transformRequest, transformResponse, onerror, xhr, result; + return regeneratorRuntime.wrap(function callee$2$0$(context$3$0) { + while (1) + switch (context$3$0.prev = context$3$0.next) { + case 0: + sandbox = options && options.sandbox; + transformRequest = request2.transformRequest; + transformResponse = request2.transformResponse; + onerror = request2.onerror; + xhr = new _xmlhttprequest2["default"](); + if (sandbox) + sandbox.add(xhr); + xhr.open(request2.method, url, true, this.credentials.username, this.credentials.password); + if (transformRequest) + transformRequest(xhr); + result = void 0; + context$3$0.prev = 9; + context$3$0.next = 12; + return xhr.send(request2.requestData); + case 12: + result = transformResponse ? transformResponse(xhr) : xhr; + context$3$0.next = 19; + break; + case 15: + context$3$0.prev = 15; + context$3$0.t0 = context$3$0["catch"](9); + if (onerror) + onerror(context$3$0.t0); + throw context$3$0.t0; + case 19: + return context$3$0.abrupt("return", result); + case 20: + case "end": + return context$3$0.stop(); + } + }, callee$2$0, this, [[9, 15]]); + }).bind(this)); + } + }]); + return Basic3; + }(Transport); + exports3.Basic = Basic2; + var OAuth2 = function(_Transport2) { + _inherits(OAuth22, _Transport2); + function OAuth22(credentials) { + _classCallCheck(this, OAuth22); + _get(Object.getPrototypeOf(OAuth22.prototype), "constructor", this).call(this, credentials); + } + _createClass(OAuth22, [{ + key: "send", + value: function send(request2, url) { + var options = arguments.length <= 2 || arguments[2] === void 0 ? {} : arguments[2]; + return (0, _co2["default"])(regeneratorRuntime.mark(function callee$2$0() { + var sandbox, transformRequest, transformResponse, onerror, result, xhr, token; + return regeneratorRuntime.wrap(function callee$2$0$(context$3$0) { + while (1) + switch (context$3$0.prev = context$3$0.next) { + case 0: + sandbox = options.sandbox; + transformRequest = request2.transformRequest; + transformResponse = request2.transformResponse; + onerror = request2.onerror; + if (!("retry" in options)) + options.retry = true; + result = void 0, xhr = void 0; + context$3$0.prev = 6; + context$3$0.next = 9; + return access(this.credentials, options); + case 9: + token = context$3$0.sent; + xhr = new _xmlhttprequest2["default"](); + if (sandbox) + sandbox.add(xhr); + xhr.open(request2.method, url, true); + xhr.setRequestHeader("Authorization", "Bearer " + token); + if (transformRequest) + transformRequest(xhr); + context$3$0.next = 17; + return xhr.send(request2.requestData); + case 17: + result = transformResponse ? transformResponse(xhr) : xhr; + context$3$0.next = 28; + break; + case 20: + context$3$0.prev = 20; + context$3$0.t0 = context$3$0["catch"](6); + if (!(options.retry && xhr.status === 401)) { + context$3$0.next = 26; + break; + } + this.credentials.expiration = 0; + options.retry = false; + return context$3$0.abrupt("return", this.send(request2, url, options)); + case 26: + if (onerror) + onerror(context$3$0.t0); + throw context$3$0.t0; + case 28: + return context$3$0.abrupt("return", result); + case 29: + case "end": + return context$3$0.stop(); + } + }, callee$2$0, this, [[6, 20]]); + }).bind(this)); + } + }]); + return OAuth22; + }(Transport); + exports3.OAuth2 = OAuth2; + function access(credentials, options) { + if (!credentials.accessToken) { + return getAccessToken(credentials, options); + } + if (credentials.refreshToken && isExpired(credentials)) { + return refreshAccessToken(credentials, options); + } + return Promise.resolve(credentials.accessToken); + } + function isExpired(credentials) { + return typeof credentials.expiration === "number" && Date.now() > credentials.expiration; + } + var getAccessToken = _co2["default"].wrap(regeneratorRuntime.mark(function callee$0$0(credentials, options) { + var sandbox, xhr, data, now2, response; + return regeneratorRuntime.wrap(function callee$0$0$(context$1$0) { + while (1) + switch (context$1$0.prev = context$1$0.next) { + case 0: + sandbox = options.sandbox; + xhr = new _xmlhttprequest2["default"](); + if (sandbox) + sandbox.add(xhr); + xhr.open("POST", credentials.tokenUrl, true); + xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); + data = _querystring2["default"].stringify({ + code: credentials.authorizationCode, + redirect_uri: credentials.redirectUrl, + client_id: credentials.clientId, + client_secret: credentials.clientSecret, + grant_type: "authorization_code" + }); + now2 = Date.now(); + context$1$0.next = 9; + return xhr.send(data); + case 9: + response = JSON.parse(xhr.responseText); + credentials.accessToken = response.access_token; + credentials.refreshToken = "refresh_token" in response ? response.refresh_token : null; + credentials.expiration = "expires_in" in response ? now2 + response.expires_in : null; + return context$1$0.abrupt("return", response.access_token); + case 14: + case "end": + return context$1$0.stop(); + } + }, callee$0$0, this); + })); + var refreshAccessToken = _co2["default"].wrap(regeneratorRuntime.mark(function callee$0$0(credentials, options) { + var sandbox, xhr, data, now2, response; + return regeneratorRuntime.wrap(function callee$0$0$(context$1$0) { + while (1) + switch (context$1$0.prev = context$1$0.next) { + case 0: + sandbox = options.sandbox; + xhr = new _xmlhttprequest2["default"](); + if (sandbox) + sandbox.add(xhr); + xhr.open("POST", credentials.tokenUrl, true); + xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); + data = _querystring2["default"].stringify({ + client_id: credentials.clientId, + client_secret: credentials.clientSecret, + refresh_token: credentials.refreshToken, + grant_type: "refresh_token" + }); + now2 = Date.now(); + context$1$0.next = 9; + return xhr.send(data); + case 9: + response = JSON.parse(xhr.responseText); + credentials.accessToken = response.access_token; + credentials.expiration = "expires_in" in response ? now2 + response.expires_in : null; + return context$1$0.abrupt("return", response.access_token); + case 13: + case "end": + return context$1$0.stop(); + } + }, callee$0$0, this); + })); + }, { "./xmlhttprequest": 23, "co": 24, "querystring": 28 }], 22: [function(require2, module4, exports3) { + "use strict"; + Object.defineProperty(exports3, "__esModule", { + value: true + }); + exports3.createObject = createObject; + exports3.updateObject = updateObject; + exports3.deleteObject = deleteObject; + exports3.syncCollection = syncCollection; + function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; } else { - rgb[3] = parseFloat(match2[4]); + var newObj = {}; + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) + newObj[key] = obj[key]; + } + } + newObj["default"] = obj; + return newObj; } } - } else if (match2 = string.match(per)) { - for (i3 = 0; i3 < 3; i3++) { - rgb[i3] = Math.round(parseFloat(match2[i3 + 1]) * 2.55); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { "default": obj }; } - if (match2[4]) { - if (match2[5]) { - rgb[3] = parseFloat(match2[4]) * 0.01; + var _co = require2("co"); + var _co2 = _interopRequireDefault(_co); + var _fuzzy_url_equals = require2("./fuzzy_url_equals"); + var _fuzzy_url_equals2 = _interopRequireDefault(_fuzzy_url_equals); + var _namespace = require2("./namespace"); + var ns = _interopRequireWildcard(_namespace); + var _request = require2("./request"); + var request2 = _interopRequireWildcard(_request); + var debug = require2("./debug")("dav:webdav"); + function createObject(objectUrl, objectData, options) { + var req = request2.basic({ method: "PUT", data: objectData, contentType: options.contentType }); + return options.xhr.send(req, objectUrl, { sandbox: options.sandbox }); + } + function updateObject(objectUrl, objectData, etag, options) { + var req = request2.basic({ method: "PUT", data: objectData, etag, contentType: options.contentType }); + return options.xhr.send(req, objectUrl, { sandbox: options.sandbox }); + } + function deleteObject(objectUrl, etag, options) { + var req = request2.basic({ method: "DELETE", etag }); + return options.xhr.send(req, objectUrl, { sandbox: options.sandbox }); + } + function syncCollection(collection, options) { + var syncMethod = void 0; + if ("syncMethod" in options) { + syncMethod = options.syncMethod; + } else if (collection.reports && collection.reports.indexOf("syncCollection") !== -1) { + syncMethod = "webdav"; } else { - rgb[3] = parseFloat(match2[4]); + syncMethod = "basic"; + } + if (syncMethod === "webdav") { + debug("rfc 6578 sync."); + return options.webdavSync(collection, options); + } else { + debug("basic sync."); + return options.basicSync(collection, options); } } - } else if (match2 = string.match(keyword)) { - if (match2[1] === "transparent") { - return [0, 0, 0, 0]; + var supportedReportSet = _co2["default"].wrap(regeneratorRuntime.mark(function callee$0$0(collection, options) { + var req, response; + return regeneratorRuntime.wrap(function callee$0$0$(context$1$0) { + while (1) + switch (context$1$0.prev = context$1$0.next) { + case 0: + debug("Checking supported report set for collection at " + collection.url); + req = request2.propfind({ + props: [{ name: "supported-report-set", namespace: ns.DAV }], + depth: 1, + mergeResponses: true + }); + context$1$0.next = 4; + return options.xhr.send(req, collection.url, { + sandbox: options.sandbox + }); + case 4: + response = context$1$0.sent; + return context$1$0.abrupt("return", response.props.supportedReportSet); + case 6: + case "end": + return context$1$0.stop(); + } + }, callee$0$0, this); + })); + exports3.supportedReportSet = supportedReportSet; + var isCollectionDirty = _co2["default"].wrap(regeneratorRuntime.mark(function callee$0$0(collection, options) { + var req, responses, response; + return regeneratorRuntime.wrap(function callee$0$0$(context$1$0) { + while (1) + switch (context$1$0.prev = context$1$0.next) { + case 0: + if (collection.ctag) { + context$1$0.next = 3; + break; + } + debug("Missing ctag."); + return context$1$0.abrupt("return", false); + case 3: + debug("Fetch remote getctag prop."); + req = request2.propfind({ + props: [{ name: "getctag", namespace: ns.CALENDAR_SERVER }], + depth: 0 + }); + context$1$0.next = 7; + return options.xhr.send(req, collection.account.homeUrl, { + sandbox: options.sandbox + }); + case 7: + responses = context$1$0.sent; + response = responses.filter(function(response2) { + return (0, _fuzzy_url_equals2["default"])(collection.url, response2.href); + })[0]; + if (response) { + context$1$0.next = 11; + break; + } + throw new Error("Could not find collection on remote. Was it deleted?"); + case 11: + debug("Check whether cached ctag matches remote."); + return context$1$0.abrupt("return", collection.ctag !== response.props.getctag); + case 13: + case "end": + return context$1$0.stop(); + } + }, callee$0$0, this); + })); + exports3.isCollectionDirty = isCollectionDirty; + }, { "./debug": 6, "./fuzzy_url_equals": 7, "./namespace": 10, "./request": 12, "co": 24 }], 23: [function(require2, module4, exports3) { + "use strict"; + Object.defineProperty(exports3, "__esModule", { + value: true + }); + var _createClass = function() { + function defineProperties(target, props) { + for (var i3 = 0; i3 < props.length; i3++) { + var descriptor = props[i3]; + 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; + }; + }(); + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } } - if (!hasOwnProperty3.call(colorNames, match2[1])) { - return null; + var debug = require2("./debug")("dav:xmlhttprequest"); + var Native = void 0; + if (typeof self !== "undefined" && "XMLHttpRequest" in self) { + Native = self.XMLHttpRequest; + } else { + Native = require2("xmlhttprequest").XMLHttpRequest; } - rgb = colorNames[match2[1]]; - rgb[3] = 1; - return rgb; - } else { - return null; - } - for (i3 = 0; i3 < 3; i3++) { - rgb[i3] = clamp(rgb[i3], 0, 255); - } - rgb[3] = clamp(rgb[3], 0, 1); - return rgb; - }; - cs.get.hsl = function(string) { - if (!string) { - return null; - } - var hsl = /^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/; - var match2 = string.match(hsl); - if (match2) { - var alpha = parseFloat(match2[4]); - var h3 = (parseFloat(match2[1]) % 360 + 360) % 360; - var s4 = clamp(parseFloat(match2[2]), 0, 100); - var l4 = clamp(parseFloat(match2[3]), 0, 100); - var a3 = clamp(isNaN(alpha) ? 1 : alpha, 0, 1); - return [h3, s4, l4, a3]; - } - return null; - }; - cs.get.hwb = function(string) { - if (!string) { - return null; - } - var hwb = /^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/; - var match2 = string.match(hwb); - if (match2) { - var alpha = parseFloat(match2[4]); - var h3 = (parseFloat(match2[1]) % 360 + 360) % 360; - var w4 = clamp(parseFloat(match2[2]), 0, 100); - var b3 = clamp(parseFloat(match2[3]), 0, 100); - var a3 = clamp(isNaN(alpha) ? 1 : alpha, 0, 1); - return [h3, w4, b3, a3]; - } - return null; - }; - cs.to.hex = function() { - var rgba = swizzle(arguments); - return "#" + hexDouble(rgba[0]) + hexDouble(rgba[1]) + hexDouble(rgba[2]) + (rgba[3] < 1 ? hexDouble(Math.round(rgba[3] * 255)) : ""); - }; - cs.to.rgb = function() { - var rgba = swizzle(arguments); - return rgba.length < 4 || rgba[3] === 1 ? "rgb(" + Math.round(rgba[0]) + ", " + Math.round(rgba[1]) + ", " + Math.round(rgba[2]) + ")" : "rgba(" + Math.round(rgba[0]) + ", " + Math.round(rgba[1]) + ", " + Math.round(rgba[2]) + ", " + rgba[3] + ")"; - }; - cs.to.rgb.percent = function() { - var rgba = swizzle(arguments); - var r3 = Math.round(rgba[0] / 255 * 100); - var g4 = Math.round(rgba[1] / 255 * 100); - var b3 = Math.round(rgba[2] / 255 * 100); - return rgba.length < 4 || rgba[3] === 1 ? "rgb(" + r3 + "%, " + g4 + "%, " + b3 + "%)" : "rgba(" + r3 + "%, " + g4 + "%, " + b3 + "%, " + rgba[3] + ")"; - }; - cs.to.hsl = function() { - var hsla = swizzle(arguments); - return hsla.length < 4 || hsla[3] === 1 ? "hsl(" + hsla[0] + ", " + hsla[1] + "%, " + hsla[2] + "%)" : "hsla(" + hsla[0] + ", " + hsla[1] + "%, " + hsla[2] + "%, " + hsla[3] + ")"; - }; - cs.to.hwb = function() { - var hwba = swizzle(arguments); - var a3 = ""; - if (hwba.length >= 4 && hwba[3] !== 1) { - a3 = ", " + hwba[3]; - } - return "hwb(" + hwba[0] + ", " + hwba[1] + "%, " + hwba[2] + "%" + a3 + ")"; - }; - cs.to.keyword = function(rgb) { - return reverseNames[rgb.slice(0, 3)]; - }; - function clamp(num, min, max) { - return Math.min(Math.max(min, num), max); - } - function hexDouble(num) { - var str = Math.round(num).toString(16).toUpperCase(); - return str.length < 2 ? "0" + str : str; - } - } -}); - -// node_modules/color-convert/conversions.js -var require_conversions = __commonJS({ - "node_modules/color-convert/conversions.js"(exports, module2) { - var cssKeywords = require_color_name(); - var reverseKeywords = {}; - for (const key of Object.keys(cssKeywords)) { - reverseKeywords[cssKeywords[key]] = key; - } - var convert2 = { - rgb: { channels: 3, labels: "rgb" }, - hsl: { channels: 3, labels: "hsl" }, - hsv: { channels: 3, labels: "hsv" }, - hwb: { channels: 3, labels: "hwb" }, - cmyk: { channels: 4, labels: "cmyk" }, - xyz: { channels: 3, labels: "xyz" }, - lab: { channels: 3, labels: "lab" }, - lch: { channels: 3, labels: "lch" }, - hex: { channels: 1, labels: ["hex"] }, - keyword: { channels: 1, labels: ["keyword"] }, - ansi16: { channels: 1, labels: ["ansi16"] }, - ansi256: { channels: 1, labels: ["ansi256"] }, - hcg: { channels: 3, labels: ["h", "c", "g"] }, - apple: { channels: 3, labels: ["r16", "g16", "b16"] }, - gray: { channels: 1, labels: ["gray"] } - }; - module2.exports = convert2; - for (const model of Object.keys(convert2)) { - if (!("channels" in convert2[model])) { - throw new Error("missing channels property: " + model); - } - if (!("labels" in convert2[model])) { - throw new Error("missing channel labels property: " + model); - } - if (convert2[model].labels.length !== convert2[model].channels) { - throw new Error("channel and label counts mismatch: " + model); - } - const { channels, labels } = convert2[model]; - delete convert2[model].channels; - delete convert2[model].labels; - Object.defineProperty(convert2[model], "channels", { value: channels }); - Object.defineProperty(convert2[model], "labels", { value: labels }); - } - convert2.rgb.hsl = function(rgb) { - const r3 = rgb[0] / 255; - const g4 = rgb[1] / 255; - const b3 = rgb[2] / 255; - const min = Math.min(r3, g4, b3); - const max = Math.max(r3, g4, b3); - const delta = max - min; - let h3; - let s4; - if (max === min) { - h3 = 0; - } else if (r3 === max) { - h3 = (g4 - b3) / delta; - } else if (g4 === max) { - h3 = 2 + (b3 - r3) / delta; - } else if (b3 === max) { - h3 = 4 + (r3 - g4) / delta; - } - h3 = Math.min(h3 * 60, 360); - if (h3 < 0) { - h3 += 360; - } - const l4 = (min + max) / 2; - if (max === min) { - s4 = 0; - } else if (l4 <= 0.5) { - s4 = delta / (max + min); - } else { - s4 = delta / (2 - max - min); - } - return [h3, s4 * 100, l4 * 100]; - }; - convert2.rgb.hsv = function(rgb) { - let rdif; - let gdif; - let bdif; - let h3; - let s4; - const r3 = rgb[0] / 255; - const g4 = rgb[1] / 255; - const b3 = rgb[2] / 255; - const v3 = Math.max(r3, g4, b3); - const diff = v3 - Math.min(r3, g4, b3); - const diffc = function(c3) { - return (v3 - c3) / 6 / diff + 1 / 2; - }; - if (diff === 0) { - h3 = 0; - s4 = 0; - } else { - s4 = diff / v3; - rdif = diffc(r3); - gdif = diffc(g4); - bdif = diffc(b3); - if (r3 === v3) { - h3 = bdif - gdif; - } else if (g4 === v3) { - h3 = 1 / 3 + rdif - bdif; - } else if (b3 === v3) { - h3 = 2 / 3 + gdif - rdif; + var XMLHttpRequest2 = function() { + function XMLHttpRequest3(options) { + var _this = this; + _classCallCheck(this, XMLHttpRequest3); + this.request = new Native(options); + this.sandbox = null; + ["response", "responseText", "responseType", "responseXML", "timeout", "upload", "withCredentials"].forEach(function(attribute) { + Object.defineProperty(_this, attribute, { + get: function get() { + return this.request[attribute]; + }, + set: function set(value) { + this.request[attribute] = value; + } + }); + }); + ["status", "statusText"].forEach(function(attribute) { + Object.defineProperty(_this, attribute, { + get: function get() { + return this.request[attribute]; + } + }); + }); + } + _createClass(XMLHttpRequest3, [{ + key: "abort", + value: function abort() { + return this._callNative("abort", arguments); + } + }, { + key: "getAllResponseHeaders", + value: function getAllResponseHeaders() { + return this._callNative("getAllResponseHeaders", arguments); + } + }, { + key: "getResponseHeader", + value: function getResponseHeader() { + return this._callNative("getResponseHeader", arguments); + } + }, { + key: "open", + value: function open() { + return this._callNative("open", arguments); + } + }, { + key: "overrideMimeType", + value: function overrideMimeType() { + return this._callNative("overrideMimeType", arguments); + } + }, { + key: "setRequestHeader", + value: function setRequestHeader() { + return this._callNative("setRequestHeader", arguments); + } + }, { + key: "send", + value: function send(data) { + debug("Sending request data: " + data); + if (this.sandbox) + this.sandbox.add(this); + var request2 = this.request; + request2.send(data); + return new Promise(function(resolve, reject) { + request2.onreadystatechange = function() { + if (request2.readyState !== 4) { + return; + } + if (request2.status < 200 || request2.status >= 400) { + return reject(new Error("Bad status: " + request2.status)); + } + return resolve(request2.responseText); + }; + request2.ontimeout = function() { + reject(new Error("Request timed out after " + request2.timeout + " ms")); + }; + }); + } + }, { + key: "_callNative", + value: function _callNative(method, args) { + return this.request[method].apply(this.request, args); + } + }]); + return XMLHttpRequest3; + }(); + exports3["default"] = XMLHttpRequest2; + module4.exports = exports3["default"]; + }, { "./debug": 6 }], 24: [function(require2, module4, exports3) { + var slice = Array.prototype.slice; + module4.exports = co2["default"] = co2.co = co2; + co2.wrap = function(fn) { + createPromise.__generatorFunction__ = fn; + return createPromise; + function createPromise() { + return co2.call(this, fn.apply(this, arguments)); + } + }; + function co2(gen) { + var ctx = this; + var args = slice.call(arguments, 1); + return new Promise(function(resolve, reject) { + if (typeof gen === "function") + gen = gen.apply(ctx, args); + if (!gen || typeof gen.next !== "function") + return resolve(gen); + onFulfilled(); + function onFulfilled(res) { + var ret; + try { + ret = gen.next(res); + } catch (e3) { + return reject(e3); + } + next(ret); + } + function onRejected(err) { + var ret; + try { + ret = gen.throw(err); + } catch (e3) { + return reject(e3); + } + next(ret); + } + function next(ret) { + if (ret.done) + return resolve(ret.value); + var value = toPromise.call(ctx, ret.value); + if (value && isPromise(value)) + return value.then(onFulfilled, onRejected); + return onRejected(new TypeError('You may only yield a function, promise, generator, array, or object, but the following object was passed: "' + String(ret.value) + '"')); + } + }); } - if (h3 < 0) { - h3 += 1; - } else if (h3 > 1) { - h3 -= 1; + function toPromise(obj) { + if (!obj) + return obj; + if (isPromise(obj)) + return obj; + if (isGeneratorFunction(obj) || isGenerator(obj)) + return co2.call(this, obj); + if (typeof obj == "function") + return thunkToPromise.call(this, obj); + if (Array.isArray(obj)) + return arrayToPromise.call(this, obj); + if (isObject(obj)) + return objectToPromise.call(this, obj); + return obj; } - } - return [ - h3 * 360, - s4 * 100, - v3 * 100 - ]; - }; - convert2.rgb.hwb = function(rgb) { - const r3 = rgb[0]; - const g4 = rgb[1]; - let b3 = rgb[2]; - const h3 = convert2.rgb.hsl(rgb)[0]; - const w4 = 1 / 255 * Math.min(r3, Math.min(g4, b3)); - b3 = 1 - 1 / 255 * Math.max(r3, Math.max(g4, b3)); - return [h3, w4 * 100, b3 * 100]; - }; - convert2.rgb.cmyk = function(rgb) { - const r3 = rgb[0] / 255; - const g4 = rgb[1] / 255; - const b3 = rgb[2] / 255; - const k3 = Math.min(1 - r3, 1 - g4, 1 - b3); - const c3 = (1 - r3 - k3) / (1 - k3) || 0; - const m3 = (1 - g4 - k3) / (1 - k3) || 0; - const y3 = (1 - b3 - k3) / (1 - k3) || 0; - return [c3 * 100, m3 * 100, y3 * 100, k3 * 100]; - }; - function comparativeDistance(x4, y3) { - return (x4[0] - y3[0]) ** 2 + (x4[1] - y3[1]) ** 2 + (x4[2] - y3[2]) ** 2; - } - convert2.rgb.keyword = function(rgb) { - const reversed = reverseKeywords[rgb]; - if (reversed) { - return reversed; - } - let currentClosestDistance = Infinity; - let currentClosestKeyword; - for (const keyword of Object.keys(cssKeywords)) { - const value = cssKeywords[keyword]; - const distance = comparativeDistance(rgb, value); - if (distance < currentClosestDistance) { - currentClosestDistance = distance; - currentClosestKeyword = keyword; + function thunkToPromise(fn) { + var ctx = this; + return new Promise(function(resolve, reject) { + fn.call(ctx, function(err, res) { + if (err) + return reject(err); + if (arguments.length > 2) + res = slice.call(arguments, 1); + resolve(res); + }); + }); } - } - return currentClosestKeyword; - }; - convert2.keyword.rgb = function(keyword) { - return cssKeywords[keyword]; - }; - convert2.rgb.xyz = function(rgb) { - let r3 = rgb[0] / 255; - let g4 = rgb[1] / 255; - let b3 = rgb[2] / 255; - r3 = r3 > 0.04045 ? ((r3 + 0.055) / 1.055) ** 2.4 : r3 / 12.92; - g4 = g4 > 0.04045 ? ((g4 + 0.055) / 1.055) ** 2.4 : g4 / 12.92; - b3 = b3 > 0.04045 ? ((b3 + 0.055) / 1.055) ** 2.4 : b3 / 12.92; - const x4 = r3 * 0.4124 + g4 * 0.3576 + b3 * 0.1805; - const y3 = r3 * 0.2126 + g4 * 0.7152 + b3 * 0.0722; - const z3 = r3 * 0.0193 + g4 * 0.1192 + b3 * 0.9505; - return [x4 * 100, y3 * 100, z3 * 100]; - }; - convert2.rgb.lab = function(rgb) { - const xyz = convert2.rgb.xyz(rgb); - let x4 = xyz[0]; - let y3 = xyz[1]; - let z3 = xyz[2]; - x4 /= 95.047; - y3 /= 100; - z3 /= 108.883; - x4 = x4 > 8856e-6 ? x4 ** (1 / 3) : 7.787 * x4 + 16 / 116; - y3 = y3 > 8856e-6 ? y3 ** (1 / 3) : 7.787 * y3 + 16 / 116; - z3 = z3 > 8856e-6 ? z3 ** (1 / 3) : 7.787 * z3 + 16 / 116; - const l4 = 116 * y3 - 16; - const a3 = 500 * (x4 - y3); - const b3 = 200 * (y3 - z3); - return [l4, a3, b3]; - }; - convert2.hsl.rgb = function(hsl) { - const h3 = hsl[0] / 360; - const s4 = hsl[1] / 100; - const l4 = hsl[2] / 100; - let t22; - let t3; - let val; - if (s4 === 0) { - val = l4 * 255; - return [val, val, val]; - } - if (l4 < 0.5) { - t22 = l4 * (1 + s4); - } else { - t22 = l4 + s4 - l4 * s4; - } - const t1 = 2 * l4 - t22; - const rgb = [0, 0, 0]; - for (let i3 = 0; i3 < 3; i3++) { - t3 = h3 + 1 / 3 * -(i3 - 1); - if (t3 < 0) { - t3++; + function arrayToPromise(obj) { + return Promise.all(obj.map(toPromise, this)); } - if (t3 > 1) { - t3--; + function objectToPromise(obj) { + var results = new obj.constructor(); + var keys = Object.keys(obj); + var promises = []; + for (var i3 = 0; i3 < keys.length; i3++) { + var key = keys[i3]; + var promise = toPromise.call(this, obj[key]); + if (promise && isPromise(promise)) + defer(promise, key); + else + results[key] = obj[key]; + } + return Promise.all(promises).then(function() { + return results; + }); + function defer(promise2, key2) { + results[key2] = void 0; + promises.push(promise2.then(function(res) { + results[key2] = res; + })); + } } - if (6 * t3 < 1) { - val = t1 + (t22 - t1) * 6 * t3; - } else if (2 * t3 < 1) { - val = t22; - } else if (3 * t3 < 2) { - val = t1 + (t22 - t1) * (2 / 3 - t3) * 6; - } else { - val = t1; + function isPromise(obj) { + return typeof obj.then == "function"; } - rgb[i3] = val * 255; - } - return rgb; - }; - convert2.hsl.hsv = function(hsl) { - const h3 = hsl[0]; - let s4 = hsl[1] / 100; - let l4 = hsl[2] / 100; - let smin = s4; - const lmin = Math.max(l4, 0.01); - l4 *= 2; - s4 *= l4 <= 1 ? l4 : 2 - l4; - smin *= lmin <= 1 ? lmin : 2 - lmin; - const v3 = (l4 + s4) / 2; - const sv = l4 === 0 ? 2 * smin / (lmin + smin) : 2 * s4 / (l4 + s4); - return [h3, sv * 100, v3 * 100]; - }; - convert2.hsv.rgb = function(hsv) { - const h3 = hsv[0] / 60; - const s4 = hsv[1] / 100; - let v3 = hsv[2] / 100; - const hi = Math.floor(h3) % 6; - const f3 = h3 - Math.floor(h3); - const p3 = 255 * v3 * (1 - s4); - const q3 = 255 * v3 * (1 - s4 * f3); - const t3 = 255 * v3 * (1 - s4 * (1 - f3)); - v3 *= 255; - switch (hi) { - case 0: - return [v3, t3, p3]; - case 1: - return [q3, v3, p3]; - case 2: - return [p3, v3, t3]; - case 3: - return [p3, q3, v3]; - case 4: - return [t3, p3, v3]; - case 5: - return [v3, p3, q3]; - } - }; - convert2.hsv.hsl = function(hsv) { - const h3 = hsv[0]; - const s4 = hsv[1] / 100; - const v3 = hsv[2] / 100; - const vmin = Math.max(v3, 0.01); - let sl; - let l4; - l4 = (2 - s4) * v3; - const lmin = (2 - s4) * vmin; - sl = s4 * vmin; - sl /= lmin <= 1 ? lmin : 2 - lmin; - sl = sl || 0; - l4 /= 2; - return [h3, sl * 100, l4 * 100]; - }; - convert2.hwb.rgb = function(hwb) { - const h3 = hwb[0] / 360; - let wh = hwb[1] / 100; - let bl = hwb[2] / 100; - const ratio = wh + bl; - let f3; - if (ratio > 1) { - wh /= ratio; - bl /= ratio; - } - const i3 = Math.floor(6 * h3); - const v3 = 1 - bl; - f3 = 6 * h3 - i3; - if ((i3 & 1) !== 0) { - f3 = 1 - f3; - } - const n3 = wh + f3 * (v3 - wh); - let r3; - let g4; - let b3; - switch (i3) { - default: - case 6: - case 0: - r3 = v3; - g4 = n3; - b3 = wh; - break; - case 1: - r3 = n3; - g4 = v3; - b3 = wh; - break; - case 2: - r3 = wh; - g4 = v3; - b3 = n3; - break; - case 3: - r3 = wh; - g4 = n3; - b3 = v3; - break; - case 4: - r3 = n3; - g4 = wh; - b3 = v3; - break; - case 5: - r3 = v3; - g4 = wh; - b3 = n3; - break; - } - return [r3 * 255, g4 * 255, b3 * 255]; - }; - convert2.cmyk.rgb = function(cmyk) { - const c3 = cmyk[0] / 100; - const m3 = cmyk[1] / 100; - const y3 = cmyk[2] / 100; - const k3 = cmyk[3] / 100; - const r3 = 1 - Math.min(1, c3 * (1 - k3) + k3); - const g4 = 1 - Math.min(1, m3 * (1 - k3) + k3); - const b3 = 1 - Math.min(1, y3 * (1 - k3) + k3); - return [r3 * 255, g4 * 255, b3 * 255]; - }; - convert2.xyz.rgb = function(xyz) { - const x4 = xyz[0] / 100; - const y3 = xyz[1] / 100; - const z3 = xyz[2] / 100; - let r3; - let g4; - let b3; - r3 = x4 * 3.2406 + y3 * -1.5372 + z3 * -0.4986; - g4 = x4 * -0.9689 + y3 * 1.8758 + z3 * 0.0415; - b3 = x4 * 0.0557 + y3 * -0.204 + z3 * 1.057; - r3 = r3 > 31308e-7 ? 1.055 * r3 ** (1 / 2.4) - 0.055 : r3 * 12.92; - g4 = g4 > 31308e-7 ? 1.055 * g4 ** (1 / 2.4) - 0.055 : g4 * 12.92; - b3 = b3 > 31308e-7 ? 1.055 * b3 ** (1 / 2.4) - 0.055 : b3 * 12.92; - r3 = Math.min(Math.max(0, r3), 1); - g4 = Math.min(Math.max(0, g4), 1); - b3 = Math.min(Math.max(0, b3), 1); - return [r3 * 255, g4 * 255, b3 * 255]; - }; - convert2.xyz.lab = function(xyz) { - let x4 = xyz[0]; - let y3 = xyz[1]; - let z3 = xyz[2]; - x4 /= 95.047; - y3 /= 100; - z3 /= 108.883; - x4 = x4 > 8856e-6 ? x4 ** (1 / 3) : 7.787 * x4 + 16 / 116; - y3 = y3 > 8856e-6 ? y3 ** (1 / 3) : 7.787 * y3 + 16 / 116; - z3 = z3 > 8856e-6 ? z3 ** (1 / 3) : 7.787 * z3 + 16 / 116; - const l4 = 116 * y3 - 16; - const a3 = 500 * (x4 - y3); - const b3 = 200 * (y3 - z3); - return [l4, a3, b3]; - }; - convert2.lab.xyz = function(lab) { - const l4 = lab[0]; - const a3 = lab[1]; - const b3 = lab[2]; - let x4; - let y3; - let z3; - y3 = (l4 + 16) / 116; - x4 = a3 / 500 + y3; - z3 = y3 - b3 / 200; - const y22 = y3 ** 3; - const x22 = x4 ** 3; - const z22 = z3 ** 3; - y3 = y22 > 8856e-6 ? y22 : (y3 - 16 / 116) / 7.787; - x4 = x22 > 8856e-6 ? x22 : (x4 - 16 / 116) / 7.787; - z3 = z22 > 8856e-6 ? z22 : (z3 - 16 / 116) / 7.787; - x4 *= 95.047; - y3 *= 100; - z3 *= 108.883; - return [x4, y3, z3]; - }; - convert2.lab.lch = function(lab) { - const l4 = lab[0]; - const a3 = lab[1]; - const b3 = lab[2]; - let h3; - const hr = Math.atan2(b3, a3); - h3 = hr * 360 / 2 / Math.PI; - if (h3 < 0) { - h3 += 360; - } - const c3 = Math.sqrt(a3 * a3 + b3 * b3); - return [l4, c3, h3]; - }; - convert2.lch.lab = function(lch) { - const l4 = lch[0]; - const c3 = lch[1]; - const h3 = lch[2]; - const hr = h3 / 360 * 2 * Math.PI; - const a3 = c3 * Math.cos(hr); - const b3 = c3 * Math.sin(hr); - return [l4, a3, b3]; - }; - convert2.rgb.ansi16 = function(args, saturation = null) { - const [r3, g4, b3] = args; - let value = saturation === null ? convert2.rgb.hsv(args)[2] : saturation; - value = Math.round(value / 50); - if (value === 0) { - return 30; - } - let ansi = 30 + (Math.round(b3 / 255) << 2 | Math.round(g4 / 255) << 1 | Math.round(r3 / 255)); - if (value === 2) { - ansi += 60; - } - return ansi; - }; - convert2.hsv.ansi16 = function(args) { - return convert2.rgb.ansi16(convert2.hsv.rgb(args), args[2]); - }; - convert2.rgb.ansi256 = function(args) { - const r3 = args[0]; - const g4 = args[1]; - const b3 = args[2]; - if (r3 === g4 && g4 === b3) { - if (r3 < 8) { - return 16; + function isGenerator(obj) { + return typeof obj.next == "function" && typeof obj.throw == "function"; + } + function isGeneratorFunction(obj) { + var constructor = obj.constructor; + if (!constructor) + return false; + if (constructor.name === "GeneratorFunction" || constructor.displayName === "GeneratorFunction") + return true; + return isGenerator(constructor.prototype); + } + function isObject(val) { + return Object == val.constructor; + } + }, {}], 25: [function(require2, module4, exports3) { + (function(global2) { + ; + (function(root) { + var freeExports = typeof exports3 == "object" && exports3 && !exports3.nodeType && exports3; + var freeModule = typeof module4 == "object" && module4 && !module4.nodeType && module4; + var freeGlobal = typeof global2 == "object" && global2; + if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal || freeGlobal.self === freeGlobal) { + root = freeGlobal; + } + var punycode, maxInt = 2147483647, base = 36, tMin = 1, tMax = 26, skew = 38, damp = 700, initialBias = 72, initialN = 128, delimiter = "-", regexPunycode = /^xn--/, regexNonASCII = /[^\x20-\x7E]/, regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g, errors = { + "overflow": "Overflow: input needs wider integers to process", + "not-basic": "Illegal input >= 0x80 (not a basic code point)", + "invalid-input": "Invalid input" + }, baseMinusTMin = base - tMin, floor = Math.floor, stringFromCharCode = String.fromCharCode, key; + function error(type) { + throw new RangeError(errors[type]); + } + function map(array, fn) { + var length = array.length; + var result = []; + while (length--) { + result[length] = fn(array[length]); + } + return result; + } + function mapDomain(string, fn) { + var parts = string.split("@"); + var result = ""; + if (parts.length > 1) { + result = parts[0] + "@"; + string = parts[1]; + } + string = string.replace(regexSeparators, "."); + var labels = string.split("."); + var encoded = map(labels, fn).join("."); + return result + encoded; + } + function ucs2decode(string) { + var output = [], counter = 0, length = string.length, value, extra; + while (counter < length) { + value = string.charCodeAt(counter++); + if (value >= 55296 && value <= 56319 && counter < length) { + extra = string.charCodeAt(counter++); + if ((extra & 64512) == 56320) { + output.push(((value & 1023) << 10) + (extra & 1023) + 65536); + } else { + output.push(value); + counter--; + } + } else { + output.push(value); + } + } + return output; + } + function ucs2encode(array) { + return map(array, function(value) { + var output = ""; + if (value > 65535) { + value -= 65536; + output += stringFromCharCode(value >>> 10 & 1023 | 55296); + value = 56320 | value & 1023; + } + output += stringFromCharCode(value); + return output; + }).join(""); + } + function basicToDigit(codePoint) { + if (codePoint - 48 < 10) { + return codePoint - 22; + } + if (codePoint - 65 < 26) { + return codePoint - 65; + } + if (codePoint - 97 < 26) { + return codePoint - 97; + } + return base; + } + function digitToBasic(digit, flag) { + return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); + } + function adapt(delta, numPoints, firstTime) { + var k3 = 0; + delta = firstTime ? floor(delta / damp) : delta >> 1; + delta += floor(delta / numPoints); + for (; delta > baseMinusTMin * tMax >> 1; k3 += base) { + delta = floor(delta / baseMinusTMin); + } + return floor(k3 + (baseMinusTMin + 1) * delta / (delta + skew)); + } + function decode(input) { + var output = [], inputLength = input.length, out, i3 = 0, n3 = initialN, bias = initialBias, basic, j4, index, oldi, w4, k3, digit, t3, baseMinusT; + basic = input.lastIndexOf(delimiter); + if (basic < 0) { + basic = 0; + } + for (j4 = 0; j4 < basic; ++j4) { + if (input.charCodeAt(j4) >= 128) { + error("not-basic"); + } + output.push(input.charCodeAt(j4)); + } + for (index = basic > 0 ? basic + 1 : 0; index < inputLength; ) { + for (oldi = i3, w4 = 1, k3 = base; ; k3 += base) { + if (index >= inputLength) { + error("invalid-input"); + } + digit = basicToDigit(input.charCodeAt(index++)); + if (digit >= base || digit > floor((maxInt - i3) / w4)) { + error("overflow"); + } + i3 += digit * w4; + t3 = k3 <= bias ? tMin : k3 >= bias + tMax ? tMax : k3 - bias; + if (digit < t3) { + break; + } + baseMinusT = base - t3; + if (w4 > floor(maxInt / baseMinusT)) { + error("overflow"); + } + w4 *= baseMinusT; + } + out = output.length + 1; + bias = adapt(i3 - oldi, out, oldi == 0); + if (floor(i3 / out) > maxInt - n3) { + error("overflow"); + } + n3 += floor(i3 / out); + i3 %= out; + output.splice(i3++, 0, n3); + } + return ucs2encode(output); + } + function encode(input) { + var n3, delta, handledCPCount, basicLength, bias, j4, m3, q3, k3, t3, currentValue, output = [], inputLength, handledCPCountPlusOne, baseMinusT, qMinusT; + input = ucs2decode(input); + inputLength = input.length; + n3 = initialN; + delta = 0; + bias = initialBias; + for (j4 = 0; j4 < inputLength; ++j4) { + currentValue = input[j4]; + if (currentValue < 128) { + output.push(stringFromCharCode(currentValue)); + } + } + handledCPCount = basicLength = output.length; + if (basicLength) { + output.push(delimiter); + } + while (handledCPCount < inputLength) { + for (m3 = maxInt, j4 = 0; j4 < inputLength; ++j4) { + currentValue = input[j4]; + if (currentValue >= n3 && currentValue < m3) { + m3 = currentValue; + } + } + handledCPCountPlusOne = handledCPCount + 1; + if (m3 - n3 > floor((maxInt - delta) / handledCPCountPlusOne)) { + error("overflow"); + } + delta += (m3 - n3) * handledCPCountPlusOne; + n3 = m3; + for (j4 = 0; j4 < inputLength; ++j4) { + currentValue = input[j4]; + if (currentValue < n3 && ++delta > maxInt) { + error("overflow"); + } + if (currentValue == n3) { + for (q3 = delta, k3 = base; ; k3 += base) { + t3 = k3 <= bias ? tMin : k3 >= bias + tMax ? tMax : k3 - bias; + if (q3 < t3) { + break; + } + qMinusT = q3 - t3; + baseMinusT = base - t3; + output.push(stringFromCharCode(digitToBasic(t3 + qMinusT % baseMinusT, 0))); + q3 = floor(qMinusT / baseMinusT); + } + output.push(stringFromCharCode(digitToBasic(q3, 0))); + bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength); + delta = 0; + ++handledCPCount; + } + } + ++delta; + ++n3; + } + return output.join(""); + } + function toUnicode(input) { + return mapDomain(input, function(string) { + return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string; + }); + } + function toASCII(input) { + return mapDomain(input, function(string) { + return regexNonASCII.test(string) ? "xn--" + encode(string) : string; + }); + } + punycode = { + "version": "1.4.1", + "ucs2": { + "decode": ucs2decode, + "encode": ucs2encode + }, + "decode": decode, + "encode": encode, + "toASCII": toASCII, + "toUnicode": toUnicode + }; + if (typeof define2 == "function" && typeof define2.amd == "object" && define2.amd) { + define2("punycode", function() { + return punycode; + }); + } else if (freeExports && freeModule) { + if (module4.exports == freeExports) { + freeModule.exports = punycode; + } else { + for (key in punycode) { + punycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]); + } + } + } else { + root.punycode = punycode; + } + })(this); + }).call(this, typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}); + }, {}], 26: [function(require2, module4, exports3) { + "use strict"; + function hasOwnProperty3(obj, prop) { + return Object.prototype.hasOwnProperty.call(obj, prop); + } + module4.exports = function(qs, sep, eq, options) { + sep = sep || "&"; + eq = eq || "="; + var obj = {}; + if (typeof qs !== "string" || qs.length === 0) { + return obj; + } + var regexp = /\+/g; + qs = qs.split(sep); + var maxKeys = 1e3; + if (options && typeof options.maxKeys === "number") { + maxKeys = options.maxKeys; + } + var len = qs.length; + if (maxKeys > 0 && len > maxKeys) { + len = maxKeys; + } + for (var i3 = 0; i3 < len; ++i3) { + var x3 = qs[i3].replace(regexp, "%20"), idx = x3.indexOf(eq), kstr, vstr, k3, v3; + if (idx >= 0) { + kstr = x3.substr(0, idx); + vstr = x3.substr(idx + 1); + } else { + kstr = x3; + vstr = ""; + } + k3 = decodeURIComponent(kstr); + v3 = decodeURIComponent(vstr); + if (!hasOwnProperty3(obj, k3)) { + obj[k3] = v3; + } else if (isArray2(obj[k3])) { + obj[k3].push(v3); + } else { + obj[k3] = [obj[k3], v3]; + } + } + return obj; + }; + var isArray2 = Array.isArray || function(xs) { + return Object.prototype.toString.call(xs) === "[object Array]"; + }; + }, {}], 27: [function(require2, module4, exports3) { + "use strict"; + var stringifyPrimitive = function(v3) { + switch (typeof v3) { + case "string": + return v3; + case "boolean": + return v3 ? "true" : "false"; + case "number": + return isFinite(v3) ? v3 : ""; + default: + return ""; + } + }; + module4.exports = function(obj, sep, eq, name) { + sep = sep || "&"; + eq = eq || "="; + if (obj === null) { + obj = void 0; + } + if (typeof obj === "object") { + return map(objectKeys(obj), function(k3) { + var ks = encodeURIComponent(stringifyPrimitive(k3)) + eq; + if (isArray2(obj[k3])) { + return map(obj[k3], function(v3) { + return ks + encodeURIComponent(stringifyPrimitive(v3)); + }).join(sep); + } else { + return ks + encodeURIComponent(stringifyPrimitive(obj[k3])); + } + }).join(sep); + } + if (!name) + return ""; + return encodeURIComponent(stringifyPrimitive(name)) + eq + encodeURIComponent(stringifyPrimitive(obj)); + }; + var isArray2 = Array.isArray || function(xs) { + return Object.prototype.toString.call(xs) === "[object Array]"; + }; + function map(xs, f3) { + if (xs.map) + return xs.map(f3); + var res = []; + for (var i3 = 0; i3 < xs.length; i3++) { + res.push(f3(xs[i3], i3)); + } + return res; + } + var objectKeys = Object.keys || function(obj) { + var res = []; + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) + res.push(key); + } + return res; + }; + }, {}], 28: [function(require2, module4, exports3) { + "use strict"; + exports3.decode = exports3.parse = require2("./decode"); + exports3.encode = exports3.stringify = require2("./encode"); + }, { "./decode": 26, "./encode": 27 }], 29: [function(require2, module4, exports3) { + var punycode = require2("punycode"); + exports3.parse = urlParse; + exports3.resolve = urlResolve; + exports3.resolveObject = urlResolveObject; + exports3.format = urlFormat; + exports3.Url = Url; + function Url() { + this.protocol = null; + this.slashes = null; + this.auth = null; + this.host = null; + this.port = null; + this.hostname = null; + this.hash = null; + this.search = null; + this.query = null; + this.pathname = null; + this.path = null; + this.href = null; + } + var protocolPattern = /^([a-z0-9.+-]+:)/i, portPattern = /:[0-9]*$/, delims = ["<", ">", '"', "`", " ", "\r", "\n", " "], unwise = ["{", "}", "|", "\\", "^", "`"].concat(delims), autoEscape = ["'"].concat(unwise), nonHostChars = ["%", "/", "?", ";", "#"].concat(autoEscape), hostEndingChars = ["/", "?", "#"], hostnameMaxLen = 255, hostnamePartPattern = /^[a-z0-9A-Z_-]{0,63}$/, hostnamePartStart = /^([a-z0-9A-Z_-]{0,63})(.*)$/, unsafeProtocol = { + "javascript": true, + "javascript:": true + }, hostlessProtocol = { + "javascript": true, + "javascript:": true + }, slashedProtocol = { + "http": true, + "https": true, + "ftp": true, + "gopher": true, + "file": true, + "http:": true, + "https:": true, + "ftp:": true, + "gopher:": true, + "file:": true + }, querystring = require2("querystring"); + function urlParse(url, parseQueryString, slashesDenoteHost) { + if (url && isObject(url) && url instanceof Url) + return url; + var u3 = new Url(); + u3.parse(url, parseQueryString, slashesDenoteHost); + return u3; + } + Url.prototype.parse = function(url, parseQueryString, slashesDenoteHost) { + if (!isString2(url)) { + throw new TypeError("Parameter 'url' must be a string, not " + typeof url); + } + var rest = url; + rest = rest.trim(); + var proto = protocolPattern.exec(rest); + if (proto) { + proto = proto[0]; + var lowerProto = proto.toLowerCase(); + this.protocol = lowerProto; + rest = rest.substr(proto.length); + } + if (slashesDenoteHost || proto || rest.match(/^\/\/[^@\/]+@[^@\/]+/)) { + var slashes = rest.substr(0, 2) === "//"; + if (slashes && !(proto && hostlessProtocol[proto])) { + rest = rest.substr(2); + this.slashes = true; + } + } + if (!hostlessProtocol[proto] && (slashes || proto && !slashedProtocol[proto])) { + var hostEnd = -1; + for (var i3 = 0; i3 < hostEndingChars.length; i3++) { + var hec = rest.indexOf(hostEndingChars[i3]); + if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) + hostEnd = hec; + } + var auth, atSign; + if (hostEnd === -1) { + atSign = rest.lastIndexOf("@"); + } else { + atSign = rest.lastIndexOf("@", hostEnd); + } + if (atSign !== -1) { + auth = rest.slice(0, atSign); + rest = rest.slice(atSign + 1); + this.auth = decodeURIComponent(auth); + } + hostEnd = -1; + for (var i3 = 0; i3 < nonHostChars.length; i3++) { + var hec = rest.indexOf(nonHostChars[i3]); + if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) + hostEnd = hec; + } + if (hostEnd === -1) + hostEnd = rest.length; + this.host = rest.slice(0, hostEnd); + rest = rest.slice(hostEnd); + this.parseHost(); + this.hostname = this.hostname || ""; + var ipv6Hostname = this.hostname[0] === "[" && this.hostname[this.hostname.length - 1] === "]"; + if (!ipv6Hostname) { + var hostparts = this.hostname.split(/\./); + for (var i3 = 0, l4 = hostparts.length; i3 < l4; i3++) { + var part = hostparts[i3]; + if (!part) + continue; + if (!part.match(hostnamePartPattern)) { + var newpart = ""; + for (var j4 = 0, k3 = part.length; j4 < k3; j4++) { + if (part.charCodeAt(j4) > 127) { + newpart += "x"; + } else { + newpart += part[j4]; + } + } + if (!newpart.match(hostnamePartPattern)) { + var validParts = hostparts.slice(0, i3); + var notHost = hostparts.slice(i3 + 1); + var bit = part.match(hostnamePartStart); + if (bit) { + validParts.push(bit[1]); + notHost.unshift(bit[2]); + } + if (notHost.length) { + rest = "/" + notHost.join(".") + rest; + } + this.hostname = validParts.join("."); + break; + } + } + } + } + if (this.hostname.length > hostnameMaxLen) { + this.hostname = ""; + } else { + this.hostname = this.hostname.toLowerCase(); + } + if (!ipv6Hostname) { + var domainArray = this.hostname.split("."); + var newOut = []; + for (var i3 = 0; i3 < domainArray.length; ++i3) { + var s4 = domainArray[i3]; + newOut.push(s4.match(/[^A-Za-z0-9_-]/) ? "xn--" + punycode.encode(s4) : s4); + } + this.hostname = newOut.join("."); + } + var p3 = this.port ? ":" + this.port : ""; + var h3 = this.hostname || ""; + this.host = h3 + p3; + this.href += this.host; + if (ipv6Hostname) { + this.hostname = this.hostname.substr(1, this.hostname.length - 2); + if (rest[0] !== "/") { + rest = "/" + rest; + } + } + } + if (!unsafeProtocol[lowerProto]) { + for (var i3 = 0, l4 = autoEscape.length; i3 < l4; i3++) { + var ae = autoEscape[i3]; + var esc = encodeURIComponent(ae); + if (esc === ae) { + esc = escape(ae); + } + rest = rest.split(ae).join(esc); + } + } + var hash = rest.indexOf("#"); + if (hash !== -1) { + this.hash = rest.substr(hash); + rest = rest.slice(0, hash); + } + var qm = rest.indexOf("?"); + if (qm !== -1) { + this.search = rest.substr(qm); + this.query = rest.substr(qm + 1); + if (parseQueryString) { + this.query = querystring.parse(this.query); + } + rest = rest.slice(0, qm); + } else if (parseQueryString) { + this.search = ""; + this.query = {}; + } + if (rest) + this.pathname = rest; + if (slashedProtocol[lowerProto] && this.hostname && !this.pathname) { + this.pathname = "/"; + } + if (this.pathname || this.search) { + var p3 = this.pathname || ""; + var s4 = this.search || ""; + this.path = p3 + s4; + } + this.href = this.format(); + return this; + }; + function urlFormat(obj) { + if (isString2(obj)) + obj = urlParse(obj); + if (!(obj instanceof Url)) + return Url.prototype.format.call(obj); + return obj.format(); + } + Url.prototype.format = function() { + var auth = this.auth || ""; + if (auth) { + auth = encodeURIComponent(auth); + auth = auth.replace(/%3A/i, ":"); + auth += "@"; + } + var protocol = this.protocol || "", pathname = this.pathname || "", hash = this.hash || "", host = false, query = ""; + if (this.host) { + host = auth + this.host; + } else if (this.hostname) { + host = auth + (this.hostname.indexOf(":") === -1 ? this.hostname : "[" + this.hostname + "]"); + if (this.port) { + host += ":" + this.port; + } + } + if (this.query && isObject(this.query) && Object.keys(this.query).length) { + query = querystring.stringify(this.query); + } + var search = this.search || query && "?" + query || ""; + if (protocol && protocol.substr(-1) !== ":") + protocol += ":"; + if (this.slashes || (!protocol || slashedProtocol[protocol]) && host !== false) { + host = "//" + (host || ""); + if (pathname && pathname.charAt(0) !== "/") + pathname = "/" + pathname; + } else if (!host) { + host = ""; + } + if (hash && hash.charAt(0) !== "#") + hash = "#" + hash; + if (search && search.charAt(0) !== "?") + search = "?" + search; + pathname = pathname.replace(/[?#]/g, function(match2) { + return encodeURIComponent(match2); + }); + search = search.replace("#", "%23"); + return protocol + host + pathname + search + hash; + }; + function urlResolve(source, relative) { + return urlParse(source, false, true).resolve(relative); + } + Url.prototype.resolve = function(relative) { + return this.resolveObject(urlParse(relative, false, true)).format(); + }; + function urlResolveObject(source, relative) { + if (!source) + return relative; + return urlParse(source, false, true).resolveObject(relative); + } + Url.prototype.resolveObject = function(relative) { + if (isString2(relative)) { + var rel = new Url(); + rel.parse(relative, false, true); + relative = rel; + } + var result = new Url(); + Object.keys(this).forEach(function(k3) { + result[k3] = this[k3]; + }, this); + result.hash = relative.hash; + if (relative.href === "") { + result.href = result.format(); + return result; + } + if (relative.slashes && !relative.protocol) { + Object.keys(relative).forEach(function(k3) { + if (k3 !== "protocol") + result[k3] = relative[k3]; + }); + if (slashedProtocol[result.protocol] && result.hostname && !result.pathname) { + result.path = result.pathname = "/"; + } + result.href = result.format(); + return result; + } + if (relative.protocol && relative.protocol !== result.protocol) { + if (!slashedProtocol[relative.protocol]) { + Object.keys(relative).forEach(function(k3) { + result[k3] = relative[k3]; + }); + result.href = result.format(); + return result; + } + result.protocol = relative.protocol; + if (!relative.host && !hostlessProtocol[relative.protocol]) { + var relPath = (relative.pathname || "").split("/"); + while (relPath.length && !(relative.host = relPath.shift())) + ; + if (!relative.host) + relative.host = ""; + if (!relative.hostname) + relative.hostname = ""; + if (relPath[0] !== "") + relPath.unshift(""); + if (relPath.length < 2) + relPath.unshift(""); + result.pathname = relPath.join("/"); + } else { + result.pathname = relative.pathname; + } + result.search = relative.search; + result.query = relative.query; + result.host = relative.host || ""; + result.auth = relative.auth; + result.hostname = relative.hostname || relative.host; + result.port = relative.port; + if (result.pathname || result.search) { + var p3 = result.pathname || ""; + var s4 = result.search || ""; + result.path = p3 + s4; + } + result.slashes = result.slashes || relative.slashes; + result.href = result.format(); + return result; + } + var isSourceAbs = result.pathname && result.pathname.charAt(0) === "/", isRelAbs = relative.host || relative.pathname && relative.pathname.charAt(0) === "/", mustEndAbs = isRelAbs || isSourceAbs || result.host && relative.pathname, removeAllDots = mustEndAbs, srcPath = result.pathname && result.pathname.split("/") || [], relPath = relative.pathname && relative.pathname.split("/") || [], psychotic = result.protocol && !slashedProtocol[result.protocol]; + if (psychotic) { + result.hostname = ""; + result.port = null; + if (result.host) { + if (srcPath[0] === "") + srcPath[0] = result.host; + else + srcPath.unshift(result.host); + } + result.host = ""; + if (relative.protocol) { + relative.hostname = null; + relative.port = null; + if (relative.host) { + if (relPath[0] === "") + relPath[0] = relative.host; + else + relPath.unshift(relative.host); + } + relative.host = null; + } + mustEndAbs = mustEndAbs && (relPath[0] === "" || srcPath[0] === ""); + } + if (isRelAbs) { + result.host = relative.host || relative.host === "" ? relative.host : result.host; + result.hostname = relative.hostname || relative.hostname === "" ? relative.hostname : result.hostname; + result.search = relative.search; + result.query = relative.query; + srcPath = relPath; + } else if (relPath.length) { + if (!srcPath) + srcPath = []; + srcPath.pop(); + srcPath = srcPath.concat(relPath); + result.search = relative.search; + result.query = relative.query; + } else if (!isNullOrUndefined(relative.search)) { + if (psychotic) { + result.hostname = result.host = srcPath.shift(); + var authInHost = result.host && result.host.indexOf("@") > 0 ? result.host.split("@") : false; + if (authInHost) { + result.auth = authInHost.shift(); + result.host = result.hostname = authInHost.shift(); + } + } + result.search = relative.search; + result.query = relative.query; + if (!isNull(result.pathname) || !isNull(result.search)) { + result.path = (result.pathname ? result.pathname : "") + (result.search ? result.search : ""); + } + result.href = result.format(); + return result; + } + if (!srcPath.length) { + result.pathname = null; + if (result.search) { + result.path = "/" + result.search; + } else { + result.path = null; + } + result.href = result.format(); + return result; + } + var last = srcPath.slice(-1)[0]; + var hasTrailingSlash = (result.host || relative.host) && (last === "." || last === "..") || last === ""; + var up = 0; + for (var i3 = srcPath.length; i3 >= 0; i3--) { + last = srcPath[i3]; + if (last == ".") { + srcPath.splice(i3, 1); + } else if (last === "..") { + srcPath.splice(i3, 1); + up++; + } else if (up) { + srcPath.splice(i3, 1); + up--; + } + } + if (!mustEndAbs && !removeAllDots) { + for (; up--; up) { + srcPath.unshift(".."); + } + } + if (mustEndAbs && srcPath[0] !== "" && (!srcPath[0] || srcPath[0].charAt(0) !== "/")) { + srcPath.unshift(""); + } + if (hasTrailingSlash && srcPath.join("/").substr(-1) !== "/") { + srcPath.push(""); + } + var isAbsolute = srcPath[0] === "" || srcPath[0] && srcPath[0].charAt(0) === "/"; + if (psychotic) { + result.hostname = result.host = isAbsolute ? "" : srcPath.length ? srcPath.shift() : ""; + var authInHost = result.host && result.host.indexOf("@") > 0 ? result.host.split("@") : false; + if (authInHost) { + result.auth = authInHost.shift(); + result.host = result.hostname = authInHost.shift(); + } + } + mustEndAbs = mustEndAbs || result.host && srcPath.length; + if (mustEndAbs && !isAbsolute) { + srcPath.unshift(""); + } + if (!srcPath.length) { + result.pathname = null; + result.path = null; + } else { + result.pathname = srcPath.join("/"); + } + if (!isNull(result.pathname) || !isNull(result.search)) { + result.path = (result.pathname ? result.pathname : "") + (result.search ? result.search : ""); + } + result.auth = relative.auth || result.auth; + result.slashes = result.slashes || relative.slashes; + result.href = result.format(); + return result; + }; + Url.prototype.parseHost = function() { + var host = this.host; + var port = portPattern.exec(host); + if (port) { + port = port[0]; + if (port !== ":") { + this.port = port.substr(1); + } + host = host.substr(0, host.length - port.length); + } + if (host) + this.hostname = host; + }; + function isString2(arg) { + return typeof arg === "string"; } - if (r3 > 248) { - return 231; + function isObject(arg) { + return typeof arg === "object" && arg !== null; } - return Math.round((r3 - 8) / 247 * 24) + 232; - } - const ansi = 16 + 36 * Math.round(r3 / 255 * 5) + 6 * Math.round(g4 / 255 * 5) + Math.round(b3 / 255 * 5); - return ansi; - }; - convert2.ansi16.rgb = function(args) { - let color = args % 10; - if (color === 0 || color === 7) { - if (args > 50) { - color += 3.5; + function isNull(arg) { + return arg === null; } - color = color / 10.5 * 255; - return [color, color, color]; - } - const mult = (~~(args > 50) + 1) * 0.5; - const r3 = (color & 1) * mult * 255; - const g4 = (color >> 1 & 1) * mult * 255; - const b3 = (color >> 2 & 1) * mult * 255; - return [r3, g4, b3]; - }; - convert2.ansi256.rgb = function(args) { - if (args >= 232) { - const c3 = (args - 232) * 10 + 8; - return [c3, c3, c3]; - } - args -= 16; - let rem; - const r3 = Math.floor(args / 36) / 5 * 255; - const g4 = Math.floor((rem = args % 36) / 6) / 5 * 255; - const b3 = rem % 6 / 5 * 255; - return [r3, g4, b3]; - }; - convert2.rgb.hex = function(args) { - const integer = ((Math.round(args[0]) & 255) << 16) + ((Math.round(args[1]) & 255) << 8) + (Math.round(args[2]) & 255); - const string = integer.toString(16).toUpperCase(); - return "000000".substring(string.length) + string; - }; - convert2.hex.rgb = function(args) { - const match2 = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i); - if (!match2) { - return [0, 0, 0]; - } - let colorString = match2[0]; - if (match2[0].length === 3) { - colorString = colorString.split("").map((char) => { - return char + char; - }).join(""); - } - const integer = parseInt(colorString, 16); - const r3 = integer >> 16 & 255; - const g4 = integer >> 8 & 255; - const b3 = integer & 255; - return [r3, g4, b3]; - }; - convert2.rgb.hcg = function(rgb) { - const r3 = rgb[0] / 255; - const g4 = rgb[1] / 255; - const b3 = rgb[2] / 255; - const max = Math.max(Math.max(r3, g4), b3); - const min = Math.min(Math.min(r3, g4), b3); - const chroma = max - min; - let grayscale; - let hue; - if (chroma < 1) { - grayscale = min / (1 - chroma); - } else { - grayscale = 0; - } - if (chroma <= 0) { - hue = 0; - } else if (max === r3) { - hue = (g4 - b3) / chroma % 6; - } else if (max === g4) { - hue = 2 + (b3 - r3) / chroma; - } else { - hue = 4 + (r3 - g4) / chroma; - } - hue /= 6; - hue %= 1; - return [hue * 360, chroma * 100, grayscale * 100]; - }; - convert2.hsl.hcg = function(hsl) { - const s4 = hsl[1] / 100; - const l4 = hsl[2] / 100; - const c3 = l4 < 0.5 ? 2 * s4 * l4 : 2 * s4 * (1 - l4); - let f3 = 0; - if (c3 < 1) { - f3 = (l4 - 0.5 * c3) / (1 - c3); - } - return [hsl[0], c3 * 100, f3 * 100]; - }; - convert2.hsv.hcg = function(hsv) { - const s4 = hsv[1] / 100; - const v3 = hsv[2] / 100; - const c3 = s4 * v3; - let f3 = 0; - if (c3 < 1) { - f3 = (v3 - c3) / (1 - c3); - } - return [hsv[0], c3 * 100, f3 * 100]; - }; - convert2.hcg.rgb = function(hcg) { - const h3 = hcg[0] / 360; - const c3 = hcg[1] / 100; - const g4 = hcg[2] / 100; - if (c3 === 0) { - return [g4 * 255, g4 * 255, g4 * 255]; - } - const pure = [0, 0, 0]; - const hi = h3 % 1 * 6; - const v3 = hi % 1; - const w4 = 1 - v3; - let mg = 0; - switch (Math.floor(hi)) { - case 0: - pure[0] = 1; - pure[1] = v3; - pure[2] = 0; - break; - case 1: - pure[0] = w4; - pure[1] = 1; - pure[2] = 0; - break; - case 2: - pure[0] = 0; - pure[1] = 1; - pure[2] = v3; - break; - case 3: - pure[0] = 0; - pure[1] = w4; - pure[2] = 1; - break; - case 4: - pure[0] = v3; - pure[1] = 0; - pure[2] = 1; - break; - default: - pure[0] = 1; - pure[1] = 0; - pure[2] = w4; - } - mg = (1 - c3) * g4; - return [ - (c3 * pure[0] + mg) * 255, - (c3 * pure[1] + mg) * 255, - (c3 * pure[2] + mg) * 255 - ]; - }; - convert2.hcg.hsv = function(hcg) { - const c3 = hcg[1] / 100; - const g4 = hcg[2] / 100; - const v3 = c3 + g4 * (1 - c3); - let f3 = 0; - if (v3 > 0) { - f3 = c3 / v3; - } - return [hcg[0], f3 * 100, v3 * 100]; - }; - convert2.hcg.hsl = function(hcg) { - const c3 = hcg[1] / 100; - const g4 = hcg[2] / 100; - const l4 = g4 * (1 - c3) + 0.5 * c3; - let s4 = 0; - if (l4 > 0 && l4 < 0.5) { - s4 = c3 / (2 * l4); - } else if (l4 >= 0.5 && l4 < 1) { - s4 = c3 / (2 * (1 - l4)); - } - return [hcg[0], s4 * 100, l4 * 100]; - }; - convert2.hcg.hwb = function(hcg) { - const c3 = hcg[1] / 100; - const g4 = hcg[2] / 100; - const v3 = c3 + g4 * (1 - c3); - return [hcg[0], (v3 - c3) * 100, (1 - v3) * 100]; - }; - convert2.hwb.hcg = function(hwb) { - const w4 = hwb[1] / 100; - const b3 = hwb[2] / 100; - const v3 = 1 - b3; - const c3 = v3 - w4; - let g4 = 0; - if (c3 < 1) { - g4 = (v3 - c3) / (1 - c3); - } - return [hwb[0], c3 * 100, g4 * 100]; - }; - convert2.apple.rgb = function(apple) { - return [apple[0] / 65535 * 255, apple[1] / 65535 * 255, apple[2] / 65535 * 255]; - }; - convert2.rgb.apple = function(rgb) { - return [rgb[0] / 255 * 65535, rgb[1] / 255 * 65535, rgb[2] / 255 * 65535]; - }; - convert2.gray.rgb = function(args) { - return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255]; - }; - convert2.gray.hsl = function(args) { - return [0, 0, args[0]]; - }; - convert2.gray.hsv = convert2.gray.hsl; - convert2.gray.hwb = function(gray) { - return [0, 100, gray[0]]; - }; - convert2.gray.cmyk = function(gray) { - return [0, 0, 0, gray[0]]; - }; - convert2.gray.lab = function(gray) { - return [gray[0], 0, 0]; - }; - convert2.gray.hex = function(gray) { - const val = Math.round(gray[0] / 100 * 255) & 255; - const integer = (val << 16) + (val << 8) + val; - const string = integer.toString(16).toUpperCase(); - return "000000".substring(string.length) + string; - }; - convert2.rgb.gray = function(rgb) { - const val = (rgb[0] + rgb[1] + rgb[2]) / 3; - return [val / 255 * 100]; - }; - } -}); - -// node_modules/color-convert/route.js -var require_route = __commonJS({ - "node_modules/color-convert/route.js"(exports, module2) { - var conversions = require_conversions(); - function buildGraph() { - const graph = {}; - const models = Object.keys(conversions); - for (let len = models.length, i3 = 0; i3 < len; i3++) { - graph[models[i3]] = { - distance: -1, - parent: null + function isNullOrUndefined(arg) { + return arg == null; + } + }, { "punycode": 25, "querystring": 28 }], 30: [function(require2, module4, exports3) { + function DOMParser(options) { + this.options = options || { locator: {} }; + } + DOMParser.prototype.parseFromString = function(source, mimeType) { + var options = this.options; + var sax = new XMLReader(); + var domBuilder = options.domBuilder || new DOMHandler(); + var errorHandler = options.errorHandler; + var locator = options.locator; + var defaultNSMap = options.xmlns || {}; + var entityMap = { "lt": "<", "gt": ">", "amp": "&", "quot": '"', "apos": "'" }; + if (locator) { + domBuilder.setDocumentLocator(locator); + } + sax.errorHandler = buildErrorHandler(errorHandler, domBuilder, locator); + sax.domBuilder = options.domBuilder || domBuilder; + if (/\/x?html?$/.test(mimeType)) { + entityMap.nbsp = "\xA0"; + entityMap.copy = "\xA9"; + defaultNSMap[""] = "http://www.w3.org/1999/xhtml"; + } + defaultNSMap.xml = defaultNSMap.xml || "http://www.w3.org/XML/1998/namespace"; + if (source) { + sax.parse(source, defaultNSMap, entityMap); + } else { + sax.errorHandler.error("invalid doc source"); + } + return domBuilder.doc; }; - } - return graph; - } - function deriveBFS(fromModel) { - const graph = buildGraph(); - const queue = [fromModel]; - graph[fromModel].distance = 0; - while (queue.length) { - const current = queue.pop(); - const adjacents = Object.keys(conversions[current]); - for (let len = adjacents.length, i3 = 0; i3 < len; i3++) { - const adjacent = adjacents[i3]; - const node = graph[adjacent]; - if (node.distance === -1) { - node.distance = graph[current].distance + 1; - node.parent = current; - queue.unshift(adjacent); + function buildErrorHandler(errorImpl, domBuilder, locator) { + if (!errorImpl) { + if (domBuilder instanceof DOMHandler) { + return domBuilder; + } + errorImpl = domBuilder; + } + var errorHandler = {}; + var isCallback = errorImpl instanceof Function; + locator = locator || {}; + function build(key) { + var fn = errorImpl[key]; + if (!fn && isCallback) { + fn = errorImpl.length == 2 ? function(msg) { + errorImpl(key, msg); + } : errorImpl; + } + errorHandler[key] = fn && function(msg) { + fn("[xmldom " + key + "] " + msg + _locator(locator)); + } || function() { + }; + } + build("warning"); + build("error"); + build("fatalError"); + return errorHandler; + } + function DOMHandler() { + this.cdata = false; + } + function position(locator, node) { + node.lineNumber = locator.lineNumber; + node.columnNumber = locator.columnNumber; + } + DOMHandler.prototype = { + startDocument: function() { + this.doc = new DOMImplementation().createDocument(null, null, null); + if (this.locator) { + this.doc.documentURI = this.locator.systemId; + } + }, + startElement: function(namespaceURI, localName, qName, attrs) { + var doc = this.doc; + var el = doc.createElementNS(namespaceURI, qName || localName); + var len = attrs.length; + appendElement(this, el); + this.currentElement = el; + this.locator && position(this.locator, el); + for (var i3 = 0; i3 < len; i3++) { + var namespaceURI = attrs.getURI(i3); + var value = attrs.getValue(i3); + var qName = attrs.getQName(i3); + var attr = doc.createAttributeNS(namespaceURI, qName); + this.locator && position(attrs.getLocator(i3), attr); + attr.value = attr.nodeValue = value; + el.setAttributeNode(attr); + } + }, + endElement: function(namespaceURI, localName, qName) { + var current = this.currentElement; + var tagName = current.tagName; + this.currentElement = current.parentNode; + }, + startPrefixMapping: function(prefix, uri) { + }, + endPrefixMapping: function(prefix) { + }, + processingInstruction: function(target, data) { + var ins = this.doc.createProcessingInstruction(target, data); + this.locator && position(this.locator, ins); + appendElement(this, ins); + }, + ignorableWhitespace: function(ch, start, length) { + }, + characters: function(chars, start, length) { + chars = _toString.apply(this, arguments); + if (chars) { + if (this.cdata) { + var charNode = this.doc.createCDATASection(chars); + } else { + var charNode = this.doc.createTextNode(chars); + } + if (this.currentElement) { + this.currentElement.appendChild(charNode); + } else if (/^\s*$/.test(chars)) { + this.doc.appendChild(charNode); + } + this.locator && position(this.locator, charNode); + } + }, + skippedEntity: function(name) { + }, + endDocument: function() { + this.doc.normalize(); + }, + setDocumentLocator: function(locator) { + if (this.locator = locator) { + locator.lineNumber = 0; + } + }, + comment: function(chars, start, length) { + chars = _toString.apply(this, arguments); + var comm = this.doc.createComment(chars); + this.locator && position(this.locator, comm); + appendElement(this, comm); + }, + startCDATA: function() { + this.cdata = true; + }, + endCDATA: function() { + this.cdata = false; + }, + startDTD: function(name, publicId, systemId) { + var impl = this.doc.implementation; + if (impl && impl.createDocumentType) { + var dt = impl.createDocumentType(name, publicId, systemId); + this.locator && position(this.locator, dt); + appendElement(this, dt); + } + }, + warning: function(error) { + console.warn("[xmldom warning] " + error, _locator(this.locator)); + }, + error: function(error) { + console.error("[xmldom error] " + error, _locator(this.locator)); + }, + fatalError: function(error) { + console.error("[xmldom fatalError] " + error, _locator(this.locator)); + throw error; + } + }; + function _locator(l4) { + if (l4) { + return "\n@" + (l4.systemId || "") + "#[line:" + l4.lineNumber + ",col:" + l4.columnNumber + "]"; + } + } + function _toString(chars, start, length) { + if (typeof chars == "string") { + return chars.substr(start, length); + } else { + if (chars.length >= start + length || start) { + return new java.lang.String(chars, start, length) + ""; + } + return chars; + } + } + "endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g, function(key) { + DOMHandler.prototype[key] = function() { + return null; + }; + }); + function appendElement(hander, node) { + if (!hander.currentElement) { + hander.doc.appendChild(node); + } else { + hander.currentElement.appendChild(node); + } + } + var XMLReader = require2("./sax").XMLReader; + var DOMImplementation = exports3.DOMImplementation = require2("./dom").DOMImplementation; + exports3.XMLSerializer = require2("./dom").XMLSerializer; + exports3.DOMParser = DOMParser; + }, { "./dom": 31, "./sax": 32 }], 31: [function(require2, module4, exports3) { + function copy(src, dest) { + for (var p3 in src) { + dest[p3] = src[p3]; } } - } - return graph; - } - function link(from, to) { - return function(args) { - return to(from(args)); - }; - } - function wrapConversion(toModel, graph) { - const path = [graph[toModel].parent, toModel]; - let fn = conversions[graph[toModel].parent][toModel]; - let cur = graph[toModel].parent; - while (graph[cur].parent) { - path.unshift(graph[cur].parent); - fn = link(conversions[graph[cur].parent][cur], fn); - cur = graph[cur].parent; - } - fn.conversion = path; - return fn; - } - module2.exports = function(fromModel) { - const graph = deriveBFS(fromModel); - const conversion = {}; - const models = Object.keys(graph); - for (let len = models.length, i3 = 0; i3 < len; i3++) { - const toModel = models[i3]; - const node = graph[toModel]; - if (node.parent === null) { - continue; + function _extends(Class, Super) { + var pt = Class.prototype; + if (Object.create) { + var ppt = Object.create(Super.prototype); + pt.__proto__ = ppt; + } + if (!(pt instanceof Super)) { + let t4 = function() { + }; + var t3 = t4; + ; + t4.prototype = Super.prototype; + t4 = new t4(); + copy(pt, t4); + Class.prototype = pt = t4; + } + if (pt.constructor != Class) { + if (typeof Class != "function") { + console.error("unknow Class:" + Class); + } + pt.constructor = Class; + } } - conversion[toModel] = wrapConversion(toModel, graph); - } - return conversion; - }; - } -}); - -// node_modules/color-convert/index.js -var require_color_convert = __commonJS({ - "node_modules/color-convert/index.js"(exports, module2) { - var conversions = require_conversions(); - var route = require_route(); - var convert2 = {}; - var models = Object.keys(conversions); - function wrapRaw(fn) { - const wrappedFn = function(...args) { - const arg0 = args[0]; - if (arg0 === void 0 || arg0 === null) { - return arg0; + var htmlns = "http://www.w3.org/1999/xhtml"; + var NodeType = {}; + var ELEMENT_NODE = NodeType.ELEMENT_NODE = 1; + var ATTRIBUTE_NODE = NodeType.ATTRIBUTE_NODE = 2; + var TEXT_NODE = NodeType.TEXT_NODE = 3; + var CDATA_SECTION_NODE = NodeType.CDATA_SECTION_NODE = 4; + var ENTITY_REFERENCE_NODE = NodeType.ENTITY_REFERENCE_NODE = 5; + var ENTITY_NODE = NodeType.ENTITY_NODE = 6; + var PROCESSING_INSTRUCTION_NODE = NodeType.PROCESSING_INSTRUCTION_NODE = 7; + var COMMENT_NODE = NodeType.COMMENT_NODE = 8; + var DOCUMENT_NODE = NodeType.DOCUMENT_NODE = 9; + var DOCUMENT_TYPE_NODE = NodeType.DOCUMENT_TYPE_NODE = 10; + var DOCUMENT_FRAGMENT_NODE = NodeType.DOCUMENT_FRAGMENT_NODE = 11; + var NOTATION_NODE = NodeType.NOTATION_NODE = 12; + var ExceptionCode = {}; + var ExceptionMessage = {}; + var INDEX_SIZE_ERR = ExceptionCode.INDEX_SIZE_ERR = (ExceptionMessage[1] = "Index size error", 1); + var DOMSTRING_SIZE_ERR = ExceptionCode.DOMSTRING_SIZE_ERR = (ExceptionMessage[2] = "DOMString size error", 2); + var HIERARCHY_REQUEST_ERR = ExceptionCode.HIERARCHY_REQUEST_ERR = (ExceptionMessage[3] = "Hierarchy request error", 3); + var WRONG_DOCUMENT_ERR = ExceptionCode.WRONG_DOCUMENT_ERR = (ExceptionMessage[4] = "Wrong document", 4); + var INVALID_CHARACTER_ERR = ExceptionCode.INVALID_CHARACTER_ERR = (ExceptionMessage[5] = "Invalid character", 5); + var NO_DATA_ALLOWED_ERR = ExceptionCode.NO_DATA_ALLOWED_ERR = (ExceptionMessage[6] = "No data allowed", 6); + var NO_MODIFICATION_ALLOWED_ERR = ExceptionCode.NO_MODIFICATION_ALLOWED_ERR = (ExceptionMessage[7] = "No modification allowed", 7); + var NOT_FOUND_ERR = ExceptionCode.NOT_FOUND_ERR = (ExceptionMessage[8] = "Not found", 8); + var NOT_SUPPORTED_ERR = ExceptionCode.NOT_SUPPORTED_ERR = (ExceptionMessage[9] = "Not supported", 9); + var INUSE_ATTRIBUTE_ERR = ExceptionCode.INUSE_ATTRIBUTE_ERR = (ExceptionMessage[10] = "Attribute in use", 10); + var INVALID_STATE_ERR = ExceptionCode.INVALID_STATE_ERR = (ExceptionMessage[11] = "Invalid state", 11); + var SYNTAX_ERR = ExceptionCode.SYNTAX_ERR = (ExceptionMessage[12] = "Syntax error", 12); + var INVALID_MODIFICATION_ERR = ExceptionCode.INVALID_MODIFICATION_ERR = (ExceptionMessage[13] = "Invalid modification", 13); + var NAMESPACE_ERR = ExceptionCode.NAMESPACE_ERR = (ExceptionMessage[14] = "Invalid namespace", 14); + var INVALID_ACCESS_ERR = ExceptionCode.INVALID_ACCESS_ERR = (ExceptionMessage[15] = "Invalid access", 15); + function DOMException(code, message) { + if (message instanceof Error) { + var error = message; + } else { + error = this; + Error.call(this, ExceptionMessage[code]); + this.message = ExceptionMessage[code]; + if (Error.captureStackTrace) + Error.captureStackTrace(this, DOMException); + } + error.code = code; + if (message) + this.message = this.message + ": " + message; + return error; } - if (arg0.length > 1) { - args = arg0; + ; + DOMException.prototype = Error.prototype; + copy(ExceptionCode, DOMException); + function NodeList() { } - return fn(args); - }; - if ("conversion" in fn) { - wrappedFn.conversion = fn.conversion; - } - return wrappedFn; - } - function wrapRounded(fn) { - const wrappedFn = function(...args) { - const arg0 = args[0]; - if (arg0 === void 0 || arg0 === null) { - return arg0; + ; + NodeList.prototype = { + length: 0, + item: function(index) { + return this[index] || null; + }, + toString: function(isHTML, nodeFilter) { + for (var buf = [], i3 = 0; i3 < this.length; i3++) { + serializeToString(this[i3], buf, isHTML, nodeFilter); + } + return buf.join(""); + } + }; + function LiveNodeList(node, refresh) { + this._node = node; + this._refresh = refresh; + _updateLiveList(this); } - if (arg0.length > 1) { - args = arg0; + function _updateLiveList(list) { + var inc = list._node._inc || list._node.ownerDocument._inc; + if (list._inc != inc) { + var ls = list._refresh(list._node); + __set__(list, "length", ls.length); + copy(ls, list); + list._inc = inc; + } } - const result = fn(args); - if (typeof result === "object") { - for (let len = result.length, i3 = 0; i3 < len; i3++) { - result[i3] = Math.round(result[i3]); + LiveNodeList.prototype.item = function(i3) { + _updateLiveList(this); + return this[i3]; + }; + _extends(LiveNodeList, NodeList); + function NamedNodeMap() { + } + ; + function _findNodeIndex(list, node) { + var i3 = list.length; + while (i3--) { + if (list[i3] === node) { + return i3; + } } } - return result; - }; - if ("conversion" in fn) { - wrappedFn.conversion = fn.conversion; - } - return wrappedFn; - } - models.forEach((fromModel) => { - convert2[fromModel] = {}; - Object.defineProperty(convert2[fromModel], "channels", { value: conversions[fromModel].channels }); - Object.defineProperty(convert2[fromModel], "labels", { value: conversions[fromModel].labels }); - const routes = route(fromModel); - const routeModels = Object.keys(routes); - routeModels.forEach((toModel) => { - const fn = routes[toModel]; - convert2[fromModel][toModel] = wrapRounded(fn); - convert2[fromModel][toModel].raw = wrapRaw(fn); - }); - }); - module2.exports = convert2; - } -}); - -// node_modules/color/index.js -var require_color = __commonJS({ - "node_modules/color/index.js"(exports, module2) { - var colorString = require_color_string(); - var convert2 = require_color_convert(); - var skippedModels = [ - "keyword", - "gray", - "hex" - ]; - var hashedModelKeys = {}; - for (const model of Object.keys(convert2)) { - hashedModelKeys[[...convert2[model].labels].sort().join("")] = model; - } - var limiters = {}; - function Color2(object, model) { - if (!(this instanceof Color2)) { - return new Color2(object, model); - } - if (model && model in skippedModels) { - model = null; - } - if (model && !(model in convert2)) { - throw new Error("Unknown model: " + model); - } - let i3; - let channels; - if (object == null) { - this.model = "rgb"; - this.color = [0, 0, 0]; - this.valpha = 1; - } else if (object instanceof Color2) { - this.model = object.model; - this.color = [...object.color]; - this.valpha = object.valpha; - } else if (typeof object === "string") { - const result = colorString.get(object); - if (result === null) { - throw new Error("Unable to parse color from string: " + object); + function _addNamedNode(el, list, newAttr, oldAttr) { + if (oldAttr) { + list[_findNodeIndex(list, oldAttr)] = newAttr; + } else { + list[list.length++] = newAttr; + } + if (el) { + newAttr.ownerElement = el; + var doc = el.ownerDocument; + if (doc) { + oldAttr && _onRemoveAttribute(doc, el, oldAttr); + _onAddAttribute(doc, el, newAttr); + } + } } - this.model = result.model; - channels = convert2[this.model].channels; - this.color = result.value.slice(0, channels); - this.valpha = typeof result.value[channels] === "number" ? result.value[channels] : 1; - } else if (object.length > 0) { - this.model = model || "rgb"; - channels = convert2[this.model].channels; - const newArray = Array.prototype.slice.call(object, 0, channels); - this.color = zeroArray(newArray, channels); - this.valpha = typeof object[channels] === "number" ? object[channels] : 1; - } else if (typeof object === "number") { - this.model = "rgb"; - this.color = [ - object >> 16 & 255, - object >> 8 & 255, - object & 255 - ]; - this.valpha = 1; - } else { - this.valpha = 1; - const keys = Object.keys(object); - if ("alpha" in object) { - keys.splice(keys.indexOf("alpha"), 1); - this.valpha = typeof object.alpha === "number" ? object.alpha : 0; + function _removeNamedNode(el, list, attr) { + var i3 = _findNodeIndex(list, attr); + if (i3 >= 0) { + var lastIndex = list.length - 1; + while (i3 < lastIndex) { + list[i3] = list[++i3]; + } + list.length = lastIndex; + if (el) { + var doc = el.ownerDocument; + if (doc) { + _onRemoveAttribute(doc, el, attr); + attr.ownerElement = null; + } + } + } else { + throw DOMException(NOT_FOUND_ERR, new Error(el.tagName + "@" + attr)); + } } - const hashedKeys = keys.sort().join(""); - if (!(hashedKeys in hashedModelKeys)) { - throw new Error("Unable to parse color from object: " + JSON.stringify(object)); + NamedNodeMap.prototype = { + length: 0, + item: NodeList.prototype.item, + getNamedItem: function(key) { + var i3 = this.length; + while (i3--) { + var attr = this[i3]; + if (attr.nodeName == key) { + return attr; + } + } + }, + setNamedItem: function(attr) { + var el = attr.ownerElement; + if (el && el != this._ownerElement) { + throw new DOMException(INUSE_ATTRIBUTE_ERR); + } + var oldAttr = this.getNamedItem(attr.nodeName); + _addNamedNode(this._ownerElement, this, attr, oldAttr); + return oldAttr; + }, + setNamedItemNS: function(attr) { + var el = attr.ownerElement, oldAttr; + if (el && el != this._ownerElement) { + throw new DOMException(INUSE_ATTRIBUTE_ERR); + } + oldAttr = this.getNamedItemNS(attr.namespaceURI, attr.localName); + _addNamedNode(this._ownerElement, this, attr, oldAttr); + return oldAttr; + }, + removeNamedItem: function(key) { + var attr = this.getNamedItem(key); + _removeNamedNode(this._ownerElement, this, attr); + return attr; + }, + removeNamedItemNS: function(namespaceURI, localName) { + var attr = this.getNamedItemNS(namespaceURI, localName); + _removeNamedNode(this._ownerElement, this, attr); + return attr; + }, + getNamedItemNS: function(namespaceURI, localName) { + var i3 = this.length; + while (i3--) { + var node = this[i3]; + if (node.localName == localName && node.namespaceURI == namespaceURI) { + return node; + } + } + return null; + } + }; + function DOMImplementation(features) { + this._features = {}; + if (features) { + for (var feature in features) { + this._features = features[feature]; + } + } } - this.model = hashedModelKeys[hashedKeys]; - const { labels } = convert2[this.model]; - const color = []; - for (i3 = 0; i3 < labels.length; i3++) { - color.push(object[labels[i3]]); + ; + DOMImplementation.prototype = { + hasFeature: function(feature, version) { + var versions = this._features[feature.toLowerCase()]; + if (versions && (!version || version in versions)) { + return true; + } else { + return false; + } + }, + createDocument: function(namespaceURI, qualifiedName, doctype) { + var doc = new Document(); + doc.implementation = this; + doc.childNodes = new NodeList(); + doc.doctype = doctype; + if (doctype) { + doc.appendChild(doctype); + } + if (qualifiedName) { + var root = doc.createElementNS(namespaceURI, qualifiedName); + doc.appendChild(root); + } + return doc; + }, + createDocumentType: function(qualifiedName, publicId, systemId) { + var node = new DocumentType(); + node.name = qualifiedName; + node.nodeName = qualifiedName; + node.publicId = publicId; + node.systemId = systemId; + return node; + } + }; + function Node() { } - this.color = zeroArray(color); - } - if (limiters[this.model]) { - channels = convert2[this.model].channels; - for (i3 = 0; i3 < channels; i3++) { - const limit = limiters[this.model][i3]; - if (limit) { - this.color[i3] = limit(this.color[i3]); + ; + Node.prototype = { + firstChild: null, + lastChild: null, + previousSibling: null, + nextSibling: null, + attributes: null, + parentNode: null, + childNodes: null, + ownerDocument: null, + nodeValue: null, + namespaceURI: null, + prefix: null, + localName: null, + insertBefore: function(newChild, refChild) { + return _insertBefore(this, newChild, refChild); + }, + replaceChild: function(newChild, oldChild) { + this.insertBefore(newChild, oldChild); + if (oldChild) { + this.removeChild(oldChild); + } + }, + removeChild: function(oldChild) { + return _removeChild(this, oldChild); + }, + appendChild: function(newChild) { + return this.insertBefore(newChild, null); + }, + hasChildNodes: function() { + return this.firstChild != null; + }, + cloneNode: function(deep) { + return cloneNode(this.ownerDocument || this, this, deep); + }, + normalize: function() { + var child = this.firstChild; + while (child) { + var next = child.nextSibling; + if (next && next.nodeType == TEXT_NODE && child.nodeType == TEXT_NODE) { + this.removeChild(next); + child.appendData(next.data); + } else { + child.normalize(); + child = next; + } + } + }, + isSupported: function(feature, version) { + return this.ownerDocument.implementation.hasFeature(feature, version); + }, + hasAttributes: function() { + return this.attributes.length > 0; + }, + lookupPrefix: function(namespaceURI) { + var el = this; + while (el) { + var map = el._nsMap; + if (map) { + for (var n3 in map) { + if (map[n3] == namespaceURI) { + return n3; + } + } + } + el = el.nodeType == ATTRIBUTE_NODE ? el.ownerDocument : el.parentNode; + } + return null; + }, + lookupNamespaceURI: function(prefix) { + var el = this; + while (el) { + var map = el._nsMap; + if (map) { + if (prefix in map) { + return map[prefix]; + } + } + el = el.nodeType == ATTRIBUTE_NODE ? el.ownerDocument : el.parentNode; + } + return null; + }, + isDefaultNamespace: function(namespaceURI) { + var prefix = this.lookupPrefix(namespaceURI); + return prefix == null; + } + }; + function _xmlEncoder(c3) { + return c3 == "<" && "<" || c3 == ">" && ">" || c3 == "&" && "&" || c3 == '"' && """ || "&#" + c3.charCodeAt() + ";"; + } + copy(NodeType, Node); + copy(NodeType, Node.prototype); + function _visitNode(node, callback) { + if (callback(node)) { + return true; + } + if (node = node.firstChild) { + do { + if (_visitNode(node, callback)) { + return true; + } + } while (node = node.nextSibling); } } - } - this.valpha = Math.max(0, Math.min(1, this.valpha)); - if (Object.freeze) { - Object.freeze(this); - } - } - Color2.prototype = { - toString() { - return this.string(); - }, - toJSON() { - return this[this.model](); - }, - string(places) { - let self2 = this.model in colorString.to ? this : this.rgb(); - self2 = self2.round(typeof places === "number" ? places : 1); - const args = self2.valpha === 1 ? self2.color : [...self2.color, this.valpha]; - return colorString.to[self2.model](args); - }, - percentString(places) { - const self2 = this.rgb().round(typeof places === "number" ? places : 1); - const args = self2.valpha === 1 ? self2.color : [...self2.color, this.valpha]; - return colorString.to.rgb.percent(args); - }, - array() { - return this.valpha === 1 ? [...this.color] : [...this.color, this.valpha]; - }, - object() { - const result = {}; - const { channels } = convert2[this.model]; - const { labels } = convert2[this.model]; - for (let i3 = 0; i3 < channels; i3++) { - result[labels[i3]] = this.color[i3]; + function Document() { } - if (this.valpha !== 1) { - result.alpha = this.valpha; + function _onAddAttribute(doc, el, newAttr) { + doc && doc._inc++; + var ns = newAttr.namespaceURI; + if (ns == "http://www.w3.org/2000/xmlns/") { + el._nsMap[newAttr.prefix ? newAttr.localName : ""] = newAttr.value; + } } - return result; - }, - unitArray() { - const rgb = this.rgb().color; - rgb[0] /= 255; - rgb[1] /= 255; - rgb[2] /= 255; - if (this.valpha !== 1) { - rgb.push(this.valpha); + function _onRemoveAttribute(doc, el, newAttr, remove) { + doc && doc._inc++; + var ns = newAttr.namespaceURI; + if (ns == "http://www.w3.org/2000/xmlns/") { + delete el._nsMap[newAttr.prefix ? newAttr.localName : ""]; + } } - return rgb; - }, - unitObject() { - const rgb = this.rgb().object(); - rgb.r /= 255; - rgb.g /= 255; - rgb.b /= 255; - if (this.valpha !== 1) { - rgb.alpha = this.valpha; + function _onUpdateChild(doc, el, newChild) { + if (doc && doc._inc) { + doc._inc++; + var cs = el.childNodes; + if (newChild) { + cs[cs.length++] = newChild; + } else { + var child = el.firstChild; + var i3 = 0; + while (child) { + cs[i3++] = child; + child = child.nextSibling; + } + cs.length = i3; + } + } } - return rgb; - }, - round(places) { - places = Math.max(places || 0, 0); - return new Color2([...this.color.map(roundToPlace(places)), this.valpha], this.model); - }, - alpha(value) { - if (value !== void 0) { - return new Color2([...this.color, Math.max(0, Math.min(1, value))], this.model); + function _removeChild(parentNode, child) { + var previous = child.previousSibling; + var next = child.nextSibling; + if (previous) { + previous.nextSibling = next; + } else { + parentNode.firstChild = next; + } + if (next) { + next.previousSibling = previous; + } else { + parentNode.lastChild = previous; + } + _onUpdateChild(parentNode.ownerDocument, parentNode); + return child; } - return this.valpha; - }, - red: getset("rgb", 0, maxfn(255)), - green: getset("rgb", 1, maxfn(255)), - blue: getset("rgb", 2, maxfn(255)), - hue: getset(["hsl", "hsv", "hsl", "hwb", "hcg"], 0, (value) => (value % 360 + 360) % 360), - saturationl: getset("hsl", 1, maxfn(100)), - lightness: getset("hsl", 2, maxfn(100)), - saturationv: getset("hsv", 1, maxfn(100)), - value: getset("hsv", 2, maxfn(100)), - chroma: getset("hcg", 1, maxfn(100)), - gray: getset("hcg", 2, maxfn(100)), - white: getset("hwb", 1, maxfn(100)), - wblack: getset("hwb", 2, maxfn(100)), - cyan: getset("cmyk", 0, maxfn(100)), - magenta: getset("cmyk", 1, maxfn(100)), - yellow: getset("cmyk", 2, maxfn(100)), - black: getset("cmyk", 3, maxfn(100)), - x: getset("xyz", 0, maxfn(95.047)), - y: getset("xyz", 1, maxfn(100)), - z: getset("xyz", 2, maxfn(108.833)), - l: getset("lab", 0, maxfn(100)), - a: getset("lab", 1), - b: getset("lab", 2), - keyword(value) { - if (value !== void 0) { - return new Color2(value); + function _insertBefore(parentNode, newChild, nextChild) { + var cp = newChild.parentNode; + if (cp) { + cp.removeChild(newChild); + } + if (newChild.nodeType === DOCUMENT_FRAGMENT_NODE) { + var newFirst = newChild.firstChild; + if (newFirst == null) { + return newChild; + } + var newLast = newChild.lastChild; + } else { + newFirst = newLast = newChild; + } + var pre = nextChild ? nextChild.previousSibling : parentNode.lastChild; + newFirst.previousSibling = pre; + newLast.nextSibling = nextChild; + if (pre) { + pre.nextSibling = newFirst; + } else { + parentNode.firstChild = newFirst; + } + if (nextChild == null) { + parentNode.lastChild = newLast; + } else { + nextChild.previousSibling = newLast; + } + do { + newFirst.parentNode = parentNode; + } while (newFirst !== newLast && (newFirst = newFirst.nextSibling)); + _onUpdateChild(parentNode.ownerDocument || parentNode, parentNode); + if (newChild.nodeType == DOCUMENT_FRAGMENT_NODE) { + newChild.firstChild = newChild.lastChild = null; + } + return newChild; } - return convert2[this.model].keyword(this.color); - }, - hex(value) { - if (value !== void 0) { - return new Color2(value); + function _appendSingleChild(parentNode, newChild) { + var cp = newChild.parentNode; + if (cp) { + var pre = parentNode.lastChild; + cp.removeChild(newChild); + var pre = parentNode.lastChild; + } + var pre = parentNode.lastChild; + newChild.parentNode = parentNode; + newChild.previousSibling = pre; + newChild.nextSibling = null; + if (pre) { + pre.nextSibling = newChild; + } else { + parentNode.firstChild = newChild; + } + parentNode.lastChild = newChild; + _onUpdateChild(parentNode.ownerDocument, parentNode, newChild); + return newChild; } - return colorString.to.hex(this.rgb().round().color); - }, - hexa(value) { - if (value !== void 0) { - return new Color2(value); + Document.prototype = { + nodeName: "#document", + nodeType: DOCUMENT_NODE, + doctype: null, + documentElement: null, + _inc: 1, + insertBefore: function(newChild, refChild) { + if (newChild.nodeType == DOCUMENT_FRAGMENT_NODE) { + var child = newChild.firstChild; + while (child) { + var next = child.nextSibling; + this.insertBefore(child, refChild); + child = next; + } + return newChild; + } + if (this.documentElement == null && newChild.nodeType == ELEMENT_NODE) { + this.documentElement = newChild; + } + return _insertBefore(this, newChild, refChild), newChild.ownerDocument = this, newChild; + }, + removeChild: function(oldChild) { + if (this.documentElement == oldChild) { + this.documentElement = null; + } + return _removeChild(this, oldChild); + }, + importNode: function(importedNode, deep) { + return importNode(this, importedNode, deep); + }, + getElementById: function(id) { + var rtv = null; + _visitNode(this.documentElement, function(node) { + if (node.nodeType == ELEMENT_NODE) { + if (node.getAttribute("id") == id) { + rtv = node; + return true; + } + } + }); + return rtv; + }, + createElement: function(tagName) { + var node = new Element2(); + node.ownerDocument = this; + node.nodeName = tagName; + node.tagName = tagName; + node.childNodes = new NodeList(); + var attrs = node.attributes = new NamedNodeMap(); + attrs._ownerElement = node; + return node; + }, + createDocumentFragment: function() { + var node = new DocumentFragment(); + node.ownerDocument = this; + node.childNodes = new NodeList(); + return node; + }, + createTextNode: function(data) { + var node = new Text(); + node.ownerDocument = this; + node.appendData(data); + return node; + }, + createComment: function(data) { + var node = new Comment(); + node.ownerDocument = this; + node.appendData(data); + return node; + }, + createCDATASection: function(data) { + var node = new CDATASection(); + node.ownerDocument = this; + node.appendData(data); + return node; + }, + createProcessingInstruction: function(target, data) { + var node = new ProcessingInstruction(); + node.ownerDocument = this; + node.tagName = node.target = target; + node.nodeValue = node.data = data; + return node; + }, + createAttribute: function(name) { + var node = new Attr(); + node.ownerDocument = this; + node.name = name; + node.nodeName = name; + node.localName = name; + node.specified = true; + return node; + }, + createEntityReference: function(name) { + var node = new EntityReference(); + node.ownerDocument = this; + node.nodeName = name; + return node; + }, + createElementNS: function(namespaceURI, qualifiedName) { + var node = new Element2(); + var pl = qualifiedName.split(":"); + var attrs = node.attributes = new NamedNodeMap(); + node.childNodes = new NodeList(); + node.ownerDocument = this; + node.nodeName = qualifiedName; + node.tagName = qualifiedName; + node.namespaceURI = namespaceURI; + if (pl.length == 2) { + node.prefix = pl[0]; + node.localName = pl[1]; + } else { + node.localName = qualifiedName; + } + attrs._ownerElement = node; + return node; + }, + createAttributeNS: function(namespaceURI, qualifiedName) { + var node = new Attr(); + var pl = qualifiedName.split(":"); + node.ownerDocument = this; + node.nodeName = qualifiedName; + node.name = qualifiedName; + node.namespaceURI = namespaceURI; + node.specified = true; + if (pl.length == 2) { + node.prefix = pl[0]; + node.localName = pl[1]; + } else { + node.localName = qualifiedName; + } + return node; + } + }; + _extends(Document, Node); + function Element2() { + this._nsMap = {}; } - const rgbArray = this.rgb().round().color; - let alphaHex = Math.round(this.valpha * 255).toString(16).toUpperCase(); - if (alphaHex.length === 1) { - alphaHex = "0" + alphaHex; + ; + Element2.prototype = { + nodeType: ELEMENT_NODE, + hasAttribute: function(name) { + return this.getAttributeNode(name) != null; + }, + getAttribute: function(name) { + var attr = this.getAttributeNode(name); + return attr && attr.value || ""; + }, + getAttributeNode: function(name) { + return this.attributes.getNamedItem(name); + }, + setAttribute: function(name, value) { + var attr = this.ownerDocument.createAttribute(name); + attr.value = attr.nodeValue = "" + value; + this.setAttributeNode(attr); + }, + removeAttribute: function(name) { + var attr = this.getAttributeNode(name); + attr && this.removeAttributeNode(attr); + }, + appendChild: function(newChild) { + if (newChild.nodeType === DOCUMENT_FRAGMENT_NODE) { + return this.insertBefore(newChild, null); + } else { + return _appendSingleChild(this, newChild); + } + }, + setAttributeNode: function(newAttr) { + return this.attributes.setNamedItem(newAttr); + }, + setAttributeNodeNS: function(newAttr) { + return this.attributes.setNamedItemNS(newAttr); + }, + removeAttributeNode: function(oldAttr) { + return this.attributes.removeNamedItem(oldAttr.nodeName); + }, + removeAttributeNS: function(namespaceURI, localName) { + var old = this.getAttributeNodeNS(namespaceURI, localName); + old && this.removeAttributeNode(old); + }, + hasAttributeNS: function(namespaceURI, localName) { + return this.getAttributeNodeNS(namespaceURI, localName) != null; + }, + getAttributeNS: function(namespaceURI, localName) { + var attr = this.getAttributeNodeNS(namespaceURI, localName); + return attr && attr.value || ""; + }, + setAttributeNS: function(namespaceURI, qualifiedName, value) { + var attr = this.ownerDocument.createAttributeNS(namespaceURI, qualifiedName); + attr.value = attr.nodeValue = "" + value; + this.setAttributeNode(attr); + }, + getAttributeNodeNS: function(namespaceURI, localName) { + return this.attributes.getNamedItemNS(namespaceURI, localName); + }, + getElementsByTagName: function(tagName) { + return new LiveNodeList(this, function(base) { + var ls = []; + _visitNode(base, function(node) { + if (node !== base && node.nodeType == ELEMENT_NODE && (tagName === "*" || node.tagName == tagName)) { + ls.push(node); + } + }); + return ls; + }); + }, + getElementsByTagNameNS: function(namespaceURI, localName) { + return new LiveNodeList(this, function(base) { + var ls = []; + _visitNode(base, function(node) { + if (node !== base && node.nodeType === ELEMENT_NODE && (namespaceURI === "*" || node.namespaceURI === namespaceURI) && (localName === "*" || node.localName == localName)) { + ls.push(node); + } + }); + return ls; + }); + } + }; + Document.prototype.getElementsByTagName = Element2.prototype.getElementsByTagName; + Document.prototype.getElementsByTagNameNS = Element2.prototype.getElementsByTagNameNS; + _extends(Element2, Node); + function Attr() { } - return colorString.to.hex(rgbArray) + alphaHex; - }, - rgbNumber() { - const rgb = this.rgb().color; - return (rgb[0] & 255) << 16 | (rgb[1] & 255) << 8 | rgb[2] & 255; - }, - luminosity() { - const rgb = this.rgb().color; - const lum = []; - for (const [i3, element] of rgb.entries()) { - const chan = element / 255; - lum[i3] = chan <= 0.04045 ? chan / 12.92 : ((chan + 0.055) / 1.055) ** 2.4; + ; + Attr.prototype.nodeType = ATTRIBUTE_NODE; + _extends(Attr, Node); + function CharacterData() { } - return 0.2126 * lum[0] + 0.7152 * lum[1] + 0.0722 * lum[2]; - }, - contrast(color2) { - const lum1 = this.luminosity(); - const lum2 = color2.luminosity(); - if (lum1 > lum2) { - return (lum1 + 0.05) / (lum2 + 0.05); + ; + CharacterData.prototype = { + data: "", + substringData: function(offset2, count) { + return this.data.substring(offset2, offset2 + count); + }, + appendData: function(text) { + text = this.data + text; + this.nodeValue = this.data = text; + this.length = text.length; + }, + insertData: function(offset2, text) { + this.replaceData(offset2, 0, text); + }, + appendChild: function(newChild) { + throw new Error(ExceptionMessage[HIERARCHY_REQUEST_ERR]); + }, + deleteData: function(offset2, count) { + this.replaceData(offset2, count, ""); + }, + replaceData: function(offset2, count, text) { + var start = this.data.substring(0, offset2); + var end = this.data.substring(offset2 + count); + text = start + text + end; + this.nodeValue = this.data = text; + this.length = text.length; + } + }; + _extends(CharacterData, Node); + function Text() { } - return (lum2 + 0.05) / (lum1 + 0.05); - }, - level(color2) { - const contrastRatio = this.contrast(color2); - if (contrastRatio >= 7) { - return "AAA"; + ; + Text.prototype = { + nodeName: "#text", + nodeType: TEXT_NODE, + splitText: function(offset2) { + var text = this.data; + var newText = text.substring(offset2); + text = text.substring(0, offset2); + this.data = this.nodeValue = text; + this.length = text.length; + var newNode = this.ownerDocument.createTextNode(newText); + if (this.parentNode) { + this.parentNode.insertBefore(newNode, this.nextSibling); + } + return newNode; + } + }; + _extends(Text, CharacterData); + function Comment() { } - return contrastRatio >= 4.5 ? "AA" : ""; - }, - isDark() { - const rgb = this.rgb().color; - const yiq = (rgb[0] * 2126 + rgb[1] * 7152 + rgb[2] * 722) / 1e4; - return yiq < 128; - }, - isLight() { - return !this.isDark(); - }, - negate() { - const rgb = this.rgb(); - for (let i3 = 0; i3 < 3; i3++) { - rgb.color[i3] = 255 - rgb.color[i3]; + ; + Comment.prototype = { + nodeName: "#comment", + nodeType: COMMENT_NODE + }; + _extends(Comment, CharacterData); + function CDATASection() { } - return rgb; - }, - lighten(ratio) { - const hsl = this.hsl(); - hsl.color[2] += hsl.color[2] * ratio; - return hsl; - }, - darken(ratio) { - const hsl = this.hsl(); - hsl.color[2] -= hsl.color[2] * ratio; - return hsl; - }, - saturate(ratio) { - const hsl = this.hsl(); - hsl.color[1] += hsl.color[1] * ratio; - return hsl; - }, - desaturate(ratio) { - const hsl = this.hsl(); - hsl.color[1] -= hsl.color[1] * ratio; - return hsl; - }, - whiten(ratio) { - const hwb = this.hwb(); - hwb.color[1] += hwb.color[1] * ratio; - return hwb; - }, - blacken(ratio) { - const hwb = this.hwb(); - hwb.color[2] += hwb.color[2] * ratio; - return hwb; - }, - grayscale() { - const rgb = this.rgb().color; - const value = rgb[0] * 0.3 + rgb[1] * 0.59 + rgb[2] * 0.11; - return Color2.rgb(value, value, value); - }, - fade(ratio) { - return this.alpha(this.valpha - this.valpha * ratio); - }, - opaquer(ratio) { - return this.alpha(this.valpha + this.valpha * ratio); - }, - rotate(degrees) { - const hsl = this.hsl(); - let hue = hsl.color[0]; - hue = (hue + degrees) % 360; - hue = hue < 0 ? 360 + hue : hue; - hsl.color[0] = hue; - return hsl; - }, - mix(mixinColor, weight) { - if (!mixinColor || !mixinColor.rgb) { - throw new Error('Argument to "mix" was not a Color instance, but rather an instance of ' + typeof mixinColor); + ; + CDATASection.prototype = { + nodeName: "#cdata-section", + nodeType: CDATA_SECTION_NODE + }; + _extends(CDATASection, CharacterData); + function DocumentType() { } - const color1 = mixinColor.rgb(); - const color2 = this.rgb(); - const p3 = weight === void 0 ? 0.5 : weight; - const w4 = 2 * p3 - 1; - const a3 = color1.alpha() - color2.alpha(); - const w1 = ((w4 * a3 === -1 ? w4 : (w4 + a3) / (1 + w4 * a3)) + 1) / 2; - const w22 = 1 - w1; - return Color2.rgb(w1 * color1.red() + w22 * color2.red(), w1 * color1.green() + w22 * color2.green(), w1 * color1.blue() + w22 * color2.blue(), color1.alpha() * p3 + color2.alpha() * (1 - p3)); - } - }; - for (const model of Object.keys(convert2)) { - if (skippedModels.includes(model)) { - continue; - } - const { channels } = convert2[model]; - Color2.prototype[model] = function(...args) { - if (this.model === model) { - return new Color2(this); + ; + DocumentType.prototype.nodeType = DOCUMENT_TYPE_NODE; + _extends(DocumentType, Node); + function Notation() { } - if (args.length > 0) { - return new Color2(args, model); + ; + Notation.prototype.nodeType = NOTATION_NODE; + _extends(Notation, Node); + function Entity() { } - return new Color2([...assertArray(convert2[this.model][model].raw(this.color)), this.valpha], model); - }; - Color2[model] = function(...args) { - let color = args[0]; - if (typeof color === "number") { - color = zeroArray(args, channels); + ; + Entity.prototype.nodeType = ENTITY_NODE; + _extends(Entity, Node); + function EntityReference() { } - return new Color2(color, model); - }; - } - function roundTo2(number, places) { - return Number(number.toFixed(places)); - } - function roundToPlace(places) { - return function(number) { - return roundTo2(number, places); - }; - } - function getset(model, channel, modifier) { - model = Array.isArray(model) ? model : [model]; - for (const m3 of model) { - (limiters[m3] || (limiters[m3] = []))[channel] = modifier; - } - model = model[0]; - return function(value) { - let result; - if (value !== void 0) { - if (modifier) { - value = modifier(value); - } - result = this[model](); - result.color[channel] = value; - return result; + ; + EntityReference.prototype.nodeType = ENTITY_REFERENCE_NODE; + _extends(EntityReference, Node); + function DocumentFragment() { } - result = this[model]().color[channel]; - if (modifier) { - result = modifier(result); + ; + DocumentFragment.prototype.nodeName = "#document-fragment"; + DocumentFragment.prototype.nodeType = DOCUMENT_FRAGMENT_NODE; + _extends(DocumentFragment, Node); + function ProcessingInstruction() { } - return result; - }; - } - function maxfn(max) { - return function(v3) { - return Math.max(0, Math.min(max, v3)); - }; - } - function assertArray(value) { - return Array.isArray(value) ? value : [value]; - } - function zeroArray(array, length) { - for (let i3 = 0; i3 < length; i3++) { - if (typeof array[i3] !== "number") { - array[i3] = 0; + ProcessingInstruction.prototype.nodeType = PROCESSING_INSTRUCTION_NODE; + _extends(ProcessingInstruction, Node); + function XMLSerializer() { } - } - return array; - } - module2.exports = Color2; - } -}); - -// node_modules/dav/dav.js -var require_dav = __commonJS({ - "node_modules/dav/dav.js"(exports, module2) { - if (!Array.prototype.find) { - Array.prototype.find = function(predicate) { - if (this == null) { - throw new TypeError("Array.prototype.find called on null or undefined"); + XMLSerializer.prototype.serializeToString = function(node, isHtml, nodeFilter) { + return nodeSerializeToString.call(node, isHtml, nodeFilter); + }; + Node.prototype.toString = nodeSerializeToString; + function nodeSerializeToString(isHtml, nodeFilter) { + var buf = []; + var refNode = this.nodeType == 9 ? this.documentElement : this; + var prefix = refNode.prefix; + var uri = refNode.namespaceURI; + if (uri && prefix == null) { + var prefix = refNode.lookupPrefix(uri); + if (prefix == null) { + var visibleNamespaces = [ + { namespace: uri, prefix: null } + ]; + } + } + serializeToString(this, buf, isHtml, nodeFilter, visibleNamespaces); + return buf.join(""); } - if (typeof predicate !== "function") { - throw new TypeError("predicate must be a function"); + function needNamespaceDefine(node, isHTML, visibleNamespaces) { + var prefix = node.prefix || ""; + var uri = node.namespaceURI; + if (!prefix && !uri) { + return false; + } + if (prefix === "xml" && uri === "http://www.w3.org/XML/1998/namespace" || uri == "http://www.w3.org/2000/xmlns/") { + return false; + } + var i3 = visibleNamespaces.length; + while (i3--) { + var ns = visibleNamespaces[i3]; + if (ns.prefix == prefix) { + return ns.namespace != uri; + } + } + return true; } - var list = Object(this); - var length = list.length >>> 0; - var thisArg = arguments[1]; - var value; - for (var i3 = 0; i3 < length; i3++) { - value = list[i3]; - if (predicate.call(thisArg, value, i3, list)) { - return value; + function serializeToString(node, buf, isHTML, nodeFilter, visibleNamespaces) { + if (nodeFilter) { + node = nodeFilter(node); + if (node) { + if (typeof node == "string") { + buf.push(node); + return; + } + } else { + return; + } + } + switch (node.nodeType) { + case ELEMENT_NODE: + if (!visibleNamespaces) + visibleNamespaces = []; + var startVisibleNamespaces = visibleNamespaces.length; + var attrs = node.attributes; + var len = attrs.length; + var child = node.firstChild; + var nodeName = node.tagName; + isHTML = htmlns === node.namespaceURI || isHTML; + buf.push("<", nodeName); + for (var i3 = 0; i3 < len; i3++) { + var attr = attrs.item(i3); + if (attr.prefix == "xmlns") { + visibleNamespaces.push({ prefix: attr.localName, namespace: attr.value }); + } else if (attr.nodeName == "xmlns") { + visibleNamespaces.push({ prefix: "", namespace: attr.value }); + } + } + for (var i3 = 0; i3 < len; i3++) { + var attr = attrs.item(i3); + if (needNamespaceDefine(attr, isHTML, visibleNamespaces)) { + var prefix = attr.prefix || ""; + var uri = attr.namespaceURI; + var ns = prefix ? " xmlns:" + prefix : " xmlns"; + buf.push(ns, '="', uri, '"'); + visibleNamespaces.push({ prefix, namespace: uri }); + } + serializeToString(attr, buf, isHTML, nodeFilter, visibleNamespaces); + } + if (needNamespaceDefine(node, isHTML, visibleNamespaces)) { + var prefix = node.prefix || ""; + var uri = node.namespaceURI; + var ns = prefix ? " xmlns:" + prefix : " xmlns"; + buf.push(ns, '="', uri, '"'); + visibleNamespaces.push({ prefix, namespace: uri }); + } + if (child || isHTML && !/^(?:meta|link|img|br|hr|input)$/i.test(nodeName)) { + buf.push(">"); + if (isHTML && /^script$/i.test(nodeName)) { + while (child) { + if (child.data) { + buf.push(child.data); + } else { + serializeToString(child, buf, isHTML, nodeFilter, visibleNamespaces); + } + child = child.nextSibling; + } + } else { + while (child) { + serializeToString(child, buf, isHTML, nodeFilter, visibleNamespaces); + child = child.nextSibling; + } + } + buf.push(""); + } else { + buf.push("/>"); + } + return; + case DOCUMENT_NODE: + case DOCUMENT_FRAGMENT_NODE: + var child = node.firstChild; + while (child) { + serializeToString(child, buf, isHTML, nodeFilter, visibleNamespaces); + child = child.nextSibling; + } + return; + case ATTRIBUTE_NODE: + return buf.push(" ", node.name, '="', node.value.replace(/[<&"]/g, _xmlEncoder), '"'); + case TEXT_NODE: + return buf.push(node.data.replace(/[<&]/g, _xmlEncoder)); + case CDATA_SECTION_NODE: + return buf.push(""); + case COMMENT_NODE: + return buf.push(""); + case DOCUMENT_TYPE_NODE: + var pubid = node.publicId; + var sysid = node.systemId; + buf.push("'); + } else if (sysid && sysid != ".") { + buf.push(' SYSTEM "', sysid, '">'); + } else { + var sub = node.internalSubset; + if (sub) { + buf.push(" [", sub, "]"); + } + buf.push(">"); + } + return; + case PROCESSING_INSTRUCTION_NODE: + return buf.push(""); + case ENTITY_REFERENCE_NODE: + return buf.push("&", node.nodeName, ";"); + default: + buf.push("??", node.nodeName); } } - return void 0; - }; - } - if (!Object.assign) { - Object.defineProperty(Object, "assign", { - enumerable: false, - configurable: true, - writable: true, - value: function(target, firstSource) { - "use strict"; - if (target === void 0 || target === null) { - throw new TypeError("Cannot convert first argument to object"); + function importNode(doc, node, deep) { + var node2; + switch (node.nodeType) { + case ELEMENT_NODE: + node2 = node.cloneNode(false); + node2.ownerDocument = doc; + case DOCUMENT_FRAGMENT_NODE: + break; + case ATTRIBUTE_NODE: + deep = true; + break; } - var to = Object(target); - for (var i3 = 1; i3 < arguments.length; i3++) { - var nextSource = arguments[i3]; - if (nextSource === void 0 || nextSource === null) { - continue; + if (!node2) { + node2 = node.cloneNode(false); + } + node2.ownerDocument = doc; + node2.parentNode = null; + if (deep) { + var child = node.firstChild; + while (child) { + node2.appendChild(importNode(doc, child, deep)); + child = child.nextSibling; } - nextSource = Object(nextSource); - var keysArray = Object.keys(Object(nextSource)); - for (var nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex++) { - var nextKey = keysArray[nextIndex]; - var desc = Object.getOwnPropertyDescriptor(nextSource, nextKey); - if (desc !== void 0 && desc.enumerable) { - to[nextKey] = nextSource[nextKey]; + } + return node2; + } + function cloneNode(doc, node, deep) { + var node2 = new node.constructor(); + for (var n3 in node) { + var v3 = node[n3]; + if (typeof v3 != "object") { + if (v3 != node2[n3]) { + node2[n3] = v3; } } } - return to; + if (node.childNodes) { + node2.childNodes = new NodeList(); + } + node2.ownerDocument = doc; + switch (node2.nodeType) { + case ELEMENT_NODE: + var attrs = node.attributes; + var attrs2 = node2.attributes = new NamedNodeMap(); + var len = attrs.length; + attrs2._ownerElement = node2; + for (var i3 = 0; i3 < len; i3++) { + node2.setAttributeNode(cloneNode(doc, attrs.item(i3), true)); + } + break; + ; + case ATTRIBUTE_NODE: + deep = true; + } + if (deep) { + var child = node.firstChild; + while (child) { + node2.appendChild(cloneNode(doc, child, deep)); + child = child.nextSibling; + } + } + return node2; } - }); - } - !function(global2) { - "use strict"; - var hasOwn = Object.prototype.hasOwnProperty; - var undefined2; - var iteratorSymbol = typeof Symbol === "function" && Symbol.iterator || "@@iterator"; - var inModule = typeof module2 === "object"; - var runtime = global2.regeneratorRuntime; - if (runtime) { - if (inModule) { - module2.exports = runtime; + function __set__(object, key, value) { + object[key] = value; } - return; - } - runtime = global2.regeneratorRuntime = inModule ? module2.exports : {}; - function wrap(innerFn, outerFn, self2, tryLocsList) { - var generator = Object.create((outerFn || Generator).prototype); - generator._invoke = makeInvokeMethod(innerFn, self2 || null, new Context(tryLocsList || [])); - return generator; - } - runtime.wrap = wrap; - function tryCatch(fn, obj, arg) { try { - return { type: "normal", arg: fn.call(obj, arg) }; - } catch (err) { - return { type: "throw", arg: err }; - } - } - var GenStateSuspendedStart = "suspendedStart"; - var GenStateSuspendedYield = "suspendedYield"; - var GenStateExecuting = "executing"; - var GenStateCompleted = "completed"; - var ContinueSentinel = {}; - function Generator() { - } - function GeneratorFunction() { - } - function GeneratorFunctionPrototype() { - } - var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype; - GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype; - GeneratorFunctionPrototype.constructor = GeneratorFunction; - GeneratorFunction.displayName = "GeneratorFunction"; - runtime.isGeneratorFunction = function(genFun) { - var ctor = typeof genFun === "function" && genFun.constructor; - return ctor ? ctor === GeneratorFunction || (ctor.displayName || ctor.name) === "GeneratorFunction" : false; - }; - runtime.mark = function(genFun) { - genFun.__proto__ = GeneratorFunctionPrototype; - genFun.prototype = Object.create(Gp); - return genFun; - }; - runtime.async = function(innerFn, outerFn, self2, tryLocsList) { - return new Promise(function(resolve, reject) { - var generator = wrap(innerFn, outerFn, self2, tryLocsList); - var callNext = step.bind(generator, "next"); - var callThrow = step.bind(generator, "throw"); - function step(method, arg) { - var record = tryCatch(generator[method], generator, arg); - if (record.type === "throw") { - reject(record.arg); - return; + if (Object.defineProperty) { + let getTextContent2 = function(node) { + switch (node.nodeType) { + case ELEMENT_NODE: + case DOCUMENT_FRAGMENT_NODE: + var buf = []; + node = node.firstChild; + while (node) { + if (node.nodeType !== 7 && node.nodeType !== 8) { + buf.push(getTextContent2(node)); + } + node = node.nextSibling; + } + return buf.join(""); + default: + return node.nodeValue; + } + }; + var getTextContent = getTextContent2; + Object.defineProperty(LiveNodeList.prototype, "length", { + get: function() { + _updateLiveList(this); + return this.$$length; + } + }); + Object.defineProperty(Node.prototype, "textContent", { + get: function() { + return getTextContent2(this); + }, + set: function(data) { + switch (this.nodeType) { + case ELEMENT_NODE: + case DOCUMENT_FRAGMENT_NODE: + while (this.firstChild) { + this.removeChild(this.firstChild); + } + if (data || String(data)) { + this.appendChild(this.ownerDocument.createTextNode(data)); + } + break; + default: + this.data = data; + this.value = data; + this.nodeValue = data; + } + } + }); + __set__ = function(object, key, value) { + object["$$" + key] = value; + }; + } + } catch (e3) { + } + exports3.DOMImplementation = DOMImplementation; + exports3.XMLSerializer = XMLSerializer; + }, {}], 32: [function(require2, module4, exports3) { + var nameStartChar = /[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/; + var nameChar = new RegExp("[\\-\\.0-9" + nameStartChar.source.slice(1, -1) + "\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"); + var tagNamePattern = new RegExp("^" + nameStartChar.source + nameChar.source + "*(?::" + nameStartChar.source + nameChar.source + "*)?$"); + var S_TAG = 0; + var S_ATTR = 1; + var S_ATTR_SPACE = 2; + var S_EQ = 3; + var S_ATTR_NOQUOT_VALUE = 4; + var S_ATTR_END = 5; + var S_TAG_SPACE = 6; + var S_TAG_CLOSE = 7; + function XMLReader() { + } + XMLReader.prototype = { + parse: function(source, defaultNSMap, entityMap) { + var domBuilder = this.domBuilder; + domBuilder.startDocument(); + _copy(defaultNSMap, defaultNSMap = {}); + parse4(source, defaultNSMap, entityMap, domBuilder, this.errorHandler); + domBuilder.endDocument(); + } + }; + function parse4(source, defaultNSMapCopy, entityMap, domBuilder, errorHandler) { + function fixedFromCharCode(code) { + if (code > 65535) { + code -= 65536; + var surrogate1 = 55296 + (code >> 10), surrogate2 = 56320 + (code & 1023); + return String.fromCharCode(surrogate1, surrogate2); + } else { + return String.fromCharCode(code); } - var info = record.arg; - if (info.done) { - resolve(info.value); + } + function entityReplacer(a4) { + var k3 = a4.slice(1, -1); + if (k3 in entityMap) { + return entityMap[k3]; + } else if (k3.charAt(0) === "#") { + return fixedFromCharCode(parseInt(k3.substr(1).replace("x", "0x"))); } else { - Promise.resolve(info.value).then(callNext, callThrow); + errorHandler.error("entity not found:" + a4); + return a4; } } - callNext(); - }); - }; - function makeInvokeMethod(innerFn, self2, context) { - var state = GenStateSuspendedStart; - return function invoke(method, arg) { - if (state === GenStateExecuting) { - throw new Error("Generator is already running"); + function appendText(end2) { + if (end2 > start) { + var xt = source.substring(start, end2).replace(/&#?\w+;/g, entityReplacer); + locator && position(start); + domBuilder.characters(xt, 0, end2 - start); + start = end2; + } } - if (state === GenStateCompleted) { - return doneResult(); + function position(p3, m3) { + while (p3 >= lineEnd && (m3 = linePattern.exec(source))) { + lineStart = m3.index; + lineEnd = lineStart + m3[0].length; + locator.lineNumber++; + } + locator.columnNumber = p3 - lineStart + 1; } + var lineStart = 0; + var lineEnd = 0; + var linePattern = /.*(?:\r\n?|\n)|.*$/g; + var locator = domBuilder.locator; + var parseStack = [{ currentNSMap: defaultNSMapCopy }]; + var closeMap = {}; + var start = 0; while (true) { - var delegate = context.delegate; - if (delegate) { - if (method === "return" || method === "throw" && delegate.iterator[method] === undefined2) { - context.delegate = null; - var returnMethod = delegate.iterator["return"]; - if (returnMethod) { - var record = tryCatch(returnMethod, delegate.iterator, arg); - if (record.type === "throw") { - method = "throw"; - arg = record.arg; - continue; - } - } - if (method === "return") { - continue; + try { + var tagStart = source.indexOf("<", start); + if (tagStart < 0) { + if (!source.substr(start).match(/^\s*$/)) { + var doc = domBuilder.doc; + var text = doc.createTextNode(source.substr(start)); + doc.appendChild(text); + domBuilder.currentElement = text; } + return; } - var record = tryCatch(delegate.iterator[method], delegate.iterator, arg); - if (record.type === "throw") { - context.delegate = null; - method = "throw"; - arg = record.arg; - continue; - } - method = "next"; - arg = undefined2; - var info = record.arg; - if (info.done) { - context[delegate.resultName] = info.value; - context.next = delegate.nextLoc; - } else { - state = GenStateSuspendedYield; - return info; - } - context.delegate = null; - } - if (method === "next") { - if (state === GenStateSuspendedYield) { - context.sent = arg; - } else { - delete context.sent; - } - } else if (method === "throw") { - if (state === GenStateSuspendedStart) { - state = GenStateCompleted; - throw arg; + if (tagStart > start) { + appendText(tagStart); } - if (context.dispatchException(arg)) { - method = "next"; - arg = undefined2; + switch (source.charAt(tagStart + 1)) { + case "/": + var end = source.indexOf(">", tagStart + 3); + var tagName = source.substring(tagStart + 2, end); + var config2 = parseStack.pop(); + if (end < 0) { + tagName = source.substring(tagStart + 2).replace(/[\s<].*/, ""); + errorHandler.error("end tag name: " + tagName + " is not complete:" + config2.tagName); + end = tagStart + 1 + tagName.length; + } else if (tagName.match(/\s start) { + start = end; + } else { + appendText(Math.max(tagStart, start) + 1); } } - }; - } - function defineGeneratorMethod(method) { - Gp[method] = function(arg) { - return this._invoke(method, arg); - }; - } - defineGeneratorMethod("next"); - defineGeneratorMethod("throw"); - defineGeneratorMethod("return"); - Gp[iteratorSymbol] = function() { - return this; - }; - Gp.toString = function() { - return "[object Generator]"; - }; - function pushTryEntry(locs) { - var entry = { tryLoc: locs[0] }; - if (1 in locs) { - entry.catchLoc = locs[1]; - } - if (2 in locs) { - entry.finallyLoc = locs[2]; - entry.afterLoc = locs[3]; } - this.tryEntries.push(entry); - } - function resetTryEntry(entry) { - var record = entry.completion || {}; - record.type = "normal"; - delete record.arg; - entry.completion = record; - } - function Context(tryLocsList) { - this.tryEntries = [{ tryLoc: "root" }]; - tryLocsList.forEach(pushTryEntry, this); - this.reset(); - } - runtime.keys = function(object) { - var keys = []; - for (var key in object) { - keys.push(key); + function copyLocator(f3, t3) { + t3.lineNumber = f3.lineNumber; + t3.columnNumber = f3.columnNumber; + return t3; } - keys.reverse(); - return function next() { - while (keys.length) { - var key2 = keys.pop(); - if (key2 in object) { - next.value = key2; - next.done = false; - return next; - } - } - next.done = true; - return next; - }; - }; - function values(iterable) { - if (iterable) { - var iteratorMethod = iterable[iteratorSymbol]; - if (iteratorMethod) { - return iteratorMethod.call(iterable); - } - if (typeof iterable.next === "function") { - return iterable; - } - if (!isNaN(iterable.length)) { - var i3 = -1, next = function next2() { - while (++i3 < iterable.length) { - if (hasOwn.call(iterable, i3)) { - next2.value = iterable[i3]; - next2.done = false; - return next2; + function parseElementStartPart(source, start, el, currentNSMap, entityReplacer, errorHandler) { + var attrName; + var value; + var p3 = ++start; + var s4 = S_TAG; + while (true) { + var c3 = source.charAt(p3); + switch (c3) { + case "=": + if (s4 === S_ATTR) { + attrName = source.slice(start, p3); + s4 = S_EQ; + } else if (s4 === S_ATTR_SPACE) { + s4 = S_EQ; + } else { + throw new Error("attribute equal must after attrName"); } - } - next2.value = undefined2; - next2.done = true; - return next2; - }; - return next.next = next; - } - } - return { next: doneResult }; - } - runtime.values = values; - function doneResult() { - return { value: undefined2, done: true }; - } - Context.prototype = { - constructor: Context, - reset: function() { - this.prev = 0; - this.next = 0; - this.sent = undefined2; - this.done = false; - this.delegate = null; - this.tryEntries.forEach(resetTryEntry); - for (var tempIndex = 0, tempName; hasOwn.call(this, tempName = "t" + tempIndex) || tempIndex < 20; ++tempIndex) { - this[tempName] = null; - } - }, - stop: function() { - this.done = true; - var rootEntry = this.tryEntries[0]; - var rootRecord = rootEntry.completion; - if (rootRecord.type === "throw") { - throw rootRecord.arg; - } - return this.rval; - }, - dispatchException: function(exception) { - if (this.done) { - throw exception; - } - var context = this; - function handle(loc, caught) { - record.type = "throw"; - record.arg = exception; - context.next = loc; - return !!caught; + break; + case "'": + case '"': + if (s4 === S_EQ || s4 === S_ATTR) { + if (s4 === S_ATTR) { + errorHandler.warning('attribute value must after "="'); + attrName = source.slice(start, p3); + } + start = p3 + 1; + p3 = source.indexOf(c3, start); + if (p3 > 0) { + value = source.slice(start, p3).replace(/&#?\w+;/g, entityReplacer); + el.add(attrName, value, start - 1); + s4 = S_ATTR_END; + } else { + throw new Error("attribute value no end '" + c3 + "' match"); + } + } else if (s4 == S_ATTR_NOQUOT_VALUE) { + value = source.slice(start, p3).replace(/&#?\w+;/g, entityReplacer); + el.add(attrName, value, start); + errorHandler.warning('attribute "' + attrName + '" missed start quot(' + c3 + ")!!"); + start = p3 + 1; + s4 = S_ATTR_END; + } else { + throw new Error('attribute value must after "="'); + } + break; + case "/": + switch (s4) { + case S_TAG: + el.setTagName(source.slice(start, p3)); + case S_ATTR_END: + case S_TAG_SPACE: + case S_TAG_CLOSE: + s4 = S_TAG_CLOSE; + el.closed = true; + case S_ATTR_NOQUOT_VALUE: + case S_ATTR: + case S_ATTR_SPACE: + break; + default: + throw new Error("attribute invalid close char('/')"); + } + break; + case "": + errorHandler.error("unexpected end of input"); + if (s4 == S_TAG) { + el.setTagName(source.slice(start, p3)); + } + return p3; + case ">": + switch (s4) { + case S_TAG: + el.setTagName(source.slice(start, p3)); + case S_ATTR_END: + case S_TAG_SPACE: + case S_TAG_CLOSE: + break; + case S_ATTR_NOQUOT_VALUE: + case S_ATTR: + value = source.slice(start, p3); + if (value.slice(-1) === "/") { + el.closed = true; + value = value.slice(0, -1); + } + case S_ATTR_SPACE: + if (s4 === S_ATTR_SPACE) { + value = attrName; + } + if (s4 == S_ATTR_NOQUOT_VALUE) { + errorHandler.warning('attribute "' + value + '" missed quot(")!!'); + el.add(attrName, value.replace(/&#?\w+;/g, entityReplacer), start); + } else { + if (currentNSMap[""] !== "http://www.w3.org/1999/xhtml" || !value.match(/^(?:disabled|checked|selected)$/i)) { + errorHandler.warning('attribute "' + value + '" missed value!! "' + value + '" instead!!'); + } + el.add(value, value, start); + } + break; + case S_EQ: + throw new Error("attribute value missed!!"); + } + return p3; + case "\x80": + c3 = " "; + default: + if (c3 <= " ") { + switch (s4) { + case S_TAG: + el.setTagName(source.slice(start, p3)); + s4 = S_TAG_SPACE; + break; + case S_ATTR: + attrName = source.slice(start, p3); + s4 = S_ATTR_SPACE; + break; + case S_ATTR_NOQUOT_VALUE: + var value = source.slice(start, p3).replace(/&#?\w+;/g, entityReplacer); + errorHandler.warning('attribute "' + value + '" missed quot(")!!'); + el.add(attrName, value, start); + case S_ATTR_END: + s4 = S_TAG_SPACE; + break; + } + } else { + switch (s4) { + case S_ATTR_SPACE: + var tagName = el.tagName; + if (currentNSMap[""] !== "http://www.w3.org/1999/xhtml" || !attrName.match(/^(?:disabled|checked|selected)$/i)) { + errorHandler.warning('attribute "' + attrName + '" missed value!! "' + attrName + '" instead2!!'); + } + el.add(attrName, attrName, start); + start = p3; + s4 = S_ATTR; + break; + case S_ATTR_END: + errorHandler.warning('attribute space is required"' + attrName + '"!!'); + case S_TAG_SPACE: + s4 = S_ATTR; + start = p3; + break; + case S_EQ: + s4 = S_ATTR_NOQUOT_VALUE; + start = p3; + break; + case S_TAG_CLOSE: + throw new Error("elements closed character '/' and '>' must be connected to"); + } + } + } + p3++; } - for (var i3 = this.tryEntries.length - 1; i3 >= 0; --i3) { - var entry = this.tryEntries[i3]; - var record = entry.completion; - if (entry.tryLoc === "root") { - return handle("end"); + } + function appendElement(el, domBuilder, currentNSMap) { + var tagName = el.tagName; + var localNSMap = null; + var i3 = el.length; + while (i3--) { + var a3 = el[i3]; + var qName = a3.qName; + var value = a3.value; + var nsp = qName.indexOf(":"); + if (nsp > 0) { + var prefix = a3.prefix = qName.slice(0, nsp); + var localName = qName.slice(nsp + 1); + var nsPrefix = prefix === "xmlns" && localName; + } else { + localName = qName; + prefix = null; + nsPrefix = qName === "xmlns" && ""; } - if (entry.tryLoc <= this.prev) { - var hasCatch = hasOwn.call(entry, "catchLoc"); - var hasFinally = hasOwn.call(entry, "finallyLoc"); - if (hasCatch && hasFinally) { - if (this.prev < entry.catchLoc) { - return handle(entry.catchLoc, true); - } else if (this.prev < entry.finallyLoc) { - return handle(entry.finallyLoc); - } - } else if (hasCatch) { - if (this.prev < entry.catchLoc) { - return handle(entry.catchLoc, true); - } - } else if (hasFinally) { - if (this.prev < entry.finallyLoc) { - return handle(entry.finallyLoc); - } - } else { - throw new Error("try statement without catch or finally"); + a3.localName = localName; + if (nsPrefix !== false) { + if (localNSMap == null) { + localNSMap = {}; + _copy(currentNSMap, currentNSMap = {}); } + currentNSMap[nsPrefix] = localNSMap[nsPrefix] = value; + a3.uri = "http://www.w3.org/2000/xmlns/"; + domBuilder.startPrefixMapping(nsPrefix, value); } } - }, - abrupt: function(type, arg) { - for (var i3 = this.tryEntries.length - 1; i3 >= 0; --i3) { - var entry = this.tryEntries[i3]; - if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { - var finallyEntry = entry; - break; + var i3 = el.length; + while (i3--) { + a3 = el[i3]; + var prefix = a3.prefix; + if (prefix) { + if (prefix === "xml") { + a3.uri = "http://www.w3.org/XML/1998/namespace"; + } + if (prefix !== "xmlns") { + a3.uri = currentNSMap[prefix || ""]; + } } } - if (finallyEntry && (type === "break" || type === "continue") && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc) { - finallyEntry = null; - } - var record = finallyEntry ? finallyEntry.completion : {}; - record.type = type; - record.arg = arg; - if (finallyEntry) { - this.next = finallyEntry.finallyLoc; + var nsp = tagName.indexOf(":"); + if (nsp > 0) { + prefix = el.prefix = tagName.slice(0, nsp); + localName = el.localName = tagName.slice(nsp + 1); } else { - this.complete(record); - } - return ContinueSentinel; - }, - complete: function(record, afterLoc) { - if (record.type === "throw") { - throw record.arg; - } - if (record.type === "break" || record.type === "continue") { - this.next = record.arg; - } else if (record.type === "return") { - this.rval = record.arg; - this.next = "end"; - } else if (record.type === "normal" && afterLoc) { - this.next = afterLoc; - } - }, - finish: function(finallyLoc) { - for (var i3 = this.tryEntries.length - 1; i3 >= 0; --i3) { - var entry = this.tryEntries[i3]; - if (entry.finallyLoc === finallyLoc) { - this.complete(entry.completion, entry.afterLoc); - resetTryEntry(entry); - return ContinueSentinel; - } + prefix = null; + localName = el.localName = tagName; } - }, - "catch": function(tryLoc) { - for (var i3 = this.tryEntries.length - 1; i3 >= 0; --i3) { - var entry = this.tryEntries[i3]; - if (entry.tryLoc === tryLoc) { - var record = entry.completion; - if (record.type === "throw") { - var thrown = record.arg; - resetTryEntry(entry); + var ns = el.uri = currentNSMap[prefix || ""]; + domBuilder.startElement(ns, localName, tagName, el); + if (el.closed) { + domBuilder.endElement(ns, localName, tagName); + if (localNSMap) { + for (prefix in localNSMap) { + domBuilder.endPrefixMapping(prefix); } - return thrown; } + } else { + el.currentNSMap = currentNSMap; + el.localNSMap = localNSMap; + return true; } - throw new Error("illegal catch attempt"); - }, - delegateYield: function(iterable, resultName, nextLoc) { - this.delegate = { - iterator: values(iterable), - resultName, - nextLoc - }; - return ContinueSentinel; - } - }; - }(typeof global === "object" ? global : typeof window === "object" ? window : typeof self === "object" ? self : exports); - (function(f3) { - if (typeof exports === "object" && typeof module2 !== "undefined") { - module2.exports = f3(); - } else if (typeof define === "function" && define.amd) { - define([], f3); - } else { - var g4; - if (typeof window !== "undefined") { - g4 = window; - } else if (typeof global !== "undefined") { - g4 = global; - } else if (typeof self !== "undefined") { - g4 = self; - } else { - g4 = this; } - g4.dav = f3(); - } - })(function() { - var define2, module3, exports2; - return function e3(t3, n3, r3) { - function s4(o3, u3) { - if (!n3[o3]) { - if (!t3[o3]) { - var a3 = typeof require == "function" && require; - if (!u3 && a3) - return a3(o3, true); - if (i3) - return i3(o3, true); - var f3 = new Error("Cannot find module '" + o3 + "'"); - throw f3.code = "MODULE_NOT_FOUND", f3; + function parseHtmlSpecialContent(source, elStartEnd, tagName, entityReplacer, domBuilder) { + if (/^(?:script|textarea)$/i.test(tagName)) { + var elEndStart = source.indexOf("", elStartEnd); + var text = source.substring(elStartEnd + 1, elEndStart); + if (/[&<]/.test(text)) { + if (/^script$/i.test(tagName)) { + domBuilder.characters(text, 0, text.length); + return elEndStart; + } + text = text.replace(/&#?\w+;/g, entityReplacer); + domBuilder.characters(text, 0, text.length); + return elEndStart; } - var l4 = n3[o3] = { exports: {} }; - t3[o3][0].call(l4.exports, function(e4) { - var n4 = t3[o3][1][e4]; - return s4(n4 ? n4 : e4); - }, l4, l4.exports, e3, t3, n3, r3); } - return n3[o3].exports; + return elStartEnd + 1; } - var i3 = typeof require == "function" && require; - for (var o2 = 0; o2 < r3.length; o2++) - s4(r3[o2]); - return s4; - }({ 1: [function(require2, module4, exports3) { - "use strict"; - function _interopRequireWildcard(obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {}; - if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) - newObj[key] = obj[key]; - } + function fixSelfClosed(source, elStartEnd, tagName, closeMap) { + var pos = closeMap[tagName]; + if (pos == null) { + pos = source.lastIndexOf(""); + if (pos < elStartEnd) { + pos = source.lastIndexOf("= 300 && xhr.status < 400)) { - context$1$0.next = 14; - break; - } - _location = xhr.getResponseHeader("Location"); - if (!(typeof _location === "string" && _location.length)) { - context$1$0.next = 14; - break; - } - debug("Discovery redirected to " + _location); - return context$1$0.abrupt("return", _url2["default"].format({ - protocol: endpoint.protocol, - host: endpoint.host, - pathname: _location - })); - case 14: - context$1$0.next = 19; - break; - case 16: - context$1$0.prev = 16; - context$1$0.t0 = context$1$0["catch"](5); - debug("Discovery failed... failover to the provided url"); - case 19: - return context$1$0.abrupt("return", endpoint.href); - case 20: - case "end": - return context$1$0.stop(); - } - }, callee$0$0, this, [[5, 16]]); - })); - var principalUrl = _co2["default"].wrap(regeneratorRuntime.mark(function callee$0$0(account, options) { - var req, res, container; - return regeneratorRuntime.wrap(function callee$0$0$(context$1$0) { - while (1) - switch (context$1$0.prev = context$1$0.next) { - case 0: - debug("Fetch principal url from context path " + account.rootUrl + "."); - req = request3.propfind({ - props: [{ name: "current-user-principal", namespace: ns2.DAV }], - depth: 0, - mergeResponses: true - }); - context$1$0.next = 4; - return options.xhr.send(req, account.rootUrl, { - sandbox: options.sandbox - }); - case 4: - res = context$1$0.sent; - container = res.props; - debug("Received principal: " + container.currentUserPrincipal); - return context$1$0.abrupt("return", _url2["default"].resolve(account.rootUrl, container.currentUserPrincipal)); - case 8: - case "end": - return context$1$0.stop(); - } - }, callee$0$0, this); - })); - var homeUrl = _co2["default"].wrap(regeneratorRuntime.mark(function callee$0$0(account, options) { - var prop, req, responses, response, container, href; - return regeneratorRuntime.wrap(function callee$0$0$(context$1$0) { - while (1) - switch (context$1$0.prev = context$1$0.next) { - case 0: - debug("Fetch home url from principal url " + account.principalUrl + "."); - prop = void 0; - if (options.accountType === "caldav") { - prop = { name: "calendar-home-set", namespace: ns2.CALDAV }; - } else if (options.accountType === "carddav") { - prop = { name: "addressbook-home-set", namespace: ns2.CARDDAV }; - } - req = request3.propfind({ props: [prop] }); - context$1$0.next = 6; - return options.xhr.send(req, account.principalUrl, { - sandbox: options.sandbox - }); - case 6: - responses = context$1$0.sent; - response = responses.find(function(response2) { - return (0, _fuzzy_url_equals2["default"])(account.principalUrl, response2.href); - }); - container = response.props; - href = void 0; - if (options.accountType === "caldav") { - debug("Received home: " + container.calendarHomeSet); - href = container.calendarHomeSet; - } else if (options.accountType === "carddav") { - debug("Received home: " + container.addressbookHomeSet); - href = container.addressbookHomeSet; - } - return context$1$0.abrupt("return", _url2["default"].resolve(account.rootUrl, href)); - case 12: - case "end": - return context$1$0.stop(); + function parseDCC(source, start, domBuilder, errorHandler) { + var next = source.charAt(start + 2); + switch (next) { + case "-": + if (source.charAt(start + 3) === "-") { + var end = source.indexOf("-->", start + 4); + if (end > start) { + domBuilder.comment(source, start + 4, end - start - 4); + return end + 3; + } else { + errorHandler.error("Unclosed comment"); + return -1; + } + } else { + return -1; } - }, callee$0$0, this); - })); - exports3.createAccount = _co2["default"].wrap(regeneratorRuntime.mark(function callee$0$0(options) { - var account, key, loadCollections, loadObjects, collections; - return regeneratorRuntime.wrap(function callee$0$0$(context$1$0) { - while (1) - switch (context$1$0.prev = context$1$0.next) { - case 0: - options = Object.assign({}, defaults, options); - if (typeof options.loadObjects !== "boolean") { - options.loadObjects = options.loadCollections; - } - account = new _model.Account({ - server: options.server, - credentials: options.xhr.credentials - }); - context$1$0.next = 5; - return serviceDiscovery(account, options); - case 5: - account.rootUrl = context$1$0.sent; - context$1$0.next = 8; - return principalUrl(account, options); - case 8: - account.principalUrl = context$1$0.sent; - context$1$0.next = 11; - return homeUrl(account, options); - case 11: - account.homeUrl = context$1$0.sent; - if (options.loadCollections) { - context$1$0.next = 14; - break; - } - return context$1$0.abrupt("return", account); - case 14: - key = void 0, loadCollections = void 0, loadObjects = void 0; - if (options.accountType === "caldav") { - key = "calendars"; - loadCollections = _calendars.listCalendars; - loadObjects = _calendars.listCalendarObjects; - } else if (options.accountType === "carddav") { - key = "addressBooks"; - loadCollections = _contacts.listAddressBooks; - loadObjects = _contacts.listVCards; - } - context$1$0.next = 18; - return loadCollections(account, options); - case 18: - collections = context$1$0.sent; - account[key] = collections; - if (options.loadObjects) { - context$1$0.next = 22; - break; - } - return context$1$0.abrupt("return", account); - case 22: - context$1$0.next = 24; - return collections.map(_co2["default"].wrap(regeneratorRuntime.mark(function callee$1$0(collection) { - return regeneratorRuntime.wrap(function callee$1$0$(context$2$0) { - while (1) - switch (context$2$0.prev = context$2$0.next) { - case 0: - context$2$0.prev = 0; - context$2$0.next = 3; - return loadObjects(collection, options); - case 3: - collection.objects = context$2$0.sent; - context$2$0.next = 9; - break; - case 6: - context$2$0.prev = 6; - context$2$0.t0 = context$2$0["catch"](0); - collection.error = context$2$0.t0; - case 9: - case "end": - return context$2$0.stop(); - } - }, callee$1$0, this, [[0, 6]]); - }))); - case 24: - account[key] = account[key].filter(function(collection) { - return !collection.error; - }); - return context$1$0.abrupt("return", account); - case 26: - case "end": - return context$1$0.stop(); + default: + if (source.substr(start + 3, 6) == "CDATA[") { + var end = source.indexOf("]]>", start + 9); + domBuilder.startCDATA(); + domBuilder.characters(source, start + 9, end - start - 9); + domBuilder.endCDATA(); + return end + 3; } - }, callee$0$0, this); - })); - }, { "./calendars": 2, "./contacts": 5, "./debug": 6, "./fuzzy_url_equals": 7, "./model": 9, "./namespace": 10, "./request": 12, "co": 24, "url": 29 }], 2: [function(require2, module4, exports3) { - "use strict"; - Object.defineProperty(exports3, "__esModule", { - value: true - }); - exports3.createCalendarObject = createCalendarObject; - exports3.updateCalendarObject = updateCalendarObject; - exports3.deleteCalendarObject = deleteCalendarObject; - exports3.syncCalendar = syncCalendar; - function _interopRequireWildcard(obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {}; - if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) - newObj[key] = obj[key]; + var matchs = split2(source, start); + var len = matchs.length; + if (len > 1 && /!doctype/i.test(matchs[0][0])) { + var name = matchs[1][0]; + var pubid = len > 3 && /^public$/i.test(matchs[2][0]) && matchs[3][0]; + var sysid = len > 4 && matchs[4][0]; + var lastMatch = matchs[len - 1]; + domBuilder.startDTD(name, pubid && pubid.replace(/^(['"])(.*?)\1$/, "$2"), sysid && sysid.replace(/^(['"])(.*?)\1$/, "$2")); + domBuilder.endDTD(); + return lastMatch.index + lastMatch[0].length; } + } + return -1; + } + function parseInstruction(source, start, domBuilder) { + var end = source.indexOf("?>", start); + if (end) { + var match2 = source.substring(start, end).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/); + if (match2) { + var len = match2[0].length; + domBuilder.processingInstruction(match2[1], match2[2]); + return end + 2; + } else { + return -1; } - newObj["default"] = obj; - return newObj; } + return -1; + } + function ElementAttributes(source) { + } + ElementAttributes.prototype = { + setTagName: function(tagName) { + if (!tagNamePattern.test(tagName)) { + throw new Error("invalid tagName:" + tagName); + } + this.tagName = tagName; + }, + add: function(qName, value, offset2) { + if (!tagNamePattern.test(qName)) { + throw new Error("invalid attribute:" + qName); + } + this[this.length++] = { qName, value, offset: offset2 }; + }, + length: 0, + getLocalName: function(i3) { + return this[i3].localName; + }, + getLocator: function(i3) { + return this[i3].locator; + }, + getQName: function(i3) { + return this[i3].qName; + }, + getURI: function(i3) { + return this[i3].uri; + }, + getValue: function(i3) { + return this[i3].value; + } + }; + function _set_proto_(thiz, parent) { + thiz.__proto__ = parent; + return thiz; } - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { "default": obj }; + if (!(_set_proto_({}, _set_proto_.prototype) instanceof _set_proto_)) { + _set_proto_ = function(thiz, parent) { + function p3() { + } + ; + p3.prototype = parent; + p3 = new p3(); + for (parent in thiz) { + p3[parent] = thiz[parent]; + } + return p3; + }; } - var _co = require2("co"); - var _co2 = _interopRequireDefault(_co); - var _url = require2("url"); - var _url2 = _interopRequireDefault(_url); - var _fuzzy_url_equals = require2("./fuzzy_url_equals"); - var _fuzzy_url_equals2 = _interopRequireDefault(_fuzzy_url_equals); - var _model = require2("./model"); - var _namespace = require2("./namespace"); - var ns2 = _interopRequireWildcard(_namespace); - var _request = require2("./request"); - var request3 = _interopRequireWildcard(_request); - var _webdav = require2("./webdav"); - var webdav = _interopRequireWildcard(_webdav); - var debug = require2("./debug")("dav:calendars"); - var ICAL_OBJS = new Set(["VEVENT", "VTODO", "VJOURNAL", "VFREEBUSY", "VTIMEZONE", "VALARM"]); - var listCalendars = _co2["default"].wrap(regeneratorRuntime.mark(function callee$0$0(account, options) { - var req, responses, cals; - return regeneratorRuntime.wrap(function callee$0$0$(context$1$0) { - while (1) - switch (context$1$0.prev = context$1$0.next) { - case 0: - debug("Fetch calendars from home url " + account.homeUrl); - req = request3.propfind({ - props: [{ name: "calendar-description", namespace: ns2.CALDAV }, { name: "calendar-timezone", namespace: ns2.CALDAV }, { name: "displayname", namespace: ns2.DAV }, { name: "getctag", namespace: ns2.CALENDAR_SERVER }, { name: "resourcetype", namespace: ns2.DAV }, { name: "supported-calendar-component-set", namespace: ns2.CALDAV }, { name: "sync-token", namespace: ns2.DAV }], - depth: 1 - }); - context$1$0.next = 4; - return options.xhr.send(req, account.homeUrl, { - sandbox: options.sandbox - }); - case 4: - responses = context$1$0.sent; - debug("Found " + responses.length + " calendars."); - cals = responses.filter(function(res) { - return res.props.resourcetype.includes("calendar"); - }).filter(function(res) { - var components = res.props.supportedCalendarComponentSet || []; - return components.reduce(function(hasObjs, component) { - return hasObjs || ICAL_OBJS.has(component); - }, false); - }).map(function(res) { - debug("Found calendar " + res.props.displayname + ",\n props: " + JSON.stringify(res.props)); - return new _model.Calendar({ - data: res, - account, - description: res.props.calendarDescription, - timezone: res.props.calendarTimezone, - url: _url2["default"].resolve(account.rootUrl, res.href), - ctag: res.props.getctag, - displayName: res.props.displayname, - components: res.props.supportedCalendarComponentSet, - resourcetype: res.props.resourcetype, - syncToken: res.props.syncToken - }); - }); - context$1$0.next = 9; - return cals.map(_co2["default"].wrap(regeneratorRuntime.mark(function callee$1$0(cal) { - return regeneratorRuntime.wrap(function callee$1$0$(context$2$0) { - while (1) - switch (context$2$0.prev = context$2$0.next) { - case 0: - context$2$0.next = 2; - return webdav.supportedReportSet(cal, options); - case 2: - cal.reports = context$2$0.sent; - case 3: - case "end": - return context$2$0.stop(); - } - }, callee$1$0, this); - }))); - case 9: - return context$1$0.abrupt("return", cals); - case 10: - case "end": - return context$1$0.stop(); - } - }, callee$0$0, this); - })); - exports3.listCalendars = listCalendars; - function createCalendarObject(calendar, options) { - var objectUrl = _url2["default"].resolve(calendar.url, options.filename); - options.contentType = options.contentType || "text/calendar; charset=utf-8"; - return webdav.createObject(objectUrl, options.data, options); + function split2(source, start) { + var match2; + var buf = []; + var reg = /'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g; + reg.lastIndex = start; + reg.exec(source); + while (match2 = reg.exec(source)) { + buf.push(match2); + if (match2[1]) + return buf; + } } - ; - function updateCalendarObject(calendarObject, options) { - options.contentType = options.contentType || "text/calendar; charset=utf-8"; - return webdav.updateObject(calendarObject.url, calendarObject.calendarData, calendarObject.etag, options); + exports3.XMLReader = XMLReader; + }, {}], 33: [function(require2, module4, exports3) { + module4.exports = { + "name": "dav", + "version": "1.8.0", + "author": "Gareth Aye [:gaye] ", + "description": "WebDAV, CalDAV, and CardDAV client for nodejs and the browser", + "license": "MPL-2.0", + "main": "./dav.js", + "repository": "https://github.com/gaye/dav", + "keywords": [ + "address book", + "calendar", + "contacts", + "dav", + "caldav", + "carddav", + "webdav", + "ical", + "vcard", + "sync", + "rfc 4791", + "rfc 6352", + "rfc 6578" + ], + "dependencies": { + "co": "^4.6.0", + "xmldom": "^0.1.19", + "xmlhttprequest": "^1.7.0" + }, + "devDependencies": { + "babel": "^5.8.23", + "browserify": "^11.0.1", + "chai": "^3.2.0", + "doctoc": "^0.15.0", + "mocha": "^2.3.2", + "nock": "^2.10.0", + "sinon": "^1.16.1", + "tcp-port-used": "^0.1.2", + "uglify-js": "^2.4.24" + }, + "scripts": { + "test": "make test" + } + }; + }, {}] }, {}, [8])(8); + }); + } +}); + +// node_modules/co/index.js +var require_co = __commonJS({ + "node_modules/co/index.js"(exports, module2) { + var slice = Array.prototype.slice; + module2.exports = co2["default"] = co2.co = co2; + co2.wrap = function(fn) { + createPromise.__generatorFunction__ = fn; + return createPromise; + function createPromise() { + return co2.call(this, fn.apply(this, arguments)); + } + }; + function co2(gen) { + var ctx = this; + var args = slice.call(arguments, 1); + return new Promise(function(resolve, reject) { + if (typeof gen === "function") + gen = gen.apply(ctx, args); + if (!gen || typeof gen.next !== "function") + return resolve(gen); + onFulfilled(); + function onFulfilled(res) { + var ret; + try { + ret = gen.next(res); + } catch (e3) { + return reject(e3); + } + next(ret); } - function deleteCalendarObject(calendarObject, options) { - return webdav.deleteObject(calendarObject.url, calendarObject.etag, options); + function onRejected(err) { + var ret; + try { + ret = gen.throw(err); + } catch (e3) { + return reject(e3); + } + next(ret); } - var listCalendarObjects2 = _co2["default"].wrap(regeneratorRuntime.mark(function callee$0$0(calendar, options) { - var filters, req, responses; - return regeneratorRuntime.wrap(function callee$0$0$(context$1$0) { - while (1) - switch (context$1$0.prev = context$1$0.next) { - case 0: - debug("Doing REPORT on calendar " + calendar.url + " which belongs to\n " + calendar.account.credentials.username); - filters = options.filters || [{ - type: "comp-filter", - attrs: { name: "VCALENDAR" }, - children: [{ - type: "comp-filter", - attrs: { name: "VEVENT" } - }] - }]; - req = request3.calendarQuery({ - depth: 1, - props: [{ name: "getetag", namespace: ns2.DAV }, { name: "calendar-data", namespace: ns2.CALDAV }], - filters - }); - context$1$0.next = 5; - return options.xhr.send(req, calendar.url, { - sandbox: options.sandbox - }); - case 5: - responses = context$1$0.sent; - return context$1$0.abrupt("return", responses.map(function(res) { - debug("Found calendar object with url " + res.href); - return new _model.CalendarObject({ - data: res, - calendar, - url: _url2["default"].resolve(calendar.account.rootUrl, res.href), - etag: res.props.getetag, - calendarData: res.props.calendarData - }); - })); - case 7: - case "end": - return context$1$0.stop(); - } - }, callee$0$0, this); - })); - exports3.listCalendarObjects = listCalendarObjects2; - function syncCalendar(calendar, options) { - options.basicSync = basicSync; - options.webdavSync = webdavSync; - return webdav.syncCollection(calendar, options); + function next(ret) { + if (ret.done) + return resolve(ret.value); + var value = toPromise.call(ctx, ret.value); + if (value && isPromise(value)) + return value.then(onFulfilled, onRejected); + return onRejected(new TypeError('You may only yield a function, promise, generator, array, or object, but the following object was passed: "' + String(ret.value) + '"')); } - var syncCaldavAccount = _co2["default"].wrap(regeneratorRuntime.mark(function callee$0$0(account) { - var options = arguments.length <= 1 || arguments[1] === void 0 ? {} : arguments[1]; - var cals; - return regeneratorRuntime.wrap(function callee$0$0$(context$1$0) { - while (1) - switch (context$1$0.prev = context$1$0.next) { - case 0: - options.loadObjects = false; - if (!account.calendars) - account.calendars = []; - context$1$0.next = 4; - return listCalendars(account, options); - case 4: - cals = context$1$0.sent; - cals.filter(function(cal) { - return account.calendars.every(function(prev) { - return !(0, _fuzzy_url_equals2["default"])(prev.url, cal.url); - }); - }).forEach(function(cal) { - account.calendars.push(cal); - }); - options.loadObjects = true; - context$1$0.next = 9; - return account.calendars.map(_co2["default"].wrap(regeneratorRuntime.mark(function callee$1$0(cal, index) { - return regeneratorRuntime.wrap(function callee$1$0$(context$2$0) { - while (1) - switch (context$2$0.prev = context$2$0.next) { - case 0: - context$2$0.prev = 0; - context$2$0.next = 3; - return syncCalendar(cal, options); - case 3: - context$2$0.next = 9; - break; - case 5: - context$2$0.prev = 5; - context$2$0.t0 = context$2$0["catch"](0); - debug("Sync calendar " + cal.displayName + " failed with " + context$2$0.t0); - account.calendars.splice(index, 1); - case 9: - case "end": - return context$2$0.stop(); - } - }, callee$1$0, this, [[0, 5]]); - }))); - case 9: - return context$1$0.abrupt("return", account); - case 10: - case "end": - return context$1$0.stop(); - } - }, callee$0$0, this); - })); - exports3.syncCaldavAccount = syncCaldavAccount; - var basicSync = _co2["default"].wrap(regeneratorRuntime.mark(function callee$0$0(calendar, options) { - var sync; - return regeneratorRuntime.wrap(function callee$0$0$(context$1$0) { - while (1) - switch (context$1$0.prev = context$1$0.next) { - case 0: - context$1$0.next = 2; - return webdav.isCollectionDirty(calendar, options); - case 2: - sync = context$1$0.sent; - if (sync) { - context$1$0.next = 6; - break; - } - debug("Local ctag matched remote! No need to sync :)."); - return context$1$0.abrupt("return", calendar); - case 6: - debug("ctag changed so we need to fetch stuffs."); - context$1$0.next = 9; - return listCalendarObjects2(calendar, options); - case 9: - calendar.objects = context$1$0.sent; - return context$1$0.abrupt("return", calendar); - case 11: - case "end": - return context$1$0.stop(); - } - }, callee$0$0, this); + }); + } + function toPromise(obj) { + if (!obj) + return obj; + if (isPromise(obj)) + return obj; + if (isGeneratorFunction(obj) || isGenerator(obj)) + return co2.call(this, obj); + if (typeof obj == "function") + return thunkToPromise.call(this, obj); + if (Array.isArray(obj)) + return arrayToPromise.call(this, obj); + if (isObject(obj)) + return objectToPromise.call(this, obj); + return obj; + } + function thunkToPromise(fn) { + var ctx = this; + return new Promise(function(resolve, reject) { + fn.call(ctx, function(err, res) { + if (err) + return reject(err); + if (arguments.length > 2) + res = slice.call(arguments, 1); + resolve(res); + }); + }); + } + function arrayToPromise(obj) { + return Promise.all(obj.map(toPromise, this)); + } + function objectToPromise(obj) { + var results = new obj.constructor(); + var keys = Object.keys(obj); + var promises = []; + for (var i3 = 0; i3 < keys.length; i3++) { + var key = keys[i3]; + var promise = toPromise.call(this, obj[key]); + if (promise && isPromise(promise)) + defer(promise, key); + else + results[key] = obj[key]; + } + return Promise.all(promises).then(function() { + return results; + }); + function defer(promise2, key2) { + results[key2] = void 0; + promises.push(promise2.then(function(res) { + results[key2] = res; })); - var webdavSync = _co2["default"].wrap(regeneratorRuntime.mark(function callee$0$0(calendar, options) { - var req, result; - return regeneratorRuntime.wrap(function callee$0$0$(context$1$0) { - while (1) - switch (context$1$0.prev = context$1$0.next) { - case 0: - req = request3.syncCollection({ - props: [{ name: "getetag", namespace: ns2.DAV }, { name: "calendar-data", namespace: ns2.CALDAV }], - syncLevel: 1, - syncToken: calendar.syncToken - }); - context$1$0.next = 3; - return options.xhr.send(req, calendar.url, { - sandbox: options.sandbox - }); - case 3: - result = context$1$0.sent; - result.responses.forEach(function(response) { - var calendarObject = calendar.objects.filter(function(object) { - return (0, _fuzzy_url_equals2["default"])(object.url, response.href); - })[0]; - if (!calendarObject) { - return; - } - calendarObject.etag = response.props.getetag; - calendarObject.calendarData = response.props.calendarData; - }); - calendar.syncToken = result.syncToken; - return context$1$0.abrupt("return", calendar); - case 7: - case "end": - return context$1$0.stop(); + } + } + function isPromise(obj) { + return typeof obj.then == "function"; + } + function isGenerator(obj) { + return typeof obj.next == "function" && typeof obj.throw == "function"; + } + function isGeneratorFunction(obj) { + var constructor = obj.constructor; + if (!constructor) + return false; + if (constructor.name === "GeneratorFunction" || constructor.displayName === "GeneratorFunction") + return true; + return isGenerator(constructor.prototype); + } + function isObject(val) { + return Object == val.constructor; + } + } +}); + +// node_modules/object-keys/isArguments.js +var require_isArguments = __commonJS({ + "node_modules/object-keys/isArguments.js"(exports, module2) { + "use strict"; + var toStr = Object.prototype.toString; + module2.exports = function isArguments(value) { + var str = toStr.call(value); + var isArgs = str === "[object Arguments]"; + if (!isArgs) { + isArgs = str !== "[object Array]" && value !== null && typeof value === "object" && typeof value.length === "number" && value.length >= 0 && toStr.call(value.callee) === "[object Function]"; + } + return isArgs; + }; + } +}); + +// node_modules/object-keys/implementation.js +var require_implementation = __commonJS({ + "node_modules/object-keys/implementation.js"(exports, module2) { + "use strict"; + var keysShim; + if (!Object.keys) { + has = Object.prototype.hasOwnProperty; + toStr = Object.prototype.toString; + isArgs = require_isArguments(); + isEnumerable = Object.prototype.propertyIsEnumerable; + hasDontEnumBug = !isEnumerable.call({ toString: null }, "toString"); + hasProtoEnumBug = isEnumerable.call(function() { + }, "prototype"); + dontEnums = [ + "toString", + "toLocaleString", + "valueOf", + "hasOwnProperty", + "isPrototypeOf", + "propertyIsEnumerable", + "constructor" + ]; + equalsConstructorPrototype = function(o2) { + var ctor = o2.constructor; + return ctor && ctor.prototype === o2; + }; + excludedKeys = { + $applicationCache: true, + $console: true, + $external: true, + $frame: true, + $frameElement: true, + $frames: true, + $innerHeight: true, + $innerWidth: true, + $onmozfullscreenchange: true, + $onmozfullscreenerror: true, + $outerHeight: true, + $outerWidth: true, + $pageXOffset: true, + $pageYOffset: true, + $parent: true, + $scrollLeft: true, + $scrollTop: true, + $scrollX: true, + $scrollY: true, + $self: true, + $webkitIndexedDB: true, + $webkitStorageInfo: true, + $window: true + }; + hasAutomationEqualityBug = function() { + if (typeof window === "undefined") { + return false; + } + for (var k3 in window) { + try { + if (!excludedKeys["$" + k3] && has.call(window, k3) && window[k3] !== null && typeof window[k3] === "object") { + try { + equalsConstructorPrototype(window[k3]); + } catch (e3) { + return true; } - }, callee$0$0, this); - })); - }, { "./debug": 6, "./fuzzy_url_equals": 7, "./model": 9, "./namespace": 10, "./request": 12, "./webdav": 22, "co": 24, "url": 29 }], 3: [function(require2, module4, exports3) { - "use strict"; - Object.defineProperty(exports3, "__esModule", { - value: true - }); - exports3["default"] = camelize; - function camelize(str) { - var delimiter = arguments.length <= 1 || arguments[1] === void 0 ? "_" : arguments[1]; - var words = str.split(delimiter); - return [words[0]].concat(words.slice(1).map(function(word) { - return word.charAt(0).toUpperCase() + word.slice(1); - })).join(""); + } + } catch (e3) { + return true; + } } - module4.exports = exports3["default"]; - }, {}], 4: [function(require2, module4, exports3) { - "use strict"; - Object.defineProperty(exports3, "__esModule", { - value: true - }); - var _createClass = function() { - function defineProperties(target, props) { - for (var i3 = 0; i3 < props.length; i3++) { - var descriptor = props[i3]; - descriptor.enumerable = descriptor.enumerable || false; - descriptor.configurable = true; - if ("value" in descriptor) - descriptor.writable = true; - Object.defineProperty(target, descriptor.key, descriptor); + return false; + }(); + equalsConstructorPrototypeIfNotBuggy = function(o2) { + if (typeof window === "undefined" || !hasAutomationEqualityBug) { + return equalsConstructorPrototype(o2); + } + try { + return equalsConstructorPrototype(o2); + } catch (e3) { + return false; + } + }; + keysShim = function keys(object) { + var isObject = object !== null && typeof object === "object"; + var isFunction = toStr.call(object) === "[object Function]"; + var isArguments = isArgs(object); + var isString2 = isObject && toStr.call(object) === "[object String]"; + var theKeys = []; + if (!isObject && !isFunction && !isArguments) { + throw new TypeError("Object.keys called on a non-object"); + } + var skipProto = hasProtoEnumBug && isFunction; + if (isString2 && object.length > 0 && !has.call(object, 0)) { + for (var i3 = 0; i3 < object.length; ++i3) { + theKeys.push(String(i3)); + } + } + if (isArguments && object.length > 0) { + for (var j4 = 0; j4 < object.length; ++j4) { + theKeys.push(String(j4)); + } + } else { + for (var name in object) { + if (!(skipProto && name === "prototype") && has.call(object, name)) { + theKeys.push(String(name)); } } - return function(Constructor, protoProps, staticProps) { - if (protoProps) - defineProperties(Constructor.prototype, protoProps); - if (staticProps) - defineProperties(Constructor, staticProps); - return Constructor; - }; - }(); - function _interopRequireWildcard(obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {}; - if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) - newObj[key] = obj[key]; - } + } + if (hasDontEnumBug) { + var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object); + for (var k3 = 0; k3 < dontEnums.length; ++k3) { + if (!(skipConstructor && dontEnums[k3] === "constructor") && has.call(object, dontEnums[k3])) { + theKeys.push(dontEnums[k3]); } - newObj["default"] = obj; - return newObj; } } - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { "default": obj }; + return theKeys; + }; + } + var has; + var toStr; + var isArgs; + var isEnumerable; + var hasDontEnumBug; + var hasProtoEnumBug; + var dontEnums; + var equalsConstructorPrototype; + var excludedKeys; + var hasAutomationEqualityBug; + var equalsConstructorPrototypeIfNotBuggy; + module2.exports = keysShim; + } +}); + +// node_modules/object-keys/index.js +var require_object_keys = __commonJS({ + "node_modules/object-keys/index.js"(exports, module2) { + "use strict"; + var slice = Array.prototype.slice; + var isArgs = require_isArguments(); + var origKeys = Object.keys; + var keysShim = origKeys ? function keys(o2) { + return origKeys(o2); + } : require_implementation(); + var originalKeys = Object.keys; + keysShim.shim = function shimObjectKeys() { + if (Object.keys) { + var keysWorksWithArguments = function() { + var args = Object.keys(arguments); + return args && args.length === arguments.length; + }(1, 2); + if (!keysWorksWithArguments) { + Object.keys = function keys(object) { + if (isArgs(object)) { + return originalKeys(slice.call(object)); + } + return originalKeys(object); + }; } - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); + } else { + Object.keys = keysShim; + } + return Object.keys || keysShim; + }; + module2.exports = keysShim; + } +}); + +// node_modules/has-symbols/shams.js +var require_shams = __commonJS({ + "node_modules/has-symbols/shams.js"(exports, module2) { + "use strict"; + module2.exports = function hasSymbols() { + if (typeof Symbol !== "function" || typeof Object.getOwnPropertySymbols !== "function") { + return false; + } + if (typeof Symbol.iterator === "symbol") { + return true; + } + var obj = {}; + var sym = Symbol("test"); + var symObj = Object(sym); + if (typeof sym === "string") { + return false; + } + if (Object.prototype.toString.call(sym) !== "[object Symbol]") { + return false; + } + if (Object.prototype.toString.call(symObj) !== "[object Symbol]") { + return false; + } + var symVal = 42; + obj[sym] = symVal; + for (sym in obj) { + return false; + } + if (typeof Object.keys === "function" && Object.keys(obj).length !== 0) { + return false; + } + if (typeof Object.getOwnPropertyNames === "function" && Object.getOwnPropertyNames(obj).length !== 0) { + return false; + } + var syms = Object.getOwnPropertySymbols(obj); + if (syms.length !== 1 || syms[0] !== sym) { + return false; + } + if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { + return false; + } + if (typeof Object.getOwnPropertyDescriptor === "function") { + var descriptor = Object.getOwnPropertyDescriptor(obj, sym); + if (descriptor.value !== symVal || descriptor.enumerable !== true) { + return false; + } + } + return true; + }; + } +}); + +// node_modules/has-symbols/index.js +var require_has_symbols = __commonJS({ + "node_modules/has-symbols/index.js"(exports, module2) { + "use strict"; + var origSymbol = typeof Symbol !== "undefined" && Symbol; + var hasSymbolSham = require_shams(); + module2.exports = function hasNativeSymbols() { + if (typeof origSymbol !== "function") { + return false; + } + if (typeof Symbol !== "function") { + return false; + } + if (typeof origSymbol("foo") !== "symbol") { + return false; + } + if (typeof Symbol("bar") !== "symbol") { + return false; + } + return hasSymbolSham(); + }; + } +}); + +// node_modules/function-bind/implementation.js +var require_implementation2 = __commonJS({ + "node_modules/function-bind/implementation.js"(exports, module2) { + "use strict"; + var ERROR_MESSAGE = "Function.prototype.bind called on incompatible "; + var slice = Array.prototype.slice; + var toStr = Object.prototype.toString; + var funcType = "[object Function]"; + module2.exports = function bind(that) { + var target = this; + if (typeof target !== "function" || toStr.call(target) !== funcType) { + throw new TypeError(ERROR_MESSAGE + target); + } + var args = slice.call(arguments, 1); + var bound; + var binder = function() { + if (this instanceof bound) { + var result = target.apply(this, args.concat(slice.call(arguments))); + if (Object(result) === result) { + return result; } + return this; + } else { + return target.apply(that, args.concat(slice.call(arguments))); } - var _url = require2("url"); - var _url2 = _interopRequireDefault(_url); - var _accounts = require2("./accounts"); - var accounts = _interopRequireWildcard(_accounts); - var _calendars = require2("./calendars"); - var calendars = _interopRequireWildcard(_calendars); - var _contacts = require2("./contacts"); - var contacts = _interopRequireWildcard(_contacts); - var Client = function() { - function Client2(xhr) { - var options = arguments.length <= 1 || arguments[1] === void 0 ? {} : arguments[1]; - _classCallCheck(this, Client2); - this.xhr = xhr; - Object.assign(this, options); - this._accounts = accounts; - this._calendars = calendars; - this._contacts = contacts; + }; + var boundLength = Math.max(0, target.length - args.length); + var boundArgs = []; + for (var i3 = 0; i3 < boundLength; i3++) { + boundArgs.push("$" + i3); + } + bound = Function("binder", "return function (" + boundArgs.join(",") + "){ return binder.apply(this,arguments); }")(binder); + if (target.prototype) { + var Empty = function Empty2() { + }; + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + Empty.prototype = null; + } + return bound; + }; + } +}); + +// node_modules/function-bind/index.js +var require_function_bind = __commonJS({ + "node_modules/function-bind/index.js"(exports, module2) { + "use strict"; + var implementation = require_implementation2(); + module2.exports = Function.prototype.bind || implementation; + } +}); + +// node_modules/has/src/index.js +var require_src = __commonJS({ + "node_modules/has/src/index.js"(exports, module2) { + "use strict"; + var bind = require_function_bind(); + module2.exports = bind.call(Function.call, Object.prototype.hasOwnProperty); + } +}); + +// node_modules/get-intrinsic/index.js +var require_get_intrinsic = __commonJS({ + "node_modules/get-intrinsic/index.js"(exports, module2) { + "use strict"; + var undefined2; + var $SyntaxError = SyntaxError; + var $Function = Function; + var $TypeError = TypeError; + var getEvalledConstructor = function(expressionSyntax) { + try { + return $Function('"use strict"; return (' + expressionSyntax + ").constructor;")(); + } catch (e3) { + } + }; + var $gOPD = Object.getOwnPropertyDescriptor; + if ($gOPD) { + try { + $gOPD({}, ""); + } catch (e3) { + $gOPD = null; + } + } + var throwTypeError = function() { + throw new $TypeError(); + }; + var ThrowTypeError = $gOPD ? function() { + try { + arguments.callee; + return throwTypeError; + } catch (calleeThrows) { + try { + return $gOPD(arguments, "callee").get; + } catch (gOPDthrows) { + return throwTypeError; + } + } + }() : throwTypeError; + var hasSymbols = require_has_symbols()(); + var getProto = Object.getPrototypeOf || function(x3) { + return x3.__proto__; + }; + var needsEval = {}; + var TypedArray = typeof Uint8Array === "undefined" ? undefined2 : getProto(Uint8Array); + var INTRINSICS = { + "%AggregateError%": typeof AggregateError === "undefined" ? undefined2 : AggregateError, + "%Array%": Array, + "%ArrayBuffer%": typeof ArrayBuffer === "undefined" ? undefined2 : ArrayBuffer, + "%ArrayIteratorPrototype%": hasSymbols ? getProto([][Symbol.iterator]()) : undefined2, + "%AsyncFromSyncIteratorPrototype%": undefined2, + "%AsyncFunction%": needsEval, + "%AsyncGenerator%": needsEval, + "%AsyncGeneratorFunction%": needsEval, + "%AsyncIteratorPrototype%": needsEval, + "%Atomics%": typeof Atomics === "undefined" ? undefined2 : Atomics, + "%BigInt%": typeof BigInt === "undefined" ? undefined2 : BigInt, + "%BigInt64Array%": typeof BigInt64Array === "undefined" ? undefined2 : BigInt64Array, + "%BigUint64Array%": typeof BigUint64Array === "undefined" ? undefined2 : BigUint64Array, + "%Boolean%": Boolean, + "%DataView%": typeof DataView === "undefined" ? undefined2 : DataView, + "%Date%": Date, + "%decodeURI%": decodeURI, + "%decodeURIComponent%": decodeURIComponent, + "%encodeURI%": encodeURI, + "%encodeURIComponent%": encodeURIComponent, + "%Error%": Error, + "%eval%": eval, + "%EvalError%": EvalError, + "%Float32Array%": typeof Float32Array === "undefined" ? undefined2 : Float32Array, + "%Float64Array%": typeof Float64Array === "undefined" ? undefined2 : Float64Array, + "%FinalizationRegistry%": typeof FinalizationRegistry === "undefined" ? undefined2 : FinalizationRegistry, + "%Function%": $Function, + "%GeneratorFunction%": needsEval, + "%Int8Array%": typeof Int8Array === "undefined" ? undefined2 : Int8Array, + "%Int16Array%": typeof Int16Array === "undefined" ? undefined2 : Int16Array, + "%Int32Array%": typeof Int32Array === "undefined" ? undefined2 : Int32Array, + "%isFinite%": isFinite, + "%isNaN%": isNaN, + "%IteratorPrototype%": hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined2, + "%JSON%": typeof JSON === "object" ? JSON : undefined2, + "%Map%": typeof Map === "undefined" ? undefined2 : Map, + "%MapIteratorPrototype%": typeof Map === "undefined" || !hasSymbols ? undefined2 : getProto(new Map()[Symbol.iterator]()), + "%Math%": Math, + "%Number%": Number, + "%Object%": Object, + "%parseFloat%": parseFloat, + "%parseInt%": parseInt, + "%Promise%": typeof Promise === "undefined" ? undefined2 : Promise, + "%Proxy%": typeof Proxy === "undefined" ? undefined2 : Proxy, + "%RangeError%": RangeError, + "%ReferenceError%": ReferenceError, + "%Reflect%": typeof Reflect === "undefined" ? undefined2 : Reflect, + "%RegExp%": RegExp, + "%Set%": typeof Set === "undefined" ? undefined2 : Set, + "%SetIteratorPrototype%": typeof Set === "undefined" || !hasSymbols ? undefined2 : getProto(new Set()[Symbol.iterator]()), + "%SharedArrayBuffer%": typeof SharedArrayBuffer === "undefined" ? undefined2 : SharedArrayBuffer, + "%String%": String, + "%StringIteratorPrototype%": hasSymbols ? getProto(""[Symbol.iterator]()) : undefined2, + "%Symbol%": hasSymbols ? Symbol : undefined2, + "%SyntaxError%": $SyntaxError, + "%ThrowTypeError%": ThrowTypeError, + "%TypedArray%": TypedArray, + "%TypeError%": $TypeError, + "%Uint8Array%": typeof Uint8Array === "undefined" ? undefined2 : Uint8Array, + "%Uint8ClampedArray%": typeof Uint8ClampedArray === "undefined" ? undefined2 : Uint8ClampedArray, + "%Uint16Array%": typeof Uint16Array === "undefined" ? undefined2 : Uint16Array, + "%Uint32Array%": typeof Uint32Array === "undefined" ? undefined2 : Uint32Array, + "%URIError%": URIError, + "%WeakMap%": typeof WeakMap === "undefined" ? undefined2 : WeakMap, + "%WeakRef%": typeof WeakRef === "undefined" ? undefined2 : WeakRef, + "%WeakSet%": typeof WeakSet === "undefined" ? undefined2 : WeakSet + }; + try { + null.error; + } catch (e3) { + errorProto = getProto(getProto(e3)); + INTRINSICS["%Error.prototype%"] = errorProto; + } + var errorProto; + var doEval = function doEval2(name) { + var value; + if (name === "%AsyncFunction%") { + value = getEvalledConstructor("async function () {}"); + } else if (name === "%GeneratorFunction%") { + value = getEvalledConstructor("function* () {}"); + } else if (name === "%AsyncGeneratorFunction%") { + value = getEvalledConstructor("async function* () {}"); + } else if (name === "%AsyncGenerator%") { + var fn = doEval2("%AsyncGeneratorFunction%"); + if (fn) { + value = fn.prototype; + } + } else if (name === "%AsyncIteratorPrototype%") { + var gen = doEval2("%AsyncGenerator%"); + if (gen) { + value = getProto(gen.prototype); + } + } + INTRINSICS[name] = value; + return value; + }; + var LEGACY_ALIASES = { + "%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"], + "%ArrayPrototype%": ["Array", "prototype"], + "%ArrayProto_entries%": ["Array", "prototype", "entries"], + "%ArrayProto_forEach%": ["Array", "prototype", "forEach"], + "%ArrayProto_keys%": ["Array", "prototype", "keys"], + "%ArrayProto_values%": ["Array", "prototype", "values"], + "%AsyncFunctionPrototype%": ["AsyncFunction", "prototype"], + "%AsyncGenerator%": ["AsyncGeneratorFunction", "prototype"], + "%AsyncGeneratorPrototype%": ["AsyncGeneratorFunction", "prototype", "prototype"], + "%BooleanPrototype%": ["Boolean", "prototype"], + "%DataViewPrototype%": ["DataView", "prototype"], + "%DatePrototype%": ["Date", "prototype"], + "%ErrorPrototype%": ["Error", "prototype"], + "%EvalErrorPrototype%": ["EvalError", "prototype"], + "%Float32ArrayPrototype%": ["Float32Array", "prototype"], + "%Float64ArrayPrototype%": ["Float64Array", "prototype"], + "%FunctionPrototype%": ["Function", "prototype"], + "%Generator%": ["GeneratorFunction", "prototype"], + "%GeneratorPrototype%": ["GeneratorFunction", "prototype", "prototype"], + "%Int8ArrayPrototype%": ["Int8Array", "prototype"], + "%Int16ArrayPrototype%": ["Int16Array", "prototype"], + "%Int32ArrayPrototype%": ["Int32Array", "prototype"], + "%JSONParse%": ["JSON", "parse"], + "%JSONStringify%": ["JSON", "stringify"], + "%MapPrototype%": ["Map", "prototype"], + "%NumberPrototype%": ["Number", "prototype"], + "%ObjectPrototype%": ["Object", "prototype"], + "%ObjProto_toString%": ["Object", "prototype", "toString"], + "%ObjProto_valueOf%": ["Object", "prototype", "valueOf"], + "%PromisePrototype%": ["Promise", "prototype"], + "%PromiseProto_then%": ["Promise", "prototype", "then"], + "%Promise_all%": ["Promise", "all"], + "%Promise_reject%": ["Promise", "reject"], + "%Promise_resolve%": ["Promise", "resolve"], + "%RangeErrorPrototype%": ["RangeError", "prototype"], + "%ReferenceErrorPrototype%": ["ReferenceError", "prototype"], + "%RegExpPrototype%": ["RegExp", "prototype"], + "%SetPrototype%": ["Set", "prototype"], + "%SharedArrayBufferPrototype%": ["SharedArrayBuffer", "prototype"], + "%StringPrototype%": ["String", "prototype"], + "%SymbolPrototype%": ["Symbol", "prototype"], + "%SyntaxErrorPrototype%": ["SyntaxError", "prototype"], + "%TypedArrayPrototype%": ["TypedArray", "prototype"], + "%TypeErrorPrototype%": ["TypeError", "prototype"], + "%Uint8ArrayPrototype%": ["Uint8Array", "prototype"], + "%Uint8ClampedArrayPrototype%": ["Uint8ClampedArray", "prototype"], + "%Uint16ArrayPrototype%": ["Uint16Array", "prototype"], + "%Uint32ArrayPrototype%": ["Uint32Array", "prototype"], + "%URIErrorPrototype%": ["URIError", "prototype"], + "%WeakMapPrototype%": ["WeakMap", "prototype"], + "%WeakSetPrototype%": ["WeakSet", "prototype"] + }; + var bind = require_function_bind(); + var hasOwn = require_src(); + var $concat = bind.call(Function.call, Array.prototype.concat); + var $spliceApply = bind.call(Function.apply, Array.prototype.splice); + var $replace = bind.call(Function.call, String.prototype.replace); + var $strSlice = bind.call(Function.call, String.prototype.slice); + var $exec = bind.call(Function.call, RegExp.prototype.exec); + var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; + var reEscapeChar = /\\(\\)?/g; + var stringToPath = function stringToPath2(string) { + var first = $strSlice(string, 0, 1); + var last = $strSlice(string, -1); + if (first === "%" && last !== "%") { + throw new $SyntaxError("invalid intrinsic syntax, expected closing `%`"); + } else if (last === "%" && first !== "%") { + throw new $SyntaxError("invalid intrinsic syntax, expected opening `%`"); + } + var result = []; + $replace(string, rePropName, function(match2, number, quote, subString) { + result[result.length] = quote ? $replace(subString, reEscapeChar, "$1") : number || match2; + }); + return result; + }; + var getBaseIntrinsic = function getBaseIntrinsic2(name, allowMissing) { + var intrinsicName = name; + var alias; + if (hasOwn(LEGACY_ALIASES, intrinsicName)) { + alias = LEGACY_ALIASES[intrinsicName]; + intrinsicName = "%" + alias[0] + "%"; + } + if (hasOwn(INTRINSICS, intrinsicName)) { + var value = INTRINSICS[intrinsicName]; + if (value === needsEval) { + value = doEval(intrinsicName); + } + if (typeof value === "undefined" && !allowMissing) { + throw new $TypeError("intrinsic " + name + " exists, but is not available. Please file an issue!"); + } + return { + alias, + name: intrinsicName, + value + }; + } + throw new $SyntaxError("intrinsic " + name + " does not exist!"); + }; + module2.exports = function GetIntrinsic(name, allowMissing) { + if (typeof name !== "string" || name.length === 0) { + throw new $TypeError("intrinsic name must be a non-empty string"); + } + if (arguments.length > 1 && typeof allowMissing !== "boolean") { + throw new $TypeError('"allowMissing" argument must be a boolean'); + } + if ($exec(/^%?[^%]*%?$/, name) === null) { + throw new $SyntaxError("`%` may not be present anywhere but at the beginning and end of the intrinsic name"); + } + var parts = stringToPath(name); + var intrinsicBaseName = parts.length > 0 ? parts[0] : ""; + var intrinsic = getBaseIntrinsic("%" + intrinsicBaseName + "%", allowMissing); + var intrinsicRealName = intrinsic.name; + var value = intrinsic.value; + var skipFurtherCaching = false; + var alias = intrinsic.alias; + if (alias) { + intrinsicBaseName = alias[0]; + $spliceApply(parts, $concat([0, 1], alias)); + } + for (var i3 = 1, isOwn = true; i3 < parts.length; i3 += 1) { + var part = parts[i3]; + var first = $strSlice(part, 0, 1); + var last = $strSlice(part, -1); + if ((first === '"' || first === "'" || first === "`" || (last === '"' || last === "'" || last === "`")) && first !== last) { + throw new $SyntaxError("property names with quotes must have matching quotes"); + } + if (part === "constructor" || !isOwn) { + skipFurtherCaching = true; + } + intrinsicBaseName += "." + part; + intrinsicRealName = "%" + intrinsicBaseName + "%"; + if (hasOwn(INTRINSICS, intrinsicRealName)) { + value = INTRINSICS[intrinsicRealName]; + } else if (value != null) { + if (!(part in value)) { + if (!allowMissing) { + throw new $TypeError("base intrinsic for " + name + " exists, but the property is not available."); + } + return void 0; } - _createClass(Client2, [{ - key: "send", - value: function send(req, uri, options) { - if (this.baseUrl) { - var urlObj = _url2["default"].parse(uri); - uri = _url2["default"].resolve(this.baseUrl, urlObj.path); - } - return this.xhr.send(req, uri, options); + if ($gOPD && i3 + 1 >= parts.length) { + var desc = $gOPD(value, part); + isOwn = !!desc; + if (isOwn && "get" in desc && !("originalValue" in desc.get)) { + value = desc.get; + } else { + value = value[part]; } - }, { - key: "createAccount", - value: function createAccount2() { - var options = arguments.length <= 0 || arguments[0] === void 0 ? {} : arguments[0]; - options.xhr = options.xhr || this.xhr; - return accounts.createAccount(options); + } else { + isOwn = hasOwn(value, part); + value = value[part]; + } + if (isOwn && !skipFurtherCaching) { + INTRINSICS[intrinsicRealName] = value; + } + } + } + return value; + }; + } +}); + +// node_modules/has-property-descriptors/index.js +var require_has_property_descriptors = __commonJS({ + "node_modules/has-property-descriptors/index.js"(exports, module2) { + "use strict"; + var GetIntrinsic = require_get_intrinsic(); + var $defineProperty = GetIntrinsic("%Object.defineProperty%", true); + var hasPropertyDescriptors = function hasPropertyDescriptors2() { + if ($defineProperty) { + try { + $defineProperty({}, "a", { value: 1 }); + return true; + } catch (e3) { + return false; + } + } + return false; + }; + hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() { + if (!hasPropertyDescriptors()) { + return null; + } + try { + return $defineProperty([], "length", { value: 1 }).length !== 1; + } catch (e3) { + return true; + } + }; + module2.exports = hasPropertyDescriptors; + } +}); + +// node_modules/define-properties/index.js +var require_define_properties = __commonJS({ + "node_modules/define-properties/index.js"(exports, module2) { + "use strict"; + var keys = require_object_keys(); + var hasSymbols = typeof Symbol === "function" && typeof Symbol("foo") === "symbol"; + var toStr = Object.prototype.toString; + var concat = Array.prototype.concat; + var origDefineProperty = Object.defineProperty; + var isFunction = function(fn) { + return typeof fn === "function" && toStr.call(fn) === "[object Function]"; + }; + var hasPropertyDescriptors = require_has_property_descriptors()(); + var supportsDescriptors = origDefineProperty && hasPropertyDescriptors; + var defineProperty = function(object, name, value, predicate) { + if (name in object) { + if (predicate === true) { + if (object[name] === value) { + return; + } + } else if (!isFunction(predicate) || !predicate()) { + return; + } + } + if (supportsDescriptors) { + origDefineProperty(object, name, { + configurable: true, + enumerable: false, + value, + writable: true + }); + } else { + object[name] = value; + } + }; + var defineProperties = function(object, map) { + var predicates = arguments.length > 2 ? arguments[2] : {}; + var props = keys(map); + if (hasSymbols) { + props = concat.call(props, Object.getOwnPropertySymbols(map)); + } + for (var i3 = 0; i3 < props.length; i3 += 1) { + defineProperty(object, props[i3], map[props[i3]], predicates[props[i3]]); + } + }; + defineProperties.supportsDescriptors = !!supportsDescriptors; + module2.exports = defineProperties; + } +}); + +// node_modules/call-bind/index.js +var require_call_bind = __commonJS({ + "node_modules/call-bind/index.js"(exports, module2) { + "use strict"; + var bind = require_function_bind(); + var GetIntrinsic = require_get_intrinsic(); + var $apply = GetIntrinsic("%Function.prototype.apply%"); + var $call = GetIntrinsic("%Function.prototype.call%"); + var $reflectApply = GetIntrinsic("%Reflect.apply%", true) || bind.call($call, $apply); + var $gOPD = GetIntrinsic("%Object.getOwnPropertyDescriptor%", true); + var $defineProperty = GetIntrinsic("%Object.defineProperty%", true); + var $max = GetIntrinsic("%Math.max%"); + if ($defineProperty) { + try { + $defineProperty({}, "a", { value: 1 }); + } catch (e3) { + $defineProperty = null; + } + } + module2.exports = function callBind(originalFunction) { + var func = $reflectApply(bind, $call, arguments); + if ($gOPD && $defineProperty) { + var desc = $gOPD(func, "length"); + if (desc.configurable) { + $defineProperty(func, "length", { value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }); + } + } + return func; + }; + var applyBind = function applyBind2() { + return $reflectApply(bind, $apply, arguments); + }; + if ($defineProperty) { + $defineProperty(module2.exports, "apply", { value: applyBind }); + } else { + module2.exports.apply = applyBind; + } + } +}); + +// node_modules/call-bind/callBound.js +var require_callBound = __commonJS({ + "node_modules/call-bind/callBound.js"(exports, module2) { + "use strict"; + var GetIntrinsic = require_get_intrinsic(); + var callBind = require_call_bind(); + var $indexOf = callBind(GetIntrinsic("String.prototype.indexOf")); + module2.exports = function callBoundIntrinsic(name, allowMissing) { + var intrinsic = GetIntrinsic(name, !!allowMissing); + if (typeof intrinsic === "function" && $indexOf(name, ".prototype.") > -1) { + return callBind(intrinsic); + } + return intrinsic; + }; + } +}); + +// node_modules/object.assign/implementation.js +var require_implementation3 = __commonJS({ + "node_modules/object.assign/implementation.js"(exports, module2) { + "use strict"; + var objectKeys = require_object_keys(); + var hasSymbols = require_shams()(); + var callBound = require_callBound(); + var toObject = Object; + var $push = callBound("Array.prototype.push"); + var $propIsEnumerable = callBound("Object.prototype.propertyIsEnumerable"); + var originalGetSymbols = hasSymbols ? Object.getOwnPropertySymbols : null; + module2.exports = function assign(target, source1) { + if (target == null) { + throw new TypeError("target must be an object"); + } + var to = toObject(target); + if (arguments.length === 1) { + return to; + } + for (var s4 = 1; s4 < arguments.length; ++s4) { + var from = toObject(arguments[s4]); + var keys = objectKeys(from); + var getSymbols = hasSymbols && (Object.getOwnPropertySymbols || originalGetSymbols); + if (getSymbols) { + var syms = getSymbols(from); + for (var j4 = 0; j4 < syms.length; ++j4) { + var key = syms[j4]; + if ($propIsEnumerable(from, key)) { + $push(keys, key); } - }, { - key: "createCalendarObject", - value: function createCalendarObject(calendar) { - var options = arguments.length <= 1 || arguments[1] === void 0 ? {} : arguments[1]; - options.xhr = options.xhr || this.xhr; - return calendars.createCalendarObject(calendar, options); + } + } + for (var i3 = 0; i3 < keys.length; ++i3) { + var nextKey = keys[i3]; + if ($propIsEnumerable(from, nextKey)) { + var propValue = from[nextKey]; + to[nextKey] = propValue; + } + } + } + return to; + }; + } +}); + +// node_modules/object.assign/polyfill.js +var require_polyfill = __commonJS({ + "node_modules/object.assign/polyfill.js"(exports, module2) { + "use strict"; + var implementation = require_implementation3(); + var lacksProperEnumerationOrder = function() { + if (!Object.assign) { + return false; + } + var str = "abcdefghijklmnopqrst"; + var letters = str.split(""); + var map = {}; + for (var i3 = 0; i3 < letters.length; ++i3) { + map[letters[i3]] = letters[i3]; + } + var obj = Object.assign({}, map); + var actual = ""; + for (var k3 in obj) { + actual += k3; + } + return str !== actual; + }; + var assignHasPendingExceptions = function() { + if (!Object.assign || !Object.preventExtensions) { + return false; + } + var thrower = Object.preventExtensions({ 1: 2 }); + try { + Object.assign(thrower, "xy"); + } catch (e3) { + return thrower[1] === "y"; + } + return false; + }; + module2.exports = function getPolyfill() { + if (!Object.assign) { + return implementation; + } + if (lacksProperEnumerationOrder()) { + return implementation; + } + if (assignHasPendingExceptions()) { + return implementation; + } + return Object.assign; + }; + } +}); + +// node_modules/object.assign/shim.js +var require_shim = __commonJS({ + "node_modules/object.assign/shim.js"(exports, module2) { + "use strict"; + var define2 = require_define_properties(); + var getPolyfill = require_polyfill(); + module2.exports = function shimAssign() { + var polyfill = getPolyfill(); + define2(Object, { assign: polyfill }, { assign: function() { + return Object.assign !== polyfill; + } }); + return polyfill; + }; + } +}); + +// node_modules/object.assign/index.js +var require_object = __commonJS({ + "node_modules/object.assign/index.js"(exports, module2) { + "use strict"; + var defineProperties = require_define_properties(); + var callBind = require_call_bind(); + var implementation = require_implementation3(); + var getPolyfill = require_polyfill(); + var shim = require_shim(); + var polyfill = callBind.apply(getPolyfill()); + var bound = function assign(target, source1) { + return polyfill(Object, arguments); + }; + defineProperties(bound, { + getPolyfill, + implementation, + shim + }); + module2.exports = bound; + } +}); + +// node_modules/functions-have-names/index.js +var require_functions_have_names = __commonJS({ + "node_modules/functions-have-names/index.js"(exports, module2) { + "use strict"; + var functionsHaveNames = function functionsHaveNames2() { + return typeof function f3() { + }.name === "string"; + }; + var gOPD = Object.getOwnPropertyDescriptor; + if (gOPD) { + try { + gOPD([], "length"); + } catch (e3) { + gOPD = null; + } + } + functionsHaveNames.functionsHaveConfigurableNames = function functionsHaveConfigurableNames() { + if (!functionsHaveNames() || !gOPD) { + return false; + } + var desc = gOPD(function() { + }, "name"); + return !!desc && !!desc.configurable; + }; + var $bind = Function.prototype.bind; + functionsHaveNames.boundFunctionsHaveNames = function boundFunctionsHaveNames() { + return functionsHaveNames() && typeof $bind === "function" && function f3() { + }.bind().name !== ""; + }; + module2.exports = functionsHaveNames; + } +}); + +// node_modules/regexp.prototype.flags/implementation.js +var require_implementation4 = __commonJS({ + "node_modules/regexp.prototype.flags/implementation.js"(exports, module2) { + "use strict"; + var functionsHaveConfigurableNames = require_functions_have_names().functionsHaveConfigurableNames(); + var $Object = Object; + var $TypeError = TypeError; + module2.exports = function flags() { + if (this != null && this !== $Object(this)) { + throw new $TypeError("RegExp.prototype.flags getter called on non-object"); + } + var result = ""; + if (this.hasIndices) { + result += "d"; + } + if (this.global) { + result += "g"; + } + if (this.ignoreCase) { + result += "i"; + } + if (this.multiline) { + result += "m"; + } + if (this.dotAll) { + result += "s"; + } + if (this.unicode) { + result += "u"; + } + if (this.sticky) { + result += "y"; + } + return result; + }; + if (functionsHaveConfigurableNames && Object.defineProperty) { + Object.defineProperty(module2.exports, "name", { value: "get flags" }); + } + } +}); + +// node_modules/regexp.prototype.flags/polyfill.js +var require_polyfill2 = __commonJS({ + "node_modules/regexp.prototype.flags/polyfill.js"(exports, module2) { + "use strict"; + var implementation = require_implementation4(); + var supportsDescriptors = require_define_properties().supportsDescriptors; + var $gOPD = Object.getOwnPropertyDescriptor; + module2.exports = function getPolyfill() { + if (supportsDescriptors && /a/mig.flags === "gim") { + var descriptor = $gOPD(RegExp.prototype, "flags"); + if (descriptor && typeof descriptor.get === "function" && typeof RegExp.prototype.dotAll === "boolean" && typeof RegExp.prototype.hasIndices === "boolean") { + var calls = ""; + var o2 = {}; + Object.defineProperty(o2, "hasIndices", { + get: function() { + calls += "d"; } - }, { - key: "updateCalendarObject", - value: function updateCalendarObject(calendarObject) { - var options = arguments.length <= 1 || arguments[1] === void 0 ? {} : arguments[1]; - options.xhr = options.xhr || this.xhr; - return calendars.updateCalendarObject(calendarObject, options); + }); + Object.defineProperty(o2, "sticky", { + get: function() { + calls += "y"; } - }, { - key: "deleteCalendarObject", - value: function deleteCalendarObject(calendarObject) { - var options = arguments.length <= 1 || arguments[1] === void 0 ? {} : arguments[1]; - options.xhr = options.xhr || this.xhr; - return calendars.deleteCalendarObject(calendarObject, options); + }); + if (calls === "dy") { + return descriptor.get; + } + } + } + return implementation; + }; + } +}); + +// node_modules/regexp.prototype.flags/shim.js +var require_shim2 = __commonJS({ + "node_modules/regexp.prototype.flags/shim.js"(exports, module2) { + "use strict"; + var supportsDescriptors = require_define_properties().supportsDescriptors; + var getPolyfill = require_polyfill2(); + var gOPD = Object.getOwnPropertyDescriptor; + var defineProperty = Object.defineProperty; + var TypeErr = TypeError; + var getProto = Object.getPrototypeOf; + var regex = /a/; + module2.exports = function shimFlags() { + if (!supportsDescriptors || !getProto) { + throw new TypeErr("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors"); + } + var polyfill = getPolyfill(); + var proto = getProto(regex); + var descriptor = gOPD(proto, "flags"); + if (!descriptor || descriptor.get !== polyfill) { + defineProperty(proto, "flags", { + configurable: true, + enumerable: false, + get: polyfill + }); + } + return polyfill; + }; + } +}); + +// node_modules/regexp.prototype.flags/index.js +var require_regexp_prototype = __commonJS({ + "node_modules/regexp.prototype.flags/index.js"(exports, module2) { + "use strict"; + var define2 = require_define_properties(); + var callBind = require_call_bind(); + var implementation = require_implementation4(); + var getPolyfill = require_polyfill2(); + var shim = require_shim2(); + var flagsBound = callBind(getPolyfill()); + define2(flagsBound, { + getPolyfill, + implementation, + shim + }); + module2.exports = flagsBound; + } +}); + +// node_modules/has-tostringtag/shams.js +var require_shams2 = __commonJS({ + "node_modules/has-tostringtag/shams.js"(exports, module2) { + "use strict"; + var hasSymbols = require_shams(); + module2.exports = function hasToStringTagShams() { + return hasSymbols() && !!Symbol.toStringTag; + }; + } +}); + +// node_modules/is-arguments/index.js +var require_is_arguments = __commonJS({ + "node_modules/is-arguments/index.js"(exports, module2) { + "use strict"; + var hasToStringTag = require_shams2()(); + var callBound = require_callBound(); + var $toString = callBound("Object.prototype.toString"); + var isStandardArguments = function isArguments(value) { + if (hasToStringTag && value && typeof value === "object" && Symbol.toStringTag in value) { + return false; + } + return $toString(value) === "[object Arguments]"; + }; + var isLegacyArguments = function isArguments(value) { + if (isStandardArguments(value)) { + return true; + } + return value !== null && typeof value === "object" && typeof value.length === "number" && value.length >= 0 && $toString(value) !== "[object Array]" && $toString(value.callee) === "[object Function]"; + }; + var supportsStandardArguments = function() { + return isStandardArguments(arguments); + }(); + isStandardArguments.isLegacyArguments = isLegacyArguments; + module2.exports = supportsStandardArguments ? isStandardArguments : isLegacyArguments; + } +}); + +// (disabled):node_modules/object-inspect/util.inspect +var require_util = __commonJS({ + "(disabled):node_modules/object-inspect/util.inspect"() { + } +}); + +// node_modules/object-inspect/index.js +var require_object_inspect = __commonJS({ + "node_modules/object-inspect/index.js"(exports, module2) { + var hasMap = typeof Map === "function" && Map.prototype; + var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null; + var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === "function" ? mapSizeDescriptor.get : null; + var mapForEach = hasMap && Map.prototype.forEach; + var hasSet = typeof Set === "function" && Set.prototype; + var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null; + var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === "function" ? setSizeDescriptor.get : null; + var setForEach = hasSet && Set.prototype.forEach; + var hasWeakMap = typeof WeakMap === "function" && WeakMap.prototype; + var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null; + var hasWeakSet = typeof WeakSet === "function" && WeakSet.prototype; + var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null; + var hasWeakRef = typeof WeakRef === "function" && WeakRef.prototype; + var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null; + var booleanValueOf = Boolean.prototype.valueOf; + var objectToString = Object.prototype.toString; + var functionToString = Function.prototype.toString; + var $match = String.prototype.match; + var $slice = String.prototype.slice; + var $replace = String.prototype.replace; + var $toUpperCase = String.prototype.toUpperCase; + var $toLowerCase = String.prototype.toLowerCase; + var $test = RegExp.prototype.test; + var $concat = Array.prototype.concat; + var $join = Array.prototype.join; + var $arrSlice = Array.prototype.slice; + var $floor = Math.floor; + var bigIntValueOf = typeof BigInt === "function" ? BigInt.prototype.valueOf : null; + var gOPS = Object.getOwnPropertySymbols; + var symToString = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? Symbol.prototype.toString : null; + var hasShammedSymbols = typeof Symbol === "function" && typeof Symbol.iterator === "object"; + var toStringTag = typeof Symbol === "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? "object" : "symbol") ? Symbol.toStringTag : null; + var isEnumerable = Object.prototype.propertyIsEnumerable; + var gPO = (typeof Reflect === "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(O2) { + return O2.__proto__; + } : null); + function addNumericSeparator(num, str) { + if (num === Infinity || num === -Infinity || num !== num || num && num > -1e3 && num < 1e3 || $test.call(/e/, str)) { + return str; + } + var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g; + if (typeof num === "number") { + var int2 = num < 0 ? -$floor(-num) : $floor(num); + if (int2 !== num) { + var intStr = String(int2); + var dec = $slice.call(str, intStr.length + 1); + return $replace.call(intStr, sepRegex, "$&_") + "." + $replace.call($replace.call(dec, /([0-9]{3})/g, "$&_"), /_$/, ""); + } + } + return $replace.call(str, sepRegex, "$&_"); + } + var utilInspect = require_util(); + var inspectCustom = utilInspect.custom; + var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null; + module2.exports = function inspect_(obj, options, depth, seen) { + var opts = options || {}; + if (has(opts, "quoteStyle") && (opts.quoteStyle !== "single" && opts.quoteStyle !== "double")) { + throw new TypeError('option "quoteStyle" must be "single" or "double"'); + } + if (has(opts, "maxStringLength") && (typeof opts.maxStringLength === "number" ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity : opts.maxStringLength !== null)) { + throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`'); + } + var customInspect = has(opts, "customInspect") ? opts.customInspect : true; + if (typeof customInspect !== "boolean" && customInspect !== "symbol") { + throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`"); + } + if (has(opts, "indent") && opts.indent !== null && opts.indent !== " " && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)) { + throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`'); + } + if (has(opts, "numericSeparator") && typeof opts.numericSeparator !== "boolean") { + throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`'); + } + var numericSeparator = opts.numericSeparator; + if (typeof obj === "undefined") { + return "undefined"; + } + if (obj === null) { + return "null"; + } + if (typeof obj === "boolean") { + return obj ? "true" : "false"; + } + if (typeof obj === "string") { + return inspectString(obj, opts); + } + if (typeof obj === "number") { + if (obj === 0) { + return Infinity / obj > 0 ? "0" : "-0"; + } + var str = String(obj); + return numericSeparator ? addNumericSeparator(obj, str) : str; + } + if (typeof obj === "bigint") { + var bigIntStr = String(obj) + "n"; + return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr; + } + var maxDepth = typeof opts.depth === "undefined" ? 5 : opts.depth; + if (typeof depth === "undefined") { + depth = 0; + } + if (depth >= maxDepth && maxDepth > 0 && typeof obj === "object") { + return isArray2(obj) ? "[Array]" : "[Object]"; + } + var indent = getIndent(opts, depth); + if (typeof seen === "undefined") { + seen = []; + } else if (indexOf(seen, obj) >= 0) { + return "[Circular]"; + } + function inspect(value, from, noIndent) { + if (from) { + seen = $arrSlice.call(seen); + seen.push(from); + } + if (noIndent) { + var newOpts = { + depth: opts.depth + }; + if (has(opts, "quoteStyle")) { + newOpts.quoteStyle = opts.quoteStyle; + } + return inspect_(value, newOpts, depth + 1, seen); + } + return inspect_(value, opts, depth + 1, seen); + } + if (typeof obj === "function" && !isRegExp(obj)) { + var name = nameOf(obj); + var keys = arrObjKeys(obj, inspect); + return "[Function" + (name ? ": " + name : " (anonymous)") + "]" + (keys.length > 0 ? " { " + $join.call(keys, ", ") + " }" : ""); + } + if (isSymbol(obj)) { + var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, "$1") : symToString.call(obj); + return typeof obj === "object" && !hasShammedSymbols ? markBoxed(symString) : symString; + } + if (isElement(obj)) { + var s4 = "<" + $toLowerCase.call(String(obj.nodeName)); + var attrs = obj.attributes || []; + for (var i3 = 0; i3 < attrs.length; i3++) { + s4 += " " + attrs[i3].name + "=" + wrapQuotes(quote(attrs[i3].value), "double", opts); + } + s4 += ">"; + if (obj.childNodes && obj.childNodes.length) { + s4 += "..."; + } + s4 += ""; + return s4; + } + if (isArray2(obj)) { + if (obj.length === 0) { + return "[]"; + } + var xs = arrObjKeys(obj, inspect); + if (indent && !singleLineValues(xs)) { + return "[" + indentedJoin(xs, indent) + "]"; + } + return "[ " + $join.call(xs, ", ") + " ]"; + } + if (isError(obj)) { + var parts = arrObjKeys(obj, inspect); + if (!("cause" in Error.prototype) && "cause" in obj && !isEnumerable.call(obj, "cause")) { + return "{ [" + String(obj) + "] " + $join.call($concat.call("[cause]: " + inspect(obj.cause), parts), ", ") + " }"; + } + if (parts.length === 0) { + return "[" + String(obj) + "]"; + } + return "{ [" + String(obj) + "] " + $join.call(parts, ", ") + " }"; + } + if (typeof obj === "object" && customInspect) { + if (inspectSymbol && typeof obj[inspectSymbol] === "function" && utilInspect) { + return utilInspect(obj, { depth: maxDepth - depth }); + } else if (customInspect !== "symbol" && typeof obj.inspect === "function") { + return obj.inspect(); + } + } + if (isMap(obj)) { + var mapParts = []; + if (mapForEach) { + mapForEach.call(obj, function(value, key) { + mapParts.push(inspect(key, obj, true) + " => " + inspect(value, obj)); + }); + } + return collectionOf("Map", mapSize.call(obj), mapParts, indent); + } + if (isSet(obj)) { + var setParts = []; + if (setForEach) { + setForEach.call(obj, function(value) { + setParts.push(inspect(value, obj)); + }); + } + return collectionOf("Set", setSize.call(obj), setParts, indent); + } + if (isWeakMap(obj)) { + return weakCollectionOf("WeakMap"); + } + if (isWeakSet(obj)) { + return weakCollectionOf("WeakSet"); + } + if (isWeakRef(obj)) { + return weakCollectionOf("WeakRef"); + } + if (isNumber3(obj)) { + return markBoxed(inspect(Number(obj))); + } + if (isBigInt(obj)) { + return markBoxed(inspect(bigIntValueOf.call(obj))); + } + if (isBoolean(obj)) { + return markBoxed(booleanValueOf.call(obj)); + } + if (isString2(obj)) { + return markBoxed(inspect(String(obj))); + } + if (!isDate3(obj) && !isRegExp(obj)) { + var ys = arrObjKeys(obj, inspect); + var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object; + var protoTag = obj instanceof Object ? "" : "null prototype"; + var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? "Object" : ""; + var constructorTag = isPlainObject || typeof obj.constructor !== "function" ? "" : obj.constructor.name ? obj.constructor.name + " " : ""; + var tag = constructorTag + (stringTag || protoTag ? "[" + $join.call($concat.call([], stringTag || [], protoTag || []), ": ") + "] " : ""); + if (ys.length === 0) { + return tag + "{}"; + } + if (indent) { + return tag + "{" + indentedJoin(ys, indent) + "}"; + } + return tag + "{ " + $join.call(ys, ", ") + " }"; + } + return String(obj); + }; + function wrapQuotes(s4, defaultStyle, opts) { + var quoteChar = (opts.quoteStyle || defaultStyle) === "double" ? '"' : "'"; + return quoteChar + s4 + quoteChar; + } + function quote(s4) { + return $replace.call(String(s4), /"/g, """); + } + function isArray2(obj) { + return toStr(obj) === "[object Array]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj)); + } + function isDate3(obj) { + return toStr(obj) === "[object Date]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj)); + } + function isRegExp(obj) { + return toStr(obj) === "[object RegExp]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj)); + } + function isError(obj) { + return toStr(obj) === "[object Error]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj)); + } + function isString2(obj) { + return toStr(obj) === "[object String]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj)); + } + function isNumber3(obj) { + return toStr(obj) === "[object Number]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj)); + } + function isBoolean(obj) { + return toStr(obj) === "[object Boolean]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj)); + } + function isSymbol(obj) { + if (hasShammedSymbols) { + return obj && typeof obj === "object" && obj instanceof Symbol; + } + if (typeof obj === "symbol") { + return true; + } + if (!obj || typeof obj !== "object" || !symToString) { + return false; + } + try { + symToString.call(obj); + return true; + } catch (e3) { + } + return false; + } + function isBigInt(obj) { + if (!obj || typeof obj !== "object" || !bigIntValueOf) { + return false; + } + try { + bigIntValueOf.call(obj); + return true; + } catch (e3) { + } + return false; + } + var hasOwn = Object.prototype.hasOwnProperty || function(key) { + return key in this; + }; + function has(obj, key) { + return hasOwn.call(obj, key); + } + function toStr(obj) { + return objectToString.call(obj); + } + function nameOf(f3) { + if (f3.name) { + return f3.name; + } + var m3 = $match.call(functionToString.call(f3), /^function\s*([\w$]+)/); + if (m3) { + return m3[1]; + } + return null; + } + function indexOf(xs, x3) { + if (xs.indexOf) { + return xs.indexOf(x3); + } + for (var i3 = 0, l4 = xs.length; i3 < l4; i3++) { + if (xs[i3] === x3) { + return i3; + } + } + return -1; + } + function isMap(x3) { + if (!mapSize || !x3 || typeof x3 !== "object") { + return false; + } + try { + mapSize.call(x3); + try { + setSize.call(x3); + } catch (s4) { + return true; + } + return x3 instanceof Map; + } catch (e3) { + } + return false; + } + function isWeakMap(x3) { + if (!weakMapHas || !x3 || typeof x3 !== "object") { + return false; + } + try { + weakMapHas.call(x3, weakMapHas); + try { + weakSetHas.call(x3, weakSetHas); + } catch (s4) { + return true; + } + return x3 instanceof WeakMap; + } catch (e3) { + } + return false; + } + function isWeakRef(x3) { + if (!weakRefDeref || !x3 || typeof x3 !== "object") { + return false; + } + try { + weakRefDeref.call(x3); + return true; + } catch (e3) { + } + return false; + } + function isSet(x3) { + if (!setSize || !x3 || typeof x3 !== "object") { + return false; + } + try { + setSize.call(x3); + try { + mapSize.call(x3); + } catch (m3) { + return true; + } + return x3 instanceof Set; + } catch (e3) { + } + return false; + } + function isWeakSet(x3) { + if (!weakSetHas || !x3 || typeof x3 !== "object") { + return false; + } + try { + weakSetHas.call(x3, weakSetHas); + try { + weakMapHas.call(x3, weakMapHas); + } catch (s4) { + return true; + } + return x3 instanceof WeakSet; + } catch (e3) { + } + return false; + } + function isElement(x3) { + if (!x3 || typeof x3 !== "object") { + return false; + } + if (typeof HTMLElement !== "undefined" && x3 instanceof HTMLElement) { + return true; + } + return typeof x3.nodeName === "string" && typeof x3.getAttribute === "function"; + } + function inspectString(str, opts) { + if (str.length > opts.maxStringLength) { + var remaining = str.length - opts.maxStringLength; + var trailer = "... " + remaining + " more character" + (remaining > 1 ? "s" : ""); + return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer; + } + var s4 = $replace.call($replace.call(str, /(['\\])/g, "\\$1"), /[\x00-\x1f]/g, lowbyte); + return wrapQuotes(s4, "single", opts); + } + function lowbyte(c3) { + var n3 = c3.charCodeAt(0); + var x3 = { + 8: "b", + 9: "t", + 10: "n", + 12: "f", + 13: "r" + }[n3]; + if (x3) { + return "\\" + x3; + } + return "\\x" + (n3 < 16 ? "0" : "") + $toUpperCase.call(n3.toString(16)); + } + function markBoxed(str) { + return "Object(" + str + ")"; + } + function weakCollectionOf(type) { + return type + " { ? }"; + } + function collectionOf(type, size, entries, indent) { + var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ", "); + return type + " (" + size + ") {" + joinedEntries + "}"; + } + function singleLineValues(xs) { + for (var i3 = 0; i3 < xs.length; i3++) { + if (indexOf(xs[i3], "\n") >= 0) { + return false; + } + } + return true; + } + function getIndent(opts, depth) { + var baseIndent; + if (opts.indent === " ") { + baseIndent = " "; + } else if (typeof opts.indent === "number" && opts.indent > 0) { + baseIndent = $join.call(Array(opts.indent + 1), " "); + } else { + return null; + } + return { + base: baseIndent, + prev: $join.call(Array(depth + 1), baseIndent) + }; + } + function indentedJoin(xs, indent) { + if (xs.length === 0) { + return ""; + } + var lineJoiner = "\n" + indent.prev + indent.base; + return lineJoiner + $join.call(xs, "," + lineJoiner) + "\n" + indent.prev; + } + function arrObjKeys(obj, inspect) { + var isArr = isArray2(obj); + var xs = []; + if (isArr) { + xs.length = obj.length; + for (var i3 = 0; i3 < obj.length; i3++) { + xs[i3] = has(obj, i3) ? inspect(obj[i3], obj) : ""; + } + } + var syms = typeof gOPS === "function" ? gOPS(obj) : []; + var symMap; + if (hasShammedSymbols) { + symMap = {}; + for (var k3 = 0; k3 < syms.length; k3++) { + symMap["$" + syms[k3]] = syms[k3]; + } + } + for (var key in obj) { + if (!has(obj, key)) { + continue; + } + if (isArr && String(Number(key)) === key && key < obj.length) { + continue; + } + if (hasShammedSymbols && symMap["$" + key] instanceof Symbol) { + continue; + } else if ($test.call(/[^\w$]/, key)) { + xs.push(inspect(key, obj) + ": " + inspect(obj[key], obj)); + } else { + xs.push(key + ": " + inspect(obj[key], obj)); + } + } + if (typeof gOPS === "function") { + for (var j4 = 0; j4 < syms.length; j4++) { + if (isEnumerable.call(obj, syms[j4])) { + xs.push("[" + inspect(syms[j4]) + "]: " + inspect(obj[syms[j4]], obj)); + } + } + } + return xs; + } + } +}); + +// node_modules/side-channel/index.js +var require_side_channel = __commonJS({ + "node_modules/side-channel/index.js"(exports, module2) { + "use strict"; + var GetIntrinsic = require_get_intrinsic(); + var callBound = require_callBound(); + var inspect = require_object_inspect(); + var $TypeError = GetIntrinsic("%TypeError%"); + var $WeakMap = GetIntrinsic("%WeakMap%", true); + var $Map = GetIntrinsic("%Map%", true); + var $weakMapGet = callBound("WeakMap.prototype.get", true); + var $weakMapSet = callBound("WeakMap.prototype.set", true); + var $weakMapHas = callBound("WeakMap.prototype.has", true); + var $mapGet = callBound("Map.prototype.get", true); + var $mapSet = callBound("Map.prototype.set", true); + var $mapHas = callBound("Map.prototype.has", true); + var listGetNode = function(list, key) { + for (var prev = list, curr; (curr = prev.next) !== null; prev = curr) { + if (curr.key === key) { + prev.next = curr.next; + curr.next = list.next; + list.next = curr; + return curr; + } + } + }; + var listGet = function(objects, key) { + var node = listGetNode(objects, key); + return node && node.value; + }; + var listSet = function(objects, key, value) { + var node = listGetNode(objects, key); + if (node) { + node.value = value; + } else { + objects.next = { + key, + next: objects.next, + value + }; + } + }; + var listHas = function(objects, key) { + return !!listGetNode(objects, key); + }; + module2.exports = function getSideChannel() { + var $wm; + var $m; + var $o; + var channel = { + assert: function(key) { + if (!channel.has(key)) { + throw new $TypeError("Side channel does not contain " + inspect(key)); + } + }, + get: function(key) { + if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) { + if ($wm) { + return $weakMapGet($wm, key); } - }, { - key: "syncCalendar", - value: function syncCalendar(calendar) { - var options = arguments.length <= 1 || arguments[1] === void 0 ? {} : arguments[1]; - options.xhr = options.xhr || this.xhr; - return calendars.syncCalendar(calendar, options); + } else if ($Map) { + if ($m) { + return $mapGet($m, key); } - }, { - key: "syncCaldavAccount", - value: function syncCaldavAccount(account) { - var options = arguments.length <= 1 || arguments[1] === void 0 ? {} : arguments[1]; - options.xhr = options.xhr || this.xhr; - return calendars.syncCaldavAccount(account, options); + } else { + if ($o) { + return listGet($o, key); } - }, { - key: "createCard", - value: function createCard(addressBook) { - var options = arguments.length <= 1 || arguments[1] === void 0 ? {} : arguments[1]; - options.xhr = options.xhr || this.xhr; - return contacts.createCard(addressBook, options); + } + }, + has: function(key) { + if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) { + if ($wm) { + return $weakMapHas($wm, key); } - }, { - key: "updateCard", - value: function updateCard(card) { - var options = arguments.length <= 1 || arguments[1] === void 0 ? {} : arguments[1]; - options.xhr = options.xhr || this.xhr; - return contacts.updateCard(card, options); + } else if ($Map) { + if ($m) { + return $mapHas($m, key); } - }, { - key: "deleteCard", - value: function deleteCard(card) { - var options = arguments.length <= 1 || arguments[1] === void 0 ? {} : arguments[1]; - options.xhr = options.xhr || this.xhr; - return contacts.deleteCard(card, options); + } else { + if ($o) { + return listHas($o, key); } - }, { - key: "syncAddressBook", - value: function syncAddressBook(addressBook) { - var options = arguments.length <= 1 || arguments[1] === void 0 ? {} : arguments[1]; - options.xhr = options.xhr || this.xhr; - return contacts.syncAddressBook(addressBook, options); + } + return false; + }, + set: function(key, value) { + if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) { + if (!$wm) { + $wm = new $WeakMap(); } - }, { - key: "syncCarddavAccount", - value: function syncCarddavAccount(account) { - var options = arguments.length <= 1 || arguments[1] === void 0 ? {} : arguments[1]; - options.xhr = options.xhr || this.xhr; - return contacts.syncCarddavAccount(account, options); + $weakMapSet($wm, key, value); + } else if ($Map) { + if (!$m) { + $m = new $Map(); } - }]); - return Client2; - }(); - exports3.Client = Client; - }, { "./accounts": 1, "./calendars": 2, "./contacts": 5, "url": 29 }], 5: [function(require2, module4, exports3) { - "use strict"; - Object.defineProperty(exports3, "__esModule", { - value: true - }); - exports3.createCard = createCard; - exports3.updateCard = updateCard; - exports3.deleteCard = deleteCard; - exports3.syncAddressBook = syncAddressBook; - function _interopRequireWildcard(obj) { - if (obj && obj.__esModule) { - return obj; + $mapSet($m, key, value); } else { - var newObj = {}; - if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) - newObj[key] = obj[key]; - } + if (!$o) { + $o = { key: {}, next: null }; } - newObj["default"] = obj; - return newObj; + listSet($o, key, value); } } - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { "default": obj }; + }; + return channel; + }; + } +}); + +// node_modules/internal-slot/index.js +var require_internal_slot = __commonJS({ + "node_modules/internal-slot/index.js"(exports, module2) { + "use strict"; + var GetIntrinsic = require_get_intrinsic(); + var has = require_src(); + var channel = require_side_channel()(); + var $TypeError = GetIntrinsic("%TypeError%"); + var SLOT = { + assert: function(O2, slot) { + if (!O2 || typeof O2 !== "object" && typeof O2 !== "function") { + throw new $TypeError("`O` is not an object"); + } + if (typeof slot !== "string") { + throw new $TypeError("`slot` must be a string"); + } + channel.assert(O2); + if (!SLOT.has(O2, slot)) { + throw new $TypeError("`" + slot + "` is not present on `O`"); } - var _co = require2("co"); - var _co2 = _interopRequireDefault(_co); - var _url = require2("url"); - var _url2 = _interopRequireDefault(_url); - var _fuzzy_url_equals = require2("./fuzzy_url_equals"); - var _fuzzy_url_equals2 = _interopRequireDefault(_fuzzy_url_equals); - var _model = require2("./model"); - var _namespace = require2("./namespace"); - var ns2 = _interopRequireWildcard(_namespace); - var _request = require2("./request"); - var request3 = _interopRequireWildcard(_request); - var _webdav = require2("./webdav"); - var webdav = _interopRequireWildcard(_webdav); - var debug = require2("./debug")("dav:contacts"); - var listAddressBooks = _co2["default"].wrap(regeneratorRuntime.mark(function callee$0$0(account, options) { - var req, responses, addressBooks; - return regeneratorRuntime.wrap(function callee$0$0$(context$1$0) { - while (1) - switch (context$1$0.prev = context$1$0.next) { - case 0: - debug("Fetch address books from home url " + account.homeUrl); - req = request3.propfind({ - props: [{ name: "displayname", namespace: ns2.DAV }, { name: "getctag", namespace: ns2.CALENDAR_SERVER }, { name: "resourcetype", namespace: ns2.DAV }, { name: "sync-token", namespace: ns2.DAV }], - depth: 1 - }); - context$1$0.next = 4; - return options.xhr.send(req, account.homeUrl, { - sandbox: options.sandbox - }); - case 4: - responses = context$1$0.sent; - addressBooks = responses.filter(function(res) { - return typeof res.props.displayname === "string"; - }).map(function(res) { - debug("Found address book named " + res.props.displayname + ",\n props: " + JSON.stringify(res.props)); - return new _model.AddressBook({ - data: res, - account, - url: _url2["default"].resolve(account.rootUrl, res.href), - ctag: res.props.getctag, - displayName: res.props.displayname, - resourcetype: res.props.resourcetype, - syncToken: res.props.syncToken - }); - }); - context$1$0.next = 8; - return addressBooks.map(_co2["default"].wrap(regeneratorRuntime.mark(function callee$1$0(addressBook) { - return regeneratorRuntime.wrap(function callee$1$0$(context$2$0) { - while (1) - switch (context$2$0.prev = context$2$0.next) { - case 0: - context$2$0.next = 2; - return webdav.supportedReportSet(addressBook, options); - case 2: - addressBook.reports = context$2$0.sent; - case 3: - case "end": - return context$2$0.stop(); - } - }, callee$1$0, this); - }))); - case 8: - return context$1$0.abrupt("return", addressBooks); - case 9: - case "end": - return context$1$0.stop(); - } - }, callee$0$0, this); - })); - exports3.listAddressBooks = listAddressBooks; - function createCard(addressBook, options) { - var objectUrl = _url2["default"].resolve(addressBook.url, options.filename); - return webdav.createObject(objectUrl, options.data, options); + }, + get: function(O2, slot) { + if (!O2 || typeof O2 !== "object" && typeof O2 !== "function") { + throw new $TypeError("`O` is not an object"); } - var listVCards = _co2["default"].wrap(regeneratorRuntime.mark(function callee$0$0(addressBook, options) { - var req, responses; - return regeneratorRuntime.wrap(function callee$0$0$(context$1$0) { - while (1) - switch (context$1$0.prev = context$1$0.next) { - case 0: - debug("Doing REPORT on address book " + addressBook.url + " which belongs to\n " + addressBook.account.credentials.username); - req = request3.addressBookQuery({ - depth: 1, - props: [{ name: "getetag", namespace: ns2.DAV }, { name: "address-data", namespace: ns2.CARDDAV }] - }); - context$1$0.next = 4; - return options.xhr.send(req, addressBook.url, { - sandbox: options.sandbox - }); - case 4: - responses = context$1$0.sent; - return context$1$0.abrupt("return", responses.map(function(res) { - debug("Found vcard with url " + res.href); - return new _model.VCard({ - data: res, - addressBook, - url: _url2["default"].resolve(addressBook.account.rootUrl, res.href), - etag: res.props.getetag, - addressData: res.props.addressData - }); - })); - case 6: - case "end": - return context$1$0.stop(); - } - }, callee$0$0, this); - })); - exports3.listVCards = listVCards; - function updateCard(card, options) { - return webdav.updateObject(card.url, card.addressData, card.etag, options); + if (typeof slot !== "string") { + throw new $TypeError("`slot` must be a string"); } - function deleteCard(card, options) { - return webdav.deleteObject(card.url, card.etag, options); + var slots = channel.get(O2); + return slots && slots["$" + slot]; + }, + has: function(O2, slot) { + if (!O2 || typeof O2 !== "object" && typeof O2 !== "function") { + throw new $TypeError("`O` is not an object"); } - function syncAddressBook(addressBook, options) { - options.basicSync = basicSync; - options.webdavSync = webdavSync; - return webdav.syncCollection(addressBook, options); + if (typeof slot !== "string") { + throw new $TypeError("`slot` must be a string"); } - var syncCarddavAccount = _co2["default"].wrap(regeneratorRuntime.mark(function callee$0$0(account) { - var options = arguments.length <= 1 || arguments[1] === void 0 ? {} : arguments[1]; - var addressBooks; - return regeneratorRuntime.wrap(function callee$0$0$(context$1$0) { - while (1) - switch (context$1$0.prev = context$1$0.next) { - case 0: - options.loadObjects = false; - if (!account.addressBooks) { - account.addressBooks = []; - } - context$1$0.next = 4; - return listAddressBooks(account, options); - case 4: - addressBooks = context$1$0.sent; - addressBooks.filter(function(addressBook) { - return account.addressBooks.every(function(prev) { - return !(0, _fuzzy_url_equals2["default"])(prev.url, addressBook.url); - }); - }).forEach(function(addressBook) { - return account.addressBooks.push(addressBook); - }); - options.loadObjects = true; - context$1$0.next = 9; - return account.addressBooks.map(_co2["default"].wrap(regeneratorRuntime.mark(function callee$1$0(addressBook, index) { - return regeneratorRuntime.wrap(function callee$1$0$(context$2$0) { - while (1) - switch (context$2$0.prev = context$2$0.next) { - case 0: - context$2$0.prev = 0; - context$2$0.next = 3; - return syncAddressBook(addressBook, options); - case 3: - context$2$0.next = 9; - break; - case 5: - context$2$0.prev = 5; - context$2$0.t0 = context$2$0["catch"](0); - debug("Syncing " + addressBook.displayName + " failed with " + context$2$0.t0); - account.addressBooks.splice(index, 1); - case 9: - case "end": - return context$2$0.stop(); - } - }, callee$1$0, this, [[0, 5]]); - }))); - case 9: - return context$1$0.abrupt("return", account); - case 10: - case "end": - return context$1$0.stop(); - } - }, callee$0$0, this); - })); - exports3.syncCarddavAccount = syncCarddavAccount; - var basicSync = _co2["default"].wrap(regeneratorRuntime.mark(function callee$0$0(addressBook, options) { - var sync; - return regeneratorRuntime.wrap(function callee$0$0$(context$1$0) { - while (1) - switch (context$1$0.prev = context$1$0.next) { - case 0: - sync = webdav.isCollectionDirty(addressBook, options); - if (sync) { - context$1$0.next = 4; - break; - } - debug("Local ctag matched remote! No need to sync :)."); - return context$1$0.abrupt("return", addressBook); - case 4: - debug("ctag changed so we need to fetch stuffs."); - context$1$0.next = 7; - return listVCards(addressBook, options); - case 7: - addressBook.objects = context$1$0.sent; - return context$1$0.abrupt("return", addressBook); - case 9: - case "end": - return context$1$0.stop(); - } - }, callee$0$0, this); - })); - var webdavSync = _co2["default"].wrap(regeneratorRuntime.mark(function callee$0$0(addressBook, options) { - var req, result; - return regeneratorRuntime.wrap(function callee$0$0$(context$1$0) { - while (1) - switch (context$1$0.prev = context$1$0.next) { - case 0: - req = request3.syncCollection({ - props: [{ name: "getetag", namespace: ns2.DAV }, { name: "address-data", namespace: ns2.CARDDAV }], - syncLevel: 1, - syncToken: addressBook.syncToken - }); - context$1$0.next = 3; - return options.xhr.send(req, addressBook.url, { - sandbox: options.sandbox - }); - case 3: - result = context$1$0.sent; - result.responses.forEach(function(response) { - var vcard = addressBook.objects.filter(function(object) { - return (0, _fuzzy_url_equals2["default"])(object.url, response.href); - })[0]; - if (!vcard) - return; - vcard.etag = response.props.getetag; - vcard.addressData = response.props.addressData; - }); - addressBook.syncToken = result.syncToken; - return context$1$0.abrupt("return", addressBook); - case 7: - case "end": - return context$1$0.stop(); - } - }, callee$0$0, this); - })); - }, { "./debug": 6, "./fuzzy_url_equals": 7, "./model": 9, "./namespace": 10, "./request": 12, "./webdav": 22, "co": 24, "url": 29 }], 6: [function(require2, module4, exports3) { - "use strict"; - Object.defineProperty(exports3, "__esModule", { - value: true - }); - exports3["default"] = debug; - function debug(topic) { - return function(message) { - if (debug.enabled) { - console.log("[" + topic + "] " + message); + var slots = channel.get(O2); + return !!slots && has(slots, "$" + slot); + }, + set: function(O2, slot, V3) { + if (!O2 || typeof O2 !== "object" && typeof O2 !== "function") { + throw new $TypeError("`O` is not an object"); + } + if (typeof slot !== "string") { + throw new $TypeError("`slot` must be a string"); + } + var slots = channel.get(O2); + if (!slots) { + slots = {}; + channel.set(O2, slots); + } + slots["$" + slot] = V3; + } + }; + if (Object.freeze) { + Object.freeze(SLOT); + } + module2.exports = SLOT; + } +}); + +// node_modules/stop-iteration-iterator/index.js +var require_stop_iteration_iterator = __commonJS({ + "node_modules/stop-iteration-iterator/index.js"(exports, module2) { + "use strict"; + var SLOT = require_internal_slot(); + var $SyntaxError = SyntaxError; + var $StopIteration = typeof StopIteration === "object" ? StopIteration : null; + module2.exports = function getStopIterationIterator(origIterator) { + if (!$StopIteration) { + throw new $SyntaxError("this environment lacks StopIteration"); + } + SLOT.set(origIterator, "[[Done]]", false); + var siIterator = { + next: function next() { + var iterator = SLOT.get(this, "[[Iterator]]"); + var done = SLOT.get(iterator, "[[Done]]"); + try { + return { + done, + value: done ? void 0 : iterator.next() + }; + } catch (e3) { + SLOT.set(iterator, "[[Done]]", true); + if (e3 !== $StopIteration) { + throw e3; + } + return { + done: true, + value: void 0 + }; + } + } + }; + SLOT.set(siIterator, "[[Iterator]]", origIterator); + return siIterator; + }; + } +}); + +// node_modules/isarray/index.js +var require_isarray = __commonJS({ + "node_modules/isarray/index.js"(exports, module2) { + var toString = {}.toString; + module2.exports = Array.isArray || function(arr) { + return toString.call(arr) == "[object Array]"; + }; + } +}); + +// node_modules/is-string/index.js +var require_is_string = __commonJS({ + "node_modules/is-string/index.js"(exports, module2) { + "use strict"; + var strValue = String.prototype.valueOf; + var tryStringObject = function tryStringObject2(value) { + try { + strValue.call(value); + return true; + } catch (e3) { + return false; + } + }; + var toStr = Object.prototype.toString; + var strClass = "[object String]"; + var hasToStringTag = require_shams2()(); + module2.exports = function isString2(value) { + if (typeof value === "string") { + return true; + } + if (typeof value !== "object") { + return false; + } + return hasToStringTag ? tryStringObject(value) : toStr.call(value) === strClass; + }; + } +}); + +// node_modules/is-map/index.js +var require_is_map = __commonJS({ + "node_modules/is-map/index.js"(exports, module2) { + "use strict"; + var $Map = typeof Map === "function" && Map.prototype ? Map : null; + var $Set = typeof Set === "function" && Set.prototype ? Set : null; + var exported; + if (!$Map) { + exported = function isMap(x3) { + return false; + }; + } + var $mapHas = $Map ? Map.prototype.has : null; + var $setHas = $Set ? Set.prototype.has : null; + if (!exported && !$mapHas) { + exported = function isMap(x3) { + return false; + }; + } + module2.exports = exported || function isMap(x3) { + if (!x3 || typeof x3 !== "object") { + return false; + } + try { + $mapHas.call(x3); + if ($setHas) { + try { + $setHas.call(x3); + } catch (e3) { + return true; + } + } + return x3 instanceof $Map; + } catch (e3) { + } + return false; + }; + } +}); + +// node_modules/is-set/index.js +var require_is_set = __commonJS({ + "node_modules/is-set/index.js"(exports, module2) { + "use strict"; + var $Map = typeof Map === "function" && Map.prototype ? Map : null; + var $Set = typeof Set === "function" && Set.prototype ? Set : null; + var exported; + if (!$Set) { + exported = function isSet(x3) { + return false; + }; + } + var $mapHas = $Map ? Map.prototype.has : null; + var $setHas = $Set ? Set.prototype.has : null; + if (!exported && !$setHas) { + exported = function isSet(x3) { + return false; + }; + } + module2.exports = exported || function isSet(x3) { + if (!x3 || typeof x3 !== "object") { + return false; + } + try { + $setHas.call(x3); + if ($mapHas) { + try { + $mapHas.call(x3); + } catch (e3) { + return true; + } + } + return x3 instanceof $Set; + } catch (e3) { + } + return false; + }; + } +}); + +// node_modules/es-get-iterator/index.js +var require_es_get_iterator = __commonJS({ + "node_modules/es-get-iterator/index.js"(exports, module2) { + "use strict"; + var isArguments = require_is_arguments(); + var getStopIterationIterator = require_stop_iteration_iterator(); + if (require_has_symbols()() || require_shams()()) { + $iterator = Symbol.iterator; + module2.exports = function getIterator(iterable) { + if (iterable != null && typeof iterable[$iterator] !== "undefined") { + return iterable[$iterator](); + } + if (isArguments(iterable)) { + return Array.prototype[$iterator].call(iterable); + } + }; + } else { + isArray2 = require_isarray(); + isString2 = require_is_string(); + GetIntrinsic = require_get_intrinsic(); + $Map = GetIntrinsic("%Map%", true); + $Set = GetIntrinsic("%Set%", true); + callBound = require_callBound(); + $arrayPush = callBound("Array.prototype.push"); + $charCodeAt = callBound("String.prototype.charCodeAt"); + $stringSlice = callBound("String.prototype.slice"); + advanceStringIndex = function advanceStringIndex2(S2, index) { + var length = S2.length; + if (index + 1 >= length) { + return index + 1; + } + var first = $charCodeAt(S2, index); + if (first < 55296 || first > 56319) { + return index + 1; + } + var second = $charCodeAt(S2, index + 1); + if (second < 56320 || second > 57343) { + return index + 1; + } + return index + 2; + }; + getArrayIterator = function getArrayIterator2(arraylike) { + var i3 = 0; + return { + next: function next() { + var done = i3 >= arraylike.length; + var value; + if (!done) { + value = arraylike[i3]; + i3 += 1; + } + return { + done, + value + }; + } + }; + }; + getNonCollectionIterator = function getNonCollectionIterator2(iterable, noPrimordialCollections) { + if (isArray2(iterable) || isArguments(iterable)) { + return getArrayIterator(iterable); + } + if (isString2(iterable)) { + var i3 = 0; + return { + next: function next() { + var nextIndex = advanceStringIndex(iterable, i3); + var value = $stringSlice(iterable, i3, nextIndex); + i3 = nextIndex; + return { + done: nextIndex > iterable.length, + value + }; } }; } - module4.exports = exports3["default"]; - }, {}], 7: [function(require2, module4, exports3) { - "use strict"; - Object.defineProperty(exports3, "__esModule", { - value: true + if (noPrimordialCollections && typeof iterable["_es6-shim iterator_"] !== "undefined") { + return iterable["_es6-shim iterator_"](); + } + }; + if (!$Map && !$Set) { + module2.exports = function getIterator(iterable) { + if (iterable != null) { + return getNonCollectionIterator(iterable, true); + } + }; + } else { + isMap = require_is_map(); + isSet = require_is_set(); + $mapForEach = callBound("Map.prototype.forEach", true); + $setForEach = callBound("Set.prototype.forEach", true); + if (typeof process === "undefined" || !process.versions || !process.versions.node) { + $mapIterator = callBound("Map.prototype.iterator", true); + $setIterator = callBound("Set.prototype.iterator", true); + } + $mapAtAtIterator = callBound("Map.prototype.@@iterator", true) || callBound("Map.prototype._es6-shim iterator_", true); + $setAtAtIterator = callBound("Set.prototype.@@iterator", true) || callBound("Set.prototype._es6-shim iterator_", true); + getCollectionIterator = function getCollectionIterator2(iterable) { + if (isMap(iterable)) { + if ($mapIterator) { + return getStopIterationIterator($mapIterator(iterable)); + } + if ($mapAtAtIterator) { + return $mapAtAtIterator(iterable); + } + if ($mapForEach) { + var entries = []; + $mapForEach(iterable, function(v3, k3) { + $arrayPush(entries, [k3, v3]); + }); + return getArrayIterator(entries); + } + } + if (isSet(iterable)) { + if ($setIterator) { + return getStopIterationIterator($setIterator(iterable)); + } + if ($setAtAtIterator) { + return $setAtAtIterator(iterable); + } + if ($setForEach) { + var values = []; + $setForEach(iterable, function(v3) { + $arrayPush(values, v3); + }); + return getArrayIterator(values); + } + } + }; + module2.exports = function getIterator(iterable) { + return getCollectionIterator(iterable) || getNonCollectionIterator(iterable); + }; + } + } + var $iterator; + var isArray2; + var isString2; + var GetIntrinsic; + var $Map; + var $Set; + var callBound; + var $arrayPush; + var $charCodeAt; + var $stringSlice; + var advanceStringIndex; + var getArrayIterator; + var getNonCollectionIterator; + var isMap; + var isSet; + var $mapForEach; + var $setForEach; + var $mapIterator; + var $setIterator; + var $mapAtAtIterator; + var $setAtAtIterator; + var getCollectionIterator; + } +}); + +// node_modules/object-is/implementation.js +var require_implementation5 = __commonJS({ + "node_modules/object-is/implementation.js"(exports, module2) { + "use strict"; + var numberIsNaN = function(value) { + return value !== value; + }; + module2.exports = function is(a3, b3) { + if (a3 === 0 && b3 === 0) { + return 1 / a3 === 1 / b3; + } + if (a3 === b3) { + return true; + } + if (numberIsNaN(a3) && numberIsNaN(b3)) { + return true; + } + return false; + }; + } +}); + +// node_modules/object-is/polyfill.js +var require_polyfill3 = __commonJS({ + "node_modules/object-is/polyfill.js"(exports, module2) { + "use strict"; + var implementation = require_implementation5(); + module2.exports = function getPolyfill() { + return typeof Object.is === "function" ? Object.is : implementation; + }; + } +}); + +// node_modules/object-is/shim.js +var require_shim3 = __commonJS({ + "node_modules/object-is/shim.js"(exports, module2) { + "use strict"; + var getPolyfill = require_polyfill3(); + var define2 = require_define_properties(); + module2.exports = function shimObjectIs() { + var polyfill = getPolyfill(); + define2(Object, { is: polyfill }, { + is: function testObjectIs() { + return Object.is !== polyfill; + } + }); + return polyfill; + }; + } +}); + +// node_modules/object-is/index.js +var require_object_is = __commonJS({ + "node_modules/object-is/index.js"(exports, module2) { + "use strict"; + var define2 = require_define_properties(); + var callBind = require_call_bind(); + var implementation = require_implementation5(); + var getPolyfill = require_polyfill3(); + var shim = require_shim3(); + var polyfill = callBind(getPolyfill(), Object); + define2(polyfill, { + getPolyfill, + implementation, + shim + }); + module2.exports = polyfill; + } +}); + +// node_modules/is-callable/index.js +var require_is_callable = __commonJS({ + "node_modules/is-callable/index.js"(exports, module2) { + "use strict"; + var fnToStr = Function.prototype.toString; + var reflectApply = typeof Reflect === "object" && Reflect !== null && Reflect.apply; + var badArrayLike; + var isCallableMarker; + if (typeof reflectApply === "function" && typeof Object.defineProperty === "function") { + try { + badArrayLike = Object.defineProperty({}, "length", { + get: function() { + throw isCallableMarker; + } }); - exports3["default"] = fuzzyUrlEquals; - function fuzzyUrlEquals(one, other) { - return fuzzyIncludes(one, other) || fuzzyIncludes(other, one); - } - ; - function fuzzyIncludes(one, other) { - return one.indexOf(other) !== -1 || other.charAt(other.length - 1) === "/" && one.indexOf(other.slice(0, -1)) !== -1; + isCallableMarker = {}; + reflectApply(function() { + throw 42; + }, null, badArrayLike); + } catch (_3) { + if (_3 !== isCallableMarker) { + reflectApply = null; } - module4.exports = exports3["default"]; - }, {}], 8: [function(require2, module4, exports3) { - "use strict"; - Object.defineProperty(exports3, "__esModule", { - value: true - }); - function _interopExportWildcard(obj, defaults) { - var newObj = defaults({}, obj); - delete newObj["default"]; - return newObj; + } + } else { + reflectApply = null; + } + var constructorRegex = /^\s*class\b/; + var isES6ClassFn = function isES6ClassFunction(value) { + try { + var fnStr = fnToStr.call(value); + return constructorRegex.test(fnStr); + } catch (e3) { + return false; + } + }; + var tryFunctionObject = function tryFunctionToStr(value) { + try { + if (isES6ClassFn(value)) { + return false; } - function _defaults(obj, defaults) { - var keys = Object.getOwnPropertyNames(defaults); - for (var i3 = 0; i3 < keys.length; i3++) { - var key = keys[i3]; - var value = Object.getOwnPropertyDescriptor(defaults, key); - if (value && value.configurable && obj[key] === void 0) { - Object.defineProperty(obj, key, value); + fnToStr.call(value); + return true; + } catch (e3) { + return false; + } + }; + var toStr = Object.prototype.toString; + var objectClass = "[object Object]"; + var fnClass = "[object Function]"; + var genClass = "[object GeneratorFunction]"; + var ddaClass = "[object HTMLAllCollection]"; + var ddaClass2 = "[object HTML document.all class]"; + var ddaClass3 = "[object HTMLCollection]"; + var hasToStringTag = typeof Symbol === "function" && !!Symbol.toStringTag; + var isIE68 = !(0 in [,]); + var isDDA = function isDocumentDotAll() { + return false; + }; + if (typeof document === "object") { + all = document.all; + if (toStr.call(all) === toStr.call(document.all)) { + isDDA = function isDocumentDotAll(value) { + if ((isIE68 || !value) && (typeof value === "undefined" || typeof value === "object")) { + try { + var str = toStr.call(value); + return (str === ddaClass || str === ddaClass2 || str === ddaClass3 || str === objectClass) && value("") == null; + } catch (e3) { } } - return obj; + return false; + }; + } + } + var all; + module2.exports = reflectApply ? function isCallable(value) { + if (isDDA(value)) { + return true; + } + if (!value) { + return false; + } + if (typeof value !== "function" && typeof value !== "object") { + return false; + } + try { + reflectApply(value, null, badArrayLike); + } catch (e3) { + if (e3 !== isCallableMarker) { + return false; } - function _interopRequireWildcard(obj) { - if (obj && obj.__esModule) { - return obj; + } + return !isES6ClassFn(value) && tryFunctionObject(value); + } : function isCallable(value) { + if (isDDA(value)) { + return true; + } + if (!value) { + return false; + } + if (typeof value !== "function" && typeof value !== "object") { + return false; + } + if (hasToStringTag) { + return tryFunctionObject(value); + } + if (isES6ClassFn(value)) { + return false; + } + var strClass = toStr.call(value); + if (strClass !== fnClass && strClass !== genClass && !/^\[object HTML/.test(strClass)) { + return false; + } + return tryFunctionObject(value); + }; + } +}); + +// node_modules/for-each/index.js +var require_for_each = __commonJS({ + "node_modules/for-each/index.js"(exports, module2) { + "use strict"; + var isCallable = require_is_callable(); + var toStr = Object.prototype.toString; + var hasOwnProperty3 = Object.prototype.hasOwnProperty; + var forEachArray = function forEachArray2(array, iterator, receiver) { + for (var i3 = 0, len = array.length; i3 < len; i3++) { + if (hasOwnProperty3.call(array, i3)) { + if (receiver == null) { + iterator(array[i3], i3, array); } else { - var newObj = {}; - if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) - newObj[key] = obj[key]; - } - } - newObj["default"] = obj; - return newObj; + iterator.call(receiver, array[i3], i3, array); } } - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { "default": obj }; + } + }; + var forEachString = function forEachString2(string, iterator, receiver) { + for (var i3 = 0, len = string.length; i3 < len; i3++) { + if (receiver == null) { + iterator(string.charAt(i3), i3, string); + } else { + iterator.call(receiver, string.charAt(i3), i3, string); } - var _debug = require2("./debug"); - var _debug2 = _interopRequireDefault(_debug); - var _namespace = require2("./namespace"); - var ns2 = _interopRequireWildcard(_namespace); - var _request = require2("./request"); - var request3 = _interopRequireWildcard(_request); - var _transport = require2("./transport"); - var transport3 = _interopRequireWildcard(_transport); - var _package = require2("../package"); - Object.defineProperty(exports3, "version", { - enumerable: true, - get: function get() { - return _package.version; - } - }); - var _accounts = require2("./accounts"); - Object.defineProperty(exports3, "createAccount", { - enumerable: true, - get: function get() { - return _accounts.createAccount; + } + }; + var forEachObject = function forEachObject2(object, iterator, receiver) { + for (var k3 in object) { + if (hasOwnProperty3.call(object, k3)) { + if (receiver == null) { + iterator(object[k3], k3, object); + } else { + iterator.call(receiver, object[k3], k3, object); } - }); - var _calendars = require2("./calendars"); - _defaults(exports3, _interopExportWildcard(_calendars, _defaults)); - var _client = require2("./client"); - Object.defineProperty(exports3, "Client", { - enumerable: true, - get: function get() { - return _client.Client; + } + } + }; + var forEach = function forEach2(list, iterator, thisArg) { + if (!isCallable(iterator)) { + throw new TypeError("iterator must be a function"); + } + var receiver; + if (arguments.length >= 3) { + receiver = thisArg; + } + if (toStr.call(list) === "[object Array]") { + forEachArray(list, iterator, receiver); + } else if (typeof list === "string") { + forEachString(list, iterator, receiver); + } else { + forEachObject(list, iterator, receiver); + } + }; + module2.exports = forEach; + } +}); + +// node_modules/available-typed-arrays/index.js +var require_available_typed_arrays = __commonJS({ + "node_modules/available-typed-arrays/index.js"(exports, module2) { + "use strict"; + var possibleNames = [ + "BigInt64Array", + "BigUint64Array", + "Float32Array", + "Float64Array", + "Int16Array", + "Int32Array", + "Int8Array", + "Uint16Array", + "Uint32Array", + "Uint8Array", + "Uint8ClampedArray" + ]; + var g4 = typeof globalThis === "undefined" ? global : globalThis; + module2.exports = function availableTypedArrays() { + var out = []; + for (var i3 = 0; i3 < possibleNames.length; i3++) { + if (typeof g4[possibleNames[i3]] === "function") { + out[out.length] = possibleNames[i3]; + } + } + return out; + }; + } +}); + +// node_modules/gopd/index.js +var require_gopd = __commonJS({ + "node_modules/gopd/index.js"(exports, module2) { + "use strict"; + var GetIntrinsic = require_get_intrinsic(); + var $gOPD = GetIntrinsic("%Object.getOwnPropertyDescriptor%", true); + if ($gOPD) { + try { + $gOPD([], "length"); + } catch (e3) { + $gOPD = null; + } + } + module2.exports = $gOPD; + } +}); + +// node_modules/is-typed-array/index.js +var require_is_typed_array = __commonJS({ + "node_modules/is-typed-array/index.js"(exports, module2) { + "use strict"; + var forEach = require_for_each(); + var availableTypedArrays = require_available_typed_arrays(); + var callBound = require_callBound(); + var $toString = callBound("Object.prototype.toString"); + var hasToStringTag = require_shams2()(); + var gOPD = require_gopd(); + var g4 = typeof globalThis === "undefined" ? global : globalThis; + var typedArrays = availableTypedArrays(); + var $indexOf = callBound("Array.prototype.indexOf", true) || function indexOf(array, value) { + for (var i3 = 0; i3 < array.length; i3 += 1) { + if (array[i3] === value) { + return i3; + } + } + return -1; + }; + var $slice = callBound("String.prototype.slice"); + var toStrTags = {}; + var getPrototypeOf = Object.getPrototypeOf; + if (hasToStringTag && gOPD && getPrototypeOf) { + forEach(typedArrays, function(typedArray) { + var arr = new g4[typedArray](); + if (Symbol.toStringTag in arr) { + var proto = getPrototypeOf(arr); + var descriptor = gOPD(proto, Symbol.toStringTag); + if (!descriptor) { + var superProto = getPrototypeOf(proto); + descriptor = gOPD(superProto, Symbol.toStringTag); + } + toStrTags[typedArray] = descriptor.get; + } + }); + } + var tryTypedArrays = function tryAllTypedArrays(value) { + var anyTrue = false; + forEach(toStrTags, function(getter, typedArray) { + if (!anyTrue) { + try { + anyTrue = getter.call(value) === typedArray; + } catch (e3) { } - }); - var _contacts = require2("./contacts"); - _defaults(exports3, _interopExportWildcard(_contacts, _defaults)); - var _model = require2("./model"); - _defaults(exports3, _interopExportWildcard(_model, _defaults)); - Object.defineProperty(exports3, "Request", { - enumerable: true, - get: function get() { - return _request.Request; + } + }); + return anyTrue; + }; + module2.exports = function isTypedArray(value) { + if (!value || typeof value !== "object") { + return false; + } + if (!hasToStringTag || !(Symbol.toStringTag in value)) { + var tag = $slice($toString(value), 8, -1); + return $indexOf(typedArrays, tag) > -1; + } + if (!gOPD) { + return false; + } + return tryTypedArrays(value); + }; + } +}); + +// node_modules/is-array-buffer/index.js +var require_is_array_buffer = __commonJS({ + "node_modules/is-array-buffer/index.js"(exports, module2) { + "use strict"; + var callBind = require_call_bind(); + var callBound = require_callBound(); + var GetIntrinsic = require_get_intrinsic(); + var isTypedArray = require_is_typed_array(); + var $ArrayBuffer = GetIntrinsic("ArrayBuffer", true); + var $Float32Array = GetIntrinsic("Float32Array", true); + var $byteLength = callBound("ArrayBuffer.prototype.byteLength", true); + var abSlice = $ArrayBuffer && !$byteLength && new $ArrayBuffer().slice; + var $abSlice = abSlice && callBind(abSlice); + module2.exports = $byteLength || $abSlice ? function isArrayBuffer(obj) { + if (!obj || typeof obj !== "object") { + return false; + } + try { + if ($byteLength) { + $byteLength(obj); + } else { + $abSlice(obj, 0); + } + return true; + } catch (e3) { + return false; + } + } : $Float32Array ? function IsArrayBuffer(obj) { + try { + return new $Float32Array(obj).buffer === obj && !isTypedArray(obj); + } catch (e3) { + return typeof obj === "object" && e3.name === "RangeError"; + } + } : function isArrayBuffer(obj) { + return false; + }; + } +}); + +// node_modules/is-date-object/index.js +var require_is_date_object = __commonJS({ + "node_modules/is-date-object/index.js"(exports, module2) { + "use strict"; + var getDay = Date.prototype.getDay; + var tryDateObject = function tryDateGetDayCall(value) { + try { + getDay.call(value); + return true; + } catch (e3) { + return false; + } + }; + var toStr = Object.prototype.toString; + var dateClass = "[object Date]"; + var hasToStringTag = require_shams2()(); + module2.exports = function isDateObject(value) { + if (typeof value !== "object" || value === null) { + return false; + } + return hasToStringTag ? tryDateObject(value) : toStr.call(value) === dateClass; + }; + } +}); + +// node_modules/is-regex/index.js +var require_is_regex = __commonJS({ + "node_modules/is-regex/index.js"(exports, module2) { + "use strict"; + var callBound = require_callBound(); + var hasToStringTag = require_shams2()(); + var has; + var $exec; + var isRegexMarker; + var badStringifier; + if (hasToStringTag) { + has = callBound("Object.prototype.hasOwnProperty"); + $exec = callBound("RegExp.prototype.exec"); + isRegexMarker = {}; + throwRegexMarker = function() { + throw isRegexMarker; + }; + badStringifier = { + toString: throwRegexMarker, + valueOf: throwRegexMarker + }; + if (typeof Symbol.toPrimitive === "symbol") { + badStringifier[Symbol.toPrimitive] = throwRegexMarker; + } + } + var throwRegexMarker; + var $toString = callBound("Object.prototype.toString"); + var gOPD = Object.getOwnPropertyDescriptor; + var regexClass = "[object RegExp]"; + module2.exports = hasToStringTag ? function isRegex(value) { + if (!value || typeof value !== "object") { + return false; + } + var descriptor = gOPD(value, "lastIndex"); + var hasLastIndexDataProperty = descriptor && has(descriptor, "value"); + if (!hasLastIndexDataProperty) { + return false; + } + try { + $exec(value, badStringifier); + } catch (e3) { + return e3 === isRegexMarker; + } + } : function isRegex(value) { + if (!value || typeof value !== "object" && typeof value !== "function") { + return false; + } + return $toString(value) === regexClass; + }; + } +}); + +// node_modules/is-shared-array-buffer/index.js +var require_is_shared_array_buffer = __commonJS({ + "node_modules/is-shared-array-buffer/index.js"(exports, module2) { + "use strict"; + var callBound = require_callBound(); + var $byteLength = callBound("SharedArrayBuffer.prototype.byteLength", true); + module2.exports = $byteLength ? function isSharedArrayBuffer(obj) { + if (!obj || typeof obj !== "object") { + return false; + } + try { + $byteLength(obj); + return true; + } catch (e3) { + return false; + } + } : function isSharedArrayBuffer(obj) { + return false; + }; + } +}); + +// node_modules/is-number-object/index.js +var require_is_number_object = __commonJS({ + "node_modules/is-number-object/index.js"(exports, module2) { + "use strict"; + var numToStr = Number.prototype.toString; + var tryNumberObject = function tryNumberObject2(value) { + try { + numToStr.call(value); + return true; + } catch (e3) { + return false; + } + }; + var toStr = Object.prototype.toString; + var numClass = "[object Number]"; + var hasToStringTag = require_shams2()(); + module2.exports = function isNumberObject(value) { + if (typeof value === "number") { + return true; + } + if (typeof value !== "object") { + return false; + } + return hasToStringTag ? tryNumberObject(value) : toStr.call(value) === numClass; + }; + } +}); + +// node_modules/is-boolean-object/index.js +var require_is_boolean_object = __commonJS({ + "node_modules/is-boolean-object/index.js"(exports, module2) { + "use strict"; + var callBound = require_callBound(); + var $boolToStr = callBound("Boolean.prototype.toString"); + var $toString = callBound("Object.prototype.toString"); + var tryBooleanObject = function booleanBrandCheck(value) { + try { + $boolToStr(value); + return true; + } catch (e3) { + return false; + } + }; + var boolClass = "[object Boolean]"; + var hasToStringTag = require_shams2()(); + module2.exports = function isBoolean(value) { + if (typeof value === "boolean") { + return true; + } + if (value === null || typeof value !== "object") { + return false; + } + return hasToStringTag && Symbol.toStringTag in value ? tryBooleanObject(value) : $toString(value) === boolClass; + }; + } +}); + +// node_modules/is-symbol/index.js +var require_is_symbol = __commonJS({ + "node_modules/is-symbol/index.js"(exports, module2) { + "use strict"; + var toStr = Object.prototype.toString; + var hasSymbols = require_has_symbols()(); + if (hasSymbols) { + symToStr = Symbol.prototype.toString; + symStringRegex = /^Symbol\(.*\)$/; + isSymbolObject = function isRealSymbolObject(value) { + if (typeof value.valueOf() !== "symbol") { + return false; + } + return symStringRegex.test(symToStr.call(value)); + }; + module2.exports = function isSymbol(value) { + if (typeof value === "symbol") { + return true; + } + if (toStr.call(value) !== "[object Symbol]") { + return false; + } + try { + return isSymbolObject(value); + } catch (e3) { + return false; + } + }; + } else { + module2.exports = function isSymbol(value) { + return false; + }; + } + var symToStr; + var symStringRegex; + var isSymbolObject; + } +}); + +// node_modules/has-bigints/index.js +var require_has_bigints = __commonJS({ + "node_modules/has-bigints/index.js"(exports, module2) { + "use strict"; + var $BigInt = typeof BigInt !== "undefined" && BigInt; + module2.exports = function hasNativeBigInts() { + return typeof $BigInt === "function" && typeof BigInt === "function" && typeof $BigInt(42) === "bigint" && typeof BigInt(42) === "bigint"; + }; + } +}); + +// node_modules/is-bigint/index.js +var require_is_bigint = __commonJS({ + "node_modules/is-bigint/index.js"(exports, module2) { + "use strict"; + var hasBigInts = require_has_bigints()(); + if (hasBigInts) { + bigIntValueOf = BigInt.prototype.valueOf; + tryBigInt = function tryBigIntObject(value) { + try { + bigIntValueOf.call(value); + return true; + } catch (e3) { + } + return false; + }; + module2.exports = function isBigInt(value) { + if (value === null || typeof value === "undefined" || typeof value === "boolean" || typeof value === "string" || typeof value === "number" || typeof value === "symbol" || typeof value === "function") { + return false; + } + if (typeof value === "bigint") { + return true; + } + return tryBigInt(value); + }; + } else { + module2.exports = function isBigInt(value) { + return false; + }; + } + var bigIntValueOf; + var tryBigInt; + } +}); + +// node_modules/which-boxed-primitive/index.js +var require_which_boxed_primitive = __commonJS({ + "node_modules/which-boxed-primitive/index.js"(exports, module2) { + "use strict"; + var isString2 = require_is_string(); + var isNumber3 = require_is_number_object(); + var isBoolean = require_is_boolean_object(); + var isSymbol = require_is_symbol(); + var isBigInt = require_is_bigint(); + module2.exports = function whichBoxedPrimitive(value) { + if (value == null || typeof value !== "object" && typeof value !== "function") { + return null; + } + if (isString2(value)) { + return "String"; + } + if (isNumber3(value)) { + return "Number"; + } + if (isBoolean(value)) { + return "Boolean"; + } + if (isSymbol(value)) { + return "Symbol"; + } + if (isBigInt(value)) { + return "BigInt"; + } + }; + } +}); + +// node_modules/is-weakmap/index.js +var require_is_weakmap = __commonJS({ + "node_modules/is-weakmap/index.js"(exports, module2) { + "use strict"; + var $WeakMap = typeof WeakMap === "function" && WeakMap.prototype ? WeakMap : null; + var $WeakSet = typeof WeakSet === "function" && WeakSet.prototype ? WeakSet : null; + var exported; + if (!$WeakMap) { + exported = function isWeakMap(x3) { + return false; + }; + } + var $mapHas = $WeakMap ? $WeakMap.prototype.has : null; + var $setHas = $WeakSet ? $WeakSet.prototype.has : null; + if (!exported && !$mapHas) { + exported = function isWeakMap(x3) { + return false; + }; + } + module2.exports = exported || function isWeakMap(x3) { + if (!x3 || typeof x3 !== "object") { + return false; + } + try { + $mapHas.call(x3, $mapHas); + if ($setHas) { + try { + $setHas.call(x3, $setHas); + } catch (e3) { + return true; } - }); - var _sandbox = require2("./sandbox"); - Object.defineProperty(exports3, "Sandbox", { - enumerable: true, - get: function get() { - return _sandbox.Sandbox; + } + return x3 instanceof $WeakMap; + } catch (e3) { + } + return false; + }; + } +}); + +// node_modules/is-weakset/index.js +var require_is_weakset = __commonJS({ + "node_modules/is-weakset/index.js"(exports, module2) { + "use strict"; + var GetIntrinsic = require_get_intrinsic(); + var callBound = require_callBound(); + var $WeakSet = GetIntrinsic("%WeakSet%", true); + var $setHas = callBound("WeakSet.prototype.has", true); + if ($setHas) { + $mapHas = callBound("WeakMap.prototype.has", true); + module2.exports = function isWeakSet(x3) { + if (!x3 || typeof x3 !== "object") { + return false; + } + try { + $setHas(x3, $setHas); + if ($mapHas) { + try { + $mapHas(x3, $mapHas); + } catch (e3) { + return true; + } } - }); - Object.defineProperty(exports3, "createSandbox", { - enumerable: true, - get: function get() { - return _sandbox.createSandbox; + return x3 instanceof $WeakSet; + } catch (e3) { + } + return false; + }; + } else { + module2.exports = function isWeakSet(x3) { + return false; + }; + } + var $mapHas; + } +}); + +// node_modules/which-collection/index.js +var require_which_collection = __commonJS({ + "node_modules/which-collection/index.js"(exports, module2) { + "use strict"; + var isMap = require_is_map(); + var isSet = require_is_set(); + var isWeakMap = require_is_weakmap(); + var isWeakSet = require_is_weakset(); + module2.exports = function whichCollection(value) { + if (value && typeof value === "object") { + if (isMap(value)) { + return "Map"; + } + if (isSet(value)) { + return "Set"; + } + if (isWeakMap(value)) { + return "WeakMap"; + } + if (isWeakSet(value)) { + return "WeakSet"; + } + } + return false; + }; + } +}); + +// node_modules/which-typed-array/index.js +var require_which_typed_array = __commonJS({ + "node_modules/which-typed-array/index.js"(exports, module2) { + "use strict"; + var forEach = require_for_each(); + var availableTypedArrays = require_available_typed_arrays(); + var callBound = require_callBound(); + var gOPD = require_gopd(); + var $toString = callBound("Object.prototype.toString"); + var hasToStringTag = require_shams2()(); + var g4 = typeof globalThis === "undefined" ? global : globalThis; + var typedArrays = availableTypedArrays(); + var $slice = callBound("String.prototype.slice"); + var toStrTags = {}; + var getPrototypeOf = Object.getPrototypeOf; + if (hasToStringTag && gOPD && getPrototypeOf) { + forEach(typedArrays, function(typedArray) { + if (typeof g4[typedArray] === "function") { + var arr = new g4[typedArray](); + if (Symbol.toStringTag in arr) { + var proto = getPrototypeOf(arr); + var descriptor = gOPD(proto, Symbol.toStringTag); + if (!descriptor) { + var superProto = getPrototypeOf(proto); + descriptor = gOPD(superProto, Symbol.toStringTag); + } + toStrTags[typedArray] = descriptor.get; } - }); - exports3.debug = _debug2["default"]; - exports3.ns = ns2; - exports3.request = request3; - exports3.transport = transport3; - }, { "../package": 33, "./accounts": 1, "./calendars": 2, "./client": 4, "./contacts": 5, "./debug": 6, "./model": 9, "./namespace": 10, "./request": 12, "./sandbox": 13, "./transport": 21 }], 9: [function(require2, module4, exports3) { - "use strict"; - Object.defineProperty(exports3, "__esModule", { - value: true - }); - var _get = function get(_x, _x2, _x3) { - var _again = true; - _function: - while (_again) { - var object = _x, property = _x2, receiver = _x3; - _again = false; - if (object === null) - object = Function.prototype; - var desc = Object.getOwnPropertyDescriptor(object, property); - if (desc === void 0) { - var parent = Object.getPrototypeOf(object); - if (parent === null) { - return void 0; - } else { - _x = parent; - _x2 = property; - _x3 = receiver; - _again = true; - desc = parent = void 0; - continue _function; - } - } else if ("value" in desc) { - return desc.value; - } else { - var getter = desc.get; - if (getter === void 0) { - return void 0; - } - return getter.call(receiver); - } + } + }); + } + var tryTypedArrays = function tryAllTypedArrays(value) { + var foundName = false; + forEach(toStrTags, function(getter, typedArray) { + if (!foundName) { + try { + var name = getter.call(value); + if (name === typedArray) { + foundName = name; } - }; - function _inherits(subClass, superClass) { - if (typeof superClass !== "function" && superClass !== null) { - throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); + } catch (e3) { } - subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); - if (superClass) - Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } + }); + return foundName; + }; + var isTypedArray = require_is_typed_array(); + module2.exports = function whichTypedArray(value) { + if (!isTypedArray(value)) { + return false; + } + if (!hasToStringTag || !(Symbol.toStringTag in value)) { + return $slice($toString(value), 8, -1); + } + return tryTypedArrays(value); + }; + } +}); + +// node_modules/deep-equal/index.js +var require_deep_equal = __commonJS({ + "node_modules/deep-equal/index.js"(exports, module2) { + "use strict"; + var assign = require_object(); + var callBound = require_callBound(); + var flags = require_regexp_prototype(); + var GetIntrinsic = require_get_intrinsic(); + var getIterator = require_es_get_iterator(); + var getSideChannel = require_side_channel(); + var is = require_object_is(); + var isArguments = require_is_arguments(); + var isArray2 = require_isarray(); + var isArrayBuffer = require_is_array_buffer(); + var isDate3 = require_is_date_object(); + var isRegex = require_is_regex(); + var isSharedArrayBuffer = require_is_shared_array_buffer(); + var objectKeys = require_object_keys(); + var whichBoxedPrimitive = require_which_boxed_primitive(); + var whichCollection = require_which_collection(); + var whichTypedArray = require_which_typed_array(); + var byteLength = callBound("ArrayBuffer.prototype.byteLength", true) || function byteLength2(ab) { + return ab.byteLength; + }; + var sabByteLength = callBound("SharedArrayBuffer.prototype.byteLength", true); + var $getTime = callBound("Date.prototype.getTime"); + var gPO = Object.getPrototypeOf; + var $objToString = callBound("Object.prototype.toString"); + var $Set = GetIntrinsic("%Set%", true); + var $mapHas = callBound("Map.prototype.has", true); + var $mapGet = callBound("Map.prototype.get", true); + var $mapSize = callBound("Map.prototype.size", true); + var $setAdd = callBound("Set.prototype.add", true); + var $setDelete = callBound("Set.prototype.delete", true); + var $setHas = callBound("Set.prototype.has", true); + var $setSize = callBound("Set.prototype.size", true); + function setHasEqualElement(set, val1, opts, channel) { + var i3 = getIterator(set); + var result; + while ((result = i3.next()) && !result.done) { + if (internalDeepEqual(val1, result.value, opts, channel)) { + $setDelete(set, result.value); + return true; } - var Account = function Account2(options) { - _classCallCheck(this, Account2); - Object.assign(this, { - server: null, - credentials: null, - rootUrl: null, - principalUrl: null, - homeUrl: null, - calendars: null, - addressBooks: null - }, options); - }; - exports3.Account = Account; - var Credentials3 = function Credentials4(options) { - _classCallCheck(this, Credentials4); - Object.assign(this, { - username: null, - password: null, - clientId: null, - clientSecret: null, - authorizationCode: null, - redirectUrl: null, - tokenUrl: null, - accessToken: null, - refreshToken: null, - expiration: null - }, options); - }; - exports3.Credentials = Credentials3; - var DAVCollection = function DAVCollection2(options) { - _classCallCheck(this, DAVCollection2); - Object.assign(this, { - data: null, - objects: null, - account: null, - ctag: null, - description: null, - displayName: null, - reports: null, - resourcetype: null, - syncToken: null, - url: null - }, options); - }; - exports3.DAVCollection = DAVCollection; - var AddressBook = function(_DAVCollection) { - _inherits(AddressBook2, _DAVCollection); - function AddressBook2(options) { - _classCallCheck(this, AddressBook2); - _get(Object.getPrototypeOf(AddressBook2.prototype), "constructor", this).call(this, options); + } + return false; + } + function findLooseMatchingPrimitives(prim) { + if (typeof prim === "undefined") { + return null; + } + if (typeof prim === "object") { + return void 0; + } + if (typeof prim === "symbol") { + return false; + } + if (typeof prim === "string" || typeof prim === "number") { + return +prim === +prim; + } + return true; + } + function mapMightHaveLoosePrim(a3, b3, prim, item, opts, channel) { + var altValue = findLooseMatchingPrimitives(prim); + if (altValue != null) { + return altValue; + } + var curB = $mapGet(b3, altValue); + var looseOpts = assign({}, opts, { strict: false }); + if (typeof curB === "undefined" && !$mapHas(b3, altValue) || !internalDeepEqual(item, curB, looseOpts, channel)) { + return false; + } + return !$mapHas(a3, altValue) && internalDeepEqual(item, curB, looseOpts, channel); + } + function setMightHaveLoosePrim(a3, b3, prim) { + var altValue = findLooseMatchingPrimitives(prim); + if (altValue != null) { + return altValue; + } + return $setHas(b3, altValue) && !$setHas(a3, altValue); + } + function mapHasEqualEntry(set, map, key1, item1, opts, channel) { + var i3 = getIterator(set); + var result; + var key2; + while ((result = i3.next()) && !result.done) { + key2 = result.value; + if (internalDeepEqual(key1, key2, opts, channel) && internalDeepEqual(item1, $mapGet(map, key2), opts, channel)) { + $setDelete(set, key2); + return true; + } + } + return false; + } + function internalDeepEqual(actual, expected, options, channel) { + var opts = options || {}; + if (opts.strict ? is(actual, expected) : actual === expected) { + return true; + } + var actualBoxed = whichBoxedPrimitive(actual); + var expectedBoxed = whichBoxedPrimitive(expected); + if (actualBoxed !== expectedBoxed) { + return false; + } + if (!actual || !expected || typeof actual !== "object" && typeof expected !== "object") { + return opts.strict ? is(actual, expected) : actual == expected; + } + var hasActual = channel.has(actual); + var hasExpected = channel.has(expected); + var sentinel; + if (hasActual && hasExpected) { + if (channel.get(actual) === channel.get(expected)) { + return true; + } + } else { + sentinel = {}; + } + if (!hasActual) { + channel.set(actual, sentinel); + } + if (!hasExpected) { + channel.set(expected, sentinel); + } + return objEquiv(actual, expected, opts, channel); + } + function isBuffer(x3) { + if (!x3 || typeof x3 !== "object" || typeof x3.length !== "number") { + return false; + } + if (typeof x3.copy !== "function" || typeof x3.slice !== "function") { + return false; + } + if (x3.length > 0 && typeof x3[0] !== "number") { + return false; + } + return !!(x3.constructor && x3.constructor.isBuffer && x3.constructor.isBuffer(x3)); + } + function setEquiv(a3, b3, opts, channel) { + if ($setSize(a3) !== $setSize(b3)) { + return false; + } + var iA = getIterator(a3); + var iB = getIterator(b3); + var resultA; + var resultB; + var set; + while ((resultA = iA.next()) && !resultA.done) { + if (resultA.value && typeof resultA.value === "object") { + if (!set) { + set = new $Set(); + } + $setAdd(set, resultA.value); + } else if (!$setHas(b3, resultA.value)) { + if (opts.strict) { + return false; } - return AddressBook2; - }(DAVCollection); - exports3.AddressBook = AddressBook; - var Calendar3 = function(_DAVCollection2) { - _inherits(Calendar4, _DAVCollection2); - function Calendar4(options) { - _classCallCheck(this, Calendar4); - _get(Object.getPrototypeOf(Calendar4.prototype), "constructor", this).call(this, options); - Object.assign(this, { - components: null, - timezone: null - }, options); + if (!setMightHaveLoosePrim(a3, b3, resultA.value)) { + return false; } - return Calendar4; - }(DAVCollection); - exports3.Calendar = Calendar3; - var DAVObject = function DAVObject2(options) { - _classCallCheck(this, DAVObject2); - Object.assign(this, { - data: null, - etag: null, - url: null - }, options); - }; - exports3.DAVObject = DAVObject; - var CalendarObject = function(_DAVObject) { - _inherits(CalendarObject2, _DAVObject); - function CalendarObject2(options) { - _classCallCheck(this, CalendarObject2); - _get(Object.getPrototypeOf(CalendarObject2.prototype), "constructor", this).call(this, options); - Object.assign(this, { - calendar: null, - calendarData: null - }, options); + if (!set) { + set = new $Set(); } - return CalendarObject2; - }(DAVObject); - exports3.CalendarObject = CalendarObject; - var VCard = function(_DAVObject2) { - _inherits(VCard2, _DAVObject2); - function VCard2(options) { - _classCallCheck(this, VCard2); - _get(Object.getPrototypeOf(VCard2.prototype), "constructor", this).call(this, options); - Object.assign(this, { - addressBook: null, - addressData: null - }, options); + $setAdd(set, resultA.value); + } + } + if (set) { + while ((resultB = iB.next()) && !resultB.done) { + if (resultB.value && typeof resultB.value === "object") { + if (!setHasEqualElement(set, resultB.value, opts.strict, channel)) { + return false; + } + } else if (!opts.strict && !$setHas(a3, resultB.value) && !setHasEqualElement(set, resultB.value, opts.strict, channel)) { + return false; } - return VCard2; - }(DAVObject); - exports3.VCard = VCard; - }, {}], 10: [function(require2, module4, exports3) { - "use strict"; - Object.defineProperty(exports3, "__esModule", { - value: true - }); - var CALENDAR_SERVER = "http://calendarserver.org/ns/"; - exports3.CALENDAR_SERVER = CALENDAR_SERVER; - var CALDAV_APPLE = "http://apple.com/ns/ical/"; - exports3.CALDAV_APPLE = CALDAV_APPLE; - var CALDAV = "urn:ietf:params:xml:ns:caldav"; - exports3.CALDAV = CALDAV; - var CARDDAV = "urn:ietf:params:xml:ns:carddav"; - exports3.CARDDAV = CARDDAV; - var DAV = "DAV:"; - exports3.DAV = DAV; - }, {}], 11: [function(require2, module4, exports3) { - "use strict"; - Object.defineProperty(exports3, "__esModule", { - value: true - }); - exports3.multistatus = multistatus; - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { "default": obj }; } - var _camelize = require2("./camelize"); - var _camelize2 = _interopRequireDefault(_camelize); - var debug = require2("./debug")("dav:parser"); - var DOMParser = void 0; - if (typeof self !== "undefined" && "DOMParser" in self) { - DOMParser = self.DOMParser; + return $setSize(set) === 0; + } + return true; + } + function mapEquiv(a3, b3, opts, channel) { + if ($mapSize(a3) !== $mapSize(b3)) { + return false; + } + var iA = getIterator(a3); + var iB = getIterator(b3); + var resultA; + var resultB; + var set; + var key; + var item1; + var item2; + while ((resultA = iA.next()) && !resultA.done) { + key = resultA.value[0]; + item1 = resultA.value[1]; + if (key && typeof key === "object") { + if (!set) { + set = new $Set(); + } + $setAdd(set, key); } else { - DOMParser = require2("xmldom").DOMParser; + item2 = $mapGet(b3, key); + if (typeof item2 === "undefined" && !$mapHas(b3, key) || !internalDeepEqual(item1, item2, opts, channel)) { + if (opts.strict) { + return false; + } + if (!mapMightHaveLoosePrim(a3, b3, key, item1, opts, channel)) { + return false; + } + if (!set) { + set = new $Set(); + } + $setAdd(set, key); + } } - function multistatus(string) { - var parser = new DOMParser(); - var doc = parser.parseFromString(string, "text/xml"); - var result = traverse.multistatus(child(doc, "multistatus")); - debug("input:\n" + string + "\noutput:\n" + JSON.stringify(result) + "\n"); - return result; + } + if (set) { + while ((resultB = iB.next()) && !resultB.done) { + key = resultB.value[0]; + item2 = resultB.value[1]; + if (key && typeof key === "object") { + if (!mapHasEqualEntry(set, a3, key, item2, opts, channel)) { + return false; + } + } else if (!opts.strict && (!a3.has(key) || !internalDeepEqual($mapGet(a3, key), item2, opts, channel)) && !mapHasEqualEntry(set, a3, key, item2, assign({}, opts, { strict: false }), channel)) { + return false; + } } - var traverse = { - multistatus: function multistatus2(node) { - return complex(node, { response: true }); - }, - response: function response(node) { - return complex(node, { propstat: true, href: false }); - }, - propstat: function propstat(node) { - return complex(node, { prop: false }); - }, - prop: function prop(node) { - return complex(node, { - resourcetype: false, - supportedCalendarComponentSet: false, - supportedReportSet: false, - currentUserPrincipal: false - }); - }, - resourcetype: function resourcetype(node) { - return childNodes(node).map(function(childNode) { - return childNode.localName; - }); - }, - supportedCalendarComponentSet: function supportedCalendarComponentSet(node) { - return complex(node, { comp: true }, "comp"); - }, - supportedReportSet: function supportedReportSet(node) { - return complex(node, { supportedReport: true }, "supportedReport"); - }, - comp: function comp(node) { - return node.getAttribute("name"); - }, - supportedReport: function supportedReport(node) { - return complex(node, { report: false }, "report"); - }, - report: function report(node) { - return childNodes(node).map(function(childNode) { - return childNode.localName; - }); - }, - href: function href(node) { - return decodeURIComponent(childNodes(node)[0].nodeValue); - }, - currentUserPrincipal: function currentUserPrincipal(node) { - return complex(node, { href: false }, "href"); + return $setSize(set) === 0; + } + return true; + } + function objEquiv(a3, b3, opts, channel) { + var i3, key; + if (typeof a3 !== typeof b3) { + return false; + } + if (a3 == null || b3 == null) { + return false; + } + if ($objToString(a3) !== $objToString(b3)) { + return false; + } + if (isArguments(a3) !== isArguments(b3)) { + return false; + } + var aIsArray = isArray2(a3); + var bIsArray = isArray2(b3); + if (aIsArray !== bIsArray) { + return false; + } + var aIsError = a3 instanceof Error; + var bIsError = b3 instanceof Error; + if (aIsError !== bIsError) { + return false; + } + if (aIsError || bIsError) { + if (a3.name !== b3.name || a3.message !== b3.message) { + return false; + } + } + var aIsRegex = isRegex(a3); + var bIsRegex = isRegex(b3); + if (aIsRegex !== bIsRegex) { + return false; + } + if ((aIsRegex || bIsRegex) && (a3.source !== b3.source || flags(a3) !== flags(b3))) { + return false; + } + var aIsDate = isDate3(a3); + var bIsDate = isDate3(b3); + if (aIsDate !== bIsDate) { + return false; + } + if (aIsDate || bIsDate) { + if ($getTime(a3) !== $getTime(b3)) { + return false; + } + } + if (opts.strict && gPO && gPO(a3) !== gPO(b3)) { + return false; + } + var aWhich = whichTypedArray(a3); + var bWhich = whichTypedArray(b3); + if ((aWhich || bWhich) && aWhich !== bWhich) { + return false; + } + var aIsBuffer = isBuffer(a3); + var bIsBuffer = isBuffer(b3); + if (aIsBuffer !== bIsBuffer) { + return false; + } + if (aIsBuffer || bIsBuffer) { + if (a3.length !== b3.length) { + return false; + } + for (i3 = 0; i3 < a3.length; i3++) { + if (a3[i3] !== b3[i3]) { + return false; } - }; - function complex(node, childspec, collapse) { - var result = {}; - for (var key in childspec) { - if (childspec[key]) { - result[key] = []; + } + return true; + } + var aIsArrayBuffer = isArrayBuffer(a3); + var bIsArrayBuffer = isArrayBuffer(b3); + if (aIsArrayBuffer !== bIsArrayBuffer) { + return false; + } + if (aIsArrayBuffer || bIsArrayBuffer) { + if (byteLength(a3) !== byteLength(b3)) { + return false; + } + return typeof Uint8Array === "function" && internalDeepEqual(new Uint8Array(a3), new Uint8Array(b3), opts, channel); + } + var aIsSAB = isSharedArrayBuffer(a3); + var bIsSAB = isSharedArrayBuffer(b3); + if (aIsSAB !== bIsSAB) { + return false; + } + if (aIsSAB || bIsSAB) { + if (sabByteLength(a3) !== sabByteLength(b3)) { + return false; + } + return typeof Uint8Array === "function" && internalDeepEqual(new Uint8Array(a3), new Uint8Array(b3), opts, channel); + } + if (typeof a3 !== typeof b3) { + return false; + } + var ka = objectKeys(a3); + var kb = objectKeys(b3); + if (ka.length !== kb.length) { + return false; + } + ka.sort(); + kb.sort(); + for (i3 = ka.length - 1; i3 >= 0; i3--) { + if (ka[i3] != kb[i3]) { + return false; + } + } + for (i3 = ka.length - 1; i3 >= 0; i3--) { + key = ka[i3]; + if (!internalDeepEqual(a3[key], b3[key], opts, channel)) { + return false; + } + } + var aCollection = whichCollection(a3); + var bCollection = whichCollection(b3); + if (aCollection !== bCollection) { + return false; + } + if (aCollection === "Set" || bCollection === "Set") { + return setEquiv(a3, b3, opts, channel); + } + if (aCollection === "Map") { + return mapEquiv(a3, b3, opts, channel); + } + return true; + } + module2.exports = function deepEqual(a3, b3, opts) { + return internalDeepEqual(a3, b3, opts, getSideChannel()); + }; + } +}); + +// node_modules/moment/moment.js +var require_moment = __commonJS({ + "node_modules/moment/moment.js"(exports, module2) { + (function(global2, factory) { + typeof exports === "object" && typeof module2 !== "undefined" ? module2.exports = factory() : typeof define === "function" && define.amd ? define(factory) : global2.moment = factory(); + })(exports, function() { + "use strict"; + var hookCallback; + function hooks() { + return hookCallback.apply(null, arguments); + } + function setHookCallback(callback) { + hookCallback = callback; + } + function isArray2(input) { + return input instanceof Array || Object.prototype.toString.call(input) === "[object Array]"; + } + function isObject(input) { + return input != null && Object.prototype.toString.call(input) === "[object Object]"; + } + function hasOwnProp(a3, b3) { + return Object.prototype.hasOwnProperty.call(a3, b3); + } + function isObjectEmpty(obj) { + if (Object.getOwnPropertyNames) { + return Object.getOwnPropertyNames(obj).length === 0; + } else { + var k3; + for (k3 in obj) { + if (hasOwnProp(obj, k3)) { + return false; } } - childNodes(node).forEach(function(childNode) { - return traverseChild(node, childNode, childspec, result); - }); - return maybeCollapse(result, childspec, collapse); + return true; } - function traverseChild(node, childNode, childspec, result) { - if (childNode.nodeType === 3 && /^\s+$/.test(childNode.nodeValue)) { - return; + } + function isUndefined2(input) { + return input === void 0; + } + function isNumber3(input) { + return typeof input === "number" || Object.prototype.toString.call(input) === "[object Number]"; + } + function isDate3(input) { + return input instanceof Date || Object.prototype.toString.call(input) === "[object Date]"; + } + function map(arr, fn) { + var res = [], i3, arrLen = arr.length; + for (i3 = 0; i3 < arrLen; ++i3) { + res.push(fn(arr[i3], i3)); + } + return res; + } + function extend(a3, b3) { + for (var i3 in b3) { + if (hasOwnProp(b3, i3)) { + a3[i3] = b3[i3]; } - var localName = (0, _camelize2["default"])(childNode.localName, "-"); - if (!(localName in childspec)) { - debug("Unexpected node of type " + localName + " encountered while parsing " + node.localName + " node!"); - var value = childNode.textContent; - if (localName in result) { - if (!Array.isArray(result[localName])) { - result[localName] = [result[localName]]; - } - result[localName].push(value); - return; + } + if (hasOwnProp(b3, "toString")) { + a3.toString = b3.toString; + } + if (hasOwnProp(b3, "valueOf")) { + a3.valueOf = b3.valueOf; + } + return a3; + } + function createUTC(input, format2, locale2, strict) { + return createLocalOrUTC(input, format2, locale2, strict, true).utc(); + } + function defaultParsingFlags() { + return { + empty: false, + unusedTokens: [], + unusedInput: [], + overflow: -2, + charsLeftOver: 0, + nullInput: false, + invalidEra: null, + invalidMonth: null, + invalidFormat: false, + userInvalidated: false, + iso: false, + parsedDateParts: [], + era: null, + meridiem: null, + rfc2822: false, + weekdayMismatch: false + }; + } + function getParsingFlags(m3) { + if (m3._pf == null) { + m3._pf = defaultParsingFlags(); + } + return m3._pf; + } + var some; + if (Array.prototype.some) { + some = Array.prototype.some; + } else { + some = function(fun) { + var t3 = Object(this), len = t3.length >>> 0, i3; + for (i3 = 0; i3 < len; i3++) { + if (i3 in t3 && fun.call(this, t3[i3], i3, t3)) { + return true; } - result[localName] = value; - return; } - var traversal = traverse[localName](childNode); - if (childspec[localName]) { - result[localName].push(traversal); + return false; + }; + } + function isValid(m3) { + if (m3._isValid == null) { + var flags = getParsingFlags(m3), parsedParts = some.call(flags.parsedDateParts, function(i3) { + return i3 != null; + }), isNowValid = !isNaN(m3._d.getTime()) && flags.overflow < 0 && !flags.empty && !flags.invalidEra && !flags.invalidMonth && !flags.invalidWeekday && !flags.weekdayMismatch && !flags.nullInput && !flags.invalidFormat && !flags.userInvalidated && (!flags.meridiem || flags.meridiem && parsedParts); + if (m3._strict) { + isNowValid = isNowValid && flags.charsLeftOver === 0 && flags.unusedTokens.length === 0 && flags.bigHour === void 0; + } + if (Object.isFrozen == null || !Object.isFrozen(m3)) { + m3._isValid = isNowValid; } else { - result[localName] = traversal; + return isNowValid; } } - function maybeCollapse(result, childspec, collapse) { - if (!collapse) { - return result; - } - if (!childspec[collapse]) { - return result[collapse]; - } - return result[collapse].reduce(function(a3, b3) { - return a3.concat(b3); - }, []); + return m3._isValid; + } + function createInvalid(flags) { + var m3 = createUTC(NaN); + if (flags != null) { + extend(getParsingFlags(m3), flags); + } else { + getParsingFlags(m3).userInvalidated = true; } - function childNodes(node) { - var result = node.childNodes; - if (!Array.isArray(result)) { - result = Array.prototype.slice.call(result); + return m3; + } + var momentProperties = hooks.momentProperties = [], updateInProgress = false; + function copyConfig(to2, from2) { + var i3, prop, val, momentPropertiesLen = momentProperties.length; + if (!isUndefined2(from2._isAMomentObject)) { + to2._isAMomentObject = from2._isAMomentObject; + } + if (!isUndefined2(from2._i)) { + to2._i = from2._i; + } + if (!isUndefined2(from2._f)) { + to2._f = from2._f; + } + if (!isUndefined2(from2._l)) { + to2._l = from2._l; + } + if (!isUndefined2(from2._strict)) { + to2._strict = from2._strict; + } + if (!isUndefined2(from2._tzm)) { + to2._tzm = from2._tzm; + } + if (!isUndefined2(from2._isUTC)) { + to2._isUTC = from2._isUTC; + } + if (!isUndefined2(from2._offset)) { + to2._offset = from2._offset; + } + if (!isUndefined2(from2._pf)) { + to2._pf = getParsingFlags(from2); + } + if (!isUndefined2(from2._locale)) { + to2._locale = from2._locale; + } + if (momentPropertiesLen > 0) { + for (i3 = 0; i3 < momentPropertiesLen; i3++) { + prop = momentProperties[i3]; + val = from2[prop]; + if (!isUndefined2(val)) { + to2[prop] = val; + } } - return result; } - function children(node, localName) { - return childNodes(node).filter(function(childNode) { - return childNode.localName === localName; - }); + return to2; + } + function Moment(config2) { + copyConfig(this, config2); + this._d = new Date(config2._d != null ? config2._d.getTime() : NaN); + if (!this.isValid()) { + this._d = new Date(NaN); } - function child(node, localName) { - return children(node, localName)[0]; + if (updateInProgress === false) { + updateInProgress = true; + hooks.updateOffset(this); + updateInProgress = false; } - }, { "./camelize": 3, "./debug": 6, "xmldom": 30 }], 12: [function(require2, module4, exports3) { - "use strict"; - Object.defineProperty(exports3, "__esModule", { - value: true - }); - exports3.addressBookQuery = addressBookQuery; - exports3.basic = basic; - exports3.calendarQuery = calendarQuery; - exports3.collectionQuery = collectionQuery; - exports3.propfind = propfind; - exports3.syncCollection = syncCollection; - exports3.mergeProps = mergeProps2; - exports3.getProps = getProps; - exports3.setRequestHeaders = setRequestHeaders; - function _interopRequireWildcard(obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {}; - if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) - newObj[key] = obj[key]; + } + function isMoment(obj) { + return obj instanceof Moment || obj != null && obj._isAMomentObject != null; + } + function warn(msg) { + if (hooks.suppressDeprecationWarnings === false && typeof console !== "undefined" && console.warn) { + console.warn("Deprecation warning: " + msg); + } + } + function deprecate(msg, fn) { + var firstTime = true; + return extend(function() { + if (hooks.deprecationHandler != null) { + hooks.deprecationHandler(null, msg); + } + if (firstTime) { + var args = [], arg, i3, key, argLen = arguments.length; + for (i3 = 0; i3 < argLen; i3++) { + arg = ""; + if (typeof arguments[i3] === "object") { + arg += "\n[" + i3 + "] "; + for (key in arguments[0]) { + if (hasOwnProp(arguments[0], key)) { + arg += key + ": " + arguments[0][key] + ", "; + } + } + arg = arg.slice(0, -2); + } else { + arg = arguments[i3]; } + args.push(arg); } - newObj["default"] = obj; - return newObj; - } - } - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - var _parser = require2("./parser"); - var _template = require2("./template"); - var template = _interopRequireWildcard(_template); - function addressBookQuery(options) { - return collectionQuery(template.addressBookQuery({ props: options.props || [] }), { depth: options.depth }); - } - function basic(options) { - function transformRequest(xhr) { - setRequestHeaders(xhr, options); + warn(msg + "\nArguments: " + Array.prototype.slice.call(args).join("") + "\n" + new Error().stack); + firstTime = false; } - return new Request2({ - method: options.method, - requestData: options.data, - transformRequest - }); + return fn.apply(this, arguments); + }, fn); + } + var deprecations = {}; + function deprecateSimple(name, msg) { + if (hooks.deprecationHandler != null) { + hooks.deprecationHandler(name, msg); } - function calendarQuery(options) { - return collectionQuery(template.calendarQuery({ - props: options.props || [], - filters: options.filters || [], - timezone: options.timezone - }), { - depth: options.depth - }); + if (!deprecations[name]) { + warn(msg); + deprecations[name] = true; } - function collectionQuery(requestData, options) { - function transformRequest(xhr) { - setRequestHeaders(xhr, options); - } - function transformResponse(xhr) { - return (0, _parser.multistatus)(xhr.responseText).response.map(function(res) { - return { href: res.href, props: getProps(res.propstat) }; - }); + } + hooks.suppressDeprecationWarnings = false; + hooks.deprecationHandler = null; + function isFunction(input) { + return typeof Function !== "undefined" && input instanceof Function || Object.prototype.toString.call(input) === "[object Function]"; + } + function set(config2) { + var prop, i3; + for (i3 in config2) { + if (hasOwnProp(config2, i3)) { + prop = config2[i3]; + if (isFunction(prop)) { + this[i3] = prop; + } else { + this["_" + i3] = prop; + } } - return new Request2({ - method: "REPORT", - requestData, - transformRequest, - transformResponse - }); } - function propfind(options) { - var requestData = template.propfind({ props: options.props }); - function transformRequest(xhr) { - setRequestHeaders(xhr, options); - } - function transformResponse(xhr) { - var responses = (0, _parser.multistatus)(xhr.responseText).response.map(function(res) { - return { href: res.href, props: getProps(res.propstat) }; - }); - if (!options.mergeResponses) { - return responses; + this._config = config2; + this._dayOfMonthOrdinalParseLenient = new RegExp((this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) + "|" + /\d{1,2}/.source); + } + function mergeConfigs(parentConfig, childConfig) { + var res = extend({}, parentConfig), prop; + for (prop in childConfig) { + if (hasOwnProp(childConfig, prop)) { + if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) { + res[prop] = {}; + extend(res[prop], parentConfig[prop]); + extend(res[prop], childConfig[prop]); + } else if (childConfig[prop] != null) { + res[prop] = childConfig[prop]; + } else { + delete res[prop]; } - var merged = mergeProps2(responses.map(function(res) { - return res.props; - })); - var hrefs = responses.map(function(res) { - return res.href; - }); - return { props: merged, hrefs }; } - return new Request2({ - method: "PROPFIND", - requestData, - transformRequest, - transformResponse - }); } - function syncCollection(options) { - var requestData = template.syncCollection({ - props: options.props, - syncLevel: options.syncLevel, - syncToken: options.syncToken - }); - function transformRequest(xhr) { - setRequestHeaders(xhr, options); - } - function transformResponse(xhr) { - var object = (0, _parser.multistatus)(xhr.responseText); - var responses = object.response.map(function(res) { - return { href: res.href, props: getProps(res.propstat) }; - }); - return { responses, syncToken: object.syncToken }; + for (prop in parentConfig) { + if (hasOwnProp(parentConfig, prop) && !hasOwnProp(childConfig, prop) && isObject(parentConfig[prop])) { + res[prop] = extend({}, res[prop]); } - return new Request2({ - method: "REPORT", - requestData, - transformRequest, - transformResponse - }); } - var Request2 = function Request3() { - var options = arguments.length <= 0 || arguments[0] === void 0 ? {} : arguments[0]; - _classCallCheck(this, Request3); - Object.assign(this, { - method: null, - requestData: null, - transformRequest: null, - transformResponse: null, - onerror: null - }, options); - }; - exports3.Request = Request2; - function getProp(propstat) { - if (/404/g.test(propstat.status)) { - return null; - } - if (/5\d{2}/g.test(propstat.status) || /4\d{2}/g.test(propstat.status)) { - throw new Error("Bad status on propstat: " + propstat.status); - } - return "prop" in propstat ? propstat.prop : null; + return res; + } + function Locale2(config2) { + if (config2 != null) { + this.set(config2); } - function mergeProps2(props) { - return props.reduce(function(a3, b3) { - return Object.assign(a3, b3); - }, {}); + } + var keys; + if (Object.keys) { + keys = Object.keys; + } else { + keys = function(obj) { + var i3, res = []; + for (i3 in obj) { + if (hasOwnProp(obj, i3)) { + res.push(i3); + } + } + return res; + }; + } + var defaultCalendar = { + sameDay: "[Today at] LT", + nextDay: "[Tomorrow at] LT", + nextWeek: "dddd [at] LT", + lastDay: "[Yesterday at] LT", + lastWeek: "[Last] dddd [at] LT", + sameElse: "L" + }; + function calendar(key, mom, now3) { + var output = this._calendar[key] || this._calendar["sameElse"]; + return isFunction(output) ? output.call(mom, now3) : output; + } + function zeroFill(number, targetLength, forceSign) { + var absNumber = "" + Math.abs(number), zerosToFill = targetLength - absNumber.length, sign2 = number >= 0; + return (sign2 ? forceSign ? "+" : "" : "-") + Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber; + } + var formattingTokens = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g, localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g, formatFunctions = {}, formatTokenFunctions = {}; + function addFormatToken(token2, padded, ordinal2, callback) { + var func = callback; + if (typeof callback === "string") { + func = function() { + return this[callback](); + }; } - function getProps(propstats) { - return mergeProps2(propstats.map(getProp).filter(function(prop) { - return prop && typeof prop === "object"; - })); + if (token2) { + formatTokenFunctions[token2] = func; } - function setRequestHeaders(request3, options) { - request3.setRequestHeader("Content-Type", options.contentType || "application/xml;charset=utf-8"); - if ("depth" in options) { - request3.setRequestHeader("Depth", options.depth); - } - if ("etag" in options && options.etag) { - request3.setRequestHeader("If-Match", options.etag); - } + if (padded) { + formatTokenFunctions[padded[0]] = function() { + return zeroFill(func.apply(this, arguments), padded[1], padded[2]); + }; } - }, { "./parser": 11, "./template": 17 }], 13: [function(require2, module4, exports3) { - "use strict"; - Object.defineProperty(exports3, "__esModule", { - value: true - }); - var _createClass = function() { - function defineProperties(target, props) { - for (var i3 = 0; i3 < props.length; i3++) { - var descriptor = props[i3]; - 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; + if (ordinal2) { + formatTokenFunctions[ordinal2] = function() { + return this.localeData().ordinal(func.apply(this, arguments), token2); }; - }(); - exports3.createSandbox = createSandbox; - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } } - var debug = require2("./debug")("dav:sandbox"); - var Sandbox = function() { - function Sandbox2() { - _classCallCheck(this, Sandbox2); - this.requestList = []; + } + function removeFormattingTokens(input) { + if (input.match(/\[[\s\S]/)) { + return input.replace(/^\[|\]$/g, ""); + } + return input.replace(/\\/g, ""); + } + function makeFormatFunction(format2) { + var array = format2.match(formattingTokens), i3, length; + for (i3 = 0, length = array.length; i3 < length; i3++) { + if (formatTokenFunctions[array[i3]]) { + array[i3] = formatTokenFunctions[array[i3]]; + } else { + array[i3] = removeFormattingTokens(array[i3]); } - _createClass(Sandbox2, [{ - key: "add", - value: function add2(request3) { - debug("Adding request to sandbox."); - this.requestList.push(request3); - } - }, { - key: "abort", - value: function abort() { - debug("Aborting sandboxed requests."); - this.requestList.forEach(function(request3) { - return request3.abort(); - }); - } - }]); - return Sandbox2; - }(); - exports3.Sandbox = Sandbox; - function createSandbox() { - return new Sandbox(); } - }, { "./debug": 6 }], 14: [function(require2, module4, exports3) { - "use strict"; - Object.defineProperty(exports3, "__esModule", { - value: true - }); - exports3["default"] = addressBookQuery; - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { "default": obj }; + return function(mom) { + var output = "", i4; + for (i4 = 0; i4 < length; i4++) { + output += isFunction(array[i4]) ? array[i4].call(mom, format2) : array[i4]; + } + return output; + }; + } + function formatMoment(m3, format2) { + if (!m3.isValid()) { + return m3.localeData().invalidDate(); } - var _prop = require2("./prop"); - var _prop2 = _interopRequireDefault(_prop); - function addressBookQuery(object) { - return '\n \n ' + object.props.map(_prop2["default"]) + ` - - - - - - - `; + format2 = expandFormat(format2, m3.localeData()); + formatFunctions[format2] = formatFunctions[format2] || makeFormatFunction(format2); + return formatFunctions[format2](m3); + } + function expandFormat(format2, locale2) { + var i3 = 5; + function replaceLongDateFormatTokens(input) { + return locale2.longDateFormat(input) || input; } - module4.exports = exports3["default"]; - }, { "./prop": 18 }], 15: [function(require2, module4, exports3) { - "use strict"; - Object.defineProperty(exports3, "__esModule", { - value: true - }); - exports3["default"] = calendarQuery; - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { "default": obj }; + localFormattingTokens.lastIndex = 0; + while (i3 >= 0 && localFormattingTokens.test(format2)) { + format2 = format2.replace(localFormattingTokens, replaceLongDateFormatTokens); + localFormattingTokens.lastIndex = 0; + i3 -= 1; } - var _filter = require2("./filter"); - var _filter2 = _interopRequireDefault(_filter); - var _prop = require2("./prop"); - var _prop2 = _interopRequireDefault(_prop); - function calendarQuery(object) { - return '\n \n ' + object.props.map(_prop2["default"]) + "\n \n \n " + object.filters.map(_filter2["default"]) + "\n \n " + (object.timezone ? "" + object.timezone + "" : "") + "\n "; + return format2; + } + var defaultLongDateFormat = { + LTS: "h:mm:ss A", + LT: "h:mm A", + L: "MM/DD/YYYY", + LL: "MMMM D, YYYY", + LLL: "MMMM D, YYYY h:mm A", + LLLL: "dddd, MMMM D, YYYY h:mm A" + }; + function longDateFormat(key) { + var format2 = this._longDateFormat[key], formatUpper = this._longDateFormat[key.toUpperCase()]; + if (format2 || !formatUpper) { + return format2; } - module4.exports = exports3["default"]; - }, { "./filter": 16, "./prop": 18 }], 16: [function(require2, module4, exports3) { - "use strict"; - Object.defineProperty(exports3, "__esModule", { - value: true - }); - exports3["default"] = filter; - function filter(item) { - if (!item.children || !item.children.length) { - if (typeof item.value === "undefined") { - return ""; + this._longDateFormat[key] = formatUpper.match(formattingTokens).map(function(tok) { + if (tok === "MMMM" || tok === "MM" || tok === "DD" || tok === "dddd") { + return tok.slice(1); + } + return tok; + }).join(""); + return this._longDateFormat[key]; + } + var defaultInvalidDate = "Invalid date"; + function invalidDate() { + return this._invalidDate; + } + var defaultOrdinal = "%d", defaultDayOfMonthOrdinalParse = /\d{1,2}/; + function ordinal(number) { + return this._ordinal.replace("%d", number); + } + var defaultRelativeTime = { + future: "in %s", + past: "%s ago", + s: "a few seconds", + ss: "%d seconds", + m: "a minute", + mm: "%d minutes", + h: "an hour", + hh: "%d hours", + d: "a day", + dd: "%d days", + w: "a week", + ww: "%d weeks", + M: "a month", + MM: "%d months", + y: "a year", + yy: "%d years" + }; + function relativeTime(number, withoutSuffix, string, isFuture) { + var output = this._relativeTime[string]; + return isFunction(output) ? output(number, withoutSuffix, string, isFuture) : output.replace(/%d/i, number); + } + function pastFuture(diff2, output) { + var format2 = this._relativeTime[diff2 > 0 ? "future" : "past"]; + return isFunction(format2) ? format2(output) : format2.replace(/%s/i, output); + } + var aliases = {}; + function addUnitAlias(unit, shorthand) { + var lowerCase = unit.toLowerCase(); + aliases[lowerCase] = aliases[lowerCase + "s"] = aliases[shorthand] = unit; + } + function normalizeUnits(units) { + return typeof units === "string" ? aliases[units] || aliases[units.toLowerCase()] : void 0; + } + function normalizeObjectUnits(inputObject) { + var normalizedInput = {}, normalizedProp, prop; + for (prop in inputObject) { + if (hasOwnProp(inputObject, prop)) { + normalizedProp = normalizeUnits(prop); + if (normalizedProp) { + normalizedInput[normalizedProp] = inputObject[prop]; } - return "" + item.value + ""; } - var children = item.children.map(filter); - return "\n " + children + "\n "; } - function formatAttrs(attrs) { - if (typeof attrs !== "object") { - return ""; + return normalizedInput; + } + var priorities = {}; + function addUnitPriority(unit, priority) { + priorities[unit] = priority; + } + function getPrioritizedUnits(unitsObj) { + var units = [], u3; + for (u3 in unitsObj) { + if (hasOwnProp(unitsObj, u3)) { + units.push({ unit: u3, priority: priorities[u3] }); } - return Object.keys(attrs).map(function(attr) { - return attr + '="' + attrs[attr] + '"'; - }).join(" "); } - module4.exports = exports3["default"]; - }, {}], 17: [function(require2, module4, exports3) { - "use strict"; - exports3.addressBookQuery = require2("./address_book_query"); - exports3.calendarQuery = require2("./calendar_query"); - exports3.propfind = require2("./propfind"); - exports3.syncCollection = require2("./sync_collection"); - }, { "./address_book_query": 14, "./calendar_query": 15, "./propfind": 19, "./sync_collection": 20 }], 18: [function(require2, module4, exports3) { - "use strict"; - Object.defineProperty(exports3, "__esModule", { - value: true + units.sort(function(a3, b3) { + return a3.priority - b3.priority; }); - exports3["default"] = prop; - function _interopRequireWildcard(obj) { - if (obj && obj.__esModule) { - return obj; + return units; + } + function isLeapYear3(year) { + return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0; + } + function absFloor(number) { + if (number < 0) { + return Math.ceil(number) || 0; + } else { + return Math.floor(number); + } + } + function toInt(argumentForCoercion) { + var coercedNumber = +argumentForCoercion, value = 0; + if (coercedNumber !== 0 && isFinite(coercedNumber)) { + value = absFloor(coercedNumber); + } + return value; + } + function makeGetSet(unit, keepTime) { + return function(value) { + if (value != null) { + set$1(this, unit, value); + hooks.updateOffset(this, keepTime); + return this; + } else { + return get(this, unit); + } + }; + } + function get(mom, unit) { + return mom.isValid() ? mom._d["get" + (mom._isUTC ? "UTC" : "") + unit]() : NaN; + } + function set$1(mom, unit, value) { + if (mom.isValid() && !isNaN(value)) { + if (unit === "FullYear" && isLeapYear3(mom.year()) && mom.month() === 1 && mom.date() === 29) { + value = toInt(value); + mom._d["set" + (mom._isUTC ? "UTC" : "") + unit](value, mom.month(), daysInMonth2(value, mom.month())); } else { - var newObj = {}; - if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) - newObj[key] = obj[key]; - } - } - newObj["default"] = obj; - return newObj; + mom._d["set" + (mom._isUTC ? "UTC" : "") + unit](value); } } - var _namespace = require2("../namespace"); - var ns2 = _interopRequireWildcard(_namespace); - function prop(item) { - return "<" + xmlnsPrefix(item.namespace) + ":" + item.name + " />"; + } + function stringGet(units) { + units = normalizeUnits(units); + if (isFunction(this[units])) { + return this[units](); } - function xmlnsPrefix(namespace) { - switch (namespace) { - case ns2.DAV: - return "d"; - case ns2.CALENDAR_SERVER: - return "cs"; - case ns2.CALDAV_APPLE: - return "ca"; - case ns2.CALDAV: - return "c"; - case ns2.CARDDAV: - return "card"; - default: - throw new Error("Unrecognized xmlns " + namespace); + return this; + } + function stringSet(units, value) { + if (typeof units === "object") { + units = normalizeObjectUnits(units); + var prioritized = getPrioritizedUnits(units), i3, prioritizedLen = prioritized.length; + for (i3 = 0; i3 < prioritizedLen; i3++) { + this[prioritized[i3].unit](units[prioritized[i3].unit]); + } + } else { + units = normalizeUnits(units); + if (isFunction(this[units])) { + return this[units](value); } } - module4.exports = exports3["default"]; - }, { "../namespace": 10 }], 19: [function(require2, module4, exports3) { - "use strict"; - Object.defineProperty(exports3, "__esModule", { - value: true - }); - exports3["default"] = propfind; - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { "default": obj }; + return this; + } + var match1 = /\d/, match2 = /\d\d/, match3 = /\d{3}/, match4 = /\d{4}/, match6 = /[+-]?\d{6}/, match1to2 = /\d\d?/, match3to4 = /\d\d\d\d?/, match5to6 = /\d\d\d\d\d\d?/, match1to3 = /\d{1,3}/, match1to4 = /\d{1,4}/, match1to6 = /[+-]?\d{1,6}/, matchUnsigned = /\d+/, matchSigned = /[+-]?\d+/, matchOffset = /Z|[+-]\d\d:?\d\d/gi, matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi, matchTimestamp = /[+-]?\d+(\.\d{1,3})?/, matchWord = /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i, regexes; + regexes = {}; + function addRegexToken(token2, regex, strictRegex) { + regexes[token2] = isFunction(regex) ? regex : function(isStrict, localeData2) { + return isStrict && strictRegex ? strictRegex : regex; + }; + } + function getParseRegexForToken(token2, config2) { + if (!hasOwnProp(regexes, token2)) { + return new RegExp(unescapeFormat(token2)); } - var _prop = require2("./prop"); - var _prop2 = _interopRequireDefault(_prop); - function propfind(object) { - return '\n \n ' + object.props.map(_prop2["default"]) + "\n \n "; + return regexes[token2](config2._strict, config2._locale); + } + function unescapeFormat(s4) { + return regexEscape(s4.replace("\\", "").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function(matched, p1, p22, p3, p4) { + return p1 || p22 || p3 || p4; + })); + } + function regexEscape(s4) { + return s4.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&"); + } + var tokens = {}; + function addParseToken(token2, callback) { + var i3, func = callback, tokenLen; + if (typeof token2 === "string") { + token2 = [token2]; } - module4.exports = exports3["default"]; - }, { "./prop": 18 }], 20: [function(require2, module4, exports3) { - "use strict"; - Object.defineProperty(exports3, "__esModule", { - value: true - }); - exports3["default"] = syncCollection; - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { "default": obj }; + if (isNumber3(callback)) { + func = function(input, array) { + array[callback] = toInt(input); + }; } - var _prop = require2("./prop"); - var _prop2 = _interopRequireDefault(_prop); - function syncCollection(object) { - return '\n ' + object.syncLevel + "\n " + object.syncToken + "\n \n " + object.props.map(_prop2["default"]) + "\n \n "; + tokenLen = token2.length; + for (i3 = 0; i3 < tokenLen; i3++) { + tokens[token2[i3]] = func; } - module4.exports = exports3["default"]; - }, { "./prop": 18 }], 21: [function(require2, module4, exports3) { - "use strict"; - Object.defineProperty(exports3, "__esModule", { - value: true + } + function addWeekParseToken(token2, callback) { + addParseToken(token2, function(input, array, config2, token3) { + config2._w = config2._w || {}; + callback(input, config2._w, config2, token3); }); - var _get = function get(_x2, _x3, _x4) { - var _again = true; - _function: - while (_again) { - var object = _x2, property = _x3, receiver = _x4; - _again = false; - if (object === null) - object = Function.prototype; - var desc = Object.getOwnPropertyDescriptor(object, property); - if (desc === void 0) { - var parent = Object.getPrototypeOf(object); - if (parent === null) { - return void 0; - } else { - _x2 = parent; - _x3 = property; - _x4 = receiver; - _again = true; - desc = parent = void 0; - continue _function; - } - } else if ("value" in desc) { - return desc.value; - } else { - var getter = desc.get; - if (getter === void 0) { - return void 0; - } - return getter.call(receiver); - } - } - }; - var _createClass = function() { - function defineProperties(target, props) { - for (var i3 = 0; i3 < props.length; i3++) { - var descriptor = props[i3]; - descriptor.enumerable = descriptor.enumerable || false; - descriptor.configurable = true; - if ("value" in descriptor) - descriptor.writable = true; - Object.defineProperty(target, descriptor.key, descriptor); + } + function addTimeToArrayFromToken(token2, input, config2) { + if (input != null && hasOwnProp(tokens, token2)) { + tokens[token2](input, config2._a, config2, token2); + } + } + var YEAR = 0, MONTH = 1, DATE = 2, HOUR = 3, MINUTE2 = 4, SECOND2 = 5, MILLISECOND = 6, WEEK = 7, WEEKDAY = 8; + function mod(n3, x3) { + return (n3 % x3 + x3) % x3; + } + var indexOf; + if (Array.prototype.indexOf) { + indexOf = Array.prototype.indexOf; + } else { + indexOf = function(o2) { + var i3; + for (i3 = 0; i3 < this.length; ++i3) { + if (this[i3] === o2) { + return i3; } } - return function(Constructor, protoProps, staticProps) { - if (protoProps) - defineProperties(Constructor.prototype, protoProps); - if (staticProps) - defineProperties(Constructor, staticProps); - return Constructor; - }; - }(); - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { "default": obj }; + return -1; + }; + } + function daysInMonth2(year, month) { + if (isNaN(year) || isNaN(month)) { + return NaN; } - function _inherits(subClass, superClass) { - if (typeof superClass !== "function" && superClass !== null) { - throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); - } - subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); - if (superClass) - Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; + var modMonth = mod(month, 12); + year += (month - modMonth) / 12; + return modMonth === 1 ? isLeapYear3(year) ? 29 : 28 : 31 - modMonth % 7 % 2; + } + addFormatToken("M", ["MM", 2], "Mo", function() { + return this.month() + 1; + }); + addFormatToken("MMM", 0, 0, function(format2) { + return this.localeData().monthsShort(this, format2); + }); + addFormatToken("MMMM", 0, 0, function(format2) { + return this.localeData().months(this, format2); + }); + addUnitAlias("month", "M"); + addUnitPriority("month", 8); + addRegexToken("M", match1to2); + addRegexToken("MM", match1to2, match2); + addRegexToken("MMM", function(isStrict, locale2) { + return locale2.monthsShortRegex(isStrict); + }); + addRegexToken("MMMM", function(isStrict, locale2) { + return locale2.monthsRegex(isStrict); + }); + addParseToken(["M", "MM"], function(input, array) { + array[MONTH] = toInt(input) - 1; + }); + addParseToken(["MMM", "MMMM"], function(input, array, config2, token2) { + var month = config2._locale.monthsParse(input, token2, config2._strict); + if (month != null) { + array[MONTH] = month; + } else { + getParsingFlags(config2).invalidMonth = input; } - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } + }); + var defaultLocaleMonths = "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), defaultLocaleMonthsShort = "Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"), MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/, defaultMonthsShortRegex = matchWord, defaultMonthsRegex = matchWord; + function localeMonths(m3, format2) { + if (!m3) { + return isArray2(this._months) ? this._months : this._months["standalone"]; } - var _co = require2("co"); - var _co2 = _interopRequireDefault(_co); - var _querystring = require2("querystring"); - var _querystring2 = _interopRequireDefault(_querystring); - var _xmlhttprequest = require2("./xmlhttprequest"); - var _xmlhttprequest2 = _interopRequireDefault(_xmlhttprequest); - var Transport = function() { - function Transport2(credentials) { - _classCallCheck(this, Transport2); - this.credentials = credentials || null; + return isArray2(this._months) ? this._months[m3.month()] : this._months[(this._months.isFormat || MONTHS_IN_FORMAT).test(format2) ? "format" : "standalone"][m3.month()]; + } + function localeMonthsShort(m3, format2) { + if (!m3) { + return isArray2(this._monthsShort) ? this._monthsShort : this._monthsShort["standalone"]; + } + return isArray2(this._monthsShort) ? this._monthsShort[m3.month()] : this._monthsShort[MONTHS_IN_FORMAT.test(format2) ? "format" : "standalone"][m3.month()]; + } + function handleStrictParse(monthName, format2, strict) { + var i3, ii, mom, llc = monthName.toLocaleLowerCase(); + if (!this._monthsParse) { + this._monthsParse = []; + this._longMonthsParse = []; + this._shortMonthsParse = []; + for (i3 = 0; i3 < 12; ++i3) { + mom = createUTC([2e3, i3]); + this._shortMonthsParse[i3] = this.monthsShort(mom, "").toLocaleLowerCase(); + this._longMonthsParse[i3] = this.months(mom, "").toLocaleLowerCase(); } - _createClass(Transport2, [{ - key: "send", - value: function send() { - } - }]); - return Transport2; - }(); - exports3.Transport = Transport; - var Basic2 = function(_Transport) { - _inherits(Basic3, _Transport); - function Basic3(credentials) { - _classCallCheck(this, Basic3); - _get(Object.getPrototypeOf(Basic3.prototype), "constructor", this).call(this, credentials); + } + if (strict) { + if (format2 === "MMM") { + ii = indexOf.call(this._shortMonthsParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._longMonthsParse, llc); + return ii !== -1 ? ii : null; } - _createClass(Basic3, [{ - key: "send", - value: function send(request3, url, options) { - return (0, _co2["default"])(regeneratorRuntime.mark(function callee$2$0() { - var sandbox, transformRequest, transformResponse, onerror, xhr, result; - return regeneratorRuntime.wrap(function callee$2$0$(context$3$0) { - while (1) - switch (context$3$0.prev = context$3$0.next) { - case 0: - sandbox = options && options.sandbox; - transformRequest = request3.transformRequest; - transformResponse = request3.transformResponse; - onerror = request3.onerror; - xhr = new _xmlhttprequest2["default"](); - if (sandbox) - sandbox.add(xhr); - xhr.open(request3.method, url, true, this.credentials.username, this.credentials.password); - if (transformRequest) - transformRequest(xhr); - result = void 0; - context$3$0.prev = 9; - context$3$0.next = 12; - return xhr.send(request3.requestData); - case 12: - result = transformResponse ? transformResponse(xhr) : xhr; - context$3$0.next = 19; - break; - case 15: - context$3$0.prev = 15; - context$3$0.t0 = context$3$0["catch"](9); - if (onerror) - onerror(context$3$0.t0); - throw context$3$0.t0; - case 19: - return context$3$0.abrupt("return", result); - case 20: - case "end": - return context$3$0.stop(); - } - }, callee$2$0, this, [[9, 15]]); - }).bind(this)); + } else { + if (format2 === "MMM") { + ii = indexOf.call(this._shortMonthsParse, llc); + if (ii !== -1) { + return ii; } - }]); - return Basic3; - }(Transport); - exports3.Basic = Basic2; - var OAuth2 = function(_Transport2) { - _inherits(OAuth22, _Transport2); - function OAuth22(credentials) { - _classCallCheck(this, OAuth22); - _get(Object.getPrototypeOf(OAuth22.prototype), "constructor", this).call(this, credentials); - } - _createClass(OAuth22, [{ - key: "send", - value: function send(request3, url) { - var options = arguments.length <= 2 || arguments[2] === void 0 ? {} : arguments[2]; - return (0, _co2["default"])(regeneratorRuntime.mark(function callee$2$0() { - var sandbox, transformRequest, transformResponse, onerror, result, xhr, token; - return regeneratorRuntime.wrap(function callee$2$0$(context$3$0) { - while (1) - switch (context$3$0.prev = context$3$0.next) { - case 0: - sandbox = options.sandbox; - transformRequest = request3.transformRequest; - transformResponse = request3.transformResponse; - onerror = request3.onerror; - if (!("retry" in options)) - options.retry = true; - result = void 0, xhr = void 0; - context$3$0.prev = 6; - context$3$0.next = 9; - return access(this.credentials, options); - case 9: - token = context$3$0.sent; - xhr = new _xmlhttprequest2["default"](); - if (sandbox) - sandbox.add(xhr); - xhr.open(request3.method, url, true); - xhr.setRequestHeader("Authorization", "Bearer " + token); - if (transformRequest) - transformRequest(xhr); - context$3$0.next = 17; - return xhr.send(request3.requestData); - case 17: - result = transformResponse ? transformResponse(xhr) : xhr; - context$3$0.next = 28; - break; - case 20: - context$3$0.prev = 20; - context$3$0.t0 = context$3$0["catch"](6); - if (!(options.retry && xhr.status === 401)) { - context$3$0.next = 26; - break; - } - this.credentials.expiration = 0; - options.retry = false; - return context$3$0.abrupt("return", this.send(request3, url, options)); - case 26: - if (onerror) - onerror(context$3$0.t0); - throw context$3$0.t0; - case 28: - return context$3$0.abrupt("return", result); - case 29: - case "end": - return context$3$0.stop(); - } - }, callee$2$0, this, [[6, 20]]); - }).bind(this)); + ii = indexOf.call(this._longMonthsParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._longMonthsParse, llc); + if (ii !== -1) { + return ii; } - }]); - return OAuth22; - }(Transport); - exports3.OAuth2 = OAuth2; - function access(credentials, options) { - if (!credentials.accessToken) { - return getAccessToken(credentials, options); - } - if (credentials.refreshToken && isExpired(credentials)) { - return refreshAccessToken(credentials, options); + ii = indexOf.call(this._shortMonthsParse, llc); + return ii !== -1 ? ii : null; } - return Promise.resolve(credentials.accessToken); } - function isExpired(credentials) { - return typeof credentials.expiration === "number" && Date.now() > credentials.expiration; + } + function localeMonthsParse(monthName, format2, strict) { + var i3, mom, regex; + if (this._monthsParseExact) { + return handleStrictParse.call(this, monthName, format2, strict); } - var getAccessToken = _co2["default"].wrap(regeneratorRuntime.mark(function callee$0$0(credentials, options) { - var sandbox, xhr, data, now2, response; - return regeneratorRuntime.wrap(function callee$0$0$(context$1$0) { - while (1) - switch (context$1$0.prev = context$1$0.next) { - case 0: - sandbox = options.sandbox; - xhr = new _xmlhttprequest2["default"](); - if (sandbox) - sandbox.add(xhr); - xhr.open("POST", credentials.tokenUrl, true); - xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); - data = _querystring2["default"].stringify({ - code: credentials.authorizationCode, - redirect_uri: credentials.redirectUrl, - client_id: credentials.clientId, - client_secret: credentials.clientSecret, - grant_type: "authorization_code" - }); - now2 = Date.now(); - context$1$0.next = 9; - return xhr.send(data); - case 9: - response = JSON.parse(xhr.responseText); - credentials.accessToken = response.access_token; - credentials.refreshToken = "refresh_token" in response ? response.refresh_token : null; - credentials.expiration = "expires_in" in response ? now2 + response.expires_in : null; - return context$1$0.abrupt("return", response.access_token); - case 14: - case "end": - return context$1$0.stop(); - } - }, callee$0$0, this); - })); - var refreshAccessToken = _co2["default"].wrap(regeneratorRuntime.mark(function callee$0$0(credentials, options) { - var sandbox, xhr, data, now2, response; - return regeneratorRuntime.wrap(function callee$0$0$(context$1$0) { - while (1) - switch (context$1$0.prev = context$1$0.next) { - case 0: - sandbox = options.sandbox; - xhr = new _xmlhttprequest2["default"](); - if (sandbox) - sandbox.add(xhr); - xhr.open("POST", credentials.tokenUrl, true); - xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); - data = _querystring2["default"].stringify({ - client_id: credentials.clientId, - client_secret: credentials.clientSecret, - refresh_token: credentials.refreshToken, - grant_type: "refresh_token" - }); - now2 = Date.now(); - context$1$0.next = 9; - return xhr.send(data); - case 9: - response = JSON.parse(xhr.responseText); - credentials.accessToken = response.access_token; - credentials.expiration = "expires_in" in response ? now2 + response.expires_in : null; - return context$1$0.abrupt("return", response.access_token); - case 13: - case "end": - return context$1$0.stop(); - } - }, callee$0$0, this); - })); - }, { "./xmlhttprequest": 23, "co": 24, "querystring": 28 }], 22: [function(require2, module4, exports3) { - "use strict"; - Object.defineProperty(exports3, "__esModule", { - value: true - }); - exports3.createObject = createObject; - exports3.updateObject = updateObject; - exports3.deleteObject = deleteObject; - exports3.syncCollection = syncCollection; - function _interopRequireWildcard(obj) { - if (obj && obj.__esModule) { - return obj; - } else { - var newObj = {}; - if (obj != null) { - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) - newObj[key] = obj[key]; - } - } - newObj["default"] = obj; - return newObj; - } + if (!this._monthsParse) { + this._monthsParse = []; + this._longMonthsParse = []; + this._shortMonthsParse = []; } - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { "default": obj }; + for (i3 = 0; i3 < 12; i3++) { + mom = createUTC([2e3, i3]); + if (strict && !this._longMonthsParse[i3]) { + this._longMonthsParse[i3] = new RegExp("^" + this.months(mom, "").replace(".", "") + "$", "i"); + this._shortMonthsParse[i3] = new RegExp("^" + this.monthsShort(mom, "").replace(".", "") + "$", "i"); + } + if (!strict && !this._monthsParse[i3]) { + regex = "^" + this.months(mom, "") + "|^" + this.monthsShort(mom, ""); + this._monthsParse[i3] = new RegExp(regex.replace(".", ""), "i"); + } + if (strict && format2 === "MMMM" && this._longMonthsParse[i3].test(monthName)) { + return i3; + } else if (strict && format2 === "MMM" && this._shortMonthsParse[i3].test(monthName)) { + return i3; + } else if (!strict && this._monthsParse[i3].test(monthName)) { + return i3; + } } - var _co = require2("co"); - var _co2 = _interopRequireDefault(_co); - var _fuzzy_url_equals = require2("./fuzzy_url_equals"); - var _fuzzy_url_equals2 = _interopRequireDefault(_fuzzy_url_equals); - var _namespace = require2("./namespace"); - var ns2 = _interopRequireWildcard(_namespace); - var _request = require2("./request"); - var request3 = _interopRequireWildcard(_request); - var debug = require2("./debug")("dav:webdav"); - function createObject(objectUrl, objectData, options) { - var req = request3.basic({ method: "PUT", data: objectData, contentType: options.contentType }); - return options.xhr.send(req, objectUrl, { sandbox: options.sandbox }); + } + function setMonth(mom, value) { + var dayOfMonth; + if (!mom.isValid()) { + return mom; } - function updateObject(objectUrl, objectData, etag, options) { - var req = request3.basic({ method: "PUT", data: objectData, etag, contentType: options.contentType }); - return options.xhr.send(req, objectUrl, { sandbox: options.sandbox }); + if (typeof value === "string") { + if (/^\d+$/.test(value)) { + value = toInt(value); + } else { + value = mom.localeData().monthsParse(value); + if (!isNumber3(value)) { + return mom; + } + } } - function deleteObject(objectUrl, etag, options) { - var req = request3.basic({ method: "DELETE", etag }); - return options.xhr.send(req, objectUrl, { sandbox: options.sandbox }); + dayOfMonth = Math.min(mom.date(), daysInMonth2(mom.year(), value)); + mom._d["set" + (mom._isUTC ? "UTC" : "") + "Month"](value, dayOfMonth); + return mom; + } + function getSetMonth(value) { + if (value != null) { + setMonth(this, value); + hooks.updateOffset(this, true); + return this; + } else { + return get(this, "Month"); } - function syncCollection(collection, options) { - var syncMethod = void 0; - if ("syncMethod" in options) { - syncMethod = options.syncMethod; - } else if (collection.reports && collection.reports.indexOf("syncCollection") !== -1) { - syncMethod = "webdav"; + } + function getDaysInMonth() { + return daysInMonth2(this.year(), this.month()); + } + function monthsShortRegex(isStrict) { + if (this._monthsParseExact) { + if (!hasOwnProp(this, "_monthsRegex")) { + computeMonthsParse.call(this); + } + if (isStrict) { + return this._monthsShortStrictRegex; } else { - syncMethod = "basic"; + return this._monthsShortRegex; } - if (syncMethod === "webdav") { - debug("rfc 6578 sync."); - return options.webdavSync(collection, options); + } else { + if (!hasOwnProp(this, "_monthsShortRegex")) { + this._monthsShortRegex = defaultMonthsShortRegex; + } + return this._monthsShortStrictRegex && isStrict ? this._monthsShortStrictRegex : this._monthsShortRegex; + } + } + function monthsRegex(isStrict) { + if (this._monthsParseExact) { + if (!hasOwnProp(this, "_monthsRegex")) { + computeMonthsParse.call(this); + } + if (isStrict) { + return this._monthsStrictRegex; } else { - debug("basic sync."); - return options.basicSync(collection, options); + return this._monthsRegex; + } + } else { + if (!hasOwnProp(this, "_monthsRegex")) { + this._monthsRegex = defaultMonthsRegex; } + return this._monthsStrictRegex && isStrict ? this._monthsStrictRegex : this._monthsRegex; } - var supportedReportSet = _co2["default"].wrap(regeneratorRuntime.mark(function callee$0$0(collection, options) { - var req, response; - return regeneratorRuntime.wrap(function callee$0$0$(context$1$0) { - while (1) - switch (context$1$0.prev = context$1$0.next) { - case 0: - debug("Checking supported report set for collection at " + collection.url); - req = request3.propfind({ - props: [{ name: "supported-report-set", namespace: ns2.DAV }], - depth: 1, - mergeResponses: true - }); - context$1$0.next = 4; - return options.xhr.send(req, collection.url, { - sandbox: options.sandbox - }); - case 4: - response = context$1$0.sent; - return context$1$0.abrupt("return", response.props.supportedReportSet); - case 6: - case "end": - return context$1$0.stop(); - } - }, callee$0$0, this); - })); - exports3.supportedReportSet = supportedReportSet; - var isCollectionDirty = _co2["default"].wrap(regeneratorRuntime.mark(function callee$0$0(collection, options) { - var req, responses, response; - return regeneratorRuntime.wrap(function callee$0$0$(context$1$0) { - while (1) - switch (context$1$0.prev = context$1$0.next) { - case 0: - if (collection.ctag) { - context$1$0.next = 3; - break; - } - debug("Missing ctag."); - return context$1$0.abrupt("return", false); - case 3: - debug("Fetch remote getctag prop."); - req = request3.propfind({ - props: [{ name: "getctag", namespace: ns2.CALENDAR_SERVER }], - depth: 0 - }); - context$1$0.next = 7; - return options.xhr.send(req, collection.account.homeUrl, { - sandbox: options.sandbox - }); - case 7: - responses = context$1$0.sent; - response = responses.filter(function(response2) { - return (0, _fuzzy_url_equals2["default"])(collection.url, response2.href); - })[0]; - if (response) { - context$1$0.next = 11; - break; - } - throw new Error("Could not find collection on remote. Was it deleted?"); - case 11: - debug("Check whether cached ctag matches remote."); - return context$1$0.abrupt("return", collection.ctag !== response.props.getctag); - case 13: - case "end": - return context$1$0.stop(); - } - }, callee$0$0, this); - })); - exports3.isCollectionDirty = isCollectionDirty; - }, { "./debug": 6, "./fuzzy_url_equals": 7, "./namespace": 10, "./request": 12, "co": 24 }], 23: [function(require2, module4, exports3) { - "use strict"; - Object.defineProperty(exports3, "__esModule", { - value: true - }); - var _createClass = function() { - function defineProperties(target, props) { - for (var i3 = 0; i3 < props.length; i3++) { - var descriptor = props[i3]; - descriptor.enumerable = descriptor.enumerable || false; - descriptor.configurable = true; - if ("value" in descriptor) - descriptor.writable = true; - Object.defineProperty(target, descriptor.key, descriptor); - } + } + function computeMonthsParse() { + function cmpLenRev(a3, b3) { + return b3.length - a3.length; + } + var shortPieces = [], longPieces = [], mixedPieces = [], i3, mom; + for (i3 = 0; i3 < 12; i3++) { + mom = createUTC([2e3, i3]); + shortPieces.push(this.monthsShort(mom, "")); + longPieces.push(this.months(mom, "")); + mixedPieces.push(this.months(mom, "")); + mixedPieces.push(this.monthsShort(mom, "")); + } + shortPieces.sort(cmpLenRev); + longPieces.sort(cmpLenRev); + mixedPieces.sort(cmpLenRev); + for (i3 = 0; i3 < 12; i3++) { + shortPieces[i3] = regexEscape(shortPieces[i3]); + longPieces[i3] = regexEscape(longPieces[i3]); + } + for (i3 = 0; i3 < 24; i3++) { + mixedPieces[i3] = regexEscape(mixedPieces[i3]); + } + this._monthsRegex = new RegExp("^(" + mixedPieces.join("|") + ")", "i"); + this._monthsShortRegex = this._monthsRegex; + this._monthsStrictRegex = new RegExp("^(" + longPieces.join("|") + ")", "i"); + this._monthsShortStrictRegex = new RegExp("^(" + shortPieces.join("|") + ")", "i"); + } + addFormatToken("Y", 0, 0, function() { + var y3 = this.year(); + return y3 <= 9999 ? zeroFill(y3, 4) : "+" + y3; + }); + addFormatToken(0, ["YY", 2], 0, function() { + return this.year() % 100; + }); + addFormatToken(0, ["YYYY", 4], 0, "year"); + addFormatToken(0, ["YYYYY", 5], 0, "year"); + addFormatToken(0, ["YYYYYY", 6, true], 0, "year"); + addUnitAlias("year", "y"); + addUnitPriority("year", 1); + addRegexToken("Y", matchSigned); + addRegexToken("YY", match1to2, match2); + addRegexToken("YYYY", match1to4, match4); + addRegexToken("YYYYY", match1to6, match6); + addRegexToken("YYYYYY", match1to6, match6); + addParseToken(["YYYYY", "YYYYYY"], YEAR); + addParseToken("YYYY", function(input, array) { + array[YEAR] = input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input); + }); + addParseToken("YY", function(input, array) { + array[YEAR] = hooks.parseTwoDigitYear(input); + }); + addParseToken("Y", function(input, array) { + array[YEAR] = parseInt(input, 10); + }); + function daysInYear2(year) { + return isLeapYear3(year) ? 366 : 365; + } + hooks.parseTwoDigitYear = function(input) { + return toInt(input) + (toInt(input) > 68 ? 1900 : 2e3); + }; + var getSetYear = makeGetSet("FullYear", true); + function getIsLeapYear() { + return isLeapYear3(this.year()); + } + function createDate(y3, m3, d2, h3, M2, s4, ms) { + var date; + if (y3 < 100 && y3 >= 0) { + date = new Date(y3 + 400, m3, d2, h3, M2, s4, ms); + if (isFinite(date.getFullYear())) { + date.setFullYear(y3); } - return function(Constructor, protoProps, staticProps) { - if (protoProps) - defineProperties(Constructor.prototype, protoProps); - if (staticProps) - defineProperties(Constructor, staticProps); - return Constructor; - }; - }(); - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); + } else { + date = new Date(y3, m3, d2, h3, M2, s4, ms); + } + return date; + } + function createUTCDate(y3) { + var date, args; + if (y3 < 100 && y3 >= 0) { + args = Array.prototype.slice.call(arguments); + args[0] = y3 + 400; + date = new Date(Date.UTC.apply(null, args)); + if (isFinite(date.getUTCFullYear())) { + date.setUTCFullYear(y3); } + } else { + date = new Date(Date.UTC.apply(null, arguments)); } - var debug = require2("./debug")("dav:xmlhttprequest"); - var Native = void 0; - if (typeof self !== "undefined" && "XMLHttpRequest" in self) { - Native = self.XMLHttpRequest; + return date; + } + function firstWeekOffset2(year, dow, doy) { + var fwd = 7 + dow - doy, fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7; + return -fwdlw + fwd - 1; + } + function dayOfYearFromWeeks(year, week, weekday, dow, doy) { + var localWeekday = (7 + weekday - dow) % 7, weekOffset = firstWeekOffset2(year, dow, doy), dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset, resYear, resDayOfYear; + if (dayOfYear <= 0) { + resYear = year - 1; + resDayOfYear = daysInYear2(resYear) + dayOfYear; + } else if (dayOfYear > daysInYear2(year)) { + resYear = year + 1; + resDayOfYear = dayOfYear - daysInYear2(year); } else { - Native = require2("xmlhttprequest").XMLHttpRequest; + resYear = year; + resDayOfYear = dayOfYear; } - var XMLHttpRequest2 = function() { - function XMLHttpRequest3(options) { - var _this = this; - _classCallCheck(this, XMLHttpRequest3); - this.request = new Native(options); - this.sandbox = null; - ["response", "responseText", "responseType", "responseXML", "timeout", "upload", "withCredentials"].forEach(function(attribute) { - Object.defineProperty(_this, attribute, { - get: function get() { - return this.request[attribute]; - }, - set: function set(value) { - this.request[attribute] = value; - } - }); - }); - ["status", "statusText"].forEach(function(attribute) { - Object.defineProperty(_this, attribute, { - get: function get() { - return this.request[attribute]; - } - }); - }); + return { + year: resYear, + dayOfYear: resDayOfYear + }; + } + function weekOfYear2(mom, dow, doy) { + var weekOffset = firstWeekOffset2(mom.year(), dow, doy), week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1, resWeek, resYear; + if (week < 1) { + resYear = mom.year() - 1; + resWeek = week + weeksInYear(resYear, dow, doy); + } else if (week > weeksInYear(mom.year(), dow, doy)) { + resWeek = week - weeksInYear(mom.year(), dow, doy); + resYear = mom.year() + 1; + } else { + resYear = mom.year(); + resWeek = week; + } + return { + week: resWeek, + year: resYear + }; + } + function weeksInYear(year, dow, doy) { + var weekOffset = firstWeekOffset2(year, dow, doy), weekOffsetNext = firstWeekOffset2(year + 1, dow, doy); + return (daysInYear2(year) - weekOffset + weekOffsetNext) / 7; + } + addFormatToken("w", ["ww", 2], "wo", "week"); + addFormatToken("W", ["WW", 2], "Wo", "isoWeek"); + addUnitAlias("week", "w"); + addUnitAlias("isoWeek", "W"); + addUnitPriority("week", 5); + addUnitPriority("isoWeek", 5); + addRegexToken("w", match1to2); + addRegexToken("ww", match1to2, match2); + addRegexToken("W", match1to2); + addRegexToken("WW", match1to2, match2); + addWeekParseToken(["w", "ww", "W", "WW"], function(input, week, config2, token2) { + week[token2.substr(0, 1)] = toInt(input); + }); + function localeWeek(mom) { + return weekOfYear2(mom, this._week.dow, this._week.doy).week; + } + var defaultLocaleWeek = { + dow: 0, + doy: 6 + }; + function localeFirstDayOfWeek() { + return this._week.dow; + } + function localeFirstDayOfYear() { + return this._week.doy; + } + function getSetWeek(input) { + var week = this.localeData().week(this); + return input == null ? week : this.add((input - week) * 7, "d"); + } + function getSetISOWeek(input) { + var week = weekOfYear2(this, 1, 4).week; + return input == null ? week : this.add((input - week) * 7, "d"); + } + addFormatToken("d", 0, "do", "day"); + addFormatToken("dd", 0, 0, function(format2) { + return this.localeData().weekdaysMin(this, format2); + }); + addFormatToken("ddd", 0, 0, function(format2) { + return this.localeData().weekdaysShort(this, format2); + }); + addFormatToken("dddd", 0, 0, function(format2) { + return this.localeData().weekdays(this, format2); + }); + addFormatToken("e", 0, 0, "weekday"); + addFormatToken("E", 0, 0, "isoWeekday"); + addUnitAlias("day", "d"); + addUnitAlias("weekday", "e"); + addUnitAlias("isoWeekday", "E"); + addUnitPriority("day", 11); + addUnitPriority("weekday", 11); + addUnitPriority("isoWeekday", 11); + addRegexToken("d", match1to2); + addRegexToken("e", match1to2); + addRegexToken("E", match1to2); + addRegexToken("dd", function(isStrict, locale2) { + return locale2.weekdaysMinRegex(isStrict); + }); + addRegexToken("ddd", function(isStrict, locale2) { + return locale2.weekdaysShortRegex(isStrict); + }); + addRegexToken("dddd", function(isStrict, locale2) { + return locale2.weekdaysRegex(isStrict); + }); + addWeekParseToken(["dd", "ddd", "dddd"], function(input, week, config2, token2) { + var weekday = config2._locale.weekdaysParse(input, token2, config2._strict); + if (weekday != null) { + week.d = weekday; + } else { + getParsingFlags(config2).invalidWeekday = input; + } + }); + addWeekParseToken(["d", "e", "E"], function(input, week, config2, token2) { + week[token2] = toInt(input); + }); + function parseWeekday2(input, locale2) { + if (typeof input !== "string") { + return input; + } + if (!isNaN(input)) { + return parseInt(input, 10); + } + input = locale2.weekdaysParse(input); + if (typeof input === "number") { + return input; + } + return null; + } + function parseIsoWeekday(input, locale2) { + if (typeof input === "string") { + return locale2.weekdaysParse(input) % 7 || 7; + } + return isNaN(input) ? null : input; + } + function shiftWeekdays(ws, n3) { + return ws.slice(n3, 7).concat(ws.slice(0, n3)); + } + var defaultLocaleWeekdays = "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), defaultLocaleWeekdaysShort = "Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"), defaultLocaleWeekdaysMin = "Su_Mo_Tu_We_Th_Fr_Sa".split("_"), defaultWeekdaysRegex = matchWord, defaultWeekdaysShortRegex = matchWord, defaultWeekdaysMinRegex = matchWord; + function localeWeekdays(m3, format2) { + var weekdays2 = isArray2(this._weekdays) ? this._weekdays : this._weekdays[m3 && m3 !== true && this._weekdays.isFormat.test(format2) ? "format" : "standalone"]; + return m3 === true ? shiftWeekdays(weekdays2, this._week.dow) : m3 ? weekdays2[m3.day()] : weekdays2; + } + function localeWeekdaysShort(m3) { + return m3 === true ? shiftWeekdays(this._weekdaysShort, this._week.dow) : m3 ? this._weekdaysShort[m3.day()] : this._weekdaysShort; + } + function localeWeekdaysMin(m3) { + return m3 === true ? shiftWeekdays(this._weekdaysMin, this._week.dow) : m3 ? this._weekdaysMin[m3.day()] : this._weekdaysMin; + } + function handleStrictParse$1(weekdayName, format2, strict) { + var i3, ii, mom, llc = weekdayName.toLocaleLowerCase(); + if (!this._weekdaysParse) { + this._weekdaysParse = []; + this._shortWeekdaysParse = []; + this._minWeekdaysParse = []; + for (i3 = 0; i3 < 7; ++i3) { + mom = createUTC([2e3, 1]).day(i3); + this._minWeekdaysParse[i3] = this.weekdaysMin(mom, "").toLocaleLowerCase(); + this._shortWeekdaysParse[i3] = this.weekdaysShort(mom, "").toLocaleLowerCase(); + this._weekdaysParse[i3] = this.weekdays(mom, "").toLocaleLowerCase(); } - _createClass(XMLHttpRequest3, [{ - key: "abort", - value: function abort() { - return this._callNative("abort", arguments); - } - }, { - key: "getAllResponseHeaders", - value: function getAllResponseHeaders() { - return this._callNative("getAllResponseHeaders", arguments); - } - }, { - key: "getResponseHeader", - value: function getResponseHeader() { - return this._callNative("getResponseHeader", arguments); - } - }, { - key: "open", - value: function open() { - return this._callNative("open", arguments); - } - }, { - key: "overrideMimeType", - value: function overrideMimeType() { - return this._callNative("overrideMimeType", arguments); - } - }, { - key: "setRequestHeader", - value: function setRequestHeader() { - return this._callNative("setRequestHeader", arguments); - } - }, { - key: "send", - value: function send(data) { - debug("Sending request data: " + data); - if (this.sandbox) - this.sandbox.add(this); - var request3 = this.request; - request3.send(data); - return new Promise(function(resolve, reject) { - request3.onreadystatechange = function() { - if (request3.readyState !== 4) { - return; - } - if (request3.status < 200 || request3.status >= 400) { - return reject(new Error("Bad status: " + request3.status)); - } - return resolve(request3.responseText); - }; - request3.ontimeout = function() { - reject(new Error("Request timed out after " + request3.timeout + " ms")); - }; - }); - } - }, { - key: "_callNative", - value: function _callNative(method, args) { - return this.request[method].apply(this.request, args); - } - }]); - return XMLHttpRequest3; - }(); - exports3["default"] = XMLHttpRequest2; - module4.exports = exports3["default"]; - }, { "./debug": 6 }], 24: [function(require2, module4, exports3) { - var slice = Array.prototype.slice; - module4.exports = co2["default"] = co2.co = co2; - co2.wrap = function(fn) { - createPromise.__generatorFunction__ = fn; - return createPromise; - function createPromise() { - return co2.call(this, fn.apply(this, arguments)); + } + if (strict) { + if (format2 === "dddd") { + ii = indexOf.call(this._weekdaysParse, llc); + return ii !== -1 ? ii : null; + } else if (format2 === "ddd") { + ii = indexOf.call(this._shortWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._minWeekdaysParse, llc); + return ii !== -1 ? ii : null; } - }; - function co2(gen) { - var ctx = this; - var args = slice.call(arguments, 1); - return new Promise(function(resolve, reject) { - if (typeof gen === "function") - gen = gen.apply(ctx, args); - if (!gen || typeof gen.next !== "function") - return resolve(gen); - onFulfilled(); - function onFulfilled(res) { - var ret; - try { - ret = gen.next(res); - } catch (e3) { - return reject(e3); - } - next(ret); + } else { + if (format2 === "dddd") { + ii = indexOf.call(this._weekdaysParse, llc); + if (ii !== -1) { + return ii; } - function onRejected(err) { - var ret; - try { - ret = gen.throw(err); - } catch (e3) { - return reject(e3); - } - next(ret); + ii = indexOf.call(this._shortWeekdaysParse, llc); + if (ii !== -1) { + return ii; } - function next(ret) { - if (ret.done) - return resolve(ret.value); - var value = toPromise.call(ctx, ret.value); - if (value && isPromise(value)) - return value.then(onFulfilled, onRejected); - return onRejected(new TypeError('You may only yield a function, promise, generator, array, or object, but the following object was passed: "' + String(ret.value) + '"')); + ii = indexOf.call(this._minWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } else if (format2 === "ddd") { + ii = indexOf.call(this._shortWeekdaysParse, llc); + if (ii !== -1) { + return ii; } - }); + ii = indexOf.call(this._weekdaysParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._minWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._minWeekdaysParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._weekdaysParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._shortWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } } - function toPromise(obj) { - if (!obj) - return obj; - if (isPromise(obj)) - return obj; - if (isGeneratorFunction(obj) || isGenerator(obj)) - return co2.call(this, obj); - if (typeof obj == "function") - return thunkToPromise.call(this, obj); - if (Array.isArray(obj)) - return arrayToPromise.call(this, obj); - if (isObject(obj)) - return objectToPromise.call(this, obj); - return obj; + } + function localeWeekdaysParse(weekdayName, format2, strict) { + var i3, mom, regex; + if (this._weekdaysParseExact) { + return handleStrictParse$1.call(this, weekdayName, format2, strict); } - function thunkToPromise(fn) { - var ctx = this; - return new Promise(function(resolve, reject) { - fn.call(ctx, function(err, res) { - if (err) - return reject(err); - if (arguments.length > 2) - res = slice.call(arguments, 1); - resolve(res); - }); - }); + if (!this._weekdaysParse) { + this._weekdaysParse = []; + this._minWeekdaysParse = []; + this._shortWeekdaysParse = []; + this._fullWeekdaysParse = []; } - function arrayToPromise(obj) { - return Promise.all(obj.map(toPromise, this)); + for (i3 = 0; i3 < 7; i3++) { + mom = createUTC([2e3, 1]).day(i3); + if (strict && !this._fullWeekdaysParse[i3]) { + this._fullWeekdaysParse[i3] = new RegExp("^" + this.weekdays(mom, "").replace(".", "\\.?") + "$", "i"); + this._shortWeekdaysParse[i3] = new RegExp("^" + this.weekdaysShort(mom, "").replace(".", "\\.?") + "$", "i"); + this._minWeekdaysParse[i3] = new RegExp("^" + this.weekdaysMin(mom, "").replace(".", "\\.?") + "$", "i"); + } + if (!this._weekdaysParse[i3]) { + regex = "^" + this.weekdays(mom, "") + "|^" + this.weekdaysShort(mom, "") + "|^" + this.weekdaysMin(mom, ""); + this._weekdaysParse[i3] = new RegExp(regex.replace(".", ""), "i"); + } + if (strict && format2 === "dddd" && this._fullWeekdaysParse[i3].test(weekdayName)) { + return i3; + } else if (strict && format2 === "ddd" && this._shortWeekdaysParse[i3].test(weekdayName)) { + return i3; + } else if (strict && format2 === "dd" && this._minWeekdaysParse[i3].test(weekdayName)) { + return i3; + } else if (!strict && this._weekdaysParse[i3].test(weekdayName)) { + return i3; + } } - function objectToPromise(obj) { - var results = new obj.constructor(); - var keys = Object.keys(obj); - var promises = []; - for (var i3 = 0; i3 < keys.length; i3++) { - var key = keys[i3]; - var promise = toPromise.call(this, obj[key]); - if (promise && isPromise(promise)) - defer(promise, key); - else - results[key] = obj[key]; + } + function getSetDayOfWeek(input) { + if (!this.isValid()) { + return input != null ? this : NaN; + } + var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay(); + if (input != null) { + input = parseWeekday2(input, this.localeData()); + return this.add(input - day, "d"); + } else { + return day; + } + } + function getSetLocaleDayOfWeek(input) { + if (!this.isValid()) { + return input != null ? this : NaN; + } + var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7; + return input == null ? weekday : this.add(input - weekday, "d"); + } + function getSetISODayOfWeek(input) { + if (!this.isValid()) { + return input != null ? this : NaN; + } + if (input != null) { + var weekday = parseIsoWeekday(input, this.localeData()); + return this.day(this.day() % 7 ? weekday : weekday - 7); + } else { + return this.day() || 7; + } + } + function weekdaysRegex(isStrict) { + if (this._weekdaysParseExact) { + if (!hasOwnProp(this, "_weekdaysRegex")) { + computeWeekdaysParse.call(this); } - return Promise.all(promises).then(function() { - return results; - }); - function defer(promise2, key2) { - results[key2] = void 0; - promises.push(promise2.then(function(res) { - results[key2] = res; - })); + if (isStrict) { + return this._weekdaysStrictRegex; + } else { + return this._weekdaysRegex; + } + } else { + if (!hasOwnProp(this, "_weekdaysRegex")) { + this._weekdaysRegex = defaultWeekdaysRegex; } + return this._weekdaysStrictRegex && isStrict ? this._weekdaysStrictRegex : this._weekdaysRegex; } - function isPromise(obj) { - return typeof obj.then == "function"; + } + function weekdaysShortRegex(isStrict) { + if (this._weekdaysParseExact) { + if (!hasOwnProp(this, "_weekdaysRegex")) { + computeWeekdaysParse.call(this); + } + if (isStrict) { + return this._weekdaysShortStrictRegex; + } else { + return this._weekdaysShortRegex; + } + } else { + if (!hasOwnProp(this, "_weekdaysShortRegex")) { + this._weekdaysShortRegex = defaultWeekdaysShortRegex; + } + return this._weekdaysShortStrictRegex && isStrict ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex; } - function isGenerator(obj) { - return typeof obj.next == "function" && typeof obj.throw == "function"; + } + function weekdaysMinRegex(isStrict) { + if (this._weekdaysParseExact) { + if (!hasOwnProp(this, "_weekdaysRegex")) { + computeWeekdaysParse.call(this); + } + if (isStrict) { + return this._weekdaysMinStrictRegex; + } else { + return this._weekdaysMinRegex; + } + } else { + if (!hasOwnProp(this, "_weekdaysMinRegex")) { + this._weekdaysMinRegex = defaultWeekdaysMinRegex; + } + return this._weekdaysMinStrictRegex && isStrict ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex; } - function isGeneratorFunction(obj) { - var constructor = obj.constructor; - if (!constructor) - return false; - if (constructor.name === "GeneratorFunction" || constructor.displayName === "GeneratorFunction") - return true; - return isGenerator(constructor.prototype); + } + function computeWeekdaysParse() { + function cmpLenRev(a3, b3) { + return b3.length - a3.length; } - function isObject(val) { - return Object == val.constructor; + var minPieces = [], shortPieces = [], longPieces = [], mixedPieces = [], i3, mom, minp, shortp, longp; + for (i3 = 0; i3 < 7; i3++) { + mom = createUTC([2e3, 1]).day(i3); + minp = regexEscape(this.weekdaysMin(mom, "")); + shortp = regexEscape(this.weekdaysShort(mom, "")); + longp = regexEscape(this.weekdays(mom, "")); + minPieces.push(minp); + shortPieces.push(shortp); + longPieces.push(longp); + mixedPieces.push(minp); + mixedPieces.push(shortp); + mixedPieces.push(longp); } - }, {}], 25: [function(require2, module4, exports3) { - (function(global2) { - ; - (function(root) { - var freeExports = typeof exports3 == "object" && exports3 && !exports3.nodeType && exports3; - var freeModule = typeof module4 == "object" && module4 && !module4.nodeType && module4; - var freeGlobal = typeof global2 == "object" && global2; - if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal || freeGlobal.self === freeGlobal) { - root = freeGlobal; - } - var punycode, maxInt = 2147483647, base = 36, tMin = 1, tMax = 26, skew = 38, damp = 700, initialBias = 72, initialN = 128, delimiter = "-", regexPunycode = /^xn--/, regexNonASCII = /[^\x20-\x7E]/, regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g, errors = { - "overflow": "Overflow: input needs wider integers to process", - "not-basic": "Illegal input >= 0x80 (not a basic code point)", - "invalid-input": "Invalid input" - }, baseMinusTMin = base - tMin, floor = Math.floor, stringFromCharCode = String.fromCharCode, key; - function error(type) { - throw new RangeError(errors[type]); - } - function map(array, fn) { - var length = array.length; - var result = []; - while (length--) { - result[length] = fn(array[length]); - } - return result; - } - function mapDomain(string, fn) { - var parts = string.split("@"); - var result = ""; - if (parts.length > 1) { - result = parts[0] + "@"; - string = parts[1]; - } - string = string.replace(regexSeparators, "."); - var labels = string.split("."); - var encoded = map(labels, fn).join("."); - return result + encoded; - } - function ucs2decode(string) { - var output = [], counter = 0, length = string.length, value, extra; - while (counter < length) { - value = string.charCodeAt(counter++); - if (value >= 55296 && value <= 56319 && counter < length) { - extra = string.charCodeAt(counter++); - if ((extra & 64512) == 56320) { - output.push(((value & 1023) << 10) + (extra & 1023) + 65536); - } else { - output.push(value); - counter--; - } - } else { - output.push(value); - } - } - return output; - } - function ucs2encode(array) { - return map(array, function(value) { - var output = ""; - if (value > 65535) { - value -= 65536; - output += stringFromCharCode(value >>> 10 & 1023 | 55296); - value = 56320 | value & 1023; - } - output += stringFromCharCode(value); - return output; - }).join(""); - } - function basicToDigit(codePoint) { - if (codePoint - 48 < 10) { - return codePoint - 22; - } - if (codePoint - 65 < 26) { - return codePoint - 65; - } - if (codePoint - 97 < 26) { - return codePoint - 97; - } - return base; - } - function digitToBasic(digit, flag) { - return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); - } - function adapt(delta, numPoints, firstTime) { - var k3 = 0; - delta = firstTime ? floor(delta / damp) : delta >> 1; - delta += floor(delta / numPoints); - for (; delta > baseMinusTMin * tMax >> 1; k3 += base) { - delta = floor(delta / baseMinusTMin); - } - return floor(k3 + (baseMinusTMin + 1) * delta / (delta + skew)); - } - function decode(input) { - var output = [], inputLength = input.length, out, i3 = 0, n3 = initialN, bias = initialBias, basic, j4, index, oldi, w4, k3, digit, t3, baseMinusT; - basic = input.lastIndexOf(delimiter); - if (basic < 0) { - basic = 0; - } - for (j4 = 0; j4 < basic; ++j4) { - if (input.charCodeAt(j4) >= 128) { - error("not-basic"); - } - output.push(input.charCodeAt(j4)); - } - for (index = basic > 0 ? basic + 1 : 0; index < inputLength; ) { - for (oldi = i3, w4 = 1, k3 = base; ; k3 += base) { - if (index >= inputLength) { - error("invalid-input"); - } - digit = basicToDigit(input.charCodeAt(index++)); - if (digit >= base || digit > floor((maxInt - i3) / w4)) { - error("overflow"); - } - i3 += digit * w4; - t3 = k3 <= bias ? tMin : k3 >= bias + tMax ? tMax : k3 - bias; - if (digit < t3) { - break; - } - baseMinusT = base - t3; - if (w4 > floor(maxInt / baseMinusT)) { - error("overflow"); - } - w4 *= baseMinusT; - } - out = output.length + 1; - bias = adapt(i3 - oldi, out, oldi == 0); - if (floor(i3 / out) > maxInt - n3) { - error("overflow"); - } - n3 += floor(i3 / out); - i3 %= out; - output.splice(i3++, 0, n3); - } - return ucs2encode(output); - } - function encode(input) { - var n3, delta, handledCPCount, basicLength, bias, j4, m3, q3, k3, t3, currentValue, output = [], inputLength, handledCPCountPlusOne, baseMinusT, qMinusT; - input = ucs2decode(input); - inputLength = input.length; - n3 = initialN; - delta = 0; - bias = initialBias; - for (j4 = 0; j4 < inputLength; ++j4) { - currentValue = input[j4]; - if (currentValue < 128) { - output.push(stringFromCharCode(currentValue)); - } - } - handledCPCount = basicLength = output.length; - if (basicLength) { - output.push(delimiter); - } - while (handledCPCount < inputLength) { - for (m3 = maxInt, j4 = 0; j4 < inputLength; ++j4) { - currentValue = input[j4]; - if (currentValue >= n3 && currentValue < m3) { - m3 = currentValue; - } - } - handledCPCountPlusOne = handledCPCount + 1; - if (m3 - n3 > floor((maxInt - delta) / handledCPCountPlusOne)) { - error("overflow"); - } - delta += (m3 - n3) * handledCPCountPlusOne; - n3 = m3; - for (j4 = 0; j4 < inputLength; ++j4) { - currentValue = input[j4]; - if (currentValue < n3 && ++delta > maxInt) { - error("overflow"); - } - if (currentValue == n3) { - for (q3 = delta, k3 = base; ; k3 += base) { - t3 = k3 <= bias ? tMin : k3 >= bias + tMax ? tMax : k3 - bias; - if (q3 < t3) { - break; - } - qMinusT = q3 - t3; - baseMinusT = base - t3; - output.push(stringFromCharCode(digitToBasic(t3 + qMinusT % baseMinusT, 0))); - q3 = floor(qMinusT / baseMinusT); - } - output.push(stringFromCharCode(digitToBasic(q3, 0))); - bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength); - delta = 0; - ++handledCPCount; - } - } - ++delta; - ++n3; - } - return output.join(""); + minPieces.sort(cmpLenRev); + shortPieces.sort(cmpLenRev); + longPieces.sort(cmpLenRev); + mixedPieces.sort(cmpLenRev); + this._weekdaysRegex = new RegExp("^(" + mixedPieces.join("|") + ")", "i"); + this._weekdaysShortRegex = this._weekdaysRegex; + this._weekdaysMinRegex = this._weekdaysRegex; + this._weekdaysStrictRegex = new RegExp("^(" + longPieces.join("|") + ")", "i"); + this._weekdaysShortStrictRegex = new RegExp("^(" + shortPieces.join("|") + ")", "i"); + this._weekdaysMinStrictRegex = new RegExp("^(" + minPieces.join("|") + ")", "i"); + } + function hFormat() { + return this.hours() % 12 || 12; + } + function kFormat() { + return this.hours() || 24; + } + addFormatToken("H", ["HH", 2], 0, "hour"); + addFormatToken("h", ["hh", 2], 0, hFormat); + addFormatToken("k", ["kk", 2], 0, kFormat); + addFormatToken("hmm", 0, 0, function() { + return "" + hFormat.apply(this) + zeroFill(this.minutes(), 2); + }); + addFormatToken("hmmss", 0, 0, function() { + return "" + hFormat.apply(this) + zeroFill(this.minutes(), 2) + zeroFill(this.seconds(), 2); + }); + addFormatToken("Hmm", 0, 0, function() { + return "" + this.hours() + zeroFill(this.minutes(), 2); + }); + addFormatToken("Hmmss", 0, 0, function() { + return "" + this.hours() + zeroFill(this.minutes(), 2) + zeroFill(this.seconds(), 2); + }); + function meridiem(token2, lowercase) { + addFormatToken(token2, 0, 0, function() { + return this.localeData().meridiem(this.hours(), this.minutes(), lowercase); + }); + } + meridiem("a", true); + meridiem("A", false); + addUnitAlias("hour", "h"); + addUnitPriority("hour", 13); + function matchMeridiem(isStrict, locale2) { + return locale2._meridiemParse; + } + addRegexToken("a", matchMeridiem); + addRegexToken("A", matchMeridiem); + addRegexToken("H", match1to2); + addRegexToken("h", match1to2); + addRegexToken("k", match1to2); + addRegexToken("HH", match1to2, match2); + addRegexToken("hh", match1to2, match2); + addRegexToken("kk", match1to2, match2); + addRegexToken("hmm", match3to4); + addRegexToken("hmmss", match5to6); + addRegexToken("Hmm", match3to4); + addRegexToken("Hmmss", match5to6); + addParseToken(["H", "HH"], HOUR); + addParseToken(["k", "kk"], function(input, array, config2) { + var kInput = toInt(input); + array[HOUR] = kInput === 24 ? 0 : kInput; + }); + addParseToken(["a", "A"], function(input, array, config2) { + config2._isPm = config2._locale.isPM(input); + config2._meridiem = input; + }); + addParseToken(["h", "hh"], function(input, array, config2) { + array[HOUR] = toInt(input); + getParsingFlags(config2).bigHour = true; + }); + addParseToken("hmm", function(input, array, config2) { + var pos = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos)); + array[MINUTE2] = toInt(input.substr(pos)); + getParsingFlags(config2).bigHour = true; + }); + addParseToken("hmmss", function(input, array, config2) { + var pos1 = input.length - 4, pos2 = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos1)); + array[MINUTE2] = toInt(input.substr(pos1, 2)); + array[SECOND2] = toInt(input.substr(pos2)); + getParsingFlags(config2).bigHour = true; + }); + addParseToken("Hmm", function(input, array, config2) { + var pos = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos)); + array[MINUTE2] = toInt(input.substr(pos)); + }); + addParseToken("Hmmss", function(input, array, config2) { + var pos1 = input.length - 4, pos2 = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos1)); + array[MINUTE2] = toInt(input.substr(pos1, 2)); + array[SECOND2] = toInt(input.substr(pos2)); + }); + function localeIsPM(input) { + return (input + "").toLowerCase().charAt(0) === "p"; + } + var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i, getSetHour = makeGetSet("Hours", true); + function localeMeridiem(hours2, minutes2, isLower) { + if (hours2 > 11) { + return isLower ? "pm" : "PM"; + } else { + return isLower ? "am" : "AM"; + } + } + var baseConfig = { + calendar: defaultCalendar, + longDateFormat: defaultLongDateFormat, + invalidDate: defaultInvalidDate, + ordinal: defaultOrdinal, + dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse, + relativeTime: defaultRelativeTime, + months: defaultLocaleMonths, + monthsShort: defaultLocaleMonthsShort, + week: defaultLocaleWeek, + weekdays: defaultLocaleWeekdays, + weekdaysMin: defaultLocaleWeekdaysMin, + weekdaysShort: defaultLocaleWeekdaysShort, + meridiemParse: defaultLocaleMeridiemParse + }; + var locales = {}, localeFamilies = {}, globalLocale; + function commonPrefix(arr1, arr2) { + var i3, minl = Math.min(arr1.length, arr2.length); + for (i3 = 0; i3 < minl; i3 += 1) { + if (arr1[i3] !== arr2[i3]) { + return i3; + } + } + return minl; + } + function normalizeLocale(key) { + return key ? key.toLowerCase().replace("_", "-") : key; + } + function chooseLocale(names) { + var i3 = 0, j4, next, locale2, split2; + while (i3 < names.length) { + split2 = normalizeLocale(names[i3]).split("-"); + j4 = split2.length; + next = normalizeLocale(names[i3 + 1]); + next = next ? next.split("-") : null; + while (j4 > 0) { + locale2 = loadLocale(split2.slice(0, j4).join("-")); + if (locale2) { + return locale2; } - function toUnicode(input) { - return mapDomain(input, function(string) { - return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string; - }); + if (next && next.length >= j4 && commonPrefix(split2, next) >= j4 - 1) { + break; } - function toASCII(input) { - return mapDomain(input, function(string) { - return regexNonASCII.test(string) ? "xn--" + encode(string) : string; - }); + j4--; + } + i3++; + } + return globalLocale; + } + function isLocaleNameSane(name) { + return name.match("^[^/\\\\]*$") != null; + } + function loadLocale(name) { + var oldLocale = null, aliasedRequire; + if (locales[name] === void 0 && typeof module2 !== "undefined" && module2 && module2.exports && isLocaleNameSane(name)) { + try { + oldLocale = globalLocale._abbr; + aliasedRequire = require; + aliasedRequire("./locale/" + name); + getSetGlobalLocale(oldLocale); + } catch (e3) { + locales[name] = null; + } + } + return locales[name]; + } + function getSetGlobalLocale(key, values) { + var data; + if (key) { + if (isUndefined2(values)) { + data = getLocale(key); + } else { + data = defineLocale(key, values); + } + if (data) { + globalLocale = data; + } else { + if (typeof console !== "undefined" && console.warn) { + console.warn("Locale " + key + " not found. Did you forget to load it?"); } - punycode = { - "version": "1.4.1", - "ucs2": { - "decode": ucs2decode, - "encode": ucs2encode - }, - "decode": decode, - "encode": encode, - "toASCII": toASCII, - "toUnicode": toUnicode - }; - if (typeof define2 == "function" && typeof define2.amd == "object" && define2.amd) { - define2("punycode", function() { - return punycode; - }); - } else if (freeExports && freeModule) { - if (module4.exports == freeExports) { - freeModule.exports = punycode; + } + } + return globalLocale._abbr; + } + function defineLocale(name, config2) { + if (config2 !== null) { + var locale2, parentConfig = baseConfig; + config2.abbr = name; + if (locales[name] != null) { + deprecateSimple("defineLocaleOverride", "use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."); + parentConfig = locales[name]._config; + } else if (config2.parentLocale != null) { + if (locales[config2.parentLocale] != null) { + parentConfig = locales[config2.parentLocale]._config; + } else { + locale2 = loadLocale(config2.parentLocale); + if (locale2 != null) { + parentConfig = locale2._config; } else { - for (key in punycode) { - punycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]); + if (!localeFamilies[config2.parentLocale]) { + localeFamilies[config2.parentLocale] = []; } + localeFamilies[config2.parentLocale].push({ + name, + config: config2 + }); + return null; } - } else { - root.punycode = punycode; } - })(this); - }).call(this, typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}); - }, {}], 26: [function(require2, module4, exports3) { - "use strict"; - function hasOwnProperty3(obj, prop) { - return Object.prototype.hasOwnProperty.call(obj, prop); - } - module4.exports = function(qs, sep, eq, options) { - sep = sep || "&"; - eq = eq || "="; - var obj = {}; - if (typeof qs !== "string" || qs.length === 0) { - return obj; - } - var regexp = /\+/g; - qs = qs.split(sep); - var maxKeys = 1e3; - if (options && typeof options.maxKeys === "number") { - maxKeys = options.maxKeys; } - var len = qs.length; - if (maxKeys > 0 && len > maxKeys) { - len = maxKeys; + locales[name] = new Locale2(mergeConfigs(parentConfig, config2)); + if (localeFamilies[name]) { + localeFamilies[name].forEach(function(x3) { + defineLocale(x3.name, x3.config); + }); } - for (var i3 = 0; i3 < len; ++i3) { - var x4 = qs[i3].replace(regexp, "%20"), idx = x4.indexOf(eq), kstr, vstr, k3, v3; - if (idx >= 0) { - kstr = x4.substr(0, idx); - vstr = x4.substr(idx + 1); - } else { - kstr = x4; - vstr = ""; + getSetGlobalLocale(name); + return locales[name]; + } else { + delete locales[name]; + return null; + } + } + function updateLocale(name, config2) { + if (config2 != null) { + var locale2, tmpLocale, parentConfig = baseConfig; + if (locales[name] != null && locales[name].parentLocale != null) { + locales[name].set(mergeConfigs(locales[name]._config, config2)); + } else { + tmpLocale = loadLocale(name); + if (tmpLocale != null) { + parentConfig = tmpLocale._config; } - k3 = decodeURIComponent(kstr); - v3 = decodeURIComponent(vstr); - if (!hasOwnProperty3(obj, k3)) { - obj[k3] = v3; - } else if (isArray(obj[k3])) { - obj[k3].push(v3); - } else { - obj[k3] = [obj[k3], v3]; + config2 = mergeConfigs(parentConfig, config2); + if (tmpLocale == null) { + config2.abbr = name; } + locale2 = new Locale2(config2); + locale2.parentLocale = locales[name]; + locales[name] = locale2; } - return obj; - }; - var isArray = Array.isArray || function(xs) { - return Object.prototype.toString.call(xs) === "[object Array]"; - }; - }, {}], 27: [function(require2, module4, exports3) { - "use strict"; - var stringifyPrimitive = function(v3) { - switch (typeof v3) { - case "string": - return v3; - case "boolean": - return v3 ? "true" : "false"; - case "number": - return isFinite(v3) ? v3 : ""; - default: - return ""; - } - }; - module4.exports = function(obj, sep, eq, name) { - sep = sep || "&"; - eq = eq || "="; - if (obj === null) { - obj = void 0; - } - if (typeof obj === "object") { - return map(objectKeys(obj), function(k3) { - var ks = encodeURIComponent(stringifyPrimitive(k3)) + eq; - if (isArray(obj[k3])) { - return map(obj[k3], function(v3) { - return ks + encodeURIComponent(stringifyPrimitive(v3)); - }).join(sep); - } else { - return ks + encodeURIComponent(stringifyPrimitive(obj[k3])); + getSetGlobalLocale(name); + } else { + if (locales[name] != null) { + if (locales[name].parentLocale != null) { + locales[name] = locales[name].parentLocale; + if (name === getSetGlobalLocale()) { + getSetGlobalLocale(name); } - }).join(sep); - } - if (!name) - return ""; - return encodeURIComponent(stringifyPrimitive(name)) + eq + encodeURIComponent(stringifyPrimitive(obj)); - }; - var isArray = Array.isArray || function(xs) { - return Object.prototype.toString.call(xs) === "[object Array]"; - }; - function map(xs, f3) { - if (xs.map) - return xs.map(f3); - var res = []; - for (var i3 = 0; i3 < xs.length; i3++) { - res.push(f3(xs[i3], i3)); + } else if (locales[name] != null) { + delete locales[name]; + } } - return res; } - var objectKeys = Object.keys || function(obj) { - var res = []; - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) - res.push(key); - } - return res; - }; - }, {}], 28: [function(require2, module4, exports3) { - "use strict"; - exports3.decode = exports3.parse = require2("./decode"); - exports3.encode = exports3.stringify = require2("./encode"); - }, { "./decode": 26, "./encode": 27 }], 29: [function(require2, module4, exports3) { - var punycode = require2("punycode"); - exports3.parse = urlParse; - exports3.resolve = urlResolve; - exports3.resolveObject = urlResolveObject; - exports3.format = urlFormat; - exports3.Url = Url; - function Url() { - this.protocol = null; - this.slashes = null; - this.auth = null; - this.host = null; - this.port = null; - this.hostname = null; - this.hash = null; - this.search = null; - this.query = null; - this.pathname = null; - this.path = null; - this.href = null; + return locales[name]; + } + function getLocale(key) { + var locale2; + if (key && key._locale && key._locale._abbr) { + key = key._locale._abbr; } - var protocolPattern = /^([a-z0-9.+-]+:)/i, portPattern = /:[0-9]*$/, delims = ["<", ">", '"', "`", " ", "\r", "\n", " "], unwise = ["{", "}", "|", "\\", "^", "`"].concat(delims), autoEscape = ["'"].concat(unwise), nonHostChars = ["%", "/", "?", ";", "#"].concat(autoEscape), hostEndingChars = ["/", "?", "#"], hostnameMaxLen = 255, hostnamePartPattern = /^[a-z0-9A-Z_-]{0,63}$/, hostnamePartStart = /^([a-z0-9A-Z_-]{0,63})(.*)$/, unsafeProtocol = { - "javascript": true, - "javascript:": true - }, hostlessProtocol = { - "javascript": true, - "javascript:": true - }, slashedProtocol = { - "http": true, - "https": true, - "ftp": true, - "gopher": true, - "file": true, - "http:": true, - "https:": true, - "ftp:": true, - "gopher:": true, - "file:": true - }, querystring = require2("querystring"); - function urlParse(url, parseQueryString, slashesDenoteHost) { - if (url && isObject(url) && url instanceof Url) - return url; - var u3 = new Url(); - u3.parse(url, parseQueryString, slashesDenoteHost); - return u3; + if (!key) { + return globalLocale; } - Url.prototype.parse = function(url, parseQueryString, slashesDenoteHost) { - if (!isString2(url)) { - throw new TypeError("Parameter 'url' must be a string, not " + typeof url); + if (!isArray2(key)) { + locale2 = loadLocale(key); + if (locale2) { + return locale2; } - var rest = url; - rest = rest.trim(); - var proto = protocolPattern.exec(rest); - if (proto) { - proto = proto[0]; - var lowerProto = proto.toLowerCase(); - this.protocol = lowerProto; - rest = rest.substr(proto.length); + key = [key]; + } + return chooseLocale(key); + } + function listLocales() { + return keys(locales); + } + function checkOverflow(m3) { + var overflow, a3 = m3._a; + if (a3 && getParsingFlags(m3).overflow === -2) { + overflow = a3[MONTH] < 0 || a3[MONTH] > 11 ? MONTH : a3[DATE] < 1 || a3[DATE] > daysInMonth2(a3[YEAR], a3[MONTH]) ? DATE : a3[HOUR] < 0 || a3[HOUR] > 24 || a3[HOUR] === 24 && (a3[MINUTE2] !== 0 || a3[SECOND2] !== 0 || a3[MILLISECOND] !== 0) ? HOUR : a3[MINUTE2] < 0 || a3[MINUTE2] > 59 ? MINUTE2 : a3[SECOND2] < 0 || a3[SECOND2] > 59 ? SECOND2 : a3[MILLISECOND] < 0 || a3[MILLISECOND] > 999 ? MILLISECOND : -1; + if (getParsingFlags(m3)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) { + overflow = DATE; } - if (slashesDenoteHost || proto || rest.match(/^\/\/[^@\/]+@[^@\/]+/)) { - var slashes = rest.substr(0, 2) === "//"; - if (slashes && !(proto && hostlessProtocol[proto])) { - rest = rest.substr(2); - this.slashes = true; - } + if (getParsingFlags(m3)._overflowWeeks && overflow === -1) { + overflow = WEEK; } - if (!hostlessProtocol[proto] && (slashes || proto && !slashedProtocol[proto])) { - var hostEnd = -1; - for (var i3 = 0; i3 < hostEndingChars.length; i3++) { - var hec = rest.indexOf(hostEndingChars[i3]); - if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) - hostEnd = hec; - } - var auth, atSign; - if (hostEnd === -1) { - atSign = rest.lastIndexOf("@"); - } else { - atSign = rest.lastIndexOf("@", hostEnd); - } - if (atSign !== -1) { - auth = rest.slice(0, atSign); - rest = rest.slice(atSign + 1); - this.auth = decodeURIComponent(auth); - } - hostEnd = -1; - for (var i3 = 0; i3 < nonHostChars.length; i3++) { - var hec = rest.indexOf(nonHostChars[i3]); - if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) - hostEnd = hec; - } - if (hostEnd === -1) - hostEnd = rest.length; - this.host = rest.slice(0, hostEnd); - rest = rest.slice(hostEnd); - this.parseHost(); - this.hostname = this.hostname || ""; - var ipv6Hostname = this.hostname[0] === "[" && this.hostname[this.hostname.length - 1] === "]"; - if (!ipv6Hostname) { - var hostparts = this.hostname.split(/\./); - for (var i3 = 0, l4 = hostparts.length; i3 < l4; i3++) { - var part = hostparts[i3]; - if (!part) - continue; - if (!part.match(hostnamePartPattern)) { - var newpart = ""; - for (var j4 = 0, k3 = part.length; j4 < k3; j4++) { - if (part.charCodeAt(j4) > 127) { - newpart += "x"; - } else { - newpart += part[j4]; - } - } - if (!newpart.match(hostnamePartPattern)) { - var validParts = hostparts.slice(0, i3); - var notHost = hostparts.slice(i3 + 1); - var bit = part.match(hostnamePartStart); - if (bit) { - validParts.push(bit[1]); - notHost.unshift(bit[2]); - } - if (notHost.length) { - rest = "/" + notHost.join(".") + rest; - } - this.hostname = validParts.join("."); - break; - } - } - } - } - if (this.hostname.length > hostnameMaxLen) { - this.hostname = ""; - } else { - this.hostname = this.hostname.toLowerCase(); - } - if (!ipv6Hostname) { - var domainArray = this.hostname.split("."); - var newOut = []; - for (var i3 = 0; i3 < domainArray.length; ++i3) { - var s4 = domainArray[i3]; - newOut.push(s4.match(/[^A-Za-z0-9_-]/) ? "xn--" + punycode.encode(s4) : s4); - } - this.hostname = newOut.join("."); - } - var p3 = this.port ? ":" + this.port : ""; - var h3 = this.hostname || ""; - this.host = h3 + p3; - this.href += this.host; - if (ipv6Hostname) { - this.hostname = this.hostname.substr(1, this.hostname.length - 2); - if (rest[0] !== "/") { - rest = "/" + rest; - } - } + if (getParsingFlags(m3)._overflowWeekday && overflow === -1) { + overflow = WEEKDAY; } - if (!unsafeProtocol[lowerProto]) { - for (var i3 = 0, l4 = autoEscape.length; i3 < l4; i3++) { - var ae = autoEscape[i3]; - var esc = encodeURIComponent(ae); - if (esc === ae) { - esc = escape(ae); - } - rest = rest.split(ae).join(esc); + getParsingFlags(m3).overflow = overflow; + } + return m3; + } + var extendedIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/, basicIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/, tzRegex = /Z|[+-]\d\d(?::?\d\d)?/, isoDates = [ + ["YYYYYY-MM-DD", /[+-]\d{6}-\d\d-\d\d/], + ["YYYY-MM-DD", /\d{4}-\d\d-\d\d/], + ["GGGG-[W]WW-E", /\d{4}-W\d\d-\d/], + ["GGGG-[W]WW", /\d{4}-W\d\d/, false], + ["YYYY-DDD", /\d{4}-\d{3}/], + ["YYYY-MM", /\d{4}-\d\d/, false], + ["YYYYYYMMDD", /[+-]\d{10}/], + ["YYYYMMDD", /\d{8}/], + ["GGGG[W]WWE", /\d{4}W\d{3}/], + ["GGGG[W]WW", /\d{4}W\d{2}/, false], + ["YYYYDDD", /\d{7}/], + ["YYYYMM", /\d{6}/, false], + ["YYYY", /\d{4}/, false] + ], isoTimes = [ + ["HH:mm:ss.SSSS", /\d\d:\d\d:\d\d\.\d+/], + ["HH:mm:ss,SSSS", /\d\d:\d\d:\d\d,\d+/], + ["HH:mm:ss", /\d\d:\d\d:\d\d/], + ["HH:mm", /\d\d:\d\d/], + ["HHmmss.SSSS", /\d\d\d\d\d\d\.\d+/], + ["HHmmss,SSSS", /\d\d\d\d\d\d,\d+/], + ["HHmmss", /\d\d\d\d\d\d/], + ["HHmm", /\d\d\d\d/], + ["HH", /\d\d/] + ], aspNetJsonRegex = /^\/?Date\((-?\d+)/i, rfc28222 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/, obsOffsets2 = { + UT: 0, + GMT: 0, + EDT: -4 * 60, + EST: -5 * 60, + CDT: -5 * 60, + CST: -6 * 60, + MDT: -6 * 60, + MST: -7 * 60, + PDT: -7 * 60, + PST: -8 * 60 + }; + function configFromISO(config2) { + var i3, l4, string = config2._i, match5 = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string), allowTime, dateFormat, timeFormat, tzFormat, isoDatesLen = isoDates.length, isoTimesLen = isoTimes.length; + if (match5) { + getParsingFlags(config2).iso = true; + for (i3 = 0, l4 = isoDatesLen; i3 < l4; i3++) { + if (isoDates[i3][1].exec(match5[1])) { + dateFormat = isoDates[i3][0]; + allowTime = isoDates[i3][2] !== false; + break; } } - var hash = rest.indexOf("#"); - if (hash !== -1) { - this.hash = rest.substr(hash); - rest = rest.slice(0, hash); + if (dateFormat == null) { + config2._isValid = false; + return; } - var qm = rest.indexOf("?"); - if (qm !== -1) { - this.search = rest.substr(qm); - this.query = rest.substr(qm + 1); - if (parseQueryString) { - this.query = querystring.parse(this.query); + if (match5[3]) { + for (i3 = 0, l4 = isoTimesLen; i3 < l4; i3++) { + if (isoTimes[i3][1].exec(match5[3])) { + timeFormat = (match5[2] || " ") + isoTimes[i3][0]; + break; + } } - rest = rest.slice(0, qm); - } else if (parseQueryString) { - this.search = ""; - this.query = {}; - } - if (rest) - this.pathname = rest; - if (slashedProtocol[lowerProto] && this.hostname && !this.pathname) { - this.pathname = "/"; - } - if (this.pathname || this.search) { - var p3 = this.pathname || ""; - var s4 = this.search || ""; - this.path = p3 + s4; - } - this.href = this.format(); - return this; - }; - function urlFormat(obj) { - if (isString2(obj)) - obj = urlParse(obj); - if (!(obj instanceof Url)) - return Url.prototype.format.call(obj); - return obj.format(); - } - Url.prototype.format = function() { - var auth = this.auth || ""; - if (auth) { - auth = encodeURIComponent(auth); - auth = auth.replace(/%3A/i, ":"); - auth += "@"; - } - var protocol = this.protocol || "", pathname = this.pathname || "", hash = this.hash || "", host = false, query = ""; - if (this.host) { - host = auth + this.host; - } else if (this.hostname) { - host = auth + (this.hostname.indexOf(":") === -1 ? this.hostname : "[" + this.hostname + "]"); - if (this.port) { - host += ":" + this.port; + if (timeFormat == null) { + config2._isValid = false; + return; } } - if (this.query && isObject(this.query) && Object.keys(this.query).length) { - query = querystring.stringify(this.query); + if (!allowTime && timeFormat != null) { + config2._isValid = false; + return; } - var search = this.search || query && "?" + query || ""; - if (protocol && protocol.substr(-1) !== ":") - protocol += ":"; - if (this.slashes || (!protocol || slashedProtocol[protocol]) && host !== false) { - host = "//" + (host || ""); - if (pathname && pathname.charAt(0) !== "/") - pathname = "/" + pathname; - } else if (!host) { - host = ""; + if (match5[4]) { + if (tzRegex.exec(match5[4])) { + tzFormat = "Z"; + } else { + config2._isValid = false; + return; + } } - if (hash && hash.charAt(0) !== "#") - hash = "#" + hash; - if (search && search.charAt(0) !== "?") - search = "?" + search; - pathname = pathname.replace(/[?#]/g, function(match2) { - return encodeURIComponent(match2); - }); - search = search.replace("#", "%23"); - return protocol + host + pathname + search + hash; - }; - function urlResolve(source, relative) { - return urlParse(source, false, true).resolve(relative); + config2._f = dateFormat + (timeFormat || "") + (tzFormat || ""); + configFromStringAndFormat(config2); + } else { + config2._isValid = false; } - Url.prototype.resolve = function(relative) { - return this.resolveObject(urlParse(relative, false, true)).format(); - }; - function urlResolveObject(source, relative) { - if (!source) - return relative; - return urlParse(source, false, true).resolveObject(relative); + } + function extractFromRFC2822Strings(yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) { + var result = [ + untruncateYear2(yearStr), + defaultLocaleMonthsShort.indexOf(monthStr), + parseInt(dayStr, 10), + parseInt(hourStr, 10), + parseInt(minuteStr, 10) + ]; + if (secondStr) { + result.push(parseInt(secondStr, 10)); } - Url.prototype.resolveObject = function(relative) { - if (isString2(relative)) { - var rel = new Url(); - rel.parse(relative, false, true); - relative = rel; + return result; + } + function untruncateYear2(yearStr) { + var year = parseInt(yearStr, 10); + if (year <= 49) { + return 2e3 + year; + } else if (year <= 999) { + return 1900 + year; + } + return year; + } + function preprocessRFC28222(s4) { + return s4.replace(/\([^()]*\)|[\n\t]/g, " ").replace(/(\s\s+)/g, " ").replace(/^\s\s*/, "").replace(/\s\s*$/, ""); + } + function checkWeekday(weekdayStr, parsedInput, config2) { + if (weekdayStr) { + var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr), weekdayActual = new Date(parsedInput[0], parsedInput[1], parsedInput[2]).getDay(); + if (weekdayProvided !== weekdayActual) { + getParsingFlags(config2).weekdayMismatch = true; + config2._isValid = false; + return false; } - var result = new Url(); - Object.keys(this).forEach(function(k3) { - result[k3] = this[k3]; - }, this); - result.hash = relative.hash; - if (relative.href === "") { - result.href = result.format(); - return result; + } + return true; + } + function calculateOffset(obsOffset, militaryOffset, numOffset) { + if (obsOffset) { + return obsOffsets2[obsOffset]; + } else if (militaryOffset) { + return 0; + } else { + var hm = parseInt(numOffset, 10), m3 = hm % 100, h3 = (hm - m3) / 100; + return h3 * 60 + m3; + } + } + function configFromRFC2822(config2) { + var match5 = rfc28222.exec(preprocessRFC28222(config2._i)), parsedArray; + if (match5) { + parsedArray = extractFromRFC2822Strings(match5[4], match5[3], match5[2], match5[5], match5[6], match5[7]); + if (!checkWeekday(match5[1], parsedArray, config2)) { + return; } - if (relative.slashes && !relative.protocol) { - Object.keys(relative).forEach(function(k3) { - if (k3 !== "protocol") - result[k3] = relative[k3]; - }); - if (slashedProtocol[result.protocol] && result.hostname && !result.pathname) { - result.path = result.pathname = "/"; - } - result.href = result.format(); - return result; + config2._a = parsedArray; + config2._tzm = calculateOffset(match5[8], match5[9], match5[10]); + config2._d = createUTCDate.apply(null, config2._a); + config2._d.setUTCMinutes(config2._d.getUTCMinutes() - config2._tzm); + getParsingFlags(config2).rfc2822 = true; + } else { + config2._isValid = false; + } + } + function configFromString(config2) { + var matched = aspNetJsonRegex.exec(config2._i); + if (matched !== null) { + config2._d = new Date(+matched[1]); + return; + } + configFromISO(config2); + if (config2._isValid === false) { + delete config2._isValid; + } else { + return; + } + configFromRFC2822(config2); + if (config2._isValid === false) { + delete config2._isValid; + } else { + return; + } + if (config2._strict) { + config2._isValid = false; + } else { + hooks.createFromInputFallback(config2); + } + } + hooks.createFromInputFallback = deprecate("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.", function(config2) { + config2._d = new Date(config2._i + (config2._useUTC ? " UTC" : "")); + }); + function defaults(a3, b3, c3) { + if (a3 != null) { + return a3; + } + if (b3 != null) { + return b3; + } + return c3; + } + function currentDateArray(config2) { + var nowValue = new Date(hooks.now()); + if (config2._useUTC) { + return [ + nowValue.getUTCFullYear(), + nowValue.getUTCMonth(), + nowValue.getUTCDate() + ]; + } + return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()]; + } + function configFromArray(config2) { + var i3, date, input = [], currentDate, expectedWeekday, yearToUse; + if (config2._d) { + return; + } + currentDate = currentDateArray(config2); + if (config2._w && config2._a[DATE] == null && config2._a[MONTH] == null) { + dayOfYearFromWeekInfo(config2); + } + if (config2._dayOfYear != null) { + yearToUse = defaults(config2._a[YEAR], currentDate[YEAR]); + if (config2._dayOfYear > daysInYear2(yearToUse) || config2._dayOfYear === 0) { + getParsingFlags(config2)._overflowDayOfYear = true; } - if (relative.protocol && relative.protocol !== result.protocol) { - if (!slashedProtocol[relative.protocol]) { - Object.keys(relative).forEach(function(k3) { - result[k3] = relative[k3]; - }); - result.href = result.format(); - return result; - } - result.protocol = relative.protocol; - if (!relative.host && !hostlessProtocol[relative.protocol]) { - var relPath = (relative.pathname || "").split("/"); - while (relPath.length && !(relative.host = relPath.shift())) - ; - if (!relative.host) - relative.host = ""; - if (!relative.hostname) - relative.hostname = ""; - if (relPath[0] !== "") - relPath.unshift(""); - if (relPath.length < 2) - relPath.unshift(""); - result.pathname = relPath.join("/"); - } else { - result.pathname = relative.pathname; - } - result.search = relative.search; - result.query = relative.query; - result.host = relative.host || ""; - result.auth = relative.auth; - result.hostname = relative.hostname || relative.host; - result.port = relative.port; - if (result.pathname || result.search) { - var p3 = result.pathname || ""; - var s4 = result.search || ""; - result.path = p3 + s4; - } - result.slashes = result.slashes || relative.slashes; - result.href = result.format(); - return result; + date = createUTCDate(yearToUse, 0, config2._dayOfYear); + config2._a[MONTH] = date.getUTCMonth(); + config2._a[DATE] = date.getUTCDate(); + } + for (i3 = 0; i3 < 3 && config2._a[i3] == null; ++i3) { + config2._a[i3] = input[i3] = currentDate[i3]; + } + for (; i3 < 7; i3++) { + config2._a[i3] = input[i3] = config2._a[i3] == null ? i3 === 2 ? 1 : 0 : config2._a[i3]; + } + if (config2._a[HOUR] === 24 && config2._a[MINUTE2] === 0 && config2._a[SECOND2] === 0 && config2._a[MILLISECOND] === 0) { + config2._nextDay = true; + config2._a[HOUR] = 0; + } + config2._d = (config2._useUTC ? createUTCDate : createDate).apply(null, input); + expectedWeekday = config2._useUTC ? config2._d.getUTCDay() : config2._d.getDay(); + if (config2._tzm != null) { + config2._d.setUTCMinutes(config2._d.getUTCMinutes() - config2._tzm); + } + if (config2._nextDay) { + config2._a[HOUR] = 24; + } + if (config2._w && typeof config2._w.d !== "undefined" && config2._w.d !== expectedWeekday) { + getParsingFlags(config2).weekdayMismatch = true; + } + } + function dayOfYearFromWeekInfo(config2) { + var w4, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek; + w4 = config2._w; + if (w4.GG != null || w4.W != null || w4.E != null) { + dow = 1; + doy = 4; + weekYear = defaults(w4.GG, config2._a[YEAR], weekOfYear2(createLocal(), 1, 4).year); + week = defaults(w4.W, 1); + weekday = defaults(w4.E, 1); + if (weekday < 1 || weekday > 7) { + weekdayOverflow = true; } - var isSourceAbs = result.pathname && result.pathname.charAt(0) === "/", isRelAbs = relative.host || relative.pathname && relative.pathname.charAt(0) === "/", mustEndAbs = isRelAbs || isSourceAbs || result.host && relative.pathname, removeAllDots = mustEndAbs, srcPath = result.pathname && result.pathname.split("/") || [], relPath = relative.pathname && relative.pathname.split("/") || [], psychotic = result.protocol && !slashedProtocol[result.protocol]; - if (psychotic) { - result.hostname = ""; - result.port = null; - if (result.host) { - if (srcPath[0] === "") - srcPath[0] = result.host; - else - srcPath.unshift(result.host); + } else { + dow = config2._locale._week.dow; + doy = config2._locale._week.doy; + curWeek = weekOfYear2(createLocal(), dow, doy); + weekYear = defaults(w4.gg, config2._a[YEAR], curWeek.year); + week = defaults(w4.w, curWeek.week); + if (w4.d != null) { + weekday = w4.d; + if (weekday < 0 || weekday > 6) { + weekdayOverflow = true; } - result.host = ""; - if (relative.protocol) { - relative.hostname = null; - relative.port = null; - if (relative.host) { - if (relPath[0] === "") - relPath[0] = relative.host; - else - relPath.unshift(relative.host); - } - relative.host = null; + } else if (w4.e != null) { + weekday = w4.e + dow; + if (w4.e < 0 || w4.e > 6) { + weekdayOverflow = true; } - mustEndAbs = mustEndAbs && (relPath[0] === "" || srcPath[0] === ""); + } else { + weekday = dow; } - if (isRelAbs) { - result.host = relative.host || relative.host === "" ? relative.host : result.host; - result.hostname = relative.hostname || relative.hostname === "" ? relative.hostname : result.hostname; - result.search = relative.search; - result.query = relative.query; - srcPath = relPath; - } else if (relPath.length) { - if (!srcPath) - srcPath = []; - srcPath.pop(); - srcPath = srcPath.concat(relPath); - result.search = relative.search; - result.query = relative.query; - } else if (!isNullOrUndefined(relative.search)) { - if (psychotic) { - result.hostname = result.host = srcPath.shift(); - var authInHost = result.host && result.host.indexOf("@") > 0 ? result.host.split("@") : false; - if (authInHost) { - result.auth = authInHost.shift(); - result.host = result.hostname = authInHost.shift(); - } - } - result.search = relative.search; - result.query = relative.query; - if (!isNull(result.pathname) || !isNull(result.search)) { - result.path = (result.pathname ? result.pathname : "") + (result.search ? result.search : ""); + } + if (week < 1 || week > weeksInYear(weekYear, dow, doy)) { + getParsingFlags(config2)._overflowWeeks = true; + } else if (weekdayOverflow != null) { + getParsingFlags(config2)._overflowWeekday = true; + } else { + temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy); + config2._a[YEAR] = temp.year; + config2._dayOfYear = temp.dayOfYear; + } + } + hooks.ISO_8601 = function() { + }; + hooks.RFC_2822 = function() { + }; + function configFromStringAndFormat(config2) { + if (config2._f === hooks.ISO_8601) { + configFromISO(config2); + return; + } + if (config2._f === hooks.RFC_2822) { + configFromRFC2822(config2); + return; + } + config2._a = []; + getParsingFlags(config2).empty = true; + var string = "" + config2._i, i3, parsedInput, tokens2, token2, skipped, stringLength = string.length, totalParsedInputLength = 0, era, tokenLen; + tokens2 = expandFormat(config2._f, config2._locale).match(formattingTokens) || []; + tokenLen = tokens2.length; + for (i3 = 0; i3 < tokenLen; i3++) { + token2 = tokens2[i3]; + parsedInput = (string.match(getParseRegexForToken(token2, config2)) || [])[0]; + if (parsedInput) { + skipped = string.substr(0, string.indexOf(parsedInput)); + if (skipped.length > 0) { + getParsingFlags(config2).unusedInput.push(skipped); } - result.href = result.format(); - return result; + string = string.slice(string.indexOf(parsedInput) + parsedInput.length); + totalParsedInputLength += parsedInput.length; } - if (!srcPath.length) { - result.pathname = null; - if (result.search) { - result.path = "/" + result.search; + if (formatTokenFunctions[token2]) { + if (parsedInput) { + getParsingFlags(config2).empty = false; } else { - result.path = null; - } - result.href = result.format(); - return result; - } - var last = srcPath.slice(-1)[0]; - var hasTrailingSlash = (result.host || relative.host) && (last === "." || last === "..") || last === ""; - var up = 0; - for (var i3 = srcPath.length; i3 >= 0; i3--) { - last = srcPath[i3]; - if (last == ".") { - srcPath.splice(i3, 1); - } else if (last === "..") { - srcPath.splice(i3, 1); - up++; - } else if (up) { - srcPath.splice(i3, 1); - up--; - } - } - if (!mustEndAbs && !removeAllDots) { - for (; up--; up) { - srcPath.unshift(".."); + getParsingFlags(config2).unusedTokens.push(token2); } + addTimeToArrayFromToken(token2, parsedInput, config2); + } else if (config2._strict && !parsedInput) { + getParsingFlags(config2).unusedTokens.push(token2); } - if (mustEndAbs && srcPath[0] !== "" && (!srcPath[0] || srcPath[0].charAt(0) !== "/")) { - srcPath.unshift(""); + } + getParsingFlags(config2).charsLeftOver = stringLength - totalParsedInputLength; + if (string.length > 0) { + getParsingFlags(config2).unusedInput.push(string); + } + if (config2._a[HOUR] <= 12 && getParsingFlags(config2).bigHour === true && config2._a[HOUR] > 0) { + getParsingFlags(config2).bigHour = void 0; + } + getParsingFlags(config2).parsedDateParts = config2._a.slice(0); + getParsingFlags(config2).meridiem = config2._meridiem; + config2._a[HOUR] = meridiemFixWrap(config2._locale, config2._a[HOUR], config2._meridiem); + era = getParsingFlags(config2).era; + if (era !== null) { + config2._a[YEAR] = config2._locale.erasConvertYear(era, config2._a[YEAR]); + } + configFromArray(config2); + checkOverflow(config2); + } + function meridiemFixWrap(locale2, hour, meridiem2) { + var isPm; + if (meridiem2 == null) { + return hour; + } + if (locale2.meridiemHour != null) { + return locale2.meridiemHour(hour, meridiem2); + } else if (locale2.isPM != null) { + isPm = locale2.isPM(meridiem2); + if (isPm && hour < 12) { + hour += 12; } - if (hasTrailingSlash && srcPath.join("/").substr(-1) !== "/") { - srcPath.push(""); + if (!isPm && hour === 12) { + hour = 0; } - var isAbsolute = srcPath[0] === "" || srcPath[0] && srcPath[0].charAt(0) === "/"; - if (psychotic) { - result.hostname = result.host = isAbsolute ? "" : srcPath.length ? srcPath.shift() : ""; - var authInHost = result.host && result.host.indexOf("@") > 0 ? result.host.split("@") : false; - if (authInHost) { - result.auth = authInHost.shift(); - result.host = result.hostname = authInHost.shift(); - } + return hour; + } else { + return hour; + } + } + function configFromStringAndArray(config2) { + var tempConfig, bestMoment, scoreToBeat, i3, currentScore, validFormatFound, bestFormatIsValid = false, configfLen = config2._f.length; + if (configfLen === 0) { + getParsingFlags(config2).invalidFormat = true; + config2._d = new Date(NaN); + return; + } + for (i3 = 0; i3 < configfLen; i3++) { + currentScore = 0; + validFormatFound = false; + tempConfig = copyConfig({}, config2); + if (config2._useUTC != null) { + tempConfig._useUTC = config2._useUTC; } - mustEndAbs = mustEndAbs || result.host && srcPath.length; - if (mustEndAbs && !isAbsolute) { - srcPath.unshift(""); + tempConfig._f = config2._f[i3]; + configFromStringAndFormat(tempConfig); + if (isValid(tempConfig)) { + validFormatFound = true; } - if (!srcPath.length) { - result.pathname = null; - result.path = null; + currentScore += getParsingFlags(tempConfig).charsLeftOver; + currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10; + getParsingFlags(tempConfig).score = currentScore; + if (!bestFormatIsValid) { + if (scoreToBeat == null || currentScore < scoreToBeat || validFormatFound) { + scoreToBeat = currentScore; + bestMoment = tempConfig; + if (validFormatFound) { + bestFormatIsValid = true; + } + } } else { - result.pathname = srcPath.join("/"); - } - if (!isNull(result.pathname) || !isNull(result.search)) { - result.path = (result.pathname ? result.pathname : "") + (result.search ? result.search : ""); - } - result.auth = relative.auth || result.auth; - result.slashes = result.slashes || relative.slashes; - result.href = result.format(); - return result; - }; - Url.prototype.parseHost = function() { - var host = this.host; - var port = portPattern.exec(host); - if (port) { - port = port[0]; - if (port !== ":") { - this.port = port.substr(1); + if (currentScore < scoreToBeat) { + scoreToBeat = currentScore; + bestMoment = tempConfig; } - host = host.substr(0, host.length - port.length); } - if (host) - this.hostname = host; - }; - function isString2(arg) { - return typeof arg === "string"; } - function isObject(arg) { - return typeof arg === "object" && arg !== null; + extend(config2, bestMoment || tempConfig); + } + function configFromObject(config2) { + if (config2._d) { + return; } - function isNull(arg) { - return arg === null; + var i3 = normalizeObjectUnits(config2._i), dayOrDate = i3.day === void 0 ? i3.date : i3.day; + config2._a = map([i3.year, i3.month, dayOrDate, i3.hour, i3.minute, i3.second, i3.millisecond], function(obj) { + return obj && parseInt(obj, 10); + }); + configFromArray(config2); + } + function createFromConfig(config2) { + var res = new Moment(checkOverflow(prepareConfig(config2))); + if (res._nextDay) { + res.add(1, "d"); + res._nextDay = void 0; } - function isNullOrUndefined(arg) { - return arg == null; + return res; + } + function prepareConfig(config2) { + var input = config2._i, format2 = config2._f; + config2._locale = config2._locale || getLocale(config2._l); + if (input === null || format2 === void 0 && input === "") { + return createInvalid({ nullInput: true }); } - }, { "punycode": 25, "querystring": 28 }], 30: [function(require2, module4, exports3) { - function DOMParser(options) { - this.options = options || { locator: {} }; + if (typeof input === "string") { + config2._i = input = config2._locale.preparse(input); } - DOMParser.prototype.parseFromString = function(source, mimeType) { - var options = this.options; - var sax = new XMLReader(); - var domBuilder = options.domBuilder || new DOMHandler(); - var errorHandler = options.errorHandler; - var locator = options.locator; - var defaultNSMap = options.xmlns || {}; - var entityMap = { "lt": "<", "gt": ">", "amp": "&", "quot": '"', "apos": "'" }; - if (locator) { - domBuilder.setDocumentLocator(locator); - } - sax.errorHandler = buildErrorHandler(errorHandler, domBuilder, locator); - sax.domBuilder = options.domBuilder || domBuilder; - if (/\/x?html?$/.test(mimeType)) { - entityMap.nbsp = "\xA0"; - entityMap.copy = "\xA9"; - defaultNSMap[""] = "http://www.w3.org/1999/xhtml"; - } - defaultNSMap.xml = defaultNSMap.xml || "http://www.w3.org/XML/1998/namespace"; - if (source) { - sax.parse(source, defaultNSMap, entityMap); - } else { - sax.errorHandler.error("invalid doc source"); - } - return domBuilder.doc; - }; - function buildErrorHandler(errorImpl, domBuilder, locator) { - if (!errorImpl) { - if (domBuilder instanceof DOMHandler) { - return domBuilder; - } - errorImpl = domBuilder; - } - var errorHandler = {}; - var isCallback = errorImpl instanceof Function; - locator = locator || {}; - function build(key) { - var fn = errorImpl[key]; - if (!fn && isCallback) { - fn = errorImpl.length == 2 ? function(msg) { - errorImpl(key, msg); - } : errorImpl; - } - errorHandler[key] = fn && function(msg) { - fn("[xmldom " + key + "] " + msg + _locator(locator)); - } || function() { - }; - } - build("warning"); - build("error"); - build("fatalError"); - return errorHandler; + if (isMoment(input)) { + return new Moment(checkOverflow(input)); + } else if (isDate3(input)) { + config2._d = input; + } else if (isArray2(format2)) { + configFromStringAndArray(config2); + } else if (format2) { + configFromStringAndFormat(config2); + } else { + configFromInput(config2); } - function DOMHandler() { - this.cdata = false; + if (!isValid(config2)) { + config2._d = null; } - function position(locator, node) { - node.lineNumber = locator.lineNumber; - node.columnNumber = locator.columnNumber; + return config2; + } + function configFromInput(config2) { + var input = config2._i; + if (isUndefined2(input)) { + config2._d = new Date(hooks.now()); + } else if (isDate3(input)) { + config2._d = new Date(input.valueOf()); + } else if (typeof input === "string") { + configFromString(config2); + } else if (isArray2(input)) { + config2._a = map(input.slice(0), function(obj) { + return parseInt(obj, 10); + }); + configFromArray(config2); + } else if (isObject(input)) { + configFromObject(config2); + } else if (isNumber3(input)) { + config2._d = new Date(input); + } else { + hooks.createFromInputFallback(config2); } - DOMHandler.prototype = { - startDocument: function() { - this.doc = new DOMImplementation().createDocument(null, null, null); - if (this.locator) { - this.doc.documentURI = this.locator.systemId; - } - }, - startElement: function(namespaceURI, localName, qName, attrs) { - var doc = this.doc; - var el = doc.createElementNS(namespaceURI, qName || localName); - var len = attrs.length; - appendElement(this, el); - this.currentElement = el; - this.locator && position(this.locator, el); - for (var i3 = 0; i3 < len; i3++) { - var namespaceURI = attrs.getURI(i3); - var value = attrs.getValue(i3); - var qName = attrs.getQName(i3); - var attr = doc.createAttributeNS(namespaceURI, qName); - this.locator && position(attrs.getLocator(i3), attr); - attr.value = attr.nodeValue = value; - el.setAttributeNode(attr); - } - }, - endElement: function(namespaceURI, localName, qName) { - var current = this.currentElement; - var tagName = current.tagName; - this.currentElement = current.parentNode; - }, - startPrefixMapping: function(prefix, uri) { - }, - endPrefixMapping: function(prefix) { - }, - processingInstruction: function(target, data) { - var ins = this.doc.createProcessingInstruction(target, data); - this.locator && position(this.locator, ins); - appendElement(this, ins); - }, - ignorableWhitespace: function(ch, start, length) { - }, - characters: function(chars, start, length) { - chars = _toString.apply(this, arguments); - if (chars) { - if (this.cdata) { - var charNode = this.doc.createCDATASection(chars); - } else { - var charNode = this.doc.createTextNode(chars); - } - if (this.currentElement) { - this.currentElement.appendChild(charNode); - } else if (/^\s*$/.test(chars)) { - this.doc.appendChild(charNode); - } - this.locator && position(this.locator, charNode); - } - }, - skippedEntity: function(name) { - }, - endDocument: function() { - this.doc.normalize(); - }, - setDocumentLocator: function(locator) { - if (this.locator = locator) { - locator.lineNumber = 0; - } - }, - comment: function(chars, start, length) { - chars = _toString.apply(this, arguments); - var comm = this.doc.createComment(chars); - this.locator && position(this.locator, comm); - appendElement(this, comm); - }, - startCDATA: function() { - this.cdata = true; - }, - endCDATA: function() { - this.cdata = false; - }, - startDTD: function(name, publicId, systemId) { - var impl = this.doc.implementation; - if (impl && impl.createDocumentType) { - var dt = impl.createDocumentType(name, publicId, systemId); - this.locator && position(this.locator, dt); - appendElement(this, dt); - } - }, - warning: function(error) { - console.warn("[xmldom warning] " + error, _locator(this.locator)); - }, - error: function(error) { - console.error("[xmldom error] " + error, _locator(this.locator)); - }, - fatalError: function(error) { - console.error("[xmldom fatalError] " + error, _locator(this.locator)); - throw error; + } + function createLocalOrUTC(input, format2, locale2, strict, isUTC) { + var c3 = {}; + if (format2 === true || format2 === false) { + strict = format2; + format2 = void 0; + } + if (locale2 === true || locale2 === false) { + strict = locale2; + locale2 = void 0; + } + if (isObject(input) && isObjectEmpty(input) || isArray2(input) && input.length === 0) { + input = void 0; + } + c3._isAMomentObject = true; + c3._useUTC = c3._isUTC = isUTC; + c3._l = locale2; + c3._i = input; + c3._f = format2; + c3._strict = strict; + return createFromConfig(c3); + } + function createLocal(input, format2, locale2, strict) { + return createLocalOrUTC(input, format2, locale2, strict, false); + } + var prototypeMin = deprecate("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/", function() { + var other = createLocal.apply(null, arguments); + if (this.isValid() && other.isValid()) { + return other < this ? this : other; + } else { + return createInvalid(); + } + }), prototypeMax = deprecate("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/", function() { + var other = createLocal.apply(null, arguments); + if (this.isValid() && other.isValid()) { + return other > this ? this : other; + } else { + return createInvalid(); + } + }); + function pickBy(fn, moments) { + var res, i3; + if (moments.length === 1 && isArray2(moments[0])) { + moments = moments[0]; + } + if (!moments.length) { + return createLocal(); + } + res = moments[0]; + for (i3 = 1; i3 < moments.length; ++i3) { + if (!moments[i3].isValid() || moments[i3][fn](res)) { + res = moments[i3]; } - }; - function _locator(l4) { - if (l4) { - return "\n@" + (l4.systemId || "") + "#[line:" + l4.lineNumber + ",col:" + l4.columnNumber + "]"; + } + return res; + } + function min() { + var args = [].slice.call(arguments, 0); + return pickBy("isBefore", args); + } + function max() { + var args = [].slice.call(arguments, 0); + return pickBy("isAfter", args); + } + var now2 = function() { + return Date.now ? Date.now() : +new Date(); + }; + var ordering = [ + "year", + "quarter", + "month", + "week", + "day", + "hour", + "minute", + "second", + "millisecond" + ]; + function isDurationValid(m3) { + var key, unitHasDecimal = false, i3, orderLen = ordering.length; + for (key in m3) { + if (hasOwnProp(m3, key) && !(indexOf.call(ordering, key) !== -1 && (m3[key] == null || !isNaN(m3[key])))) { + return false; } } - function _toString(chars, start, length) { - if (typeof chars == "string") { - return chars.substr(start, length); - } else { - if (chars.length >= start + length || start) { - return new java.lang.String(chars, start, length) + ""; + for (i3 = 0; i3 < orderLen; ++i3) { + if (m3[ordering[i3]]) { + if (unitHasDecimal) { + return false; + } + if (parseFloat(m3[ordering[i3]]) !== toInt(m3[ordering[i3]])) { + unitHasDecimal = true; } - return chars; } } - "endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g, function(key) { - DOMHandler.prototype[key] = function() { - return null; - }; - }); - function appendElement(hander, node) { - if (!hander.currentElement) { - hander.doc.appendChild(node); - } else { - hander.currentElement.appendChild(node); - } + return true; + } + function isValid$1() { + return this._isValid; + } + function createInvalid$1() { + return createDuration2(NaN); + } + function Duration2(duration) { + var normalizedInput = normalizeObjectUnits(duration), years2 = normalizedInput.year || 0, quarters = normalizedInput.quarter || 0, months3 = normalizedInput.month || 0, weeks2 = normalizedInput.week || normalizedInput.isoWeek || 0, days2 = normalizedInput.day || 0, hours2 = normalizedInput.hour || 0, minutes2 = normalizedInput.minute || 0, seconds2 = normalizedInput.second || 0, milliseconds2 = normalizedInput.millisecond || 0; + this._isValid = isDurationValid(normalizedInput); + this._milliseconds = +milliseconds2 + seconds2 * 1e3 + minutes2 * 6e4 + hours2 * 1e3 * 60 * 60; + this._days = +days2 + weeks2 * 7; + this._months = +months3 + quarters * 3 + years2 * 12; + this._data = {}; + this._locale = getLocale(); + this._bubble(); + } + function isDuration(obj) { + return obj instanceof Duration2; + } + function absRound(number) { + if (number < 0) { + return Math.round(-1 * number) * -1; + } else { + return Math.round(number); } - var XMLReader = require2("./sax").XMLReader; - var DOMImplementation = exports3.DOMImplementation = require2("./dom").DOMImplementation; - exports3.XMLSerializer = require2("./dom").XMLSerializer; - exports3.DOMParser = DOMParser; - }, { "./dom": 31, "./sax": 32 }], 31: [function(require2, module4, exports3) { - function copy(src, dest) { - for (var p3 in src) { - dest[p3] = src[p3]; + } + function compareArrays(array1, array2, dontConvert) { + var len = Math.min(array1.length, array2.length), lengthDiff = Math.abs(array1.length - array2.length), diffs = 0, i3; + for (i3 = 0; i3 < len; i3++) { + if (dontConvert && array1[i3] !== array2[i3] || !dontConvert && toInt(array1[i3]) !== toInt(array2[i3])) { + diffs++; } } - function _extends(Class, Super) { - var pt = Class.prototype; - if (Object.create) { - var ppt = Object.create(Super.prototype); - pt.__proto__ = ppt; - } - if (!(pt instanceof Super)) { - let t4 = function() { - }; - var t3 = t4; - ; - t4.prototype = Super.prototype; - t4 = new t4(); - copy(pt, t4); - Class.prototype = pt = t4; - } - if (pt.constructor != Class) { - if (typeof Class != "function") { - console.error("unknow Class:" + Class); - } - pt.constructor = Class; + return diffs + lengthDiff; + } + function offset2(token2, separator) { + addFormatToken(token2, 0, 0, function() { + var offset3 = this.utcOffset(), sign2 = "+"; + if (offset3 < 0) { + offset3 = -offset3; + sign2 = "-"; } + return sign2 + zeroFill(~~(offset3 / 60), 2) + separator + zeroFill(~~offset3 % 60, 2); + }); + } + offset2("Z", ":"); + offset2("ZZ", ""); + addRegexToken("Z", matchShortOffset); + addRegexToken("ZZ", matchShortOffset); + addParseToken(["Z", "ZZ"], function(input, array, config2) { + config2._useUTC = true; + config2._tzm = offsetFromString(matchShortOffset, input); + }); + var chunkOffset = /([\+\-]|\d\d)/gi; + function offsetFromString(matcher, string) { + var matches = (string || "").match(matcher), chunk, parts, minutes2; + if (matches === null) { + return null; } - var htmlns = "http://www.w3.org/1999/xhtml"; - var NodeType = {}; - var ELEMENT_NODE = NodeType.ELEMENT_NODE = 1; - var ATTRIBUTE_NODE = NodeType.ATTRIBUTE_NODE = 2; - var TEXT_NODE = NodeType.TEXT_NODE = 3; - var CDATA_SECTION_NODE = NodeType.CDATA_SECTION_NODE = 4; - var ENTITY_REFERENCE_NODE = NodeType.ENTITY_REFERENCE_NODE = 5; - var ENTITY_NODE = NodeType.ENTITY_NODE = 6; - var PROCESSING_INSTRUCTION_NODE = NodeType.PROCESSING_INSTRUCTION_NODE = 7; - var COMMENT_NODE = NodeType.COMMENT_NODE = 8; - var DOCUMENT_NODE = NodeType.DOCUMENT_NODE = 9; - var DOCUMENT_TYPE_NODE = NodeType.DOCUMENT_TYPE_NODE = 10; - var DOCUMENT_FRAGMENT_NODE = NodeType.DOCUMENT_FRAGMENT_NODE = 11; - var NOTATION_NODE = NodeType.NOTATION_NODE = 12; - var ExceptionCode = {}; - var ExceptionMessage = {}; - var INDEX_SIZE_ERR = ExceptionCode.INDEX_SIZE_ERR = (ExceptionMessage[1] = "Index size error", 1); - var DOMSTRING_SIZE_ERR = ExceptionCode.DOMSTRING_SIZE_ERR = (ExceptionMessage[2] = "DOMString size error", 2); - var HIERARCHY_REQUEST_ERR = ExceptionCode.HIERARCHY_REQUEST_ERR = (ExceptionMessage[3] = "Hierarchy request error", 3); - var WRONG_DOCUMENT_ERR = ExceptionCode.WRONG_DOCUMENT_ERR = (ExceptionMessage[4] = "Wrong document", 4); - var INVALID_CHARACTER_ERR = ExceptionCode.INVALID_CHARACTER_ERR = (ExceptionMessage[5] = "Invalid character", 5); - var NO_DATA_ALLOWED_ERR = ExceptionCode.NO_DATA_ALLOWED_ERR = (ExceptionMessage[6] = "No data allowed", 6); - var NO_MODIFICATION_ALLOWED_ERR = ExceptionCode.NO_MODIFICATION_ALLOWED_ERR = (ExceptionMessage[7] = "No modification allowed", 7); - var NOT_FOUND_ERR = ExceptionCode.NOT_FOUND_ERR = (ExceptionMessage[8] = "Not found", 8); - var NOT_SUPPORTED_ERR = ExceptionCode.NOT_SUPPORTED_ERR = (ExceptionMessage[9] = "Not supported", 9); - var INUSE_ATTRIBUTE_ERR = ExceptionCode.INUSE_ATTRIBUTE_ERR = (ExceptionMessage[10] = "Attribute in use", 10); - var INVALID_STATE_ERR = ExceptionCode.INVALID_STATE_ERR = (ExceptionMessage[11] = "Invalid state", 11); - var SYNTAX_ERR = ExceptionCode.SYNTAX_ERR = (ExceptionMessage[12] = "Syntax error", 12); - var INVALID_MODIFICATION_ERR = ExceptionCode.INVALID_MODIFICATION_ERR = (ExceptionMessage[13] = "Invalid modification", 13); - var NAMESPACE_ERR = ExceptionCode.NAMESPACE_ERR = (ExceptionMessage[14] = "Invalid namespace", 14); - var INVALID_ACCESS_ERR = ExceptionCode.INVALID_ACCESS_ERR = (ExceptionMessage[15] = "Invalid access", 15); - function DOMException(code, message) { - if (message instanceof Error) { - var error = message; - } else { - error = this; - Error.call(this, ExceptionMessage[code]); - this.message = ExceptionMessage[code]; - if (Error.captureStackTrace) - Error.captureStackTrace(this, DOMException); - } - error.code = code; - if (message) - this.message = this.message + ": " + message; - return error; + chunk = matches[matches.length - 1] || []; + parts = (chunk + "").match(chunkOffset) || ["-", 0, 0]; + minutes2 = +(parts[1] * 60) + toInt(parts[2]); + return minutes2 === 0 ? 0 : parts[0] === "+" ? minutes2 : -minutes2; + } + function cloneWithOffset(input, model) { + var res, diff2; + if (model._isUTC) { + res = model.clone(); + diff2 = (isMoment(input) || isDate3(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf(); + res._d.setTime(res._d.valueOf() + diff2); + hooks.updateOffset(res, false); + return res; + } else { + return createLocal(input).local(); } - ; - DOMException.prototype = Error.prototype; - copy(ExceptionCode, DOMException); - function NodeList() { + } + function getDateOffset(m3) { + return -Math.round(m3._d.getTimezoneOffset()); + } + hooks.updateOffset = function() { + }; + function getSetOffset(input, keepLocalTime, keepMinutes) { + var offset3 = this._offset || 0, localAdjust; + if (!this.isValid()) { + return input != null ? this : NaN; } - ; - NodeList.prototype = { - length: 0, - item: function(index) { - return this[index] || null; - }, - toString: function(isHTML, nodeFilter) { - for (var buf = [], i3 = 0; i3 < this.length; i3++) { - serializeToString(this[i3], buf, isHTML, nodeFilter); + if (input != null) { + if (typeof input === "string") { + input = offsetFromString(matchShortOffset, input); + if (input === null) { + return this; } - return buf.join(""); + } else if (Math.abs(input) < 16 && !keepMinutes) { + input = input * 60; } - }; - function LiveNodeList(node, refresh) { - this._node = node; - this._refresh = refresh; - _updateLiveList(this); - } - function _updateLiveList(list) { - var inc = list._node._inc || list._node.ownerDocument._inc; - if (list._inc != inc) { - var ls = list._refresh(list._node); - __set__(list, "length", ls.length); - copy(ls, list); - list._inc = inc; + if (!this._isUTC && keepLocalTime) { + localAdjust = getDateOffset(this); } - } - LiveNodeList.prototype.item = function(i3) { - _updateLiveList(this); - return this[i3]; - }; - _extends(LiveNodeList, NodeList); - function NamedNodeMap() { - } - ; - function _findNodeIndex(list, node) { - var i3 = list.length; - while (i3--) { - if (list[i3] === node) { - return i3; + this._offset = input; + this._isUTC = true; + if (localAdjust != null) { + this.add(localAdjust, "m"); + } + if (offset3 !== input) { + if (!keepLocalTime || this._changeInProgress) { + addSubtract(this, createDuration2(input - offset3, "m"), 1, false); + } else if (!this._changeInProgress) { + this._changeInProgress = true; + hooks.updateOffset(this, true); + this._changeInProgress = null; } } + return this; + } else { + return this._isUTC ? offset3 : getDateOffset(this); } - function _addNamedNode(el, list, newAttr, oldAttr) { - if (oldAttr) { - list[_findNodeIndex(list, oldAttr)] = newAttr; - } else { - list[list.length++] = newAttr; + } + function getSetZone(input, keepLocalTime) { + if (input != null) { + if (typeof input !== "string") { + input = -input; } - if (el) { - newAttr.ownerElement = el; - var doc = el.ownerDocument; - if (doc) { - oldAttr && _onRemoveAttribute(doc, el, oldAttr); - _onAddAttribute(doc, el, newAttr); - } + this.utcOffset(input, keepLocalTime); + return this; + } else { + return -this.utcOffset(); + } + } + function setOffsetToUTC(keepLocalTime) { + return this.utcOffset(0, keepLocalTime); + } + function setOffsetToLocal(keepLocalTime) { + if (this._isUTC) { + this.utcOffset(0, keepLocalTime); + this._isUTC = false; + if (keepLocalTime) { + this.subtract(getDateOffset(this), "m"); } } - function _removeNamedNode(el, list, attr) { - var i3 = _findNodeIndex(list, attr); - if (i3 >= 0) { - var lastIndex = list.length - 1; - while (i3 < lastIndex) { - list[i3] = list[++i3]; - } - list.length = lastIndex; - if (el) { - var doc = el.ownerDocument; - if (doc) { - _onRemoveAttribute(doc, el, attr); - attr.ownerElement = null; - } - } + return this; + } + function setOffsetToParsedOffset() { + if (this._tzm != null) { + this.utcOffset(this._tzm, false, true); + } else if (typeof this._i === "string") { + var tZone = offsetFromString(matchOffset, this._i); + if (tZone != null) { + this.utcOffset(tZone); } else { - throw DOMException(NOT_FOUND_ERR, new Error(el.tagName + "@" + attr)); + this.utcOffset(0, true); } } - NamedNodeMap.prototype = { - length: 0, - item: NodeList.prototype.item, - getNamedItem: function(key) { - var i3 = this.length; - while (i3--) { - var attr = this[i3]; - if (attr.nodeName == key) { - return attr; - } - } - }, - setNamedItem: function(attr) { - var el = attr.ownerElement; - if (el && el != this._ownerElement) { - throw new DOMException(INUSE_ATTRIBUTE_ERR); - } - var oldAttr = this.getNamedItem(attr.nodeName); - _addNamedNode(this._ownerElement, this, attr, oldAttr); - return oldAttr; - }, - setNamedItemNS: function(attr) { - var el = attr.ownerElement, oldAttr; - if (el && el != this._ownerElement) { - throw new DOMException(INUSE_ATTRIBUTE_ERR); - } - oldAttr = this.getNamedItemNS(attr.namespaceURI, attr.localName); - _addNamedNode(this._ownerElement, this, attr, oldAttr); - return oldAttr; - }, - removeNamedItem: function(key) { - var attr = this.getNamedItem(key); - _removeNamedNode(this._ownerElement, this, attr); - return attr; - }, - removeNamedItemNS: function(namespaceURI, localName) { - var attr = this.getNamedItemNS(namespaceURI, localName); - _removeNamedNode(this._ownerElement, this, attr); - return attr; - }, - getNamedItemNS: function(namespaceURI, localName) { - var i3 = this.length; - while (i3--) { - var node = this[i3]; - if (node.localName == localName && node.namespaceURI == namespaceURI) { - return node; - } - } - return null; - } - }; - function DOMImplementation(features) { - this._features = {}; - if (features) { - for (var feature in features) { - this._features = features[feature]; - } - } + return this; + } + function hasAlignedHourOffset(input) { + if (!this.isValid()) { + return false; } - ; - DOMImplementation.prototype = { - hasFeature: function(feature, version) { - var versions = this._features[feature.toLowerCase()]; - if (versions && (!version || version in versions)) { - return true; - } else { - return false; - } - }, - createDocument: function(namespaceURI, qualifiedName, doctype) { - var doc = new Document(); - doc.implementation = this; - doc.childNodes = new NodeList(); - doc.doctype = doctype; - if (doctype) { - doc.appendChild(doctype); - } - if (qualifiedName) { - var root = doc.createElementNS(namespaceURI, qualifiedName); - doc.appendChild(root); - } - return doc; - }, - createDocumentType: function(qualifiedName, publicId, systemId) { - var node = new DocumentType(); - node.name = qualifiedName; - node.nodeName = qualifiedName; - node.publicId = publicId; - node.systemId = systemId; - return node; + input = input ? createLocal(input).utcOffset() : 0; + return (this.utcOffset() - input) % 60 === 0; + } + function isDaylightSavingTime() { + return this.utcOffset() > this.clone().month(0).utcOffset() || this.utcOffset() > this.clone().month(5).utcOffset(); + } + function isDaylightSavingTimeShifted() { + if (!isUndefined2(this._isDSTShifted)) { + return this._isDSTShifted; + } + var c3 = {}, other; + copyConfig(c3, this); + c3 = prepareConfig(c3); + if (c3._a) { + other = c3._isUTC ? createUTC(c3._a) : createLocal(c3._a); + this._isDSTShifted = this.isValid() && compareArrays(c3._a, other.toArray()) > 0; + } else { + this._isDSTShifted = false; + } + return this._isDSTShifted; + } + function isLocal() { + return this.isValid() ? !this._isUTC : false; + } + function isUtcOffset() { + return this.isValid() ? this._isUTC : false; + } + function isUtc() { + return this.isValid() ? this._isUTC && this._offset === 0 : false; + } + var aspNetRegex = /^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/, isoRegex = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/; + function createDuration2(input, key) { + var duration = input, match5 = null, sign2, ret, diffRes; + if (isDuration(input)) { + duration = { + ms: input._milliseconds, + d: input._days, + M: input._months + }; + } else if (isNumber3(input) || !isNaN(+input)) { + duration = {}; + if (key) { + duration[key] = +input; + } else { + duration.milliseconds = +input; } - }; - function Node() { + } else if (match5 = aspNetRegex.exec(input)) { + sign2 = match5[1] === "-" ? -1 : 1; + duration = { + y: 0, + d: toInt(match5[DATE]) * sign2, + h: toInt(match5[HOUR]) * sign2, + m: toInt(match5[MINUTE2]) * sign2, + s: toInt(match5[SECOND2]) * sign2, + ms: toInt(absRound(match5[MILLISECOND] * 1e3)) * sign2 + }; + } else if (match5 = isoRegex.exec(input)) { + sign2 = match5[1] === "-" ? -1 : 1; + duration = { + y: parseIso(match5[2], sign2), + M: parseIso(match5[3], sign2), + w: parseIso(match5[4], sign2), + d: parseIso(match5[5], sign2), + h: parseIso(match5[6], sign2), + m: parseIso(match5[7], sign2), + s: parseIso(match5[8], sign2) + }; + } else if (duration == null) { + duration = {}; + } else if (typeof duration === "object" && ("from" in duration || "to" in duration)) { + diffRes = momentsDifference(createLocal(duration.from), createLocal(duration.to)); + duration = {}; + duration.ms = diffRes.milliseconds; + duration.M = diffRes.months; } - ; - Node.prototype = { - firstChild: null, - lastChild: null, - previousSibling: null, - nextSibling: null, - attributes: null, - parentNode: null, - childNodes: null, - ownerDocument: null, - nodeValue: null, - namespaceURI: null, - prefix: null, - localName: null, - insertBefore: function(newChild, refChild) { - return _insertBefore(this, newChild, refChild); - }, - replaceChild: function(newChild, oldChild) { - this.insertBefore(newChild, oldChild); - if (oldChild) { - this.removeChild(oldChild); - } - }, - removeChild: function(oldChild) { - return _removeChild(this, oldChild); - }, - appendChild: function(newChild) { - return this.insertBefore(newChild, null); - }, - hasChildNodes: function() { - return this.firstChild != null; - }, - cloneNode: function(deep) { - return cloneNode(this.ownerDocument || this, this, deep); - }, - normalize: function() { - var child = this.firstChild; - while (child) { - var next = child.nextSibling; - if (next && next.nodeType == TEXT_NODE && child.nodeType == TEXT_NODE) { - this.removeChild(next); - child.appendData(next.data); - } else { - child.normalize(); - child = next; - } - } - }, - isSupported: function(feature, version) { - return this.ownerDocument.implementation.hasFeature(feature, version); - }, - hasAttributes: function() { - return this.attributes.length > 0; - }, - lookupPrefix: function(namespaceURI) { - var el = this; - while (el) { - var map = el._nsMap; - if (map) { - for (var n3 in map) { - if (map[n3] == namespaceURI) { - return n3; - } - } - } - el = el.nodeType == ATTRIBUTE_NODE ? el.ownerDocument : el.parentNode; - } - return null; - }, - lookupNamespaceURI: function(prefix) { - var el = this; - while (el) { - var map = el._nsMap; - if (map) { - if (prefix in map) { - return map[prefix]; - } - } - el = el.nodeType == ATTRIBUTE_NODE ? el.ownerDocument : el.parentNode; - } - return null; - }, - isDefaultNamespace: function(namespaceURI) { - var prefix = this.lookupPrefix(namespaceURI); - return prefix == null; + ret = new Duration2(duration); + if (isDuration(input) && hasOwnProp(input, "_locale")) { + ret._locale = input._locale; + } + if (isDuration(input) && hasOwnProp(input, "_isValid")) { + ret._isValid = input._isValid; + } + return ret; + } + createDuration2.fn = Duration2.prototype; + createDuration2.invalid = createInvalid$1; + function parseIso(inp, sign2) { + var res = inp && parseFloat(inp.replace(",", ".")); + return (isNaN(res) ? 0 : res) * sign2; + } + function positiveMomentsDifference(base, other) { + var res = {}; + res.months = other.month() - base.month() + (other.year() - base.year()) * 12; + if (base.clone().add(res.months, "M").isAfter(other)) { + --res.months; + } + res.milliseconds = +other - +base.clone().add(res.months, "M"); + return res; + } + function momentsDifference(base, other) { + var res; + if (!(base.isValid() && other.isValid())) { + return { milliseconds: 0, months: 0 }; + } + other = cloneWithOffset(other, base); + if (base.isBefore(other)) { + res = positiveMomentsDifference(base, other); + } else { + res = positiveMomentsDifference(other, base); + res.milliseconds = -res.milliseconds; + res.months = -res.months; + } + return res; + } + function createAdder(direction, name) { + return function(val, period) { + var dur, tmp; + if (period !== null && !isNaN(+period)) { + deprecateSimple(name, "moment()." + name + "(period, number) is deprecated. Please use moment()." + name + "(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."); + tmp = val; + val = period; + period = tmp; } + dur = createDuration2(val, period); + addSubtract(this, dur, direction); + return this; }; - function _xmlEncoder(c3) { - return c3 == "<" && "<" || c3 == ">" && ">" || c3 == "&" && "&" || c3 == '"' && """ || "&#" + c3.charCodeAt() + ";"; + } + function addSubtract(mom, duration, isAdding, updateOffset) { + var milliseconds2 = duration._milliseconds, days2 = absRound(duration._days), months3 = absRound(duration._months); + if (!mom.isValid()) { + return; + } + updateOffset = updateOffset == null ? true : updateOffset; + if (months3) { + setMonth(mom, get(mom, "Month") + months3 * isAdding); + } + if (days2) { + set$1(mom, "Date", get(mom, "Date") + days2 * isAdding); + } + if (milliseconds2) { + mom._d.setTime(mom._d.valueOf() + milliseconds2 * isAdding); + } + if (updateOffset) { + hooks.updateOffset(mom, days2 || months3); + } + } + var add2 = createAdder(1, "add"), subtract = createAdder(-1, "subtract"); + function isString2(input) { + return typeof input === "string" || input instanceof String; + } + function isMomentInput(input) { + return isMoment(input) || isDate3(input) || isString2(input) || isNumber3(input) || isNumberOrStringArray(input) || isMomentInputObject(input) || input === null || input === void 0; + } + function isMomentInputObject(input) { + var objectTest = isObject(input) && !isObjectEmpty(input), propertyTest = false, properties = [ + "years", + "year", + "y", + "months", + "month", + "M", + "days", + "day", + "d", + "dates", + "date", + "D", + "hours", + "hour", + "h", + "minutes", + "minute", + "m", + "seconds", + "second", + "s", + "milliseconds", + "millisecond", + "ms" + ], i3, property, propertyLen = properties.length; + for (i3 = 0; i3 < propertyLen; i3 += 1) { + property = properties[i3]; + propertyTest = propertyTest || hasOwnProp(input, property); + } + return objectTest && propertyTest; + } + function isNumberOrStringArray(input) { + var arrayTest = isArray2(input), dataTypeTest = false; + if (arrayTest) { + dataTypeTest = input.filter(function(item) { + return !isNumber3(item) && isString2(input); + }).length === 0; + } + return arrayTest && dataTypeTest; + } + function isCalendarSpec(input) { + var objectTest = isObject(input) && !isObjectEmpty(input), propertyTest = false, properties = [ + "sameDay", + "nextDay", + "lastDay", + "nextWeek", + "lastWeek", + "sameElse" + ], i3, property; + for (i3 = 0; i3 < properties.length; i3 += 1) { + property = properties[i3]; + propertyTest = propertyTest || hasOwnProp(input, property); } - copy(NodeType, Node); - copy(NodeType, Node.prototype); - function _visitNode(node, callback) { - if (callback(node)) { - return true; - } - if (node = node.firstChild) { - do { - if (_visitNode(node, callback)) { - return true; - } - } while (node = node.nextSibling); + return objectTest && propertyTest; + } + function getCalendarFormat(myMoment, now3) { + var diff2 = myMoment.diff(now3, "days", true); + return diff2 < -6 ? "sameElse" : diff2 < -1 ? "lastWeek" : diff2 < 0 ? "lastDay" : diff2 < 1 ? "sameDay" : diff2 < 2 ? "nextDay" : diff2 < 7 ? "nextWeek" : "sameElse"; + } + function calendar$1(time, formats) { + if (arguments.length === 1) { + if (!arguments[0]) { + time = void 0; + formats = void 0; + } else if (isMomentInput(arguments[0])) { + time = arguments[0]; + formats = void 0; + } else if (isCalendarSpec(arguments[0])) { + formats = arguments[0]; + time = void 0; } } - function Document() { + var now3 = time || createLocal(), sod = cloneWithOffset(now3, this).startOf("day"), format2 = hooks.calendarFormat(this, sod) || "sameElse", output = formats && (isFunction(formats[format2]) ? formats[format2].call(this, now3) : formats[format2]); + return this.format(output || this.localeData().calendar(format2, this, createLocal(now3))); + } + function clone4() { + return new Moment(this); + } + function isAfter(input, units) { + var localInput = isMoment(input) ? input : createLocal(input); + if (!(this.isValid() && localInput.isValid())) { + return false; } - function _onAddAttribute(doc, el, newAttr) { - doc && doc._inc++; - var ns2 = newAttr.namespaceURI; - if (ns2 == "http://www.w3.org/2000/xmlns/") { - el._nsMap[newAttr.prefix ? newAttr.localName : ""] = newAttr.value; - } + units = normalizeUnits(units) || "millisecond"; + if (units === "millisecond") { + return this.valueOf() > localInput.valueOf(); + } else { + return localInput.valueOf() < this.clone().startOf(units).valueOf(); } - function _onRemoveAttribute(doc, el, newAttr, remove) { - doc && doc._inc++; - var ns2 = newAttr.namespaceURI; - if (ns2 == "http://www.w3.org/2000/xmlns/") { - delete el._nsMap[newAttr.prefix ? newAttr.localName : ""]; - } + } + function isBefore(input, units) { + var localInput = isMoment(input) ? input : createLocal(input); + if (!(this.isValid() && localInput.isValid())) { + return false; } - function _onUpdateChild(doc, el, newChild) { - if (doc && doc._inc) { - doc._inc++; - var cs = el.childNodes; - if (newChild) { - cs[cs.length++] = newChild; - } else { - var child = el.firstChild; - var i3 = 0; - while (child) { - cs[i3++] = child; - child = child.nextSibling; - } - cs.length = i3; - } - } + units = normalizeUnits(units) || "millisecond"; + if (units === "millisecond") { + return this.valueOf() < localInput.valueOf(); + } else { + return this.clone().endOf(units).valueOf() < localInput.valueOf(); } - function _removeChild(parentNode, child) { - var previous = child.previousSibling; - var next = child.nextSibling; - if (previous) { - previous.nextSibling = next; - } else { - parentNode.firstChild = next; - } - if (next) { - next.previousSibling = previous; - } else { - parentNode.lastChild = previous; - } - _onUpdateChild(parentNode.ownerDocument, parentNode); - return child; + } + function isBetween(from2, to2, units, inclusivity) { + var localFrom = isMoment(from2) ? from2 : createLocal(from2), localTo = isMoment(to2) ? to2 : createLocal(to2); + if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) { + return false; } - function _insertBefore(parentNode, newChild, nextChild) { - var cp = newChild.parentNode; - if (cp) { - cp.removeChild(newChild); - } - if (newChild.nodeType === DOCUMENT_FRAGMENT_NODE) { - var newFirst = newChild.firstChild; - if (newFirst == null) { - return newChild; - } - var newLast = newChild.lastChild; - } else { - newFirst = newLast = newChild; - } - var pre = nextChild ? nextChild.previousSibling : parentNode.lastChild; - newFirst.previousSibling = pre; - newLast.nextSibling = nextChild; - if (pre) { - pre.nextSibling = newFirst; - } else { - parentNode.firstChild = newFirst; - } - if (nextChild == null) { - parentNode.lastChild = newLast; - } else { - nextChild.previousSibling = newLast; - } - do { - newFirst.parentNode = parentNode; - } while (newFirst !== newLast && (newFirst = newFirst.nextSibling)); - _onUpdateChild(parentNode.ownerDocument || parentNode, parentNode); - if (newChild.nodeType == DOCUMENT_FRAGMENT_NODE) { - newChild.firstChild = newChild.lastChild = null; - } - return newChild; + inclusivity = inclusivity || "()"; + return (inclusivity[0] === "(" ? this.isAfter(localFrom, units) : !this.isBefore(localFrom, units)) && (inclusivity[1] === ")" ? this.isBefore(localTo, units) : !this.isAfter(localTo, units)); + } + function isSame(input, units) { + var localInput = isMoment(input) ? input : createLocal(input), inputMs; + if (!(this.isValid() && localInput.isValid())) { + return false; } - function _appendSingleChild(parentNode, newChild) { - var cp = newChild.parentNode; - if (cp) { - var pre = parentNode.lastChild; - cp.removeChild(newChild); - var pre = parentNode.lastChild; - } - var pre = parentNode.lastChild; - newChild.parentNode = parentNode; - newChild.previousSibling = pre; - newChild.nextSibling = null; - if (pre) { - pre.nextSibling = newChild; - } else { - parentNode.firstChild = newChild; - } - parentNode.lastChild = newChild; - _onUpdateChild(parentNode.ownerDocument, parentNode, newChild); - return newChild; + units = normalizeUnits(units) || "millisecond"; + if (units === "millisecond") { + return this.valueOf() === localInput.valueOf(); + } else { + inputMs = localInput.valueOf(); + return this.clone().startOf(units).valueOf() <= inputMs && inputMs <= this.clone().endOf(units).valueOf(); } - Document.prototype = { - nodeName: "#document", - nodeType: DOCUMENT_NODE, - doctype: null, - documentElement: null, - _inc: 1, - insertBefore: function(newChild, refChild) { - if (newChild.nodeType == DOCUMENT_FRAGMENT_NODE) { - var child = newChild.firstChild; - while (child) { - var next = child.nextSibling; - this.insertBefore(child, refChild); - child = next; - } - return newChild; - } - if (this.documentElement == null && newChild.nodeType == ELEMENT_NODE) { - this.documentElement = newChild; - } - return _insertBefore(this, newChild, refChild), newChild.ownerDocument = this, newChild; - }, - removeChild: function(oldChild) { - if (this.documentElement == oldChild) { - this.documentElement = null; - } - return _removeChild(this, oldChild); - }, - importNode: function(importedNode, deep) { - return importNode(this, importedNode, deep); - }, - getElementById: function(id) { - var rtv = null; - _visitNode(this.documentElement, function(node) { - if (node.nodeType == ELEMENT_NODE) { - if (node.getAttribute("id") == id) { - rtv = node; - return true; - } - } - }); - return rtv; - }, - createElement: function(tagName) { - var node = new Element2(); - node.ownerDocument = this; - node.nodeName = tagName; - node.tagName = tagName; - node.childNodes = new NodeList(); - var attrs = node.attributes = new NamedNodeMap(); - attrs._ownerElement = node; - return node; - }, - createDocumentFragment: function() { - var node = new DocumentFragment(); - node.ownerDocument = this; - node.childNodes = new NodeList(); - return node; - }, - createTextNode: function(data) { - var node = new Text(); - node.ownerDocument = this; - node.appendData(data); - return node; - }, - createComment: function(data) { - var node = new Comment(); - node.ownerDocument = this; - node.appendData(data); - return node; - }, - createCDATASection: function(data) { - var node = new CDATASection(); - node.ownerDocument = this; - node.appendData(data); - return node; - }, - createProcessingInstruction: function(target, data) { - var node = new ProcessingInstruction(); - node.ownerDocument = this; - node.tagName = node.target = target; - node.nodeValue = node.data = data; - return node; - }, - createAttribute: function(name) { - var node = new Attr(); - node.ownerDocument = this; - node.name = name; - node.nodeName = name; - node.localName = name; - node.specified = true; - return node; - }, - createEntityReference: function(name) { - var node = new EntityReference(); - node.ownerDocument = this; - node.nodeName = name; - return node; - }, - createElementNS: function(namespaceURI, qualifiedName) { - var node = new Element2(); - var pl = qualifiedName.split(":"); - var attrs = node.attributes = new NamedNodeMap(); - node.childNodes = new NodeList(); - node.ownerDocument = this; - node.nodeName = qualifiedName; - node.tagName = qualifiedName; - node.namespaceURI = namespaceURI; - if (pl.length == 2) { - node.prefix = pl[0]; - node.localName = pl[1]; - } else { - node.localName = qualifiedName; - } - attrs._ownerElement = node; - return node; - }, - createAttributeNS: function(namespaceURI, qualifiedName) { - var node = new Attr(); - var pl = qualifiedName.split(":"); - node.ownerDocument = this; - node.nodeName = qualifiedName; - node.name = qualifiedName; - node.namespaceURI = namespaceURI; - node.specified = true; - if (pl.length == 2) { - node.prefix = pl[0]; - node.localName = pl[1]; - } else { - node.localName = qualifiedName; - } - return node; - } - }; - _extends(Document, Node); - function Element2() { - this._nsMap = {}; + } + function isSameOrAfter(input, units) { + return this.isSame(input, units) || this.isAfter(input, units); + } + function isSameOrBefore(input, units) { + return this.isSame(input, units) || this.isBefore(input, units); + } + function diff(input, units, asFloat) { + var that, zoneDelta, output; + if (!this.isValid()) { + return NaN; } - ; - Element2.prototype = { - nodeType: ELEMENT_NODE, - hasAttribute: function(name) { - return this.getAttributeNode(name) != null; - }, - getAttribute: function(name) { - var attr = this.getAttributeNode(name); - return attr && attr.value || ""; - }, - getAttributeNode: function(name) { - return this.attributes.getNamedItem(name); - }, - setAttribute: function(name, value) { - var attr = this.ownerDocument.createAttribute(name); - attr.value = attr.nodeValue = "" + value; - this.setAttributeNode(attr); - }, - removeAttribute: function(name) { - var attr = this.getAttributeNode(name); - attr && this.removeAttributeNode(attr); - }, - appendChild: function(newChild) { - if (newChild.nodeType === DOCUMENT_FRAGMENT_NODE) { - return this.insertBefore(newChild, null); - } else { - return _appendSingleChild(this, newChild); - } - }, - setAttributeNode: function(newAttr) { - return this.attributes.setNamedItem(newAttr); - }, - setAttributeNodeNS: function(newAttr) { - return this.attributes.setNamedItemNS(newAttr); - }, - removeAttributeNode: function(oldAttr) { - return this.attributes.removeNamedItem(oldAttr.nodeName); - }, - removeAttributeNS: function(namespaceURI, localName) { - var old = this.getAttributeNodeNS(namespaceURI, localName); - old && this.removeAttributeNode(old); - }, - hasAttributeNS: function(namespaceURI, localName) { - return this.getAttributeNodeNS(namespaceURI, localName) != null; - }, - getAttributeNS: function(namespaceURI, localName) { - var attr = this.getAttributeNodeNS(namespaceURI, localName); - return attr && attr.value || ""; - }, - setAttributeNS: function(namespaceURI, qualifiedName, value) { - var attr = this.ownerDocument.createAttributeNS(namespaceURI, qualifiedName); - attr.value = attr.nodeValue = "" + value; - this.setAttributeNode(attr); - }, - getAttributeNodeNS: function(namespaceURI, localName) { - return this.attributes.getNamedItemNS(namespaceURI, localName); - }, - getElementsByTagName: function(tagName) { - return new LiveNodeList(this, function(base) { - var ls = []; - _visitNode(base, function(node) { - if (node !== base && node.nodeType == ELEMENT_NODE && (tagName === "*" || node.tagName == tagName)) { - ls.push(node); - } - }); - return ls; - }); - }, - getElementsByTagNameNS: function(namespaceURI, localName) { - return new LiveNodeList(this, function(base) { - var ls = []; - _visitNode(base, function(node) { - if (node !== base && node.nodeType === ELEMENT_NODE && (namespaceURI === "*" || node.namespaceURI === namespaceURI) && (localName === "*" || node.localName == localName)) { - ls.push(node); - } - }); - return ls; - }); - } - }; - Document.prototype.getElementsByTagName = Element2.prototype.getElementsByTagName; - Document.prototype.getElementsByTagNameNS = Element2.prototype.getElementsByTagNameNS; - _extends(Element2, Node); - function Attr() { + that = cloneWithOffset(input, this); + if (!that.isValid()) { + return NaN; } - ; - Attr.prototype.nodeType = ATTRIBUTE_NODE; - _extends(Attr, Node); - function CharacterData() { + zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4; + units = normalizeUnits(units); + switch (units) { + case "year": + output = monthDiff(this, that) / 12; + break; + case "month": + output = monthDiff(this, that); + break; + case "quarter": + output = monthDiff(this, that) / 3; + break; + case "second": + output = (this - that) / 1e3; + break; + case "minute": + output = (this - that) / 6e4; + break; + case "hour": + output = (this - that) / 36e5; + break; + case "day": + output = (this - that - zoneDelta) / 864e5; + break; + case "week": + output = (this - that - zoneDelta) / 6048e5; + break; + default: + output = this - that; } - ; - CharacterData.prototype = { - data: "", - substringData: function(offset2, count) { - return this.data.substring(offset2, offset2 + count); - }, - appendData: function(text) { - text = this.data + text; - this.nodeValue = this.data = text; - this.length = text.length; - }, - insertData: function(offset2, text) { - this.replaceData(offset2, 0, text); - }, - appendChild: function(newChild) { - throw new Error(ExceptionMessage[HIERARCHY_REQUEST_ERR]); - }, - deleteData: function(offset2, count) { - this.replaceData(offset2, count, ""); - }, - replaceData: function(offset2, count, text) { - var start = this.data.substring(0, offset2); - var end = this.data.substring(offset2 + count); - text = start + text + end; - this.nodeValue = this.data = text; - this.length = text.length; - } - }; - _extends(CharacterData, Node); - function Text() { + return asFloat ? output : absFloor(output); + } + function monthDiff(a3, b3) { + if (a3.date() < b3.date()) { + return -monthDiff(b3, a3); } - ; - Text.prototype = { - nodeName: "#text", - nodeType: TEXT_NODE, - splitText: function(offset2) { - var text = this.data; - var newText = text.substring(offset2); - text = text.substring(0, offset2); - this.data = this.nodeValue = text; - this.length = text.length; - var newNode = this.ownerDocument.createTextNode(newText); - if (this.parentNode) { - this.parentNode.insertBefore(newNode, this.nextSibling); - } - return newNode; + var wholeMonthDiff = (b3.year() - a3.year()) * 12 + (b3.month() - a3.month()), anchor = a3.clone().add(wholeMonthDiff, "months"), anchor2, adjust; + if (b3 - anchor < 0) { + anchor2 = a3.clone().add(wholeMonthDiff - 1, "months"); + adjust = (b3 - anchor) / (anchor - anchor2); + } else { + anchor2 = a3.clone().add(wholeMonthDiff + 1, "months"); + adjust = (b3 - anchor) / (anchor2 - anchor); + } + return -(wholeMonthDiff + adjust) || 0; + } + hooks.defaultFormat = "YYYY-MM-DDTHH:mm:ssZ"; + hooks.defaultFormatUtc = "YYYY-MM-DDTHH:mm:ss[Z]"; + function toString() { + return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ"); + } + function toISOString(keepOffset) { + if (!this.isValid()) { + return null; + } + var utc = keepOffset !== true, m3 = utc ? this.clone().utc() : this; + if (m3.year() < 0 || m3.year() > 9999) { + return formatMoment(m3, utc ? "YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]" : "YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"); + } + if (isFunction(Date.prototype.toISOString)) { + if (utc) { + return this.toDate().toISOString(); + } else { + return new Date(this.valueOf() + this.utcOffset() * 60 * 1e3).toISOString().replace("Z", formatMoment(m3, "Z")); } - }; - _extends(Text, CharacterData); - function Comment() { } - ; - Comment.prototype = { - nodeName: "#comment", - nodeType: COMMENT_NODE - }; - _extends(Comment, CharacterData); - function CDATASection() { + return formatMoment(m3, utc ? "YYYY-MM-DD[T]HH:mm:ss.SSS[Z]" : "YYYY-MM-DD[T]HH:mm:ss.SSSZ"); + } + function inspect() { + if (!this.isValid()) { + return "moment.invalid(/* " + this._i + " */)"; } - ; - CDATASection.prototype = { - nodeName: "#cdata-section", - nodeType: CDATA_SECTION_NODE - }; - _extends(CDATASection, CharacterData); - function DocumentType() { + var func = "moment", zone = "", prefix, year, datetime2, suffix; + if (!this.isLocal()) { + func = this.utcOffset() === 0 ? "moment.utc" : "moment.parseZone"; + zone = "Z"; } - ; - DocumentType.prototype.nodeType = DOCUMENT_TYPE_NODE; - _extends(DocumentType, Node); - function Notation() { + prefix = "[" + func + '("]'; + year = 0 <= this.year() && this.year() <= 9999 ? "YYYY" : "YYYYYY"; + datetime2 = "-MM-DD[T]HH:mm:ss.SSS"; + suffix = zone + '[")]'; + return this.format(prefix + year + datetime2 + suffix); + } + function format(inputString) { + if (!inputString) { + inputString = this.isUtc() ? hooks.defaultFormatUtc : hooks.defaultFormat; } - ; - Notation.prototype.nodeType = NOTATION_NODE; - _extends(Notation, Node); - function Entity() { + var output = formatMoment(this, inputString); + return this.localeData().postformat(output); + } + function from(time, withoutSuffix) { + if (this.isValid() && (isMoment(time) && time.isValid() || createLocal(time).isValid())) { + return createDuration2({ to: this, from: time }).locale(this.locale()).humanize(!withoutSuffix); + } else { + return this.localeData().invalidDate(); } - ; - Entity.prototype.nodeType = ENTITY_NODE; - _extends(Entity, Node); - function EntityReference() { + } + function fromNow(withoutSuffix) { + return this.from(createLocal(), withoutSuffix); + } + function to(time, withoutSuffix) { + if (this.isValid() && (isMoment(time) && time.isValid() || createLocal(time).isValid())) { + return createDuration2({ from: this, to: time }).locale(this.locale()).humanize(!withoutSuffix); + } else { + return this.localeData().invalidDate(); } - ; - EntityReference.prototype.nodeType = ENTITY_REFERENCE_NODE; - _extends(EntityReference, Node); - function DocumentFragment() { + } + function toNow(withoutSuffix) { + return this.to(createLocal(), withoutSuffix); + } + function locale(key) { + var newLocaleData; + if (key === void 0) { + return this._locale._abbr; + } else { + newLocaleData = getLocale(key); + if (newLocaleData != null) { + this._locale = newLocaleData; + } + return this; } - ; - DocumentFragment.prototype.nodeName = "#document-fragment"; - DocumentFragment.prototype.nodeType = DOCUMENT_FRAGMENT_NODE; - _extends(DocumentFragment, Node); - function ProcessingInstruction() { + } + var lang = deprecate("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.", function(key) { + if (key === void 0) { + return this.localeData(); + } else { + return this.locale(key); } - ProcessingInstruction.prototype.nodeType = PROCESSING_INSTRUCTION_NODE; - _extends(ProcessingInstruction, Node); - function XMLSerializer() { + }); + function localeData() { + return this._locale; + } + var MS_PER_SECOND = 1e3, MS_PER_MINUTE = 60 * MS_PER_SECOND, MS_PER_HOUR = 60 * MS_PER_MINUTE, MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR; + function mod$1(dividend, divisor) { + return (dividend % divisor + divisor) % divisor; + } + function localStartOfDate(y3, m3, d2) { + if (y3 < 100 && y3 >= 0) { + return new Date(y3 + 400, m3, d2) - MS_PER_400_YEARS; + } else { + return new Date(y3, m3, d2).valueOf(); } - XMLSerializer.prototype.serializeToString = function(node, isHtml, nodeFilter) { - return nodeSerializeToString.call(node, isHtml, nodeFilter); + } + function utcStartOfDate(y3, m3, d2) { + if (y3 < 100 && y3 >= 0) { + return Date.UTC(y3 + 400, m3, d2) - MS_PER_400_YEARS; + } else { + return Date.UTC(y3, m3, d2); + } + } + function startOf(units) { + var time, startOfDate; + units = normalizeUnits(units); + if (units === void 0 || units === "millisecond" || !this.isValid()) { + return this; + } + startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate; + switch (units) { + case "year": + time = startOfDate(this.year(), 0, 1); + break; + case "quarter": + time = startOfDate(this.year(), this.month() - this.month() % 3, 1); + break; + case "month": + time = startOfDate(this.year(), this.month(), 1); + break; + case "week": + time = startOfDate(this.year(), this.month(), this.date() - this.weekday()); + break; + case "isoWeek": + time = startOfDate(this.year(), this.month(), this.date() - (this.isoWeekday() - 1)); + break; + case "day": + case "date": + time = startOfDate(this.year(), this.month(), this.date()); + break; + case "hour": + time = this._d.valueOf(); + time -= mod$1(time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), MS_PER_HOUR); + break; + case "minute": + time = this._d.valueOf(); + time -= mod$1(time, MS_PER_MINUTE); + break; + case "second": + time = this._d.valueOf(); + time -= mod$1(time, MS_PER_SECOND); + break; + } + this._d.setTime(time); + hooks.updateOffset(this, true); + return this; + } + function endOf(units) { + var time, startOfDate; + units = normalizeUnits(units); + if (units === void 0 || units === "millisecond" || !this.isValid()) { + return this; + } + startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate; + switch (units) { + case "year": + time = startOfDate(this.year() + 1, 0, 1) - 1; + break; + case "quarter": + time = startOfDate(this.year(), this.month() - this.month() % 3 + 3, 1) - 1; + break; + case "month": + time = startOfDate(this.year(), this.month() + 1, 1) - 1; + break; + case "week": + time = startOfDate(this.year(), this.month(), this.date() - this.weekday() + 7) - 1; + break; + case "isoWeek": + time = startOfDate(this.year(), this.month(), this.date() - (this.isoWeekday() - 1) + 7) - 1; + break; + case "day": + case "date": + time = startOfDate(this.year(), this.month(), this.date() + 1) - 1; + break; + case "hour": + time = this._d.valueOf(); + time += MS_PER_HOUR - mod$1(time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), MS_PER_HOUR) - 1; + break; + case "minute": + time = this._d.valueOf(); + time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1; + break; + case "second": + time = this._d.valueOf(); + time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1; + break; + } + this._d.setTime(time); + hooks.updateOffset(this, true); + return this; + } + function valueOf() { + return this._d.valueOf() - (this._offset || 0) * 6e4; + } + function unix() { + return Math.floor(this.valueOf() / 1e3); + } + function toDate() { + return new Date(this.valueOf()); + } + function toArray2() { + var m3 = this; + return [ + m3.year(), + m3.month(), + m3.date(), + m3.hour(), + m3.minute(), + m3.second(), + m3.millisecond() + ]; + } + function toObject() { + var m3 = this; + return { + years: m3.year(), + months: m3.month(), + date: m3.date(), + hours: m3.hours(), + minutes: m3.minutes(), + seconds: m3.seconds(), + milliseconds: m3.milliseconds() }; - Node.prototype.toString = nodeSerializeToString; - function nodeSerializeToString(isHtml, nodeFilter) { - var buf = []; - var refNode = this.nodeType == 9 ? this.documentElement : this; - var prefix = refNode.prefix; - var uri = refNode.namespaceURI; - if (uri && prefix == null) { - var prefix = refNode.lookupPrefix(uri); - if (prefix == null) { - var visibleNamespaces = [ - { namespace: uri, prefix: null } - ]; - } - } - serializeToString(this, buf, isHtml, nodeFilter, visibleNamespaces); - return buf.join(""); + } + function toJSON() { + return this.isValid() ? this.toISOString() : null; + } + function isValid$2() { + return isValid(this); + } + function parsingFlags() { + return extend({}, getParsingFlags(this)); + } + function invalidAt() { + return getParsingFlags(this).overflow; + } + function creationData() { + return { + input: this._i, + format: this._f, + locale: this._locale, + isUTC: this._isUTC, + strict: this._strict + }; + } + addFormatToken("N", 0, 0, "eraAbbr"); + addFormatToken("NN", 0, 0, "eraAbbr"); + addFormatToken("NNN", 0, 0, "eraAbbr"); + addFormatToken("NNNN", 0, 0, "eraName"); + addFormatToken("NNNNN", 0, 0, "eraNarrow"); + addFormatToken("y", ["y", 1], "yo", "eraYear"); + addFormatToken("y", ["yy", 2], 0, "eraYear"); + addFormatToken("y", ["yyy", 3], 0, "eraYear"); + addFormatToken("y", ["yyyy", 4], 0, "eraYear"); + addRegexToken("N", matchEraAbbr); + addRegexToken("NN", matchEraAbbr); + addRegexToken("NNN", matchEraAbbr); + addRegexToken("NNNN", matchEraName); + addRegexToken("NNNNN", matchEraNarrow); + addParseToken(["N", "NN", "NNN", "NNNN", "NNNNN"], function(input, array, config2, token2) { + var era = config2._locale.erasParse(input, token2, config2._strict); + if (era) { + getParsingFlags(config2).era = era; + } else { + getParsingFlags(config2).invalidEra = input; } - function needNamespaceDefine(node, isHTML, visibleNamespaces) { - var prefix = node.prefix || ""; - var uri = node.namespaceURI; - if (!prefix && !uri) { - return false; - } - if (prefix === "xml" && uri === "http://www.w3.org/XML/1998/namespace" || uri == "http://www.w3.org/2000/xmlns/") { - return false; - } - var i3 = visibleNamespaces.length; - while (i3--) { - var ns2 = visibleNamespaces[i3]; - if (ns2.prefix == prefix) { - return ns2.namespace != uri; - } - } - return true; + }); + addRegexToken("y", matchUnsigned); + addRegexToken("yy", matchUnsigned); + addRegexToken("yyy", matchUnsigned); + addRegexToken("yyyy", matchUnsigned); + addRegexToken("yo", matchEraYearOrdinal); + addParseToken(["y", "yy", "yyy", "yyyy"], YEAR); + addParseToken(["yo"], function(input, array, config2, token2) { + var match5; + if (config2._locale._eraYearOrdinalRegex) { + match5 = input.match(config2._locale._eraYearOrdinalRegex); } - function serializeToString(node, buf, isHTML, nodeFilter, visibleNamespaces) { - if (nodeFilter) { - node = nodeFilter(node); - if (node) { - if (typeof node == "string") { - buf.push(node); - return; - } - } else { - return; - } - } - switch (node.nodeType) { - case ELEMENT_NODE: - if (!visibleNamespaces) - visibleNamespaces = []; - var startVisibleNamespaces = visibleNamespaces.length; - var attrs = node.attributes; - var len = attrs.length; - var child = node.firstChild; - var nodeName = node.tagName; - isHTML = htmlns === node.namespaceURI || isHTML; - buf.push("<", nodeName); - for (var i3 = 0; i3 < len; i3++) { - var attr = attrs.item(i3); - if (attr.prefix == "xmlns") { - visibleNamespaces.push({ prefix: attr.localName, namespace: attr.value }); - } else if (attr.nodeName == "xmlns") { - visibleNamespaces.push({ prefix: "", namespace: attr.value }); - } - } - for (var i3 = 0; i3 < len; i3++) { - var attr = attrs.item(i3); - if (needNamespaceDefine(attr, isHTML, visibleNamespaces)) { - var prefix = attr.prefix || ""; - var uri = attr.namespaceURI; - var ns2 = prefix ? " xmlns:" + prefix : " xmlns"; - buf.push(ns2, '="', uri, '"'); - visibleNamespaces.push({ prefix, namespace: uri }); - } - serializeToString(attr, buf, isHTML, nodeFilter, visibleNamespaces); - } - if (needNamespaceDefine(node, isHTML, visibleNamespaces)) { - var prefix = node.prefix || ""; - var uri = node.namespaceURI; - var ns2 = prefix ? " xmlns:" + prefix : " xmlns"; - buf.push(ns2, '="', uri, '"'); - visibleNamespaces.push({ prefix, namespace: uri }); - } - if (child || isHTML && !/^(?:meta|link|img|br|hr|input)$/i.test(nodeName)) { - buf.push(">"); - if (isHTML && /^script$/i.test(nodeName)) { - while (child) { - if (child.data) { - buf.push(child.data); - } else { - serializeToString(child, buf, isHTML, nodeFilter, visibleNamespaces); - } - child = child.nextSibling; - } - } else { - while (child) { - serializeToString(child, buf, isHTML, nodeFilter, visibleNamespaces); - child = child.nextSibling; - } - } - buf.push(""); - } else { - buf.push("/>"); - } - return; - case DOCUMENT_NODE: - case DOCUMENT_FRAGMENT_NODE: - var child = node.firstChild; - while (child) { - serializeToString(child, buf, isHTML, nodeFilter, visibleNamespaces); - child = child.nextSibling; - } - return; - case ATTRIBUTE_NODE: - return buf.push(" ", node.name, '="', node.value.replace(/[<&"]/g, _xmlEncoder), '"'); - case TEXT_NODE: - return buf.push(node.data.replace(/[<&]/g, _xmlEncoder)); - case CDATA_SECTION_NODE: - return buf.push(""); - case COMMENT_NODE: - return buf.push(""); - case DOCUMENT_TYPE_NODE: - var pubid = node.publicId; - var sysid = node.systemId; - buf.push("'); - } else if (sysid && sysid != ".") { - buf.push(' SYSTEM "', sysid, '">'); - } else { - var sub = node.internalSubset; - if (sub) { - buf.push(" [", sub, "]"); - } - buf.push(">"); - } - return; - case PROCESSING_INSTRUCTION_NODE: - return buf.push(""); - case ENTITY_REFERENCE_NODE: - return buf.push("&", node.nodeName, ";"); - default: - buf.push("??", node.nodeName); - } + if (config2._locale.eraYearOrdinalParse) { + array[YEAR] = config2._locale.eraYearOrdinalParse(input, match5); + } else { + array[YEAR] = parseInt(input, 10); } - function importNode(doc, node, deep) { - var node2; - switch (node.nodeType) { - case ELEMENT_NODE: - node2 = node.cloneNode(false); - node2.ownerDocument = doc; - case DOCUMENT_FRAGMENT_NODE: - break; - case ATTRIBUTE_NODE: - deep = true; + }); + function localeEras(m3, format2) { + var i3, l4, date, eras2 = this._eras || getLocale("en")._eras; + for (i3 = 0, l4 = eras2.length; i3 < l4; ++i3) { + switch (typeof eras2[i3].since) { + case "string": + date = hooks(eras2[i3].since).startOf("day"); + eras2[i3].since = date.valueOf(); break; } - if (!node2) { - node2 = node.cloneNode(false); - } - node2.ownerDocument = doc; - node2.parentNode = null; - if (deep) { - var child = node.firstChild; - while (child) { - node2.appendChild(importNode(doc, child, deep)); - child = child.nextSibling; - } - } - return node2; - } - function cloneNode(doc, node, deep) { - var node2 = new node.constructor(); - for (var n3 in node) { - var v3 = node[n3]; - if (typeof v3 != "object") { - if (v3 != node2[n3]) { - node2[n3] = v3; - } - } - } - if (node.childNodes) { - node2.childNodes = new NodeList(); - } - node2.ownerDocument = doc; - switch (node2.nodeType) { - case ELEMENT_NODE: - var attrs = node.attributes; - var attrs2 = node2.attributes = new NamedNodeMap(); - var len = attrs.length; - attrs2._ownerElement = node2; - for (var i3 = 0; i3 < len; i3++) { - node2.setAttributeNode(cloneNode(doc, attrs.item(i3), true)); - } + switch (typeof eras2[i3].until) { + case "undefined": + eras2[i3].until = Infinity; + break; + case "string": + date = hooks(eras2[i3].until).startOf("day").valueOf(); + eras2[i3].until = date.valueOf(); break; - ; - case ATTRIBUTE_NODE: - deep = true; - } - if (deep) { - var child = node.firstChild; - while (child) { - node2.appendChild(cloneNode(doc, child, deep)); - child = child.nextSibling; - } } - return node2; - } - function __set__(object, key, value) { - object[key] = value; } - try { - if (Object.defineProperty) { - let getTextContent2 = function(node) { - switch (node.nodeType) { - case ELEMENT_NODE: - case DOCUMENT_FRAGMENT_NODE: - var buf = []; - node = node.firstChild; - while (node) { - if (node.nodeType !== 7 && node.nodeType !== 8) { - buf.push(getTextContent2(node)); - } - node = node.nextSibling; - } - return buf.join(""); - default: - return node.nodeValue; - } - }; - var getTextContent = getTextContent2; - Object.defineProperty(LiveNodeList.prototype, "length", { - get: function() { - _updateLiveList(this); - return this.$$length; - } - }); - Object.defineProperty(Node.prototype, "textContent", { - get: function() { - return getTextContent2(this); - }, - set: function(data) { - switch (this.nodeType) { - case ELEMENT_NODE: - case DOCUMENT_FRAGMENT_NODE: - while (this.firstChild) { - this.removeChild(this.firstChild); - } - if (data || String(data)) { - this.appendChild(this.ownerDocument.createTextNode(data)); - } - break; - default: - this.data = data; - this.value = data; - this.nodeValue = data; + return eras2; + } + function localeErasParse(eraName, format2, strict) { + var i3, l4, eras2 = this.eras(), name, abbr, narrow; + eraName = eraName.toUpperCase(); + for (i3 = 0, l4 = eras2.length; i3 < l4; ++i3) { + name = eras2[i3].name.toUpperCase(); + abbr = eras2[i3].abbr.toUpperCase(); + narrow = eras2[i3].narrow.toUpperCase(); + if (strict) { + switch (format2) { + case "N": + case "NN": + case "NNN": + if (abbr === eraName) { + return eras2[i3]; } - } - }); - __set__ = function(object, key, value) { - object["$$" + key] = value; - }; + break; + case "NNNN": + if (name === eraName) { + return eras2[i3]; + } + break; + case "NNNNN": + if (narrow === eraName) { + return eras2[i3]; + } + break; + } + } else if ([name, abbr, narrow].indexOf(eraName) >= 0) { + return eras2[i3]; } - } catch (e3) { } - exports3.DOMImplementation = DOMImplementation; - exports3.XMLSerializer = XMLSerializer; - }, {}], 32: [function(require2, module4, exports3) { - var nameStartChar = /[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/; - var nameChar = new RegExp("[\\-\\.0-9" + nameStartChar.source.slice(1, -1) + "\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"); - var tagNamePattern = new RegExp("^" + nameStartChar.source + nameChar.source + "*(?::" + nameStartChar.source + nameChar.source + "*)?$"); - var S_TAG = 0; - var S_ATTR = 1; - var S_ATTR_SPACE = 2; - var S_EQ = 3; - var S_ATTR_NOQUOT_VALUE = 4; - var S_ATTR_END = 5; - var S_TAG_SPACE = 6; - var S_TAG_CLOSE = 7; - function XMLReader() { + } + function localeErasConvertYear(era, year) { + var dir = era.since <= era.until ? 1 : -1; + if (year === void 0) { + return hooks(era.since).year(); + } else { + return hooks(era.since).year() + (year - era.offset) * dir; } - XMLReader.prototype = { - parse: function(source, defaultNSMap, entityMap) { - var domBuilder = this.domBuilder; - domBuilder.startDocument(); - _copy(defaultNSMap, defaultNSMap = {}); - parse5(source, defaultNSMap, entityMap, domBuilder, this.errorHandler); - domBuilder.endDocument(); + } + function getEraName() { + var i3, l4, val, eras2 = this.localeData().eras(); + for (i3 = 0, l4 = eras2.length; i3 < l4; ++i3) { + val = this.clone().startOf("day").valueOf(); + if (eras2[i3].since <= val && val <= eras2[i3].until) { + return eras2[i3].name; } - }; - function parse5(source, defaultNSMapCopy, entityMap, domBuilder, errorHandler) { - function fixedFromCharCode(code) { - if (code > 65535) { - code -= 65536; - var surrogate1 = 55296 + (code >> 10), surrogate2 = 56320 + (code & 1023); - return String.fromCharCode(surrogate1, surrogate2); - } else { - return String.fromCharCode(code); - } + if (eras2[i3].until <= val && val <= eras2[i3].since) { + return eras2[i3].name; } - function entityReplacer(a4) { - var k3 = a4.slice(1, -1); - if (k3 in entityMap) { - return entityMap[k3]; - } else if (k3.charAt(0) === "#") { - return fixedFromCharCode(parseInt(k3.substr(1).replace("x", "0x"))); - } else { - errorHandler.error("entity not found:" + a4); - return a4; - } + } + return ""; + } + function getEraNarrow() { + var i3, l4, val, eras2 = this.localeData().eras(); + for (i3 = 0, l4 = eras2.length; i3 < l4; ++i3) { + val = this.clone().startOf("day").valueOf(); + if (eras2[i3].since <= val && val <= eras2[i3].until) { + return eras2[i3].narrow; } - function appendText(end2) { - if (end2 > start) { - var xt = source.substring(start, end2).replace(/&#?\w+;/g, entityReplacer); - locator && position(start); - domBuilder.characters(xt, 0, end2 - start); - start = end2; - } + if (eras2[i3].until <= val && val <= eras2[i3].since) { + return eras2[i3].narrow; } - function position(p3, m3) { - while (p3 >= lineEnd && (m3 = linePattern.exec(source))) { - lineStart = m3.index; - lineEnd = lineStart + m3[0].length; - locator.lineNumber++; - } - locator.columnNumber = p3 - lineStart + 1; + } + return ""; + } + function getEraAbbr() { + var i3, l4, val, eras2 = this.localeData().eras(); + for (i3 = 0, l4 = eras2.length; i3 < l4; ++i3) { + val = this.clone().startOf("day").valueOf(); + if (eras2[i3].since <= val && val <= eras2[i3].until) { + return eras2[i3].abbr; } - var lineStart = 0; - var lineEnd = 0; - var linePattern = /.*(?:\r\n?|\n)|.*$/g; - var locator = domBuilder.locator; - var parseStack = [{ currentNSMap: defaultNSMapCopy }]; - var closeMap = {}; - var start = 0; - while (true) { - try { - var tagStart = source.indexOf("<", start); - if (tagStart < 0) { - if (!source.substr(start).match(/^\s*$/)) { - var doc = domBuilder.doc; - var text = doc.createTextNode(source.substr(start)); - doc.appendChild(text); - domBuilder.currentElement = text; - } - return; - } - if (tagStart > start) { - appendText(tagStart); - } - switch (source.charAt(tagStart + 1)) { - case "/": - var end = source.indexOf(">", tagStart + 3); - var tagName = source.substring(tagStart + 2, end); - var config2 = parseStack.pop(); - if (end < 0) { - tagName = source.substring(tagStart + 2).replace(/[\s<].*/, ""); - errorHandler.error("end tag name: " + tagName + " is not complete:" + config2.tagName); - end = tagStart + 1 + tagName.length; - } else if (tagName.match(/\s start) { - start = end; - } else { - appendText(Math.max(tagStart, start) + 1); - } + if (eras2[i3].until <= val && val <= eras2[i3].since) { + return eras2[i3].abbr; + } + } + return ""; + } + function getEraYear() { + var i3, l4, dir, val, eras2 = this.localeData().eras(); + for (i3 = 0, l4 = eras2.length; i3 < l4; ++i3) { + dir = eras2[i3].since <= eras2[i3].until ? 1 : -1; + val = this.clone().startOf("day").valueOf(); + if (eras2[i3].since <= val && val <= eras2[i3].until || eras2[i3].until <= val && val <= eras2[i3].since) { + return (this.year() - hooks(eras2[i3].since).year()) * dir + eras2[i3].offset; + } + } + return this.year(); + } + function erasNameRegex(isStrict) { + if (!hasOwnProp(this, "_erasNameRegex")) { + computeErasParse.call(this); + } + return isStrict ? this._erasNameRegex : this._erasRegex; + } + function erasAbbrRegex(isStrict) { + if (!hasOwnProp(this, "_erasAbbrRegex")) { + computeErasParse.call(this); + } + return isStrict ? this._erasAbbrRegex : this._erasRegex; + } + function erasNarrowRegex(isStrict) { + if (!hasOwnProp(this, "_erasNarrowRegex")) { + computeErasParse.call(this); + } + return isStrict ? this._erasNarrowRegex : this._erasRegex; + } + function matchEraAbbr(isStrict, locale2) { + return locale2.erasAbbrRegex(isStrict); + } + function matchEraName(isStrict, locale2) { + return locale2.erasNameRegex(isStrict); + } + function matchEraNarrow(isStrict, locale2) { + return locale2.erasNarrowRegex(isStrict); + } + function matchEraYearOrdinal(isStrict, locale2) { + return locale2._eraYearOrdinalRegex || matchUnsigned; + } + function computeErasParse() { + var abbrPieces = [], namePieces = [], narrowPieces = [], mixedPieces = [], i3, l4, eras2 = this.eras(); + for (i3 = 0, l4 = eras2.length; i3 < l4; ++i3) { + namePieces.push(regexEscape(eras2[i3].name)); + abbrPieces.push(regexEscape(eras2[i3].abbr)); + narrowPieces.push(regexEscape(eras2[i3].narrow)); + mixedPieces.push(regexEscape(eras2[i3].name)); + mixedPieces.push(regexEscape(eras2[i3].abbr)); + mixedPieces.push(regexEscape(eras2[i3].narrow)); + } + this._erasRegex = new RegExp("^(" + mixedPieces.join("|") + ")", "i"); + this._erasNameRegex = new RegExp("^(" + namePieces.join("|") + ")", "i"); + this._erasAbbrRegex = new RegExp("^(" + abbrPieces.join("|") + ")", "i"); + this._erasNarrowRegex = new RegExp("^(" + narrowPieces.join("|") + ")", "i"); + } + addFormatToken(0, ["gg", 2], 0, function() { + return this.weekYear() % 100; + }); + addFormatToken(0, ["GG", 2], 0, function() { + return this.isoWeekYear() % 100; + }); + function addWeekYearFormatToken(token2, getter) { + addFormatToken(0, [token2, token2.length], 0, getter); + } + addWeekYearFormatToken("gggg", "weekYear"); + addWeekYearFormatToken("ggggg", "weekYear"); + addWeekYearFormatToken("GGGG", "isoWeekYear"); + addWeekYearFormatToken("GGGGG", "isoWeekYear"); + addUnitAlias("weekYear", "gg"); + addUnitAlias("isoWeekYear", "GG"); + addUnitPriority("weekYear", 1); + addUnitPriority("isoWeekYear", 1); + addRegexToken("G", matchSigned); + addRegexToken("g", matchSigned); + addRegexToken("GG", match1to2, match2); + addRegexToken("gg", match1to2, match2); + addRegexToken("GGGG", match1to4, match4); + addRegexToken("gggg", match1to4, match4); + addRegexToken("GGGGG", match1to6, match6); + addRegexToken("ggggg", match1to6, match6); + addWeekParseToken(["gggg", "ggggg", "GGGG", "GGGGG"], function(input, week, config2, token2) { + week[token2.substr(0, 2)] = toInt(input); + }); + addWeekParseToken(["gg", "GG"], function(input, week, config2, token2) { + week[token2] = hooks.parseTwoDigitYear(input); + }); + function getSetWeekYear(input) { + return getSetWeekYearHelper.call(this, input, this.week(), this.weekday(), this.localeData()._week.dow, this.localeData()._week.doy); + } + function getSetISOWeekYear(input) { + return getSetWeekYearHelper.call(this, input, this.isoWeek(), this.isoWeekday(), 1, 4); + } + function getISOWeeksInYear() { + return weeksInYear(this.year(), 1, 4); + } + function getISOWeeksInISOWeekYear() { + return weeksInYear(this.isoWeekYear(), 1, 4); + } + function getWeeksInYear() { + var weekInfo = this.localeData()._week; + return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy); + } + function getWeeksInWeekYear() { + var weekInfo = this.localeData()._week; + return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy); + } + function getSetWeekYearHelper(input, week, weekday, dow, doy) { + var weeksTarget; + if (input == null) { + return weekOfYear2(this, dow, doy).year; + } else { + weeksTarget = weeksInYear(input, dow, doy); + if (week > weeksTarget) { + week = weeksTarget; } + return setWeekAll.call(this, input, week, weekday, dow, doy); + } + } + function setWeekAll(weekYear, week, weekday, dow, doy) { + var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy), date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear); + this.year(date.getUTCFullYear()); + this.month(date.getUTCMonth()); + this.date(date.getUTCDate()); + return this; + } + addFormatToken("Q", 0, "Qo", "quarter"); + addUnitAlias("quarter", "Q"); + addUnitPriority("quarter", 7); + addRegexToken("Q", match1); + addParseToken("Q", function(input, array) { + array[MONTH] = (toInt(input) - 1) * 3; + }); + function getSetQuarter(input) { + return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3); + } + addFormatToken("D", ["DD", 2], "Do", "date"); + addUnitAlias("date", "D"); + addUnitPriority("date", 9); + addRegexToken("D", match1to2); + addRegexToken("DD", match1to2, match2); + addRegexToken("Do", function(isStrict, locale2) { + return isStrict ? locale2._dayOfMonthOrdinalParse || locale2._ordinalParse : locale2._dayOfMonthOrdinalParseLenient; + }); + addParseToken(["D", "DD"], DATE); + addParseToken("Do", function(input, array) { + array[DATE] = toInt(input.match(match1to2)[0]); + }); + var getSetDayOfMonth = makeGetSet("Date", true); + addFormatToken("DDD", ["DDDD", 3], "DDDo", "dayOfYear"); + addUnitAlias("dayOfYear", "DDD"); + addUnitPriority("dayOfYear", 4); + addRegexToken("DDD", match1to3); + addRegexToken("DDDD", match3); + addParseToken(["DDD", "DDDD"], function(input, array, config2) { + config2._dayOfYear = toInt(input); + }); + function getSetDayOfYear(input) { + var dayOfYear = Math.round((this.clone().startOf("day") - this.clone().startOf("year")) / 864e5) + 1; + return input == null ? dayOfYear : this.add(input - dayOfYear, "d"); + } + addFormatToken("m", ["mm", 2], 0, "minute"); + addUnitAlias("minute", "m"); + addUnitPriority("minute", 14); + addRegexToken("m", match1to2); + addRegexToken("mm", match1to2, match2); + addParseToken(["m", "mm"], MINUTE2); + var getSetMinute = makeGetSet("Minutes", false); + addFormatToken("s", ["ss", 2], 0, "second"); + addUnitAlias("second", "s"); + addUnitPriority("second", 15); + addRegexToken("s", match1to2); + addRegexToken("ss", match1to2, match2); + addParseToken(["s", "ss"], SECOND2); + var getSetSecond = makeGetSet("Seconds", false); + addFormatToken("S", 0, 0, function() { + return ~~(this.millisecond() / 100); + }); + addFormatToken(0, ["SS", 2], 0, function() { + return ~~(this.millisecond() / 10); + }); + addFormatToken(0, ["SSS", 3], 0, "millisecond"); + addFormatToken(0, ["SSSS", 4], 0, function() { + return this.millisecond() * 10; + }); + addFormatToken(0, ["SSSSS", 5], 0, function() { + return this.millisecond() * 100; + }); + addFormatToken(0, ["SSSSSS", 6], 0, function() { + return this.millisecond() * 1e3; + }); + addFormatToken(0, ["SSSSSSS", 7], 0, function() { + return this.millisecond() * 1e4; + }); + addFormatToken(0, ["SSSSSSSS", 8], 0, function() { + return this.millisecond() * 1e5; + }); + addFormatToken(0, ["SSSSSSSSS", 9], 0, function() { + return this.millisecond() * 1e6; + }); + addUnitAlias("millisecond", "ms"); + addUnitPriority("millisecond", 16); + addRegexToken("S", match1to3, match1); + addRegexToken("SS", match1to3, match2); + addRegexToken("SSS", match1to3, match3); + var token, getSetMillisecond; + for (token = "SSSS"; token.length <= 9; token += "S") { + addRegexToken(token, matchUnsigned); + } + function parseMs(input, array) { + array[MILLISECOND] = toInt(("0." + input) * 1e3); + } + for (token = "S"; token.length <= 9; token += "S") { + addParseToken(token, parseMs); + } + getSetMillisecond = makeGetSet("Milliseconds", false); + addFormatToken("z", 0, 0, "zoneAbbr"); + addFormatToken("zz", 0, 0, "zoneName"); + function getZoneAbbr() { + return this._isUTC ? "UTC" : ""; + } + function getZoneName() { + return this._isUTC ? "Coordinated Universal Time" : ""; + } + var proto = Moment.prototype; + proto.add = add2; + proto.calendar = calendar$1; + proto.clone = clone4; + proto.diff = diff; + proto.endOf = endOf; + proto.format = format; + proto.from = from; + proto.fromNow = fromNow; + proto.to = to; + proto.toNow = toNow; + proto.get = stringGet; + proto.invalidAt = invalidAt; + proto.isAfter = isAfter; + proto.isBefore = isBefore; + proto.isBetween = isBetween; + proto.isSame = isSame; + proto.isSameOrAfter = isSameOrAfter; + proto.isSameOrBefore = isSameOrBefore; + proto.isValid = isValid$2; + proto.lang = lang; + proto.locale = locale; + proto.localeData = localeData; + proto.max = prototypeMax; + proto.min = prototypeMin; + proto.parsingFlags = parsingFlags; + proto.set = stringSet; + proto.startOf = startOf; + proto.subtract = subtract; + proto.toArray = toArray2; + proto.toObject = toObject; + proto.toDate = toDate; + proto.toISOString = toISOString; + proto.inspect = inspect; + if (typeof Symbol !== "undefined" && Symbol.for != null) { + proto[Symbol.for("nodejs.util.inspect.custom")] = function() { + return "Moment<" + this.format() + ">"; + }; + } + proto.toJSON = toJSON; + proto.toString = toString; + proto.unix = unix; + proto.valueOf = valueOf; + proto.creationData = creationData; + proto.eraName = getEraName; + proto.eraNarrow = getEraNarrow; + proto.eraAbbr = getEraAbbr; + proto.eraYear = getEraYear; + proto.year = getSetYear; + proto.isLeapYear = getIsLeapYear; + proto.weekYear = getSetWeekYear; + proto.isoWeekYear = getSetISOWeekYear; + proto.quarter = proto.quarters = getSetQuarter; + proto.month = getSetMonth; + proto.daysInMonth = getDaysInMonth; + proto.week = proto.weeks = getSetWeek; + proto.isoWeek = proto.isoWeeks = getSetISOWeek; + proto.weeksInYear = getWeeksInYear; + proto.weeksInWeekYear = getWeeksInWeekYear; + proto.isoWeeksInYear = getISOWeeksInYear; + proto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear; + proto.date = getSetDayOfMonth; + proto.day = proto.days = getSetDayOfWeek; + proto.weekday = getSetLocaleDayOfWeek; + proto.isoWeekday = getSetISODayOfWeek; + proto.dayOfYear = getSetDayOfYear; + proto.hour = proto.hours = getSetHour; + proto.minute = proto.minutes = getSetMinute; + proto.second = proto.seconds = getSetSecond; + proto.millisecond = proto.milliseconds = getSetMillisecond; + proto.utcOffset = getSetOffset; + proto.utc = setOffsetToUTC; + proto.local = setOffsetToLocal; + proto.parseZone = setOffsetToParsedOffset; + proto.hasAlignedHourOffset = hasAlignedHourOffset; + proto.isDST = isDaylightSavingTime; + proto.isLocal = isLocal; + proto.isUtcOffset = isUtcOffset; + proto.isUtc = isUtc; + proto.isUTC = isUtc; + proto.zoneAbbr = getZoneAbbr; + proto.zoneName = getZoneName; + proto.dates = deprecate("dates accessor is deprecated. Use date instead.", getSetDayOfMonth); + proto.months = deprecate("months accessor is deprecated. Use month instead", getSetMonth); + proto.years = deprecate("years accessor is deprecated. Use year instead", getSetYear); + proto.zone = deprecate("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/", getSetZone); + proto.isDSTShifted = deprecate("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information", isDaylightSavingTimeShifted); + function createUnix(input) { + return createLocal(input * 1e3); + } + function createInZone() { + return createLocal.apply(null, arguments).parseZone(); + } + function preParsePostFormat(string) { + return string; + } + var proto$1 = Locale2.prototype; + proto$1.calendar = calendar; + proto$1.longDateFormat = longDateFormat; + proto$1.invalidDate = invalidDate; + proto$1.ordinal = ordinal; + proto$1.preparse = preParsePostFormat; + proto$1.postformat = preParsePostFormat; + proto$1.relativeTime = relativeTime; + proto$1.pastFuture = pastFuture; + proto$1.set = set; + proto$1.eras = localeEras; + proto$1.erasParse = localeErasParse; + proto$1.erasConvertYear = localeErasConvertYear; + proto$1.erasAbbrRegex = erasAbbrRegex; + proto$1.erasNameRegex = erasNameRegex; + proto$1.erasNarrowRegex = erasNarrowRegex; + proto$1.months = localeMonths; + proto$1.monthsShort = localeMonthsShort; + proto$1.monthsParse = localeMonthsParse; + proto$1.monthsRegex = monthsRegex; + proto$1.monthsShortRegex = monthsShortRegex; + proto$1.week = localeWeek; + proto$1.firstDayOfYear = localeFirstDayOfYear; + proto$1.firstDayOfWeek = localeFirstDayOfWeek; + proto$1.weekdays = localeWeekdays; + proto$1.weekdaysMin = localeWeekdaysMin; + proto$1.weekdaysShort = localeWeekdaysShort; + proto$1.weekdaysParse = localeWeekdaysParse; + proto$1.weekdaysRegex = weekdaysRegex; + proto$1.weekdaysShortRegex = weekdaysShortRegex; + proto$1.weekdaysMinRegex = weekdaysMinRegex; + proto$1.isPM = localeIsPM; + proto$1.meridiem = localeMeridiem; + function get$1(format2, index, field, setter) { + var locale2 = getLocale(), utc = createUTC().set(setter, index); + return locale2[field](utc, format2); + } + function listMonthsImpl(format2, index, field) { + if (isNumber3(format2)) { + index = format2; + format2 = void 0; } - function copyLocator(f3, t3) { - t3.lineNumber = f3.lineNumber; - t3.columnNumber = f3.columnNumber; - return t3; + format2 = format2 || ""; + if (index != null) { + return get$1(format2, index, field, "month"); } - function parseElementStartPart(source, start, el, currentNSMap, entityReplacer, errorHandler) { - var attrName; - var value; - var p3 = ++start; - var s4 = S_TAG; - while (true) { - var c3 = source.charAt(p3); - switch (c3) { - case "=": - if (s4 === S_ATTR) { - attrName = source.slice(start, p3); - s4 = S_EQ; - } else if (s4 === S_ATTR_SPACE) { - s4 = S_EQ; - } else { - throw new Error("attribute equal must after attrName"); - } - break; - case "'": - case '"': - if (s4 === S_EQ || s4 === S_ATTR) { - if (s4 === S_ATTR) { - errorHandler.warning('attribute value must after "="'); - attrName = source.slice(start, p3); - } - start = p3 + 1; - p3 = source.indexOf(c3, start); - if (p3 > 0) { - value = source.slice(start, p3).replace(/&#?\w+;/g, entityReplacer); - el.add(attrName, value, start - 1); - s4 = S_ATTR_END; - } else { - throw new Error("attribute value no end '" + c3 + "' match"); - } - } else if (s4 == S_ATTR_NOQUOT_VALUE) { - value = source.slice(start, p3).replace(/&#?\w+;/g, entityReplacer); - el.add(attrName, value, start); - errorHandler.warning('attribute "' + attrName + '" missed start quot(' + c3 + ")!!"); - start = p3 + 1; - s4 = S_ATTR_END; - } else { - throw new Error('attribute value must after "="'); - } - break; - case "/": - switch (s4) { - case S_TAG: - el.setTagName(source.slice(start, p3)); - case S_ATTR_END: - case S_TAG_SPACE: - case S_TAG_CLOSE: - s4 = S_TAG_CLOSE; - el.closed = true; - case S_ATTR_NOQUOT_VALUE: - case S_ATTR: - case S_ATTR_SPACE: - break; - default: - throw new Error("attribute invalid close char('/')"); - } - break; - case "": - errorHandler.error("unexpected end of input"); - if (s4 == S_TAG) { - el.setTagName(source.slice(start, p3)); - } - return p3; - case ">": - switch (s4) { - case S_TAG: - el.setTagName(source.slice(start, p3)); - case S_ATTR_END: - case S_TAG_SPACE: - case S_TAG_CLOSE: - break; - case S_ATTR_NOQUOT_VALUE: - case S_ATTR: - value = source.slice(start, p3); - if (value.slice(-1) === "/") { - el.closed = true; - value = value.slice(0, -1); - } - case S_ATTR_SPACE: - if (s4 === S_ATTR_SPACE) { - value = attrName; - } - if (s4 == S_ATTR_NOQUOT_VALUE) { - errorHandler.warning('attribute "' + value + '" missed quot(")!!'); - el.add(attrName, value.replace(/&#?\w+;/g, entityReplacer), start); - } else { - if (currentNSMap[""] !== "http://www.w3.org/1999/xhtml" || !value.match(/^(?:disabled|checked|selected)$/i)) { - errorHandler.warning('attribute "' + value + '" missed value!! "' + value + '" instead!!'); - } - el.add(value, value, start); - } - break; - case S_EQ: - throw new Error("attribute value missed!!"); - } - return p3; - case "\x80": - c3 = " "; - default: - if (c3 <= " ") { - switch (s4) { - case S_TAG: - el.setTagName(source.slice(start, p3)); - s4 = S_TAG_SPACE; - break; - case S_ATTR: - attrName = source.slice(start, p3); - s4 = S_ATTR_SPACE; - break; - case S_ATTR_NOQUOT_VALUE: - var value = source.slice(start, p3).replace(/&#?\w+;/g, entityReplacer); - errorHandler.warning('attribute "' + value + '" missed quot(")!!'); - el.add(attrName, value, start); - case S_ATTR_END: - s4 = S_TAG_SPACE; - break; - } - } else { - switch (s4) { - case S_ATTR_SPACE: - var tagName = el.tagName; - if (currentNSMap[""] !== "http://www.w3.org/1999/xhtml" || !attrName.match(/^(?:disabled|checked|selected)$/i)) { - errorHandler.warning('attribute "' + attrName + '" missed value!! "' + attrName + '" instead2!!'); - } - el.add(attrName, attrName, start); - start = p3; - s4 = S_ATTR; - break; - case S_ATTR_END: - errorHandler.warning('attribute space is required"' + attrName + '"!!'); - case S_TAG_SPACE: - s4 = S_ATTR; - start = p3; - break; - case S_EQ: - s4 = S_ATTR_NOQUOT_VALUE; - start = p3; - break; - case S_TAG_CLOSE: - throw new Error("elements closed character '/' and '>' must be connected to"); - } - } - } - p3++; - } + var i3, out = []; + for (i3 = 0; i3 < 12; i3++) { + out[i3] = get$1(format2, i3, field, "month"); } - function appendElement(el, domBuilder, currentNSMap) { - var tagName = el.tagName; - var localNSMap = null; - var i3 = el.length; - while (i3--) { - var a3 = el[i3]; - var qName = a3.qName; - var value = a3.value; - var nsp = qName.indexOf(":"); - if (nsp > 0) { - var prefix = a3.prefix = qName.slice(0, nsp); - var localName = qName.slice(nsp + 1); - var nsPrefix = prefix === "xmlns" && localName; - } else { - localName = qName; - prefix = null; - nsPrefix = qName === "xmlns" && ""; - } - a3.localName = localName; - if (nsPrefix !== false) { - if (localNSMap == null) { - localNSMap = {}; - _copy(currentNSMap, currentNSMap = {}); - } - currentNSMap[nsPrefix] = localNSMap[nsPrefix] = value; - a3.uri = "http://www.w3.org/2000/xmlns/"; - domBuilder.startPrefixMapping(nsPrefix, value); - } - } - var i3 = el.length; - while (i3--) { - a3 = el[i3]; - var prefix = a3.prefix; - if (prefix) { - if (prefix === "xml") { - a3.uri = "http://www.w3.org/XML/1998/namespace"; - } - if (prefix !== "xmlns") { - a3.uri = currentNSMap[prefix || ""]; - } - } - } - var nsp = tagName.indexOf(":"); - if (nsp > 0) { - prefix = el.prefix = tagName.slice(0, nsp); - localName = el.localName = tagName.slice(nsp + 1); - } else { - prefix = null; - localName = el.localName = tagName; + return out; + } + function listWeekdaysImpl(localeSorted, format2, index, field) { + if (typeof localeSorted === "boolean") { + if (isNumber3(format2)) { + index = format2; + format2 = void 0; } - var ns2 = el.uri = currentNSMap[prefix || ""]; - domBuilder.startElement(ns2, localName, tagName, el); - if (el.closed) { - domBuilder.endElement(ns2, localName, tagName); - if (localNSMap) { - for (prefix in localNSMap) { - domBuilder.endPrefixMapping(prefix); - } - } - } else { - el.currentNSMap = currentNSMap; - el.localNSMap = localNSMap; - return true; + format2 = format2 || ""; + } else { + format2 = localeSorted; + index = format2; + localeSorted = false; + if (isNumber3(format2)) { + index = format2; + format2 = void 0; } + format2 = format2 || ""; } - function parseHtmlSpecialContent(source, elStartEnd, tagName, entityReplacer, domBuilder) { - if (/^(?:script|textarea)$/i.test(tagName)) { - var elEndStart = source.indexOf("", elStartEnd); - var text = source.substring(elStartEnd + 1, elEndStart); - if (/[&<]/.test(text)) { - if (/^script$/i.test(tagName)) { - domBuilder.characters(text, 0, text.length); - return elEndStart; - } - text = text.replace(/&#?\w+;/g, entityReplacer); - domBuilder.characters(text, 0, text.length); - return elEndStart; - } - } - return elStartEnd + 1; + var locale2 = getLocale(), shift = localeSorted ? locale2._week.dow : 0, i3, out = []; + if (index != null) { + return get$1(format2, (index + shift) % 7, field, "day"); } - function fixSelfClosed(source, elStartEnd, tagName, closeMap) { - var pos = closeMap[tagName]; - if (pos == null) { - pos = source.lastIndexOf(""); - if (pos < elStartEnd) { - pos = source.lastIndexOf("= 0 && days2 >= 0 && months3 >= 0 || milliseconds2 <= 0 && days2 <= 0 && months3 <= 0)) { + milliseconds2 += absCeil(monthsToDays(months3) + days2) * 864e5; + days2 = 0; + months3 = 0; + } + data.milliseconds = milliseconds2 % 1e3; + seconds2 = absFloor(milliseconds2 / 1e3); + data.seconds = seconds2 % 60; + minutes2 = absFloor(seconds2 / 60); + data.minutes = minutes2 % 60; + hours2 = absFloor(minutes2 / 60); + data.hours = hours2 % 24; + days2 += absFloor(hours2 / 24); + monthsFromDays = absFloor(daysToMonths(days2)); + months3 += monthsFromDays; + days2 -= absCeil(monthsToDays(monthsFromDays)); + years2 = absFloor(months3 / 12); + months3 %= 12; + data.days = days2; + data.months = months3; + data.years = years2; + return this; + } + function daysToMonths(days2) { + return days2 * 4800 / 146097; + } + function monthsToDays(months3) { + return months3 * 146097 / 4800; + } + function as(units) { + if (!this.isValid()) { + return NaN; + } + var days2, months3, milliseconds2 = this._milliseconds; + units = normalizeUnits(units); + if (units === "month" || units === "quarter" || units === "year") { + days2 = this._days + milliseconds2 / 864e5; + months3 = this._months + daysToMonths(days2); + switch (units) { + case "month": + return months3; + case "quarter": + return months3 / 3; + case "year": + return months3 / 12; } - } - function parseDCC(source, start, domBuilder, errorHandler) { - var next = source.charAt(start + 2); - switch (next) { - case "-": - if (source.charAt(start + 3) === "-") { - var end = source.indexOf("-->", start + 4); - if (end > start) { - domBuilder.comment(source, start + 4, end - start - 4); - return end + 3; - } else { - errorHandler.error("Unclosed comment"); - return -1; - } - } else { - return -1; - } + } else { + days2 = this._days + Math.round(monthsToDays(this._months)); + switch (units) { + case "week": + return days2 / 7 + milliseconds2 / 6048e5; + case "day": + return days2 + milliseconds2 / 864e5; + case "hour": + return days2 * 24 + milliseconds2 / 36e5; + case "minute": + return days2 * 1440 + milliseconds2 / 6e4; + case "second": + return days2 * 86400 + milliseconds2 / 1e3; + case "millisecond": + return Math.floor(days2 * 864e5) + milliseconds2; default: - if (source.substr(start + 3, 6) == "CDATA[") { - var end = source.indexOf("]]>", start + 9); - domBuilder.startCDATA(); - domBuilder.characters(source, start + 9, end - start - 9); - domBuilder.endCDATA(); - return end + 3; - } - var matchs = split(source, start); - var len = matchs.length; - if (len > 1 && /!doctype/i.test(matchs[0][0])) { - var name = matchs[1][0]; - var pubid = len > 3 && /^public$/i.test(matchs[2][0]) && matchs[3][0]; - var sysid = len > 4 && matchs[4][0]; - var lastMatch = matchs[len - 1]; - domBuilder.startDTD(name, pubid && pubid.replace(/^(['"])(.*?)\1$/, "$2"), sysid && sysid.replace(/^(['"])(.*?)\1$/, "$2")); - domBuilder.endDTD(); - return lastMatch.index + lastMatch[0].length; - } - } - return -1; - } - function parseInstruction(source, start, domBuilder) { - var end = source.indexOf("?>", start); - if (end) { - var match2 = source.substring(start, end).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/); - if (match2) { - var len = match2[0].length; - domBuilder.processingInstruction(match2[1], match2[2]); - return end + 2; - } else { - return -1; - } + throw new Error("Unknown unit " + units); } - return -1; } - function ElementAttributes(source) { + } + function valueOf$1() { + if (!this.isValid()) { + return NaN; } - ElementAttributes.prototype = { - setTagName: function(tagName) { - if (!tagNamePattern.test(tagName)) { - throw new Error("invalid tagName:" + tagName); - } - this.tagName = tagName; - }, - add: function(qName, value, offset2) { - if (!tagNamePattern.test(qName)) { - throw new Error("invalid attribute:" + qName); - } - this[this.length++] = { qName, value, offset: offset2 }; - }, - length: 0, - getLocalName: function(i3) { - return this[i3].localName; - }, - getLocator: function(i3) { - return this[i3].locator; - }, - getQName: function(i3) { - return this[i3].qName; - }, - getURI: function(i3) { - return this[i3].uri; - }, - getValue: function(i3) { - return this[i3].value; - } + return this._milliseconds + this._days * 864e5 + this._months % 12 * 2592e6 + toInt(this._months / 12) * 31536e6; + } + function makeAs(alias) { + return function() { + return this.as(alias); }; - function _set_proto_(thiz, parent) { - thiz.__proto__ = parent; - return thiz; + } + var asMilliseconds = makeAs("ms"), asSeconds = makeAs("s"), asMinutes = makeAs("m"), asHours = makeAs("h"), asDays = makeAs("d"), asWeeks = makeAs("w"), asMonths = makeAs("M"), asQuarters = makeAs("Q"), asYears = makeAs("y"); + function clone$1() { + return createDuration2(this); + } + function get$2(units) { + units = normalizeUnits(units); + return this.isValid() ? this[units + "s"]() : NaN; + } + function makeGetter(name) { + return function() { + return this.isValid() ? this._data[name] : NaN; + }; + } + var milliseconds = makeGetter("milliseconds"), seconds = makeGetter("seconds"), minutes = makeGetter("minutes"), hours = makeGetter("hours"), days = makeGetter("days"), months2 = makeGetter("months"), years = makeGetter("years"); + function weeks() { + return absFloor(this.days() / 7); + } + var round = Math.round, thresholds = { + ss: 44, + s: 45, + m: 45, + h: 22, + d: 26, + w: null, + M: 11 + }; + function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale2) { + return locale2.relativeTime(number || 1, !!withoutSuffix, string, isFuture); + } + function relativeTime$1(posNegDuration, withoutSuffix, thresholds2, locale2) { + var duration = createDuration2(posNegDuration).abs(), seconds2 = round(duration.as("s")), minutes2 = round(duration.as("m")), hours2 = round(duration.as("h")), days2 = round(duration.as("d")), months3 = round(duration.as("M")), weeks2 = round(duration.as("w")), years2 = round(duration.as("y")), a3 = seconds2 <= thresholds2.ss && ["s", seconds2] || seconds2 < thresholds2.s && ["ss", seconds2] || minutes2 <= 1 && ["m"] || minutes2 < thresholds2.m && ["mm", minutes2] || hours2 <= 1 && ["h"] || hours2 < thresholds2.h && ["hh", hours2] || days2 <= 1 && ["d"] || days2 < thresholds2.d && ["dd", days2]; + if (thresholds2.w != null) { + a3 = a3 || weeks2 <= 1 && ["w"] || weeks2 < thresholds2.w && ["ww", weeks2]; } - if (!(_set_proto_({}, _set_proto_.prototype) instanceof _set_proto_)) { - _set_proto_ = function(thiz, parent) { - function p3() { - } - ; - p3.prototype = parent; - p3 = new p3(); - for (parent in thiz) { - p3[parent] = thiz[parent]; - } - return p3; - }; + a3 = a3 || months3 <= 1 && ["M"] || months3 < thresholds2.M && ["MM", months3] || years2 <= 1 && ["y"] || ["yy", years2]; + a3[2] = withoutSuffix; + a3[3] = +posNegDuration > 0; + a3[4] = locale2; + return substituteTimeAgo.apply(null, a3); + } + function getSetRelativeTimeRounding(roundingFunction) { + if (roundingFunction === void 0) { + return round; } - function split(source, start) { - var match2; - var buf = []; - var reg = /'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g; - reg.lastIndex = start; - reg.exec(source); - while (match2 = reg.exec(source)) { - buf.push(match2); - if (match2[1]) - return buf; - } + if (typeof roundingFunction === "function") { + round = roundingFunction; + return true; } - exports3.XMLReader = XMLReader; - }, {}], 33: [function(require2, module4, exports3) { - module4.exports = { - "name": "dav", - "version": "1.8.0", - "author": "Gareth Aye [:gaye] ", - "description": "WebDAV, CalDAV, and CardDAV client for nodejs and the browser", - "license": "MPL-2.0", - "main": "./dav.js", - "repository": "https://github.com/gaye/dav", - "keywords": [ - "address book", - "calendar", - "contacts", - "dav", - "caldav", - "carddav", - "webdav", - "ical", - "vcard", - "sync", - "rfc 4791", - "rfc 6352", - "rfc 6578" - ], - "dependencies": { - "co": "^4.6.0", - "xmldom": "^0.1.19", - "xmlhttprequest": "^1.7.0" - }, - "devDependencies": { - "babel": "^5.8.23", - "browserify": "^11.0.1", - "chai": "^3.2.0", - "doctoc": "^0.15.0", - "mocha": "^2.3.2", - "nock": "^2.10.0", - "sinon": "^1.16.1", - "tcp-port-used": "^0.1.2", - "uglify-js": "^2.4.24" - }, - "scripts": { - "test": "make test" - } - }; - }, {}] }, {}, [8])(8); - }); - } -}); - -// node_modules/co/index.js -var require_co = __commonJS({ - "node_modules/co/index.js"(exports, module2) { - var slice = Array.prototype.slice; - module2.exports = co2["default"] = co2.co = co2; - co2.wrap = function(fn) { - createPromise.__generatorFunction__ = fn; - return createPromise; - function createPromise() { - return co2.call(this, fn.apply(this, arguments)); + return false; } - }; - function co2(gen) { - var ctx = this; - var args = slice.call(arguments, 1); - return new Promise(function(resolve, reject) { - if (typeof gen === "function") - gen = gen.apply(ctx, args); - if (!gen || typeof gen.next !== "function") - return resolve(gen); - onFulfilled(); - function onFulfilled(res) { - var ret; - try { - ret = gen.next(res); - } catch (e3) { - return reject(e3); - } - next(ret); + function getSetRelativeTimeThreshold(threshold, limit) { + if (thresholds[threshold] === void 0) { + return false; } - function onRejected(err) { - var ret; - try { - ret = gen.throw(err); - } catch (e3) { - return reject(e3); + if (limit === void 0) { + return thresholds[threshold]; + } + thresholds[threshold] = limit; + if (threshold === "s") { + thresholds.ss = limit - 1; + } + return true; + } + function humanize(argWithSuffix, argThresholds) { + if (!this.isValid()) { + return this.localeData().invalidDate(); + } + var withSuffix = false, th = thresholds, locale2, output; + if (typeof argWithSuffix === "object") { + argThresholds = argWithSuffix; + argWithSuffix = false; + } + if (typeof argWithSuffix === "boolean") { + withSuffix = argWithSuffix; + } + if (typeof argThresholds === "object") { + th = Object.assign({}, thresholds, argThresholds); + if (argThresholds.s != null && argThresholds.ss == null) { + th.ss = argThresholds.s - 1; } - next(ret); } - function next(ret) { - if (ret.done) - return resolve(ret.value); - var value = toPromise.call(ctx, ret.value); - if (value && isPromise(value)) - return value.then(onFulfilled, onRejected); - return onRejected(new TypeError('You may only yield a function, promise, generator, array, or object, but the following object was passed: "' + String(ret.value) + '"')); + locale2 = this.localeData(); + output = relativeTime$1(this, !withSuffix, th, locale2); + if (withSuffix) { + output = locale2.pastFuture(+this, output); } - }); - } - function toPromise(obj) { - if (!obj) - return obj; - if (isPromise(obj)) - return obj; - if (isGeneratorFunction(obj) || isGenerator(obj)) - return co2.call(this, obj); - if (typeof obj == "function") - return thunkToPromise.call(this, obj); - if (Array.isArray(obj)) - return arrayToPromise.call(this, obj); - if (isObject(obj)) - return objectToPromise.call(this, obj); - return obj; - } - function thunkToPromise(fn) { - var ctx = this; - return new Promise(function(resolve, reject) { - fn.call(ctx, function(err, res) { - if (err) - return reject(err); - if (arguments.length > 2) - res = slice.call(arguments, 1); - resolve(res); - }); - }); - } - function arrayToPromise(obj) { - return Promise.all(obj.map(toPromise, this)); - } - function objectToPromise(obj) { - var results = new obj.constructor(); - var keys = Object.keys(obj); - var promises = []; - for (var i3 = 0; i3 < keys.length; i3++) { - var key = keys[i3]; - var promise = toPromise.call(this, obj[key]); - if (promise && isPromise(promise)) - defer(promise, key); - else - results[key] = obj[key]; + return locale2.postformat(output); } - return Promise.all(promises).then(function() { - return results; - }); - function defer(promise2, key2) { - results[key2] = void 0; - promises.push(promise2.then(function(res) { - results[key2] = res; - })); + var abs$1 = Math.abs; + function sign(x3) { + return (x3 > 0) - (x3 < 0) || +x3; } - } - function isPromise(obj) { - return typeof obj.then == "function"; - } - function isGenerator(obj) { - return typeof obj.next == "function" && typeof obj.throw == "function"; - } - function isGeneratorFunction(obj) { - var constructor = obj.constructor; - if (!constructor) - return false; - if (constructor.name === "GeneratorFunction" || constructor.displayName === "GeneratorFunction") - return true; - return isGenerator(constructor.prototype); - } - function isObject(val) { - return Object == val.constructor; - } + function toISOString$1() { + if (!this.isValid()) { + return this.localeData().invalidDate(); + } + var seconds2 = abs$1(this._milliseconds) / 1e3, days2 = abs$1(this._days), months3 = abs$1(this._months), minutes2, hours2, years2, s4, total = this.asSeconds(), totalSign, ymSign, daysSign, hmsSign; + if (!total) { + return "P0D"; + } + minutes2 = absFloor(seconds2 / 60); + hours2 = absFloor(minutes2 / 60); + seconds2 %= 60; + minutes2 %= 60; + years2 = absFloor(months3 / 12); + months3 %= 12; + s4 = seconds2 ? seconds2.toFixed(3).replace(/\.?0+$/, "") : ""; + totalSign = total < 0 ? "-" : ""; + ymSign = sign(this._months) !== sign(total) ? "-" : ""; + daysSign = sign(this._days) !== sign(total) ? "-" : ""; + hmsSign = sign(this._milliseconds) !== sign(total) ? "-" : ""; + return totalSign + "P" + (years2 ? ymSign + years2 + "Y" : "") + (months3 ? ymSign + months3 + "M" : "") + (days2 ? daysSign + days2 + "D" : "") + (hours2 || minutes2 || seconds2 ? "T" : "") + (hours2 ? hmsSign + hours2 + "H" : "") + (minutes2 ? hmsSign + minutes2 + "M" : "") + (seconds2 ? hmsSign + s4 + "S" : ""); + } + var proto$2 = Duration2.prototype; + proto$2.isValid = isValid$1; + proto$2.abs = abs; + proto$2.add = add$1; + proto$2.subtract = subtract$1; + proto$2.as = as; + proto$2.asMilliseconds = asMilliseconds; + proto$2.asSeconds = asSeconds; + proto$2.asMinutes = asMinutes; + proto$2.asHours = asHours; + proto$2.asDays = asDays; + proto$2.asWeeks = asWeeks; + proto$2.asMonths = asMonths; + proto$2.asQuarters = asQuarters; + proto$2.asYears = asYears; + proto$2.valueOf = valueOf$1; + proto$2._bubble = bubble; + proto$2.clone = clone$1; + proto$2.get = get$2; + proto$2.milliseconds = milliseconds; + proto$2.seconds = seconds; + proto$2.minutes = minutes; + proto$2.hours = hours; + proto$2.days = days; + proto$2.weeks = weeks; + proto$2.months = months2; + proto$2.years = years; + proto$2.humanize = humanize; + proto$2.toISOString = toISOString$1; + proto$2.toString = toISOString$1; + proto$2.toJSON = toISOString$1; + proto$2.locale = locale; + proto$2.localeData = localeData; + proto$2.toIsoString = deprecate("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)", toISOString$1); + proto$2.lang = lang; + addFormatToken("X", 0, 0, "unix"); + addFormatToken("x", 0, 0, "valueOf"); + addRegexToken("x", matchSigned); + addRegexToken("X", matchTimestamp); + addParseToken("X", function(input, array, config2) { + config2._d = new Date(parseFloat(input) * 1e3); + }); + addParseToken("x", function(input, array, config2) { + config2._d = new Date(toInt(input)); + }); + hooks.version = "2.29.4"; + setHookCallback(createLocal); + hooks.fn = proto; + hooks.min = min; + hooks.max = max; + hooks.now = now2; + hooks.utc = createUTC; + hooks.unix = createUnix; + hooks.months = listMonths; + hooks.isDate = isDate3; + hooks.locale = getSetGlobalLocale; + hooks.invalid = createInvalid; + hooks.duration = createDuration2; + hooks.isMoment = isMoment; + hooks.weekdays = listWeekdays; + hooks.parseZone = createInZone; + hooks.localeData = getLocale; + hooks.isDuration = isDuration; + hooks.monthsShort = listMonthsShort; + hooks.weekdaysMin = listWeekdaysMin; + hooks.defineLocale = defineLocale; + hooks.updateLocale = updateLocale; + hooks.locales = listLocales; + hooks.weekdaysShort = listWeekdaysShort; + hooks.normalizeUnits = normalizeUnits; + hooks.relativeTimeRounding = getSetRelativeTimeRounding; + hooks.relativeTimeThreshold = getSetRelativeTimeThreshold; + hooks.calendarFormat = getCalendarFormat; + hooks.prototype = proto; + hooks.HTML5_FMT = { + DATETIME_LOCAL: "YYYY-MM-DDTHH:mm", + DATETIME_LOCAL_SECONDS: "YYYY-MM-DDTHH:mm:ss", + DATETIME_LOCAL_MS: "YYYY-MM-DDTHH:mm:ss.SSS", + DATE: "YYYY-MM-DD", + TIME: "HH:mm", + TIME_SECONDS: "HH:mm:ss", + TIME_MS: "HH:mm:ss.SSS", + WEEK: "GGGG-[W]WW", + MONTH: "YYYY-MM" + }; + return hooks; + }); } }); @@ -37562,10 +41357,10 @@ var require_co = __commonJS({ __export(exports, { default: () => FullCalendarPlugin }); -var import_obsidian12 = __toModule(require("obsidian")); +var import_obsidian13 = __toModule(require("obsidian")); // src/ui/view.ts -var import_obsidian11 = __toModule(require("obsidian")); +var import_obsidian7 = __toModule(require("obsidian")); // node_modules/tslib/modules/index.js var import_tslib = __toModule(require_tslib()); @@ -37602,51 +41397,52 @@ var l; var u; var i; var t; -var o; var r; -var f = {}; -var e = []; -var c = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i; -function s(n3, l4) { +var o; +var f; +var e = {}; +var c = []; +var s = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i; +function a(n3, l4) { for (var u3 in l4) n3[u3] = l4[u3]; return n3; } -function a(n3) { +function h(n3) { var l4 = n3.parentNode; l4 && l4.removeChild(n3); } -function h(l4, u3, i3) { - var t3, o2, r3, f3 = {}; - for (r3 in u3) - r3 == "key" ? t3 = u3[r3] : r3 == "ref" ? o2 = u3[r3] : f3[r3] = u3[r3]; +function v(l4, u3, i3) { + var t3, r3, o2, f3 = {}; + for (o2 in u3) + o2 == "key" ? t3 = u3[o2] : o2 == "ref" ? r3 = u3[o2] : f3[o2] = u3[o2]; if (arguments.length > 2 && (f3.children = arguments.length > 3 ? n.call(arguments, 2) : i3), typeof l4 == "function" && l4.defaultProps != null) - for (r3 in l4.defaultProps) - f3[r3] === void 0 && (f3[r3] = l4.defaultProps[r3]); - return v(l4, f3, t3, o2, null); + for (o2 in l4.defaultProps) + f3[o2] === void 0 && (f3[o2] = l4.defaultProps[o2]); + return y(l4, f3, t3, r3, null); } -function v(n3, i3, t3, o2, r3) { - var f3 = { type: n3, props: i3, key: t3, ref: o2, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, __h: null, constructor: void 0, __v: r3 == null ? ++u : r3 }; - return r3 == null && l.vnode != null && l.vnode(f3), f3; +function y(n3, i3, t3, r3, o2) { + var f3 = { type: n3, props: i3, key: t3, ref: r3, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, __h: null, constructor: void 0, __v: o2 == null ? ++u : o2 }; + return o2 == null && l.vnode != null && l.vnode(f3), f3; } -function y() { +function p() { return { current: null }; } -function p(n3) { +function d(n3) { return n3.children; } -function d(n3, l4) { +function _(n3, l4) { this.props = n3, this.context = l4; } -function _(n3, l4) { +function k(n3, l4) { if (l4 == null) - return n3.__ ? _(n3.__, n3.__.__k.indexOf(n3) + 1) : null; + return n3.__ ? k(n3.__, n3.__.__k.indexOf(n3) + 1) : null; for (var u3; l4 < n3.__k.length; l4++) if ((u3 = n3.__k[l4]) != null && u3.__e != null) return u3.__e; - return typeof n3.type == "function" ? _(n3) : null; + return typeof n3.type == "function" ? k(n3) : null; } -function k(n3) { +function b(n3) { var l4, u3; if ((n3 = n3.__) != null && n3.__c != null) { for (n3.__e = n3.__c.base = null, l4 = 0; l4 < n3.__k.length; l4++) @@ -37654,81 +41450,93 @@ function k(n3) { n3.__e = n3.__c.base = u3.__e; break; } - return k(n3); + return b(n3); } } -function b(n3) { - (!n3.__d && (n3.__d = true) && t.push(n3) && !g.__r++ || o !== l.debounceRendering) && ((o = l.debounceRendering) || setTimeout)(g); -} -function g() { - for (var n3; g.__r = t.length; ) - n3 = t.sort(function(n4, l4) { - return n4.__v.__b - l4.__v.__b; - }), t = [], n3.some(function(n4) { - var l4, u3, i3, t3, o2, r3; - n4.__d && (o2 = (t3 = (l4 = n4).__v).__e, (r3 = l4.__P) && (u3 = [], (i3 = s({}, t3)).__v = t3.__v + 1, j(r3, t3, i3, l4.__n, r3.ownerSVGElement !== void 0, t3.__h != null ? [o2] : null, u3, o2 == null ? _(t3) : o2, t3.__h), z(u3, t3), t3.__e != o2 && k(t3))); - }); +function g(n3) { + (!n3.__d && (n3.__d = true) && t.push(n3) && !m.__r++ || r !== l.debounceRendering) && ((r = l.debounceRendering) || o)(m); +} +function m() { + var n3, l4, u3, i3, r3, o2, f3, e3; + for (t.sort(function(n4, l5) { + return n4.__v.__b - l5.__v.__b; + }); n3 = t.shift(); ) + n3.__d && (l4 = t.length, i3 = void 0, r3 = void 0, f3 = (o2 = (u3 = n3).__v).__e, (e3 = u3.__P) && (i3 = [], (r3 = a({}, o2)).__v = o2.__v + 1, z(e3, o2, r3, u3.__n, e3.ownerSVGElement !== void 0, o2.__h != null ? [f3] : null, i3, f3 == null ? k(o2) : f3, o2.__h), L(i3, o2), o2.__e != f3 && b(o2)), t.length > l4 && t.sort(function(n4, l5) { + return n4.__v.__b - l5.__v.__b; + })); + m.__r = 0; } -function w(n3, l4, u3, i3, t3, o2, r3, c3, s4, a3) { - var h3, y3, d2, k3, b3, g4, w4, x4 = i3 && i3.__k || e, C3 = x4.length; +function w(n3, l4, u3, i3, t3, r3, o2, f3, s4, a3) { + var h3, v3, p3, _3, b3, g4, m3, w4 = i3 && i3.__k || c, A3 = w4.length; for (u3.__k = [], h3 = 0; h3 < l4.length; h3++) - if ((k3 = u3.__k[h3] = (k3 = l4[h3]) == null || typeof k3 == "boolean" ? null : typeof k3 == "string" || typeof k3 == "number" || typeof k3 == "bigint" ? v(null, k3, null, null, k3) : Array.isArray(k3) ? v(p, { children: k3 }, null, null, null) : k3.__b > 0 ? v(k3.type, k3.props, k3.key, k3.ref ? k3.ref : null, k3.__v) : k3) != null) { - if (k3.__ = u3, k3.__b = u3.__b + 1, (d2 = x4[h3]) === null || d2 && k3.key == d2.key && k3.type === d2.type) - x4[h3] = void 0; + if ((_3 = u3.__k[h3] = (_3 = l4[h3]) == null || typeof _3 == "boolean" ? null : typeof _3 == "string" || typeof _3 == "number" || typeof _3 == "bigint" ? y(null, _3, null, null, _3) : Array.isArray(_3) ? y(d, { children: _3 }, null, null, null) : _3.__b > 0 ? y(_3.type, _3.props, _3.key, _3.ref ? _3.ref : null, _3.__v) : _3) != null) { + if (_3.__ = u3, _3.__b = u3.__b + 1, (p3 = w4[h3]) === null || p3 && _3.key == p3.key && _3.type === p3.type) + w4[h3] = void 0; else - for (y3 = 0; y3 < C3; y3++) { - if ((d2 = x4[y3]) && k3.key == d2.key && k3.type === d2.type) { - x4[y3] = void 0; + for (v3 = 0; v3 < A3; v3++) { + if ((p3 = w4[v3]) && _3.key == p3.key && _3.type === p3.type) { + w4[v3] = void 0; break; } - d2 = null; + p3 = null; } - j(n3, k3, d2 = d2 || f, t3, o2, r3, c3, s4, a3), b3 = k3.__e, (y3 = k3.ref) && d2.ref != y3 && (w4 || (w4 = []), d2.ref && w4.push(d2.ref, null, k3), w4.push(y3, k3.__c || b3, k3)), b3 != null ? (g4 == null && (g4 = b3), typeof k3.type == "function" && k3.__k === d2.__k ? k3.__d = s4 = m(k3, s4, n3) : s4 = A(n3, k3, d2, x4, b3, s4), typeof u3.type == "function" && (u3.__d = s4)) : s4 && d2.__e == s4 && s4.parentNode != n3 && (s4 = _(d2)); + z(n3, _3, p3 = p3 || e, t3, r3, o2, f3, s4, a3), b3 = _3.__e, (v3 = _3.ref) && p3.ref != v3 && (m3 || (m3 = []), p3.ref && m3.push(p3.ref, null, _3), m3.push(v3, _3.__c || b3, _3)), b3 != null ? (g4 == null && (g4 = b3), typeof _3.type == "function" && _3.__k === p3.__k ? _3.__d = s4 = x(_3, s4, n3) : s4 = P(n3, _3, p3, w4, b3, s4), typeof u3.type == "function" && (u3.__d = s4)) : s4 && p3.__e == s4 && s4.parentNode != n3 && (s4 = k(p3)); } - for (u3.__e = g4, h3 = C3; h3--; ) - x4[h3] != null && N(x4[h3], x4[h3]); - if (w4) - for (h3 = 0; h3 < w4.length; h3++) - M(w4[h3], w4[++h3], w4[++h3]); + for (u3.__e = g4, h3 = A3; h3--; ) + w4[h3] != null && (typeof u3.type == "function" && w4[h3].__e != null && w4[h3].__e == u3.__d && (u3.__d = C(i3).nextSibling), O(w4[h3], w4[h3])); + if (m3) + for (h3 = 0; h3 < m3.length; h3++) + N(m3[h3], m3[++h3], m3[++h3]); } -function m(n3, l4, u3) { - for (var i3, t3 = n3.__k, o2 = 0; t3 && o2 < t3.length; o2++) - (i3 = t3[o2]) && (i3.__ = n3, l4 = typeof i3.type == "function" ? m(i3, l4, u3) : A(u3, i3, i3, t3, i3.__e, l4)); +function x(n3, l4, u3) { + for (var i3, t3 = n3.__k, r3 = 0; t3 && r3 < t3.length; r3++) + (i3 = t3[r3]) && (i3.__ = n3, l4 = typeof i3.type == "function" ? x(i3, l4, u3) : P(u3, i3, i3, t3, i3.__e, l4)); return l4; } -function x(n3, l4) { +function A(n3, l4) { return l4 = l4 || [], n3 == null || typeof n3 == "boolean" || (Array.isArray(n3) ? n3.some(function(n4) { - x(n4, l4); + A(n4, l4); }) : l4.push(n3)), l4; } -function A(n3, l4, u3, i3, t3, o2) { - var r3, f3, e3; +function P(n3, l4, u3, i3, t3, r3) { + var o2, f3, e3; if (l4.__d !== void 0) - r3 = l4.__d, l4.__d = void 0; - else if (u3 == null || t3 != o2 || t3.parentNode == null) + o2 = l4.__d, l4.__d = void 0; + else if (u3 == null || t3 != r3 || t3.parentNode == null) n: - if (o2 == null || o2.parentNode !== n3) - n3.appendChild(t3), r3 = null; + if (r3 == null || r3.parentNode !== n3) + n3.appendChild(t3), o2 = null; else { - for (f3 = o2, e3 = 0; (f3 = f3.nextSibling) && e3 < i3.length; e3 += 1) + for (f3 = r3, e3 = 0; (f3 = f3.nextSibling) && e3 < i3.length; e3 += 1) if (f3 == t3) break n; - n3.insertBefore(t3, o2), r3 = o2; + n3.insertBefore(t3, r3), o2 = r3; } - return r3 !== void 0 ? r3 : t3.nextSibling; + return o2 !== void 0 ? o2 : t3.nextSibling; } -function C(n3, l4, u3, i3, t3) { - var o2; - for (o2 in u3) - o2 === "children" || o2 === "key" || o2 in l4 || H(n3, o2, null, u3[o2], i3); - for (o2 in l4) - t3 && typeof l4[o2] != "function" || o2 === "children" || o2 === "key" || o2 === "value" || o2 === "checked" || u3[o2] === l4[o2] || H(n3, o2, l4[o2], u3[o2], i3); +function C(n3) { + var l4, u3, i3; + if (n3.type == null || typeof n3.type == "string") + return n3.__e; + if (n3.__k) { + for (l4 = n3.__k.length - 1; l4 >= 0; l4--) + if ((u3 = n3.__k[l4]) && (i3 = C(u3))) + return i3; + } + return null; } -function $(n3, l4, u3) { - l4[0] === "-" ? n3.setProperty(l4, u3) : n3[l4] = u3 == null ? "" : typeof u3 != "number" || c.test(l4) ? u3 : u3 + "px"; +function $(n3, l4, u3, i3, t3) { + var r3; + for (r3 in u3) + r3 === "children" || r3 === "key" || r3 in l4 || I(n3, r3, null, u3[r3], i3); + for (r3 in l4) + t3 && typeof l4[r3] != "function" || r3 === "children" || r3 === "key" || r3 === "value" || r3 === "checked" || u3[r3] === l4[r3] || I(n3, r3, l4[r3], u3[r3], i3); +} +function H(n3, l4, u3) { + l4[0] === "-" ? n3.setProperty(l4, u3 == null ? "" : u3) : n3[l4] = u3 == null ? "" : typeof u3 != "number" || s.test(l4) ? u3 : u3 + "px"; } -function H(n3, l4, u3, i3, t3) { - var o2; +function I(n3, l4, u3, i3, t3) { + var r3; n: if (l4 === "style") if (typeof u3 == "string") @@ -37736,17 +41544,17 @@ function H(n3, l4, u3, i3, t3) { else { if (typeof i3 == "string" && (n3.style.cssText = i3 = ""), i3) for (l4 in i3) - u3 && l4 in u3 || $(n3.style, l4, ""); + u3 && l4 in u3 || H(n3.style, l4, ""); if (u3) for (l4 in u3) - i3 && u3[l4] === i3[l4] || $(n3.style, l4, u3[l4]); + i3 && u3[l4] === i3[l4] || H(n3.style, l4, u3[l4]); } else if (l4[0] === "o" && l4[1] === "n") - o2 = l4 !== (l4 = l4.replace(/Capture$/, "")), l4 = l4.toLowerCase() in n3 ? l4.toLowerCase().slice(2) : l4.slice(2), n3.l || (n3.l = {}), n3.l[l4 + o2] = u3, u3 ? i3 || n3.addEventListener(l4, o2 ? T : I, o2) : n3.removeEventListener(l4, o2 ? T : I, o2); + r3 = l4 !== (l4 = l4.replace(/Capture$/, "")), l4 = l4.toLowerCase() in n3 ? l4.toLowerCase().slice(2) : l4.slice(2), n3.l || (n3.l = {}), n3.l[l4 + r3] = u3, u3 ? i3 || n3.addEventListener(l4, r3 ? j : T, r3) : n3.removeEventListener(l4, r3 ? j : T, r3); else if (l4 !== "dangerouslySetInnerHTML") { if (t3) l4 = l4.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s"); - else if (l4 !== "href" && l4 !== "list" && l4 !== "form" && l4 !== "tabIndex" && l4 !== "download" && l4 in n3) + else if (l4 !== "width" && l4 !== "height" && l4 !== "href" && l4 !== "list" && l4 !== "form" && l4 !== "tabIndex" && l4 !== "download" && l4 in n3) try { n3[l4] = u3 == null ? "" : u3; break n; @@ -37755,52 +41563,52 @@ function H(n3, l4, u3, i3, t3) { typeof u3 == "function" || (u3 == null || u3 === false && l4.indexOf("-") == -1 ? n3.removeAttribute(l4) : n3.setAttribute(l4, u3)); } } -function I(n3) { - this.l[n3.type + false](l.event ? l.event(n3) : n3); -} function T(n3) { - this.l[n3.type + true](l.event ? l.event(n3) : n3); + return this.l[n3.type + false](l.event ? l.event(n3) : n3); +} +function j(n3) { + return this.l[n3.type + true](l.event ? l.event(n3) : n3); } -function j(n3, u3, i3, t3, o2, r3, f3, e3, c3) { - var a3, h3, v3, y3, _3, k3, b3, g4, m3, x4, A3, C3, $3, H3, I3, T4 = u3.type; +function z(n3, u3, i3, t3, r3, o2, f3, e3, c3) { + var s4, h3, v3, y3, p3, k3, b3, g4, m3, x3, A3, P3, C3, $3, H3, I3 = u3.type; if (u3.constructor !== void 0) return null; - i3.__h != null && (c3 = i3.__h, e3 = u3.__e = i3.__e, u3.__h = null, r3 = [e3]), (a3 = l.__b) && a3(u3); + i3.__h != null && (c3 = i3.__h, e3 = u3.__e = i3.__e, u3.__h = null, o2 = [e3]), (s4 = l.__b) && s4(u3); try { n: - if (typeof T4 == "function") { - if (g4 = u3.props, m3 = (a3 = T4.contextType) && t3[a3.__c], x4 = a3 ? m3 ? m3.props.value : a3.__ : t3, i3.__c ? b3 = (h3 = u3.__c = i3.__c).__ = h3.__E : ("prototype" in T4 && T4.prototype.render ? u3.__c = h3 = new T4(g4, x4) : (u3.__c = h3 = new d(g4, x4), h3.constructor = T4, h3.render = O), m3 && m3.sub(h3), h3.props = g4, h3.state || (h3.state = {}), h3.context = x4, h3.__n = t3, v3 = h3.__d = true, h3.__h = [], h3._sb = []), h3.__s == null && (h3.__s = h3.state), T4.getDerivedStateFromProps != null && (h3.__s == h3.state && (h3.__s = s({}, h3.__s)), s(h3.__s, T4.getDerivedStateFromProps(g4, h3.__s))), y3 = h3.props, _3 = h3.state, v3) - T4.getDerivedStateFromProps == null && h3.componentWillMount != null && h3.componentWillMount(), h3.componentDidMount != null && h3.__h.push(h3.componentDidMount); + if (typeof I3 == "function") { + if (g4 = u3.props, m3 = (s4 = I3.contextType) && t3[s4.__c], x3 = s4 ? m3 ? m3.props.value : s4.__ : t3, i3.__c ? b3 = (h3 = u3.__c = i3.__c).__ = h3.__E : ("prototype" in I3 && I3.prototype.render ? u3.__c = h3 = new I3(g4, x3) : (u3.__c = h3 = new _(g4, x3), h3.constructor = I3, h3.render = S), m3 && m3.sub(h3), h3.props = g4, h3.state || (h3.state = {}), h3.context = x3, h3.__n = t3, v3 = h3.__d = true, h3.__h = [], h3._sb = []), h3.__s == null && (h3.__s = h3.state), I3.getDerivedStateFromProps != null && (h3.__s == h3.state && (h3.__s = a({}, h3.__s)), a(h3.__s, I3.getDerivedStateFromProps(g4, h3.__s))), y3 = h3.props, p3 = h3.state, h3.__v = u3, v3) + I3.getDerivedStateFromProps == null && h3.componentWillMount != null && h3.componentWillMount(), h3.componentDidMount != null && h3.__h.push(h3.componentDidMount); else { - if (T4.getDerivedStateFromProps == null && g4 !== y3 && h3.componentWillReceiveProps != null && h3.componentWillReceiveProps(g4, x4), !h3.__e && h3.shouldComponentUpdate != null && h3.shouldComponentUpdate(g4, h3.__s, x4) === false || u3.__v === i3.__v) { - for (h3.props = g4, h3.state = h3.__s, u3.__v !== i3.__v && (h3.__d = false), h3.__v = u3, u3.__e = i3.__e, u3.__k = i3.__k, u3.__k.forEach(function(n4) { + if (I3.getDerivedStateFromProps == null && g4 !== y3 && h3.componentWillReceiveProps != null && h3.componentWillReceiveProps(g4, x3), !h3.__e && h3.shouldComponentUpdate != null && h3.shouldComponentUpdate(g4, h3.__s, x3) === false || u3.__v === i3.__v) { + for (u3.__v !== i3.__v && (h3.props = g4, h3.state = h3.__s, h3.__d = false), h3.__e = false, u3.__e = i3.__e, u3.__k = i3.__k, u3.__k.forEach(function(n4) { n4 && (n4.__ = u3); }), A3 = 0; A3 < h3._sb.length; A3++) h3.__h.push(h3._sb[A3]); h3._sb = [], h3.__h.length && f3.push(h3); break n; } - h3.componentWillUpdate != null && h3.componentWillUpdate(g4, h3.__s, x4), h3.componentDidUpdate != null && h3.__h.push(function() { - h3.componentDidUpdate(y3, _3, k3); + h3.componentWillUpdate != null && h3.componentWillUpdate(g4, h3.__s, x3), h3.componentDidUpdate != null && h3.__h.push(function() { + h3.componentDidUpdate(y3, p3, k3); }); } - if (h3.context = x4, h3.props = g4, h3.__v = u3, h3.__P = n3, C3 = l.__r, $3 = 0, "prototype" in T4 && T4.prototype.render) { - for (h3.state = h3.__s, h3.__d = false, C3 && C3(u3), a3 = h3.render(h3.props, h3.state, h3.context), H3 = 0; H3 < h3._sb.length; H3++) - h3.__h.push(h3._sb[H3]); + if (h3.context = x3, h3.props = g4, h3.__P = n3, P3 = l.__r, C3 = 0, "prototype" in I3 && I3.prototype.render) { + for (h3.state = h3.__s, h3.__d = false, P3 && P3(u3), s4 = h3.render(h3.props, h3.state, h3.context), $3 = 0; $3 < h3._sb.length; $3++) + h3.__h.push(h3._sb[$3]); h3._sb = []; } else do { - h3.__d = false, C3 && C3(u3), a3 = h3.render(h3.props, h3.state, h3.context), h3.state = h3.__s; - } while (h3.__d && ++$3 < 25); - h3.state = h3.__s, h3.getChildContext != null && (t3 = s(s({}, t3), h3.getChildContext())), v3 || h3.getSnapshotBeforeUpdate == null || (k3 = h3.getSnapshotBeforeUpdate(y3, _3)), I3 = a3 != null && a3.type === p && a3.key == null ? a3.props.children : a3, w(n3, Array.isArray(I3) ? I3 : [I3], u3, i3, t3, o2, r3, f3, e3, c3), h3.base = u3.__e, u3.__h = null, h3.__h.length && f3.push(h3), b3 && (h3.__E = h3.__ = null), h3.__e = false; + h3.__d = false, P3 && P3(u3), s4 = h3.render(h3.props, h3.state, h3.context), h3.state = h3.__s; + } while (h3.__d && ++C3 < 25); + h3.state = h3.__s, h3.getChildContext != null && (t3 = a(a({}, t3), h3.getChildContext())), v3 || h3.getSnapshotBeforeUpdate == null || (k3 = h3.getSnapshotBeforeUpdate(y3, p3)), H3 = s4 != null && s4.type === d && s4.key == null ? s4.props.children : s4, w(n3, Array.isArray(H3) ? H3 : [H3], u3, i3, t3, r3, o2, f3, e3, c3), h3.base = u3.__e, u3.__h = null, h3.__h.length && f3.push(h3), b3 && (h3.__E = h3.__ = null), h3.__e = false; } else - r3 == null && u3.__v === i3.__v ? (u3.__k = i3.__k, u3.__e = i3.__e) : u3.__e = L(i3.__e, u3, i3, t3, o2, r3, f3, c3); - (a3 = l.diffed) && a3(u3); + o2 == null && u3.__v === i3.__v ? (u3.__k = i3.__k, u3.__e = i3.__e) : u3.__e = M(i3.__e, u3, i3, t3, r3, o2, f3, c3); + (s4 = l.diffed) && s4(u3); } catch (n4) { - u3.__v = null, (c3 || r3 != null) && (u3.__e = e3, u3.__h = !!c3, r3[r3.indexOf(e3)] = null), l.__e(n4, u3, i3); + u3.__v = null, (c3 || o2 != null) && (u3.__e = e3, u3.__h = !!c3, o2[o2.indexOf(e3)] = null), l.__e(n4, u3, i3); } } -function z(n3, u3) { +function L(n3, u3) { l.__c && l.__c(u3, n3), n3.some(function(u4) { try { n3 = u4.__h, u4.__h = [], n3.some(function(n4) { @@ -37811,48 +41619,48 @@ function z(n3, u3) { } }); } -function L(l4, u3, i3, t3, o2, r3, e3, c3) { - var s4, h3, v3, y3 = i3.props, p3 = u3.props, d2 = u3.type, k3 = 0; - if (d2 === "svg" && (o2 = true), r3 != null) { - for (; k3 < r3.length; k3++) - if ((s4 = r3[k3]) && "setAttribute" in s4 == !!d2 && (d2 ? s4.localName === d2 : s4.nodeType === 3)) { - l4 = s4, r3[k3] = null; +function M(l4, u3, i3, t3, r3, o2, f3, c3) { + var s4, a3, v3, y3 = i3.props, p3 = u3.props, d2 = u3.type, _3 = 0; + if (d2 === "svg" && (r3 = true), o2 != null) { + for (; _3 < o2.length; _3++) + if ((s4 = o2[_3]) && "setAttribute" in s4 == !!d2 && (d2 ? s4.localName === d2 : s4.nodeType === 3)) { + l4 = s4, o2[_3] = null; break; } } if (l4 == null) { if (d2 === null) return document.createTextNode(p3); - l4 = o2 ? document.createElementNS("http://www.w3.org/2000/svg", d2) : document.createElement(d2, p3.is && p3), r3 = null, c3 = false; + l4 = r3 ? document.createElementNS("http://www.w3.org/2000/svg", d2) : document.createElement(d2, p3.is && p3), o2 = null, c3 = false; } if (d2 === null) y3 === p3 || c3 && l4.data === p3 || (l4.data = p3); else { - if (r3 = r3 && n.call(l4.childNodes), h3 = (y3 = i3.props || f).dangerouslySetInnerHTML, v3 = p3.dangerouslySetInnerHTML, !c3) { - if (r3 != null) - for (y3 = {}, k3 = 0; k3 < l4.attributes.length; k3++) - y3[l4.attributes[k3].name] = l4.attributes[k3].value; - (v3 || h3) && (v3 && (h3 && v3.__html == h3.__html || v3.__html === l4.innerHTML) || (l4.innerHTML = v3 && v3.__html || "")); + if (o2 = o2 && n.call(l4.childNodes), a3 = (y3 = i3.props || e).dangerouslySetInnerHTML, v3 = p3.dangerouslySetInnerHTML, !c3) { + if (o2 != null) + for (y3 = {}, _3 = 0; _3 < l4.attributes.length; _3++) + y3[l4.attributes[_3].name] = l4.attributes[_3].value; + (v3 || a3) && (v3 && (a3 && v3.__html == a3.__html || v3.__html === l4.innerHTML) || (l4.innerHTML = v3 && v3.__html || "")); } - if (C(l4, p3, y3, o2, c3), v3) + if ($(l4, p3, y3, r3, c3), v3) u3.__k = []; - else if (k3 = u3.props.children, w(l4, Array.isArray(k3) ? k3 : [k3], u3, i3, t3, o2 && d2 !== "foreignObject", r3, e3, r3 ? r3[0] : i3.__k && _(i3, 0), c3), r3 != null) - for (k3 = r3.length; k3--; ) - r3[k3] != null && a(r3[k3]); - c3 || ("value" in p3 && (k3 = p3.value) !== void 0 && (k3 !== l4.value || d2 === "progress" && !k3 || d2 === "option" && k3 !== y3.value) && H(l4, "value", k3, y3.value, false), "checked" in p3 && (k3 = p3.checked) !== void 0 && k3 !== l4.checked && H(l4, "checked", k3, y3.checked, false)); + else if (_3 = u3.props.children, w(l4, Array.isArray(_3) ? _3 : [_3], u3, i3, t3, r3 && d2 !== "foreignObject", o2, f3, o2 ? o2[0] : i3.__k && k(i3, 0), c3), o2 != null) + for (_3 = o2.length; _3--; ) + o2[_3] != null && h(o2[_3]); + c3 || ("value" in p3 && (_3 = p3.value) !== void 0 && (_3 !== l4.value || d2 === "progress" && !_3 || d2 === "option" && _3 !== y3.value) && I(l4, "value", _3, y3.value, false), "checked" in p3 && (_3 = p3.checked) !== void 0 && _3 !== l4.checked && I(l4, "checked", _3, y3.checked, false)); } return l4; } -function M(n3, u3, i3) { +function N(n3, u3, i3) { try { typeof n3 == "function" ? n3(u3) : n3.current = u3; } catch (n4) { l.__e(n4, i3); } } -function N(n3, u3, i3) { - var t3, o2; - if (l.unmount && l.unmount(n3), (t3 = n3.ref) && (t3.current && t3.current !== n3.__e || M(t3, null, u3)), (t3 = n3.__c) != null) { +function O(n3, u3, i3) { + var t3, r3; + if (l.unmount && l.unmount(n3), (t3 = n3.ref) && (t3.current && t3.current !== n3.__e || N(t3, null, u3)), (t3 = n3.__c) != null) { if (t3.componentWillUnmount) try { t3.componentWillUnmount(); @@ -37862,26 +41670,28 @@ function N(n3, u3, i3) { t3.base = t3.__P = null, n3.__c = void 0; } if (t3 = n3.__k) - for (o2 = 0; o2 < t3.length; o2++) - t3[o2] && N(t3[o2], u3, i3 || typeof n3.type != "function"); - i3 || n3.__e == null || a(n3.__e), n3.__ = n3.__e = n3.__d = void 0; + for (r3 = 0; r3 < t3.length; r3++) + t3[r3] && O(t3[r3], u3, i3 || typeof n3.type != "function"); + i3 || n3.__e == null || h(n3.__e), n3.__ = n3.__e = n3.__d = void 0; } -function O(n3, l4, u3) { +function S(n3, l4, u3) { return this.constructor(n3, u3); } -function P(u3, i3, t3) { - var o2, r3, e3; - l.__ && l.__(u3, i3), r3 = (o2 = typeof t3 == "function") ? null : t3 && t3.__k || i3.__k, e3 = [], j(i3, u3 = (!o2 && t3 || i3).__k = h(p, null, [u3]), r3 || f, f, i3.ownerSVGElement !== void 0, !o2 && t3 ? [t3] : r3 ? null : i3.firstChild ? n.call(i3.childNodes) : null, e3, !o2 && t3 ? t3 : r3 ? r3.__e : i3.firstChild, o2), z(e3, u3); +function q(u3, i3, t3) { + var r3, o2, f3; + l.__ && l.__(u3, i3), o2 = (r3 = typeof t3 == "function") ? null : t3 && t3.__k || i3.__k, f3 = [], z(i3, u3 = (!r3 && t3 || i3).__k = v(d, null, [u3]), o2 || e, e, i3.ownerSVGElement !== void 0, !r3 && t3 ? [t3] : o2 ? null : i3.firstChild ? n.call(i3.childNodes) : null, f3, !r3 && t3 ? t3 : o2 ? o2.__e : i3.firstChild, r3), L(f3, u3); } -function B(n3, l4) { - var u3 = { __c: l4 = "__cC" + r++, __: n3, Consumer: function(n4, l5) { +function E(n3, l4) { + var u3 = { __c: l4 = "__cC" + f++, __: n3, Consumer: function(n4, l5) { return n4.children(l5); }, Provider: function(n4) { var u4, i3; return this.getChildContext || (u4 = [], (i3 = {})[l4] = this, this.getChildContext = function() { return i3; }, this.shouldComponentUpdate = function(n5) { - this.props.value !== n5.value && u4.some(b); + this.props.value !== n5.value && u4.some(function(n6) { + n6.__e = true, g(n6); + }); }, this.sub = function(n5) { u4.push(n5); var l5 = n5.componentWillUnmount; @@ -37892,11 +41702,11 @@ function B(n3, l4) { } }; return u3.Provider.__ = u3.Consumer.contextType = u3; } -n = e.slice, l = { __e: function(n3, l4, u3, i3) { - for (var t3, o2, r3; l4 = l4.__; ) +n = c.slice, l = { __e: function(n3, l4, u3, i3) { + for (var t3, r3, o2; l4 = l4.__; ) if ((t3 = l4.__c) && !t3.__) try { - if ((o2 = t3.constructor) && o2.getDerivedStateFromError != null && (t3.setState(o2.getDerivedStateFromError(n3)), r3 = t3.__d), t3.componentDidCatch != null && (t3.componentDidCatch(n3, i3 || {}), r3 = t3.__d), r3) + if ((r3 = t3.constructor) && r3.getDerivedStateFromError != null && (t3.setState(r3.getDerivedStateFromError(n3)), o2 = t3.__d), t3.componentDidCatch != null && (t3.componentDidCatch(n3, i3 || {}), o2 = t3.__d), o2) return t3.__E = t3; } catch (l5) { n3 = l5; @@ -37904,12 +41714,12 @@ n = e.slice, l = { __e: function(n3, l4, u3, i3) { throw n3; } }, u = 0, i = function(n3) { return n3 != null && n3.constructor === void 0; -}, d.prototype.setState = function(n3, l4) { +}, _.prototype.setState = function(n3, l4) { var u3; - u3 = this.__s != null && this.__s !== this.state ? this.__s : this.__s = s({}, this.state), typeof n3 == "function" && (n3 = n3(s({}, u3), this.props)), n3 && s(u3, n3), n3 != null && this.__v && (l4 && this._sb.push(l4), b(this)); -}, d.prototype.forceUpdate = function(n3) { - this.__v && (this.__e = true, n3 && this.__h.push(n3), b(this)); -}, d.prototype.render = p, t = [], g.__r = 0, r = 0; + u3 = this.__s != null && this.__s !== this.state ? this.__s : this.__s = a({}, this.state), typeof n3 == "function" && (n3 = n3(a({}, u3), this.props)), n3 && a(u3, n3), n3 != null && this.__v && (l4 && this._sb.push(l4), g(this)); +}, _.prototype.forceUpdate = function(n3) { + this.__v && (this.__e = true, n3 && this.__h.push(n3), g(this)); +}, _.prototype.render = d, t = [], o = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, m.__r = 0, f = 0; // node_modules/preact/hooks/dist/hooks.module.js var t2; @@ -38003,12 +41813,12 @@ function C2(n3, t3) { function w3(n3) { this.props = n3; } -(w3.prototype = new d()).isPureReactComponent = true, w3.prototype.shouldComponentUpdate = function(n3, t3) { +(w3.prototype = new _()).isPureReactComponent = true, w3.prototype.shouldComponentUpdate = function(n3, t3) { return C2(this.props, n3) || C2(this.state, t3); }; -var x3 = l.__b; +var R = l.__b; l.__b = function(n3) { - n3.type && n3.type.__f && n3.ref && (n3.props.ref = n3.ref, n3.ref = null), x3 && x3(n3); + n3.type && n3.type.__f && n3.ref && (n3.props.ref = n3.ref, n3.ref = null), R && R(n3); }; var N2 = typeof Symbol != "undefined" && Symbol.for && Symbol.for("react.forward_ref") || 3911; var T3 = l.__e; @@ -38033,7 +41843,7 @@ function U(n3, t3, e3) { return U(n4, t3, e3); }), n3.__c && n3.__c.__P === t3 && (n3.__e && e3.insertBefore(n3.__e, n3.__d), n3.__c.__e = true, n3.__c.__P = e3)), n3; } -function D() { +function D2() { this.__u = 0, this.t = null, this.__b = null; } function F2(n3) { @@ -38046,7 +41856,7 @@ function V2() { l.unmount = function(n3) { var t3 = n3.__c; t3 && t3.__R && t3.__R(), t3 && n3.__h === true && (n3.type = null), I2 && I2(n3); -}, (D.prototype = new d()).__c = function(n3, t3) { +}, (D2.prototype = new _()).__c = function(n3, t3) { var e3 = t3.__c, r3 = this; r3.t == null && (r3.t = []), r3.t.push(e3); var u3 = F2(r3.__v), o2 = false, i3 = function() { @@ -38065,9 +41875,9 @@ l.unmount = function(n3) { } }, c3 = t3.__h === true; r3.__u++ || c3 || r3.setState({ __a: r3.__b = r3.__v.__k[0] }), n3.then(i3, i3); -}, D.prototype.componentWillUnmount = function() { +}, D2.prototype.componentWillUnmount = function() { this.t = []; -}, D.prototype.render = function(n3, e3) { +}, D2.prototype.render = function(n3, e3) { if (this.__b) { if (this.__v.__k) { var r3 = document.createElement("div"), o2 = this.__v.__k[0].__c; @@ -38075,8 +41885,8 @@ l.unmount = function(n3) { } this.__b = null; } - var i3 = e3.__a && h(p, null, n3.fallback); - return i3 && (i3.__h = null), [h(p, null, e3.__a ? null : n3.children), i3]; + var i3 = e3.__a && v(d, null, n3.fallback); + return i3 && (i3.__h = null), [v(d, null, e3.__a ? null : n3.children), i3]; }; var W = function(n3, t3, e3) { if (++e3[1] === e3[0] && n3.o.delete(t3), n3.props.revealOrder && (n3.props.revealOrder[0] !== "t" || !n3.o.size)) @@ -38096,20 +41906,20 @@ function P2(n3) { function $2(n3) { var e3 = this, r3 = n3.i; e3.componentWillUnmount = function() { - P(null, e3.l), e3.l = null, e3.i = null; + q(null, e3.l), e3.l = null, e3.i = null; }, e3.i && e3.i !== r3 && e3.componentWillUnmount(), n3.__v ? (e3.l || (e3.i = r3, e3.l = { nodeType: 1, parentNode: r3, childNodes: [], appendChild: function(n4) { this.childNodes.push(n4), e3.i.appendChild(n4); }, insertBefore: function(n4, t3) { this.childNodes.push(n4), e3.i.appendChild(n4); }, removeChild: function(n4) { this.childNodes.splice(this.childNodes.indexOf(n4) >>> 1, 1), e3.i.removeChild(n4); - } }), P(h(P2, { context: e3.context }, n3.__v), e3.l)) : e3.l && e3.componentWillUnmount(); + } }), q(v(P2, { context: e3.context }, n3.__v), e3.l)) : e3.l && e3.componentWillUnmount(); } function j3(n3, e3) { - var r3 = h($2, { __v: n3, i: e3 }); + var r3 = v($2, { __v: n3, i: e3 }); return r3.containerInfo = e3, r3; } -(V2.prototype = new d()).__a = function(n3) { +(V2.prototype = new _()).__a = function(n3) { var t3 = this, e3 = F2(t3.__v), r3 = t3.o.get(n3); return r3[0]++, function(u3) { var o2 = function() { @@ -38119,7 +41929,7 @@ function j3(n3, e3) { }; }, V2.prototype.render = function(n3) { this.u = null, this.o = new Map(); - var t3 = x(n3.children); + var t3 = A(n3.children); n3.revealOrder && n3.revealOrder[0] === "b" && t3.reverse(); for (var e3 = t3.length; e3--; ) this.o.set(t3[e3], this.u = [1, 0, this.u]); @@ -38136,8 +41946,8 @@ var H2 = typeof document != "undefined"; var Z = function(n3) { return (typeof Symbol != "undefined" && typeof Symbol() == "symbol" ? /fil|che|rad/i : /fil|che|ra/i).test(n3); }; -d.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceiveProps", "componentWillUpdate"].forEach(function(t3) { - Object.defineProperty(d.prototype, t3, { configurable: true, get: function() { +_.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceiveProps", "componentWillUpdate"].forEach(function(t3) { + Object.defineProperty(_.prototype, t3, { configurable: true, get: function() { return this["UNSAFE_" + t3]; }, set: function(n3) { Object.defineProperty(this, t3, { configurable: true, writable: true, value: n3 }); @@ -38168,9 +41978,9 @@ l.vnode = function(n3) { var l4 = e3[i3]; H2 && i3 === "children" && t3 === "noscript" || i3 === "value" && "defaultValue" in e3 && l4 == null || (i3 === "defaultValue" && "value" in e3 && e3.value == null ? i3 = "value" : i3 === "download" && l4 === true ? l4 = "" : /ondoubleclick/i.test(i3) ? i3 = "ondblclick" : /^onchange(textarea|input)/i.test(i3 + t3) && !Z(e3.type) ? i3 = "oninput" : /^onfocus$/i.test(i3) ? i3 = "onfocusin" : /^onblur$/i.test(i3) ? i3 = "onfocusout" : /^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(i3) ? i3 = i3.toLowerCase() : o2 && B2.test(i3) ? i3 = i3.replace(/[A-Z0-9]/g, "-$&").toLowerCase() : l4 === null && (l4 = void 0), /^oninput$/i.test(i3) && (i3 = i3.toLowerCase(), u3[i3] && (i3 = "oninputCapture")), u3[i3] = l4); } - t3 == "select" && u3.multiple && Array.isArray(u3.value) && (u3.value = x(e3.children).forEach(function(n4) { + t3 == "select" && u3.multiple && Array.isArray(u3.value) && (u3.value = A(e3.children).forEach(function(n4) { n4.props.selected = u3.value.indexOf(n4.props.value) != -1; - })), t3 == "select" && u3.defaultValue != null && (u3.value = x(e3.children).forEach(function(n4) { + })), t3 == "select" && u3.defaultValue != null && (u3.value = A(e3.children).forEach(function(n4) { n4.props.selected = u3.multiple ? u3.defaultValue.indexOf(n4.props.value) != -1 : u3.defaultValue == n4.props.value; })), n3.props = u3, e3.class != e3.className && (nn.enumerable = "className" in e3, e3.className != null && (u3.class = e3.className), Object.defineProperty(u3, "className", nn)); } @@ -38180,6 +41990,12 @@ var en = l.__r; l.__r = function(n3) { en && en(n3), X = n3.__c; }; +var rn = l.diffed; +l.diffed = function(n3) { + rn && rn(n3); + var t3 = n3.props, e3 = n3.__e; + e3 != null && n3.type === "textarea" && "value" in t3 && t3.value !== e3.value && (e3.value = t3.value == null ? "" : t3.value), X = null; +}; // node_modules/@fullcalendar/core/vdom.js var globalObj = typeof globalThis !== "undefined" ? globalThis : window; @@ -38187,11 +42003,11 @@ if (globalObj.FullCalendarVDom) { console.warn("FullCalendar VDOM already loaded"); } else { globalObj.FullCalendarVDom = { - Component: d, - createElement: h, - render: P, - createRef: y, - Fragment: p, + Component: _, + createElement: v, + render: q, + createRef: p, + Fragment: d, createContext, createPortal: j3, flushSync, @@ -38206,7 +42022,7 @@ function flushSync(runBeforeFlush) { callbackQ.push(callback); } l.debounceRendering = execCallbackSync; - P(h(FakeComponent, {}), document.createElement("div")); + q(v(FakeComponent, {}), document.createElement("div")); while (callbackQ.length) { callbackQ.shift()(); } @@ -38218,15 +42034,15 @@ var FakeComponent = function(_super) { return _super !== null && _super.apply(this, arguments) || this; } FakeComponent2.prototype.render = function() { - return h("div", {}); + return v("div", {}); }; FakeComponent2.prototype.componentDidMount = function() { this.setState({}); }; return FakeComponent2; -}(d); +}(_); function createContext(defaultValue) { - var ContextType = B(defaultValue); + var ContextType = E(defaultValue); var origProvider = ContextType.Provider; ContextType.Provider = function() { var _this = this; @@ -38256,7 +42072,7 @@ function createContext(defaultValue) { return ContextType; } function unmountComponentAtNode(node) { - P(null, node); + q(null, node); } // node_modules/@fullcalendar/common/vdom.js @@ -38701,11 +42517,11 @@ function isValidDate(m3) { function timeAsMs(m3) { return m3.getUTCHours() * 1e3 * 60 * 60 + m3.getUTCMinutes() * 1e3 * 60 + m3.getUTCSeconds() * 1e3 + m3.getUTCMilliseconds(); } -function createEventInstance(defId, range, forcedStartTzo, forcedEndTzo) { +function createEventInstance(defId, range2, forcedStartTzo, forcedEndTzo) { return { instanceId: guid(), defId, - range, + range: range2, forcedStartTzo: forcedStartTzo == null ? null : forcedStartTzo, forcedEndTzo: forcedEndTzo == null ? null : forcedEndTzo }; @@ -40067,8 +43883,8 @@ function computeVisibleDayRange(timedRange, nextDayThreshold) { } return { start: startDay, end: endDay }; } -function isMultiDayRange(range) { - var visibleRange = computeVisibleDayRange(range); +function isMultiDayRange(range2) { + var visibleRange = computeVisibleDayRange(range2); return diffDays(visibleRange.start, visibleRange.end) > 1; } function diffDates(date0, date1, dateEnv, largeUnit) { @@ -40151,15 +43967,15 @@ function rangesIntersect(range0, range1) { function rangeContainsRange(outerRange, innerRange) { return (outerRange.start === null || innerRange.start !== null && innerRange.start >= outerRange.start) && (outerRange.end === null || innerRange.end !== null && innerRange.end <= outerRange.end); } -function rangeContainsMarker(range, date) { - return (range.start === null || date >= range.start) && (range.end === null || date < range.end); +function rangeContainsMarker(range2, date) { + return (range2.start === null || date >= range2.start) && (range2.end === null || date < range2.end); } -function constrainMarkerToRange(date, range) { - if (range.start != null && date < range.start) { - return range.start; +function constrainMarkerToRange(date, range2) { + if (range2.start != null && date < range2.start) { + return range2.start; } - if (range.end != null && date >= range.end) { - return new Date(range.end.valueOf() - 1); + if (range2.end != null && date >= range2.end) { + return new Date(range2.end.valueOf() - 1); } return date; } @@ -40281,9 +44097,9 @@ function sortEventSegs(segs, eventOrderSpecs) { function buildSegCompareObj(seg) { var eventRange = seg.eventRange; var eventDef = eventRange.def; - var range = eventRange.instance ? eventRange.instance.range : eventRange.range; - var start = range.start ? range.start.valueOf() : 0; - var end = range.end ? range.end.valueOf() : 0; + var range2 = eventRange.instance ? eventRange.instance.range : eventRange.range; + var start = range2.start ? range2.start.valueOf() : 0; + var end = range2.end ? range2.end.valueOf() : 0; return __assign(__assign(__assign({}, eventDef.extendedProps), eventDef), { id: eventDef.publicId, start, @@ -40423,15 +44239,15 @@ var STANDARD_PROPS = { }; function parseDateSpan(raw, dateEnv, defaultDuration) { var span = parseOpenDateSpan(raw, dateEnv); - var range = span.range; - if (!range.start) { + var range2 = span.range; + if (!range2.start) { return null; } - if (!range.end) { + if (!range2.end) { if (defaultDuration == null) { return null; } - range.end = dateEnv.add(range.start, defaultDuration); + range2.end = dateEnv.add(range2.start, defaultDuration); } return span; } @@ -40469,15 +44285,15 @@ function isSpanPropsEqual(span0, span1) { function buildDateSpanApi(span, dateEnv) { return __assign(__assign({}, buildRangeApi(span.range, dateEnv, span.allDay)), { allDay: span.allDay }); } -function buildRangeApiWithTimeZone(range, dateEnv, omitTime) { - return __assign(__assign({}, buildRangeApi(range, dateEnv, omitTime)), { timeZone: dateEnv.timeZone }); +function buildRangeApiWithTimeZone(range2, dateEnv, omitTime) { + return __assign(__assign({}, buildRangeApi(range2, dateEnv, omitTime)), { timeZone: dateEnv.timeZone }); } -function buildRangeApi(range, dateEnv, omitTime) { +function buildRangeApi(range2, dateEnv, omitTime) { return { - start: dateEnv.toDate(range.start), - end: dateEnv.toDate(range.end), - startStr: dateEnv.formatIso(range.start, { omitTime }), - endStr: dateEnv.formatIso(range.end, { omitTime }) + start: dateEnv.toDate(range2.start), + end: dateEnv.toDate(range2.end), + startStr: dateEnv.formatIso(range2.start, { omitTime }), + endStr: dateEnv.formatIso(range2.end, { omitTime }) }; } function fabricateEventRange(dateSpan, eventUiBases, context) { @@ -41952,5104 +45768,6101 @@ function organizeRawLocales(explicitRawLocales) { rawLocaleMap[rawLocale.code] = rawLocale; } return { - map: rawLocaleMap, - defaultCode + map: rawLocaleMap, + defaultCode + }; +} +function buildLocale(inputSingular, available) { + if (typeof inputSingular === "object" && !Array.isArray(inputSingular)) { + return parseLocale(inputSingular.code, [inputSingular.code], inputSingular); + } + return queryLocale(inputSingular, available); +} +function queryLocale(codeArg, available) { + var codes = [].concat(codeArg || []); + var raw = queryRawLocale(codes, available) || RAW_EN_LOCALE; + return parseLocale(codeArg, codes, raw); +} +function queryRawLocale(codes, available) { + for (var i3 = 0; i3 < codes.length; i3 += 1) { + var parts = codes[i3].toLocaleLowerCase().split("-"); + for (var j4 = parts.length; j4 > 0; j4 -= 1) { + var simpleId = parts.slice(0, j4).join("-"); + if (available[simpleId]) { + return available[simpleId]; + } + } + } + return null; +} +function parseLocale(codeArg, codes, raw) { + var merged = mergeProps([MINIMAL_RAW_EN_LOCALE, raw], ["buttonText"]); + delete merged.code; + var week = merged.week; + delete merged.week; + return { + codeArg, + codes, + week, + simpleNumberFormat: new Intl.NumberFormat(codeArg), + options: merged + }; +} +var DEF_DEFAULTS = { + startTime: "09:00", + endTime: "17:00", + daysOfWeek: [1, 2, 3, 4, 5], + display: "inverse-background", + classNames: "fc-non-business", + groupId: "_businessHours" +}; +function parseBusinessHours(input, context) { + return parseEvents(refineInputs(input), null, context); +} +function refineInputs(input) { + var rawDefs; + if (input === true) { + rawDefs = [{}]; + } else if (Array.isArray(input)) { + rawDefs = input.filter(function(rawDef) { + return rawDef.daysOfWeek; + }); + } else if (typeof input === "object" && input) { + rawDefs = [input]; + } else { + rawDefs = []; + } + rawDefs = rawDefs.map(function(rawDef) { + return __assign(__assign({}, DEF_DEFAULTS), rawDef); + }); + return rawDefs; +} +function pointInsideRect(point, rect) { + return point.left >= rect.left && point.left < rect.right && point.top >= rect.top && point.top < rect.bottom; +} +function intersectRects(rect1, rect2) { + var res = { + left: Math.max(rect1.left, rect2.left), + right: Math.min(rect1.right, rect2.right), + top: Math.max(rect1.top, rect2.top), + bottom: Math.min(rect1.bottom, rect2.bottom) + }; + if (res.left < res.right && res.top < res.bottom) { + return res; + } + return false; +} +function constrainPoint(point, rect) { + return { + left: Math.min(Math.max(point.left, rect.left), rect.right), + top: Math.min(Math.max(point.top, rect.top), rect.bottom) + }; +} +function getRectCenter(rect) { + return { + left: (rect.left + rect.right) / 2, + top: (rect.top + rect.bottom) / 2 + }; +} +function diffPoints(point1, point2) { + return { + left: point1.left - point2.left, + top: point1.top - point2.top + }; +} +var canVGrowWithinCell; +function getCanVGrowWithinCell() { + if (canVGrowWithinCell == null) { + canVGrowWithinCell = computeCanVGrowWithinCell(); + } + return canVGrowWithinCell; +} +function computeCanVGrowWithinCell() { + if (typeof document === "undefined") { + return true; + } + var el = document.createElement("div"); + el.style.position = "absolute"; + el.style.top = "0px"; + el.style.left = "0px"; + el.innerHTML = "
"; + el.querySelector("table").style.height = "100px"; + el.querySelector("div").style.height = "100%"; + document.body.appendChild(el); + var div = el.querySelector("div"); + var possible = div.offsetHeight > 0; + document.body.removeChild(el); + return possible; +} +var EMPTY_EVENT_STORE = createEmptyEventStore(); +var Splitter = function() { + function Splitter2() { + this.getKeysForEventDefs = memoize(this._getKeysForEventDefs); + this.splitDateSelection = memoize(this._splitDateSpan); + this.splitEventStore = memoize(this._splitEventStore); + this.splitIndividualUi = memoize(this._splitIndividualUi); + this.splitEventDrag = memoize(this._splitInteraction); + this.splitEventResize = memoize(this._splitInteraction); + this.eventUiBuilders = {}; + } + Splitter2.prototype.splitProps = function(props) { + var _this = this; + var keyInfos = this.getKeyInfo(props); + var defKeys = this.getKeysForEventDefs(props.eventStore); + var dateSelections = this.splitDateSelection(props.dateSelection); + var individualUi = this.splitIndividualUi(props.eventUiBases, defKeys); + var eventStores = this.splitEventStore(props.eventStore, defKeys); + var eventDrags = this.splitEventDrag(props.eventDrag); + var eventResizes = this.splitEventResize(props.eventResize); + var splitProps = {}; + this.eventUiBuilders = mapHash(keyInfos, function(info, key2) { + return _this.eventUiBuilders[key2] || memoize(buildEventUiForKey); + }); + for (var key in keyInfos) { + var keyInfo = keyInfos[key]; + var eventStore = eventStores[key] || EMPTY_EVENT_STORE; + var buildEventUi = this.eventUiBuilders[key]; + splitProps[key] = { + businessHours: keyInfo.businessHours || props.businessHours, + dateSelection: dateSelections[key] || null, + eventStore, + eventUiBases: buildEventUi(props.eventUiBases[""], keyInfo.ui, individualUi[key]), + eventSelection: eventStore.instances[props.eventSelection] ? props.eventSelection : "", + eventDrag: eventDrags[key] || null, + eventResize: eventResizes[key] || null + }; + } + return splitProps; + }; + Splitter2.prototype._splitDateSpan = function(dateSpan) { + var dateSpans = {}; + if (dateSpan) { + var keys = this.getKeysForDateSpan(dateSpan); + for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) { + var key = keys_1[_i]; + dateSpans[key] = dateSpan; + } + } + return dateSpans; + }; + Splitter2.prototype._getKeysForEventDefs = function(eventStore) { + var _this = this; + return mapHash(eventStore.defs, function(eventDef) { + return _this.getKeysForEventDef(eventDef); + }); + }; + Splitter2.prototype._splitEventStore = function(eventStore, defKeys) { + var defs = eventStore.defs, instances = eventStore.instances; + var splitStores = {}; + for (var defId in defs) { + for (var _i = 0, _a = defKeys[defId]; _i < _a.length; _i++) { + var key = _a[_i]; + if (!splitStores[key]) { + splitStores[key] = createEmptyEventStore(); + } + splitStores[key].defs[defId] = defs[defId]; + } + } + for (var instanceId in instances) { + var instance = instances[instanceId]; + for (var _b = 0, _c = defKeys[instance.defId]; _b < _c.length; _b++) { + var key = _c[_b]; + if (splitStores[key]) { + splitStores[key].instances[instanceId] = instance; + } + } + } + return splitStores; + }; + Splitter2.prototype._splitIndividualUi = function(eventUiBases, defKeys) { + var splitHashes = {}; + for (var defId in eventUiBases) { + if (defId) { + for (var _i = 0, _a = defKeys[defId]; _i < _a.length; _i++) { + var key = _a[_i]; + if (!splitHashes[key]) { + splitHashes[key] = {}; + } + splitHashes[key][defId] = eventUiBases[defId]; + } + } + } + return splitHashes; + }; + Splitter2.prototype._splitInteraction = function(interaction) { + var splitStates = {}; + if (interaction) { + var affectedStores_1 = this._splitEventStore(interaction.affectedEvents, this._getKeysForEventDefs(interaction.affectedEvents)); + var mutatedKeysByDefId = this._getKeysForEventDefs(interaction.mutatedEvents); + var mutatedStores_1 = this._splitEventStore(interaction.mutatedEvents, mutatedKeysByDefId); + var populate = function(key2) { + if (!splitStates[key2]) { + splitStates[key2] = { + affectedEvents: affectedStores_1[key2] || EMPTY_EVENT_STORE, + mutatedEvents: mutatedStores_1[key2] || EMPTY_EVENT_STORE, + isEvent: interaction.isEvent + }; + } + }; + for (var key in affectedStores_1) { + populate(key); + } + for (var key in mutatedStores_1) { + populate(key); + } + } + return splitStates; + }; + return Splitter2; +}(); +function buildEventUiForKey(allUi, eventUiForKey, individualUi) { + var baseParts = []; + if (allUi) { + baseParts.push(allUi); + } + if (eventUiForKey) { + baseParts.push(eventUiForKey); + } + var stuff = { + "": combineEventUis(baseParts) + }; + if (individualUi) { + __assign(stuff, individualUi); + } + return stuff; +} +function getDateMeta(date, todayRange, nowDate, dateProfile) { + return { + dow: date.getUTCDay(), + isDisabled: Boolean(dateProfile && !rangeContainsMarker(dateProfile.activeRange, date)), + isOther: Boolean(dateProfile && !rangeContainsMarker(dateProfile.currentRange, date)), + isToday: Boolean(todayRange && rangeContainsMarker(todayRange, date)), + isPast: Boolean(nowDate ? date < nowDate : todayRange ? date < todayRange.start : false), + isFuture: Boolean(nowDate ? date > nowDate : todayRange ? date >= todayRange.end : false) + }; +} +function getDayClassNames(meta, theme) { + var classNames = [ + "fc-day", + "fc-day-" + DAY_IDS[meta.dow] + ]; + if (meta.isDisabled) { + classNames.push("fc-day-disabled"); + } else { + if (meta.isToday) { + classNames.push("fc-day-today"); + classNames.push(theme.getClass("today")); + } + if (meta.isPast) { + classNames.push("fc-day-past"); + } + if (meta.isFuture) { + classNames.push("fc-day-future"); + } + if (meta.isOther) { + classNames.push("fc-day-other"); + } + } + return classNames; +} +var DAY_FORMAT = createFormatter({ year: "numeric", month: "long", day: "numeric" }); +var WEEK_FORMAT = createFormatter({ week: "long" }); +function buildNavLinkAttrs(context, dateMarker, viewType, isTabbable) { + if (viewType === void 0) { + viewType = "day"; + } + if (isTabbable === void 0) { + isTabbable = true; + } + var dateEnv = context.dateEnv, options = context.options, calendarApi = context.calendarApi; + var dateStr = dateEnv.format(dateMarker, viewType === "week" ? WEEK_FORMAT : DAY_FORMAT); + if (options.navLinks) { + var zonedDate = dateEnv.toDate(dateMarker); + var handleInteraction = function(ev) { + var customAction = viewType === "day" ? options.navLinkDayClick : viewType === "week" ? options.navLinkWeekClick : null; + if (typeof customAction === "function") { + customAction.call(calendarApi, dateEnv.toDate(dateMarker), ev); + } else { + if (typeof customAction === "string") { + viewType = customAction; + } + calendarApi.zoomTo(dateMarker, viewType); + } + }; + return __assign({ title: formatWithOrdinals(options.navLinkHint, [dateStr, zonedDate], dateStr), "data-navlink": "" }, isTabbable ? createAriaClickAttrs(handleInteraction) : { onClick: handleInteraction }); + } + return { "aria-label": dateStr }; +} +var _isRtlScrollbarOnLeft = null; +function getIsRtlScrollbarOnLeft() { + if (_isRtlScrollbarOnLeft === null) { + _isRtlScrollbarOnLeft = computeIsRtlScrollbarOnLeft(); + } + return _isRtlScrollbarOnLeft; +} +function computeIsRtlScrollbarOnLeft() { + var outerEl = document.createElement("div"); + applyStyle(outerEl, { + position: "absolute", + top: -1e3, + left: 0, + border: 0, + padding: 0, + overflow: "scroll", + direction: "rtl" + }); + outerEl.innerHTML = "
"; + document.body.appendChild(outerEl); + var innerEl = outerEl.firstChild; + var res = innerEl.getBoundingClientRect().left > outerEl.getBoundingClientRect().left; + removeElement(outerEl); + return res; +} +var _scrollbarWidths; +function getScrollbarWidths() { + if (!_scrollbarWidths) { + _scrollbarWidths = computeScrollbarWidths(); + } + return _scrollbarWidths; +} +function computeScrollbarWidths() { + var el = document.createElement("div"); + el.style.overflow = "scroll"; + el.style.position = "absolute"; + el.style.top = "-9999px"; + el.style.left = "-9999px"; + document.body.appendChild(el); + var res = computeScrollbarWidthsForEl(el); + document.body.removeChild(el); + return res; +} +function computeScrollbarWidthsForEl(el) { + return { + x: el.offsetHeight - el.clientHeight, + y: el.offsetWidth - el.clientWidth + }; +} +function computeEdges(el, getPadding) { + if (getPadding === void 0) { + getPadding = false; + } + var computedStyle = window.getComputedStyle(el); + var borderLeft = parseInt(computedStyle.borderLeftWidth, 10) || 0; + var borderRight = parseInt(computedStyle.borderRightWidth, 10) || 0; + var borderTop = parseInt(computedStyle.borderTopWidth, 10) || 0; + var borderBottom = parseInt(computedStyle.borderBottomWidth, 10) || 0; + var badScrollbarWidths = computeScrollbarWidthsForEl(el); + var scrollbarLeftRight = badScrollbarWidths.y - borderLeft - borderRight; + var scrollbarBottom = badScrollbarWidths.x - borderTop - borderBottom; + var res = { + borderLeft, + borderRight, + borderTop, + borderBottom, + scrollbarBottom, + scrollbarLeft: 0, + scrollbarRight: 0 + }; + if (getIsRtlScrollbarOnLeft() && computedStyle.direction === "rtl") { + res.scrollbarLeft = scrollbarLeftRight; + } else { + res.scrollbarRight = scrollbarLeftRight; + } + if (getPadding) { + res.paddingLeft = parseInt(computedStyle.paddingLeft, 10) || 0; + res.paddingRight = parseInt(computedStyle.paddingRight, 10) || 0; + res.paddingTop = parseInt(computedStyle.paddingTop, 10) || 0; + res.paddingBottom = parseInt(computedStyle.paddingBottom, 10) || 0; + } + return res; +} +function computeInnerRect(el, goWithinPadding, doFromWindowViewport) { + if (goWithinPadding === void 0) { + goWithinPadding = false; + } + var outerRect = doFromWindowViewport ? el.getBoundingClientRect() : computeRect(el); + var edges = computeEdges(el, goWithinPadding); + var res = { + left: outerRect.left + edges.borderLeft + edges.scrollbarLeft, + right: outerRect.right - edges.borderRight - edges.scrollbarRight, + top: outerRect.top + edges.borderTop, + bottom: outerRect.bottom - edges.borderBottom - edges.scrollbarBottom + }; + if (goWithinPadding) { + res.left += edges.paddingLeft; + res.right -= edges.paddingRight; + res.top += edges.paddingTop; + res.bottom -= edges.paddingBottom; + } + return res; +} +function computeRect(el) { + var rect = el.getBoundingClientRect(); + return { + left: rect.left + window.pageXOffset, + top: rect.top + window.pageYOffset, + right: rect.right + window.pageXOffset, + bottom: rect.bottom + window.pageYOffset }; } -function buildLocale(inputSingular, available) { - if (typeof inputSingular === "object" && !Array.isArray(inputSingular)) { - return parseLocale(inputSingular.code, [inputSingular.code], inputSingular); +function computeClippedClientRect(el) { + var clippingParents = getClippingParents(el); + var rect = el.getBoundingClientRect(); + for (var _i = 0, clippingParents_1 = clippingParents; _i < clippingParents_1.length; _i++) { + var clippingParent = clippingParents_1[_i]; + var intersection = intersectRects(rect, clippingParent.getBoundingClientRect()); + if (intersection) { + rect = intersection; + } else { + return null; + } } - return queryLocale(inputSingular, available); + return rect; } -function queryLocale(codeArg, available) { - var codes = [].concat(codeArg || []); - var raw = queryRawLocale(codes, available) || RAW_EN_LOCALE; - return parseLocale(codeArg, codes, raw); +function getClippingParents(el) { + var parents = []; + while (el instanceof HTMLElement) { + var computedStyle = window.getComputedStyle(el); + if (computedStyle.position === "fixed") { + break; + } + if (/(auto|scroll)/.test(computedStyle.overflow + computedStyle.overflowY + computedStyle.overflowX)) { + parents.push(el); + } + el = el.parentNode; + } + return parents; } -function queryRawLocale(codes, available) { - for (var i3 = 0; i3 < codes.length; i3 += 1) { - var parts = codes[i3].toLocaleLowerCase().split("-"); - for (var j4 = parts.length; j4 > 0; j4 -= 1) { - var simpleId = parts.slice(0, j4).join("-"); - if (available[simpleId]) { - return available[simpleId]; +function unpromisify(func, success, failure) { + var isResolved = false; + var wrappedSuccess = function() { + if (!isResolved) { + isResolved = true; + success.apply(this, arguments); + } + }; + var wrappedFailure = function() { + if (!isResolved) { + isResolved = true; + if (failure) { + failure.apply(this, arguments); } } + }; + var res = func(wrappedSuccess, wrappedFailure); + if (res && typeof res.then === "function") { + res.then(wrappedSuccess, wrappedFailure); } - return null; } -function parseLocale(codeArg, codes, raw) { - var merged = mergeProps([MINIMAL_RAW_EN_LOCALE, raw], ["buttonText"]); - delete merged.code; - var week = merged.week; - delete merged.week; - return { - codeArg, - codes, - week, - simpleNumberFormat: new Intl.NumberFormat(codeArg), - options: merged +var Emitter = function() { + function Emitter2() { + this.handlers = {}; + this.thisContext = null; + } + Emitter2.prototype.setThisContext = function(thisContext) { + this.thisContext = thisContext; }; + Emitter2.prototype.setOptions = function(options) { + this.options = options; + }; + Emitter2.prototype.on = function(type, handler) { + addToHash(this.handlers, type, handler); + }; + Emitter2.prototype.off = function(type, handler) { + removeFromHash(this.handlers, type, handler); + }; + Emitter2.prototype.trigger = function(type) { + var args = []; + for (var _i = 1; _i < arguments.length; _i++) { + args[_i - 1] = arguments[_i]; + } + var attachedHandlers = this.handlers[type] || []; + var optionHandler = this.options && this.options[type]; + var handlers = [].concat(optionHandler || [], attachedHandlers); + for (var _a = 0, handlers_1 = handlers; _a < handlers_1.length; _a++) { + var handler = handlers_1[_a]; + handler.apply(this.thisContext, args); + } + }; + Emitter2.prototype.hasHandlers = function(type) { + return Boolean(this.handlers[type] && this.handlers[type].length || this.options && this.options[type]); + }; + return Emitter2; +}(); +function addToHash(hash, type, handler) { + (hash[type] || (hash[type] = [])).push(handler); } -var DEF_DEFAULTS = { - startTime: "09:00", - endTime: "17:00", - daysOfWeek: [1, 2, 3, 4, 5], - display: "inverse-background", - classNames: "fc-non-business", - groupId: "_businessHours" -}; -function parseBusinessHours(input, context) { - return parseEvents(refineInputs(input), null, context); -} -function refineInputs(input) { - var rawDefs; - if (input === true) { - rawDefs = [{}]; - } else if (Array.isArray(input)) { - rawDefs = input.filter(function(rawDef) { - return rawDef.daysOfWeek; - }); - } else if (typeof input === "object" && input) { - rawDefs = [input]; +function removeFromHash(hash, type, handler) { + if (handler) { + if (hash[type]) { + hash[type] = hash[type].filter(function(func) { + return func !== handler; + }); + } } else { - rawDefs = []; + delete hash[type]; } - rawDefs = rawDefs.map(function(rawDef) { - return __assign(__assign({}, DEF_DEFAULTS), rawDef); - }); - return rawDefs; -} -function pointInsideRect(point, rect) { - return point.left >= rect.left && point.left < rect.right && point.top >= rect.top && point.top < rect.bottom; } -function intersectRects(rect1, rect2) { - var res = { - left: Math.max(rect1.left, rect2.left), - right: Math.min(rect1.right, rect2.right), - top: Math.max(rect1.top, rect2.top), - bottom: Math.min(rect1.bottom, rect2.bottom) +var PositionCache = function() { + function PositionCache2(originEl, els, isHorizontal, isVertical) { + this.els = els; + var originClientRect = this.originClientRect = originEl.getBoundingClientRect(); + if (isHorizontal) { + this.buildElHorizontals(originClientRect.left); + } + if (isVertical) { + this.buildElVerticals(originClientRect.top); + } + } + PositionCache2.prototype.buildElHorizontals = function(originClientLeft) { + var lefts = []; + var rights = []; + for (var _i = 0, _a = this.els; _i < _a.length; _i++) { + var el = _a[_i]; + var rect = el.getBoundingClientRect(); + lefts.push(rect.left - originClientLeft); + rights.push(rect.right - originClientLeft); + } + this.lefts = lefts; + this.rights = rights; }; - if (res.left < res.right && res.top < res.bottom) { - return res; + PositionCache2.prototype.buildElVerticals = function(originClientTop) { + var tops = []; + var bottoms = []; + for (var _i = 0, _a = this.els; _i < _a.length; _i++) { + var el = _a[_i]; + var rect = el.getBoundingClientRect(); + tops.push(rect.top - originClientTop); + bottoms.push(rect.bottom - originClientTop); + } + this.tops = tops; + this.bottoms = bottoms; + }; + PositionCache2.prototype.leftToIndex = function(leftPosition) { + var _a = this, lefts = _a.lefts, rights = _a.rights; + var len = lefts.length; + var i3; + for (i3 = 0; i3 < len; i3 += 1) { + if (leftPosition >= lefts[i3] && leftPosition < rights[i3]) { + return i3; + } + } + return void 0; + }; + PositionCache2.prototype.topToIndex = function(topPosition) { + var _a = this, tops = _a.tops, bottoms = _a.bottoms; + var len = tops.length; + var i3; + for (i3 = 0; i3 < len; i3 += 1) { + if (topPosition >= tops[i3] && topPosition < bottoms[i3]) { + return i3; + } + } + return void 0; + }; + PositionCache2.prototype.getWidth = function(leftIndex) { + return this.rights[leftIndex] - this.lefts[leftIndex]; + }; + PositionCache2.prototype.getHeight = function(topIndex) { + return this.bottoms[topIndex] - this.tops[topIndex]; + }; + return PositionCache2; +}(); +var ScrollController = function() { + function ScrollController2() { } - return false; -} -function constrainPoint(point, rect) { - return { - left: Math.min(Math.max(point.left, rect.left), rect.right), - top: Math.min(Math.max(point.top, rect.top), rect.bottom) + ScrollController2.prototype.getMaxScrollTop = function() { + return this.getScrollHeight() - this.getClientHeight(); }; -} -function getRectCenter(rect) { - return { - left: (rect.left + rect.right) / 2, - top: (rect.top + rect.bottom) / 2 + ScrollController2.prototype.getMaxScrollLeft = function() { + return this.getScrollWidth() - this.getClientWidth(); }; -} -function diffPoints(point1, point2) { - return { - left: point1.left - point2.left, - top: point1.top - point2.top + ScrollController2.prototype.canScrollVertically = function() { + return this.getMaxScrollTop() > 0; }; -} -var canVGrowWithinCell; -function getCanVGrowWithinCell() { - if (canVGrowWithinCell == null) { - canVGrowWithinCell = computeCanVGrowWithinCell(); + ScrollController2.prototype.canScrollHorizontally = function() { + return this.getMaxScrollLeft() > 0; + }; + ScrollController2.prototype.canScrollUp = function() { + return this.getScrollTop() > 0; + }; + ScrollController2.prototype.canScrollDown = function() { + return this.getScrollTop() < this.getMaxScrollTop(); + }; + ScrollController2.prototype.canScrollLeft = function() { + return this.getScrollLeft() > 0; + }; + ScrollController2.prototype.canScrollRight = function() { + return this.getScrollLeft() < this.getMaxScrollLeft(); + }; + return ScrollController2; +}(); +var ElementScrollController = function(_super) { + __extends(ElementScrollController2, _super); + function ElementScrollController2(el) { + var _this = _super.call(this) || this; + _this.el = el; + return _this; } - return canVGrowWithinCell; -} -function computeCanVGrowWithinCell() { - if (typeof document === "undefined") { - return true; + ElementScrollController2.prototype.getScrollTop = function() { + return this.el.scrollTop; + }; + ElementScrollController2.prototype.getScrollLeft = function() { + return this.el.scrollLeft; + }; + ElementScrollController2.prototype.setScrollTop = function(top) { + this.el.scrollTop = top; + }; + ElementScrollController2.prototype.setScrollLeft = function(left) { + this.el.scrollLeft = left; + }; + ElementScrollController2.prototype.getScrollWidth = function() { + return this.el.scrollWidth; + }; + ElementScrollController2.prototype.getScrollHeight = function() { + return this.el.scrollHeight; + }; + ElementScrollController2.prototype.getClientHeight = function() { + return this.el.clientHeight; + }; + ElementScrollController2.prototype.getClientWidth = function() { + return this.el.clientWidth; + }; + return ElementScrollController2; +}(ScrollController); +var WindowScrollController = function(_super) { + __extends(WindowScrollController2, _super); + function WindowScrollController2() { + return _super !== null && _super.apply(this, arguments) || this; } - var el = document.createElement("div"); - el.style.position = "absolute"; - el.style.top = "0px"; - el.style.left = "0px"; - el.innerHTML = "
"; - el.querySelector("table").style.height = "100px"; - el.querySelector("div").style.height = "100%"; - document.body.appendChild(el); - var div = el.querySelector("div"); - var possible = div.offsetHeight > 0; - document.body.removeChild(el); - return possible; -} -var EMPTY_EVENT_STORE = createEmptyEventStore(); -var Splitter = function() { - function Splitter2() { - this.getKeysForEventDefs = memoize(this._getKeysForEventDefs); - this.splitDateSelection = memoize(this._splitDateSpan); - this.splitEventStore = memoize(this._splitEventStore); - this.splitIndividualUi = memoize(this._splitIndividualUi); - this.splitEventDrag = memoize(this._splitInteraction); - this.splitEventResize = memoize(this._splitInteraction); - this.eventUiBuilders = {}; + WindowScrollController2.prototype.getScrollTop = function() { + return window.pageYOffset; + }; + WindowScrollController2.prototype.getScrollLeft = function() { + return window.pageXOffset; + }; + WindowScrollController2.prototype.setScrollTop = function(n3) { + window.scroll(window.pageXOffset, n3); + }; + WindowScrollController2.prototype.setScrollLeft = function(n3) { + window.scroll(n3, window.pageYOffset); + }; + WindowScrollController2.prototype.getScrollWidth = function() { + return document.documentElement.scrollWidth; + }; + WindowScrollController2.prototype.getScrollHeight = function() { + return document.documentElement.scrollHeight; + }; + WindowScrollController2.prototype.getClientHeight = function() { + return document.documentElement.clientHeight; + }; + WindowScrollController2.prototype.getClientWidth = function() { + return document.documentElement.clientWidth; + }; + return WindowScrollController2; +}(ScrollController); +var Theme = function() { + function Theme2(calendarOptions) { + if (this.iconOverrideOption) { + this.setIconOverride(calendarOptions[this.iconOverrideOption]); + } } - Splitter2.prototype.splitProps = function(props) { - var _this = this; - var keyInfos = this.getKeyInfo(props); - var defKeys = this.getKeysForEventDefs(props.eventStore); - var dateSelections = this.splitDateSelection(props.dateSelection); - var individualUi = this.splitIndividualUi(props.eventUiBases, defKeys); - var eventStores = this.splitEventStore(props.eventStore, defKeys); - var eventDrags = this.splitEventDrag(props.eventDrag); - var eventResizes = this.splitEventResize(props.eventResize); - var splitProps = {}; - this.eventUiBuilders = mapHash(keyInfos, function(info, key2) { - return _this.eventUiBuilders[key2] || memoize(buildEventUiForKey); - }); - for (var key in keyInfos) { - var keyInfo = keyInfos[key]; - var eventStore = eventStores[key] || EMPTY_EVENT_STORE; - var buildEventUi = this.eventUiBuilders[key]; - splitProps[key] = { - businessHours: keyInfo.businessHours || props.businessHours, - dateSelection: dateSelections[key] || null, - eventStore, - eventUiBases: buildEventUi(props.eventUiBases[""], keyInfo.ui, individualUi[key]), - eventSelection: eventStore.instances[props.eventSelection] ? props.eventSelection : "", - eventDrag: eventDrags[key] || null, - eventResize: eventResizes[key] || null - }; + Theme2.prototype.setIconOverride = function(iconOverrideHash) { + var iconClassesCopy; + var buttonName; + if (typeof iconOverrideHash === "object" && iconOverrideHash) { + iconClassesCopy = __assign({}, this.iconClasses); + for (buttonName in iconOverrideHash) { + iconClassesCopy[buttonName] = this.applyIconOverridePrefix(iconOverrideHash[buttonName]); + } + this.iconClasses = iconClassesCopy; + } else if (iconOverrideHash === false) { + this.iconClasses = {}; } - return splitProps; }; - Splitter2.prototype._splitDateSpan = function(dateSpan) { - var dateSpans = {}; - if (dateSpan) { - var keys = this.getKeysForDateSpan(dateSpan); - for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) { - var key = keys_1[_i]; - dateSpans[key] = dateSpan; - } + Theme2.prototype.applyIconOverridePrefix = function(className) { + var prefix = this.iconOverridePrefix; + if (prefix && className.indexOf(prefix) !== 0) { + className = prefix + className; } - return dateSpans; + return className; }; - Splitter2.prototype._getKeysForEventDefs = function(eventStore) { - var _this = this; - return mapHash(eventStore.defs, function(eventDef) { - return _this.getKeysForEventDef(eventDef); - }); + Theme2.prototype.getClass = function(key) { + return this.classes[key] || ""; }; - Splitter2.prototype._splitEventStore = function(eventStore, defKeys) { - var defs = eventStore.defs, instances = eventStore.instances; - var splitStores = {}; - for (var defId in defs) { - for (var _i = 0, _a = defKeys[defId]; _i < _a.length; _i++) { - var key = _a[_i]; - if (!splitStores[key]) { - splitStores[key] = createEmptyEventStore(); - } - splitStores[key].defs[defId] = defs[defId]; - } + Theme2.prototype.getIconClass = function(buttonName, isRtl) { + var className; + if (isRtl && this.rtlIconClasses) { + className = this.rtlIconClasses[buttonName] || this.iconClasses[buttonName]; + } else { + className = this.iconClasses[buttonName]; } - for (var instanceId in instances) { - var instance = instances[instanceId]; - for (var _b = 0, _c = defKeys[instance.defId]; _b < _c.length; _b++) { - var key = _c[_b]; - if (splitStores[key]) { - splitStores[key].instances[instanceId] = instance; - } - } + if (className) { + return this.baseIconClass + " " + className; } - return splitStores; + return ""; }; - Splitter2.prototype._splitIndividualUi = function(eventUiBases, defKeys) { - var splitHashes = {}; - for (var defId in eventUiBases) { - if (defId) { - for (var _i = 0, _a = defKeys[defId]; _i < _a.length; _i++) { - var key = _a[_i]; - if (!splitHashes[key]) { - splitHashes[key] = {}; - } - splitHashes[key][defId] = eventUiBases[defId]; - } + Theme2.prototype.getCustomButtonIconClass = function(customButtonProps) { + var className; + if (this.iconOverrideCustomButtonOption) { + className = customButtonProps[this.iconOverrideCustomButtonOption]; + if (className) { + return this.baseIconClass + " " + this.applyIconOverridePrefix(className); } } - return splitHashes; + return ""; }; - Splitter2.prototype._splitInteraction = function(interaction) { - var splitStates = {}; - if (interaction) { - var affectedStores_1 = this._splitEventStore(interaction.affectedEvents, this._getKeysForEventDefs(interaction.affectedEvents)); - var mutatedKeysByDefId = this._getKeysForEventDefs(interaction.mutatedEvents); - var mutatedStores_1 = this._splitEventStore(interaction.mutatedEvents, mutatedKeysByDefId); - var populate = function(key2) { - if (!splitStates[key2]) { - splitStates[key2] = { - affectedEvents: affectedStores_1[key2] || EMPTY_EVENT_STORE, - mutatedEvents: mutatedStores_1[key2] || EMPTY_EVENT_STORE, - isEvent: interaction.isEvent - }; - } - }; - for (var key in affectedStores_1) { - populate(key); - } - for (var key in mutatedStores_1) { - populate(key); - } + return Theme2; +}(); +Theme.prototype.classes = {}; +Theme.prototype.iconClasses = {}; +Theme.prototype.baseIconClass = ""; +Theme.prototype.iconOverridePrefix = ""; +var ScrollResponder = function() { + function ScrollResponder2(execFunc, emitter, scrollTime, scrollTimeReset) { + var _this = this; + this.execFunc = execFunc; + this.emitter = emitter; + this.scrollTime = scrollTime; + this.scrollTimeReset = scrollTimeReset; + this.handleScrollRequest = function(request2) { + _this.queuedRequest = __assign({}, _this.queuedRequest || {}, request2); + _this.drain(); + }; + emitter.on("_scrollRequest", this.handleScrollRequest); + this.fireInitialScroll(); + } + ScrollResponder2.prototype.detach = function() { + this.emitter.off("_scrollRequest", this.handleScrollRequest); + }; + ScrollResponder2.prototype.update = function(isDatesNew) { + if (isDatesNew && this.scrollTimeReset) { + this.fireInitialScroll(); + } else { + this.drain(); } - return splitStates; }; - return Splitter2; -}(); -function buildEventUiForKey(allUi, eventUiForKey, individualUi) { - var baseParts = []; - if (allUi) { - baseParts.push(allUi); - } - if (eventUiForKey) { - baseParts.push(eventUiForKey); - } - var stuff = { - "": combineEventUis(baseParts) + ScrollResponder2.prototype.fireInitialScroll = function() { + this.handleScrollRequest({ + time: this.scrollTime + }); }; - if (individualUi) { - __assign(stuff, individualUi); - } - return stuff; -} -function getDateMeta(date, todayRange, nowDate, dateProfile) { + ScrollResponder2.prototype.drain = function() { + if (this.queuedRequest && this.execFunc(this.queuedRequest)) { + this.queuedRequest = null; + } + }; + return ScrollResponder2; +}(); +var ViewContextType = createContext2({}); +function buildViewContext(viewSpec, viewApi, viewOptions, dateProfileGenerator, dateEnv, theme, pluginHooks, dispatch, getCurrentData, emitter, calendarApi, registerInteractiveComponent, unregisterInteractiveComponent) { return { - dow: date.getUTCDay(), - isDisabled: Boolean(dateProfile && !rangeContainsMarker(dateProfile.activeRange, date)), - isOther: Boolean(dateProfile && !rangeContainsMarker(dateProfile.currentRange, date)), - isToday: Boolean(todayRange && rangeContainsMarker(todayRange, date)), - isPast: Boolean(nowDate ? date < nowDate : todayRange ? date < todayRange.start : false), - isFuture: Boolean(nowDate ? date > nowDate : todayRange ? date >= todayRange.end : false) + dateEnv, + options: viewOptions, + pluginHooks, + emitter, + dispatch, + getCurrentData, + calendarApi, + viewSpec, + viewApi, + dateProfileGenerator, + theme, + isRtl: viewOptions.direction === "rtl", + addResizeHandler: function(handler) { + emitter.on("_resize", handler); + }, + removeResizeHandler: function(handler) { + emitter.off("_resize", handler); + }, + createScrollResponder: function(execFunc) { + return new ScrollResponder(execFunc, emitter, createDuration(viewOptions.scrollTime), viewOptions.scrollTimeReset); + }, + registerInteractiveComponent, + unregisterInteractiveComponent }; } -function getDayClassNames(meta, theme) { - var classNames = [ - "fc-day", - "fc-day-" + DAY_IDS[meta.dow] - ]; - if (meta.isDisabled) { - classNames.push("fc-day-disabled"); - } else { - if (meta.isToday) { - classNames.push("fc-day-today"); - classNames.push(theme.getClass("today")); - } - if (meta.isPast) { - classNames.push("fc-day-past"); - } - if (meta.isFuture) { - classNames.push("fc-day-future"); +var PureComponent = function(_super) { + __extends(PureComponent2, _super); + function PureComponent2() { + return _super !== null && _super.apply(this, arguments) || this; + } + PureComponent2.prototype.shouldComponentUpdate = function(nextProps, nextState) { + if (this.debug) { + console.log(getUnequalProps(nextProps, this.props), getUnequalProps(nextState, this.state)); } - if (meta.isOther) { - classNames.push("fc-day-other"); + return !compareObjs(this.props, nextProps, this.propEquality) || !compareObjs(this.state, nextState, this.stateEquality); + }; + PureComponent2.prototype.safeSetState = function(newState) { + if (!compareObjs(this.state, __assign(__assign({}, this.state), newState), this.stateEquality)) { + this.setState(newState); } + }; + PureComponent2.addPropsEquality = addPropsEquality; + PureComponent2.addStateEquality = addStateEquality; + PureComponent2.contextType = ViewContextType; + return PureComponent2; +}(Component); +PureComponent.prototype.propEquality = {}; +PureComponent.prototype.stateEquality = {}; +var BaseComponent = function(_super) { + __extends(BaseComponent2, _super); + function BaseComponent2() { + return _super !== null && _super.apply(this, arguments) || this; } - return classNames; + BaseComponent2.contextType = ViewContextType; + return BaseComponent2; +}(PureComponent); +function addPropsEquality(propEquality) { + var hash = Object.create(this.prototype.propEquality); + __assign(hash, propEquality); + this.prototype.propEquality = hash; } -var DAY_FORMAT = createFormatter({ year: "numeric", month: "long", day: "numeric" }); -var WEEK_FORMAT = createFormatter({ week: "long" }); -function buildNavLinkAttrs(context, dateMarker, viewType, isTabbable) { - if (viewType === void 0) { - viewType = "day"; - } - if (isTabbable === void 0) { - isTabbable = true; - } - var dateEnv = context.dateEnv, options = context.options, calendarApi = context.calendarApi; - var dateStr = dateEnv.format(dateMarker, viewType === "week" ? WEEK_FORMAT : DAY_FORMAT); - if (options.navLinks) { - var zonedDate = dateEnv.toDate(dateMarker); - var handleInteraction = function(ev) { - var customAction = viewType === "day" ? options.navLinkDayClick : viewType === "week" ? options.navLinkWeekClick : null; - if (typeof customAction === "function") { - customAction.call(calendarApi, dateEnv.toDate(dateMarker), ev); - } else { - if (typeof customAction === "string") { - viewType = customAction; - } - calendarApi.zoomTo(dateMarker, viewType); - } - }; - return __assign({ title: formatWithOrdinals(options.navLinkHint, [dateStr, zonedDate], dateStr), "data-navlink": "" }, isTabbable ? createAriaClickAttrs(handleInteraction) : { onClick: handleInteraction }); - } - return { "aria-label": dateStr }; +function addStateEquality(stateEquality) { + var hash = Object.create(this.prototype.stateEquality); + __assign(hash, stateEquality); + this.prototype.stateEquality = hash; } -var _isRtlScrollbarOnLeft = null; -function getIsRtlScrollbarOnLeft() { - if (_isRtlScrollbarOnLeft === null) { - _isRtlScrollbarOnLeft = computeIsRtlScrollbarOnLeft(); +function setRef(ref, current) { + if (typeof ref === "function") { + ref(current); + } else if (ref) { + ref.current = current; } - return _isRtlScrollbarOnLeft; -} -function computeIsRtlScrollbarOnLeft() { - var outerEl = document.createElement("div"); - applyStyle(outerEl, { - position: "absolute", - top: -1e3, - left: 0, - border: 0, - padding: 0, - overflow: "scroll", - direction: "rtl" - }); - outerEl.innerHTML = "
"; - document.body.appendChild(outerEl); - var innerEl = outerEl.firstChild; - var res = innerEl.getBoundingClientRect().left > outerEl.getBoundingClientRect().left; - removeElement(outerEl); - return res; } -var _scrollbarWidths; -function getScrollbarWidths() { - if (!_scrollbarWidths) { - _scrollbarWidths = computeScrollbarWidths(); +var DateComponent = function(_super) { + __extends(DateComponent2, _super); + function DateComponent2() { + var _this = _super !== null && _super.apply(this, arguments) || this; + _this.uid = guid(); + return _this; } - return _scrollbarWidths; -} -function computeScrollbarWidths() { - var el = document.createElement("div"); - el.style.overflow = "scroll"; - el.style.position = "absolute"; - el.style.top = "-9999px"; - el.style.left = "-9999px"; - document.body.appendChild(el); - var res = computeScrollbarWidthsForEl(el); - document.body.removeChild(el); - return res; -} -function computeScrollbarWidthsForEl(el) { + DateComponent2.prototype.prepareHits = function() { + }; + DateComponent2.prototype.queryHit = function(positionLeft, positionTop, elWidth, elHeight) { + return null; + }; + DateComponent2.prototype.isValidSegDownEl = function(el) { + return !this.props.eventDrag && !this.props.eventResize && !elementClosest(el, ".fc-event-mirror"); + }; + DateComponent2.prototype.isValidDateDownEl = function(el) { + return !elementClosest(el, ".fc-event:not(.fc-bg-event)") && !elementClosest(el, ".fc-more-link") && !elementClosest(el, "a[data-navlink]") && !elementClosest(el, ".fc-popover"); + }; + return DateComponent2; +}(BaseComponent); +function createPlugin(input) { return { - x: el.offsetHeight - el.clientHeight, - y: el.offsetWidth - el.clientWidth + id: guid(), + deps: input.deps || [], + reducers: input.reducers || [], + isLoadingFuncs: input.isLoadingFuncs || [], + contextInit: [].concat(input.contextInit || []), + eventRefiners: input.eventRefiners || {}, + eventDefMemberAdders: input.eventDefMemberAdders || [], + eventSourceRefiners: input.eventSourceRefiners || {}, + isDraggableTransformers: input.isDraggableTransformers || [], + eventDragMutationMassagers: input.eventDragMutationMassagers || [], + eventDefMutationAppliers: input.eventDefMutationAppliers || [], + dateSelectionTransformers: input.dateSelectionTransformers || [], + datePointTransforms: input.datePointTransforms || [], + dateSpanTransforms: input.dateSpanTransforms || [], + views: input.views || {}, + viewPropsTransformers: input.viewPropsTransformers || [], + isPropsValid: input.isPropsValid || null, + externalDefTransforms: input.externalDefTransforms || [], + viewContainerAppends: input.viewContainerAppends || [], + eventDropTransformers: input.eventDropTransformers || [], + componentInteractions: input.componentInteractions || [], + calendarInteractions: input.calendarInteractions || [], + themeClasses: input.themeClasses || {}, + eventSourceDefs: input.eventSourceDefs || [], + cmdFormatter: input.cmdFormatter, + recurringTypes: input.recurringTypes || [], + namedTimeZonedImpl: input.namedTimeZonedImpl, + initialView: input.initialView || "", + elementDraggingImpl: input.elementDraggingImpl, + optionChangeHandlers: input.optionChangeHandlers || {}, + scrollGridImpl: input.scrollGridImpl || null, + contentTypeHandlers: input.contentTypeHandlers || {}, + listenerRefiners: input.listenerRefiners || {}, + optionRefiners: input.optionRefiners || {}, + propSetHandlers: input.propSetHandlers || {} }; } -function computeEdges(el, getPadding) { - if (getPadding === void 0) { - getPadding = false; - } - var computedStyle = window.getComputedStyle(el); - var borderLeft = parseInt(computedStyle.borderLeftWidth, 10) || 0; - var borderRight = parseInt(computedStyle.borderRightWidth, 10) || 0; - var borderTop = parseInt(computedStyle.borderTopWidth, 10) || 0; - var borderBottom = parseInt(computedStyle.borderBottomWidth, 10) || 0; - var badScrollbarWidths = computeScrollbarWidthsForEl(el); - var scrollbarLeftRight = badScrollbarWidths.y - borderLeft - borderRight; - var scrollbarBottom = badScrollbarWidths.x - borderTop - borderBottom; - var res = { - borderLeft, - borderRight, - borderTop, - borderBottom, - scrollbarBottom, - scrollbarLeft: 0, - scrollbarRight: 0 +function buildPluginHooks(pluginDefs, globalDefs) { + var isAdded = {}; + var hooks = { + reducers: [], + isLoadingFuncs: [], + contextInit: [], + eventRefiners: {}, + eventDefMemberAdders: [], + eventSourceRefiners: {}, + isDraggableTransformers: [], + eventDragMutationMassagers: [], + eventDefMutationAppliers: [], + dateSelectionTransformers: [], + datePointTransforms: [], + dateSpanTransforms: [], + views: {}, + viewPropsTransformers: [], + isPropsValid: null, + externalDefTransforms: [], + viewContainerAppends: [], + eventDropTransformers: [], + componentInteractions: [], + calendarInteractions: [], + themeClasses: {}, + eventSourceDefs: [], + cmdFormatter: null, + recurringTypes: [], + namedTimeZonedImpl: null, + initialView: "", + elementDraggingImpl: null, + optionChangeHandlers: {}, + scrollGridImpl: null, + contentTypeHandlers: {}, + listenerRefiners: {}, + optionRefiners: {}, + propSetHandlers: {} }; - if (getIsRtlScrollbarOnLeft() && computedStyle.direction === "rtl") { - res.scrollbarLeft = scrollbarLeftRight; - } else { - res.scrollbarRight = scrollbarLeftRight; + function addDefs(defs) { + for (var _i = 0, defs_1 = defs; _i < defs_1.length; _i++) { + var def = defs_1[_i]; + if (!isAdded[def.id]) { + isAdded[def.id] = true; + addDefs(def.deps); + hooks = combineHooks(hooks, def); + } + } } - if (getPadding) { - res.paddingLeft = parseInt(computedStyle.paddingLeft, 10) || 0; - res.paddingRight = parseInt(computedStyle.paddingRight, 10) || 0; - res.paddingTop = parseInt(computedStyle.paddingTop, 10) || 0; - res.paddingBottom = parseInt(computedStyle.paddingBottom, 10) || 0; + if (pluginDefs) { + addDefs(pluginDefs); } - return res; + addDefs(globalDefs); + return hooks; } -function computeInnerRect(el, goWithinPadding, doFromWindowViewport) { - if (goWithinPadding === void 0) { - goWithinPadding = false; - } - var outerRect = doFromWindowViewport ? el.getBoundingClientRect() : computeRect(el); - var edges = computeEdges(el, goWithinPadding); - var res = { - left: outerRect.left + edges.borderLeft + edges.scrollbarLeft, - right: outerRect.right - edges.borderRight - edges.scrollbarRight, - top: outerRect.top + edges.borderTop, - bottom: outerRect.bottom - edges.borderBottom - edges.scrollbarBottom +function buildBuildPluginHooks() { + var currentOverrideDefs = []; + var currentGlobalDefs = []; + var currentHooks; + return function(overrideDefs, globalDefs) { + if (!currentHooks || !isArraysEqual(overrideDefs, currentOverrideDefs) || !isArraysEqual(globalDefs, currentGlobalDefs)) { + currentHooks = buildPluginHooks(overrideDefs, globalDefs); + } + currentOverrideDefs = overrideDefs; + currentGlobalDefs = globalDefs; + return currentHooks; }; - if (goWithinPadding) { - res.left += edges.paddingLeft; - res.right -= edges.paddingRight; - res.top += edges.paddingTop; - res.bottom -= edges.paddingBottom; - } - return res; } -function computeRect(el) { - var rect = el.getBoundingClientRect(); +function combineHooks(hooks0, hooks1) { return { - left: rect.left + window.pageXOffset, - top: rect.top + window.pageYOffset, - right: rect.right + window.pageXOffset, - bottom: rect.bottom + window.pageYOffset + reducers: hooks0.reducers.concat(hooks1.reducers), + isLoadingFuncs: hooks0.isLoadingFuncs.concat(hooks1.isLoadingFuncs), + contextInit: hooks0.contextInit.concat(hooks1.contextInit), + eventRefiners: __assign(__assign({}, hooks0.eventRefiners), hooks1.eventRefiners), + eventDefMemberAdders: hooks0.eventDefMemberAdders.concat(hooks1.eventDefMemberAdders), + eventSourceRefiners: __assign(__assign({}, hooks0.eventSourceRefiners), hooks1.eventSourceRefiners), + isDraggableTransformers: hooks0.isDraggableTransformers.concat(hooks1.isDraggableTransformers), + eventDragMutationMassagers: hooks0.eventDragMutationMassagers.concat(hooks1.eventDragMutationMassagers), + eventDefMutationAppliers: hooks0.eventDefMutationAppliers.concat(hooks1.eventDefMutationAppliers), + dateSelectionTransformers: hooks0.dateSelectionTransformers.concat(hooks1.dateSelectionTransformers), + datePointTransforms: hooks0.datePointTransforms.concat(hooks1.datePointTransforms), + dateSpanTransforms: hooks0.dateSpanTransforms.concat(hooks1.dateSpanTransforms), + views: __assign(__assign({}, hooks0.views), hooks1.views), + viewPropsTransformers: hooks0.viewPropsTransformers.concat(hooks1.viewPropsTransformers), + isPropsValid: hooks1.isPropsValid || hooks0.isPropsValid, + externalDefTransforms: hooks0.externalDefTransforms.concat(hooks1.externalDefTransforms), + viewContainerAppends: hooks0.viewContainerAppends.concat(hooks1.viewContainerAppends), + eventDropTransformers: hooks0.eventDropTransformers.concat(hooks1.eventDropTransformers), + calendarInteractions: hooks0.calendarInteractions.concat(hooks1.calendarInteractions), + componentInteractions: hooks0.componentInteractions.concat(hooks1.componentInteractions), + themeClasses: __assign(__assign({}, hooks0.themeClasses), hooks1.themeClasses), + eventSourceDefs: hooks0.eventSourceDefs.concat(hooks1.eventSourceDefs), + cmdFormatter: hooks1.cmdFormatter || hooks0.cmdFormatter, + recurringTypes: hooks0.recurringTypes.concat(hooks1.recurringTypes), + namedTimeZonedImpl: hooks1.namedTimeZonedImpl || hooks0.namedTimeZonedImpl, + initialView: hooks0.initialView || hooks1.initialView, + elementDraggingImpl: hooks0.elementDraggingImpl || hooks1.elementDraggingImpl, + optionChangeHandlers: __assign(__assign({}, hooks0.optionChangeHandlers), hooks1.optionChangeHandlers), + scrollGridImpl: hooks1.scrollGridImpl || hooks0.scrollGridImpl, + contentTypeHandlers: __assign(__assign({}, hooks0.contentTypeHandlers), hooks1.contentTypeHandlers), + listenerRefiners: __assign(__assign({}, hooks0.listenerRefiners), hooks1.listenerRefiners), + optionRefiners: __assign(__assign({}, hooks0.optionRefiners), hooks1.optionRefiners), + propSetHandlers: __assign(__assign({}, hooks0.propSetHandlers), hooks1.propSetHandlers) }; } -function computeClippedClientRect(el) { - var clippingParents = getClippingParents(el); - var rect = el.getBoundingClientRect(); - for (var _i = 0, clippingParents_1 = clippingParents; _i < clippingParents_1.length; _i++) { - var clippingParent = clippingParents_1[_i]; - var intersection = intersectRects(rect, clippingParent.getBoundingClientRect()); - if (intersection) { - rect = intersection; - } else { - return null; - } +var StandardTheme = function(_super) { + __extends(StandardTheme2, _super); + function StandardTheme2() { + return _super !== null && _super.apply(this, arguments) || this; } - return rect; + return StandardTheme2; +}(Theme); +StandardTheme.prototype.classes = { + root: "fc-theme-standard", + tableCellShaded: "fc-cell-shaded", + buttonGroup: "fc-button-group", + button: "fc-button fc-button-primary", + buttonActive: "fc-button-active" +}; +StandardTheme.prototype.baseIconClass = "fc-icon"; +StandardTheme.prototype.iconClasses = { + close: "fc-icon-x", + prev: "fc-icon-chevron-left", + next: "fc-icon-chevron-right", + prevYear: "fc-icon-chevrons-left", + nextYear: "fc-icon-chevrons-right" +}; +StandardTheme.prototype.rtlIconClasses = { + prev: "fc-icon-chevron-right", + next: "fc-icon-chevron-left", + prevYear: "fc-icon-chevrons-right", + nextYear: "fc-icon-chevrons-left" +}; +StandardTheme.prototype.iconOverrideOption = "buttonIcons"; +StandardTheme.prototype.iconOverrideCustomButtonOption = "icon"; +StandardTheme.prototype.iconOverridePrefix = "fc-icon-"; +function compileViewDefs(defaultConfigs, overrideConfigs) { + var hash = {}; + var viewType; + for (viewType in defaultConfigs) { + ensureViewDef(viewType, hash, defaultConfigs, overrideConfigs); + } + for (viewType in overrideConfigs) { + ensureViewDef(viewType, hash, defaultConfigs, overrideConfigs); + } + return hash; } -function getClippingParents(el) { - var parents = []; - while (el instanceof HTMLElement) { - var computedStyle = window.getComputedStyle(el); - if (computedStyle.position === "fixed") { - break; - } - if (/(auto|scroll)/.test(computedStyle.overflow + computedStyle.overflowY + computedStyle.overflowX)) { - parents.push(el); - } - el = el.parentNode; +function ensureViewDef(viewType, hash, defaultConfigs, overrideConfigs) { + if (hash[viewType]) { + return hash[viewType]; } - return parents; + var viewDef = buildViewDef(viewType, hash, defaultConfigs, overrideConfigs); + if (viewDef) { + hash[viewType] = viewDef; + } + return viewDef; } -function unpromisify(func, success, failure) { - var isResolved = false; - var wrappedSuccess = function() { - if (!isResolved) { - isResolved = true; - success.apply(this, arguments); +function buildViewDef(viewType, hash, defaultConfigs, overrideConfigs) { + var defaultConfig = defaultConfigs[viewType]; + var overrideConfig = overrideConfigs[viewType]; + var queryProp = function(name) { + return defaultConfig && defaultConfig[name] !== null ? defaultConfig[name] : overrideConfig && overrideConfig[name] !== null ? overrideConfig[name] : null; + }; + var theComponent = queryProp("component"); + var superType = queryProp("superType"); + var superDef = null; + if (superType) { + if (superType === viewType) { + throw new Error("Can't have a custom view type that references itself"); } + superDef = ensureViewDef(superType, hash, defaultConfigs, overrideConfigs); + } + if (!theComponent && superDef) { + theComponent = superDef.component; + } + if (!theComponent) { + return null; + } + return { + type: viewType, + component: theComponent, + defaults: __assign(__assign({}, superDef ? superDef.defaults : {}), defaultConfig ? defaultConfig.rawOptions : {}), + overrides: __assign(__assign({}, superDef ? superDef.overrides : {}), overrideConfig ? overrideConfig.rawOptions : {}) }; - var wrappedFailure = function() { - if (!isResolved) { - isResolved = true; - if (failure) { - failure.apply(this, arguments); +} +var RenderHook = function(_super) { + __extends(RenderHook2, _super); + function RenderHook2() { + var _this = _super !== null && _super.apply(this, arguments) || this; + _this.rootElRef = createRef(); + _this.handleRootEl = function(el) { + setRef(_this.rootElRef, el); + if (_this.props.elRef) { + setRef(_this.props.elRef, el); } - } - }; - var res = func(wrappedSuccess, wrappedFailure); - if (res && typeof res.then === "function") { - res.then(wrappedSuccess, wrappedFailure); + }; + return _this; } + RenderHook2.prototype.render = function() { + var _this = this; + var props = this.props; + var hookProps = props.hookProps; + return createElement(MountHook, { hookProps, didMount: props.didMount, willUnmount: props.willUnmount, elRef: this.handleRootEl }, function(rootElRef) { + return createElement(ContentHook, { hookProps, content: props.content, defaultContent: props.defaultContent, backupElRef: _this.rootElRef }, function(innerElRef, innerContent) { + return props.children(rootElRef, normalizeClassNames(props.classNames, hookProps), innerElRef, innerContent); + }); + }); + }; + return RenderHook2; +}(BaseComponent); +var CustomContentRenderContext = createContext2(0); +function ContentHook(props) { + return createElement(CustomContentRenderContext.Consumer, null, function(renderId) { + return createElement(ContentHookInner, __assign({ renderId }, props)); + }); } -var Emitter = function() { - function Emitter2() { - this.handlers = {}; - this.thisContext = null; +var ContentHookInner = function(_super) { + __extends(ContentHookInner2, _super); + function ContentHookInner2() { + var _this = _super !== null && _super.apply(this, arguments) || this; + _this.innerElRef = createRef(); + return _this; } - Emitter2.prototype.setThisContext = function(thisContext) { - this.thisContext = thisContext; - }; - Emitter2.prototype.setOptions = function(options) { - this.options = options; + ContentHookInner2.prototype.render = function() { + return this.props.children(this.innerElRef, this.renderInnerContent()); }; - Emitter2.prototype.on = function(type, handler) { - addToHash(this.handlers, type, handler); + ContentHookInner2.prototype.componentDidMount = function() { + this.updateCustomContent(); }; - Emitter2.prototype.off = function(type, handler) { - removeFromHash(this.handlers, type, handler); + ContentHookInner2.prototype.componentDidUpdate = function() { + this.updateCustomContent(); }; - Emitter2.prototype.trigger = function(type) { - var args = []; - for (var _i = 1; _i < arguments.length; _i++) { - args[_i - 1] = arguments[_i]; - } - var attachedHandlers = this.handlers[type] || []; - var optionHandler = this.options && this.options[type]; - var handlers = [].concat(optionHandler || [], attachedHandlers); - for (var _a = 0, handlers_1 = handlers; _a < handlers_1.length; _a++) { - var handler = handlers_1[_a]; - handler.apply(this.thisContext, args); + ContentHookInner2.prototype.componentWillUnmount = function() { + if (this.customContentInfo && this.customContentInfo.destroy) { + this.customContentInfo.destroy(); } }; - Emitter2.prototype.hasHandlers = function(type) { - return Boolean(this.handlers[type] && this.handlers[type].length || this.options && this.options[type]); - }; - return Emitter2; -}(); -function addToHash(hash, type, handler) { - (hash[type] || (hash[type] = [])).push(handler); -} -function removeFromHash(hash, type, handler) { - if (handler) { - if (hash[type]) { - hash[type] = hash[type].filter(function(func) { - return func !== handler; - }); - } - } else { - delete hash[type]; - } -} -var PositionCache = function() { - function PositionCache2(originEl, els, isHorizontal, isVertical) { - this.els = els; - var originClientRect = this.originClientRect = originEl.getBoundingClientRect(); - if (isHorizontal) { - this.buildElHorizontals(originClientRect.left); - } - if (isVertical) { - this.buildElVerticals(originClientRect.top); - } - } - PositionCache2.prototype.buildElHorizontals = function(originClientLeft) { - var lefts = []; - var rights = []; - for (var _i = 0, _a = this.els; _i < _a.length; _i++) { - var el = _a[_i]; - var rect = el.getBoundingClientRect(); - lefts.push(rect.left - originClientLeft); - rights.push(rect.right - originClientLeft); + ContentHookInner2.prototype.renderInnerContent = function() { + var customContentInfo = this.customContentInfo; + var innerContent = this.getInnerContent(); + var meta = this.getContentMeta(innerContent); + if (!customContentInfo || customContentInfo.contentKey !== meta.contentKey) { + if (customContentInfo) { + if (customContentInfo.destroy) { + customContentInfo.destroy(); + } + customContentInfo = this.customContentInfo = null; + } + if (meta.contentKey) { + customContentInfo = this.customContentInfo = __assign({ contentKey: meta.contentKey, contentVal: innerContent[meta.contentKey] }, meta.buildLifecycleFuncs()); + } + } else if (customContentInfo) { + customContentInfo.contentVal = innerContent[meta.contentKey]; } - this.lefts = lefts; - this.rights = rights; + return customContentInfo ? [] : innerContent; }; - PositionCache2.prototype.buildElVerticals = function(originClientTop) { - var tops = []; - var bottoms = []; - for (var _i = 0, _a = this.els; _i < _a.length; _i++) { - var el = _a[_i]; - var rect = el.getBoundingClientRect(); - tops.push(rect.top - originClientTop); - bottoms.push(rect.bottom - originClientTop); + ContentHookInner2.prototype.getInnerContent = function() { + var props = this.props; + var innerContent = normalizeContent(props.content, props.hookProps); + if (innerContent === void 0) { + innerContent = normalizeContent(props.defaultContent, props.hookProps); } - this.tops = tops; - this.bottoms = bottoms; + return innerContent == null ? null : innerContent; }; - PositionCache2.prototype.leftToIndex = function(leftPosition) { - var _a = this, lefts = _a.lefts, rights = _a.rights; - var len = lefts.length; - var i3; - for (i3 = 0; i3 < len; i3 += 1) { - if (leftPosition >= lefts[i3] && leftPosition < rights[i3]) { - return i3; + ContentHookInner2.prototype.getContentMeta = function(innerContent) { + var contentTypeHandlers = this.context.pluginHooks.contentTypeHandlers; + var contentKey = ""; + var buildLifecycleFuncs = null; + if (innerContent) { + for (var searchKey in contentTypeHandlers) { + if (innerContent[searchKey] !== void 0) { + contentKey = searchKey; + buildLifecycleFuncs = contentTypeHandlers[searchKey]; + break; + } } } - return void 0; + return { contentKey, buildLifecycleFuncs }; }; - PositionCache2.prototype.topToIndex = function(topPosition) { - var _a = this, tops = _a.tops, bottoms = _a.bottoms; - var len = tops.length; - var i3; - for (i3 = 0; i3 < len; i3 += 1) { - if (topPosition >= tops[i3] && topPosition < bottoms[i3]) { - return i3; - } + ContentHookInner2.prototype.updateCustomContent = function() { + if (this.customContentInfo) { + this.customContentInfo.render(this.innerElRef.current || this.props.backupElRef.current, this.customContentInfo.contentVal); } - return void 0; }; - PositionCache2.prototype.getWidth = function(leftIndex) { - return this.rights[leftIndex] - this.lefts[leftIndex]; - }; - PositionCache2.prototype.getHeight = function(topIndex) { - return this.bottoms[topIndex] - this.tops[topIndex]; - }; - return PositionCache2; -}(); -var ScrollController = function() { - function ScrollController2() { + return ContentHookInner2; +}(BaseComponent); +var MountHook = function(_super) { + __extends(MountHook2, _super); + function MountHook2() { + var _this = _super !== null && _super.apply(this, arguments) || this; + _this.handleRootEl = function(rootEl) { + _this.rootEl = rootEl; + if (_this.props.elRef) { + setRef(_this.props.elRef, rootEl); + } + }; + return _this; } - ScrollController2.prototype.getMaxScrollTop = function() { - return this.getScrollHeight() - this.getClientHeight(); - }; - ScrollController2.prototype.getMaxScrollLeft = function() { - return this.getScrollWidth() - this.getClientWidth(); - }; - ScrollController2.prototype.canScrollVertically = function() { - return this.getMaxScrollTop() > 0; - }; - ScrollController2.prototype.canScrollHorizontally = function() { - return this.getMaxScrollLeft() > 0; - }; - ScrollController2.prototype.canScrollUp = function() { - return this.getScrollTop() > 0; + MountHook2.prototype.render = function() { + return this.props.children(this.handleRootEl); }; - ScrollController2.prototype.canScrollDown = function() { - return this.getScrollTop() < this.getMaxScrollTop(); + MountHook2.prototype.componentDidMount = function() { + var callback = this.props.didMount; + if (callback) { + callback(__assign(__assign({}, this.props.hookProps), { el: this.rootEl })); + } }; - ScrollController2.prototype.canScrollLeft = function() { - return this.getScrollLeft() > 0; + MountHook2.prototype.componentWillUnmount = function() { + var callback = this.props.willUnmount; + if (callback) { + callback(__assign(__assign({}, this.props.hookProps), { el: this.rootEl })); + } }; - ScrollController2.prototype.canScrollRight = function() { - return this.getScrollLeft() < this.getMaxScrollLeft(); + return MountHook2; +}(BaseComponent); +function buildClassNameNormalizer() { + var currentGenerator; + var currentHookProps; + var currentClassNames = []; + return function(generator, hookProps) { + if (!currentHookProps || !isPropsEqual(currentHookProps, hookProps) || generator !== currentGenerator) { + currentGenerator = generator; + currentHookProps = hookProps; + currentClassNames = normalizeClassNames(generator, hookProps); + } + return currentClassNames; }; - return ScrollController2; -}(); -var ElementScrollController = function(_super) { - __extends(ElementScrollController2, _super); - function ElementScrollController2(el) { - var _this = _super.call(this) || this; - _this.el = el; +} +function normalizeClassNames(classNames, hookProps) { + if (typeof classNames === "function") { + classNames = classNames(hookProps); + } + return parseClassNames(classNames); +} +function normalizeContent(input, hookProps) { + if (typeof input === "function") { + return input(hookProps, createElement); + } + return input; +} +var ViewRoot = function(_super) { + __extends(ViewRoot2, _super); + function ViewRoot2() { + var _this = _super !== null && _super.apply(this, arguments) || this; + _this.normalizeClassNames = buildClassNameNormalizer(); return _this; } - ElementScrollController2.prototype.getScrollTop = function() { - return this.el.scrollTop; - }; - ElementScrollController2.prototype.getScrollLeft = function() { - return this.el.scrollLeft; - }; - ElementScrollController2.prototype.setScrollTop = function(top) { - this.el.scrollTop = top; + ViewRoot2.prototype.render = function() { + var _a = this, props = _a.props, context = _a.context; + var options = context.options; + var hookProps = { view: context.viewApi }; + var customClassNames = this.normalizeClassNames(options.viewClassNames, hookProps); + return createElement(MountHook, { hookProps, didMount: options.viewDidMount, willUnmount: options.viewWillUnmount, elRef: props.elRef }, function(rootElRef) { + return props.children(rootElRef, ["fc-" + props.viewSpec.type + "-view", "fc-view"].concat(customClassNames)); + }); }; - ElementScrollController2.prototype.setScrollLeft = function(left) { - this.el.scrollLeft = left; + return ViewRoot2; +}(BaseComponent); +function parseViewConfigs(inputs) { + return mapHash(inputs, parseViewConfig); +} +function parseViewConfig(input) { + var rawOptions = typeof input === "function" ? { component: input } : input; + var component = rawOptions.component; + if (rawOptions.content) { + component = createViewHookComponent(rawOptions); + } + return { + superType: rawOptions.type, + component, + rawOptions }; - ElementScrollController2.prototype.getScrollWidth = function() { - return this.el.scrollWidth; +} +function createViewHookComponent(options) { + return function(viewProps) { + return createElement(ViewContextType.Consumer, null, function(context) { + return createElement(ViewRoot, { viewSpec: context.viewSpec }, function(viewElRef, viewClassNames) { + var hookProps = __assign(__assign({}, viewProps), { nextDayThreshold: context.options.nextDayThreshold }); + return createElement(RenderHook, { hookProps, classNames: options.classNames, content: options.content, didMount: options.didMount, willUnmount: options.willUnmount, elRef: viewElRef }, function(rootElRef, customClassNames, innerElRef, innerContent) { + return createElement("div", { className: viewClassNames.concat(customClassNames).join(" "), ref: rootElRef }, innerContent); + }); + }); + }); }; - ElementScrollController2.prototype.getScrollHeight = function() { - return this.el.scrollHeight; +} +function buildViewSpecs(defaultInputs, optionOverrides, dynamicOptionOverrides, localeDefaults) { + var defaultConfigs = parseViewConfigs(defaultInputs); + var overrideConfigs = parseViewConfigs(optionOverrides.views); + var viewDefs = compileViewDefs(defaultConfigs, overrideConfigs); + return mapHash(viewDefs, function(viewDef) { + return buildViewSpec(viewDef, overrideConfigs, optionOverrides, dynamicOptionOverrides, localeDefaults); + }); +} +function buildViewSpec(viewDef, overrideConfigs, optionOverrides, dynamicOptionOverrides, localeDefaults) { + var durationInput = viewDef.overrides.duration || viewDef.defaults.duration || dynamicOptionOverrides.duration || optionOverrides.duration; + var duration = null; + var durationUnit = ""; + var singleUnit = ""; + var singleUnitOverrides = {}; + if (durationInput) { + duration = createDurationCached(durationInput); + if (duration) { + var denom = greatestDurationDenominator(duration); + durationUnit = denom.unit; + if (denom.value === 1) { + singleUnit = durationUnit; + singleUnitOverrides = overrideConfigs[durationUnit] ? overrideConfigs[durationUnit].rawOptions : {}; + } + } + } + var queryButtonText = function(optionsSubset) { + var buttonTextMap = optionsSubset.buttonText || {}; + var buttonTextKey = viewDef.defaults.buttonTextKey; + if (buttonTextKey != null && buttonTextMap[buttonTextKey] != null) { + return buttonTextMap[buttonTextKey]; + } + if (buttonTextMap[viewDef.type] != null) { + return buttonTextMap[viewDef.type]; + } + if (buttonTextMap[singleUnit] != null) { + return buttonTextMap[singleUnit]; + } + return null; }; - ElementScrollController2.prototype.getClientHeight = function() { - return this.el.clientHeight; + var queryButtonTitle = function(optionsSubset) { + var buttonHints = optionsSubset.buttonHints || {}; + var buttonKey = viewDef.defaults.buttonTextKey; + if (buttonKey != null && buttonHints[buttonKey] != null) { + return buttonHints[buttonKey]; + } + if (buttonHints[viewDef.type] != null) { + return buttonHints[viewDef.type]; + } + if (buttonHints[singleUnit] != null) { + return buttonHints[singleUnit]; + } + return null; }; - ElementScrollController2.prototype.getClientWidth = function() { - return this.el.clientWidth; + return { + type: viewDef.type, + component: viewDef.component, + duration, + durationUnit, + singleUnit, + optionDefaults: viewDef.defaults, + optionOverrides: __assign(__assign({}, singleUnitOverrides), viewDef.overrides), + buttonTextOverride: queryButtonText(dynamicOptionOverrides) || queryButtonText(optionOverrides) || viewDef.overrides.buttonText, + buttonTextDefault: queryButtonText(localeDefaults) || viewDef.defaults.buttonText || queryButtonText(BASE_OPTION_DEFAULTS) || viewDef.type, + buttonTitleOverride: queryButtonTitle(dynamicOptionOverrides) || queryButtonTitle(optionOverrides) || viewDef.overrides.buttonHint, + buttonTitleDefault: queryButtonTitle(localeDefaults) || viewDef.defaults.buttonHint || queryButtonTitle(BASE_OPTION_DEFAULTS) }; - return ElementScrollController2; -}(ScrollController); -var WindowScrollController = function(_super) { - __extends(WindowScrollController2, _super); - function WindowScrollController2() { - return _super !== null && _super.apply(this, arguments) || this; +} +var durationInputMap = {}; +function createDurationCached(durationInput) { + var json = JSON.stringify(durationInput); + var res = durationInputMap[json]; + if (res === void 0) { + res = createDuration(durationInput); + durationInputMap[json] = res; } - WindowScrollController2.prototype.getScrollTop = function() { - return window.pageYOffset; - }; - WindowScrollController2.prototype.getScrollLeft = function() { - return window.pageXOffset; + return res; +} +var DateProfileGenerator = function() { + function DateProfileGenerator2(props) { + this.props = props; + this.nowDate = getNow(props.nowInput, props.dateEnv); + this.initHiddenDays(); + } + DateProfileGenerator2.prototype.buildPrev = function(currentDateProfile, currentDate, forceToValid) { + var dateEnv = this.props.dateEnv; + var prevDate = dateEnv.subtract(dateEnv.startOf(currentDate, currentDateProfile.currentRangeUnit), currentDateProfile.dateIncrement); + return this.build(prevDate, -1, forceToValid); }; - WindowScrollController2.prototype.setScrollTop = function(n3) { - window.scroll(window.pageXOffset, n3); + DateProfileGenerator2.prototype.buildNext = function(currentDateProfile, currentDate, forceToValid) { + var dateEnv = this.props.dateEnv; + var nextDate = dateEnv.add(dateEnv.startOf(currentDate, currentDateProfile.currentRangeUnit), currentDateProfile.dateIncrement); + return this.build(nextDate, 1, forceToValid); }; - WindowScrollController2.prototype.setScrollLeft = function(n3) { - window.scroll(n3, window.pageYOffset); + DateProfileGenerator2.prototype.build = function(currentDate, direction, forceToValid) { + if (forceToValid === void 0) { + forceToValid = true; + } + var props = this.props; + var validRange; + var currentInfo; + var isRangeAllDay; + var renderRange; + var activeRange; + var isValid; + validRange = this.buildValidRange(); + validRange = this.trimHiddenDays(validRange); + if (forceToValid) { + currentDate = constrainMarkerToRange(currentDate, validRange); + } + currentInfo = this.buildCurrentRangeInfo(currentDate, direction); + isRangeAllDay = /^(year|month|week|day)$/.test(currentInfo.unit); + renderRange = this.buildRenderRange(this.trimHiddenDays(currentInfo.range), currentInfo.unit, isRangeAllDay); + renderRange = this.trimHiddenDays(renderRange); + activeRange = renderRange; + if (!props.showNonCurrentDates) { + activeRange = intersectRanges(activeRange, currentInfo.range); + } + activeRange = this.adjustActiveRange(activeRange); + activeRange = intersectRanges(activeRange, validRange); + isValid = rangesIntersect(currentInfo.range, validRange); + return { + validRange, + currentRange: currentInfo.range, + currentRangeUnit: currentInfo.unit, + isRangeAllDay, + activeRange, + renderRange, + slotMinTime: props.slotMinTime, + slotMaxTime: props.slotMaxTime, + isValid, + dateIncrement: this.buildDateIncrement(currentInfo.duration) + }; }; - WindowScrollController2.prototype.getScrollWidth = function() { - return document.documentElement.scrollWidth; + DateProfileGenerator2.prototype.buildValidRange = function() { + var input = this.props.validRangeInput; + var simpleInput = typeof input === "function" ? input.call(this.props.calendarApi, this.nowDate) : input; + return this.refineRange(simpleInput) || { start: null, end: null }; }; - WindowScrollController2.prototype.getScrollHeight = function() { - return document.documentElement.scrollHeight; + DateProfileGenerator2.prototype.buildCurrentRangeInfo = function(date, direction) { + var props = this.props; + var duration = null; + var unit = null; + var range2 = null; + var dayCount; + if (props.duration) { + duration = props.duration; + unit = props.durationUnit; + range2 = this.buildRangeFromDuration(date, direction, duration, unit); + } else if (dayCount = this.props.dayCount) { + unit = "day"; + range2 = this.buildRangeFromDayCount(date, direction, dayCount); + } else if (range2 = this.buildCustomVisibleRange(date)) { + unit = props.dateEnv.greatestWholeUnit(range2.start, range2.end).unit; + } else { + duration = this.getFallbackDuration(); + unit = greatestDurationDenominator(duration).unit; + range2 = this.buildRangeFromDuration(date, direction, duration, unit); + } + return { duration, unit, range: range2 }; }; - WindowScrollController2.prototype.getClientHeight = function() { - return document.documentElement.clientHeight; + DateProfileGenerator2.prototype.getFallbackDuration = function() { + return createDuration({ day: 1 }); }; - WindowScrollController2.prototype.getClientWidth = function() { - return document.documentElement.clientWidth; + DateProfileGenerator2.prototype.adjustActiveRange = function(range2) { + var _a = this.props, dateEnv = _a.dateEnv, usesMinMaxTime = _a.usesMinMaxTime, slotMinTime = _a.slotMinTime, slotMaxTime = _a.slotMaxTime; + var start = range2.start, end = range2.end; + if (usesMinMaxTime) { + if (asRoughDays(slotMinTime) < 0) { + start = startOfDay(start); + start = dateEnv.add(start, slotMinTime); + } + if (asRoughDays(slotMaxTime) > 1) { + end = startOfDay(end); + end = addDays(end, -1); + end = dateEnv.add(end, slotMaxTime); + } + } + return { start, end }; }; - return WindowScrollController2; -}(ScrollController); -var Theme = function() { - function Theme2(calendarOptions) { - if (this.iconOverrideOption) { - this.setIconOverride(calendarOptions[this.iconOverrideOption]); + DateProfileGenerator2.prototype.buildRangeFromDuration = function(date, direction, duration, unit) { + var _a = this.props, dateEnv = _a.dateEnv, dateAlignment = _a.dateAlignment; + var start; + var end; + var res; + if (!dateAlignment) { + var dateIncrement = this.props.dateIncrement; + if (dateIncrement) { + if (asRoughMs(dateIncrement) < asRoughMs(duration)) { + dateAlignment = greatestDurationDenominator(dateIncrement).unit; + } else { + dateAlignment = unit; + } + } else { + dateAlignment = unit; + } } - } - Theme2.prototype.setIconOverride = function(iconOverrideHash) { - var iconClassesCopy; - var buttonName; - if (typeof iconOverrideHash === "object" && iconOverrideHash) { - iconClassesCopy = __assign({}, this.iconClasses); - for (buttonName in iconOverrideHash) { - iconClassesCopy[buttonName] = this.applyIconOverridePrefix(iconOverrideHash[buttonName]); + if (asRoughDays(duration) <= 1) { + if (this.isHiddenDay(start)) { + start = this.skipHiddenDays(start, direction); + start = startOfDay(start); } - this.iconClasses = iconClassesCopy; - } else if (iconOverrideHash === false) { - this.iconClasses = {}; } + function computeRes() { + start = dateEnv.startOf(date, dateAlignment); + end = dateEnv.add(start, duration); + res = { start, end }; + } + computeRes(); + if (!this.trimHiddenDays(res)) { + date = this.skipHiddenDays(date, direction); + computeRes(); + } + return res; }; - Theme2.prototype.applyIconOverridePrefix = function(className) { - var prefix = this.iconOverridePrefix; - if (prefix && className.indexOf(prefix) !== 0) { - className = prefix + className; + DateProfileGenerator2.prototype.buildRangeFromDayCount = function(date, direction, dayCount) { + var _a = this.props, dateEnv = _a.dateEnv, dateAlignment = _a.dateAlignment; + var runningCount = 0; + var start = date; + var end; + if (dateAlignment) { + start = dateEnv.startOf(start, dateAlignment); } - return className; + start = startOfDay(start); + start = this.skipHiddenDays(start, direction); + end = start; + do { + end = addDays(end, 1); + if (!this.isHiddenDay(end)) { + runningCount += 1; + } + } while (runningCount < dayCount); + return { start, end }; }; - Theme2.prototype.getClass = function(key) { - return this.classes[key] || ""; + DateProfileGenerator2.prototype.buildCustomVisibleRange = function(date) { + var props = this.props; + var input = props.visibleRangeInput; + var simpleInput = typeof input === "function" ? input.call(props.calendarApi, props.dateEnv.toDate(date)) : input; + var range2 = this.refineRange(simpleInput); + if (range2 && (range2.start == null || range2.end == null)) { + return null; + } + return range2; }; - Theme2.prototype.getIconClass = function(buttonName, isRtl) { - var className; - if (isRtl && this.rtlIconClasses) { - className = this.rtlIconClasses[buttonName] || this.iconClasses[buttonName]; - } else { - className = this.iconClasses[buttonName]; + DateProfileGenerator2.prototype.buildRenderRange = function(currentRange, currentRangeUnit, isRangeAllDay) { + return currentRange; + }; + DateProfileGenerator2.prototype.buildDateIncrement = function(fallback) { + var dateIncrement = this.props.dateIncrement; + var customAlignment; + if (dateIncrement) { + return dateIncrement; } - if (className) { - return this.baseIconClass + " " + className; + if (customAlignment = this.props.dateAlignment) { + return createDuration(1, customAlignment); } - return ""; + if (fallback) { + return fallback; + } + return createDuration({ days: 1 }); }; - Theme2.prototype.getCustomButtonIconClass = function(customButtonProps) { - var className; - if (this.iconOverrideCustomButtonOption) { - className = customButtonProps[this.iconOverrideCustomButtonOption]; - if (className) { - return this.baseIconClass + " " + this.applyIconOverridePrefix(className); + DateProfileGenerator2.prototype.refineRange = function(rangeInput) { + if (rangeInput) { + var range2 = parseRange(rangeInput, this.props.dateEnv); + if (range2) { + range2 = computeVisibleDayRange(range2); } + return range2; } - return ""; + return null; }; - return Theme2; -}(); -Theme.prototype.classes = {}; -Theme.prototype.iconClasses = {}; -Theme.prototype.baseIconClass = ""; -Theme.prototype.iconOverridePrefix = ""; -var ScrollResponder = function() { - function ScrollResponder2(execFunc, emitter, scrollTime, scrollTimeReset) { - var _this = this; - this.execFunc = execFunc; - this.emitter = emitter; - this.scrollTime = scrollTime; - this.scrollTimeReset = scrollTimeReset; - this.handleScrollRequest = function(request3) { - _this.queuedRequest = __assign({}, _this.queuedRequest || {}, request3); - _this.drain(); - }; - emitter.on("_scrollRequest", this.handleScrollRequest); - this.fireInitialScroll(); - } - ScrollResponder2.prototype.detach = function() { - this.emitter.off("_scrollRequest", this.handleScrollRequest); + DateProfileGenerator2.prototype.initHiddenDays = function() { + var hiddenDays = this.props.hiddenDays || []; + var isHiddenDayHash = []; + var dayCnt = 0; + var i3; + if (this.props.weekends === false) { + hiddenDays.push(0, 6); + } + for (i3 = 0; i3 < 7; i3 += 1) { + if (!(isHiddenDayHash[i3] = hiddenDays.indexOf(i3) !== -1)) { + dayCnt += 1; + } + } + if (!dayCnt) { + throw new Error("invalid hiddenDays"); + } + this.isHiddenDayHash = isHiddenDayHash; }; - ScrollResponder2.prototype.update = function(isDatesNew) { - if (isDatesNew && this.scrollTimeReset) { - this.fireInitialScroll(); - } else { - this.drain(); + DateProfileGenerator2.prototype.trimHiddenDays = function(range2) { + var start = range2.start, end = range2.end; + if (start) { + start = this.skipHiddenDays(start); + } + if (end) { + end = this.skipHiddenDays(end, -1, true); + } + if (start == null || end == null || start < end) { + return { start, end }; } + return null; }; - ScrollResponder2.prototype.fireInitialScroll = function() { - this.handleScrollRequest({ - time: this.scrollTime - }); + DateProfileGenerator2.prototype.isHiddenDay = function(day) { + if (day instanceof Date) { + day = day.getUTCDay(); + } + return this.isHiddenDayHash[day]; }; - ScrollResponder2.prototype.drain = function() { - if (this.queuedRequest && this.execFunc(this.queuedRequest)) { - this.queuedRequest = null; + DateProfileGenerator2.prototype.skipHiddenDays = function(date, inc, isExclusive) { + if (inc === void 0) { + inc = 1; + } + if (isExclusive === void 0) { + isExclusive = false; } + while (this.isHiddenDayHash[(date.getUTCDay() + (isExclusive ? inc : 0) + 7) % 7]) { + date = addDays(date, inc); + } + return date; }; - return ScrollResponder2; + return DateProfileGenerator2; }(); -var ViewContextType = createContext2({}); -function buildViewContext(viewSpec, viewApi, viewOptions, dateProfileGenerator, dateEnv, theme, pluginHooks, dispatch, getCurrentData, emitter, calendarApi, registerInteractiveComponent, unregisterInteractiveComponent) { - return { - dateEnv, - options: viewOptions, - pluginHooks, - emitter, - dispatch, - getCurrentData, - calendarApi, - viewSpec, - viewApi, - dateProfileGenerator, - theme, - isRtl: viewOptions.direction === "rtl", - addResizeHandler: function(handler) { - emitter.on("_resize", handler); - }, - removeResizeHandler: function(handler) { - emitter.off("_resize", handler); - }, - createScrollResponder: function(execFunc) { - return new ScrollResponder(execFunc, emitter, createDuration(viewOptions.scrollTime), viewOptions.scrollTimeReset); - }, - registerInteractiveComponent, - unregisterInteractiveComponent - }; +function reduceViewType(viewType, action) { + switch (action.type) { + case "CHANGE_VIEW_TYPE": + viewType = action.viewType; + } + return viewType; } -var PureComponent = function(_super) { - __extends(PureComponent2, _super); - function PureComponent2() { - return _super !== null && _super.apply(this, arguments) || this; +function reduceDynamicOptionOverrides(dynamicOptionOverrides, action) { + var _a; + switch (action.type) { + case "SET_OPTION": + return __assign(__assign({}, dynamicOptionOverrides), (_a = {}, _a[action.optionName] = action.rawOptionValue, _a)); + default: + return dynamicOptionOverrides; } - PureComponent2.prototype.shouldComponentUpdate = function(nextProps, nextState) { - if (this.debug) { - console.log(getUnequalProps(nextProps, this.props), getUnequalProps(nextState, this.state)); +} +function reduceDateProfile(currentDateProfile, action, currentDate, dateProfileGenerator) { + var dp; + switch (action.type) { + case "CHANGE_VIEW_TYPE": + return dateProfileGenerator.build(action.dateMarker || currentDate); + case "CHANGE_DATE": + return dateProfileGenerator.build(action.dateMarker); + case "PREV": + dp = dateProfileGenerator.buildPrev(currentDateProfile, currentDate); + if (dp.isValid) { + return dp; + } + break; + case "NEXT": + dp = dateProfileGenerator.buildNext(currentDateProfile, currentDate); + if (dp.isValid) { + return dp; + } + break; + } + return currentDateProfile; +} +function initEventSources(calendarOptions, dateProfile, context) { + var activeRange = dateProfile ? dateProfile.activeRange : null; + return addSources({}, parseInitialSources(calendarOptions, context), activeRange, context); +} +function reduceEventSources(eventSources, action, dateProfile, context) { + var activeRange = dateProfile ? dateProfile.activeRange : null; + switch (action.type) { + case "ADD_EVENT_SOURCES": + return addSources(eventSources, action.sources, activeRange, context); + case "REMOVE_EVENT_SOURCE": + return removeSource(eventSources, action.sourceId); + case "PREV": + case "NEXT": + case "CHANGE_DATE": + case "CHANGE_VIEW_TYPE": + if (dateProfile) { + return fetchDirtySources(eventSources, activeRange, context); + } + return eventSources; + case "FETCH_EVENT_SOURCES": + return fetchSourcesByIds(eventSources, action.sourceIds ? arrayToHash(action.sourceIds) : excludeStaticSources(eventSources, context), activeRange, action.isRefetch || false, context); + case "RECEIVE_EVENTS": + case "RECEIVE_EVENT_ERROR": + return receiveResponse(eventSources, action.sourceId, action.fetchId, action.fetchRange); + case "REMOVE_ALL_EVENT_SOURCES": + return {}; + default: + return eventSources; + } +} +function reduceEventSourcesNewTimeZone(eventSources, dateProfile, context) { + var activeRange = dateProfile ? dateProfile.activeRange : null; + return fetchSourcesByIds(eventSources, excludeStaticSources(eventSources, context), activeRange, true, context); +} +function computeEventSourcesLoading(eventSources) { + for (var sourceId in eventSources) { + if (eventSources[sourceId].isFetching) { + return true; } - return !compareObjs(this.props, nextProps, this.propEquality) || !compareObjs(this.state, nextState, this.stateEquality); - }; - PureComponent2.prototype.safeSetState = function(newState) { - if (!compareObjs(this.state, __assign(__assign({}, this.state), newState), this.stateEquality)) { - this.setState(newState); + } + return false; +} +function addSources(eventSourceHash, sources, fetchRange, context) { + var hash = {}; + for (var _i = 0, sources_1 = sources; _i < sources_1.length; _i++) { + var source = sources_1[_i]; + hash[source.sourceId] = source; + } + if (fetchRange) { + hash = fetchDirtySources(hash, fetchRange, context); + } + return __assign(__assign({}, eventSourceHash), hash); +} +function removeSource(eventSourceHash, sourceId) { + return filterHash(eventSourceHash, function(eventSource) { + return eventSource.sourceId !== sourceId; + }); +} +function fetchDirtySources(sourceHash, fetchRange, context) { + return fetchSourcesByIds(sourceHash, filterHash(sourceHash, function(eventSource) { + return isSourceDirty(eventSource, fetchRange, context); + }), fetchRange, false, context); +} +function isSourceDirty(eventSource, fetchRange, context) { + if (!doesSourceNeedRange(eventSource, context)) { + return !eventSource.latestFetchId; + } + return !context.options.lazyFetching || !eventSource.fetchRange || eventSource.isFetching || fetchRange.start < eventSource.fetchRange.start || fetchRange.end > eventSource.fetchRange.end; +} +function fetchSourcesByIds(prevSources, sourceIdHash, fetchRange, isRefetch, context) { + var nextSources = {}; + for (var sourceId in prevSources) { + var source = prevSources[sourceId]; + if (sourceIdHash[sourceId]) { + nextSources[sourceId] = fetchSource(source, fetchRange, isRefetch, context); + } else { + nextSources[sourceId] = source; } - }; - PureComponent2.addPropsEquality = addPropsEquality; - PureComponent2.addStateEquality = addStateEquality; - PureComponent2.contextType = ViewContextType; - return PureComponent2; -}(Component); -PureComponent.prototype.propEquality = {}; -PureComponent.prototype.stateEquality = {}; -var BaseComponent = function(_super) { - __extends(BaseComponent2, _super); - function BaseComponent2() { - return _super !== null && _super.apply(this, arguments) || this; } - BaseComponent2.contextType = ViewContextType; - return BaseComponent2; -}(PureComponent); -function addPropsEquality(propEquality) { - var hash = Object.create(this.prototype.propEquality); - __assign(hash, propEquality); - this.prototype.propEquality = hash; + return nextSources; } -function addStateEquality(stateEquality) { - var hash = Object.create(this.prototype.stateEquality); - __assign(hash, stateEquality); - this.prototype.stateEquality = hash; +function fetchSource(eventSource, fetchRange, isRefetch, context) { + var options = context.options, calendarApi = context.calendarApi; + var sourceDef = context.pluginHooks.eventSourceDefs[eventSource.sourceDefId]; + var fetchId = guid(); + sourceDef.fetch({ + eventSource, + range: fetchRange, + isRefetch, + context + }, function(res) { + var rawEvents = res.rawEvents; + if (options.eventSourceSuccess) { + rawEvents = options.eventSourceSuccess.call(calendarApi, rawEvents, res.xhr) || rawEvents; + } + if (eventSource.success) { + rawEvents = eventSource.success.call(calendarApi, rawEvents, res.xhr) || rawEvents; + } + context.dispatch({ + type: "RECEIVE_EVENTS", + sourceId: eventSource.sourceId, + fetchId, + fetchRange, + rawEvents + }); + }, function(error) { + console.warn(error.message, error); + if (options.eventSourceFailure) { + options.eventSourceFailure.call(calendarApi, error); + } + if (eventSource.failure) { + eventSource.failure(error); + } + context.dispatch({ + type: "RECEIVE_EVENT_ERROR", + sourceId: eventSource.sourceId, + fetchId, + fetchRange, + error + }); + }); + return __assign(__assign({}, eventSource), { isFetching: true, latestFetchId: fetchId }); } -function setRef(ref, current) { - if (typeof ref === "function") { - ref(current); - } else if (ref) { - ref.current = current; +function receiveResponse(sourceHash, sourceId, fetchId, fetchRange) { + var _a; + var eventSource = sourceHash[sourceId]; + if (eventSource && fetchId === eventSource.latestFetchId) { + return __assign(__assign({}, sourceHash), (_a = {}, _a[sourceId] = __assign(__assign({}, eventSource), { isFetching: false, fetchRange }), _a)); } + return sourceHash; } -var DateComponent = function(_super) { - __extends(DateComponent2, _super); - function DateComponent2() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.uid = guid(); - return _this; +function excludeStaticSources(eventSources, context) { + return filterHash(eventSources, function(eventSource) { + return doesSourceNeedRange(eventSource, context); + }); +} +function parseInitialSources(rawOptions, context) { + var refiners = buildEventSourceRefiners(context); + var rawSources = [].concat(rawOptions.eventSources || []); + var sources = []; + if (rawOptions.initialEvents) { + rawSources.unshift(rawOptions.initialEvents); + } + if (rawOptions.events) { + rawSources.unshift(rawOptions.events); + } + for (var _i = 0, rawSources_1 = rawSources; _i < rawSources_1.length; _i++) { + var rawSource = rawSources_1[_i]; + var source = parseEventSource(rawSource, context, refiners); + if (source) { + sources.push(source); + } + } + return sources; +} +function doesSourceNeedRange(eventSource, context) { + var defs = context.pluginHooks.eventSourceDefs; + return !defs[eventSource.sourceDefId].ignoreRange; +} +function reduceEventStore(eventStore, action, eventSources, dateProfile, context) { + switch (action.type) { + case "RECEIVE_EVENTS": + return receiveRawEvents(eventStore, eventSources[action.sourceId], action.fetchId, action.fetchRange, action.rawEvents, context); + case "ADD_EVENTS": + return addEvent(eventStore, action.eventStore, dateProfile ? dateProfile.activeRange : null, context); + case "RESET_EVENTS": + return action.eventStore; + case "MERGE_EVENTS": + return mergeEventStores(eventStore, action.eventStore); + case "PREV": + case "NEXT": + case "CHANGE_DATE": + case "CHANGE_VIEW_TYPE": + if (dateProfile) { + return expandRecurring(eventStore, dateProfile.activeRange, context); + } + return eventStore; + case "REMOVE_EVENTS": + return excludeSubEventStore(eventStore, action.eventStore); + case "REMOVE_EVENT_SOURCE": + return excludeEventsBySourceId(eventStore, action.sourceId); + case "REMOVE_ALL_EVENT_SOURCES": + return filterEventStoreDefs(eventStore, function(eventDef) { + return !eventDef.sourceId; + }); + case "REMOVE_ALL_EVENTS": + return createEmptyEventStore(); + default: + return eventStore; } - DateComponent2.prototype.prepareHits = function() { - }; - DateComponent2.prototype.queryHit = function(positionLeft, positionTop, elWidth, elHeight) { - return null; - }; - DateComponent2.prototype.isValidSegDownEl = function(el) { - return !this.props.eventDrag && !this.props.eventResize && !elementClosest(el, ".fc-event-mirror"); - }; - DateComponent2.prototype.isValidDateDownEl = function(el) { - return !elementClosest(el, ".fc-event:not(.fc-bg-event)") && !elementClosest(el, ".fc-more-link") && !elementClosest(el, "a[data-navlink]") && !elementClosest(el, ".fc-popover"); - }; - return DateComponent2; -}(BaseComponent); -function createPlugin(input) { - return { - id: guid(), - deps: input.deps || [], - reducers: input.reducers || [], - isLoadingFuncs: input.isLoadingFuncs || [], - contextInit: [].concat(input.contextInit || []), - eventRefiners: input.eventRefiners || {}, - eventDefMemberAdders: input.eventDefMemberAdders || [], - eventSourceRefiners: input.eventSourceRefiners || {}, - isDraggableTransformers: input.isDraggableTransformers || [], - eventDragMutationMassagers: input.eventDragMutationMassagers || [], - eventDefMutationAppliers: input.eventDefMutationAppliers || [], - dateSelectionTransformers: input.dateSelectionTransformers || [], - datePointTransforms: input.datePointTransforms || [], - dateSpanTransforms: input.dateSpanTransforms || [], - views: input.views || {}, - viewPropsTransformers: input.viewPropsTransformers || [], - isPropsValid: input.isPropsValid || null, - externalDefTransforms: input.externalDefTransforms || [], - viewContainerAppends: input.viewContainerAppends || [], - eventDropTransformers: input.eventDropTransformers || [], - componentInteractions: input.componentInteractions || [], - calendarInteractions: input.calendarInteractions || [], - themeClasses: input.themeClasses || {}, - eventSourceDefs: input.eventSourceDefs || [], - cmdFormatter: input.cmdFormatter, - recurringTypes: input.recurringTypes || [], - namedTimeZonedImpl: input.namedTimeZonedImpl, - initialView: input.initialView || "", - elementDraggingImpl: input.elementDraggingImpl, - optionChangeHandlers: input.optionChangeHandlers || {}, - scrollGridImpl: input.scrollGridImpl || null, - contentTypeHandlers: input.contentTypeHandlers || {}, - listenerRefiners: input.listenerRefiners || {}, - optionRefiners: input.optionRefiners || {}, - propSetHandlers: input.propSetHandlers || {} - }; } -function buildPluginHooks(pluginDefs, globalDefs) { - var isAdded = {}; - var hooks = { - reducers: [], - isLoadingFuncs: [], - contextInit: [], - eventRefiners: {}, - eventDefMemberAdders: [], - eventSourceRefiners: {}, - isDraggableTransformers: [], - eventDragMutationMassagers: [], - eventDefMutationAppliers: [], - dateSelectionTransformers: [], - datePointTransforms: [], - dateSpanTransforms: [], - views: {}, - viewPropsTransformers: [], - isPropsValid: null, - externalDefTransforms: [], - viewContainerAppends: [], - eventDropTransformers: [], - componentInteractions: [], - calendarInteractions: [], - themeClasses: {}, - eventSourceDefs: [], - cmdFormatter: null, - recurringTypes: [], - namedTimeZonedImpl: null, - initialView: "", - elementDraggingImpl: null, - optionChangeHandlers: {}, - scrollGridImpl: null, - contentTypeHandlers: {}, - listenerRefiners: {}, - optionRefiners: {}, - propSetHandlers: {} - }; - function addDefs(defs) { - for (var _i = 0, defs_1 = defs; _i < defs_1.length; _i++) { - var def = defs_1[_i]; - if (!isAdded[def.id]) { - isAdded[def.id] = true; - addDefs(def.deps); - hooks = combineHooks(hooks, def); +function receiveRawEvents(eventStore, eventSource, fetchId, fetchRange, rawEvents, context) { + if (eventSource && fetchId === eventSource.latestFetchId) { + var subset = parseEvents(transformRawEvents(rawEvents, eventSource, context), eventSource, context); + if (fetchRange) { + subset = expandRecurring(subset, fetchRange, context); + } + return mergeEventStores(excludeEventsBySourceId(eventStore, eventSource.sourceId), subset); + } + return eventStore; +} +function transformRawEvents(rawEvents, eventSource, context) { + var calEachTransform = context.options.eventDataTransform; + var sourceEachTransform = eventSource ? eventSource.eventDataTransform : null; + if (sourceEachTransform) { + rawEvents = transformEachRawEvent(rawEvents, sourceEachTransform); + } + if (calEachTransform) { + rawEvents = transformEachRawEvent(rawEvents, calEachTransform); + } + return rawEvents; +} +function transformEachRawEvent(rawEvents, func) { + var refinedEvents; + if (!func) { + refinedEvents = rawEvents; + } else { + refinedEvents = []; + for (var _i = 0, rawEvents_1 = rawEvents; _i < rawEvents_1.length; _i++) { + var rawEvent = rawEvents_1[_i]; + var refinedEvent = func(rawEvent); + if (refinedEvent) { + refinedEvents.push(refinedEvent); + } else if (refinedEvent == null) { + refinedEvents.push(rawEvent); } } } - if (pluginDefs) { - addDefs(pluginDefs); + return refinedEvents; +} +function addEvent(eventStore, subset, expandRange, context) { + if (expandRange) { + subset = expandRecurring(subset, expandRange, context); } - addDefs(globalDefs); - return hooks; + return mergeEventStores(eventStore, subset); } -function buildBuildPluginHooks() { - var currentOverrideDefs = []; - var currentGlobalDefs = []; - var currentHooks; - return function(overrideDefs, globalDefs) { - if (!currentHooks || !isArraysEqual(overrideDefs, currentOverrideDefs) || !isArraysEqual(globalDefs, currentGlobalDefs)) { - currentHooks = buildPluginHooks(overrideDefs, globalDefs); +function rezoneEventStoreDates(eventStore, oldDateEnv, newDateEnv) { + var defs = eventStore.defs; + var instances = mapHash(eventStore.instances, function(instance) { + var def = defs[instance.defId]; + if (def.allDay || def.recurringDef) { + return instance; } - currentOverrideDefs = overrideDefs; - currentGlobalDefs = globalDefs; - return currentHooks; - }; + return __assign(__assign({}, instance), { range: { + start: newDateEnv.createMarker(oldDateEnv.toDate(instance.range.start, instance.forcedStartTzo)), + end: newDateEnv.createMarker(oldDateEnv.toDate(instance.range.end, instance.forcedEndTzo)) + }, forcedStartTzo: newDateEnv.canComputeOffset ? null : instance.forcedStartTzo, forcedEndTzo: newDateEnv.canComputeOffset ? null : instance.forcedEndTzo }); + }); + return { defs, instances }; } -function combineHooks(hooks0, hooks1) { +function excludeEventsBySourceId(eventStore, sourceId) { + return filterEventStoreDefs(eventStore, function(eventDef) { + return eventDef.sourceId !== sourceId; + }); +} +function excludeInstances(eventStore, removals) { return { - reducers: hooks0.reducers.concat(hooks1.reducers), - isLoadingFuncs: hooks0.isLoadingFuncs.concat(hooks1.isLoadingFuncs), - contextInit: hooks0.contextInit.concat(hooks1.contextInit), - eventRefiners: __assign(__assign({}, hooks0.eventRefiners), hooks1.eventRefiners), - eventDefMemberAdders: hooks0.eventDefMemberAdders.concat(hooks1.eventDefMemberAdders), - eventSourceRefiners: __assign(__assign({}, hooks0.eventSourceRefiners), hooks1.eventSourceRefiners), - isDraggableTransformers: hooks0.isDraggableTransformers.concat(hooks1.isDraggableTransformers), - eventDragMutationMassagers: hooks0.eventDragMutationMassagers.concat(hooks1.eventDragMutationMassagers), - eventDefMutationAppliers: hooks0.eventDefMutationAppliers.concat(hooks1.eventDefMutationAppliers), - dateSelectionTransformers: hooks0.dateSelectionTransformers.concat(hooks1.dateSelectionTransformers), - datePointTransforms: hooks0.datePointTransforms.concat(hooks1.datePointTransforms), - dateSpanTransforms: hooks0.dateSpanTransforms.concat(hooks1.dateSpanTransforms), - views: __assign(__assign({}, hooks0.views), hooks1.views), - viewPropsTransformers: hooks0.viewPropsTransformers.concat(hooks1.viewPropsTransformers), - isPropsValid: hooks1.isPropsValid || hooks0.isPropsValid, - externalDefTransforms: hooks0.externalDefTransforms.concat(hooks1.externalDefTransforms), - viewContainerAppends: hooks0.viewContainerAppends.concat(hooks1.viewContainerAppends), - eventDropTransformers: hooks0.eventDropTransformers.concat(hooks1.eventDropTransformers), - calendarInteractions: hooks0.calendarInteractions.concat(hooks1.calendarInteractions), - componentInteractions: hooks0.componentInteractions.concat(hooks1.componentInteractions), - themeClasses: __assign(__assign({}, hooks0.themeClasses), hooks1.themeClasses), - eventSourceDefs: hooks0.eventSourceDefs.concat(hooks1.eventSourceDefs), - cmdFormatter: hooks1.cmdFormatter || hooks0.cmdFormatter, - recurringTypes: hooks0.recurringTypes.concat(hooks1.recurringTypes), - namedTimeZonedImpl: hooks1.namedTimeZonedImpl || hooks0.namedTimeZonedImpl, - initialView: hooks0.initialView || hooks1.initialView, - elementDraggingImpl: hooks0.elementDraggingImpl || hooks1.elementDraggingImpl, - optionChangeHandlers: __assign(__assign({}, hooks0.optionChangeHandlers), hooks1.optionChangeHandlers), - scrollGridImpl: hooks1.scrollGridImpl || hooks0.scrollGridImpl, - contentTypeHandlers: __assign(__assign({}, hooks0.contentTypeHandlers), hooks1.contentTypeHandlers), - listenerRefiners: __assign(__assign({}, hooks0.listenerRefiners), hooks1.listenerRefiners), - optionRefiners: __assign(__assign({}, hooks0.optionRefiners), hooks1.optionRefiners), - propSetHandlers: __assign(__assign({}, hooks0.propSetHandlers), hooks1.propSetHandlers) + defs: eventStore.defs, + instances: filterHash(eventStore.instances, function(instance) { + return !removals[instance.instanceId]; + }) }; } -var StandardTheme = function(_super) { - __extends(StandardTheme2, _super); - function StandardTheme2() { - return _super !== null && _super.apply(this, arguments) || this; - } - return StandardTheme2; -}(Theme); -StandardTheme.prototype.classes = { - root: "fc-theme-standard", - tableCellShaded: "fc-cell-shaded", - buttonGroup: "fc-button-group", - button: "fc-button fc-button-primary", - buttonActive: "fc-button-active" -}; -StandardTheme.prototype.baseIconClass = "fc-icon"; -StandardTheme.prototype.iconClasses = { - close: "fc-icon-x", - prev: "fc-icon-chevron-left", - next: "fc-icon-chevron-right", - prevYear: "fc-icon-chevrons-left", - nextYear: "fc-icon-chevrons-right" -}; -StandardTheme.prototype.rtlIconClasses = { - prev: "fc-icon-chevron-right", - next: "fc-icon-chevron-left", - prevYear: "fc-icon-chevrons-right", - nextYear: "fc-icon-chevrons-left" -}; -StandardTheme.prototype.iconOverrideOption = "buttonIcons"; -StandardTheme.prototype.iconOverrideCustomButtonOption = "icon"; -StandardTheme.prototype.iconOverridePrefix = "fc-icon-"; -function compileViewDefs(defaultConfigs, overrideConfigs) { - var hash = {}; - var viewType; - for (viewType in defaultConfigs) { - ensureViewDef(viewType, hash, defaultConfigs, overrideConfigs); - } - for (viewType in overrideConfigs) { - ensureViewDef(viewType, hash, defaultConfigs, overrideConfigs); +function reduceDateSelection(currentSelection, action) { + switch (action.type) { + case "UNSELECT_DATES": + return null; + case "SELECT_DATES": + return action.selection; + default: + return currentSelection; } - return hash; } -function ensureViewDef(viewType, hash, defaultConfigs, overrideConfigs) { - if (hash[viewType]) { - return hash[viewType]; - } - var viewDef = buildViewDef(viewType, hash, defaultConfigs, overrideConfigs); - if (viewDef) { - hash[viewType] = viewDef; +function reduceSelectedEvent(currentInstanceId, action) { + switch (action.type) { + case "UNSELECT_EVENT": + return ""; + case "SELECT_EVENT": + return action.eventInstanceId; + default: + return currentInstanceId; } - return viewDef; } -function buildViewDef(viewType, hash, defaultConfigs, overrideConfigs) { - var defaultConfig = defaultConfigs[viewType]; - var overrideConfig = overrideConfigs[viewType]; - var queryProp = function(name) { - return defaultConfig && defaultConfig[name] !== null ? defaultConfig[name] : overrideConfig && overrideConfig[name] !== null ? overrideConfig[name] : null; - }; - var theComponent = queryProp("component"); - var superType = queryProp("superType"); - var superDef = null; - if (superType) { - if (superType === viewType) { - throw new Error("Can't have a custom view type that references itself"); - } - superDef = ensureViewDef(superType, hash, defaultConfigs, overrideConfigs); +function reduceEventDrag(currentDrag, action) { + var newDrag; + switch (action.type) { + case "UNSET_EVENT_DRAG": + return null; + case "SET_EVENT_DRAG": + newDrag = action.state; + return { + affectedEvents: newDrag.affectedEvents, + mutatedEvents: newDrag.mutatedEvents, + isEvent: newDrag.isEvent + }; + default: + return currentDrag; } - if (!theComponent && superDef) { - theComponent = superDef.component; +} +function reduceEventResize(currentResize, action) { + var newResize; + switch (action.type) { + case "UNSET_EVENT_RESIZE": + return null; + case "SET_EVENT_RESIZE": + newResize = action.state; + return { + affectedEvents: newResize.affectedEvents, + mutatedEvents: newResize.mutatedEvents, + isEvent: newResize.isEvent + }; + default: + return currentResize; } - if (!theComponent) { - return null; +} +function parseToolbars(calendarOptions, calendarOptionOverrides, theme, viewSpecs, calendarApi) { + var header = calendarOptions.headerToolbar ? parseToolbar(calendarOptions.headerToolbar, calendarOptions, calendarOptionOverrides, theme, viewSpecs, calendarApi) : null; + var footer = calendarOptions.footerToolbar ? parseToolbar(calendarOptions.footerToolbar, calendarOptions, calendarOptionOverrides, theme, viewSpecs, calendarApi) : null; + return { header, footer }; +} +function parseToolbar(sectionStrHash, calendarOptions, calendarOptionOverrides, theme, viewSpecs, calendarApi) { + var sectionWidgets = {}; + var viewsWithButtons = []; + var hasTitle = false; + for (var sectionName in sectionStrHash) { + var sectionStr = sectionStrHash[sectionName]; + var sectionRes = parseSection(sectionStr, calendarOptions, calendarOptionOverrides, theme, viewSpecs, calendarApi); + sectionWidgets[sectionName] = sectionRes.widgets; + viewsWithButtons.push.apply(viewsWithButtons, sectionRes.viewsWithButtons); + hasTitle = hasTitle || sectionRes.hasTitle; } - return { - type: viewType, - component: theComponent, - defaults: __assign(__assign({}, superDef ? superDef.defaults : {}), defaultConfig ? defaultConfig.rawOptions : {}), - overrides: __assign(__assign({}, superDef ? superDef.overrides : {}), overrideConfig ? overrideConfig.rawOptions : {}) - }; + return { sectionWidgets, viewsWithButtons, hasTitle }; } -var RenderHook = function(_super) { - __extends(RenderHook2, _super); - function RenderHook2() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.rootElRef = createRef(); - _this.handleRootEl = function(el) { - setRef(_this.rootElRef, el); - if (_this.props.elRef) { - setRef(_this.props.elRef, el); +function parseSection(sectionStr, calendarOptions, calendarOptionOverrides, theme, viewSpecs, calendarApi) { + var isRtl = calendarOptions.direction === "rtl"; + var calendarCustomButtons = calendarOptions.customButtons || {}; + var calendarButtonTextOverrides = calendarOptionOverrides.buttonText || {}; + var calendarButtonText = calendarOptions.buttonText || {}; + var calendarButtonHintOverrides = calendarOptionOverrides.buttonHints || {}; + var calendarButtonHints = calendarOptions.buttonHints || {}; + var sectionSubstrs = sectionStr ? sectionStr.split(" ") : []; + var viewsWithButtons = []; + var hasTitle = false; + var widgets = sectionSubstrs.map(function(buttonGroupStr) { + return buttonGroupStr.split(",").map(function(buttonName) { + if (buttonName === "title") { + hasTitle = true; + return { buttonName }; } - }; - return _this; - } - RenderHook2.prototype.render = function() { - var _this = this; - var props = this.props; - var hookProps = props.hookProps; - return createElement(MountHook, { hookProps, didMount: props.didMount, willUnmount: props.willUnmount, elRef: this.handleRootEl }, function(rootElRef) { - return createElement(ContentHook, { hookProps, content: props.content, defaultContent: props.defaultContent, backupElRef: _this.rootElRef }, function(innerElRef, innerContent) { - return props.children(rootElRef, normalizeClassNames(props.classNames, hookProps), innerElRef, innerContent); - }); + var customButtonProps; + var viewSpec; + var buttonClick; + var buttonIcon; + var buttonText; + var buttonHint; + if (customButtonProps = calendarCustomButtons[buttonName]) { + buttonClick = function(ev) { + if (customButtonProps.click) { + customButtonProps.click.call(ev.target, ev, ev.target); + } + }; + (buttonIcon = theme.getCustomButtonIconClass(customButtonProps)) || (buttonIcon = theme.getIconClass(buttonName, isRtl)) || (buttonText = customButtonProps.text); + buttonHint = customButtonProps.hint || customButtonProps.text; + } else if (viewSpec = viewSpecs[buttonName]) { + viewsWithButtons.push(buttonName); + buttonClick = function() { + calendarApi.changeView(buttonName); + }; + (buttonText = viewSpec.buttonTextOverride) || (buttonIcon = theme.getIconClass(buttonName, isRtl)) || (buttonText = viewSpec.buttonTextDefault); + var textFallback = viewSpec.buttonTextOverride || viewSpec.buttonTextDefault; + buttonHint = formatWithOrdinals(viewSpec.buttonTitleOverride || viewSpec.buttonTitleDefault || calendarOptions.viewHint, [textFallback, buttonName], textFallback); + } else if (calendarApi[buttonName]) { + buttonClick = function() { + calendarApi[buttonName](); + }; + (buttonText = calendarButtonTextOverrides[buttonName]) || (buttonIcon = theme.getIconClass(buttonName, isRtl)) || (buttonText = calendarButtonText[buttonName]); + if (buttonName === "prevYear" || buttonName === "nextYear") { + var prevOrNext = buttonName === "prevYear" ? "prev" : "next"; + buttonHint = formatWithOrdinals(calendarButtonHintOverrides[prevOrNext] || calendarButtonHints[prevOrNext], [ + calendarButtonText.year || "year", + "year" + ], calendarButtonText[buttonName]); + } else { + buttonHint = function(navUnit) { + return formatWithOrdinals(calendarButtonHintOverrides[buttonName] || calendarButtonHints[buttonName], [ + calendarButtonText[navUnit] || navUnit, + navUnit + ], calendarButtonText[buttonName]); + }; + } + } + return { buttonName, buttonClick, buttonIcon, buttonText, buttonHint }; }); - }; - return RenderHook2; -}(BaseComponent); -var CustomContentRenderContext = createContext2(0); -function ContentHook(props) { - return createElement(CustomContentRenderContext.Consumer, null, function(renderId) { - return createElement(ContentHookInner, __assign({ renderId }, props)); }); + return { widgets, viewsWithButtons, hasTitle }; } -var ContentHookInner = function(_super) { - __extends(ContentHookInner2, _super); - function ContentHookInner2() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.innerElRef = createRef(); - return _this; - } - ContentHookInner2.prototype.render = function() { - return this.props.children(this.innerElRef, this.renderInnerContent()); - }; - ContentHookInner2.prototype.componentDidMount = function() { - this.updateCustomContent(); - }; - ContentHookInner2.prototype.componentDidUpdate = function() { - this.updateCustomContent(); - }; - ContentHookInner2.prototype.componentWillUnmount = function() { - if (this.customContentInfo && this.customContentInfo.destroy) { - this.customContentInfo.destroy(); - } - }; - ContentHookInner2.prototype.renderInnerContent = function() { - var customContentInfo = this.customContentInfo; - var innerContent = this.getInnerContent(); - var meta = this.getContentMeta(innerContent); - if (!customContentInfo || customContentInfo.contentKey !== meta.contentKey) { - if (customContentInfo) { - if (customContentInfo.destroy) { - customContentInfo.destroy(); - } - customContentInfo = this.customContentInfo = null; - } - if (meta.contentKey) { - customContentInfo = this.customContentInfo = __assign({ contentKey: meta.contentKey, contentVal: innerContent[meta.contentKey] }, meta.buildLifecycleFuncs()); - } - } else if (customContentInfo) { - customContentInfo.contentVal = innerContent[meta.contentKey]; +var eventSourceDef$2 = { + ignoreRange: true, + parseMeta: function(refined) { + if (Array.isArray(refined.events)) { + return refined.events; } - return customContentInfo ? [] : innerContent; - }; - ContentHookInner2.prototype.getInnerContent = function() { - var props = this.props; - var innerContent = normalizeContent(props.content, props.hookProps); - if (innerContent === void 0) { - innerContent = normalizeContent(props.defaultContent, props.hookProps); + return null; + }, + fetch: function(arg, success) { + success({ + rawEvents: arg.eventSource.meta + }); + } +}; +var arrayEventSourcePlugin = createPlugin({ + eventSourceDefs: [eventSourceDef$2] +}); +var eventSourceDef$1 = { + parseMeta: function(refined) { + if (typeof refined.events === "function") { + return refined.events; } - return innerContent == null ? null : innerContent; - }; - ContentHookInner2.prototype.getContentMeta = function(innerContent) { - var contentTypeHandlers = this.context.pluginHooks.contentTypeHandlers; - var contentKey = ""; - var buildLifecycleFuncs = null; - if (innerContent) { - for (var searchKey in contentTypeHandlers) { - if (innerContent[searchKey] !== void 0) { - contentKey = searchKey; - buildLifecycleFuncs = contentTypeHandlers[searchKey]; - break; - } + return null; + }, + fetch: function(arg, success, failure) { + var dateEnv = arg.context.dateEnv; + var func = arg.eventSource.meta; + unpromisify(func.bind(null, buildRangeApiWithTimeZone(arg.range, dateEnv)), function(rawEvents) { + success({ rawEvents }); + }, failure); + } +}; +var funcEventSourcePlugin = createPlugin({ + eventSourceDefs: [eventSourceDef$1] +}); +function requestJson(method, url, params, successCallback, failureCallback) { + method = method.toUpperCase(); + var body = null; + if (method === "GET") { + url = injectQueryStringParams(url, params); + } else { + body = encodeParams(params); + } + var xhr = new XMLHttpRequest(); + xhr.open(method, url, true); + if (method !== "GET") { + xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); + } + xhr.onload = function() { + if (xhr.status >= 200 && xhr.status < 400) { + var parsed = false; + var res = void 0; + try { + res = JSON.parse(xhr.responseText); + parsed = true; + } catch (err) { } - } - return { contentKey, buildLifecycleFuncs }; - }; - ContentHookInner2.prototype.updateCustomContent = function() { - if (this.customContentInfo) { - this.customContentInfo.render(this.innerElRef.current || this.props.backupElRef.current, this.customContentInfo.contentVal); - } - }; - return ContentHookInner2; -}(BaseComponent); -var MountHook = function(_super) { - __extends(MountHook2, _super); - function MountHook2() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.handleRootEl = function(rootEl) { - _this.rootEl = rootEl; - if (_this.props.elRef) { - setRef(_this.props.elRef, rootEl); + if (parsed) { + successCallback(res, xhr); + } else { + failureCallback("Failure parsing JSON", xhr); } - }; - return _this; - } - MountHook2.prototype.render = function() { - return this.props.children(this.handleRootEl); - }; - MountHook2.prototype.componentDidMount = function() { - var callback = this.props.didMount; - if (callback) { - callback(__assign(__assign({}, this.props.hookProps), { el: this.rootEl })); - } - }; - MountHook2.prototype.componentWillUnmount = function() { - var callback = this.props.willUnmount; - if (callback) { - callback(__assign(__assign({}, this.props.hookProps), { el: this.rootEl })); + } else { + failureCallback("Request failed", xhr); } }; - return MountHook2; -}(BaseComponent); -function buildClassNameNormalizer() { - var currentGenerator; - var currentHookProps; - var currentClassNames = []; - return function(generator, hookProps) { - if (!currentHookProps || !isPropsEqual(currentHookProps, hookProps) || generator !== currentGenerator) { - currentGenerator = generator; - currentHookProps = hookProps; - currentClassNames = normalizeClassNames(generator, hookProps); - } - return currentClassNames; + xhr.onerror = function() { + failureCallback("Request failed", xhr); }; + xhr.send(body); } -function normalizeClassNames(classNames, hookProps) { - if (typeof classNames === "function") { - classNames = classNames(hookProps); - } - return parseClassNames(classNames); +function injectQueryStringParams(url, params) { + return url + (url.indexOf("?") === -1 ? "?" : "&") + encodeParams(params); } -function normalizeContent(input, hookProps) { - if (typeof input === "function") { - return input(hookProps, createElement); +function encodeParams(params) { + var parts = []; + for (var key in params) { + parts.push(encodeURIComponent(key) + "=" + encodeURIComponent(params[key])); } - return input; + return parts.join("&"); } -var ViewRoot = function(_super) { - __extends(ViewRoot2, _super); - function ViewRoot2() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.normalizeClassNames = buildClassNameNormalizer(); - return _this; - } - ViewRoot2.prototype.render = function() { - var _a = this, props = _a.props, context = _a.context; - var options = context.options; - var hookProps = { view: context.viewApi }; - var customClassNames = this.normalizeClassNames(options.viewClassNames, hookProps); - return createElement(MountHook, { hookProps, didMount: options.viewDidMount, willUnmount: options.viewWillUnmount, elRef: props.elRef }, function(rootElRef) { - return props.children(rootElRef, ["fc-" + props.viewSpec.type + "-view", "fc-view"].concat(customClassNames)); +var JSON_FEED_EVENT_SOURCE_REFINERS = { + method: String, + extraParams: identity, + startParam: String, + endParam: String, + timeZoneParam: String +}; +var eventSourceDef = { + parseMeta: function(refined) { + if (refined.url && (refined.format === "json" || !refined.format)) { + return { + url: refined.url, + format: "json", + method: (refined.method || "GET").toUpperCase(), + extraParams: refined.extraParams, + startParam: refined.startParam, + endParam: refined.endParam, + timeZoneParam: refined.timeZoneParam + }; + } + return null; + }, + fetch: function(arg, success, failure) { + var meta = arg.eventSource.meta; + var requestParams = buildRequestParams(meta, arg.range, arg.context); + requestJson(meta.method, meta.url, requestParams, function(rawEvents, xhr) { + success({ rawEvents, xhr }); + }, function(errorMessage, xhr) { + failure({ message: errorMessage, xhr }); }); - }; - return ViewRoot2; -}(BaseComponent); -function parseViewConfigs(inputs) { - return mapHash(inputs, parseViewConfig); -} -function parseViewConfig(input) { - var rawOptions = typeof input === "function" ? { component: input } : input; - var component = rawOptions.component; - if (rawOptions.content) { - component = createViewHookComponent(rawOptions); } - return { - superType: rawOptions.type, - component, - rawOptions - }; -} -function createViewHookComponent(options) { - return function(viewProps) { - return createElement(ViewContextType.Consumer, null, function(context) { - return createElement(ViewRoot, { viewSpec: context.viewSpec }, function(viewElRef, viewClassNames) { - var hookProps = __assign(__assign({}, viewProps), { nextDayThreshold: context.options.nextDayThreshold }); - return createElement(RenderHook, { hookProps, classNames: options.classNames, content: options.content, didMount: options.didMount, willUnmount: options.willUnmount, elRef: viewElRef }, function(rootElRef, customClassNames, innerElRef, innerContent) { - return createElement("div", { className: viewClassNames.concat(customClassNames).join(" "), ref: rootElRef }, innerContent); - }); - }); - }); - }; -} -function buildViewSpecs(defaultInputs, optionOverrides, dynamicOptionOverrides, localeDefaults) { - var defaultConfigs = parseViewConfigs(defaultInputs); - var overrideConfigs = parseViewConfigs(optionOverrides.views); - var viewDefs = compileViewDefs(defaultConfigs, overrideConfigs); - return mapHash(viewDefs, function(viewDef) { - return buildViewSpec(viewDef, overrideConfigs, optionOverrides, dynamicOptionOverrides, localeDefaults); - }); +}; +var jsonFeedEventSourcePlugin = createPlugin({ + eventSourceRefiners: JSON_FEED_EVENT_SOURCE_REFINERS, + eventSourceDefs: [eventSourceDef] +}); +function buildRequestParams(meta, range2, context) { + var dateEnv = context.dateEnv, options = context.options; + var startParam; + var endParam; + var timeZoneParam; + var customRequestParams; + var params = {}; + startParam = meta.startParam; + if (startParam == null) { + startParam = options.startParam; + } + endParam = meta.endParam; + if (endParam == null) { + endParam = options.endParam; + } + timeZoneParam = meta.timeZoneParam; + if (timeZoneParam == null) { + timeZoneParam = options.timeZoneParam; + } + if (typeof meta.extraParams === "function") { + customRequestParams = meta.extraParams(); + } else { + customRequestParams = meta.extraParams || {}; + } + __assign(params, customRequestParams); + params[startParam] = dateEnv.formatIso(range2.start); + params[endParam] = dateEnv.formatIso(range2.end); + if (dateEnv.timeZone !== "local") { + params[timeZoneParam] = dateEnv.timeZone; + } + return params; } -function buildViewSpec(viewDef, overrideConfigs, optionOverrides, dynamicOptionOverrides, localeDefaults) { - var durationInput = viewDef.overrides.duration || viewDef.defaults.duration || dynamicOptionOverrides.duration || optionOverrides.duration; - var duration = null; - var durationUnit = ""; - var singleUnit = ""; - var singleUnitOverrides = {}; - if (durationInput) { - duration = createDurationCached(durationInput); - if (duration) { - var denom = greatestDurationDenominator(duration); - durationUnit = denom.unit; - if (denom.value === 1) { - singleUnit = durationUnit; - singleUnitOverrides = overrideConfigs[durationUnit] ? overrideConfigs[durationUnit].rawOptions : {}; +var SIMPLE_RECURRING_REFINERS = { + daysOfWeek: identity, + startTime: createDuration, + endTime: createDuration, + duration: createDuration, + startRecur: identity, + endRecur: identity +}; +var recurring = { + parse: function(refined, dateEnv) { + if (refined.daysOfWeek || refined.startTime || refined.endTime || refined.startRecur || refined.endRecur) { + var recurringData = { + daysOfWeek: refined.daysOfWeek || null, + startTime: refined.startTime || null, + endTime: refined.endTime || null, + startRecur: refined.startRecur ? dateEnv.createMarker(refined.startRecur) : null, + endRecur: refined.endRecur ? dateEnv.createMarker(refined.endRecur) : null + }; + var duration = void 0; + if (refined.duration) { + duration = refined.duration; + } + if (!duration && refined.startTime && refined.endTime) { + duration = subtractDurations(refined.endTime, refined.startTime); } + return { + allDayGuess: Boolean(!refined.startTime && !refined.endTime), + duration, + typeData: recurringData + }; } - } - var queryButtonText = function(optionsSubset) { - var buttonTextMap = optionsSubset.buttonText || {}; - var buttonTextKey = viewDef.defaults.buttonTextKey; - if (buttonTextKey != null && buttonTextMap[buttonTextKey] != null) { - return buttonTextMap[buttonTextKey]; + return null; + }, + expand: function(typeData, framingRange, dateEnv) { + var clippedFramingRange = intersectRanges(framingRange, { start: typeData.startRecur, end: typeData.endRecur }); + if (clippedFramingRange) { + return expandRanges(typeData.daysOfWeek, typeData.startTime, clippedFramingRange, dateEnv); } - if (buttonTextMap[viewDef.type] != null) { - return buttonTextMap[viewDef.type]; + return []; + } +}; +var simpleRecurringEventsPlugin = createPlugin({ + recurringTypes: [recurring], + eventRefiners: SIMPLE_RECURRING_REFINERS +}); +function expandRanges(daysOfWeek, startTime, framingRange, dateEnv) { + var dowHash = daysOfWeek ? arrayToHash(daysOfWeek) : null; + var dayMarker = startOfDay(framingRange.start); + var endMarker = framingRange.end; + var instanceStarts = []; + while (dayMarker < endMarker) { + var instanceStart = void 0; + if (!dowHash || dowHash[dayMarker.getUTCDay()]) { + if (startTime) { + instanceStart = dateEnv.add(dayMarker, startTime); + } else { + instanceStart = dayMarker; + } + instanceStarts.push(instanceStart); } - if (buttonTextMap[singleUnit] != null) { - return buttonTextMap[singleUnit]; + dayMarker = addDays(dayMarker, 1); + } + return instanceStarts; +} +var changeHandlerPlugin = createPlugin({ + optionChangeHandlers: { + events: function(events, context) { + handleEventSources([events], context); + }, + eventSources: handleEventSources + } +}); +function handleEventSources(inputs, context) { + var unfoundSources = hashValuesToArray(context.getCurrentData().eventSources); + var newInputs = []; + for (var _i = 0, inputs_1 = inputs; _i < inputs_1.length; _i++) { + var input = inputs_1[_i]; + var inputFound = false; + for (var i3 = 0; i3 < unfoundSources.length; i3 += 1) { + if (unfoundSources[i3]._raw === input) { + unfoundSources.splice(i3, 1); + inputFound = true; + break; + } } - return null; - }; - var queryButtonTitle = function(optionsSubset) { - var buttonHints = optionsSubset.buttonHints || {}; - var buttonKey = viewDef.defaults.buttonTextKey; - if (buttonKey != null && buttonHints[buttonKey] != null) { - return buttonHints[buttonKey]; + if (!inputFound) { + newInputs.push(input); } - if (buttonHints[viewDef.type] != null) { - return buttonHints[viewDef.type]; + } + for (var _a = 0, unfoundSources_1 = unfoundSources; _a < unfoundSources_1.length; _a++) { + var unfoundSource = unfoundSources_1[_a]; + context.dispatch({ + type: "REMOVE_EVENT_SOURCE", + sourceId: unfoundSource.sourceId + }); + } + for (var _b = 0, newInputs_1 = newInputs; _b < newInputs_1.length; _b++) { + var newInput = newInputs_1[_b]; + context.calendarApi.addEventSource(newInput); + } +} +function handleDateProfile(dateProfile, context) { + context.emitter.trigger("datesSet", __assign(__assign({}, buildRangeApiWithTimeZone(dateProfile.activeRange, context.dateEnv)), { view: context.viewApi })); +} +function handleEventStore(eventStore, context) { + var emitter = context.emitter; + if (emitter.hasHandlers("eventsSet")) { + emitter.trigger("eventsSet", buildEventApis(eventStore, context)); + } +} +var globalPlugins = [ + arrayEventSourcePlugin, + funcEventSourcePlugin, + jsonFeedEventSourcePlugin, + simpleRecurringEventsPlugin, + changeHandlerPlugin, + createPlugin({ + isLoadingFuncs: [ + function(state) { + return computeEventSourcesLoading(state.eventSources); + } + ], + contentTypeHandlers: { + html: buildHtmlRenderer, + domNodes: buildDomNodeRenderer + }, + propSetHandlers: { + dateProfile: handleDateProfile, + eventStore: handleEventStore } - if (buttonHints[singleUnit] != null) { - return buttonHints[singleUnit]; + }) +]; +function buildHtmlRenderer() { + var currentEl = null; + var currentHtml = ""; + function render4(el, html) { + if (el !== currentEl || html !== currentHtml) { + el.innerHTML = html; } - return null; - }; - return { - type: viewDef.type, - component: viewDef.component, - duration, - durationUnit, - singleUnit, - optionDefaults: viewDef.defaults, - optionOverrides: __assign(__assign({}, singleUnitOverrides), viewDef.overrides), - buttonTextOverride: queryButtonText(dynamicOptionOverrides) || queryButtonText(optionOverrides) || viewDef.overrides.buttonText, - buttonTextDefault: queryButtonText(localeDefaults) || viewDef.defaults.buttonText || queryButtonText(BASE_OPTION_DEFAULTS) || viewDef.type, - buttonTitleOverride: queryButtonTitle(dynamicOptionOverrides) || queryButtonTitle(optionOverrides) || viewDef.overrides.buttonHint, - buttonTitleDefault: queryButtonTitle(localeDefaults) || viewDef.defaults.buttonHint || queryButtonTitle(BASE_OPTION_DEFAULTS) - }; + currentEl = el; + currentHtml = html; + } + function destroy() { + currentEl.innerHTML = ""; + currentEl = null; + currentHtml = ""; + } + return { render: render4, destroy }; } -var durationInputMap = {}; -function createDurationCached(durationInput) { - var json = JSON.stringify(durationInput); - var res = durationInputMap[json]; - if (res === void 0) { - res = createDuration(durationInput); - durationInputMap[json] = res; +function buildDomNodeRenderer() { + var currentEl = null; + var currentDomNodes = []; + function render4(el, domNodes) { + var newDomNodes = Array.prototype.slice.call(domNodes); + if (el !== currentEl || !isArraysEqual(currentDomNodes, newDomNodes)) { + for (var _i = 0, newDomNodes_1 = newDomNodes; _i < newDomNodes_1.length; _i++) { + var newNode = newDomNodes_1[_i]; + el.appendChild(newNode); + } + destroy(); + } + currentEl = el; + currentDomNodes = newDomNodes; } - return res; + function destroy() { + currentDomNodes.forEach(removeElement); + currentDomNodes = []; + currentEl = null; + } + return { render: render4, destroy }; } -var DateProfileGenerator = function() { - function DateProfileGenerator2(props) { - this.props = props; - this.nowDate = getNow(props.nowInput, props.dateEnv); - this.initHiddenDays(); +var DelayedRunner = function() { + function DelayedRunner2(drainedOption) { + this.drainedOption = drainedOption; + this.isRunning = false; + this.isDirty = false; + this.pauseDepths = {}; + this.timeoutId = 0; } - DateProfileGenerator2.prototype.buildPrev = function(currentDateProfile, currentDate, forceToValid) { - var dateEnv = this.props.dateEnv; - var prevDate = dateEnv.subtract(dateEnv.startOf(currentDate, currentDateProfile.currentRangeUnit), currentDateProfile.dateIncrement); - return this.build(prevDate, -1, forceToValid); - }; - DateProfileGenerator2.prototype.buildNext = function(currentDateProfile, currentDate, forceToValid) { - var dateEnv = this.props.dateEnv; - var nextDate = dateEnv.add(dateEnv.startOf(currentDate, currentDateProfile.currentRangeUnit), currentDateProfile.dateIncrement); - return this.build(nextDate, 1, forceToValid); - }; - DateProfileGenerator2.prototype.build = function(currentDate, direction, forceToValid) { - if (forceToValid === void 0) { - forceToValid = true; - } - var props = this.props; - var validRange; - var currentInfo; - var isRangeAllDay; - var renderRange; - var activeRange; - var isValid; - validRange = this.buildValidRange(); - validRange = this.trimHiddenDays(validRange); - if (forceToValid) { - currentDate = constrainMarkerToRange(currentDate, validRange); - } - currentInfo = this.buildCurrentRangeInfo(currentDate, direction); - isRangeAllDay = /^(year|month|week|day)$/.test(currentInfo.unit); - renderRange = this.buildRenderRange(this.trimHiddenDays(currentInfo.range), currentInfo.unit, isRangeAllDay); - renderRange = this.trimHiddenDays(renderRange); - activeRange = renderRange; - if (!props.showNonCurrentDates) { - activeRange = intersectRanges(activeRange, currentInfo.range); + DelayedRunner2.prototype.request = function(delay) { + this.isDirty = true; + if (!this.isPaused()) { + this.clearTimeout(); + if (delay == null) { + this.tryDrain(); + } else { + this.timeoutId = setTimeout(this.tryDrain.bind(this), delay); + } } - activeRange = this.adjustActiveRange(activeRange); - activeRange = intersectRanges(activeRange, validRange); - isValid = rangesIntersect(currentInfo.range, validRange); - return { - validRange, - currentRange: currentInfo.range, - currentRangeUnit: currentInfo.unit, - isRangeAllDay, - activeRange, - renderRange, - slotMinTime: props.slotMinTime, - slotMaxTime: props.slotMaxTime, - isValid, - dateIncrement: this.buildDateIncrement(currentInfo.duration) - }; - }; - DateProfileGenerator2.prototype.buildValidRange = function() { - var input = this.props.validRangeInput; - var simpleInput = typeof input === "function" ? input.call(this.props.calendarApi, this.nowDate) : input; - return this.refineRange(simpleInput) || { start: null, end: null }; }; - DateProfileGenerator2.prototype.buildCurrentRangeInfo = function(date, direction) { - var props = this.props; - var duration = null; - var unit = null; - var range = null; - var dayCount; - if (props.duration) { - duration = props.duration; - unit = props.durationUnit; - range = this.buildRangeFromDuration(date, direction, duration, unit); - } else if (dayCount = this.props.dayCount) { - unit = "day"; - range = this.buildRangeFromDayCount(date, direction, dayCount); - } else if (range = this.buildCustomVisibleRange(date)) { - unit = props.dateEnv.greatestWholeUnit(range.start, range.end).unit; - } else { - duration = this.getFallbackDuration(); - unit = greatestDurationDenominator(duration).unit; - range = this.buildRangeFromDuration(date, direction, duration, unit); + DelayedRunner2.prototype.pause = function(scope) { + if (scope === void 0) { + scope = ""; } - return { duration, unit, range }; - }; - DateProfileGenerator2.prototype.getFallbackDuration = function() { - return createDuration({ day: 1 }); + var pauseDepths = this.pauseDepths; + pauseDepths[scope] = (pauseDepths[scope] || 0) + 1; + this.clearTimeout(); }; - DateProfileGenerator2.prototype.adjustActiveRange = function(range) { - var _a = this.props, dateEnv = _a.dateEnv, usesMinMaxTime = _a.usesMinMaxTime, slotMinTime = _a.slotMinTime, slotMaxTime = _a.slotMaxTime; - var start = range.start, end = range.end; - if (usesMinMaxTime) { - if (asRoughDays(slotMinTime) < 0) { - start = startOfDay(start); - start = dateEnv.add(start, slotMinTime); - } - if (asRoughDays(slotMaxTime) > 1) { - end = startOfDay(end); - end = addDays(end, -1); - end = dateEnv.add(end, slotMaxTime); - } + DelayedRunner2.prototype.resume = function(scope, force) { + if (scope === void 0) { + scope = ""; } - return { start, end }; - }; - DateProfileGenerator2.prototype.buildRangeFromDuration = function(date, direction, duration, unit) { - var _a = this.props, dateEnv = _a.dateEnv, dateAlignment = _a.dateAlignment; - var start; - var end; - var res; - if (!dateAlignment) { - var dateIncrement = this.props.dateIncrement; - if (dateIncrement) { - if (asRoughMs(dateIncrement) < asRoughMs(duration)) { - dateAlignment = greatestDurationDenominator(dateIncrement).unit; - } else { - dateAlignment = unit; - } + var pauseDepths = this.pauseDepths; + if (scope in pauseDepths) { + if (force) { + delete pauseDepths[scope]; } else { - dateAlignment = unit; + pauseDepths[scope] -= 1; + var depth = pauseDepths[scope]; + if (depth <= 0) { + delete pauseDepths[scope]; + } } + this.tryDrain(); } - if (asRoughDays(duration) <= 1) { - if (this.isHiddenDay(start)) { - start = this.skipHiddenDays(start, direction); - start = startOfDay(start); + }; + DelayedRunner2.prototype.isPaused = function() { + return Object.keys(this.pauseDepths).length; + }; + DelayedRunner2.prototype.tryDrain = function() { + if (!this.isRunning && !this.isPaused()) { + this.isRunning = true; + while (this.isDirty) { + this.isDirty = false; + this.drained(); } + this.isRunning = false; } - function computeRes() { - start = dateEnv.startOf(date, dateAlignment); - end = dateEnv.add(start, duration); - res = { start, end }; - } - computeRes(); - if (!this.trimHiddenDays(res)) { - date = this.skipHiddenDays(date, direction); - computeRes(); - } - return res; }; - DateProfileGenerator2.prototype.buildRangeFromDayCount = function(date, direction, dayCount) { - var _a = this.props, dateEnv = _a.dateEnv, dateAlignment = _a.dateAlignment; - var runningCount = 0; - var start = date; - var end; - if (dateAlignment) { - start = dateEnv.startOf(start, dateAlignment); + DelayedRunner2.prototype.clear = function() { + this.clearTimeout(); + this.isDirty = false; + this.pauseDepths = {}; + }; + DelayedRunner2.prototype.clearTimeout = function() { + if (this.timeoutId) { + clearTimeout(this.timeoutId); + this.timeoutId = 0; } - start = startOfDay(start); - start = this.skipHiddenDays(start, direction); - end = start; - do { - end = addDays(end, 1); - if (!this.isHiddenDay(end)) { - runningCount += 1; - } - } while (runningCount < dayCount); - return { start, end }; }; - DateProfileGenerator2.prototype.buildCustomVisibleRange = function(date) { - var props = this.props; - var input = props.visibleRangeInput; - var simpleInput = typeof input === "function" ? input.call(props.calendarApi, props.dateEnv.toDate(date)) : input; - var range = this.refineRange(simpleInput); - if (range && (range.start == null || range.end == null)) { - return null; + DelayedRunner2.prototype.drained = function() { + if (this.drainedOption) { + this.drainedOption(); } - return range; }; - DateProfileGenerator2.prototype.buildRenderRange = function(currentRange, currentRangeUnit, isRangeAllDay) { - return currentRange; + return DelayedRunner2; +}(); +var TaskRunner = function() { + function TaskRunner2(runTaskOption, drainedOption) { + this.runTaskOption = runTaskOption; + this.drainedOption = drainedOption; + this.queue = []; + this.delayedRunner = new DelayedRunner(this.drain.bind(this)); + } + TaskRunner2.prototype.request = function(task, delay) { + this.queue.push(task); + this.delayedRunner.request(delay); }; - DateProfileGenerator2.prototype.buildDateIncrement = function(fallback) { - var dateIncrement = this.props.dateIncrement; - var customAlignment; - if (dateIncrement) { - return dateIncrement; - } - if (customAlignment = this.props.dateAlignment) { - return createDuration(1, customAlignment); - } - if (fallback) { - return fallback; - } - return createDuration({ days: 1 }); + TaskRunner2.prototype.pause = function(scope) { + this.delayedRunner.pause(scope); }; - DateProfileGenerator2.prototype.refineRange = function(rangeInput) { - if (rangeInput) { - var range = parseRange(rangeInput, this.props.dateEnv); - if (range) { - range = computeVisibleDayRange(range); + TaskRunner2.prototype.resume = function(scope, force) { + this.delayedRunner.resume(scope, force); + }; + TaskRunner2.prototype.drain = function() { + var queue = this.queue; + while (queue.length) { + var completedTasks = []; + var task = void 0; + while (task = queue.shift()) { + this.runTask(task); + completedTasks.push(task); } - return range; + this.drained(completedTasks); } - return null; }; - DateProfileGenerator2.prototype.initHiddenDays = function() { - var hiddenDays = this.props.hiddenDays || []; - var isHiddenDayHash = []; - var dayCnt = 0; - var i3; - if (this.props.weekends === false) { - hiddenDays.push(0, 6); - } - for (i3 = 0; i3 < 7; i3 += 1) { - if (!(isHiddenDayHash[i3] = hiddenDays.indexOf(i3) !== -1)) { - dayCnt += 1; - } + TaskRunner2.prototype.runTask = function(task) { + if (this.runTaskOption) { + this.runTaskOption(task); } - if (!dayCnt) { - throw new Error("invalid hiddenDays"); + }; + TaskRunner2.prototype.drained = function(completedTasks) { + if (this.drainedOption) { + this.drainedOption(completedTasks); } - this.isHiddenDayHash = isHiddenDayHash; }; - DateProfileGenerator2.prototype.trimHiddenDays = function(range) { - var start = range.start, end = range.end; - if (start) { - start = this.skipHiddenDays(start); + return TaskRunner2; +}(); +function buildTitle(dateProfile, viewOptions, dateEnv) { + var range2; + if (/^(year|month)$/.test(dateProfile.currentRangeUnit)) { + range2 = dateProfile.currentRange; + } else { + range2 = dateProfile.activeRange; + } + return dateEnv.formatRange(range2.start, range2.end, createFormatter(viewOptions.titleFormat || buildTitleFormat(dateProfile)), { + isEndExclusive: dateProfile.isRangeAllDay, + defaultSeparator: viewOptions.titleRangeSeparator + }); +} +function buildTitleFormat(dateProfile) { + var currentRangeUnit = dateProfile.currentRangeUnit; + if (currentRangeUnit === "year") { + return { year: "numeric" }; + } + if (currentRangeUnit === "month") { + return { year: "numeric", month: "long" }; + } + var days = diffWholeDays(dateProfile.currentRange.start, dateProfile.currentRange.end); + if (days !== null && days > 1) { + return { year: "numeric", month: "short", day: "numeric" }; + } + return { year: "numeric", month: "long", day: "numeric" }; +} +var CalendarDataManager = function() { + function CalendarDataManager2(props) { + var _this = this; + this.computeOptionsData = memoize(this._computeOptionsData); + this.computeCurrentViewData = memoize(this._computeCurrentViewData); + this.organizeRawLocales = memoize(organizeRawLocales); + this.buildLocale = memoize(buildLocale); + this.buildPluginHooks = buildBuildPluginHooks(); + this.buildDateEnv = memoize(buildDateEnv); + this.buildTheme = memoize(buildTheme); + this.parseToolbars = memoize(parseToolbars); + this.buildViewSpecs = memoize(buildViewSpecs); + this.buildDateProfileGenerator = memoizeObjArg(buildDateProfileGenerator); + this.buildViewApi = memoize(buildViewApi); + this.buildViewUiProps = memoizeObjArg(buildViewUiProps); + this.buildEventUiBySource = memoize(buildEventUiBySource, isPropsEqual); + this.buildEventUiBases = memoize(buildEventUiBases); + this.parseContextBusinessHours = memoizeObjArg(parseContextBusinessHours); + this.buildTitle = memoize(buildTitle); + this.emitter = new Emitter(); + this.actionRunner = new TaskRunner(this._handleAction.bind(this), this.updateData.bind(this)); + this.currentCalendarOptionsInput = {}; + this.currentCalendarOptionsRefined = {}; + this.currentViewOptionsInput = {}; + this.currentViewOptionsRefined = {}; + this.currentCalendarOptionsRefiners = {}; + this.getCurrentData = function() { + return _this.data; + }; + this.dispatch = function(action) { + _this.actionRunner.request(action); + }; + this.props = props; + this.actionRunner.pause(); + var dynamicOptionOverrides = {}; + var optionsData = this.computeOptionsData(props.optionOverrides, dynamicOptionOverrides, props.calendarApi); + var currentViewType = optionsData.calendarOptions.initialView || optionsData.pluginHooks.initialView; + var currentViewData = this.computeCurrentViewData(currentViewType, optionsData, props.optionOverrides, dynamicOptionOverrides); + props.calendarApi.currentDataManager = this; + this.emitter.setThisContext(props.calendarApi); + this.emitter.setOptions(currentViewData.options); + var currentDate = getInitialDate(optionsData.calendarOptions, optionsData.dateEnv); + var dateProfile = currentViewData.dateProfileGenerator.build(currentDate); + if (!rangeContainsMarker(dateProfile.activeRange, currentDate)) { + currentDate = dateProfile.currentRange.start; } - if (end) { - end = this.skipHiddenDays(end, -1, true); + var calendarContext = { + dateEnv: optionsData.dateEnv, + options: optionsData.calendarOptions, + pluginHooks: optionsData.pluginHooks, + calendarApi: props.calendarApi, + dispatch: this.dispatch, + emitter: this.emitter, + getCurrentData: this.getCurrentData + }; + for (var _i = 0, _a = optionsData.pluginHooks.contextInit; _i < _a.length; _i++) { + var callback = _a[_i]; + callback(calendarContext); } - if (start == null || end == null || start < end) { - return { start, end }; + var eventSources = initEventSources(optionsData.calendarOptions, dateProfile, calendarContext); + var initialState = { + dynamicOptionOverrides, + currentViewType, + currentDate, + dateProfile, + businessHours: this.parseContextBusinessHours(calendarContext), + eventSources, + eventUiBases: {}, + eventStore: createEmptyEventStore(), + renderableEventStore: createEmptyEventStore(), + dateSelection: null, + eventSelection: "", + eventDrag: null, + eventResize: null, + selectionConfig: this.buildViewUiProps(calendarContext).selectionConfig + }; + var contextAndState = __assign(__assign({}, calendarContext), initialState); + for (var _b = 0, _c = optionsData.pluginHooks.reducers; _b < _c.length; _b++) { + var reducer = _c[_b]; + __assign(initialState, reducer(null, null, contextAndState)); } - return null; - }; - DateProfileGenerator2.prototype.isHiddenDay = function(day) { - if (day instanceof Date) { - day = day.getUTCDay(); + if (computeIsLoading(initialState, calendarContext)) { + this.emitter.trigger("loading", true); } - return this.isHiddenDayHash[day]; + this.state = initialState; + this.updateData(); + this.actionRunner.resume(); + } + CalendarDataManager2.prototype.resetOptions = function(optionOverrides, append) { + var props = this.props; + props.optionOverrides = append ? __assign(__assign({}, props.optionOverrides), optionOverrides) : optionOverrides; + this.actionRunner.request({ + type: "NOTHING" + }); }; - DateProfileGenerator2.prototype.skipHiddenDays = function(date, inc, isExclusive) { - if (inc === void 0) { - inc = 1; + CalendarDataManager2.prototype._handleAction = function(action) { + var _a = this, props = _a.props, state = _a.state, emitter = _a.emitter; + var dynamicOptionOverrides = reduceDynamicOptionOverrides(state.dynamicOptionOverrides, action); + var optionsData = this.computeOptionsData(props.optionOverrides, dynamicOptionOverrides, props.calendarApi); + var currentViewType = reduceViewType(state.currentViewType, action); + var currentViewData = this.computeCurrentViewData(currentViewType, optionsData, props.optionOverrides, dynamicOptionOverrides); + props.calendarApi.currentDataManager = this; + emitter.setThisContext(props.calendarApi); + emitter.setOptions(currentViewData.options); + var calendarContext = { + dateEnv: optionsData.dateEnv, + options: optionsData.calendarOptions, + pluginHooks: optionsData.pluginHooks, + calendarApi: props.calendarApi, + dispatch: this.dispatch, + emitter, + getCurrentData: this.getCurrentData + }; + var currentDate = state.currentDate, dateProfile = state.dateProfile; + if (this.data && this.data.dateProfileGenerator !== currentViewData.dateProfileGenerator) { + dateProfile = currentViewData.dateProfileGenerator.build(currentDate); } - if (isExclusive === void 0) { - isExclusive = false; + currentDate = reduceCurrentDate(currentDate, action); + dateProfile = reduceDateProfile(dateProfile, action, currentDate, currentViewData.dateProfileGenerator); + if (action.type === "PREV" || action.type === "NEXT" || !rangeContainsMarker(dateProfile.currentRange, currentDate)) { + currentDate = dateProfile.currentRange.start; } - while (this.isHiddenDayHash[(date.getUTCDay() + (isExclusive ? inc : 0) + 7) % 7]) { - date = addDays(date, inc); + var eventSources = reduceEventSources(state.eventSources, action, dateProfile, calendarContext); + var eventStore = reduceEventStore(state.eventStore, action, eventSources, dateProfile, calendarContext); + var isEventsLoading = computeEventSourcesLoading(eventSources); + var renderableEventStore = isEventsLoading && !currentViewData.options.progressiveEventRendering ? state.renderableEventStore || eventStore : eventStore; + var _b = this.buildViewUiProps(calendarContext), eventUiSingleBase = _b.eventUiSingleBase, selectionConfig = _b.selectionConfig; + var eventUiBySource = this.buildEventUiBySource(eventSources); + var eventUiBases = this.buildEventUiBases(renderableEventStore.defs, eventUiSingleBase, eventUiBySource); + var newState = { + dynamicOptionOverrides, + currentViewType, + currentDate, + dateProfile, + eventSources, + eventStore, + renderableEventStore, + selectionConfig, + eventUiBases, + businessHours: this.parseContextBusinessHours(calendarContext), + dateSelection: reduceDateSelection(state.dateSelection, action), + eventSelection: reduceSelectedEvent(state.eventSelection, action), + eventDrag: reduceEventDrag(state.eventDrag, action), + eventResize: reduceEventResize(state.eventResize, action) + }; + var contextAndState = __assign(__assign({}, calendarContext), newState); + for (var _i = 0, _c = optionsData.pluginHooks.reducers; _i < _c.length; _i++) { + var reducer = _c[_i]; + __assign(newState, reducer(state, action, contextAndState)); + } + var wasLoading = computeIsLoading(state, calendarContext); + var isLoading = computeIsLoading(newState, calendarContext); + if (!wasLoading && isLoading) { + emitter.trigger("loading", true); + } else if (wasLoading && !isLoading) { + emitter.trigger("loading", false); + } + this.state = newState; + if (props.onAction) { + props.onAction(action); } - return date; }; - return DateProfileGenerator2; -}(); -function reduceViewType(viewType, action) { - switch (action.type) { - case "CHANGE_VIEW_TYPE": - viewType = action.viewType; - } - return viewType; -} -function reduceDynamicOptionOverrides(dynamicOptionOverrides, action) { - var _a; - switch (action.type) { - case "SET_OPTION": - return __assign(__assign({}, dynamicOptionOverrides), (_a = {}, _a[action.optionName] = action.rawOptionValue, _a)); - default: - return dynamicOptionOverrides; - } -} -function reduceDateProfile(currentDateProfile, action, currentDate, dateProfileGenerator) { - var dp; - switch (action.type) { - case "CHANGE_VIEW_TYPE": - return dateProfileGenerator.build(action.dateMarker || currentDate); - case "CHANGE_DATE": - return dateProfileGenerator.build(action.dateMarker); - case "PREV": - dp = dateProfileGenerator.buildPrev(currentDateProfile, currentDate); - if (dp.isValid) { - return dp; - } - break; - case "NEXT": - dp = dateProfileGenerator.buildNext(currentDateProfile, currentDate); - if (dp.isValid) { - return dp; + CalendarDataManager2.prototype.updateData = function() { + var _a = this, props = _a.props, state = _a.state; + var oldData = this.data; + var optionsData = this.computeOptionsData(props.optionOverrides, state.dynamicOptionOverrides, props.calendarApi); + var currentViewData = this.computeCurrentViewData(state.currentViewType, optionsData, props.optionOverrides, state.dynamicOptionOverrides); + var data = this.data = __assign(__assign(__assign({ viewTitle: this.buildTitle(state.dateProfile, currentViewData.options, optionsData.dateEnv), calendarApi: props.calendarApi, dispatch: this.dispatch, emitter: this.emitter, getCurrentData: this.getCurrentData }, optionsData), currentViewData), state); + var changeHandlers = optionsData.pluginHooks.optionChangeHandlers; + var oldCalendarOptions = oldData && oldData.calendarOptions; + var newCalendarOptions = optionsData.calendarOptions; + if (oldCalendarOptions && oldCalendarOptions !== newCalendarOptions) { + if (oldCalendarOptions.timeZone !== newCalendarOptions.timeZone) { + state.eventSources = data.eventSources = reduceEventSourcesNewTimeZone(data.eventSources, state.dateProfile, data); + state.eventStore = data.eventStore = rezoneEventStoreDates(data.eventStore, oldData.dateEnv, data.dateEnv); } - break; - } - return currentDateProfile; -} -function initEventSources(calendarOptions, dateProfile, context) { - var activeRange = dateProfile ? dateProfile.activeRange : null; - return addSources({}, parseInitialSources(calendarOptions, context), activeRange, context); -} -function reduceEventSources(eventSources, action, dateProfile, context) { - var activeRange = dateProfile ? dateProfile.activeRange : null; - switch (action.type) { - case "ADD_EVENT_SOURCES": - return addSources(eventSources, action.sources, activeRange, context); - case "REMOVE_EVENT_SOURCE": - return removeSource(eventSources, action.sourceId); - case "PREV": - case "NEXT": - case "CHANGE_DATE": - case "CHANGE_VIEW_TYPE": - if (dateProfile) { - return fetchDirtySources(eventSources, activeRange, context); + for (var optionName in changeHandlers) { + if (oldCalendarOptions[optionName] !== newCalendarOptions[optionName]) { + changeHandlers[optionName](newCalendarOptions[optionName], data); + } } - return eventSources; - case "FETCH_EVENT_SOURCES": - return fetchSourcesByIds(eventSources, action.sourceIds ? arrayToHash(action.sourceIds) : excludeStaticSources(eventSources, context), activeRange, action.isRefetch || false, context); - case "RECEIVE_EVENTS": - case "RECEIVE_EVENT_ERROR": - return receiveResponse(eventSources, action.sourceId, action.fetchId, action.fetchRange); - case "REMOVE_ALL_EVENT_SOURCES": - return {}; - default: - return eventSources; - } -} -function reduceEventSourcesNewTimeZone(eventSources, dateProfile, context) { - var activeRange = dateProfile ? dateProfile.activeRange : null; - return fetchSourcesByIds(eventSources, excludeStaticSources(eventSources, context), activeRange, true, context); -} -function computeEventSourcesLoading(eventSources) { - for (var sourceId in eventSources) { - if (eventSources[sourceId].isFetching) { - return true; } - } - return false; -} -function addSources(eventSourceHash, sources, fetchRange, context) { - var hash = {}; - for (var _i = 0, sources_1 = sources; _i < sources_1.length; _i++) { - var source = sources_1[_i]; - hash[source.sourceId] = source; - } - if (fetchRange) { - hash = fetchDirtySources(hash, fetchRange, context); - } - return __assign(__assign({}, eventSourceHash), hash); -} -function removeSource(eventSourceHash, sourceId) { - return filterHash(eventSourceHash, function(eventSource) { - return eventSource.sourceId !== sourceId; - }); -} -function fetchDirtySources(sourceHash, fetchRange, context) { - return fetchSourcesByIds(sourceHash, filterHash(sourceHash, function(eventSource) { - return isSourceDirty(eventSource, fetchRange, context); - }), fetchRange, false, context); -} -function isSourceDirty(eventSource, fetchRange, context) { - if (!doesSourceNeedRange(eventSource, context)) { - return !eventSource.latestFetchId; - } - return !context.options.lazyFetching || !eventSource.fetchRange || eventSource.isFetching || fetchRange.start < eventSource.fetchRange.start || fetchRange.end > eventSource.fetchRange.end; -} -function fetchSourcesByIds(prevSources, sourceIdHash, fetchRange, isRefetch, context) { - var nextSources = {}; - for (var sourceId in prevSources) { - var source = prevSources[sourceId]; - if (sourceIdHash[sourceId]) { - nextSources[sourceId] = fetchSource(source, fetchRange, isRefetch, context); - } else { - nextSources[sourceId] = source; + if (props.onData) { + props.onData(data); + } + }; + CalendarDataManager2.prototype._computeOptionsData = function(optionOverrides, dynamicOptionOverrides, calendarApi) { + var _a = this.processRawCalendarOptions(optionOverrides, dynamicOptionOverrides), refinedOptions = _a.refinedOptions, pluginHooks = _a.pluginHooks, localeDefaults = _a.localeDefaults, availableLocaleData = _a.availableLocaleData, extra = _a.extra; + warnUnknownOptions(extra); + var dateEnv = this.buildDateEnv(refinedOptions.timeZone, refinedOptions.locale, refinedOptions.weekNumberCalculation, refinedOptions.firstDay, refinedOptions.weekText, pluginHooks, availableLocaleData, refinedOptions.defaultRangeSeparator); + var viewSpecs = this.buildViewSpecs(pluginHooks.views, optionOverrides, dynamicOptionOverrides, localeDefaults); + var theme = this.buildTheme(refinedOptions, pluginHooks); + var toolbarConfig = this.parseToolbars(refinedOptions, optionOverrides, theme, viewSpecs, calendarApi); + return { + calendarOptions: refinedOptions, + pluginHooks, + dateEnv, + viewSpecs, + theme, + toolbarConfig, + localeDefaults, + availableRawLocales: availableLocaleData.map + }; + }; + CalendarDataManager2.prototype.processRawCalendarOptions = function(optionOverrides, dynamicOptionOverrides) { + var _a = mergeRawOptions([ + BASE_OPTION_DEFAULTS, + optionOverrides, + dynamicOptionOverrides + ]), locales = _a.locales, locale = _a.locale; + var availableLocaleData = this.organizeRawLocales(locales); + var availableRawLocales = availableLocaleData.map; + var localeDefaults = this.buildLocale(locale || availableLocaleData.defaultCode, availableRawLocales).options; + var pluginHooks = this.buildPluginHooks(optionOverrides.plugins || [], globalPlugins); + var refiners = this.currentCalendarOptionsRefiners = __assign(__assign(__assign(__assign(__assign({}, BASE_OPTION_REFINERS), CALENDAR_LISTENER_REFINERS), CALENDAR_OPTION_REFINERS), pluginHooks.listenerRefiners), pluginHooks.optionRefiners); + var extra = {}; + var raw = mergeRawOptions([ + BASE_OPTION_DEFAULTS, + localeDefaults, + optionOverrides, + dynamicOptionOverrides + ]); + var refined = {}; + var currentRaw = this.currentCalendarOptionsInput; + var currentRefined = this.currentCalendarOptionsRefined; + var anyChanges = false; + for (var optionName in raw) { + if (optionName !== "plugins") { + if (raw[optionName] === currentRaw[optionName] || COMPLEX_OPTION_COMPARATORS[optionName] && optionName in currentRaw && COMPLEX_OPTION_COMPARATORS[optionName](currentRaw[optionName], raw[optionName])) { + refined[optionName] = currentRefined[optionName]; + } else if (refiners[optionName]) { + refined[optionName] = refiners[optionName](raw[optionName]); + anyChanges = true; + } else { + extra[optionName] = currentRaw[optionName]; + } + } } - } - return nextSources; -} -function fetchSource(eventSource, fetchRange, isRefetch, context) { - var options = context.options, calendarApi = context.calendarApi; - var sourceDef = context.pluginHooks.eventSourceDefs[eventSource.sourceDefId]; - var fetchId = guid(); - sourceDef.fetch({ - eventSource, - range: fetchRange, - isRefetch, - context - }, function(res) { - var rawEvents = res.rawEvents; - if (options.eventSourceSuccess) { - rawEvents = options.eventSourceSuccess.call(calendarApi, rawEvents, res.xhr) || rawEvents; + if (anyChanges) { + this.currentCalendarOptionsInput = raw; + this.currentCalendarOptionsRefined = refined; } - if (eventSource.success) { - rawEvents = eventSource.success.call(calendarApi, rawEvents, res.xhr) || rawEvents; + return { + rawOptions: this.currentCalendarOptionsInput, + refinedOptions: this.currentCalendarOptionsRefined, + pluginHooks, + availableLocaleData, + localeDefaults, + extra + }; + }; + CalendarDataManager2.prototype._computeCurrentViewData = function(viewType, optionsData, optionOverrides, dynamicOptionOverrides) { + var viewSpec = optionsData.viewSpecs[viewType]; + if (!viewSpec) { + throw new Error('viewType "' + viewType + `" is not available. Please make sure you've loaded all neccessary plugins`); } - context.dispatch({ - type: "RECEIVE_EVENTS", - sourceId: eventSource.sourceId, - fetchId, - fetchRange, - rawEvents + var _a = this.processRawViewOptions(viewSpec, optionsData.pluginHooks, optionsData.localeDefaults, optionOverrides, dynamicOptionOverrides), refinedOptions = _a.refinedOptions, extra = _a.extra; + warnUnknownOptions(extra); + var dateProfileGenerator = this.buildDateProfileGenerator({ + dateProfileGeneratorClass: viewSpec.optionDefaults.dateProfileGeneratorClass, + duration: viewSpec.duration, + durationUnit: viewSpec.durationUnit, + usesMinMaxTime: viewSpec.optionDefaults.usesMinMaxTime, + dateEnv: optionsData.dateEnv, + calendarApi: this.props.calendarApi, + slotMinTime: refinedOptions.slotMinTime, + slotMaxTime: refinedOptions.slotMaxTime, + showNonCurrentDates: refinedOptions.showNonCurrentDates, + dayCount: refinedOptions.dayCount, + dateAlignment: refinedOptions.dateAlignment, + dateIncrement: refinedOptions.dateIncrement, + hiddenDays: refinedOptions.hiddenDays, + weekends: refinedOptions.weekends, + nowInput: refinedOptions.now, + validRangeInput: refinedOptions.validRange, + visibleRangeInput: refinedOptions.visibleRange, + monthMode: refinedOptions.monthMode, + fixedWeekCount: refinedOptions.fixedWeekCount }); - }, function(error) { - console.warn(error.message, error); - if (options.eventSourceFailure) { - options.eventSourceFailure.call(calendarApi, error); + var viewApi = this.buildViewApi(viewType, this.getCurrentData, optionsData.dateEnv); + return { viewSpec, options: refinedOptions, dateProfileGenerator, viewApi }; + }; + CalendarDataManager2.prototype.processRawViewOptions = function(viewSpec, pluginHooks, localeDefaults, optionOverrides, dynamicOptionOverrides) { + var raw = mergeRawOptions([ + BASE_OPTION_DEFAULTS, + viewSpec.optionDefaults, + localeDefaults, + optionOverrides, + viewSpec.optionOverrides, + dynamicOptionOverrides + ]); + var refiners = __assign(__assign(__assign(__assign(__assign(__assign({}, BASE_OPTION_REFINERS), CALENDAR_LISTENER_REFINERS), CALENDAR_OPTION_REFINERS), VIEW_OPTION_REFINERS), pluginHooks.listenerRefiners), pluginHooks.optionRefiners); + var refined = {}; + var currentRaw = this.currentViewOptionsInput; + var currentRefined = this.currentViewOptionsRefined; + var anyChanges = false; + var extra = {}; + for (var optionName in raw) { + if (raw[optionName] === currentRaw[optionName] || COMPLEX_OPTION_COMPARATORS[optionName] && COMPLEX_OPTION_COMPARATORS[optionName](raw[optionName], currentRaw[optionName])) { + refined[optionName] = currentRefined[optionName]; + } else { + if (raw[optionName] === this.currentCalendarOptionsInput[optionName] || COMPLEX_OPTION_COMPARATORS[optionName] && COMPLEX_OPTION_COMPARATORS[optionName](raw[optionName], this.currentCalendarOptionsInput[optionName])) { + if (optionName in this.currentCalendarOptionsRefined) { + refined[optionName] = this.currentCalendarOptionsRefined[optionName]; + } + } else if (refiners[optionName]) { + refined[optionName] = refiners[optionName](raw[optionName]); + } else { + extra[optionName] = raw[optionName]; + } + anyChanges = true; + } } - if (eventSource.failure) { - eventSource.failure(error); + if (anyChanges) { + this.currentViewOptionsInput = raw; + this.currentViewOptionsRefined = refined; } - context.dispatch({ - type: "RECEIVE_EVENT_ERROR", - sourceId: eventSource.sourceId, - fetchId, - fetchRange, - error - }); - }); - return __assign(__assign({}, eventSource), { isFetching: true, latestFetchId: fetchId }); -} -function receiveResponse(sourceHash, sourceId, fetchId, fetchRange) { - var _a; - var eventSource = sourceHash[sourceId]; - if (eventSource && fetchId === eventSource.latestFetchId) { - return __assign(__assign({}, sourceHash), (_a = {}, _a[sourceId] = __assign(__assign({}, eventSource), { isFetching: false, fetchRange }), _a)); - } - return sourceHash; -} -function excludeStaticSources(eventSources, context) { - return filterHash(eventSources, function(eventSource) { - return doesSourceNeedRange(eventSource, context); + return { + rawOptions: this.currentViewOptionsInput, + refinedOptions: this.currentViewOptionsRefined, + extra + }; + }; + return CalendarDataManager2; +}(); +function buildDateEnv(timeZone, explicitLocale, weekNumberCalculation, firstDay, weekText, pluginHooks, availableLocaleData, defaultSeparator) { + var locale = buildLocale(explicitLocale || availableLocaleData.defaultCode, availableLocaleData.map); + return new DateEnv({ + calendarSystem: "gregory", + timeZone, + namedTimeZoneImpl: pluginHooks.namedTimeZonedImpl, + locale, + weekNumberCalculation, + firstDay, + weekText, + cmdFormatter: pluginHooks.cmdFormatter, + defaultSeparator }); } -function parseInitialSources(rawOptions, context) { - var refiners = buildEventSourceRefiners(context); - var rawSources = [].concat(rawOptions.eventSources || []); - var sources = []; - if (rawOptions.initialEvents) { - rawSources.unshift(rawOptions.initialEvents); - } - if (rawOptions.events) { - rawSources.unshift(rawOptions.events); - } - for (var _i = 0, rawSources_1 = rawSources; _i < rawSources_1.length; _i++) { - var rawSource = rawSources_1[_i]; - var source = parseEventSource(rawSource, context, refiners); - if (source) { - sources.push(source); - } - } - return sources; -} -function doesSourceNeedRange(eventSource, context) { - var defs = context.pluginHooks.eventSourceDefs; - return !defs[eventSource.sourceDefId].ignoreRange; +function buildTheme(options, pluginHooks) { + var ThemeClass = pluginHooks.themeClasses[options.themeSystem] || StandardTheme; + return new ThemeClass(options); } -function reduceEventStore(eventStore, action, eventSources, dateProfile, context) { - switch (action.type) { - case "RECEIVE_EVENTS": - return receiveRawEvents(eventStore, eventSources[action.sourceId], action.fetchId, action.fetchRange, action.rawEvents, context); - case "ADD_EVENTS": - return addEvent(eventStore, action.eventStore, dateProfile ? dateProfile.activeRange : null, context); - case "RESET_EVENTS": - return action.eventStore; - case "MERGE_EVENTS": - return mergeEventStores(eventStore, action.eventStore); - case "PREV": - case "NEXT": - case "CHANGE_DATE": - case "CHANGE_VIEW_TYPE": - if (dateProfile) { - return expandRecurring(eventStore, dateProfile.activeRange, context); - } - return eventStore; - case "REMOVE_EVENTS": - return excludeSubEventStore(eventStore, action.eventStore); - case "REMOVE_EVENT_SOURCE": - return excludeEventsBySourceId(eventStore, action.sourceId); - case "REMOVE_ALL_EVENT_SOURCES": - return filterEventStoreDefs(eventStore, function(eventDef) { - return !eventDef.sourceId; - }); - case "REMOVE_ALL_EVENTS": - return createEmptyEventStore(); - default: - return eventStore; - } +function buildDateProfileGenerator(props) { + var DateProfileGeneratorClass = props.dateProfileGeneratorClass || DateProfileGenerator; + return new DateProfileGeneratorClass(props); } -function receiveRawEvents(eventStore, eventSource, fetchId, fetchRange, rawEvents, context) { - if (eventSource && fetchId === eventSource.latestFetchId) { - var subset = parseEvents(transformRawEvents(rawEvents, eventSource, context), eventSource, context); - if (fetchRange) { - subset = expandRecurring(subset, fetchRange, context); - } - return mergeEventStores(excludeEventsBySourceId(eventStore, eventSource.sourceId), subset); - } - return eventStore; +function buildViewApi(type, getCurrentData, dateEnv) { + return new ViewApi(type, getCurrentData, dateEnv); } -function transformRawEvents(rawEvents, eventSource, context) { - var calEachTransform = context.options.eventDataTransform; - var sourceEachTransform = eventSource ? eventSource.eventDataTransform : null; - if (sourceEachTransform) { - rawEvents = transformEachRawEvent(rawEvents, sourceEachTransform); - } - if (calEachTransform) { - rawEvents = transformEachRawEvent(rawEvents, calEachTransform); - } - return rawEvents; +function buildEventUiBySource(eventSources) { + return mapHash(eventSources, function(eventSource) { + return eventSource.ui; + }); } -function transformEachRawEvent(rawEvents, func) { - var refinedEvents; - if (!func) { - refinedEvents = rawEvents; - } else { - refinedEvents = []; - for (var _i = 0, rawEvents_1 = rawEvents; _i < rawEvents_1.length; _i++) { - var rawEvent = rawEvents_1[_i]; - var refinedEvent = func(rawEvent); - if (refinedEvent) { - refinedEvents.push(refinedEvent); - } else if (refinedEvent == null) { - refinedEvents.push(rawEvent); - } +function buildEventUiBases(eventDefs, eventUiSingleBase, eventUiBySource) { + var eventUiBases = { "": eventUiSingleBase }; + for (var defId in eventDefs) { + var def = eventDefs[defId]; + if (def.sourceId && eventUiBySource[def.sourceId]) { + eventUiBases[defId] = eventUiBySource[def.sourceId]; } } - return refinedEvents; -} -function addEvent(eventStore, subset, expandRange, context) { - if (expandRange) { - subset = expandRecurring(subset, expandRange, context); - } - return mergeEventStores(eventStore, subset); -} -function rezoneEventStoreDates(eventStore, oldDateEnv, newDateEnv) { - var defs = eventStore.defs; - var instances = mapHash(eventStore.instances, function(instance) { - var def = defs[instance.defId]; - if (def.allDay || def.recurringDef) { - return instance; - } - return __assign(__assign({}, instance), { range: { - start: newDateEnv.createMarker(oldDateEnv.toDate(instance.range.start, instance.forcedStartTzo)), - end: newDateEnv.createMarker(oldDateEnv.toDate(instance.range.end, instance.forcedEndTzo)) - }, forcedStartTzo: newDateEnv.canComputeOffset ? null : instance.forcedStartTzo, forcedEndTzo: newDateEnv.canComputeOffset ? null : instance.forcedEndTzo }); - }); - return { defs, instances }; -} -function excludeEventsBySourceId(eventStore, sourceId) { - return filterEventStoreDefs(eventStore, function(eventDef) { - return eventDef.sourceId !== sourceId; - }); + return eventUiBases; } -function excludeInstances(eventStore, removals) { +function buildViewUiProps(calendarContext) { + var options = calendarContext.options; return { - defs: eventStore.defs, - instances: filterHash(eventStore.instances, function(instance) { - return !removals[instance.instanceId]; - }) + eventUiSingleBase: createEventUi({ + display: options.eventDisplay, + editable: options.editable, + startEditable: options.eventStartEditable, + durationEditable: options.eventDurationEditable, + constraint: options.eventConstraint, + overlap: typeof options.eventOverlap === "boolean" ? options.eventOverlap : void 0, + allow: options.eventAllow, + backgroundColor: options.eventBackgroundColor, + borderColor: options.eventBorderColor, + textColor: options.eventTextColor, + color: options.eventColor + }, calendarContext), + selectionConfig: createEventUi({ + constraint: options.selectConstraint, + overlap: typeof options.selectOverlap === "boolean" ? options.selectOverlap : void 0, + allow: options.selectAllow + }, calendarContext) }; } -function reduceDateSelection(currentSelection, action) { - switch (action.type) { - case "UNSELECT_DATES": - return null; - case "SELECT_DATES": - return action.selection; - default: - return currentSelection; - } -} -function reduceSelectedEvent(currentInstanceId, action) { - switch (action.type) { - case "UNSELECT_EVENT": - return ""; - case "SELECT_EVENT": - return action.eventInstanceId; - default: - return currentInstanceId; - } -} -function reduceEventDrag(currentDrag, action) { - var newDrag; - switch (action.type) { - case "UNSET_EVENT_DRAG": - return null; - case "SET_EVENT_DRAG": - newDrag = action.state; - return { - affectedEvents: newDrag.affectedEvents, - mutatedEvents: newDrag.mutatedEvents, - isEvent: newDrag.isEvent - }; - default: - return currentDrag; - } -} -function reduceEventResize(currentResize, action) { - var newResize; - switch (action.type) { - case "UNSET_EVENT_RESIZE": - return null; - case "SET_EVENT_RESIZE": - newResize = action.state; - return { - affectedEvents: newResize.affectedEvents, - mutatedEvents: newResize.mutatedEvents, - isEvent: newResize.isEvent - }; - default: - return currentResize; - } -} -function parseToolbars(calendarOptions, calendarOptionOverrides, theme, viewSpecs, calendarApi) { - var header = calendarOptions.headerToolbar ? parseToolbar(calendarOptions.headerToolbar, calendarOptions, calendarOptionOverrides, theme, viewSpecs, calendarApi) : null; - var footer = calendarOptions.footerToolbar ? parseToolbar(calendarOptions.footerToolbar, calendarOptions, calendarOptionOverrides, theme, viewSpecs, calendarApi) : null; - return { header, footer }; -} -function parseToolbar(sectionStrHash, calendarOptions, calendarOptionOverrides, theme, viewSpecs, calendarApi) { - var sectionWidgets = {}; - var viewsWithButtons = []; - var hasTitle = false; - for (var sectionName in sectionStrHash) { - var sectionStr = sectionStrHash[sectionName]; - var sectionRes = parseSection(sectionStr, calendarOptions, calendarOptionOverrides, theme, viewSpecs, calendarApi); - sectionWidgets[sectionName] = sectionRes.widgets; - viewsWithButtons.push.apply(viewsWithButtons, sectionRes.viewsWithButtons); - hasTitle = hasTitle || sectionRes.hasTitle; - } - return { sectionWidgets, viewsWithButtons, hasTitle }; -} -function parseSection(sectionStr, calendarOptions, calendarOptionOverrides, theme, viewSpecs, calendarApi) { - var isRtl = calendarOptions.direction === "rtl"; - var calendarCustomButtons = calendarOptions.customButtons || {}; - var calendarButtonTextOverrides = calendarOptionOverrides.buttonText || {}; - var calendarButtonText = calendarOptions.buttonText || {}; - var calendarButtonHintOverrides = calendarOptionOverrides.buttonHints || {}; - var calendarButtonHints = calendarOptions.buttonHints || {}; - var sectionSubstrs = sectionStr ? sectionStr.split(" ") : []; - var viewsWithButtons = []; - var hasTitle = false; - var widgets = sectionSubstrs.map(function(buttonGroupStr) { - return buttonGroupStr.split(",").map(function(buttonName) { - if (buttonName === "title") { - hasTitle = true; - return { buttonName }; - } - var customButtonProps; - var viewSpec; - var buttonClick; - var buttonIcon; - var buttonText; - var buttonHint; - if (customButtonProps = calendarCustomButtons[buttonName]) { - buttonClick = function(ev) { - if (customButtonProps.click) { - customButtonProps.click.call(ev.target, ev, ev.target); - } - }; - (buttonIcon = theme.getCustomButtonIconClass(customButtonProps)) || (buttonIcon = theme.getIconClass(buttonName, isRtl)) || (buttonText = customButtonProps.text); - buttonHint = customButtonProps.hint || customButtonProps.text; - } else if (viewSpec = viewSpecs[buttonName]) { - viewsWithButtons.push(buttonName); - buttonClick = function() { - calendarApi.changeView(buttonName); - }; - (buttonText = viewSpec.buttonTextOverride) || (buttonIcon = theme.getIconClass(buttonName, isRtl)) || (buttonText = viewSpec.buttonTextDefault); - var textFallback = viewSpec.buttonTextOverride || viewSpec.buttonTextDefault; - buttonHint = formatWithOrdinals(viewSpec.buttonTitleOverride || viewSpec.buttonTitleDefault || calendarOptions.viewHint, [textFallback, buttonName], textFallback); - } else if (calendarApi[buttonName]) { - buttonClick = function() { - calendarApi[buttonName](); - }; - (buttonText = calendarButtonTextOverrides[buttonName]) || (buttonIcon = theme.getIconClass(buttonName, isRtl)) || (buttonText = calendarButtonText[buttonName]); - if (buttonName === "prevYear" || buttonName === "nextYear") { - var prevOrNext = buttonName === "prevYear" ? "prev" : "next"; - buttonHint = formatWithOrdinals(calendarButtonHintOverrides[prevOrNext] || calendarButtonHints[prevOrNext], [ - calendarButtonText.year || "year", - "year" - ], calendarButtonText[buttonName]); - } else { - buttonHint = function(navUnit) { - return formatWithOrdinals(calendarButtonHintOverrides[buttonName] || calendarButtonHints[buttonName], [ - calendarButtonText[navUnit] || navUnit, - navUnit - ], calendarButtonText[buttonName]); - }; - } - } - return { buttonName, buttonClick, buttonIcon, buttonText, buttonHint }; - }); - }); - return { widgets, viewsWithButtons, hasTitle }; -} -var eventSourceDef$2 = { - ignoreRange: true, - parseMeta: function(refined) { - if (Array.isArray(refined.events)) { - return refined.events; - } - return null; - }, - fetch: function(arg, success) { - success({ - rawEvents: arg.eventSource.meta - }); - } -}; -var arrayEventSourcePlugin = createPlugin({ - eventSourceDefs: [eventSourceDef$2] -}); -var eventSourceDef$1 = { - parseMeta: function(refined) { - if (typeof refined.events === "function") { - return refined.events; - } - return null; - }, - fetch: function(arg, success, failure) { - var dateEnv = arg.context.dateEnv; - var func = arg.eventSource.meta; - unpromisify(func.bind(null, buildRangeApiWithTimeZone(arg.range, dateEnv)), function(rawEvents) { - success({ rawEvents }); - }, failure); - } -}; -var funcEventSourcePlugin = createPlugin({ - eventSourceDefs: [eventSourceDef$1] -}); -function requestJson(method, url, params, successCallback, failureCallback) { - method = method.toUpperCase(); - var body = null; - if (method === "GET") { - url = injectQueryStringParams(url, params); - } else { - body = encodeParams(params); - } - var xhr = new XMLHttpRequest(); - xhr.open(method, url, true); - if (method !== "GET") { - xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); - } - xhr.onload = function() { - if (xhr.status >= 200 && xhr.status < 400) { - var parsed = false; - var res = void 0; - try { - res = JSON.parse(xhr.responseText); - parsed = true; - } catch (err) { - } - if (parsed) { - successCallback(res, xhr); - } else { - failureCallback("Failure parsing JSON", xhr); - } - } else { - failureCallback("Request failed", xhr); - } - }; - xhr.onerror = function() { - failureCallback("Request failed", xhr); - }; - xhr.send(body); +function computeIsLoading(state, context) { + for (var _i = 0, _a = context.pluginHooks.isLoadingFuncs; _i < _a.length; _i++) { + var isLoadingFunc = _a[_i]; + if (isLoadingFunc(state)) { + return true; + } + } + return false; } -function injectQueryStringParams(url, params) { - return url + (url.indexOf("?") === -1 ? "?" : "&") + encodeParams(params); +function parseContextBusinessHours(calendarContext) { + return parseBusinessHours(calendarContext.options.businessHours, calendarContext); } -function encodeParams(params) { - var parts = []; - for (var key in params) { - parts.push(encodeURIComponent(key) + "=" + encodeURIComponent(params[key])); +function warnUnknownOptions(options, viewName) { + for (var optionName in options) { + console.warn("Unknown option '" + optionName + "'" + (viewName ? " for view '" + viewName + "'" : "")); } - return parts.join("&"); } -var JSON_FEED_EVENT_SOURCE_REFINERS = { - method: String, - extraParams: identity, - startParam: String, - endParam: String, - timeZoneParam: String -}; -var eventSourceDef = { - parseMeta: function(refined) { - if (refined.url && (refined.format === "json" || !refined.format)) { - return { - url: refined.url, - format: "json", - method: (refined.method || "GET").toUpperCase(), - extraParams: refined.extraParams, - startParam: refined.startParam, - endParam: refined.endParam, - timeZoneParam: refined.timeZoneParam - }; - } - return null; - }, - fetch: function(arg, success, failure) { - var meta = arg.eventSource.meta; - var requestParams = buildRequestParams(meta, arg.range, arg.context); - requestJson(meta.method, meta.url, requestParams, function(rawEvents, xhr) { - success({ rawEvents, xhr }); - }, function(errorMessage, xhr) { - failure({ message: errorMessage, xhr }); +var CalendarDataProvider = function(_super) { + __extends(CalendarDataProvider2, _super); + function CalendarDataProvider2(props) { + var _this = _super.call(this, props) || this; + _this.handleData = function(data) { + if (!_this.dataManager) { + _this.state = data; + } else { + _this.setState(data); + } + }; + _this.dataManager = new CalendarDataManager({ + optionOverrides: props.optionOverrides, + calendarApi: props.calendarApi, + onData: _this.handleData }); + return _this; } -}; -var jsonFeedEventSourcePlugin = createPlugin({ - eventSourceRefiners: JSON_FEED_EVENT_SOURCE_REFINERS, - eventSourceDefs: [eventSourceDef] -}); -function buildRequestParams(meta, range, context) { - var dateEnv = context.dateEnv, options = context.options; - var startParam; - var endParam; - var timeZoneParam; - var customRequestParams; - var params = {}; - startParam = meta.startParam; - if (startParam == null) { - startParam = options.startParam; - } - endParam = meta.endParam; - if (endParam == null) { - endParam = options.endParam; - } - timeZoneParam = meta.timeZoneParam; - if (timeZoneParam == null) { - timeZoneParam = options.timeZoneParam; - } - if (typeof meta.extraParams === "function") { - customRequestParams = meta.extraParams(); - } else { - customRequestParams = meta.extraParams || {}; + CalendarDataProvider2.prototype.render = function() { + return this.props.children(this.state); + }; + CalendarDataProvider2.prototype.componentDidUpdate = function(prevProps) { + var newOptionOverrides = this.props.optionOverrides; + if (newOptionOverrides !== prevProps.optionOverrides) { + this.dataManager.resetOptions(newOptionOverrides); + } + }; + return CalendarDataProvider2; +}(Component); +var NamedTimeZoneImpl = function() { + function NamedTimeZoneImpl2(timeZoneName) { + this.timeZoneName = timeZoneName; } - __assign(params, customRequestParams); - params[startParam] = dateEnv.formatIso(range.start); - params[endParam] = dateEnv.formatIso(range.end); - if (dateEnv.timeZone !== "local") { - params[timeZoneParam] = dateEnv.timeZone; + return NamedTimeZoneImpl2; +}(); +var SegHierarchy = function() { + function SegHierarchy2() { + this.strictOrder = false; + this.allowReslicing = false; + this.maxCoord = -1; + this.maxStackCnt = -1; + this.levelCoords = []; + this.entriesByLevel = []; + this.stackCnts = {}; } - return params; -} -var SIMPLE_RECURRING_REFINERS = { - daysOfWeek: identity, - startTime: createDuration, - endTime: createDuration, - duration: createDuration, - startRecur: identity, - endRecur: identity -}; -var recurring = { - parse: function(refined, dateEnv) { - if (refined.daysOfWeek || refined.startTime || refined.endTime || refined.startRecur || refined.endRecur) { - var recurringData = { - daysOfWeek: refined.daysOfWeek || null, - startTime: refined.startTime || null, - endTime: refined.endTime || null, - startRecur: refined.startRecur ? dateEnv.createMarker(refined.startRecur) : null, - endRecur: refined.endRecur ? dateEnv.createMarker(refined.endRecur) : null - }; - var duration = void 0; - if (refined.duration) { - duration = refined.duration; + SegHierarchy2.prototype.addSegs = function(inputs) { + var hiddenEntries = []; + for (var _i = 0, inputs_1 = inputs; _i < inputs_1.length; _i++) { + var input = inputs_1[_i]; + this.insertEntry(input, hiddenEntries); + } + return hiddenEntries; + }; + SegHierarchy2.prototype.insertEntry = function(entry, hiddenEntries) { + var insertion = this.findInsertion(entry); + if (this.isInsertionValid(insertion, entry)) { + this.insertEntryAt(entry, insertion); + return 1; + } + return this.handleInvalidInsertion(insertion, entry, hiddenEntries); + }; + SegHierarchy2.prototype.isInsertionValid = function(insertion, entry) { + return (this.maxCoord === -1 || insertion.levelCoord + entry.thickness <= this.maxCoord) && (this.maxStackCnt === -1 || insertion.stackCnt < this.maxStackCnt); + }; + SegHierarchy2.prototype.handleInvalidInsertion = function(insertion, entry, hiddenEntries) { + if (this.allowReslicing && insertion.touchingEntry) { + return this.splitEntry(entry, insertion.touchingEntry, hiddenEntries); + } + hiddenEntries.push(entry); + return 0; + }; + SegHierarchy2.prototype.splitEntry = function(entry, barrier, hiddenEntries) { + var partCnt = 0; + var splitHiddenEntries = []; + var entrySpan = entry.span; + var barrierSpan = barrier.span; + if (entrySpan.start < barrierSpan.start) { + partCnt += this.insertEntry({ + index: entry.index, + thickness: entry.thickness, + span: { start: entrySpan.start, end: barrierSpan.start } + }, splitHiddenEntries); + } + if (entrySpan.end > barrierSpan.end) { + partCnt += this.insertEntry({ + index: entry.index, + thickness: entry.thickness, + span: { start: barrierSpan.end, end: entrySpan.end } + }, splitHiddenEntries); + } + if (partCnt) { + hiddenEntries.push.apply(hiddenEntries, __spreadArray([{ + index: entry.index, + thickness: entry.thickness, + span: intersectSpans(barrierSpan, entrySpan) + }], splitHiddenEntries)); + return partCnt; + } + hiddenEntries.push(entry); + return 0; + }; + SegHierarchy2.prototype.insertEntryAt = function(entry, insertion) { + var _a = this, entriesByLevel = _a.entriesByLevel, levelCoords = _a.levelCoords; + if (insertion.lateral === -1) { + insertAt(levelCoords, insertion.level, insertion.levelCoord); + insertAt(entriesByLevel, insertion.level, [entry]); + } else { + insertAt(entriesByLevel[insertion.level], insertion.lateral, entry); + } + this.stackCnts[buildEntryKey(entry)] = insertion.stackCnt; + }; + SegHierarchy2.prototype.findInsertion = function(newEntry) { + var _a = this, levelCoords = _a.levelCoords, entriesByLevel = _a.entriesByLevel, strictOrder = _a.strictOrder, stackCnts = _a.stackCnts; + var levelCnt = levelCoords.length; + var candidateCoord = 0; + var touchingLevel = -1; + var touchingLateral = -1; + var touchingEntry = null; + var stackCnt = 0; + for (var trackingLevel = 0; trackingLevel < levelCnt; trackingLevel += 1) { + var trackingCoord = levelCoords[trackingLevel]; + if (!strictOrder && trackingCoord >= candidateCoord + newEntry.thickness) { + break; } - if (!duration && refined.startTime && refined.endTime) { - duration = subtractDurations(refined.endTime, refined.startTime); + var trackingEntries = entriesByLevel[trackingLevel]; + var trackingEntry = void 0; + var searchRes = binarySearch(trackingEntries, newEntry.span.start, getEntrySpanEnd); + var lateralIndex = searchRes[0] + searchRes[1]; + while ((trackingEntry = trackingEntries[lateralIndex]) && trackingEntry.span.start < newEntry.span.end) { + var trackingEntryBottom = trackingCoord + trackingEntry.thickness; + if (trackingEntryBottom > candidateCoord) { + candidateCoord = trackingEntryBottom; + touchingEntry = trackingEntry; + touchingLevel = trackingLevel; + touchingLateral = lateralIndex; + } + if (trackingEntryBottom === candidateCoord) { + stackCnt = Math.max(stackCnt, stackCnts[buildEntryKey(trackingEntry)] + 1); + } + lateralIndex += 1; } - return { - allDayGuess: Boolean(!refined.startTime && !refined.endTime), - duration, - typeData: recurringData - }; } - return null; - }, - expand: function(typeData, framingRange, dateEnv) { - var clippedFramingRange = intersectRanges(framingRange, { start: typeData.startRecur, end: typeData.endRecur }); - if (clippedFramingRange) { - return expandRanges(typeData.daysOfWeek, typeData.startTime, clippedFramingRange, dateEnv); + var destLevel = 0; + if (touchingEntry) { + destLevel = touchingLevel + 1; + while (destLevel < levelCnt && levelCoords[destLevel] < candidateCoord) { + destLevel += 1; + } } - return []; - } -}; -var simpleRecurringEventsPlugin = createPlugin({ - recurringTypes: [recurring], - eventRefiners: SIMPLE_RECURRING_REFINERS -}); -function expandRanges(daysOfWeek, startTime, framingRange, dateEnv) { - var dowHash = daysOfWeek ? arrayToHash(daysOfWeek) : null; - var dayMarker = startOfDay(framingRange.start); - var endMarker = framingRange.end; - var instanceStarts = []; - while (dayMarker < endMarker) { - var instanceStart = void 0; - if (!dowHash || dowHash[dayMarker.getUTCDay()]) { - if (startTime) { - instanceStart = dateEnv.add(dayMarker, startTime); - } else { - instanceStart = dayMarker; + var destLateral = -1; + if (destLevel < levelCnt && levelCoords[destLevel] === candidateCoord) { + destLateral = binarySearch(entriesByLevel[destLevel], newEntry.span.end, getEntrySpanEnd)[0]; + } + return { + touchingLevel, + touchingLateral, + touchingEntry, + stackCnt, + levelCoord: candidateCoord, + level: destLevel, + lateral: destLateral + }; + }; + SegHierarchy2.prototype.toRects = function() { + var _a = this, entriesByLevel = _a.entriesByLevel, levelCoords = _a.levelCoords; + var levelCnt = entriesByLevel.length; + var rects = []; + for (var level = 0; level < levelCnt; level += 1) { + var entries = entriesByLevel[level]; + var levelCoord = levelCoords[level]; + for (var _i = 0, entries_1 = entries; _i < entries_1.length; _i++) { + var entry = entries_1[_i]; + rects.push(__assign(__assign({}, entry), { levelCoord })); } - instanceStarts.push(instanceStart); } - dayMarker = addDays(dayMarker, 1); - } - return instanceStarts; + return rects; + }; + return SegHierarchy2; +}(); +function getEntrySpanEnd(entry) { + return entry.span.end; } -var changeHandlerPlugin = createPlugin({ - optionChangeHandlers: { - events: function(events, context) { - handleEventSources([events], context); - }, - eventSources: handleEventSources - } -}); -function handleEventSources(inputs, context) { - var unfoundSources = hashValuesToArray(context.getCurrentData().eventSources); - var newInputs = []; - for (var _i = 0, inputs_1 = inputs; _i < inputs_1.length; _i++) { - var input = inputs_1[_i]; - var inputFound = false; - for (var i3 = 0; i3 < unfoundSources.length; i3 += 1) { - if (unfoundSources[i3]._raw === input) { - unfoundSources.splice(i3, 1); - inputFound = true; - break; +function buildEntryKey(entry) { + return entry.index + ":" + entry.span.start; +} +function groupIntersectingEntries(entries) { + var merges = []; + for (var _i = 0, entries_2 = entries; _i < entries_2.length; _i++) { + var entry = entries_2[_i]; + var filteredMerges = []; + var hungryMerge = { + span: entry.span, + entries: [entry] + }; + for (var _a = 0, merges_1 = merges; _a < merges_1.length; _a++) { + var merge = merges_1[_a]; + if (intersectSpans(merge.span, hungryMerge.span)) { + hungryMerge = { + entries: merge.entries.concat(hungryMerge.entries), + span: joinSpans(merge.span, hungryMerge.span) + }; + } else { + filteredMerges.push(merge); } } - if (!inputFound) { - newInputs.push(input); - } - } - for (var _a = 0, unfoundSources_1 = unfoundSources; _a < unfoundSources_1.length; _a++) { - var unfoundSource = unfoundSources_1[_a]; - context.dispatch({ - type: "REMOVE_EVENT_SOURCE", - sourceId: unfoundSource.sourceId - }); - } - for (var _b = 0, newInputs_1 = newInputs; _b < newInputs_1.length; _b++) { - var newInput = newInputs_1[_b]; - context.calendarApi.addEventSource(newInput); + filteredMerges.push(hungryMerge); + merges = filteredMerges; } + return merges; } -function handleDateProfile(dateProfile, context) { - context.emitter.trigger("datesSet", __assign(__assign({}, buildRangeApiWithTimeZone(dateProfile.activeRange, context.dateEnv)), { view: context.viewApi })); +function joinSpans(span0, span1) { + return { + start: Math.min(span0.start, span1.start), + end: Math.max(span0.end, span1.end) + }; } -function handleEventStore(eventStore, context) { - var emitter = context.emitter; - if (emitter.hasHandlers("eventsSet")) { - emitter.trigger("eventsSet", buildEventApis(eventStore, context)); +function intersectSpans(span0, span1) { + var start = Math.max(span0.start, span1.start); + var end = Math.min(span0.end, span1.end); + if (start < end) { + return { start, end }; } + return null; } -var globalPlugins = [ - arrayEventSourcePlugin, - funcEventSourcePlugin, - jsonFeedEventSourcePlugin, - simpleRecurringEventsPlugin, - changeHandlerPlugin, - createPlugin({ - isLoadingFuncs: [ - function(state) { - return computeEventSourcesLoading(state.eventSources); - } - ], - contentTypeHandlers: { - html: buildHtmlRenderer, - domNodes: buildDomNodeRenderer - }, - propSetHandlers: { - dateProfile: handleDateProfile, - eventStore: handleEventStore - } - }) -]; -function buildHtmlRenderer() { - var currentEl = null; - var currentHtml = ""; - function render4(el, html) { - if (el !== currentEl || html !== currentHtml) { - el.innerHTML = html; - } - currentEl = el; - currentHtml = html; +function insertAt(arr, index, item) { + arr.splice(index, 0, item); +} +function binarySearch(a3, searchVal, getItemVal) { + var startIndex = 0; + var endIndex = a3.length; + if (!endIndex || searchVal < getItemVal(a3[startIndex])) { + return [0, 0]; } - function destroy() { - currentEl.innerHTML = ""; - currentEl = null; - currentHtml = ""; + if (searchVal > getItemVal(a3[endIndex - 1])) { + return [endIndex, 0]; } - return { render: render4, destroy }; -} -function buildDomNodeRenderer() { - var currentEl = null; - var currentDomNodes = []; - function render4(el, domNodes) { - var newDomNodes = Array.prototype.slice.call(domNodes); - if (el !== currentEl || !isArraysEqual(currentDomNodes, newDomNodes)) { - for (var _i = 0, newDomNodes_1 = newDomNodes; _i < newDomNodes_1.length; _i++) { - var newNode = newDomNodes_1[_i]; - el.appendChild(newNode); - } - destroy(); + while (startIndex < endIndex) { + var middleIndex = Math.floor(startIndex + (endIndex - startIndex) / 2); + var middleVal = getItemVal(a3[middleIndex]); + if (searchVal < middleVal) { + endIndex = middleIndex; + } else if (searchVal > middleVal) { + startIndex = middleIndex + 1; + } else { + return [middleIndex, 1]; } - currentEl = el; - currentDomNodes = newDomNodes; } - function destroy() { - currentDomNodes.forEach(removeElement); - currentDomNodes = []; - currentEl = null; + return [startIndex, 0]; +} +var Interaction = function() { + function Interaction2(settings) { + this.component = settings.component; + this.isHitComboAllowed = settings.isHitComboAllowed || null; } - return { render: render4, destroy }; + Interaction2.prototype.destroy = function() { + }; + return Interaction2; +}(); +function parseInteractionSettings(component, input) { + return { + component, + el: input.el, + useEventCenter: input.useEventCenter != null ? input.useEventCenter : true, + isHitComboAllowed: input.isHitComboAllowed || null + }; } -var DelayedRunner = function() { - function DelayedRunner2(drainedOption) { - this.drainedOption = drainedOption; - this.isRunning = false; - this.isDirty = false; - this.pauseDepths = {}; - this.timeoutId = 0; +function interactionSettingsToStore(settings) { + var _a; + return _a = {}, _a[settings.component.uid] = settings, _a; +} +var interactionSettingsStore = {}; +var ElementDragging = function() { + function ElementDragging2(el, selector) { + this.emitter = new Emitter(); + } + ElementDragging2.prototype.destroy = function() { + }; + ElementDragging2.prototype.setMirrorIsVisible = function(bool) { + }; + ElementDragging2.prototype.setMirrorNeedsRevert = function(bool) { + }; + ElementDragging2.prototype.setAutoScrollEnabled = function(bool) { + }; + return ElementDragging2; +}(); +var config = {}; +var DRAG_META_REFINERS = { + startTime: createDuration, + duration: createDuration, + create: Boolean, + sourceId: String +}; +function parseDragMeta(raw) { + var _a = refineProps(raw, DRAG_META_REFINERS), refined = _a.refined, extra = _a.extra; + return { + startTime: refined.startTime || null, + duration: refined.duration || null, + create: refined.create != null ? refined.create : true, + sourceId: refined.sourceId, + leftoverProps: extra + }; +} +var ToolbarSection = function(_super) { + __extends(ToolbarSection2, _super); + function ToolbarSection2() { + return _super !== null && _super.apply(this, arguments) || this; } - DelayedRunner2.prototype.request = function(delay) { - this.isDirty = true; - if (!this.isPaused()) { - this.clearTimeout(); - if (delay == null) { - this.tryDrain(); + ToolbarSection2.prototype.render = function() { + var _this = this; + var children = this.props.widgetGroups.map(function(widgetGroup) { + return _this.renderWidgetGroup(widgetGroup); + }); + return createElement.apply(void 0, __spreadArray(["div", { className: "fc-toolbar-chunk" }], children)); + }; + ToolbarSection2.prototype.renderWidgetGroup = function(widgetGroup) { + var props = this.props; + var theme = this.context.theme; + var children = []; + var isOnlyButtons = true; + for (var _i = 0, widgetGroup_1 = widgetGroup; _i < widgetGroup_1.length; _i++) { + var widget = widgetGroup_1[_i]; + var buttonName = widget.buttonName, buttonClick = widget.buttonClick, buttonText = widget.buttonText, buttonIcon = widget.buttonIcon, buttonHint = widget.buttonHint; + if (buttonName === "title") { + isOnlyButtons = false; + children.push(createElement("h2", { className: "fc-toolbar-title", id: props.titleId }, props.title)); } else { - this.timeoutId = setTimeout(this.tryDrain.bind(this), delay); + var isPressed = buttonName === props.activeButton; + var isDisabled = !props.isTodayEnabled && buttonName === "today" || !props.isPrevEnabled && buttonName === "prev" || !props.isNextEnabled && buttonName === "next"; + var buttonClasses = ["fc-" + buttonName + "-button", theme.getClass("button")]; + if (isPressed) { + buttonClasses.push(theme.getClass("buttonActive")); + } + children.push(createElement("button", { type: "button", title: typeof buttonHint === "function" ? buttonHint(props.navUnit) : buttonHint, disabled: isDisabled, "aria-pressed": isPressed, className: buttonClasses.join(" "), onClick: buttonClick }, buttonText || (buttonIcon ? createElement("span", { className: buttonIcon }) : ""))); } } - }; - DelayedRunner2.prototype.pause = function(scope) { - if (scope === void 0) { - scope = ""; + if (children.length > 1) { + var groupClassName = isOnlyButtons && theme.getClass("buttonGroup") || ""; + return createElement.apply(void 0, __spreadArray(["div", { className: groupClassName }], children)); } - var pauseDepths = this.pauseDepths; - pauseDepths[scope] = (pauseDepths[scope] || 0) + 1; - this.clearTimeout(); + return children[0]; }; - DelayedRunner2.prototype.resume = function(scope, force) { - if (scope === void 0) { - scope = ""; + return ToolbarSection2; +}(BaseComponent); +var Toolbar = function(_super) { + __extends(Toolbar2, _super); + function Toolbar2() { + return _super !== null && _super.apply(this, arguments) || this; + } + Toolbar2.prototype.render = function() { + var _a = this.props, model = _a.model, extraClassName = _a.extraClassName; + var forceLtr = false; + var startContent; + var endContent; + var sectionWidgets = model.sectionWidgets; + var centerContent = sectionWidgets.center; + if (sectionWidgets.left) { + forceLtr = true; + startContent = sectionWidgets.left; + } else { + startContent = sectionWidgets.start; } - var pauseDepths = this.pauseDepths; - if (scope in pauseDepths) { - if (force) { - delete pauseDepths[scope]; - } else { - pauseDepths[scope] -= 1; - var depth = pauseDepths[scope]; - if (depth <= 0) { - delete pauseDepths[scope]; - } - } - this.tryDrain(); + if (sectionWidgets.right) { + forceLtr = true; + endContent = sectionWidgets.right; + } else { + endContent = sectionWidgets.end; } + var classNames = [ + extraClassName || "", + "fc-toolbar", + forceLtr ? "fc-toolbar-ltr" : "" + ]; + return createElement("div", { className: classNames.join(" ") }, this.renderSection("start", startContent || []), this.renderSection("center", centerContent || []), this.renderSection("end", endContent || [])); }; - DelayedRunner2.prototype.isPaused = function() { - return Object.keys(this.pauseDepths).length; + Toolbar2.prototype.renderSection = function(key, widgetGroups) { + var props = this.props; + return createElement(ToolbarSection, { key, widgetGroups, title: props.title, navUnit: props.navUnit, activeButton: props.activeButton, isTodayEnabled: props.isTodayEnabled, isPrevEnabled: props.isPrevEnabled, isNextEnabled: props.isNextEnabled, titleId: props.titleId }); }; - DelayedRunner2.prototype.tryDrain = function() { - if (!this.isRunning && !this.isPaused()) { - this.isRunning = true; - while (this.isDirty) { - this.isDirty = false; - this.drained(); + return Toolbar2; +}(BaseComponent); +var ViewContainer = function(_super) { + __extends(ViewContainer2, _super); + function ViewContainer2() { + var _this = _super !== null && _super.apply(this, arguments) || this; + _this.state = { + availableWidth: null + }; + _this.handleEl = function(el) { + _this.el = el; + setRef(_this.props.elRef, el); + _this.updateAvailableWidth(); + }; + _this.handleResize = function() { + _this.updateAvailableWidth(); + }; + return _this; + } + ViewContainer2.prototype.render = function() { + var _a = this, props = _a.props, state = _a.state; + var aspectRatio = props.aspectRatio; + var classNames = [ + "fc-view-harness", + aspectRatio || props.liquid || props.height ? "fc-view-harness-active" : "fc-view-harness-passive" + ]; + var height = ""; + var paddingBottom = ""; + if (aspectRatio) { + if (state.availableWidth !== null) { + height = state.availableWidth / aspectRatio; + } else { + paddingBottom = 1 / aspectRatio * 100 + "%"; } - this.isRunning = false; + } else { + height = props.height || ""; } + return createElement("div", { "aria-labelledby": props.labeledById, ref: this.handleEl, className: classNames.join(" "), style: { height, paddingBottom } }, props.children); }; - DelayedRunner2.prototype.clear = function() { - this.clearTimeout(); - this.isDirty = false; - this.pauseDepths = {}; + ViewContainer2.prototype.componentDidMount = function() { + this.context.addResizeHandler(this.handleResize); }; - DelayedRunner2.prototype.clearTimeout = function() { - if (this.timeoutId) { - clearTimeout(this.timeoutId); - this.timeoutId = 0; - } + ViewContainer2.prototype.componentWillUnmount = function() { + this.context.removeResizeHandler(this.handleResize); }; - DelayedRunner2.prototype.drained = function() { - if (this.drainedOption) { - this.drainedOption(); + ViewContainer2.prototype.updateAvailableWidth = function() { + if (this.el && this.props.aspectRatio) { + this.setState({ availableWidth: this.el.offsetWidth }); } }; - return DelayedRunner2; -}(); -var TaskRunner = function() { - function TaskRunner2(runTaskOption, drainedOption) { - this.runTaskOption = runTaskOption; - this.drainedOption = drainedOption; - this.queue = []; - this.delayedRunner = new DelayedRunner(this.drain.bind(this)); + return ViewContainer2; +}(BaseComponent); +var EventClicking = function(_super) { + __extends(EventClicking2, _super); + function EventClicking2(settings) { + var _this = _super.call(this, settings) || this; + _this.handleSegClick = function(ev, segEl) { + var component = _this.component; + var context = component.context; + var seg = getElSeg(segEl); + if (seg && component.isValidSegDownEl(ev.target)) { + var hasUrlContainer = elementClosest(ev.target, ".fc-event-forced-url"); + var url = hasUrlContainer ? hasUrlContainer.querySelector("a[href]").href : ""; + context.emitter.trigger("eventClick", { + el: segEl, + event: new EventApi(component.context, seg.eventRange.def, seg.eventRange.instance), + jsEvent: ev, + view: context.viewApi + }); + if (url && !ev.defaultPrevented) { + window.location.href = url; + } + } + }; + _this.destroy = listenBySelector(settings.el, "click", ".fc-event", _this.handleSegClick); + return _this; } - TaskRunner2.prototype.request = function(task, delay) { - this.queue.push(task); - this.delayedRunner.request(delay); + return EventClicking2; +}(Interaction); +var EventHovering = function(_super) { + __extends(EventHovering2, _super); + function EventHovering2(settings) { + var _this = _super.call(this, settings) || this; + _this.handleEventElRemove = function(el) { + if (el === _this.currentSegEl) { + _this.handleSegLeave(null, _this.currentSegEl); + } + }; + _this.handleSegEnter = function(ev, segEl) { + if (getElSeg(segEl)) { + _this.currentSegEl = segEl; + _this.triggerEvent("eventMouseEnter", ev, segEl); + } + }; + _this.handleSegLeave = function(ev, segEl) { + if (_this.currentSegEl) { + _this.currentSegEl = null; + _this.triggerEvent("eventMouseLeave", ev, segEl); + } + }; + _this.removeHoverListeners = listenToHoverBySelector(settings.el, ".fc-event", _this.handleSegEnter, _this.handleSegLeave); + return _this; + } + EventHovering2.prototype.destroy = function() { + this.removeHoverListeners(); }; - TaskRunner2.prototype.pause = function(scope) { - this.delayedRunner.pause(scope); + EventHovering2.prototype.triggerEvent = function(publicEvName, ev, segEl) { + var component = this.component; + var context = component.context; + var seg = getElSeg(segEl); + if (!ev || component.isValidSegDownEl(ev.target)) { + context.emitter.trigger(publicEvName, { + el: segEl, + event: new EventApi(context, seg.eventRange.def, seg.eventRange.instance), + jsEvent: ev, + view: context.viewApi + }); + } }; - TaskRunner2.prototype.resume = function(scope, force) { - this.delayedRunner.resume(scope, force); + return EventHovering2; +}(Interaction); +var CalendarContent = function(_super) { + __extends(CalendarContent2, _super); + function CalendarContent2() { + var _this = _super !== null && _super.apply(this, arguments) || this; + _this.buildViewContext = memoize(buildViewContext); + _this.buildViewPropTransformers = memoize(buildViewPropTransformers); + _this.buildToolbarProps = memoize(buildToolbarProps); + _this.headerRef = createRef(); + _this.footerRef = createRef(); + _this.interactionsStore = {}; + _this.state = { + viewLabelId: getUniqueDomId() + }; + _this.registerInteractiveComponent = function(component, settingsInput) { + var settings = parseInteractionSettings(component, settingsInput); + var DEFAULT_INTERACTIONS = [ + EventClicking, + EventHovering + ]; + var interactionClasses = DEFAULT_INTERACTIONS.concat(_this.props.pluginHooks.componentInteractions); + var interactions = interactionClasses.map(function(TheInteractionClass) { + return new TheInteractionClass(settings); + }); + _this.interactionsStore[component.uid] = interactions; + interactionSettingsStore[component.uid] = settings; + }; + _this.unregisterInteractiveComponent = function(component) { + var listeners = _this.interactionsStore[component.uid]; + if (listeners) { + for (var _i = 0, listeners_1 = listeners; _i < listeners_1.length; _i++) { + var listener = listeners_1[_i]; + listener.destroy(); + } + delete _this.interactionsStore[component.uid]; + } + delete interactionSettingsStore[component.uid]; + }; + _this.resizeRunner = new DelayedRunner(function() { + _this.props.emitter.trigger("_resize", true); + _this.props.emitter.trigger("windowResize", { view: _this.props.viewApi }); + }); + _this.handleWindowResize = function(ev) { + var options = _this.props.options; + if (options.handleWindowResize && ev.target === window) { + _this.resizeRunner.request(options.windowResizeDelay); + } + }; + return _this; + } + CalendarContent2.prototype.render = function() { + var props = this.props; + var toolbarConfig = props.toolbarConfig, options = props.options; + var toolbarProps = this.buildToolbarProps(props.viewSpec, props.dateProfile, props.dateProfileGenerator, props.currentDate, getNow(props.options.now, props.dateEnv), props.viewTitle); + var viewVGrow = false; + var viewHeight = ""; + var viewAspectRatio; + if (props.isHeightAuto || props.forPrint) { + viewHeight = ""; + } else if (options.height != null) { + viewVGrow = true; + } else if (options.contentHeight != null) { + viewHeight = options.contentHeight; + } else { + viewAspectRatio = Math.max(options.aspectRatio, 0.5); + } + var viewContext = this.buildViewContext(props.viewSpec, props.viewApi, props.options, props.dateProfileGenerator, props.dateEnv, props.theme, props.pluginHooks, props.dispatch, props.getCurrentData, props.emitter, props.calendarApi, this.registerInteractiveComponent, this.unregisterInteractiveComponent); + var viewLabelId = toolbarConfig.header && toolbarConfig.header.hasTitle ? this.state.viewLabelId : ""; + return createElement(ViewContextType.Provider, { value: viewContext }, toolbarConfig.header && createElement(Toolbar, __assign({ ref: this.headerRef, extraClassName: "fc-header-toolbar", model: toolbarConfig.header, titleId: viewLabelId }, toolbarProps)), createElement(ViewContainer, { liquid: viewVGrow, height: viewHeight, aspectRatio: viewAspectRatio, labeledById: viewLabelId }, this.renderView(props), this.buildAppendContent()), toolbarConfig.footer && createElement(Toolbar, __assign({ ref: this.footerRef, extraClassName: "fc-footer-toolbar", model: toolbarConfig.footer, titleId: "" }, toolbarProps))); }; - TaskRunner2.prototype.drain = function() { - var queue = this.queue; - while (queue.length) { - var completedTasks = []; - var task = void 0; - while (task = queue.shift()) { - this.runTask(task); - completedTasks.push(task); + CalendarContent2.prototype.componentDidMount = function() { + var props = this.props; + this.calendarInteractions = props.pluginHooks.calendarInteractions.map(function(CalendarInteractionClass) { + return new CalendarInteractionClass(props); + }); + window.addEventListener("resize", this.handleWindowResize); + var propSetHandlers = props.pluginHooks.propSetHandlers; + for (var propName in propSetHandlers) { + propSetHandlers[propName](props[propName], props); + } + }; + CalendarContent2.prototype.componentDidUpdate = function(prevProps) { + var props = this.props; + var propSetHandlers = props.pluginHooks.propSetHandlers; + for (var propName in propSetHandlers) { + if (props[propName] !== prevProps[propName]) { + propSetHandlers[propName](props[propName], props); } - this.drained(completedTasks); } }; - TaskRunner2.prototype.runTask = function(task) { - if (this.runTaskOption) { - this.runTaskOption(task); + CalendarContent2.prototype.componentWillUnmount = function() { + window.removeEventListener("resize", this.handleWindowResize); + this.resizeRunner.clear(); + for (var _i = 0, _a = this.calendarInteractions; _i < _a.length; _i++) { + var interaction = _a[_i]; + interaction.destroy(); } + this.props.emitter.trigger("_unmount"); }; - TaskRunner2.prototype.drained = function(completedTasks) { - if (this.drainedOption) { - this.drainedOption(completedTasks); + CalendarContent2.prototype.buildAppendContent = function() { + var props = this.props; + var children = props.pluginHooks.viewContainerAppends.map(function(buildAppendContent) { + return buildAppendContent(props); + }); + return createElement.apply(void 0, __spreadArray([Fragment, {}], children)); + }; + CalendarContent2.prototype.renderView = function(props) { + var pluginHooks = props.pluginHooks; + var viewSpec = props.viewSpec; + var viewProps = { + dateProfile: props.dateProfile, + businessHours: props.businessHours, + eventStore: props.renderableEventStore, + eventUiBases: props.eventUiBases, + dateSelection: props.dateSelection, + eventSelection: props.eventSelection, + eventDrag: props.eventDrag, + eventResize: props.eventResize, + isHeightAuto: props.isHeightAuto, + forPrint: props.forPrint + }; + var transformers = this.buildViewPropTransformers(pluginHooks.viewPropsTransformers); + for (var _i = 0, transformers_1 = transformers; _i < transformers_1.length; _i++) { + var transformer = transformers_1[_i]; + __assign(viewProps, transformer.transform(viewProps, props)); } + var ViewComponent = viewSpec.component; + return createElement(ViewComponent, __assign({}, viewProps)); + }; + return CalendarContent2; +}(PureComponent); +function buildToolbarProps(viewSpec, dateProfile, dateProfileGenerator, currentDate, now2, title) { + var todayInfo = dateProfileGenerator.build(now2, void 0, false); + var prevInfo = dateProfileGenerator.buildPrev(dateProfile, currentDate, false); + var nextInfo = dateProfileGenerator.buildNext(dateProfile, currentDate, false); + return { + title, + activeButton: viewSpec.type, + navUnit: viewSpec.singleUnit, + isTodayEnabled: todayInfo.isValid && !rangeContainsMarker(dateProfile.currentRange, now2), + isPrevEnabled: prevInfo.isValid, + isNextEnabled: nextInfo.isValid }; - return TaskRunner2; -}(); -function buildTitle(dateProfile, viewOptions, dateEnv) { - var range; - if (/^(year|month)$/.test(dateProfile.currentRangeUnit)) { - range = dateProfile.currentRange; - } else { - range = dateProfile.activeRange; - } - return dateEnv.formatRange(range.start, range.end, createFormatter(viewOptions.titleFormat || buildTitleFormat(dateProfile)), { - isEndExclusive: dateProfile.isRangeAllDay, - defaultSeparator: viewOptions.titleRangeSeparator - }); } -function buildTitleFormat(dateProfile) { - var currentRangeUnit = dateProfile.currentRangeUnit; - if (currentRangeUnit === "year") { - return { year: "numeric" }; - } - if (currentRangeUnit === "month") { - return { year: "numeric", month: "long" }; - } - var days = diffWholeDays(dateProfile.currentRange.start, dateProfile.currentRange.end); - if (days !== null && days > 1) { - return { year: "numeric", month: "short", day: "numeric" }; - } - return { year: "numeric", month: "long", day: "numeric" }; +function buildViewPropTransformers(theClasses) { + return theClasses.map(function(TheClass) { + return new TheClass(); + }); } -var CalendarDataManager = function() { - function CalendarDataManager2(props) { - var _this = this; - this.computeOptionsData = memoize(this._computeOptionsData); - this.computeCurrentViewData = memoize(this._computeCurrentViewData); - this.organizeRawLocales = memoize(organizeRawLocales); - this.buildLocale = memoize(buildLocale); - this.buildPluginHooks = buildBuildPluginHooks(); - this.buildDateEnv = memoize(buildDateEnv); - this.buildTheme = memoize(buildTheme); - this.parseToolbars = memoize(parseToolbars); - this.buildViewSpecs = memoize(buildViewSpecs); - this.buildDateProfileGenerator = memoizeObjArg(buildDateProfileGenerator); - this.buildViewApi = memoize(buildViewApi); - this.buildViewUiProps = memoizeObjArg(buildViewUiProps); - this.buildEventUiBySource = memoize(buildEventUiBySource, isPropsEqual); - this.buildEventUiBases = memoize(buildEventUiBases); - this.parseContextBusinessHours = memoizeObjArg(parseContextBusinessHours); - this.buildTitle = memoize(buildTitle); - this.emitter = new Emitter(); - this.actionRunner = new TaskRunner(this._handleAction.bind(this), this.updateData.bind(this)); - this.currentCalendarOptionsInput = {}; - this.currentCalendarOptionsRefined = {}; - this.currentViewOptionsInput = {}; - this.currentViewOptionsRefined = {}; - this.currentCalendarOptionsRefiners = {}; - this.getCurrentData = function() { - return _this.data; - }; - this.dispatch = function(action) { - _this.actionRunner.request(action); +var CalendarRoot = function(_super) { + __extends(CalendarRoot2, _super); + function CalendarRoot2() { + var _this = _super !== null && _super.apply(this, arguments) || this; + _this.state = { + forPrint: false }; - this.props = props; - this.actionRunner.pause(); - var dynamicOptionOverrides = {}; - var optionsData = this.computeOptionsData(props.optionOverrides, dynamicOptionOverrides, props.calendarApi); - var currentViewType = optionsData.calendarOptions.initialView || optionsData.pluginHooks.initialView; - var currentViewData = this.computeCurrentViewData(currentViewType, optionsData, props.optionOverrides, dynamicOptionOverrides); - props.calendarApi.currentDataManager = this; - this.emitter.setThisContext(props.calendarApi); - this.emitter.setOptions(currentViewData.options); - var currentDate = getInitialDate(optionsData.calendarOptions, optionsData.dateEnv); - var dateProfile = currentViewData.dateProfileGenerator.build(currentDate); - if (!rangeContainsMarker(dateProfile.activeRange, currentDate)) { - currentDate = dateProfile.currentRange.start; - } - var calendarContext = { - dateEnv: optionsData.dateEnv, - options: optionsData.calendarOptions, - pluginHooks: optionsData.pluginHooks, - calendarApi: props.calendarApi, - dispatch: this.dispatch, - emitter: this.emitter, - getCurrentData: this.getCurrentData + _this.handleBeforePrint = function() { + _this.setState({ forPrint: true }); }; - for (var _i = 0, _a = optionsData.pluginHooks.contextInit; _i < _a.length; _i++) { - var callback = _a[_i]; - callback(calendarContext); - } - var eventSources = initEventSources(optionsData.calendarOptions, dateProfile, calendarContext); - var initialState = { - dynamicOptionOverrides, - currentViewType, - currentDate, - dateProfile, - businessHours: this.parseContextBusinessHours(calendarContext), - eventSources, - eventUiBases: {}, - eventStore: createEmptyEventStore(), - renderableEventStore: createEmptyEventStore(), - dateSelection: null, - eventSelection: "", - eventDrag: null, - eventResize: null, - selectionConfig: this.buildViewUiProps(calendarContext).selectionConfig + _this.handleAfterPrint = function() { + _this.setState({ forPrint: false }); }; - var contextAndState = __assign(__assign({}, calendarContext), initialState); - for (var _b = 0, _c = optionsData.pluginHooks.reducers; _b < _c.length; _b++) { - var reducer = _c[_b]; - __assign(initialState, reducer(null, null, contextAndState)); - } - if (computeIsLoading(initialState, calendarContext)) { - this.emitter.trigger("loading", true); + return _this; + } + CalendarRoot2.prototype.render = function() { + var props = this.props; + var options = props.options; + var forPrint = this.state.forPrint; + var isHeightAuto = forPrint || options.height === "auto" || options.contentHeight === "auto"; + var height = !isHeightAuto && options.height != null ? options.height : ""; + var classNames = [ + "fc", + forPrint ? "fc-media-print" : "fc-media-screen", + "fc-direction-" + options.direction, + props.theme.getClass("root") + ]; + if (!getCanVGrowWithinCell()) { + classNames.push("fc-liquid-hack"); } - this.state = initialState; - this.updateData(); - this.actionRunner.resume(); + return props.children(classNames, height, isHeightAuto, forPrint); + }; + CalendarRoot2.prototype.componentDidMount = function() { + var emitter = this.props.emitter; + emitter.on("_beforeprint", this.handleBeforePrint); + emitter.on("_afterprint", this.handleAfterPrint); + }; + CalendarRoot2.prototype.componentWillUnmount = function() { + var emitter = this.props.emitter; + emitter.off("_beforeprint", this.handleBeforePrint); + emitter.off("_afterprint", this.handleAfterPrint); + }; + return CalendarRoot2; +}(BaseComponent); +function computeFallbackHeaderFormat(datesRepDistinctDays, dayCnt) { + if (!datesRepDistinctDays || dayCnt > 10) { + return createFormatter({ weekday: "short" }); } - CalendarDataManager2.prototype.resetOptions = function(optionOverrides, append) { + if (dayCnt > 1) { + return createFormatter({ weekday: "short", month: "numeric", day: "numeric", omitCommas: true }); + } + return createFormatter({ weekday: "long" }); +} +var CLASS_NAME = "fc-col-header-cell"; +function renderInner$1(hookProps) { + return hookProps.text; +} +var TableDateCell = function(_super) { + __extends(TableDateCell2, _super); + function TableDateCell2() { + return _super !== null && _super.apply(this, arguments) || this; + } + TableDateCell2.prototype.render = function() { + var _a = this.context, dateEnv = _a.dateEnv, options = _a.options, theme = _a.theme, viewApi = _a.viewApi; var props = this.props; - props.optionOverrides = append ? __assign(__assign({}, props.optionOverrides), optionOverrides) : optionOverrides; - this.actionRunner.request({ - type: "NOTHING" + var date = props.date, dateProfile = props.dateProfile; + var dayMeta = getDateMeta(date, props.todayRange, null, dateProfile); + var classNames = [CLASS_NAME].concat(getDayClassNames(dayMeta, theme)); + var text = dateEnv.format(date, props.dayHeaderFormat); + var navLinkAttrs = !dayMeta.isDisabled && props.colCnt > 1 ? buildNavLinkAttrs(this.context, date) : {}; + var hookProps = __assign(__assign(__assign({ date: dateEnv.toDate(date), view: viewApi }, props.extraHookProps), { text }), dayMeta); + return createElement(RenderHook, { hookProps, classNames: options.dayHeaderClassNames, content: options.dayHeaderContent, defaultContent: renderInner$1, didMount: options.dayHeaderDidMount, willUnmount: options.dayHeaderWillUnmount }, function(rootElRef, customClassNames, innerElRef, innerContent) { + return createElement("th", __assign({ ref: rootElRef, role: "columnheader", className: classNames.concat(customClassNames).join(" "), "data-date": !dayMeta.isDisabled ? formatDayString(date) : void 0, colSpan: props.colSpan }, props.extraDataAttrs), createElement("div", { className: "fc-scrollgrid-sync-inner" }, !dayMeta.isDisabled && createElement("a", __assign({ ref: innerElRef, className: [ + "fc-col-header-cell-cushion", + props.isSticky ? "fc-sticky" : "" + ].join(" ") }, navLinkAttrs), innerContent))); }); }; - CalendarDataManager2.prototype._handleAction = function(action) { - var _a = this, props = _a.props, state = _a.state, emitter = _a.emitter; - var dynamicOptionOverrides = reduceDynamicOptionOverrides(state.dynamicOptionOverrides, action); - var optionsData = this.computeOptionsData(props.optionOverrides, dynamicOptionOverrides, props.calendarApi); - var currentViewType = reduceViewType(state.currentViewType, action); - var currentViewData = this.computeCurrentViewData(currentViewType, optionsData, props.optionOverrides, dynamicOptionOverrides); - props.calendarApi.currentDataManager = this; - emitter.setThisContext(props.calendarApi); - emitter.setOptions(currentViewData.options); - var calendarContext = { - dateEnv: optionsData.dateEnv, - options: optionsData.calendarOptions, - pluginHooks: optionsData.pluginHooks, - calendarApi: props.calendarApi, - dispatch: this.dispatch, - emitter, - getCurrentData: this.getCurrentData - }; - var currentDate = state.currentDate, dateProfile = state.dateProfile; - if (this.data && this.data.dateProfileGenerator !== currentViewData.dateProfileGenerator) { - dateProfile = currentViewData.dateProfileGenerator.build(currentDate); - } - currentDate = reduceCurrentDate(currentDate, action); - dateProfile = reduceDateProfile(dateProfile, action, currentDate, currentViewData.dateProfileGenerator); - if (action.type === "PREV" || action.type === "NEXT" || !rangeContainsMarker(dateProfile.currentRange, currentDate)) { - currentDate = dateProfile.currentRange.start; - } - var eventSources = reduceEventSources(state.eventSources, action, dateProfile, calendarContext); - var eventStore = reduceEventStore(state.eventStore, action, eventSources, dateProfile, calendarContext); - var isEventsLoading = computeEventSourcesLoading(eventSources); - var renderableEventStore = isEventsLoading && !currentViewData.options.progressiveEventRendering ? state.renderableEventStore || eventStore : eventStore; - var _b = this.buildViewUiProps(calendarContext), eventUiSingleBase = _b.eventUiSingleBase, selectionConfig = _b.selectionConfig; - var eventUiBySource = this.buildEventUiBySource(eventSources); - var eventUiBases = this.buildEventUiBases(renderableEventStore.defs, eventUiSingleBase, eventUiBySource); - var newState = { - dynamicOptionOverrides, - currentViewType, - currentDate, - dateProfile, - eventSources, - eventStore, - renderableEventStore, - selectionConfig, - eventUiBases, - businessHours: this.parseContextBusinessHours(calendarContext), - dateSelection: reduceDateSelection(state.dateSelection, action), - eventSelection: reduceSelectedEvent(state.eventSelection, action), - eventDrag: reduceEventDrag(state.eventDrag, action), - eventResize: reduceEventResize(state.eventResize, action) + return TableDateCell2; +}(BaseComponent); +var WEEKDAY_FORMAT = createFormatter({ weekday: "long" }); +var TableDowCell = function(_super) { + __extends(TableDowCell2, _super); + function TableDowCell2() { + return _super !== null && _super.apply(this, arguments) || this; + } + TableDowCell2.prototype.render = function() { + var props = this.props; + var _a = this.context, dateEnv = _a.dateEnv, theme = _a.theme, viewApi = _a.viewApi, options = _a.options; + var date = addDays(new Date(2592e5), props.dow); + var dateMeta = { + dow: props.dow, + isDisabled: false, + isFuture: false, + isPast: false, + isToday: false, + isOther: false }; - var contextAndState = __assign(__assign({}, calendarContext), newState); - for (var _i = 0, _c = optionsData.pluginHooks.reducers; _i < _c.length; _i++) { - var reducer = _c[_i]; - __assign(newState, reducer(state, action, contextAndState)); - } - var wasLoading = computeIsLoading(state, calendarContext); - var isLoading = computeIsLoading(newState, calendarContext); - if (!wasLoading && isLoading) { - emitter.trigger("loading", true); - } else if (wasLoading && !isLoading) { - emitter.trigger("loading", false); - } - this.state = newState; - if (props.onAction) { - props.onAction(action); - } + var classNames = [CLASS_NAME].concat(getDayClassNames(dateMeta, theme), props.extraClassNames || []); + var text = dateEnv.format(date, props.dayHeaderFormat); + var hookProps = __assign(__assign(__assign(__assign({ + date + }, dateMeta), { view: viewApi }), props.extraHookProps), { text }); + return createElement(RenderHook, { hookProps, classNames: options.dayHeaderClassNames, content: options.dayHeaderContent, defaultContent: renderInner$1, didMount: options.dayHeaderDidMount, willUnmount: options.dayHeaderWillUnmount }, function(rootElRef, customClassNames, innerElRef, innerContent) { + return createElement("th", __assign({ ref: rootElRef, role: "columnheader", className: classNames.concat(customClassNames).join(" "), colSpan: props.colSpan }, props.extraDataAttrs), createElement("div", { className: "fc-scrollgrid-sync-inner" }, createElement("a", { "aria-label": dateEnv.format(date, WEEKDAY_FORMAT), className: [ + "fc-col-header-cell-cushion", + props.isSticky ? "fc-sticky" : "" + ].join(" "), ref: innerElRef }, innerContent))); + }); }; - CalendarDataManager2.prototype.updateData = function() { + return TableDowCell2; +}(BaseComponent); +var NowTimer = function(_super) { + __extends(NowTimer2, _super); + function NowTimer2(props, context) { + var _this = _super.call(this, props, context) || this; + _this.initialNowDate = getNow(context.options.now, context.dateEnv); + _this.initialNowQueriedMs = new Date().valueOf(); + _this.state = _this.computeTiming().currentState; + return _this; + } + NowTimer2.prototype.render = function() { var _a = this, props = _a.props, state = _a.state; - var oldData = this.data; - var optionsData = this.computeOptionsData(props.optionOverrides, state.dynamicOptionOverrides, props.calendarApi); - var currentViewData = this.computeCurrentViewData(state.currentViewType, optionsData, props.optionOverrides, state.dynamicOptionOverrides); - var data = this.data = __assign(__assign(__assign({ viewTitle: this.buildTitle(state.dateProfile, currentViewData.options, optionsData.dateEnv), calendarApi: props.calendarApi, dispatch: this.dispatch, emitter: this.emitter, getCurrentData: this.getCurrentData }, optionsData), currentViewData), state); - var changeHandlers = optionsData.pluginHooks.optionChangeHandlers; - var oldCalendarOptions = oldData && oldData.calendarOptions; - var newCalendarOptions = optionsData.calendarOptions; - if (oldCalendarOptions && oldCalendarOptions !== newCalendarOptions) { - if (oldCalendarOptions.timeZone !== newCalendarOptions.timeZone) { - state.eventSources = data.eventSources = reduceEventSourcesNewTimeZone(data.eventSources, state.dateProfile, data); - state.eventStore = data.eventStore = rezoneEventStoreDates(data.eventStore, oldData.dateEnv, data.dateEnv); - } - for (var optionName in changeHandlers) { - if (oldCalendarOptions[optionName] !== newCalendarOptions[optionName]) { - changeHandlers[optionName](newCalendarOptions[optionName], data); - } - } - } - if (props.onData) { - props.onData(data); - } + return props.children(state.nowDate, state.todayRange); }; - CalendarDataManager2.prototype._computeOptionsData = function(optionOverrides, dynamicOptionOverrides, calendarApi) { - var _a = this.processRawCalendarOptions(optionOverrides, dynamicOptionOverrides), refinedOptions = _a.refinedOptions, pluginHooks = _a.pluginHooks, localeDefaults = _a.localeDefaults, availableLocaleData = _a.availableLocaleData, extra = _a.extra; - warnUnknownOptions(extra); - var dateEnv = this.buildDateEnv(refinedOptions.timeZone, refinedOptions.locale, refinedOptions.weekNumberCalculation, refinedOptions.firstDay, refinedOptions.weekText, pluginHooks, availableLocaleData, refinedOptions.defaultRangeSeparator); - var viewSpecs = this.buildViewSpecs(pluginHooks.views, optionOverrides, dynamicOptionOverrides, localeDefaults); - var theme = this.buildTheme(refinedOptions, pluginHooks); - var toolbarConfig = this.parseToolbars(refinedOptions, optionOverrides, theme, viewSpecs, calendarApi); - return { - calendarOptions: refinedOptions, - pluginHooks, - dateEnv, - viewSpecs, - theme, - toolbarConfig, - localeDefaults, - availableRawLocales: availableLocaleData.map - }; + NowTimer2.prototype.componentDidMount = function() { + this.setTimeout(); }; - CalendarDataManager2.prototype.processRawCalendarOptions = function(optionOverrides, dynamicOptionOverrides) { - var _a = mergeRawOptions([ - BASE_OPTION_DEFAULTS, - optionOverrides, - dynamicOptionOverrides - ]), locales = _a.locales, locale = _a.locale; - var availableLocaleData = this.organizeRawLocales(locales); - var availableRawLocales = availableLocaleData.map; - var localeDefaults = this.buildLocale(locale || availableLocaleData.defaultCode, availableRawLocales).options; - var pluginHooks = this.buildPluginHooks(optionOverrides.plugins || [], globalPlugins); - var refiners = this.currentCalendarOptionsRefiners = __assign(__assign(__assign(__assign(__assign({}, BASE_OPTION_REFINERS), CALENDAR_LISTENER_REFINERS), CALENDAR_OPTION_REFINERS), pluginHooks.listenerRefiners), pluginHooks.optionRefiners); - var extra = {}; - var raw = mergeRawOptions([ - BASE_OPTION_DEFAULTS, - localeDefaults, - optionOverrides, - dynamicOptionOverrides - ]); - var refined = {}; - var currentRaw = this.currentCalendarOptionsInput; - var currentRefined = this.currentCalendarOptionsRefined; - var anyChanges = false; - for (var optionName in raw) { - if (optionName !== "plugins") { - if (raw[optionName] === currentRaw[optionName] || COMPLEX_OPTION_COMPARATORS[optionName] && optionName in currentRaw && COMPLEX_OPTION_COMPARATORS[optionName](currentRaw[optionName], raw[optionName])) { - refined[optionName] = currentRefined[optionName]; - } else if (refiners[optionName]) { - refined[optionName] = refiners[optionName](raw[optionName]); - anyChanges = true; - } else { - extra[optionName] = currentRaw[optionName]; - } - } - } - if (anyChanges) { - this.currentCalendarOptionsInput = raw; - this.currentCalendarOptionsRefined = refined; + NowTimer2.prototype.componentDidUpdate = function(prevProps) { + if (prevProps.unit !== this.props.unit) { + this.clearTimeout(); + this.setTimeout(); } + }; + NowTimer2.prototype.componentWillUnmount = function() { + this.clearTimeout(); + }; + NowTimer2.prototype.computeTiming = function() { + var _a = this, props = _a.props, context = _a.context; + var unroundedNow = addMs(this.initialNowDate, new Date().valueOf() - this.initialNowQueriedMs); + var currentUnitStart = context.dateEnv.startOf(unroundedNow, props.unit); + var nextUnitStart = context.dateEnv.add(currentUnitStart, createDuration(1, props.unit)); + var waitMs = nextUnitStart.valueOf() - unroundedNow.valueOf(); + waitMs = Math.min(1e3 * 60 * 60 * 24, waitMs); return { - rawOptions: this.currentCalendarOptionsInput, - refinedOptions: this.currentCalendarOptionsRefined, - pluginHooks, - availableLocaleData, - localeDefaults, - extra + currentState: { nowDate: currentUnitStart, todayRange: buildDayRange(currentUnitStart) }, + nextState: { nowDate: nextUnitStart, todayRange: buildDayRange(nextUnitStart) }, + waitMs }; }; - CalendarDataManager2.prototype._computeCurrentViewData = function(viewType, optionsData, optionOverrides, dynamicOptionOverrides) { - var viewSpec = optionsData.viewSpecs[viewType]; - if (!viewSpec) { - throw new Error('viewType "' + viewType + `" is not available. Please make sure you've loaded all neccessary plugins`); + NowTimer2.prototype.setTimeout = function() { + var _this = this; + var _a = this.computeTiming(), nextState = _a.nextState, waitMs = _a.waitMs; + this.timeoutId = setTimeout(function() { + _this.setState(nextState, function() { + _this.setTimeout(); + }); + }, waitMs); + }; + NowTimer2.prototype.clearTimeout = function() { + if (this.timeoutId) { + clearTimeout(this.timeoutId); } - var _a = this.processRawViewOptions(viewSpec, optionsData.pluginHooks, optionsData.localeDefaults, optionOverrides, dynamicOptionOverrides), refinedOptions = _a.refinedOptions, extra = _a.extra; - warnUnknownOptions(extra); - var dateProfileGenerator = this.buildDateProfileGenerator({ - dateProfileGeneratorClass: viewSpec.optionDefaults.dateProfileGeneratorClass, - duration: viewSpec.duration, - durationUnit: viewSpec.durationUnit, - usesMinMaxTime: viewSpec.optionDefaults.usesMinMaxTime, - dateEnv: optionsData.dateEnv, - calendarApi: this.props.calendarApi, - slotMinTime: refinedOptions.slotMinTime, - slotMaxTime: refinedOptions.slotMaxTime, - showNonCurrentDates: refinedOptions.showNonCurrentDates, - dayCount: refinedOptions.dayCount, - dateAlignment: refinedOptions.dateAlignment, - dateIncrement: refinedOptions.dateIncrement, - hiddenDays: refinedOptions.hiddenDays, - weekends: refinedOptions.weekends, - nowInput: refinedOptions.now, - validRangeInput: refinedOptions.validRange, - visibleRangeInput: refinedOptions.visibleRange, - monthMode: refinedOptions.monthMode, - fixedWeekCount: refinedOptions.fixedWeekCount + }; + NowTimer2.contextType = ViewContextType; + return NowTimer2; +}(Component); +function buildDayRange(date) { + var start = startOfDay(date); + var end = addDays(start, 1); + return { start, end }; +} +var DayHeader = function(_super) { + __extends(DayHeader2, _super); + function DayHeader2() { + var _this = _super !== null && _super.apply(this, arguments) || this; + _this.createDayHeaderFormatter = memoize(createDayHeaderFormatter); + return _this; + } + DayHeader2.prototype.render = function() { + var context = this.context; + var _a = this.props, dates = _a.dates, dateProfile = _a.dateProfile, datesRepDistinctDays = _a.datesRepDistinctDays, renderIntro = _a.renderIntro; + var dayHeaderFormat = this.createDayHeaderFormatter(context.options.dayHeaderFormat, datesRepDistinctDays, dates.length); + return createElement(NowTimer, { unit: "day" }, function(nowDate, todayRange) { + return createElement("tr", { role: "row" }, renderIntro && renderIntro("day"), dates.map(function(date) { + return datesRepDistinctDays ? createElement(TableDateCell, { key: date.toISOString(), date, dateProfile, todayRange, colCnt: dates.length, dayHeaderFormat }) : createElement(TableDowCell, { key: date.getUTCDay(), dow: date.getUTCDay(), dayHeaderFormat }); + })); }); - var viewApi = this.buildViewApi(viewType, this.getCurrentData, optionsData.dateEnv); - return { viewSpec, options: refinedOptions, dateProfileGenerator, viewApi }; }; - CalendarDataManager2.prototype.processRawViewOptions = function(viewSpec, pluginHooks, localeDefaults, optionOverrides, dynamicOptionOverrides) { - var raw = mergeRawOptions([ - BASE_OPTION_DEFAULTS, - viewSpec.optionDefaults, - localeDefaults, - optionOverrides, - viewSpec.optionOverrides, - dynamicOptionOverrides - ]); - var refiners = __assign(__assign(__assign(__assign(__assign(__assign({}, BASE_OPTION_REFINERS), CALENDAR_LISTENER_REFINERS), CALENDAR_OPTION_REFINERS), VIEW_OPTION_REFINERS), pluginHooks.listenerRefiners), pluginHooks.optionRefiners); - var refined = {}; - var currentRaw = this.currentViewOptionsInput; - var currentRefined = this.currentViewOptionsRefined; - var anyChanges = false; - var extra = {}; - for (var optionName in raw) { - if (raw[optionName] === currentRaw[optionName] || COMPLEX_OPTION_COMPARATORS[optionName] && COMPLEX_OPTION_COMPARATORS[optionName](raw[optionName], currentRaw[optionName])) { - refined[optionName] = currentRefined[optionName]; + return DayHeader2; +}(BaseComponent); +function createDayHeaderFormatter(explicitFormat, datesRepDistinctDays, dateCnt) { + return explicitFormat || computeFallbackHeaderFormat(datesRepDistinctDays, dateCnt); +} +var DaySeriesModel = function() { + function DaySeriesModel2(range2, dateProfileGenerator) { + var date = range2.start; + var end = range2.end; + var indices = []; + var dates = []; + var dayIndex = -1; + while (date < end) { + if (dateProfileGenerator.isHiddenDay(date)) { + indices.push(dayIndex + 0.5); } else { - if (raw[optionName] === this.currentCalendarOptionsInput[optionName] || COMPLEX_OPTION_COMPARATORS[optionName] && COMPLEX_OPTION_COMPARATORS[optionName](raw[optionName], this.currentCalendarOptionsInput[optionName])) { - if (optionName in this.currentCalendarOptionsRefined) { - refined[optionName] = this.currentCalendarOptionsRefined[optionName]; - } - } else if (refiners[optionName]) { - refined[optionName] = refiners[optionName](raw[optionName]); - } else { - extra[optionName] = raw[optionName]; - } - anyChanges = true; + dayIndex += 1; + indices.push(dayIndex); + dates.push(date); } + date = addDays(date, 1); } - if (anyChanges) { - this.currentViewOptionsInput = raw; - this.currentViewOptionsRefined = refined; + this.dates = dates; + this.indices = indices; + this.cnt = dates.length; + } + DaySeriesModel2.prototype.sliceRange = function(range2) { + var firstIndex = this.getDateDayIndex(range2.start); + var lastIndex = this.getDateDayIndex(addDays(range2.end, -1)); + var clippedFirstIndex = Math.max(0, firstIndex); + var clippedLastIndex = Math.min(this.cnt - 1, lastIndex); + clippedFirstIndex = Math.ceil(clippedFirstIndex); + clippedLastIndex = Math.floor(clippedLastIndex); + if (clippedFirstIndex <= clippedLastIndex) { + return { + firstIndex: clippedFirstIndex, + lastIndex: clippedLastIndex, + isStart: firstIndex === clippedFirstIndex, + isEnd: lastIndex === clippedLastIndex + }; } - return { - rawOptions: this.currentViewOptionsInput, - refinedOptions: this.currentViewOptionsRefined, - extra - }; + return null; }; - return CalendarDataManager2; -}(); -function buildDateEnv(timeZone, explicitLocale, weekNumberCalculation, firstDay, weekText, pluginHooks, availableLocaleData, defaultSeparator) { - var locale = buildLocale(explicitLocale || availableLocaleData.defaultCode, availableLocaleData.map); - return new DateEnv({ - calendarSystem: "gregory", - timeZone, - namedTimeZoneImpl: pluginHooks.namedTimeZonedImpl, - locale, - weekNumberCalculation, - firstDay, - weekText, - cmdFormatter: pluginHooks.cmdFormatter, - defaultSeparator - }); -} -function buildTheme(options, pluginHooks) { - var ThemeClass = pluginHooks.themeClasses[options.themeSystem] || StandardTheme; - return new ThemeClass(options); -} -function buildDateProfileGenerator(props) { - var DateProfileGeneratorClass = props.dateProfileGeneratorClass || DateProfileGenerator; - return new DateProfileGeneratorClass(props); -} -function buildViewApi(type, getCurrentData, dateEnv) { - return new ViewApi(type, getCurrentData, dateEnv); -} -function buildEventUiBySource(eventSources) { - return mapHash(eventSources, function(eventSource) { - return eventSource.ui; - }); -} -function buildEventUiBases(eventDefs, eventUiSingleBase, eventUiBySource) { - var eventUiBases = { "": eventUiSingleBase }; - for (var defId in eventDefs) { - var def = eventDefs[defId]; - if (def.sourceId && eventUiBySource[def.sourceId]) { - eventUiBases[defId] = eventUiBySource[def.sourceId]; + DaySeriesModel2.prototype.getDateDayIndex = function(date) { + var indices = this.indices; + var dayOffset = Math.floor(diffDays(this.dates[0], date)); + if (dayOffset < 0) { + return indices[0] - 1; } - } - return eventUiBases; -} -function buildViewUiProps(calendarContext) { - var options = calendarContext.options; - return { - eventUiSingleBase: createEventUi({ - display: options.eventDisplay, - editable: options.editable, - startEditable: options.eventStartEditable, - durationEditable: options.eventDurationEditable, - constraint: options.eventConstraint, - overlap: typeof options.eventOverlap === "boolean" ? options.eventOverlap : void 0, - allow: options.eventAllow, - backgroundColor: options.eventBackgroundColor, - borderColor: options.eventBorderColor, - textColor: options.eventTextColor, - color: options.eventColor - }, calendarContext), - selectionConfig: createEventUi({ - constraint: options.selectConstraint, - overlap: typeof options.selectOverlap === "boolean" ? options.selectOverlap : void 0, - allow: options.selectAllow - }, calendarContext) - }; -} -function computeIsLoading(state, context) { - for (var _i = 0, _a = context.pluginHooks.isLoadingFuncs; _i < _a.length; _i++) { - var isLoadingFunc = _a[_i]; - if (isLoadingFunc(state)) { - return true; + if (dayOffset >= indices.length) { + return indices[indices.length - 1] + 1; } + return indices[dayOffset]; + }; + return DaySeriesModel2; +}(); +var DayTableModel = function() { + function DayTableModel2(daySeries, breakOnWeeks) { + var dates = daySeries.dates; + var daysPerRow; + var firstDay; + var rowCnt; + if (breakOnWeeks) { + firstDay = dates[0].getUTCDay(); + for (daysPerRow = 1; daysPerRow < dates.length; daysPerRow += 1) { + if (dates[daysPerRow].getUTCDay() === firstDay) { + break; + } + } + rowCnt = Math.ceil(dates.length / daysPerRow); + } else { + rowCnt = 1; + daysPerRow = dates.length; + } + this.rowCnt = rowCnt; + this.colCnt = daysPerRow; + this.daySeries = daySeries; + this.cells = this.buildCells(); + this.headerDates = this.buildHeaderDates(); } - return false; -} -function parseContextBusinessHours(calendarContext) { - return parseBusinessHours(calendarContext.options.businessHours, calendarContext); -} -function warnUnknownOptions(options, viewName) { - for (var optionName in options) { - console.warn("Unknown option '" + optionName + "'" + (viewName ? " for view '" + viewName + "'" : "")); - } -} -var CalendarDataProvider = function(_super) { - __extends(CalendarDataProvider2, _super); - function CalendarDataProvider2(props) { - var _this = _super.call(this, props) || this; - _this.handleData = function(data) { - if (!_this.dataManager) { - _this.state = data; - } else { - _this.setState(data); + DayTableModel2.prototype.buildCells = function() { + var rows = []; + for (var row = 0; row < this.rowCnt; row += 1) { + var cells = []; + for (var col = 0; col < this.colCnt; col += 1) { + cells.push(this.buildCell(row, col)); } + rows.push(cells); + } + return rows; + }; + DayTableModel2.prototype.buildCell = function(row, col) { + var date = this.daySeries.dates[row * this.colCnt + col]; + return { + key: date.toISOString(), + date }; - _this.dataManager = new CalendarDataManager({ - optionOverrides: props.optionOverrides, - calendarApi: props.calendarApi, - onData: _this.handleData - }); - return _this; - } - CalendarDataProvider2.prototype.render = function() { - return this.props.children(this.state); }; - CalendarDataProvider2.prototype.componentDidUpdate = function(prevProps) { - var newOptionOverrides = this.props.optionOverrides; - if (newOptionOverrides !== prevProps.optionOverrides) { - this.dataManager.resetOptions(newOptionOverrides); + DayTableModel2.prototype.buildHeaderDates = function() { + var dates = []; + for (var col = 0; col < this.colCnt; col += 1) { + dates.push(this.cells[0][col].date); } + return dates; }; - return CalendarDataProvider2; -}(Component); -var NamedTimeZoneImpl = function() { - function NamedTimeZoneImpl2(timeZoneName) { - this.timeZoneName = timeZoneName; - } - return NamedTimeZoneImpl2; + DayTableModel2.prototype.sliceRange = function(range2) { + var colCnt = this.colCnt; + var seriesSeg = this.daySeries.sliceRange(range2); + var segs = []; + if (seriesSeg) { + var firstIndex = seriesSeg.firstIndex, lastIndex = seriesSeg.lastIndex; + var index = firstIndex; + while (index <= lastIndex) { + var row = Math.floor(index / colCnt); + var nextIndex = Math.min((row + 1) * colCnt, lastIndex + 1); + segs.push({ + row, + firstCol: index % colCnt, + lastCol: (nextIndex - 1) % colCnt, + isStart: seriesSeg.isStart && index === firstIndex, + isEnd: seriesSeg.isEnd && nextIndex - 1 === lastIndex + }); + index = nextIndex; + } + } + return segs; + }; + return DayTableModel2; }(); -var SegHierarchy = function() { - function SegHierarchy2() { - this.strictOrder = false; - this.allowReslicing = false; - this.maxCoord = -1; - this.maxStackCnt = -1; - this.levelCoords = []; - this.entriesByLevel = []; - this.stackCnts = {}; +var Slicer = function() { + function Slicer2() { + this.sliceBusinessHours = memoize(this._sliceBusinessHours); + this.sliceDateSelection = memoize(this._sliceDateSpan); + this.sliceEventStore = memoize(this._sliceEventStore); + this.sliceEventDrag = memoize(this._sliceInteraction); + this.sliceEventResize = memoize(this._sliceInteraction); + this.forceDayIfListItem = false; } - SegHierarchy2.prototype.addSegs = function(inputs) { - var hiddenEntries = []; - for (var _i = 0, inputs_1 = inputs; _i < inputs_1.length; _i++) { - var input = inputs_1[_i]; - this.insertEntry(input, hiddenEntries); + Slicer2.prototype.sliceProps = function(props, dateProfile, nextDayThreshold, context) { + var extraArgs = []; + for (var _i = 4; _i < arguments.length; _i++) { + extraArgs[_i - 4] = arguments[_i]; } - return hiddenEntries; + var eventUiBases = props.eventUiBases; + var eventSegs = this.sliceEventStore.apply(this, __spreadArray([props.eventStore, eventUiBases, dateProfile, nextDayThreshold], extraArgs)); + return { + dateSelectionSegs: this.sliceDateSelection.apply(this, __spreadArray([props.dateSelection, eventUiBases, context], extraArgs)), + businessHourSegs: this.sliceBusinessHours.apply(this, __spreadArray([props.businessHours, dateProfile, nextDayThreshold, context], extraArgs)), + fgEventSegs: eventSegs.fg, + bgEventSegs: eventSegs.bg, + eventDrag: this.sliceEventDrag.apply(this, __spreadArray([props.eventDrag, eventUiBases, dateProfile, nextDayThreshold], extraArgs)), + eventResize: this.sliceEventResize.apply(this, __spreadArray([props.eventResize, eventUiBases, dateProfile, nextDayThreshold], extraArgs)), + eventSelection: props.eventSelection + }; }; - SegHierarchy2.prototype.insertEntry = function(entry, hiddenEntries) { - var insertion = this.findInsertion(entry); - if (this.isInsertionValid(insertion, entry)) { - this.insertEntryAt(entry, insertion); - return 1; + Slicer2.prototype.sliceNowDate = function(date, context) { + var extraArgs = []; + for (var _i = 2; _i < arguments.length; _i++) { + extraArgs[_i - 2] = arguments[_i]; } - return this.handleInvalidInsertion(insertion, entry, hiddenEntries); - }; - SegHierarchy2.prototype.isInsertionValid = function(insertion, entry) { - return (this.maxCoord === -1 || insertion.levelCoord + entry.thickness <= this.maxCoord) && (this.maxStackCnt === -1 || insertion.stackCnt < this.maxStackCnt); + return this._sliceDateSpan.apply(this, __spreadArray([ + { range: { start: date, end: addMs(date, 1) }, allDay: false }, + {}, + context + ], extraArgs)); }; - SegHierarchy2.prototype.handleInvalidInsertion = function(insertion, entry, hiddenEntries) { - if (this.allowReslicing && insertion.touchingEntry) { - return this.splitEntry(entry, insertion.touchingEntry, hiddenEntries); + Slicer2.prototype._sliceBusinessHours = function(businessHours, dateProfile, nextDayThreshold, context) { + var extraArgs = []; + for (var _i = 4; _i < arguments.length; _i++) { + extraArgs[_i - 4] = arguments[_i]; } - hiddenEntries.push(entry); - return 0; - }; - SegHierarchy2.prototype.splitEntry = function(entry, barrier, hiddenEntries) { - var partCnt = 0; - var splitHiddenEntries = []; - var entrySpan = entry.span; - var barrierSpan = barrier.span; - if (entrySpan.start < barrierSpan.start) { - partCnt += this.insertEntry({ - index: entry.index, - thickness: entry.thickness, - span: { start: entrySpan.start, end: barrierSpan.start } - }, splitHiddenEntries); + if (!businessHours) { + return []; } - if (entrySpan.end > barrierSpan.end) { - partCnt += this.insertEntry({ - index: entry.index, - thickness: entry.thickness, - span: { start: barrierSpan.end, end: entrySpan.end } - }, splitHiddenEntries); + return this._sliceEventStore.apply(this, __spreadArray([ + expandRecurring(businessHours, computeActiveRange(dateProfile, Boolean(nextDayThreshold)), context), + {}, + dateProfile, + nextDayThreshold + ], extraArgs)).bg; + }; + Slicer2.prototype._sliceEventStore = function(eventStore, eventUiBases, dateProfile, nextDayThreshold) { + var extraArgs = []; + for (var _i = 4; _i < arguments.length; _i++) { + extraArgs[_i - 4] = arguments[_i]; } - if (partCnt) { - hiddenEntries.push.apply(hiddenEntries, __spreadArray([{ - index: entry.index, - thickness: entry.thickness, - span: intersectSpans(barrierSpan, entrySpan) - }], splitHiddenEntries)); - return partCnt; + if (eventStore) { + var rangeRes = sliceEventStore(eventStore, eventUiBases, computeActiveRange(dateProfile, Boolean(nextDayThreshold)), nextDayThreshold); + return { + bg: this.sliceEventRanges(rangeRes.bg, extraArgs), + fg: this.sliceEventRanges(rangeRes.fg, extraArgs) + }; } - hiddenEntries.push(entry); - return 0; + return { bg: [], fg: [] }; }; - SegHierarchy2.prototype.insertEntryAt = function(entry, insertion) { - var _a = this, entriesByLevel = _a.entriesByLevel, levelCoords = _a.levelCoords; - if (insertion.lateral === -1) { - insertAt(levelCoords, insertion.level, insertion.levelCoord); - insertAt(entriesByLevel, insertion.level, [entry]); - } else { - insertAt(entriesByLevel[insertion.level], insertion.lateral, entry); + Slicer2.prototype._sliceInteraction = function(interaction, eventUiBases, dateProfile, nextDayThreshold) { + var extraArgs = []; + for (var _i = 4; _i < arguments.length; _i++) { + extraArgs[_i - 4] = arguments[_i]; } - this.stackCnts[buildEntryKey(entry)] = insertion.stackCnt; + if (!interaction) { + return null; + } + var rangeRes = sliceEventStore(interaction.mutatedEvents, eventUiBases, computeActiveRange(dateProfile, Boolean(nextDayThreshold)), nextDayThreshold); + return { + segs: this.sliceEventRanges(rangeRes.fg, extraArgs), + affectedInstances: interaction.affectedEvents.instances, + isEvent: interaction.isEvent + }; }; - SegHierarchy2.prototype.findInsertion = function(newEntry) { - var _a = this, levelCoords = _a.levelCoords, entriesByLevel = _a.entriesByLevel, strictOrder = _a.strictOrder, stackCnts = _a.stackCnts; - var levelCnt = levelCoords.length; - var candidateCoord = 0; - var touchingLevel = -1; - var touchingLateral = -1; - var touchingEntry = null; - var stackCnt = 0; - for (var trackingLevel = 0; trackingLevel < levelCnt; trackingLevel += 1) { - var trackingCoord = levelCoords[trackingLevel]; - if (!strictOrder && trackingCoord >= candidateCoord + newEntry.thickness) { - break; - } - var trackingEntries = entriesByLevel[trackingLevel]; - var trackingEntry = void 0; - var searchRes = binarySearch(trackingEntries, newEntry.span.start, getEntrySpanEnd); - var lateralIndex = searchRes[0] + searchRes[1]; - while ((trackingEntry = trackingEntries[lateralIndex]) && trackingEntry.span.start < newEntry.span.end) { - var trackingEntryBottom = trackingCoord + trackingEntry.thickness; - if (trackingEntryBottom > candidateCoord) { - candidateCoord = trackingEntryBottom; - touchingEntry = trackingEntry; - touchingLevel = trackingLevel; - touchingLateral = lateralIndex; - } - if (trackingEntryBottom === candidateCoord) { - stackCnt = Math.max(stackCnt, stackCnts[buildEntryKey(trackingEntry)] + 1); - } - lateralIndex += 1; - } + Slicer2.prototype._sliceDateSpan = function(dateSpan, eventUiBases, context) { + var extraArgs = []; + for (var _i = 3; _i < arguments.length; _i++) { + extraArgs[_i - 3] = arguments[_i]; } - var destLevel = 0; - if (touchingEntry) { - destLevel = touchingLevel + 1; - while (destLevel < levelCnt && levelCoords[destLevel] < candidateCoord) { - destLevel += 1; - } + if (!dateSpan) { + return []; } - var destLateral = -1; - if (destLevel < levelCnt && levelCoords[destLevel] === candidateCoord) { - destLateral = binarySearch(entriesByLevel[destLevel], newEntry.span.end, getEntrySpanEnd)[0]; + var eventRange = fabricateEventRange(dateSpan, eventUiBases, context); + var segs = this.sliceRange.apply(this, __spreadArray([dateSpan.range], extraArgs)); + for (var _a = 0, segs_1 = segs; _a < segs_1.length; _a++) { + var seg = segs_1[_a]; + seg.eventRange = eventRange; } - return { - touchingLevel, - touchingLateral, - touchingEntry, - stackCnt, - levelCoord: candidateCoord, - level: destLevel, - lateral: destLateral - }; + return segs; }; - SegHierarchy2.prototype.toRects = function() { - var _a = this, entriesByLevel = _a.entriesByLevel, levelCoords = _a.levelCoords; - var levelCnt = entriesByLevel.length; - var rects = []; - for (var level = 0; level < levelCnt; level += 1) { - var entries = entriesByLevel[level]; - var levelCoord = levelCoords[level]; - for (var _i = 0, entries_1 = entries; _i < entries_1.length; _i++) { - var entry = entries_1[_i]; - rects.push(__assign(__assign({}, entry), { levelCoord })); - } + Slicer2.prototype.sliceEventRanges = function(eventRanges, extraArgs) { + var segs = []; + for (var _i = 0, eventRanges_1 = eventRanges; _i < eventRanges_1.length; _i++) { + var eventRange = eventRanges_1[_i]; + segs.push.apply(segs, this.sliceEventRange(eventRange, extraArgs)); } - return rects; + return segs; }; - return SegHierarchy2; -}(); -function getEntrySpanEnd(entry) { - return entry.span.end; -} -function buildEntryKey(entry) { - return entry.index + ":" + entry.span.start; -} -function groupIntersectingEntries(entries) { - var merges = []; - for (var _i = 0, entries_2 = entries; _i < entries_2.length; _i++) { - var entry = entries_2[_i]; - var filteredMerges = []; - var hungryMerge = { - span: entry.span, - entries: [entry] - }; - for (var _a = 0, merges_1 = merges; _a < merges_1.length; _a++) { - var merge = merges_1[_a]; - if (intersectSpans(merge.span, hungryMerge.span)) { - hungryMerge = { - entries: merge.entries.concat(hungryMerge.entries), - span: joinSpans(merge.span, hungryMerge.span) - }; - } else { - filteredMerges.push(merge); - } + Slicer2.prototype.sliceEventRange = function(eventRange, extraArgs) { + var dateRange = eventRange.range; + if (this.forceDayIfListItem && eventRange.ui.display === "list-item") { + dateRange = { + start: dateRange.start, + end: addDays(dateRange.start, 1) + }; } - filteredMerges.push(hungryMerge); - merges = filteredMerges; + var segs = this.sliceRange.apply(this, __spreadArray([dateRange], extraArgs)); + for (var _i = 0, segs_2 = segs; _i < segs_2.length; _i++) { + var seg = segs_2[_i]; + seg.eventRange = eventRange; + seg.isStart = eventRange.isStart && seg.isStart; + seg.isEnd = eventRange.isEnd && seg.isEnd; + } + return segs; + }; + return Slicer2; +}(); +function computeActiveRange(dateProfile, isComponentAllDay) { + var range2 = dateProfile.activeRange; + if (isComponentAllDay) { + return range2; } - return merges; -} -function joinSpans(span0, span1) { return { - start: Math.min(span0.start, span1.start), - end: Math.max(span0.end, span1.end) + start: addMs(range2.start, dateProfile.slotMinTime.milliseconds), + end: addMs(range2.end, dateProfile.slotMaxTime.milliseconds - 864e5) }; } -function intersectSpans(span0, span1) { - var start = Math.max(span0.start, span1.start); - var end = Math.min(span0.end, span1.end); - if (start < end) { - return { start, end }; - } - return null; -} -function insertAt(arr, index, item) { - arr.splice(index, 0, item); -} -function binarySearch(a3, searchVal, getItemVal) { - var startIndex = 0; - var endIndex = a3.length; - if (!endIndex || searchVal < getItemVal(a3[startIndex])) { - return [0, 0]; - } - if (searchVal > getItemVal(a3[endIndex - 1])) { - return [endIndex, 0]; - } - while (startIndex < endIndex) { - var middleIndex = Math.floor(startIndex + (endIndex - startIndex) / 2); - var middleVal = getItemVal(a3[middleIndex]); - if (searchVal < middleVal) { - endIndex = middleIndex; - } else if (searchVal > middleVal) { - startIndex = middleIndex + 1; - } else { - return [middleIndex, 1]; +function isInteractionValid(interaction, dateProfile, context) { + var instances = interaction.mutatedEvents.instances; + for (var instanceId in instances) { + if (!rangeContainsRange(dateProfile.validRange, instances[instanceId].range)) { + return false; } } - return [startIndex, 0]; + return isNewPropsValid({ eventDrag: interaction }, context); } -var Interaction = function() { - function Interaction2(settings) { - this.component = settings.component; - this.isHitComboAllowed = settings.isHitComboAllowed || null; +function isDateSelectionValid(dateSelection, dateProfile, context) { + if (!rangeContainsRange(dateProfile.validRange, dateSelection.range)) { + return false; } - Interaction2.prototype.destroy = function() { - }; - return Interaction2; -}(); -function parseInteractionSettings(component, input) { - return { - component, - el: input.el, - useEventCenter: input.useEventCenter != null ? input.useEventCenter : true, - isHitComboAllowed: input.isHitComboAllowed || null - }; + return isNewPropsValid({ dateSelection }, context); } -function interactionSettingsToStore(settings) { - var _a; - return _a = {}, _a[settings.component.uid] = settings, _a; +function isNewPropsValid(newProps, context) { + var calendarState = context.getCurrentData(); + var props = __assign({ businessHours: calendarState.businessHours, dateSelection: "", eventStore: calendarState.eventStore, eventUiBases: calendarState.eventUiBases, eventSelection: "", eventDrag: null, eventResize: null }, newProps); + return (context.pluginHooks.isPropsValid || isPropsValid)(props, context); } -var interactionSettingsStore = {}; -var ElementDragging = function() { - function ElementDragging2(el, selector) { - this.emitter = new Emitter(); +function isPropsValid(state, context, dateSpanMeta, filterConfig) { + if (dateSpanMeta === void 0) { + dateSpanMeta = {}; } - ElementDragging2.prototype.destroy = function() { - }; - ElementDragging2.prototype.setMirrorIsVisible = function(bool) { - }; - ElementDragging2.prototype.setMirrorNeedsRevert = function(bool) { - }; - ElementDragging2.prototype.setAutoScrollEnabled = function(bool) { - }; - return ElementDragging2; -}(); -var config = {}; -var DRAG_META_REFINERS = { - startTime: createDuration, - duration: createDuration, - create: Boolean, - sourceId: String -}; -function parseDragMeta(raw) { - var _a = refineProps(raw, DRAG_META_REFINERS), refined = _a.refined, extra = _a.extra; - return { - startTime: refined.startTime || null, - duration: refined.duration || null, - create: refined.create != null ? refined.create : true, - sourceId: refined.sourceId, - leftoverProps: extra - }; + if (state.eventDrag && !isInteractionPropsValid(state, context, dateSpanMeta, filterConfig)) { + return false; + } + if (state.dateSelection && !isDateSelectionPropsValid(state, context, dateSpanMeta, filterConfig)) { + return false; + } + return true; } -var ToolbarSection = function(_super) { - __extends(ToolbarSection2, _super); - function ToolbarSection2() { - return _super !== null && _super.apply(this, arguments) || this; +function isInteractionPropsValid(state, context, dateSpanMeta, filterConfig) { + var currentState = context.getCurrentData(); + var interaction = state.eventDrag; + var subjectEventStore = interaction.mutatedEvents; + var subjectDefs = subjectEventStore.defs; + var subjectInstances = subjectEventStore.instances; + var subjectConfigs = compileEventUis(subjectDefs, interaction.isEvent ? state.eventUiBases : { "": currentState.selectionConfig }); + if (filterConfig) { + subjectConfigs = mapHash(subjectConfigs, filterConfig); } - ToolbarSection2.prototype.render = function() { - var _this = this; - var children = this.props.widgetGroups.map(function(widgetGroup) { - return _this.renderWidgetGroup(widgetGroup); - }); - return createElement.apply(void 0, __spreadArray(["div", { className: "fc-toolbar-chunk" }], children)); - }; - ToolbarSection2.prototype.renderWidgetGroup = function(widgetGroup) { - var props = this.props; - var theme = this.context.theme; - var children = []; - var isOnlyButtons = true; - for (var _i = 0, widgetGroup_1 = widgetGroup; _i < widgetGroup_1.length; _i++) { - var widget = widgetGroup_1[_i]; - var buttonName = widget.buttonName, buttonClick = widget.buttonClick, buttonText = widget.buttonText, buttonIcon = widget.buttonIcon, buttonHint = widget.buttonHint; - if (buttonName === "title") { - isOnlyButtons = false; - children.push(createElement("h2", { className: "fc-toolbar-title", id: props.titleId }, props.title)); + var otherEventStore = excludeInstances(state.eventStore, interaction.affectedEvents.instances); + var otherDefs = otherEventStore.defs; + var otherInstances = otherEventStore.instances; + var otherConfigs = compileEventUis(otherDefs, state.eventUiBases); + for (var subjectInstanceId in subjectInstances) { + var subjectInstance = subjectInstances[subjectInstanceId]; + var subjectRange = subjectInstance.range; + var subjectConfig = subjectConfigs[subjectInstance.defId]; + var subjectDef = subjectDefs[subjectInstance.defId]; + if (!allConstraintsPass(subjectConfig.constraints, subjectRange, otherEventStore, state.businessHours, context)) { + return false; + } + var eventOverlap = context.options.eventOverlap; + var eventOverlapFunc = typeof eventOverlap === "function" ? eventOverlap : null; + for (var otherInstanceId in otherInstances) { + var otherInstance = otherInstances[otherInstanceId]; + if (rangesIntersect(subjectRange, otherInstance.range)) { + var otherOverlap = otherConfigs[otherInstance.defId].overlap; + if (otherOverlap === false && interaction.isEvent) { + return false; + } + if (subjectConfig.overlap === false) { + return false; + } + if (eventOverlapFunc && !eventOverlapFunc(new EventApi(context, otherDefs[otherInstance.defId], otherInstance), new EventApi(context, subjectDef, subjectInstance))) { + return false; + } + } + } + var calendarEventStore = currentState.eventStore; + for (var _i = 0, _a = subjectConfig.allows; _i < _a.length; _i++) { + var subjectAllow = _a[_i]; + var subjectDateSpan = __assign(__assign({}, dateSpanMeta), { range: subjectInstance.range, allDay: subjectDef.allDay }); + var origDef = calendarEventStore.defs[subjectDef.defId]; + var origInstance = calendarEventStore.instances[subjectInstanceId]; + var eventApi = void 0; + if (origDef) { + eventApi = new EventApi(context, origDef, origInstance); } else { - var isPressed = buttonName === props.activeButton; - var isDisabled = !props.isTodayEnabled && buttonName === "today" || !props.isPrevEnabled && buttonName === "prev" || !props.isNextEnabled && buttonName === "next"; - var buttonClasses = ["fc-" + buttonName + "-button", theme.getClass("button")]; - if (isPressed) { - buttonClasses.push(theme.getClass("buttonActive")); - } - children.push(createElement("button", { type: "button", title: typeof buttonHint === "function" ? buttonHint(props.navUnit) : buttonHint, disabled: isDisabled, "aria-pressed": isPressed, className: buttonClasses.join(" "), onClick: buttonClick }, buttonText || (buttonIcon ? createElement("span", { className: buttonIcon }) : ""))); + eventApi = new EventApi(context, subjectDef); + } + if (!subjectAllow(buildDateSpanApiWithContext(subjectDateSpan, context), eventApi)) { + return false; } } - if (children.length > 1) { - var groupClassName = isOnlyButtons && theme.getClass("buttonGroup") || ""; - return createElement.apply(void 0, __spreadArray(["div", { className: groupClassName }], children)); + } + return true; +} +function isDateSelectionPropsValid(state, context, dateSpanMeta, filterConfig) { + var relevantEventStore = state.eventStore; + var relevantDefs = relevantEventStore.defs; + var relevantInstances = relevantEventStore.instances; + var selection = state.dateSelection; + var selectionRange = selection.range; + var selectionConfig = context.getCurrentData().selectionConfig; + if (filterConfig) { + selectionConfig = filterConfig(selectionConfig); + } + if (!allConstraintsPass(selectionConfig.constraints, selectionRange, relevantEventStore, state.businessHours, context)) { + return false; + } + var selectOverlap = context.options.selectOverlap; + var selectOverlapFunc = typeof selectOverlap === "function" ? selectOverlap : null; + for (var relevantInstanceId in relevantInstances) { + var relevantInstance = relevantInstances[relevantInstanceId]; + if (rangesIntersect(selectionRange, relevantInstance.range)) { + if (selectionConfig.overlap === false) { + return false; + } + if (selectOverlapFunc && !selectOverlapFunc(new EventApi(context, relevantDefs[relevantInstance.defId], relevantInstance), null)) { + return false; + } } - return children[0]; - }; - return ToolbarSection2; -}(BaseComponent); -var Toolbar = function(_super) { - __extends(Toolbar2, _super); - function Toolbar2() { - return _super !== null && _super.apply(this, arguments) || this; } - Toolbar2.prototype.render = function() { - var _a = this.props, model = _a.model, extraClassName = _a.extraClassName; - var forceLtr = false; - var startContent; - var endContent; - var sectionWidgets = model.sectionWidgets; - var centerContent = sectionWidgets.center; - if (sectionWidgets.left) { - forceLtr = true; - startContent = sectionWidgets.left; - } else { - startContent = sectionWidgets.start; + for (var _i = 0, _a = selectionConfig.allows; _i < _a.length; _i++) { + var selectionAllow = _a[_i]; + var fullDateSpan = __assign(__assign({}, dateSpanMeta), selection); + if (!selectionAllow(buildDateSpanApiWithContext(fullDateSpan, context), null)) { + return false; } - if (sectionWidgets.right) { - forceLtr = true; - endContent = sectionWidgets.right; - } else { - endContent = sectionWidgets.end; + } + return true; +} +function allConstraintsPass(constraints, subjectRange, otherEventStore, businessHoursUnexpanded, context) { + for (var _i = 0, constraints_1 = constraints; _i < constraints_1.length; _i++) { + var constraint = constraints_1[_i]; + if (!anyRangesContainRange(constraintToRanges(constraint, subjectRange, otherEventStore, businessHoursUnexpanded, context), subjectRange)) { + return false; } - var classNames = [ - extraClassName || "", - "fc-toolbar", - forceLtr ? "fc-toolbar-ltr" : "" - ]; - return createElement("div", { className: classNames.join(" ") }, this.renderSection("start", startContent || []), this.renderSection("center", centerContent || []), this.renderSection("end", endContent || [])); - }; - Toolbar2.prototype.renderSection = function(key, widgetGroups) { - var props = this.props; - return createElement(ToolbarSection, { key, widgetGroups, title: props.title, navUnit: props.navUnit, activeButton: props.activeButton, isTodayEnabled: props.isTodayEnabled, isPrevEnabled: props.isPrevEnabled, isNextEnabled: props.isNextEnabled, titleId: props.titleId }); - }; - return Toolbar2; -}(BaseComponent); -var ViewContainer = function(_super) { - __extends(ViewContainer2, _super); - function ViewContainer2() { + } + return true; +} +function constraintToRanges(constraint, subjectRange, otherEventStore, businessHoursUnexpanded, context) { + if (constraint === "businessHours") { + return eventStoreToRanges(expandRecurring(businessHoursUnexpanded, subjectRange, context)); + } + if (typeof constraint === "string") { + return eventStoreToRanges(filterEventStoreDefs(otherEventStore, function(eventDef) { + return eventDef.groupId === constraint; + })); + } + if (typeof constraint === "object" && constraint) { + return eventStoreToRanges(expandRecurring(constraint, subjectRange, context)); + } + return []; +} +function eventStoreToRanges(eventStore) { + var instances = eventStore.instances; + var ranges = []; + for (var instanceId in instances) { + ranges.push(instances[instanceId].range); + } + return ranges; +} +function anyRangesContainRange(outerRanges, innerRange) { + for (var _i = 0, outerRanges_1 = outerRanges; _i < outerRanges_1.length; _i++) { + var outerRange = outerRanges_1[_i]; + if (rangeContainsRange(outerRange, innerRange)) { + return true; + } + } + return false; +} +var VISIBLE_HIDDEN_RE = /^(visible|hidden)$/; +var Scroller = function(_super) { + __extends(Scroller2, _super); + function Scroller2() { var _this = _super !== null && _super.apply(this, arguments) || this; - _this.state = { - availableWidth: null - }; _this.handleEl = function(el) { _this.el = el; setRef(_this.props.elRef, el); - _this.updateAvailableWidth(); - }; - _this.handleResize = function() { - _this.updateAvailableWidth(); }; return _this; } - ViewContainer2.prototype.render = function() { - var _a = this, props = _a.props, state = _a.state; - var aspectRatio = props.aspectRatio; - var classNames = [ - "fc-view-harness", - aspectRatio || props.liquid || props.height ? "fc-view-harness-active" : "fc-view-harness-passive" - ]; - var height = ""; - var paddingBottom = ""; - if (aspectRatio) { - if (state.availableWidth !== null) { - height = state.availableWidth / aspectRatio; + Scroller2.prototype.render = function() { + var props = this.props; + var liquid = props.liquid, liquidIsAbsolute = props.liquidIsAbsolute; + var isAbsolute = liquid && liquidIsAbsolute; + var className = ["fc-scroller"]; + if (liquid) { + if (liquidIsAbsolute) { + className.push("fc-scroller-liquid-absolute"); } else { - paddingBottom = 1 / aspectRatio * 100 + "%"; + className.push("fc-scroller-liquid"); } - } else { - height = props.height || ""; } - return createElement("div", { "aria-labelledby": props.labeledById, ref: this.handleEl, className: classNames.join(" "), style: { height, paddingBottom } }, props.children); + return createElement("div", { ref: this.handleEl, className: className.join(" "), style: { + overflowX: props.overflowX, + overflowY: props.overflowY, + left: isAbsolute && -(props.overcomeLeft || 0) || "", + right: isAbsolute && -(props.overcomeRight || 0) || "", + bottom: isAbsolute && -(props.overcomeBottom || 0) || "", + marginLeft: !isAbsolute && -(props.overcomeLeft || 0) || "", + marginRight: !isAbsolute && -(props.overcomeRight || 0) || "", + marginBottom: !isAbsolute && -(props.overcomeBottom || 0) || "", + maxHeight: props.maxHeight || "" + } }, props.children); }; - ViewContainer2.prototype.componentDidMount = function() { - this.context.addResizeHandler(this.handleResize); + Scroller2.prototype.needsXScrolling = function() { + if (VISIBLE_HIDDEN_RE.test(this.props.overflowX)) { + return false; + } + var el = this.el; + var realClientWidth = this.el.getBoundingClientRect().width - this.getYScrollbarWidth(); + var children = el.children; + for (var i3 = 0; i3 < children.length; i3 += 1) { + var childEl = children[i3]; + if (childEl.getBoundingClientRect().width > realClientWidth) { + return true; + } + } + return false; }; - ViewContainer2.prototype.componentWillUnmount = function() { - this.context.removeResizeHandler(this.handleResize); + Scroller2.prototype.needsYScrolling = function() { + if (VISIBLE_HIDDEN_RE.test(this.props.overflowY)) { + return false; + } + var el = this.el; + var realClientHeight = this.el.getBoundingClientRect().height - this.getXScrollbarWidth(); + var children = el.children; + for (var i3 = 0; i3 < children.length; i3 += 1) { + var childEl = children[i3]; + if (childEl.getBoundingClientRect().height > realClientHeight) { + return true; + } + } + return false; }; - ViewContainer2.prototype.updateAvailableWidth = function() { - if (this.el && this.props.aspectRatio) { - this.setState({ availableWidth: this.el.offsetWidth }); + Scroller2.prototype.getXScrollbarWidth = function() { + if (VISIBLE_HIDDEN_RE.test(this.props.overflowX)) { + return 0; + } + return this.el.offsetHeight - this.el.clientHeight; + }; + Scroller2.prototype.getYScrollbarWidth = function() { + if (VISIBLE_HIDDEN_RE.test(this.props.overflowY)) { + return 0; } + return this.el.offsetWidth - this.el.clientWidth; }; - return ViewContainer2; + return Scroller2; }(BaseComponent); -var EventClicking = function(_super) { - __extends(EventClicking2, _super); - function EventClicking2(settings) { - var _this = _super.call(this, settings) || this; - _this.handleSegClick = function(ev, segEl) { - var component = _this.component; - var context = component.context; - var seg = getElSeg(segEl); - if (seg && component.isValidSegDownEl(ev.target)) { - var hasUrlContainer = elementClosest(ev.target, ".fc-event-forced-url"); - var url = hasUrlContainer ? hasUrlContainer.querySelector("a[href]").href : ""; - context.emitter.trigger("eventClick", { - el: segEl, - event: new EventApi(component.context, seg.eventRange.def, seg.eventRange.instance), - jsEvent: ev, - view: context.viewApi - }); - if (url && !ev.defaultPrevented) { - window.location.href = url; +var RefMap = function() { + function RefMap2(masterCallback) { + var _this = this; + this.masterCallback = masterCallback; + this.currentMap = {}; + this.depths = {}; + this.callbackMap = {}; + this.handleValue = function(val, key) { + var _a = _this, depths = _a.depths, currentMap = _a.currentMap; + var removed = false; + var added = false; + if (val !== null) { + removed = key in currentMap; + currentMap[key] = val; + depths[key] = (depths[key] || 0) + 1; + added = true; + } else { + depths[key] -= 1; + if (!depths[key]) { + delete currentMap[key]; + delete _this.callbackMap[key]; + removed = true; } } - }; - _this.destroy = listenBySelector(settings.el, "click", ".fc-event", _this.handleSegClick); - return _this; - } - return EventClicking2; -}(Interaction); -var EventHovering = function(_super) { - __extends(EventHovering2, _super); - function EventHovering2(settings) { - var _this = _super.call(this, settings) || this; - _this.handleEventElRemove = function(el) { - if (el === _this.currentSegEl) { - _this.handleSegLeave(null, _this.currentSegEl); - } - }; - _this.handleSegEnter = function(ev, segEl) { - if (getElSeg(segEl)) { - _this.currentSegEl = segEl; - _this.triggerEvent("eventMouseEnter", ev, segEl); - } - }; - _this.handleSegLeave = function(ev, segEl) { - if (_this.currentSegEl) { - _this.currentSegEl = null; - _this.triggerEvent("eventMouseLeave", ev, segEl); + if (_this.masterCallback) { + if (removed) { + _this.masterCallback(null, String(key)); + } + if (added) { + _this.masterCallback(val, String(key)); + } } }; - _this.removeHoverListeners = listenToHoverBySelector(settings.el, ".fc-event", _this.handleSegEnter, _this.handleSegLeave); - return _this; } - EventHovering2.prototype.destroy = function() { - this.removeHoverListeners(); - }; - EventHovering2.prototype.triggerEvent = function(publicEvName, ev, segEl) { - var component = this.component; - var context = component.context; - var seg = getElSeg(segEl); - if (!ev || component.isValidSegDownEl(ev.target)) { - context.emitter.trigger(publicEvName, { - el: segEl, - event: new EventApi(context, seg.eventRange.def, seg.eventRange.instance), - jsEvent: ev, - view: context.viewApi - }); + RefMap2.prototype.createRef = function(key) { + var _this = this; + var refCallback = this.callbackMap[key]; + if (!refCallback) { + refCallback = this.callbackMap[key] = function(val) { + _this.handleValue(val, String(key)); + }; } + return refCallback; }; - return EventHovering2; -}(Interaction); -var CalendarContent = function(_super) { - __extends(CalendarContent2, _super); - function CalendarContent2() { + RefMap2.prototype.collect = function(startIndex, endIndex, step) { + return collectFromHash(this.currentMap, startIndex, endIndex, step); + }; + RefMap2.prototype.getAll = function() { + return hashValuesToArray(this.currentMap); + }; + return RefMap2; +}(); +function computeShrinkWidth(chunkEls) { + var shrinkCells = findElements(chunkEls, ".fc-scrollgrid-shrink"); + var largestWidth = 0; + for (var _i = 0, shrinkCells_1 = shrinkCells; _i < shrinkCells_1.length; _i++) { + var shrinkCell = shrinkCells_1[_i]; + largestWidth = Math.max(largestWidth, computeSmallestCellWidth(shrinkCell)); + } + return Math.ceil(largestWidth); +} +function getSectionHasLiquidHeight(props, sectionConfig) { + return props.liquid && sectionConfig.liquid; +} +function getAllowYScrolling(props, sectionConfig) { + return sectionConfig.maxHeight != null || getSectionHasLiquidHeight(props, sectionConfig); +} +function renderChunkContent(sectionConfig, chunkConfig, arg, isHeader) { + var expandRows = arg.expandRows; + var content = typeof chunkConfig.content === "function" ? chunkConfig.content(arg) : createElement("table", { + role: "presentation", + className: [ + chunkConfig.tableClassName, + sectionConfig.syncRowHeights ? "fc-scrollgrid-sync-table" : "" + ].join(" "), + style: { + minWidth: arg.tableMinWidth, + width: arg.clientWidth, + height: expandRows ? arg.clientHeight : "" + } + }, arg.tableColGroupNode, createElement(isHeader ? "thead" : "tbody", { + role: "presentation" + }, typeof chunkConfig.rowContent === "function" ? chunkConfig.rowContent(arg) : chunkConfig.rowContent)); + return content; +} +function isColPropsEqual(cols0, cols1) { + return isArraysEqual(cols0, cols1, isPropsEqual); +} +function renderMicroColGroup(cols, shrinkWidth) { + var colNodes = []; + for (var _i = 0, cols_1 = cols; _i < cols_1.length; _i++) { + var colProps = cols_1[_i]; + var span = colProps.span || 1; + for (var i3 = 0; i3 < span; i3 += 1) { + colNodes.push(createElement("col", { style: { + width: colProps.width === "shrink" ? sanitizeShrinkWidth(shrinkWidth) : colProps.width || "", + minWidth: colProps.minWidth || "" + } })); + } + } + return createElement.apply(void 0, __spreadArray(["colgroup", {}], colNodes)); +} +function sanitizeShrinkWidth(shrinkWidth) { + return shrinkWidth == null ? 4 : shrinkWidth; +} +function hasShrinkWidth(cols) { + for (var _i = 0, cols_2 = cols; _i < cols_2.length; _i++) { + var col = cols_2[_i]; + if (col.width === "shrink") { + return true; + } + } + return false; +} +function getScrollGridClassNames(liquid, context) { + var classNames = [ + "fc-scrollgrid", + context.theme.getClass("table") + ]; + if (liquid) { + classNames.push("fc-scrollgrid-liquid"); + } + return classNames; +} +function getSectionClassNames(sectionConfig, wholeTableVGrow) { + var classNames = [ + "fc-scrollgrid-section", + "fc-scrollgrid-section-" + sectionConfig.type, + sectionConfig.className + ]; + if (wholeTableVGrow && sectionConfig.liquid && sectionConfig.maxHeight == null) { + classNames.push("fc-scrollgrid-section-liquid"); + } + if (sectionConfig.isSticky) { + classNames.push("fc-scrollgrid-section-sticky"); + } + return classNames; +} +function renderScrollShim(arg) { + return createElement("div", { className: "fc-scrollgrid-sticky-shim", style: { + width: arg.clientWidth, + minWidth: arg.tableMinWidth + } }); +} +function getStickyHeaderDates(options) { + var stickyHeaderDates = options.stickyHeaderDates; + if (stickyHeaderDates == null || stickyHeaderDates === "auto") { + stickyHeaderDates = options.height === "auto" || options.viewHeight === "auto"; + } + return stickyHeaderDates; +} +function getStickyFooterScrollbar(options) { + var stickyFooterScrollbar = options.stickyFooterScrollbar; + if (stickyFooterScrollbar == null || stickyFooterScrollbar === "auto") { + stickyFooterScrollbar = options.height === "auto" || options.viewHeight === "auto"; + } + return stickyFooterScrollbar; +} +var SimpleScrollGrid = function(_super) { + __extends(SimpleScrollGrid2, _super); + function SimpleScrollGrid2() { var _this = _super !== null && _super.apply(this, arguments) || this; - _this.buildViewContext = memoize(buildViewContext); - _this.buildViewPropTransformers = memoize(buildViewPropTransformers); - _this.buildToolbarProps = memoize(buildToolbarProps); - _this.headerRef = createRef(); - _this.footerRef = createRef(); - _this.interactionsStore = {}; + _this.processCols = memoize(function(a3) { + return a3; + }, isColPropsEqual); + _this.renderMicroColGroup = memoize(renderMicroColGroup); + _this.scrollerRefs = new RefMap(); + _this.scrollerElRefs = new RefMap(_this._handleScrollerEl.bind(_this)); _this.state = { - viewLabelId: getUniqueDomId() - }; - _this.registerInteractiveComponent = function(component, settingsInput) { - var settings = parseInteractionSettings(component, settingsInput); - var DEFAULT_INTERACTIONS = [ - EventClicking, - EventHovering - ]; - var interactionClasses = DEFAULT_INTERACTIONS.concat(_this.props.pluginHooks.componentInteractions); - var interactions = interactionClasses.map(function(TheInteractionClass) { - return new TheInteractionClass(settings); - }); - _this.interactionsStore[component.uid] = interactions; - interactionSettingsStore[component.uid] = settings; - }; - _this.unregisterInteractiveComponent = function(component) { - var listeners = _this.interactionsStore[component.uid]; - if (listeners) { - for (var _i = 0, listeners_1 = listeners; _i < listeners_1.length; _i++) { - var listener = listeners_1[_i]; - listener.destroy(); - } - delete _this.interactionsStore[component.uid]; - } - delete interactionSettingsStore[component.uid]; + shrinkWidth: null, + forceYScrollbars: false, + scrollerClientWidths: {}, + scrollerClientHeights: {} }; - _this.resizeRunner = new DelayedRunner(function() { - _this.props.emitter.trigger("_resize", true); - _this.props.emitter.trigger("windowResize", { view: _this.props.viewApi }); - }); - _this.handleWindowResize = function(ev) { - var options = _this.props.options; - if (options.handleWindowResize && ev.target === window) { - _this.resizeRunner.request(options.windowResizeDelay); - } + _this.handleSizing = function() { + _this.safeSetState(__assign({ shrinkWidth: _this.computeShrinkWidth() }, _this.computeScrollerDims())); }; - return _this; - } - CalendarContent2.prototype.render = function() { - var props = this.props; - var toolbarConfig = props.toolbarConfig, options = props.options; - var toolbarProps = this.buildToolbarProps(props.viewSpec, props.dateProfile, props.dateProfileGenerator, props.currentDate, getNow(props.options.now, props.dateEnv), props.viewTitle); - var viewVGrow = false; - var viewHeight = ""; - var viewAspectRatio; - if (props.isHeightAuto || props.forPrint) { - viewHeight = ""; - } else if (options.height != null) { - viewVGrow = true; - } else if (options.contentHeight != null) { - viewHeight = options.contentHeight; - } else { - viewAspectRatio = Math.max(options.aspectRatio, 0.5); + return _this; + } + SimpleScrollGrid2.prototype.render = function() { + var _a = this, props = _a.props, state = _a.state, context = _a.context; + var sectionConfigs = props.sections || []; + var cols = this.processCols(props.cols); + var microColGroupNode = this.renderMicroColGroup(cols, state.shrinkWidth); + var classNames = getScrollGridClassNames(props.liquid, context); + if (props.collapsibleWidth) { + classNames.push("fc-scrollgrid-collapsible"); } - var viewContext = this.buildViewContext(props.viewSpec, props.viewApi, props.options, props.dateProfileGenerator, props.dateEnv, props.theme, props.pluginHooks, props.dispatch, props.getCurrentData, props.emitter, props.calendarApi, this.registerInteractiveComponent, this.unregisterInteractiveComponent); - var viewLabelId = toolbarConfig.header && toolbarConfig.header.hasTitle ? this.state.viewLabelId : ""; - return createElement(ViewContextType.Provider, { value: viewContext }, toolbarConfig.header && createElement(Toolbar, __assign({ ref: this.headerRef, extraClassName: "fc-header-toolbar", model: toolbarConfig.header, titleId: viewLabelId }, toolbarProps)), createElement(ViewContainer, { liquid: viewVGrow, height: viewHeight, aspectRatio: viewAspectRatio, labeledById: viewLabelId }, this.renderView(props), this.buildAppendContent()), toolbarConfig.footer && createElement(Toolbar, __assign({ ref: this.footerRef, extraClassName: "fc-footer-toolbar", model: toolbarConfig.footer, titleId: "" }, toolbarProps))); + var configCnt = sectionConfigs.length; + var configI = 0; + var currentConfig; + var headSectionNodes = []; + var bodySectionNodes = []; + var footSectionNodes = []; + while (configI < configCnt && (currentConfig = sectionConfigs[configI]).type === "header") { + headSectionNodes.push(this.renderSection(currentConfig, microColGroupNode, true)); + configI += 1; + } + while (configI < configCnt && (currentConfig = sectionConfigs[configI]).type === "body") { + bodySectionNodes.push(this.renderSection(currentConfig, microColGroupNode, false)); + configI += 1; + } + while (configI < configCnt && (currentConfig = sectionConfigs[configI]).type === "footer") { + footSectionNodes.push(this.renderSection(currentConfig, microColGroupNode, true)); + configI += 1; + } + var isBuggy = !getCanVGrowWithinCell(); + var roleAttrs = { role: "rowgroup" }; + return createElement("table", { + role: "grid", + className: classNames.join(" "), + style: { height: props.height } + }, Boolean(!isBuggy && headSectionNodes.length) && createElement.apply(void 0, __spreadArray(["thead", roleAttrs], headSectionNodes)), Boolean(!isBuggy && bodySectionNodes.length) && createElement.apply(void 0, __spreadArray(["tbody", roleAttrs], bodySectionNodes)), Boolean(!isBuggy && footSectionNodes.length) && createElement.apply(void 0, __spreadArray(["tfoot", roleAttrs], footSectionNodes)), isBuggy && createElement.apply(void 0, __spreadArray(__spreadArray(__spreadArray(["tbody", roleAttrs], headSectionNodes), bodySectionNodes), footSectionNodes))); }; - CalendarContent2.prototype.componentDidMount = function() { - var props = this.props; - this.calendarInteractions = props.pluginHooks.calendarInteractions.map(function(CalendarInteractionClass) { - return new CalendarInteractionClass(props); - }); - window.addEventListener("resize", this.handleWindowResize); - var propSetHandlers = props.pluginHooks.propSetHandlers; - for (var propName in propSetHandlers) { - propSetHandlers[propName](props[propName], props); + SimpleScrollGrid2.prototype.renderSection = function(sectionConfig, microColGroupNode, isHeader) { + if ("outerContent" in sectionConfig) { + return createElement(Fragment, { key: sectionConfig.key }, sectionConfig.outerContent); } + return createElement("tr", { key: sectionConfig.key, role: "presentation", className: getSectionClassNames(sectionConfig, this.props.liquid).join(" ") }, this.renderChunkTd(sectionConfig, microColGroupNode, sectionConfig.chunk, isHeader)); }; - CalendarContent2.prototype.componentDidUpdate = function(prevProps) { + SimpleScrollGrid2.prototype.renderChunkTd = function(sectionConfig, microColGroupNode, chunkConfig, isHeader) { + if ("outerContent" in chunkConfig) { + return chunkConfig.outerContent; + } var props = this.props; - var propSetHandlers = props.pluginHooks.propSetHandlers; - for (var propName in propSetHandlers) { - if (props[propName] !== prevProps[propName]) { - propSetHandlers[propName](props[propName], props); + var _a = this.state, forceYScrollbars = _a.forceYScrollbars, scrollerClientWidths = _a.scrollerClientWidths, scrollerClientHeights = _a.scrollerClientHeights; + var needsYScrolling = getAllowYScrolling(props, sectionConfig); + var isLiquid = getSectionHasLiquidHeight(props, sectionConfig); + var overflowY = !props.liquid ? "visible" : forceYScrollbars ? "scroll" : !needsYScrolling ? "hidden" : "auto"; + var sectionKey = sectionConfig.key; + var content = renderChunkContent(sectionConfig, chunkConfig, { + tableColGroupNode: microColGroupNode, + tableMinWidth: "", + clientWidth: !props.collapsibleWidth && scrollerClientWidths[sectionKey] !== void 0 ? scrollerClientWidths[sectionKey] : null, + clientHeight: scrollerClientHeights[sectionKey] !== void 0 ? scrollerClientHeights[sectionKey] : null, + expandRows: sectionConfig.expandRows, + syncRowHeights: false, + rowSyncHeights: [], + reportRowHeightChange: function() { } - } + }, isHeader); + return createElement(isHeader ? "th" : "td", { + ref: chunkConfig.elRef, + role: "presentation" + }, createElement("div", { className: "fc-scroller-harness" + (isLiquid ? " fc-scroller-harness-liquid" : "") }, createElement(Scroller, { ref: this.scrollerRefs.createRef(sectionKey), elRef: this.scrollerElRefs.createRef(sectionKey), overflowY, overflowX: !props.liquid ? "visible" : "hidden", maxHeight: sectionConfig.maxHeight, liquid: isLiquid, liquidIsAbsolute: true }, content))); }; - CalendarContent2.prototype.componentWillUnmount = function() { - window.removeEventListener("resize", this.handleWindowResize); - this.resizeRunner.clear(); - for (var _i = 0, _a = this.calendarInteractions; _i < _a.length; _i++) { - var interaction = _a[_i]; - interaction.destroy(); + SimpleScrollGrid2.prototype._handleScrollerEl = function(scrollerEl, key) { + var section = getSectionByKey(this.props.sections, key); + if (section) { + setRef(section.chunk.scrollerElRef, scrollerEl); } - this.props.emitter.trigger("_unmount"); }; - CalendarContent2.prototype.buildAppendContent = function() { - var props = this.props; - var children = props.pluginHooks.viewContainerAppends.map(function(buildAppendContent) { - return buildAppendContent(props); - }); - return createElement.apply(void 0, __spreadArray([Fragment, {}], children)); + SimpleScrollGrid2.prototype.componentDidMount = function() { + this.handleSizing(); + this.context.addResizeHandler(this.handleSizing); }; - CalendarContent2.prototype.renderView = function(props) { - var pluginHooks = props.pluginHooks; - var viewSpec = props.viewSpec; - var viewProps = { - dateProfile: props.dateProfile, - businessHours: props.businessHours, - eventStore: props.renderableEventStore, - eventUiBases: props.eventUiBases, - dateSelection: props.dateSelection, - eventSelection: props.eventSelection, - eventDrag: props.eventDrag, - eventResize: props.eventResize, - isHeightAuto: props.isHeightAuto, - forPrint: props.forPrint - }; - var transformers = this.buildViewPropTransformers(pluginHooks.viewPropsTransformers); - for (var _i = 0, transformers_1 = transformers; _i < transformers_1.length; _i++) { - var transformer = transformers_1[_i]; - __assign(viewProps, transformer.transform(viewProps, props)); - } - var ViewComponent = viewSpec.component; - return createElement(ViewComponent, __assign({}, viewProps)); + SimpleScrollGrid2.prototype.componentDidUpdate = function() { + this.handleSizing(); }; - return CalendarContent2; -}(PureComponent); -function buildToolbarProps(viewSpec, dateProfile, dateProfileGenerator, currentDate, now2, title) { - var todayInfo = dateProfileGenerator.build(now2, void 0, false); - var prevInfo = dateProfileGenerator.buildPrev(dateProfile, currentDate, false); - var nextInfo = dateProfileGenerator.buildNext(dateProfile, currentDate, false); - return { - title, - activeButton: viewSpec.type, - navUnit: viewSpec.singleUnit, - isTodayEnabled: todayInfo.isValid && !rangeContainsMarker(dateProfile.currentRange, now2), - isPrevEnabled: prevInfo.isValid, - isNextEnabled: nextInfo.isValid + SimpleScrollGrid2.prototype.componentWillUnmount = function() { + this.context.removeResizeHandler(this.handleSizing); }; + SimpleScrollGrid2.prototype.computeShrinkWidth = function() { + return hasShrinkWidth(this.props.cols) ? computeShrinkWidth(this.scrollerElRefs.getAll()) : 0; + }; + SimpleScrollGrid2.prototype.computeScrollerDims = function() { + var scrollbarWidth = getScrollbarWidths(); + var _a = this, scrollerRefs = _a.scrollerRefs, scrollerElRefs = _a.scrollerElRefs; + var forceYScrollbars = false; + var scrollerClientWidths = {}; + var scrollerClientHeights = {}; + for (var sectionKey in scrollerRefs.currentMap) { + var scroller = scrollerRefs.currentMap[sectionKey]; + if (scroller && scroller.needsYScrolling()) { + forceYScrollbars = true; + break; + } + } + for (var _i = 0, _b = this.props.sections; _i < _b.length; _i++) { + var section = _b[_i]; + var sectionKey = section.key; + var scrollerEl = scrollerElRefs.currentMap[sectionKey]; + if (scrollerEl) { + var harnessEl = scrollerEl.parentNode; + scrollerClientWidths[sectionKey] = Math.floor(harnessEl.getBoundingClientRect().width - (forceYScrollbars ? scrollbarWidth.y : 0)); + scrollerClientHeights[sectionKey] = Math.floor(harnessEl.getBoundingClientRect().height); + } + } + return { forceYScrollbars, scrollerClientWidths, scrollerClientHeights }; + }; + return SimpleScrollGrid2; +}(BaseComponent); +SimpleScrollGrid.addStateEquality({ + scrollerClientWidths: isPropsEqual, + scrollerClientHeights: isPropsEqual +}); +function getSectionByKey(sections, key) { + for (var _i = 0, sections_1 = sections; _i < sections_1.length; _i++) { + var section = sections_1[_i]; + if (section.key === key) { + return section; + } + } + return null; } -function buildViewPropTransformers(theClasses) { - return theClasses.map(function(TheClass) { - return new TheClass(); - }); -} -var CalendarRoot = function(_super) { - __extends(CalendarRoot2, _super); - function CalendarRoot2() { +var EventRoot = function(_super) { + __extends(EventRoot2, _super); + function EventRoot2() { var _this = _super !== null && _super.apply(this, arguments) || this; - _this.state = { - forPrint: false - }; - _this.handleBeforePrint = function() { - _this.setState({ forPrint: true }); - }; - _this.handleAfterPrint = function() { - _this.setState({ forPrint: false }); - }; + _this.elRef = createRef(); return _this; } - CalendarRoot2.prototype.render = function() { - var props = this.props; - var options = props.options; - var forPrint = this.state.forPrint; - var isHeightAuto = forPrint || options.height === "auto" || options.contentHeight === "auto"; - var height = !isHeightAuto && options.height != null ? options.height : ""; - var classNames = [ - "fc", - forPrint ? "fc-media-print" : "fc-media-screen", - "fc-direction-" + options.direction, - props.theme.getClass("root") - ]; - if (!getCanVGrowWithinCell()) { - classNames.push("fc-liquid-hack"); - } - return props.children(classNames, height, isHeightAuto, forPrint); + EventRoot2.prototype.render = function() { + var _a = this, props = _a.props, context = _a.context; + var options = context.options; + var seg = props.seg; + var eventRange = seg.eventRange; + var ui = eventRange.ui; + var hookProps = { + event: new EventApi(context, eventRange.def, eventRange.instance), + view: context.viewApi, + timeText: props.timeText, + textColor: ui.textColor, + backgroundColor: ui.backgroundColor, + borderColor: ui.borderColor, + isDraggable: !props.disableDragging && computeSegDraggable(seg, context), + isStartResizable: !props.disableResizing && computeSegStartResizable(seg, context), + isEndResizable: !props.disableResizing && computeSegEndResizable(seg), + isMirror: Boolean(props.isDragging || props.isResizing || props.isDateSelecting), + isStart: Boolean(seg.isStart), + isEnd: Boolean(seg.isEnd), + isPast: Boolean(props.isPast), + isFuture: Boolean(props.isFuture), + isToday: Boolean(props.isToday), + isSelected: Boolean(props.isSelected), + isDragging: Boolean(props.isDragging), + isResizing: Boolean(props.isResizing) + }; + var standardClassNames = getEventClassNames(hookProps).concat(ui.classNames); + return createElement(RenderHook, { hookProps, classNames: options.eventClassNames, content: options.eventContent, defaultContent: props.defaultContent, didMount: options.eventDidMount, willUnmount: options.eventWillUnmount, elRef: this.elRef }, function(rootElRef, customClassNames, innerElRef, innerContent) { + return props.children(rootElRef, standardClassNames.concat(customClassNames), innerElRef, innerContent, hookProps); + }); }; - CalendarRoot2.prototype.componentDidMount = function() { - var emitter = this.props.emitter; - emitter.on("_beforeprint", this.handleBeforePrint); - emitter.on("_afterprint", this.handleAfterPrint); + EventRoot2.prototype.componentDidMount = function() { + setElSeg(this.elRef.current, this.props.seg); }; - CalendarRoot2.prototype.componentWillUnmount = function() { - var emitter = this.props.emitter; - emitter.off("_beforeprint", this.handleBeforePrint); - emitter.off("_afterprint", this.handleAfterPrint); + EventRoot2.prototype.componentDidUpdate = function(prevProps) { + var seg = this.props.seg; + if (seg !== prevProps.seg) { + setElSeg(this.elRef.current, seg); + } }; - return CalendarRoot2; + return EventRoot2; }(BaseComponent); -function computeFallbackHeaderFormat(datesRepDistinctDays, dayCnt) { - if (!datesRepDistinctDays || dayCnt > 10) { - return createFormatter({ weekday: "short" }); - } - if (dayCnt > 1) { - return createFormatter({ weekday: "short", month: "numeric", day: "numeric", omitCommas: true }); +var StandardEvent = function(_super) { + __extends(StandardEvent2, _super); + function StandardEvent2() { + return _super !== null && _super.apply(this, arguments) || this; } - return createFormatter({ weekday: "long" }); -} -var CLASS_NAME = "fc-col-header-cell"; -function renderInner$1(hookProps) { - return hookProps.text; + StandardEvent2.prototype.render = function() { + var _a = this, props = _a.props, context = _a.context; + var seg = props.seg; + var timeFormat = context.options.eventTimeFormat || props.defaultTimeFormat; + var timeText = buildSegTimeText(seg, timeFormat, context, props.defaultDisplayEventTime, props.defaultDisplayEventEnd); + return createElement(EventRoot, { seg, timeText, disableDragging: props.disableDragging, disableResizing: props.disableResizing, defaultContent: props.defaultContent || renderInnerContent$1, isDragging: props.isDragging, isResizing: props.isResizing, isDateSelecting: props.isDateSelecting, isSelected: props.isSelected, isPast: props.isPast, isFuture: props.isFuture, isToday: props.isToday }, function(rootElRef, classNames, innerElRef, innerContent, hookProps) { + return createElement("a", __assign({ className: props.extraClassNames.concat(classNames).join(" "), style: { + borderColor: hookProps.borderColor, + backgroundColor: hookProps.backgroundColor + }, ref: rootElRef }, getSegAnchorAttrs(seg, context)), createElement("div", { className: "fc-event-main", ref: innerElRef, style: { color: hookProps.textColor } }, innerContent), hookProps.isStartResizable && createElement("div", { className: "fc-event-resizer fc-event-resizer-start" }), hookProps.isEndResizable && createElement("div", { className: "fc-event-resizer fc-event-resizer-end" })); + }); + }; + return StandardEvent2; +}(BaseComponent); +function renderInnerContent$1(innerProps) { + return createElement("div", { className: "fc-event-main-frame" }, innerProps.timeText && createElement("div", { className: "fc-event-time" }, innerProps.timeText), createElement("div", { className: "fc-event-title-container" }, createElement("div", { className: "fc-event-title fc-sticky" }, innerProps.event.title || createElement(Fragment, null, "\xA0")))); } -var TableDateCell = function(_super) { - __extends(TableDateCell2, _super); - function TableDateCell2() { +var NowIndicatorRoot = function(props) { + return createElement(ViewContextType.Consumer, null, function(context) { + var options = context.options; + var hookProps = { + isAxis: props.isAxis, + date: context.dateEnv.toDate(props.date), + view: context.viewApi + }; + return createElement(RenderHook, { hookProps, classNames: options.nowIndicatorClassNames, content: options.nowIndicatorContent, didMount: options.nowIndicatorDidMount, willUnmount: options.nowIndicatorWillUnmount }, props.children); + }); +}; +var DAY_NUM_FORMAT = createFormatter({ day: "numeric" }); +var DayCellContent = function(_super) { + __extends(DayCellContent2, _super); + function DayCellContent2() { return _super !== null && _super.apply(this, arguments) || this; } - TableDateCell2.prototype.render = function() { - var _a = this.context, dateEnv = _a.dateEnv, options = _a.options, theme = _a.theme, viewApi = _a.viewApi; - var props = this.props; - var date = props.date, dateProfile = props.dateProfile; - var dayMeta = getDateMeta(date, props.todayRange, null, dateProfile); - var classNames = [CLASS_NAME].concat(getDayClassNames(dayMeta, theme)); - var text = dateEnv.format(date, props.dayHeaderFormat); - var navLinkAttrs = !dayMeta.isDisabled && props.colCnt > 1 ? buildNavLinkAttrs(this.context, date) : {}; - var hookProps = __assign(__assign(__assign({ date: dateEnv.toDate(date), view: viewApi }, props.extraHookProps), { text }), dayMeta); - return createElement(RenderHook, { hookProps, classNames: options.dayHeaderClassNames, content: options.dayHeaderContent, defaultContent: renderInner$1, didMount: options.dayHeaderDidMount, willUnmount: options.dayHeaderWillUnmount }, function(rootElRef, customClassNames, innerElRef, innerContent) { - return createElement("th", __assign({ ref: rootElRef, role: "columnheader", className: classNames.concat(customClassNames).join(" "), "data-date": !dayMeta.isDisabled ? formatDayString(date) : void 0, colSpan: props.colSpan }, props.extraDataAttrs), createElement("div", { className: "fc-scrollgrid-sync-inner" }, !dayMeta.isDisabled && createElement("a", __assign({ ref: innerElRef, className: [ - "fc-col-header-cell-cushion", - props.isSticky ? "fc-sticky" : "" - ].join(" ") }, navLinkAttrs), innerContent))); + DayCellContent2.prototype.render = function() { + var _a = this, props = _a.props, context = _a.context; + var options = context.options; + var hookProps = refineDayCellHookProps({ + date: props.date, + dateProfile: props.dateProfile, + todayRange: props.todayRange, + showDayNumber: props.showDayNumber, + extraProps: props.extraHookProps, + viewApi: context.viewApi, + dateEnv: context.dateEnv }); + return createElement(ContentHook, { hookProps, content: options.dayCellContent, defaultContent: props.defaultContent }, props.children); }; - return TableDateCell2; + return DayCellContent2; }(BaseComponent); -var WEEKDAY_FORMAT = createFormatter({ weekday: "long" }); -var TableDowCell = function(_super) { - __extends(TableDowCell2, _super); - function TableDowCell2() { - return _super !== null && _super.apply(this, arguments) || this; +function refineDayCellHookProps(raw) { + var date = raw.date, dateEnv = raw.dateEnv; + var dayMeta = getDateMeta(date, raw.todayRange, null, raw.dateProfile); + return __assign(__assign(__assign({ date: dateEnv.toDate(date), view: raw.viewApi }, dayMeta), { dayNumberText: raw.showDayNumber ? dateEnv.format(date, DAY_NUM_FORMAT) : "" }), raw.extraProps); +} +var DayCellRoot = function(_super) { + __extends(DayCellRoot2, _super); + function DayCellRoot2() { + var _this = _super !== null && _super.apply(this, arguments) || this; + _this.refineHookProps = memoizeObjArg(refineDayCellHookProps); + _this.normalizeClassNames = buildClassNameNormalizer(); + return _this; } - TableDowCell2.prototype.render = function() { - var props = this.props; - var _a = this.context, dateEnv = _a.dateEnv, theme = _a.theme, viewApi = _a.viewApi, options = _a.options; - var date = addDays(new Date(2592e5), props.dow); - var dateMeta = { - dow: props.dow, - isDisabled: false, - isFuture: false, - isPast: false, - isToday: false, - isOther: false + DayCellRoot2.prototype.render = function() { + var _a = this, props = _a.props, context = _a.context; + var options = context.options; + var hookProps = this.refineHookProps({ + date: props.date, + dateProfile: props.dateProfile, + todayRange: props.todayRange, + showDayNumber: props.showDayNumber, + extraProps: props.extraHookProps, + viewApi: context.viewApi, + dateEnv: context.dateEnv + }); + var classNames = getDayClassNames(hookProps, context.theme).concat(hookProps.isDisabled ? [] : this.normalizeClassNames(options.dayCellClassNames, hookProps)); + var dataAttrs = hookProps.isDisabled ? {} : { + "data-date": formatDayString(props.date) }; - var classNames = [CLASS_NAME].concat(getDayClassNames(dateMeta, theme), props.extraClassNames || []); - var text = dateEnv.format(date, props.dayHeaderFormat); - var hookProps = __assign(__assign(__assign(__assign({ - date - }, dateMeta), { view: viewApi }), props.extraHookProps), { text }); - return createElement(RenderHook, { hookProps, classNames: options.dayHeaderClassNames, content: options.dayHeaderContent, defaultContent: renderInner$1, didMount: options.dayHeaderDidMount, willUnmount: options.dayHeaderWillUnmount }, function(rootElRef, customClassNames, innerElRef, innerContent) { - return createElement("th", __assign({ ref: rootElRef, role: "columnheader", className: classNames.concat(customClassNames).join(" "), colSpan: props.colSpan }, props.extraDataAttrs), createElement("div", { className: "fc-scrollgrid-sync-inner" }, createElement("a", { "aria-label": dateEnv.format(date, WEEKDAY_FORMAT), className: [ - "fc-col-header-cell-cushion", - props.isSticky ? "fc-sticky" : "" - ].join(" "), ref: innerElRef }, innerContent))); + return createElement(MountHook, { hookProps, didMount: options.dayCellDidMount, willUnmount: options.dayCellWillUnmount, elRef: props.elRef }, function(rootElRef) { + return props.children(rootElRef, classNames, dataAttrs, hookProps.isDisabled); }); }; - return TableDowCell2; + return DayCellRoot2; }(BaseComponent); -var NowTimer = function(_super) { - __extends(NowTimer2, _super); - function NowTimer2(props, context) { - var _this = _super.call(this, props, context) || this; - _this.initialNowDate = getNow(context.options.now, context.dateEnv); - _this.initialNowQueriedMs = new Date().valueOf(); - _this.state = _this.computeTiming().currentState; +function renderFill(fillType) { + return createElement("div", { className: "fc-" + fillType }); +} +var BgEvent = function(props) { + return createElement(EventRoot, { defaultContent: renderInnerContent, seg: props.seg, timeText: "", disableDragging: true, disableResizing: true, isDragging: false, isResizing: false, isDateSelecting: false, isSelected: false, isPast: props.isPast, isFuture: props.isFuture, isToday: props.isToday }, function(rootElRef, classNames, innerElRef, innerContent, hookProps) { + return createElement("div", { ref: rootElRef, className: ["fc-bg-event"].concat(classNames).join(" "), style: { + backgroundColor: hookProps.backgroundColor + } }, innerContent); + }); +}; +function renderInnerContent(props) { + var title = props.event.title; + return title && createElement("div", { className: "fc-event-title" }, props.event.title); +} +var WeekNumberRoot = function(props) { + return createElement(ViewContextType.Consumer, null, function(context) { + var dateEnv = context.dateEnv, options = context.options; + var date = props.date; + var format = options.weekNumberFormat || props.defaultFormat; + var num = dateEnv.computeWeekNumber(date); + var text = dateEnv.format(date, format); + var hookProps = { num, text, date }; + return createElement(RenderHook, { hookProps, classNames: options.weekNumberClassNames, content: options.weekNumberContent, defaultContent: renderInner, didMount: options.weekNumberDidMount, willUnmount: options.weekNumberWillUnmount }, props.children); + }); +}; +function renderInner(innerProps) { + return innerProps.text; +} +var PADDING_FROM_VIEWPORT = 10; +var Popover = function(_super) { + __extends(Popover2, _super); + function Popover2() { + var _this = _super !== null && _super.apply(this, arguments) || this; + _this.state = { + titleId: getUniqueDomId() + }; + _this.handleRootEl = function(el) { + _this.rootEl = el; + if (_this.props.elRef) { + setRef(_this.props.elRef, el); + } + }; + _this.handleDocumentMouseDown = function(ev) { + var target = getEventTargetViaRoot(ev); + if (!_this.rootEl.contains(target)) { + _this.handleCloseClick(); + } + }; + _this.handleDocumentKeyDown = function(ev) { + if (ev.key === "Escape") { + _this.handleCloseClick(); + } + }; + _this.handleCloseClick = function() { + var onClose = _this.props.onClose; + if (onClose) { + onClose(); + } + }; return _this; } - NowTimer2.prototype.render = function() { - var _a = this, props = _a.props, state = _a.state; - return props.children(state.nowDate, state.todayRange); - }; - NowTimer2.prototype.componentDidMount = function() { - this.setTimeout(); - }; - NowTimer2.prototype.componentDidUpdate = function(prevProps) { - if (prevProps.unit !== this.props.unit) { - this.clearTimeout(); - this.setTimeout(); - } - }; - NowTimer2.prototype.componentWillUnmount = function() { - this.clearTimeout(); + Popover2.prototype.render = function() { + var _a = this.context, theme = _a.theme, options = _a.options; + var _b = this, props = _b.props, state = _b.state; + var classNames = [ + "fc-popover", + theme.getClass("popover") + ].concat(props.extraClassNames || []); + return createPortal(createElement("div", __assign({ id: props.id, className: classNames.join(" "), "aria-labelledby": state.titleId }, props.extraAttrs, { ref: this.handleRootEl }), createElement("div", { className: "fc-popover-header " + theme.getClass("popoverHeader") }, createElement("span", { className: "fc-popover-title", id: state.titleId }, props.title), createElement("span", { className: "fc-popover-close " + theme.getIconClass("close"), title: options.closeHint, onClick: this.handleCloseClick })), createElement("div", { className: "fc-popover-body " + theme.getClass("popoverContent") }, props.children)), props.parentEl); }; - NowTimer2.prototype.computeTiming = function() { - var _a = this, props = _a.props, context = _a.context; - var unroundedNow = addMs(this.initialNowDate, new Date().valueOf() - this.initialNowQueriedMs); - var currentUnitStart = context.dateEnv.startOf(unroundedNow, props.unit); - var nextUnitStart = context.dateEnv.add(currentUnitStart, createDuration(1, props.unit)); - var waitMs = nextUnitStart.valueOf() - unroundedNow.valueOf(); - waitMs = Math.min(1e3 * 60 * 60 * 24, waitMs); - return { - currentState: { nowDate: currentUnitStart, todayRange: buildDayRange(currentUnitStart) }, - nextState: { nowDate: nextUnitStart, todayRange: buildDayRange(nextUnitStart) }, - waitMs - }; + Popover2.prototype.componentDidMount = function() { + document.addEventListener("mousedown", this.handleDocumentMouseDown); + document.addEventListener("keydown", this.handleDocumentKeyDown); + this.updateSize(); }; - NowTimer2.prototype.setTimeout = function() { - var _this = this; - var _a = this.computeTiming(), nextState = _a.nextState, waitMs = _a.waitMs; - this.timeoutId = setTimeout(function() { - _this.setState(nextState, function() { - _this.setTimeout(); - }); - }, waitMs); + Popover2.prototype.componentWillUnmount = function() { + document.removeEventListener("mousedown", this.handleDocumentMouseDown); + document.removeEventListener("keydown", this.handleDocumentKeyDown); }; - NowTimer2.prototype.clearTimeout = function() { - if (this.timeoutId) { - clearTimeout(this.timeoutId); + Popover2.prototype.updateSize = function() { + var isRtl = this.context.isRtl; + var _a = this.props, alignmentEl = _a.alignmentEl, alignGridTop = _a.alignGridTop; + var rootEl = this.rootEl; + var alignmentRect = computeClippedClientRect(alignmentEl); + if (alignmentRect) { + var popoverDims = rootEl.getBoundingClientRect(); + var popoverTop = alignGridTop ? elementClosest(alignmentEl, ".fc-scrollgrid").getBoundingClientRect().top : alignmentRect.top; + var popoverLeft = isRtl ? alignmentRect.right - popoverDims.width : alignmentRect.left; + popoverTop = Math.max(popoverTop, PADDING_FROM_VIEWPORT); + popoverLeft = Math.min(popoverLeft, document.documentElement.clientWidth - PADDING_FROM_VIEWPORT - popoverDims.width); + popoverLeft = Math.max(popoverLeft, PADDING_FROM_VIEWPORT); + var origin_1 = rootEl.offsetParent.getBoundingClientRect(); + applyStyle(rootEl, { + top: popoverTop - origin_1.top, + left: popoverLeft - origin_1.left + }); } }; - NowTimer2.contextType = ViewContextType; - return NowTimer2; -}(Component); -function buildDayRange(date) { - var start = startOfDay(date); - var end = addDays(start, 1); - return { start, end }; -} -var DayHeader = function(_super) { - __extends(DayHeader2, _super); - function DayHeader2() { + return Popover2; +}(BaseComponent); +var MorePopover = function(_super) { + __extends(MorePopover2, _super); + function MorePopover2() { var _this = _super !== null && _super.apply(this, arguments) || this; - _this.createDayHeaderFormatter = memoize(createDayHeaderFormatter); + _this.handleRootEl = function(rootEl) { + _this.rootEl = rootEl; + if (rootEl) { + _this.context.registerInteractiveComponent(_this, { + el: rootEl, + useEventCenter: false + }); + } else { + _this.context.unregisterInteractiveComponent(_this); + } + }; return _this; } - DayHeader2.prototype.render = function() { - var context = this.context; - var _a = this.props, dates = _a.dates, dateProfile = _a.dateProfile, datesRepDistinctDays = _a.datesRepDistinctDays, renderIntro = _a.renderIntro; - var dayHeaderFormat = this.createDayHeaderFormatter(context.options.dayHeaderFormat, datesRepDistinctDays, dates.length); - return createElement(NowTimer, { unit: "day" }, function(nowDate, todayRange) { - return createElement("tr", { role: "row" }, renderIntro && renderIntro("day"), dates.map(function(date) { - return datesRepDistinctDays ? createElement(TableDateCell, { key: date.toISOString(), date, dateProfile, todayRange, colCnt: dates.length, dayHeaderFormat }) : createElement(TableDowCell, { key: date.getUTCDay(), dow: date.getUTCDay(), dayHeaderFormat }); - })); + MorePopover2.prototype.render = function() { + var _a = this.context, options = _a.options, dateEnv = _a.dateEnv; + var props = this.props; + var startDate = props.startDate, todayRange = props.todayRange, dateProfile = props.dateProfile; + var title = dateEnv.format(startDate, options.dayPopoverFormat); + return createElement(DayCellRoot, { date: startDate, dateProfile, todayRange, elRef: this.handleRootEl }, function(rootElRef, dayClassNames, dataAttrs) { + return createElement(Popover, { elRef: rootElRef, id: props.id, title, extraClassNames: ["fc-more-popover"].concat(dayClassNames), extraAttrs: dataAttrs, parentEl: props.parentEl, alignmentEl: props.alignmentEl, alignGridTop: props.alignGridTop, onClose: props.onClose }, createElement(DayCellContent, { date: startDate, dateProfile, todayRange }, function(innerElRef, innerContent) { + return innerContent && createElement("div", { className: "fc-more-popover-misc", ref: innerElRef }, innerContent); + }), props.children); }); }; - return DayHeader2; -}(BaseComponent); -function createDayHeaderFormatter(explicitFormat, datesRepDistinctDays, dateCnt) { - return explicitFormat || computeFallbackHeaderFormat(datesRepDistinctDays, dateCnt); -} -var DaySeriesModel = function() { - function DaySeriesModel2(range, dateProfileGenerator) { - var date = range.start; - var end = range.end; - var indices = []; - var dates = []; - var dayIndex = -1; - while (date < end) { - if (dateProfileGenerator.isHiddenDay(date)) { - indices.push(dayIndex + 0.5); - } else { - dayIndex += 1; - indices.push(dayIndex); - dates.push(date); - } - date = addDays(date, 1); - } - this.dates = dates; - this.indices = indices; - this.cnt = dates.length; - } - DaySeriesModel2.prototype.sliceRange = function(range) { - var firstIndex = this.getDateDayIndex(range.start); - var lastIndex = this.getDateDayIndex(addDays(range.end, -1)); - var clippedFirstIndex = Math.max(0, firstIndex); - var clippedLastIndex = Math.min(this.cnt - 1, lastIndex); - clippedFirstIndex = Math.ceil(clippedFirstIndex); - clippedLastIndex = Math.floor(clippedLastIndex); - if (clippedFirstIndex <= clippedLastIndex) { + MorePopover2.prototype.queryHit = function(positionLeft, positionTop, elWidth, elHeight) { + var _a = this, rootEl = _a.rootEl, props = _a.props; + if (positionLeft >= 0 && positionLeft < elWidth && positionTop >= 0 && positionTop < elHeight) { return { - firstIndex: clippedFirstIndex, - lastIndex: clippedLastIndex, - isStart: firstIndex === clippedFirstIndex, - isEnd: lastIndex === clippedLastIndex + dateProfile: props.dateProfile, + dateSpan: __assign({ allDay: true, range: { + start: props.startDate, + end: props.endDate + } }, props.extraDateSpan), + dayEl: rootEl, + rect: { + left: 0, + top: 0, + right: elWidth, + bottom: elHeight + }, + layer: 1 }; } return null; }; - DaySeriesModel2.prototype.getDateDayIndex = function(date) { - var indices = this.indices; - var dayOffset = Math.floor(diffDays(this.dates[0], date)); - if (dayOffset < 0) { - return indices[0] - 1; - } - if (dayOffset >= indices.length) { - return indices[indices.length - 1] + 1; - } - return indices[dayOffset]; - }; - return DaySeriesModel2; -}(); -var DayTableModel = function() { - function DayTableModel2(daySeries, breakOnWeeks) { - var dates = daySeries.dates; - var daysPerRow; - var firstDay; - var rowCnt; - if (breakOnWeeks) { - firstDay = dates[0].getUTCDay(); - for (daysPerRow = 1; daysPerRow < dates.length; daysPerRow += 1) { - if (dates[daysPerRow].getUTCDay() === firstDay) { - break; - } + return MorePopover2; +}(DateComponent); +var MoreLinkRoot = function(_super) { + __extends(MoreLinkRoot2, _super); + function MoreLinkRoot2() { + var _this = _super !== null && _super.apply(this, arguments) || this; + _this.linkElRef = createRef(); + _this.state = { + isPopoverOpen: false, + popoverId: getUniqueDomId() + }; + _this.handleClick = function(ev) { + var _a = _this, props = _a.props, context = _a.context; + var moreLinkClick = context.options.moreLinkClick; + var date = computeRange(props).start; + function buildPublicSeg(seg) { + var _a2 = seg.eventRange, def = _a2.def, instance = _a2.instance, range2 = _a2.range; + return { + event: new EventApi(context, def, instance), + start: context.dateEnv.toDate(range2.start), + end: context.dateEnv.toDate(range2.end), + isStart: seg.isStart, + isEnd: seg.isEnd + }; } - rowCnt = Math.ceil(dates.length / daysPerRow); - } else { - rowCnt = 1; - daysPerRow = dates.length; - } - this.rowCnt = rowCnt; - this.colCnt = daysPerRow; - this.daySeries = daySeries; - this.cells = this.buildCells(); - this.headerDates = this.buildHeaderDates(); - } - DayTableModel2.prototype.buildCells = function() { - var rows = []; - for (var row = 0; row < this.rowCnt; row += 1) { - var cells = []; - for (var col = 0; col < this.colCnt; col += 1) { - cells.push(this.buildCell(row, col)); + if (typeof moreLinkClick === "function") { + moreLinkClick = moreLinkClick({ + date, + allDay: Boolean(props.allDayDate), + allSegs: props.allSegs.map(buildPublicSeg), + hiddenSegs: props.hiddenSegs.map(buildPublicSeg), + jsEvent: ev, + view: context.viewApi + }); } - rows.push(cells); + if (!moreLinkClick || moreLinkClick === "popover") { + _this.setState({ isPopoverOpen: true }); + } else if (typeof moreLinkClick === "string") { + context.calendarApi.zoomTo(date, moreLinkClick); + } + }; + _this.handlePopoverClose = function() { + _this.setState({ isPopoverOpen: false }); + }; + return _this; + } + MoreLinkRoot2.prototype.render = function() { + var _this = this; + var _a = this, props = _a.props, state = _a.state; + return createElement(ViewContextType.Consumer, null, function(context) { + var viewApi = context.viewApi, options = context.options, calendarApi = context.calendarApi; + var moreLinkText = options.moreLinkText; + var moreCnt = props.moreCnt; + var range2 = computeRange(props); + var text = typeof moreLinkText === "function" ? moreLinkText.call(calendarApi, moreCnt) : "+" + moreCnt + " " + moreLinkText; + var title = formatWithOrdinals(options.moreLinkHint, [moreCnt], text); + var hookProps = { + num: moreCnt, + shortText: "+" + moreCnt, + text, + view: viewApi + }; + return createElement(Fragment, null, Boolean(props.moreCnt) && createElement(RenderHook, { elRef: _this.linkElRef, hookProps, classNames: options.moreLinkClassNames, content: options.moreLinkContent, defaultContent: props.defaultContent || renderMoreLinkInner, didMount: options.moreLinkDidMount, willUnmount: options.moreLinkWillUnmount }, function(rootElRef, customClassNames, innerElRef, innerContent) { + return props.children(rootElRef, ["fc-more-link"].concat(customClassNames), innerElRef, innerContent, _this.handleClick, title, state.isPopoverOpen, state.isPopoverOpen ? state.popoverId : ""); + }), state.isPopoverOpen && createElement(MorePopover, { id: state.popoverId, startDate: range2.start, endDate: range2.end, dateProfile: props.dateProfile, todayRange: props.todayRange, extraDateSpan: props.extraDateSpan, parentEl: _this.parentEl, alignmentEl: props.alignmentElRef.current, alignGridTop: props.alignGridTop, onClose: _this.handlePopoverClose }, props.popoverContent())); + }); + }; + MoreLinkRoot2.prototype.componentDidMount = function() { + this.updateParentEl(); + }; + MoreLinkRoot2.prototype.componentDidUpdate = function() { + this.updateParentEl(); + }; + MoreLinkRoot2.prototype.updateParentEl = function() { + if (this.linkElRef.current) { + this.parentEl = elementClosest(this.linkElRef.current, ".fc-view-harness"); } - return rows; }; - DayTableModel2.prototype.buildCell = function(row, col) { - var date = this.daySeries.dates[row * this.colCnt + col]; + return MoreLinkRoot2; +}(BaseComponent); +function renderMoreLinkInner(props) { + return props.text; +} +function computeRange(props) { + if (props.allDayDate) { return { - key: date.toISOString(), - date + start: props.allDayDate, + end: addDays(props.allDayDate, 1) }; + } + var hiddenSegs = props.hiddenSegs; + return { + start: computeEarliestSegStart(hiddenSegs), + end: computeLatestSegEnd(hiddenSegs) }; - DayTableModel2.prototype.buildHeaderDates = function() { - var dates = []; - for (var col = 0; col < this.colCnt; col += 1) { - dates.push(this.cells[0][col].date); +} +function computeEarliestSegStart(segs) { + return segs.reduce(pickEarliestStart).eventRange.range.start; +} +function pickEarliestStart(seg0, seg1) { + return seg0.eventRange.range.start < seg1.eventRange.range.start ? seg0 : seg1; +} +function computeLatestSegEnd(segs) { + return segs.reduce(pickLatestEnd).eventRange.range.end; +} +function pickLatestEnd(seg0, seg1) { + return seg0.eventRange.range.end > seg1.eventRange.range.end ? seg0 : seg1; +} + +// node_modules/@fullcalendar/core/main.js +var Calendar = function(_super) { + __extends(Calendar3, _super); + function Calendar3(el, optionOverrides) { + if (optionOverrides === void 0) { + optionOverrides = {}; } - return dates; - }; - DayTableModel2.prototype.sliceRange = function(range) { - var colCnt = this.colCnt; - var seriesSeg = this.daySeries.sliceRange(range); - var segs = []; - if (seriesSeg) { - var firstIndex = seriesSeg.firstIndex, lastIndex = seriesSeg.lastIndex; - var index = firstIndex; - while (index <= lastIndex) { - var row = Math.floor(index / colCnt); - var nextIndex = Math.min((row + 1) * colCnt, lastIndex + 1); - segs.push({ - row, - firstCol: index % colCnt, - lastCol: (nextIndex - 1) % colCnt, - isStart: seriesSeg.isStart && index === firstIndex, - isEnd: seriesSeg.isEnd && nextIndex - 1 === lastIndex + var _this = _super.call(this) || this; + _this.isRendering = false; + _this.isRendered = false; + _this.currentClassNames = []; + _this.customContentRenderId = 0; + _this.handleAction = function(action) { + switch (action.type) { + case "SET_EVENT_DRAG": + case "SET_EVENT_RESIZE": + _this.renderRunner.tryDrain(); + } + }; + _this.handleData = function(data) { + _this.currentData = data; + _this.renderRunner.request(data.calendarOptions.rerenderDelay); + }; + _this.handleRenderRequest = function() { + if (_this.isRendering) { + _this.isRendered = true; + var currentData_1 = _this.currentData; + flushSync2(function() { + render(createElement(CalendarRoot, { options: currentData_1.calendarOptions, theme: currentData_1.theme, emitter: currentData_1.emitter }, function(classNames, height, isHeightAuto, forPrint) { + _this.setClassNames(classNames); + _this.setHeight(height); + return createElement(CustomContentRenderContext.Provider, { value: _this.customContentRenderId }, createElement(CalendarContent, __assign({ isHeightAuto, forPrint }, currentData_1))); + }), _this.el); }); - index = nextIndex; + } else if (_this.isRendered) { + _this.isRendered = false; + unmountComponentAtNode2(_this.el); + _this.setClassNames([]); + _this.setHeight(""); } - } - return segs; - }; - return DayTableModel2; -}(); -var Slicer = function() { - function Slicer2() { - this.sliceBusinessHours = memoize(this._sliceBusinessHours); - this.sliceDateSelection = memoize(this._sliceDateSpan); - this.sliceEventStore = memoize(this._sliceEventStore); - this.sliceEventDrag = memoize(this._sliceInteraction); - this.sliceEventResize = memoize(this._sliceInteraction); - this.forceDayIfListItem = false; + }; + _this.el = el; + _this.renderRunner = new DelayedRunner(_this.handleRenderRequest); + new CalendarDataManager({ + optionOverrides, + calendarApi: _this, + onAction: _this.handleAction, + onData: _this.handleData + }); + return _this; } - Slicer2.prototype.sliceProps = function(props, dateProfile, nextDayThreshold, context) { - var extraArgs = []; - for (var _i = 4; _i < arguments.length; _i++) { - extraArgs[_i - 4] = arguments[_i]; + Object.defineProperty(Calendar3.prototype, "view", { + get: function() { + return this.currentData.viewApi; + }, + enumerable: false, + configurable: true + }); + Calendar3.prototype.render = function() { + var wasRendering = this.isRendering; + if (!wasRendering) { + this.isRendering = true; + } else { + this.customContentRenderId += 1; } - var eventUiBases = props.eventUiBases; - var eventSegs = this.sliceEventStore.apply(this, __spreadArray([props.eventStore, eventUiBases, dateProfile, nextDayThreshold], extraArgs)); - return { - dateSelectionSegs: this.sliceDateSelection.apply(this, __spreadArray([props.dateSelection, eventUiBases, context], extraArgs)), - businessHourSegs: this.sliceBusinessHours.apply(this, __spreadArray([props.businessHours, dateProfile, nextDayThreshold, context], extraArgs)), - fgEventSegs: eventSegs.fg, - bgEventSegs: eventSegs.bg, - eventDrag: this.sliceEventDrag.apply(this, __spreadArray([props.eventDrag, eventUiBases, dateProfile, nextDayThreshold], extraArgs)), - eventResize: this.sliceEventResize.apply(this, __spreadArray([props.eventResize, eventUiBases, dateProfile, nextDayThreshold], extraArgs)), - eventSelection: props.eventSelection - }; - }; - Slicer2.prototype.sliceNowDate = function(date, context) { - var extraArgs = []; - for (var _i = 2; _i < arguments.length; _i++) { - extraArgs[_i - 2] = arguments[_i]; + this.renderRunner.request(); + if (wasRendering) { + this.updateSize(); } - return this._sliceDateSpan.apply(this, __spreadArray([ - { range: { start: date, end: addMs(date, 1) }, allDay: false }, - {}, - context - ], extraArgs)); }; - Slicer2.prototype._sliceBusinessHours = function(businessHours, dateProfile, nextDayThreshold, context) { - var extraArgs = []; - for (var _i = 4; _i < arguments.length; _i++) { - extraArgs[_i - 4] = arguments[_i]; - } - if (!businessHours) { - return []; + Calendar3.prototype.destroy = function() { + if (this.isRendering) { + this.isRendering = false; + this.renderRunner.request(); } - return this._sliceEventStore.apply(this, __spreadArray([ - expandRecurring(businessHours, computeActiveRange(dateProfile, Boolean(nextDayThreshold)), context), - {}, - dateProfile, - nextDayThreshold - ], extraArgs)).bg; }; - Slicer2.prototype._sliceEventStore = function(eventStore, eventUiBases, dateProfile, nextDayThreshold) { - var extraArgs = []; - for (var _i = 4; _i < arguments.length; _i++) { - extraArgs[_i - 4] = arguments[_i]; - } - if (eventStore) { - var rangeRes = sliceEventStore(eventStore, eventUiBases, computeActiveRange(dateProfile, Boolean(nextDayThreshold)), nextDayThreshold); - return { - bg: this.sliceEventRanges(rangeRes.bg, extraArgs), - fg: this.sliceEventRanges(rangeRes.fg, extraArgs) - }; - } - return { bg: [], fg: [] }; + Calendar3.prototype.updateSize = function() { + var _this = this; + flushSync2(function() { + _super.prototype.updateSize.call(_this); + }); }; - Slicer2.prototype._sliceInteraction = function(interaction, eventUiBases, dateProfile, nextDayThreshold) { - var extraArgs = []; - for (var _i = 4; _i < arguments.length; _i++) { - extraArgs[_i - 4] = arguments[_i]; - } - if (!interaction) { - return null; - } - var rangeRes = sliceEventStore(interaction.mutatedEvents, eventUiBases, computeActiveRange(dateProfile, Boolean(nextDayThreshold)), nextDayThreshold); - return { - segs: this.sliceEventRanges(rangeRes.fg, extraArgs), - affectedInstances: interaction.affectedEvents.instances, - isEvent: interaction.isEvent - }; + Calendar3.prototype.batchRendering = function(func) { + this.renderRunner.pause("batchRendering"); + func(); + this.renderRunner.resume("batchRendering"); }; - Slicer2.prototype._sliceDateSpan = function(dateSpan, eventUiBases, context) { - var extraArgs = []; - for (var _i = 3; _i < arguments.length; _i++) { - extraArgs[_i - 3] = arguments[_i]; - } - if (!dateSpan) { - return []; - } - var eventRange = fabricateEventRange(dateSpan, eventUiBases, context); - var segs = this.sliceRange.apply(this, __spreadArray([dateSpan.range], extraArgs)); - for (var _a = 0, segs_1 = segs; _a < segs_1.length; _a++) { - var seg = segs_1[_a]; - seg.eventRange = eventRange; + Calendar3.prototype.pauseRendering = function() { + this.renderRunner.pause("pauseRendering"); + }; + Calendar3.prototype.resumeRendering = function() { + this.renderRunner.resume("pauseRendering", true); + }; + Calendar3.prototype.resetOptions = function(optionOverrides, append) { + this.currentDataManager.resetOptions(optionOverrides, append); + }; + Calendar3.prototype.setClassNames = function(classNames) { + if (!isArraysEqual(classNames, this.currentClassNames)) { + var classList = this.el.classList; + for (var _i = 0, _a = this.currentClassNames; _i < _a.length; _i++) { + var className = _a[_i]; + classList.remove(className); + } + for (var _b = 0, classNames_1 = classNames; _b < classNames_1.length; _b++) { + var className = classNames_1[_b]; + classList.add(className); + } + this.currentClassNames = classNames; } - return segs; }; - Slicer2.prototype.sliceEventRanges = function(eventRanges, extraArgs) { - var segs = []; - for (var _i = 0, eventRanges_1 = eventRanges; _i < eventRanges_1.length; _i++) { - var eventRange = eventRanges_1[_i]; - segs.push.apply(segs, this.sliceEventRange(eventRange, extraArgs)); + Calendar3.prototype.setHeight = function(height) { + applyStyleProp(this.el, "height", height); + }; + return Calendar3; +}(CalendarApi); + +// node_modules/@fullcalendar/daygrid/main.js +var TableView = function(_super) { + __extends(TableView2, _super); + function TableView2() { + var _this = _super !== null && _super.apply(this, arguments) || this; + _this.headerElRef = createRef(); + return _this; + } + TableView2.prototype.renderSimpleLayout = function(headerRowContent, bodyContent) { + var _a = this, props = _a.props, context = _a.context; + var sections = []; + var stickyHeaderDates = getStickyHeaderDates(context.options); + if (headerRowContent) { + sections.push({ + type: "header", + key: "header", + isSticky: stickyHeaderDates, + chunk: { + elRef: this.headerElRef, + tableClassName: "fc-col-header", + rowContent: headerRowContent + } + }); } - return segs; + sections.push({ + type: "body", + key: "body", + liquid: true, + chunk: { content: bodyContent } + }); + return createElement(ViewRoot, { viewSpec: context.viewSpec }, function(rootElRef, classNames) { + return createElement("div", { ref: rootElRef, className: ["fc-daygrid"].concat(classNames).join(" ") }, createElement(SimpleScrollGrid, { liquid: !props.isHeightAuto && !props.forPrint, collapsibleWidth: props.forPrint, cols: [], sections })); + }); }; - Slicer2.prototype.sliceEventRange = function(eventRange, extraArgs) { - var dateRange = eventRange.range; - if (this.forceDayIfListItem && eventRange.ui.display === "list-item") { - dateRange = { - start: dateRange.start, - end: addDays(dateRange.start, 1) - }; + TableView2.prototype.renderHScrollLayout = function(headerRowContent, bodyContent, colCnt, dayMinWidth) { + var ScrollGrid = this.context.pluginHooks.scrollGridImpl; + if (!ScrollGrid) { + throw new Error("No ScrollGrid implementation"); } - var segs = this.sliceRange.apply(this, __spreadArray([dateRange], extraArgs)); - for (var _i = 0, segs_2 = segs; _i < segs_2.length; _i++) { - var seg = segs_2[_i]; - seg.eventRange = eventRange; - seg.isStart = eventRange.isStart && seg.isStart; - seg.isEnd = eventRange.isEnd && seg.isEnd; + var _a = this, props = _a.props, context = _a.context; + var stickyHeaderDates = !props.forPrint && getStickyHeaderDates(context.options); + var stickyFooterScrollbar = !props.forPrint && getStickyFooterScrollbar(context.options); + var sections = []; + if (headerRowContent) { + sections.push({ + type: "header", + key: "header", + isSticky: stickyHeaderDates, + chunks: [{ + key: "main", + elRef: this.headerElRef, + tableClassName: "fc-col-header", + rowContent: headerRowContent + }] + }); } - return segs; - }; - return Slicer2; -}(); -function computeActiveRange(dateProfile, isComponentAllDay) { - var range = dateProfile.activeRange; - if (isComponentAllDay) { - return range; - } - return { - start: addMs(range.start, dateProfile.slotMinTime.milliseconds), - end: addMs(range.end, dateProfile.slotMaxTime.milliseconds - 864e5) - }; -} -function isInteractionValid(interaction, dateProfile, context) { - var instances = interaction.mutatedEvents.instances; - for (var instanceId in instances) { - if (!rangeContainsRange(dateProfile.validRange, instances[instanceId].range)) { - return false; + sections.push({ + type: "body", + key: "body", + liquid: true, + chunks: [{ + key: "main", + content: bodyContent + }] + }); + if (stickyFooterScrollbar) { + sections.push({ + type: "footer", + key: "footer", + isSticky: true, + chunks: [{ + key: "main", + content: renderScrollShim + }] + }); } + return createElement(ViewRoot, { viewSpec: context.viewSpec }, function(rootElRef, classNames) { + return createElement("div", { ref: rootElRef, className: ["fc-daygrid"].concat(classNames).join(" ") }, createElement(ScrollGrid, { liquid: !props.isHeightAuto && !props.forPrint, collapsibleWidth: props.forPrint, colGroups: [{ cols: [{ span: colCnt, minWidth: dayMinWidth }] }], sections })); + }); + }; + return TableView2; +}(DateComponent); +function splitSegsByRow(segs, rowCnt) { + var byRow = []; + for (var i3 = 0; i3 < rowCnt; i3 += 1) { + byRow[i3] = []; } - return isNewPropsValid({ eventDrag: interaction }, context); -} -function isDateSelectionValid(dateSelection, dateProfile, context) { - if (!rangeContainsRange(dateProfile.validRange, dateSelection.range)) { - return false; + for (var _i = 0, segs_1 = segs; _i < segs_1.length; _i++) { + var seg = segs_1[_i]; + byRow[seg.row].push(seg); } - return isNewPropsValid({ dateSelection }, context); -} -function isNewPropsValid(newProps, context) { - var calendarState = context.getCurrentData(); - var props = __assign({ businessHours: calendarState.businessHours, dateSelection: "", eventStore: calendarState.eventStore, eventUiBases: calendarState.eventUiBases, eventSelection: "", eventDrag: null, eventResize: null }, newProps); - return (context.pluginHooks.isPropsValid || isPropsValid)(props, context); + return byRow; } -function isPropsValid(state, context, dateSpanMeta, filterConfig) { - if (dateSpanMeta === void 0) { - dateSpanMeta = {}; - } - if (state.eventDrag && !isInteractionPropsValid(state, context, dateSpanMeta, filterConfig)) { - return false; +function splitSegsByFirstCol(segs, colCnt) { + var byCol = []; + for (var i3 = 0; i3 < colCnt; i3 += 1) { + byCol[i3] = []; } - if (state.dateSelection && !isDateSelectionPropsValid(state, context, dateSpanMeta, filterConfig)) { - return false; + for (var _i = 0, segs_2 = segs; _i < segs_2.length; _i++) { + var seg = segs_2[_i]; + byCol[seg.firstCol].push(seg); } - return true; + return byCol; } -function isInteractionPropsValid(state, context, dateSpanMeta, filterConfig) { - var currentState = context.getCurrentData(); - var interaction = state.eventDrag; - var subjectEventStore = interaction.mutatedEvents; - var subjectDefs = subjectEventStore.defs; - var subjectInstances = subjectEventStore.instances; - var subjectConfigs = compileEventUis(subjectDefs, interaction.isEvent ? state.eventUiBases : { "": currentState.selectionConfig }); - if (filterConfig) { - subjectConfigs = mapHash(subjectConfigs, filterConfig); - } - var otherEventStore = excludeInstances(state.eventStore, interaction.affectedEvents.instances); - var otherDefs = otherEventStore.defs; - var otherInstances = otherEventStore.instances; - var otherConfigs = compileEventUis(otherDefs, state.eventUiBases); - for (var subjectInstanceId in subjectInstances) { - var subjectInstance = subjectInstances[subjectInstanceId]; - var subjectRange = subjectInstance.range; - var subjectConfig = subjectConfigs[subjectInstance.defId]; - var subjectDef = subjectDefs[subjectInstance.defId]; - if (!allConstraintsPass(subjectConfig.constraints, subjectRange, otherEventStore, state.businessHours, context)) { - return false; +function splitInteractionByRow(ui, rowCnt) { + var byRow = []; + if (!ui) { + for (var i3 = 0; i3 < rowCnt; i3 += 1) { + byRow[i3] = null; } - var eventOverlap = context.options.eventOverlap; - var eventOverlapFunc = typeof eventOverlap === "function" ? eventOverlap : null; - for (var otherInstanceId in otherInstances) { - var otherInstance = otherInstances[otherInstanceId]; - if (rangesIntersect(subjectRange, otherInstance.range)) { - var otherOverlap = otherConfigs[otherInstance.defId].overlap; - if (otherOverlap === false && interaction.isEvent) { - return false; - } - if (subjectConfig.overlap === false) { - return false; - } - if (eventOverlapFunc && !eventOverlapFunc(new EventApi(context, otherDefs[otherInstance.defId], otherInstance), new EventApi(context, subjectDef, subjectInstance))) { - return false; - } - } + } else { + for (var i3 = 0; i3 < rowCnt; i3 += 1) { + byRow[i3] = { + affectedInstances: ui.affectedInstances, + isEvent: ui.isEvent, + segs: [] + }; } - var calendarEventStore = currentState.eventStore; - for (var _i = 0, _a = subjectConfig.allows; _i < _a.length; _i++) { - var subjectAllow = _a[_i]; - var subjectDateSpan = __assign(__assign({}, dateSpanMeta), { range: subjectInstance.range, allDay: subjectDef.allDay }); - var origDef = calendarEventStore.defs[subjectDef.defId]; - var origInstance = calendarEventStore.instances[subjectInstanceId]; - var eventApi = void 0; - if (origDef) { - eventApi = new EventApi(context, origDef, origInstance); - } else { - eventApi = new EventApi(context, subjectDef); - } - if (!subjectAllow(buildDateSpanApiWithContext(subjectDateSpan, context), eventApi)) { - return false; - } + for (var _i = 0, _a = ui.segs; _i < _a.length; _i++) { + var seg = _a[_i]; + byRow[seg.row].segs.push(seg); } } - return true; + return byRow; } -function isDateSelectionPropsValid(state, context, dateSpanMeta, filterConfig) { - var relevantEventStore = state.eventStore; - var relevantDefs = relevantEventStore.defs; - var relevantInstances = relevantEventStore.instances; - var selection = state.dateSelection; - var selectionRange = selection.range; - var selectionConfig = context.getCurrentData().selectionConfig; - if (filterConfig) { - selectionConfig = filterConfig(selectionConfig); - } - if (!allConstraintsPass(selectionConfig.constraints, selectionRange, relevantEventStore, state.businessHours, context)) { - return false; - } - var selectOverlap = context.options.selectOverlap; - var selectOverlapFunc = typeof selectOverlap === "function" ? selectOverlap : null; - for (var relevantInstanceId in relevantInstances) { - var relevantInstance = relevantInstances[relevantInstanceId]; - if (rangesIntersect(selectionRange, relevantInstance.range)) { - if (selectionConfig.overlap === false) { - return false; - } - if (selectOverlapFunc && !selectOverlapFunc(new EventApi(context, relevantDefs[relevantInstance.defId], relevantInstance), null)) { - return false; - } - } - } - for (var _i = 0, _a = selectionConfig.allows; _i < _a.length; _i++) { - var selectionAllow = _a[_i]; - var fullDateSpan = __assign(__assign({}, dateSpanMeta), selection); - if (!selectionAllow(buildDateSpanApiWithContext(fullDateSpan, context), null)) { - return false; - } +var TableCellTop = function(_super) { + __extends(TableCellTop2, _super); + function TableCellTop2() { + return _super !== null && _super.apply(this, arguments) || this; } - return true; + TableCellTop2.prototype.render = function() { + var props = this.props; + var navLinkAttrs = buildNavLinkAttrs(this.context, props.date); + return createElement(DayCellContent, { date: props.date, dateProfile: props.dateProfile, todayRange: props.todayRange, showDayNumber: props.showDayNumber, extraHookProps: props.extraHookProps, defaultContent: renderTopInner }, function(innerElRef, innerContent) { + return (innerContent || props.forceDayTop) && createElement("div", { className: "fc-daygrid-day-top", ref: innerElRef }, createElement("a", __assign({ id: props.dayNumberId, className: "fc-daygrid-day-number" }, navLinkAttrs), innerContent || createElement(Fragment, null, "\xA0"))); + }); + }; + return TableCellTop2; +}(BaseComponent); +function renderTopInner(props) { + return props.dayNumberText; } -function allConstraintsPass(constraints, subjectRange, otherEventStore, businessHoursUnexpanded, context) { - for (var _i = 0, constraints_1 = constraints; _i < constraints_1.length; _i++) { - var constraint = constraints_1[_i]; - if (!anyRangesContainRange(constraintToRanges(constraint, subjectRange, otherEventStore, businessHoursUnexpanded, context), subjectRange)) { - return false; - } - } - return true; +var DEFAULT_TABLE_EVENT_TIME_FORMAT = createFormatter({ + hour: "numeric", + minute: "2-digit", + omitZeroMinute: true, + meridiem: "narrow" +}); +function hasListItemDisplay(seg) { + var display = seg.eventRange.ui.display; + return display === "list-item" || display === "auto" && !seg.eventRange.def.allDay && seg.firstCol === seg.lastCol && seg.isStart && seg.isEnd; } -function constraintToRanges(constraint, subjectRange, otherEventStore, businessHoursUnexpanded, context) { - if (constraint === "businessHours") { - return eventStoreToRanges(expandRecurring(businessHoursUnexpanded, subjectRange, context)); - } - if (typeof constraint === "string") { - return eventStoreToRanges(filterEventStoreDefs(otherEventStore, function(eventDef) { - return eventDef.groupId === constraint; - })); +var TableBlockEvent = function(_super) { + __extends(TableBlockEvent2, _super); + function TableBlockEvent2() { + return _super !== null && _super.apply(this, arguments) || this; } - if (typeof constraint === "object" && constraint) { - return eventStoreToRanges(expandRecurring(constraint, subjectRange, context)); + TableBlockEvent2.prototype.render = function() { + var props = this.props; + return createElement(StandardEvent, __assign({}, props, { extraClassNames: ["fc-daygrid-event", "fc-daygrid-block-event", "fc-h-event"], defaultTimeFormat: DEFAULT_TABLE_EVENT_TIME_FORMAT, defaultDisplayEventEnd: props.defaultDisplayEventEnd, disableResizing: !props.seg.eventRange.def.allDay })); + }; + return TableBlockEvent2; +}(BaseComponent); +var TableListItemEvent = function(_super) { + __extends(TableListItemEvent2, _super); + function TableListItemEvent2() { + return _super !== null && _super.apply(this, arguments) || this; } - return []; + TableListItemEvent2.prototype.render = function() { + var _a = this, props = _a.props, context = _a.context; + var timeFormat = context.options.eventTimeFormat || DEFAULT_TABLE_EVENT_TIME_FORMAT; + var timeText = buildSegTimeText(props.seg, timeFormat, context, true, props.defaultDisplayEventEnd); + return createElement(EventRoot, { seg: props.seg, timeText, defaultContent: renderInnerContent2, isDragging: props.isDragging, isResizing: false, isDateSelecting: false, isSelected: props.isSelected, isPast: props.isPast, isFuture: props.isFuture, isToday: props.isToday }, function(rootElRef, classNames, innerElRef, innerContent) { + return createElement("a", __assign({ className: ["fc-daygrid-event", "fc-daygrid-dot-event"].concat(classNames).join(" "), ref: rootElRef }, getSegAnchorAttrs(props.seg, context)), innerContent); + }); + }; + return TableListItemEvent2; +}(BaseComponent); +function renderInnerContent2(innerProps) { + return createElement(Fragment, null, createElement("div", { className: "fc-daygrid-event-dot", style: { borderColor: innerProps.borderColor || innerProps.backgroundColor } }), innerProps.timeText && createElement("div", { className: "fc-event-time" }, innerProps.timeText), createElement("div", { className: "fc-event-title" }, innerProps.event.title || createElement(Fragment, null, "\xA0"))); } -function eventStoreToRanges(eventStore) { - var instances = eventStore.instances; - var ranges = []; - for (var instanceId in instances) { - ranges.push(instances[instanceId].range); +var TableCellMoreLink = function(_super) { + __extends(TableCellMoreLink2, _super); + function TableCellMoreLink2() { + var _this = _super !== null && _super.apply(this, arguments) || this; + _this.compileSegs = memoize(compileSegs); + return _this; } - return ranges; -} -function anyRangesContainRange(outerRanges, innerRange) { - for (var _i = 0, outerRanges_1 = outerRanges; _i < outerRanges_1.length; _i++) { - var outerRange = outerRanges_1[_i]; - if (rangeContainsRange(outerRange, innerRange)) { - return true; + TableCellMoreLink2.prototype.render = function() { + var props = this.props; + var _a = this.compileSegs(props.singlePlacements), allSegs = _a.allSegs, invisibleSegs = _a.invisibleSegs; + return createElement(MoreLinkRoot, { dateProfile: props.dateProfile, todayRange: props.todayRange, allDayDate: props.allDayDate, moreCnt: props.moreCnt, allSegs, hiddenSegs: invisibleSegs, alignmentElRef: props.alignmentElRef, alignGridTop: props.alignGridTop, extraDateSpan: props.extraDateSpan, popoverContent: function() { + var isForcedInvisible = (props.eventDrag ? props.eventDrag.affectedInstances : null) || (props.eventResize ? props.eventResize.affectedInstances : null) || {}; + return createElement(Fragment, null, allSegs.map(function(seg) { + var instanceId = seg.eventRange.instance.instanceId; + return createElement("div", { className: "fc-daygrid-event-harness", key: instanceId, style: { + visibility: isForcedInvisible[instanceId] ? "hidden" : "" + } }, hasListItemDisplay(seg) ? createElement(TableListItemEvent, __assign({ seg, isDragging: false, isSelected: instanceId === props.eventSelection, defaultDisplayEventEnd: false }, getSegMeta(seg, props.todayRange))) : createElement(TableBlockEvent, __assign({ seg, isDragging: false, isResizing: false, isDateSelecting: false, isSelected: instanceId === props.eventSelection, defaultDisplayEventEnd: false }, getSegMeta(seg, props.todayRange)))); + })); + } }, function(rootElRef, classNames, innerElRef, innerContent, handleClick, title, isExpanded, popoverId) { + return createElement("a", __assign({ ref: rootElRef, className: ["fc-daygrid-more-link"].concat(classNames).join(" "), title, "aria-expanded": isExpanded, "aria-controls": popoverId }, createAriaClickAttrs(handleClick)), innerContent); + }); + }; + return TableCellMoreLink2; +}(BaseComponent); +function compileSegs(singlePlacements) { + var allSegs = []; + var invisibleSegs = []; + for (var _i = 0, singlePlacements_1 = singlePlacements; _i < singlePlacements_1.length; _i++) { + var placement = singlePlacements_1[_i]; + allSegs.push(placement.seg); + if (!placement.isVisible) { + invisibleSegs.push(placement.seg); } } - return false; + return { allSegs, invisibleSegs }; } -var VISIBLE_HIDDEN_RE = /^(visible|hidden)$/; -var Scroller = function(_super) { - __extends(Scroller2, _super); - function Scroller2() { +var DEFAULT_WEEK_NUM_FORMAT = createFormatter({ week: "narrow" }); +var TableCell = function(_super) { + __extends(TableCell2, _super); + function TableCell2() { var _this = _super !== null && _super.apply(this, arguments) || this; - _this.handleEl = function(el) { - _this.el = el; + _this.rootElRef = createRef(); + _this.state = { + dayNumberId: getUniqueDomId() + }; + _this.handleRootEl = function(el) { + setRef(_this.rootElRef, el); setRef(_this.props.elRef, el); }; return _this; } - Scroller2.prototype.render = function() { - var props = this.props; - var liquid = props.liquid, liquidIsAbsolute = props.liquidIsAbsolute; - var isAbsolute = liquid && liquidIsAbsolute; - var className = ["fc-scroller"]; - if (liquid) { - if (liquidIsAbsolute) { - className.push("fc-scroller-liquid-absolute"); - } else { - className.push("fc-scroller-liquid"); - } - } - return createElement("div", { ref: this.handleEl, className: className.join(" "), style: { - overflowX: props.overflowX, - overflowY: props.overflowY, - left: isAbsolute && -(props.overcomeLeft || 0) || "", - right: isAbsolute && -(props.overcomeRight || 0) || "", - bottom: isAbsolute && -(props.overcomeBottom || 0) || "", - marginLeft: !isAbsolute && -(props.overcomeLeft || 0) || "", - marginRight: !isAbsolute && -(props.overcomeRight || 0) || "", - marginBottom: !isAbsolute && -(props.overcomeBottom || 0) || "", - maxHeight: props.maxHeight || "" - } }, props.children); - }; - Scroller2.prototype.needsXScrolling = function() { - if (VISIBLE_HIDDEN_RE.test(this.props.overflowX)) { - return false; - } - var el = this.el; - var realClientWidth = this.el.getBoundingClientRect().width - this.getYScrollbarWidth(); - var children = el.children; - for (var i3 = 0; i3 < children.length; i3 += 1) { - var childEl = children[i3]; - if (childEl.getBoundingClientRect().width > realClientWidth) { - return true; - } - } - return false; - }; - Scroller2.prototype.needsYScrolling = function() { - if (VISIBLE_HIDDEN_RE.test(this.props.overflowY)) { - return false; - } - var el = this.el; - var realClientHeight = this.el.getBoundingClientRect().height - this.getXScrollbarWidth(); - var children = el.children; - for (var i3 = 0; i3 < children.length; i3 += 1) { - var childEl = children[i3]; - if (childEl.getBoundingClientRect().height > realClientHeight) { - return true; - } - } - return false; - }; - Scroller2.prototype.getXScrollbarWidth = function() { - if (VISIBLE_HIDDEN_RE.test(this.props.overflowX)) { - return 0; - } - return this.el.offsetHeight - this.el.clientHeight; - }; - Scroller2.prototype.getYScrollbarWidth = function() { - if (VISIBLE_HIDDEN_RE.test(this.props.overflowY)) { - return 0; - } - return this.el.offsetWidth - this.el.clientWidth; - }; - return Scroller2; -}(BaseComponent); -var RefMap = function() { - function RefMap2(masterCallback) { - var _this = this; - this.masterCallback = masterCallback; - this.currentMap = {}; - this.depths = {}; - this.callbackMap = {}; - this.handleValue = function(val, key) { - var _a = _this, depths = _a.depths, currentMap = _a.currentMap; - var removed = false; - var added = false; - if (val !== null) { - removed = key in currentMap; - currentMap[key] = val; - depths[key] = (depths[key] || 0) + 1; - added = true; - } else { - depths[key] -= 1; - if (!depths[key]) { - delete currentMap[key]; - delete _this.callbackMap[key]; - removed = true; - } - } - if (_this.masterCallback) { - if (removed) { - _this.masterCallback(null, String(key)); - } - if (added) { - _this.masterCallback(val, String(key)); - } - } - }; - } - RefMap2.prototype.createRef = function(key) { - var _this = this; - var refCallback = this.callbackMap[key]; - if (!refCallback) { - refCallback = this.callbackMap[key] = function(val) { - _this.handleValue(val, String(key)); - }; - } - return refCallback; - }; - RefMap2.prototype.collect = function(startIndex, endIndex, step) { - return collectFromHash(this.currentMap, startIndex, endIndex, step); - }; - RefMap2.prototype.getAll = function() { - return hashValuesToArray(this.currentMap); + TableCell2.prototype.render = function() { + var _a = this, context = _a.context, props = _a.props, state = _a.state, rootElRef = _a.rootElRef; + var date = props.date, dateProfile = props.dateProfile; + var navLinkAttrs = buildNavLinkAttrs(context, date, "week"); + return createElement(DayCellRoot, { date, dateProfile, todayRange: props.todayRange, showDayNumber: props.showDayNumber, extraHookProps: props.extraHookProps, elRef: this.handleRootEl }, function(dayElRef, dayClassNames, rootDataAttrs, isDisabled) { + return createElement("td", __assign({ ref: dayElRef, role: "gridcell", className: ["fc-daygrid-day"].concat(dayClassNames, props.extraClassNames || []).join(" ") }, rootDataAttrs, props.extraDataAttrs, props.showDayNumber ? { "aria-labelledby": state.dayNumberId } : {}), createElement("div", { className: "fc-daygrid-day-frame fc-scrollgrid-sync-inner", ref: props.innerElRef }, props.showWeekNumber && createElement(WeekNumberRoot, { date, defaultFormat: DEFAULT_WEEK_NUM_FORMAT }, function(weekElRef, weekClassNames, innerElRef, innerContent) { + return createElement("a", __assign({ ref: weekElRef, className: ["fc-daygrid-week-number"].concat(weekClassNames).join(" ") }, navLinkAttrs), innerContent); + }), !isDisabled && createElement(TableCellTop, { date, dateProfile, showDayNumber: props.showDayNumber, dayNumberId: state.dayNumberId, forceDayTop: props.forceDayTop, todayRange: props.todayRange, extraHookProps: props.extraHookProps }), createElement("div", { className: "fc-daygrid-day-events", ref: props.fgContentElRef }, props.fgContent, createElement("div", { className: "fc-daygrid-day-bottom", style: { marginTop: props.moreMarginTop } }, createElement(TableCellMoreLink, { allDayDate: date, singlePlacements: props.singlePlacements, moreCnt: props.moreCnt, alignmentElRef: rootElRef, alignGridTop: !props.showDayNumber, extraDateSpan: props.extraDateSpan, dateProfile: props.dateProfile, eventSelection: props.eventSelection, eventDrag: props.eventDrag, eventResize: props.eventResize, todayRange: props.todayRange }))), createElement("div", { className: "fc-daygrid-day-bg" }, props.bgContent))); + }); }; - return RefMap2; -}(); -function computeShrinkWidth(chunkEls) { - var shrinkCells = findElements(chunkEls, ".fc-scrollgrid-shrink"); - var largestWidth = 0; - for (var _i = 0, shrinkCells_1 = shrinkCells; _i < shrinkCells_1.length; _i++) { - var shrinkCell = shrinkCells_1[_i]; - largestWidth = Math.max(largestWidth, computeSmallestCellWidth(shrinkCell)); + return TableCell2; +}(DateComponent); +function computeFgSegPlacement(segs, dayMaxEvents, dayMaxEventRows, strictOrder, eventInstanceHeights, maxContentHeight, cells) { + var hierarchy = new DayGridSegHierarchy(); + hierarchy.allowReslicing = true; + hierarchy.strictOrder = strictOrder; + if (dayMaxEvents === true || dayMaxEventRows === true) { + hierarchy.maxCoord = maxContentHeight; + hierarchy.hiddenConsumes = true; + } else if (typeof dayMaxEvents === "number") { + hierarchy.maxStackCnt = dayMaxEvents; + } else if (typeof dayMaxEventRows === "number") { + hierarchy.maxStackCnt = dayMaxEventRows; + hierarchy.hiddenConsumes = true; } - return Math.ceil(largestWidth); -} -function getSectionHasLiquidHeight(props, sectionConfig) { - return props.liquid && sectionConfig.liquid; -} -function getAllowYScrolling(props, sectionConfig) { - return sectionConfig.maxHeight != null || getSectionHasLiquidHeight(props, sectionConfig); -} -function renderChunkContent(sectionConfig, chunkConfig, arg, isHeader) { - var expandRows = arg.expandRows; - var content = typeof chunkConfig.content === "function" ? chunkConfig.content(arg) : createElement("table", { - role: "presentation", - className: [ - chunkConfig.tableClassName, - sectionConfig.syncRowHeights ? "fc-scrollgrid-sync-table" : "" - ].join(" "), - style: { - minWidth: arg.tableMinWidth, - width: arg.clientWidth, - height: expandRows ? arg.clientHeight : "" + var segInputs = []; + var unknownHeightSegs = []; + for (var i3 = 0; i3 < segs.length; i3 += 1) { + var seg = segs[i3]; + var instanceId = seg.eventRange.instance.instanceId; + var eventHeight = eventInstanceHeights[instanceId]; + if (eventHeight != null) { + segInputs.push({ + index: i3, + thickness: eventHeight, + span: { + start: seg.firstCol, + end: seg.lastCol + 1 + } + }); + } else { + unknownHeightSegs.push(seg); } - }, arg.tableColGroupNode, createElement(isHeader ? "thead" : "tbody", { - role: "presentation" - }, typeof chunkConfig.rowContent === "function" ? chunkConfig.rowContent(arg) : chunkConfig.rowContent)); - return content; -} -function isColPropsEqual(cols0, cols1) { - return isArraysEqual(cols0, cols1, isPropsEqual); -} -function renderMicroColGroup(cols, shrinkWidth) { - var colNodes = []; - for (var _i = 0, cols_1 = cols; _i < cols_1.length; _i++) { - var colProps = cols_1[_i]; - var span = colProps.span || 1; - for (var i3 = 0; i3 < span; i3 += 1) { - colNodes.push(createElement("col", { style: { - width: colProps.width === "shrink" ? sanitizeShrinkWidth(shrinkWidth) : colProps.width || "", - minWidth: colProps.minWidth || "" - } })); + } + var hiddenEntries = hierarchy.addSegs(segInputs); + var segRects = hierarchy.toRects(); + var _a = placeRects(segRects, segs, cells), singleColPlacements = _a.singleColPlacements, multiColPlacements = _a.multiColPlacements, leftoverMargins = _a.leftoverMargins; + var moreCnts = []; + var moreMarginTops = []; + for (var _i = 0, unknownHeightSegs_1 = unknownHeightSegs; _i < unknownHeightSegs_1.length; _i++) { + var seg = unknownHeightSegs_1[_i]; + multiColPlacements[seg.firstCol].push({ + seg, + isVisible: false, + isAbsolute: true, + absoluteTop: 0, + marginTop: 0 + }); + for (var col = seg.firstCol; col <= seg.lastCol; col += 1) { + singleColPlacements[col].push({ + seg: resliceSeg(seg, col, col + 1, cells), + isVisible: false, + isAbsolute: false, + absoluteTop: 0, + marginTop: 0 + }); } } - return createElement.apply(void 0, __spreadArray(["colgroup", {}], colNodes)); -} -function sanitizeShrinkWidth(shrinkWidth) { - return shrinkWidth == null ? 4 : shrinkWidth; -} -function hasShrinkWidth(cols) { - for (var _i = 0, cols_2 = cols; _i < cols_2.length; _i++) { - var col = cols_2[_i]; - if (col.width === "shrink") { - return true; + for (var col = 0; col < cells.length; col += 1) { + moreCnts.push(0); + } + for (var _b = 0, hiddenEntries_1 = hiddenEntries; _b < hiddenEntries_1.length; _b++) { + var hiddenEntry = hiddenEntries_1[_b]; + var seg = segs[hiddenEntry.index]; + var hiddenSpan = hiddenEntry.span; + multiColPlacements[hiddenSpan.start].push({ + seg: resliceSeg(seg, hiddenSpan.start, hiddenSpan.end, cells), + isVisible: false, + isAbsolute: true, + absoluteTop: 0, + marginTop: 0 + }); + for (var col = hiddenSpan.start; col < hiddenSpan.end; col += 1) { + moreCnts[col] += 1; + singleColPlacements[col].push({ + seg: resliceSeg(seg, col, col + 1, cells), + isVisible: false, + isAbsolute: false, + absoluteTop: 0, + marginTop: 0 + }); } } - return false; + for (var col = 0; col < cells.length; col += 1) { + moreMarginTops.push(leftoverMargins[col]); + } + return { singleColPlacements, multiColPlacements, moreCnts, moreMarginTops }; } -function getScrollGridClassNames(liquid, context) { - var classNames = [ - "fc-scrollgrid", - context.theme.getClass("table") - ]; - if (liquid) { - classNames.push("fc-scrollgrid-liquid"); +function placeRects(allRects, segs, cells) { + var rectsByEachCol = groupRectsByEachCol(allRects, cells.length); + var singleColPlacements = []; + var multiColPlacements = []; + var leftoverMargins = []; + for (var col = 0; col < cells.length; col += 1) { + var rects = rectsByEachCol[col]; + var singlePlacements = []; + var currentHeight = 0; + var currentMarginTop = 0; + for (var _i = 0, rects_1 = rects; _i < rects_1.length; _i++) { + var rect = rects_1[_i]; + var seg = segs[rect.index]; + singlePlacements.push({ + seg: resliceSeg(seg, col, col + 1, cells), + isVisible: true, + isAbsolute: false, + absoluteTop: rect.levelCoord, + marginTop: rect.levelCoord - currentHeight + }); + currentHeight = rect.levelCoord + rect.thickness; + } + var multiPlacements = []; + currentHeight = 0; + currentMarginTop = 0; + for (var _a = 0, rects_2 = rects; _a < rects_2.length; _a++) { + var rect = rects_2[_a]; + var seg = segs[rect.index]; + var isAbsolute = rect.span.end - rect.span.start > 1; + var isFirstCol = rect.span.start === col; + currentMarginTop += rect.levelCoord - currentHeight; + currentHeight = rect.levelCoord + rect.thickness; + if (isAbsolute) { + currentMarginTop += rect.thickness; + if (isFirstCol) { + multiPlacements.push({ + seg: resliceSeg(seg, rect.span.start, rect.span.end, cells), + isVisible: true, + isAbsolute: true, + absoluteTop: rect.levelCoord, + marginTop: 0 + }); + } + } else if (isFirstCol) { + multiPlacements.push({ + seg: resliceSeg(seg, rect.span.start, rect.span.end, cells), + isVisible: true, + isAbsolute: false, + absoluteTop: rect.levelCoord, + marginTop: currentMarginTop + }); + currentMarginTop = 0; + } + } + singleColPlacements.push(singlePlacements); + multiColPlacements.push(multiPlacements); + leftoverMargins.push(currentMarginTop); } - return classNames; + return { singleColPlacements, multiColPlacements, leftoverMargins }; } -function getSectionClassNames(sectionConfig, wholeTableVGrow) { - var classNames = [ - "fc-scrollgrid-section", - "fc-scrollgrid-section-" + sectionConfig.type, - sectionConfig.className - ]; - if (wholeTableVGrow && sectionConfig.liquid && sectionConfig.maxHeight == null) { - classNames.push("fc-scrollgrid-section-liquid"); +function groupRectsByEachCol(rects, colCnt) { + var rectsByEachCol = []; + for (var col = 0; col < colCnt; col += 1) { + rectsByEachCol.push([]); } - if (sectionConfig.isSticky) { - classNames.push("fc-scrollgrid-section-sticky"); + for (var _i = 0, rects_3 = rects; _i < rects_3.length; _i++) { + var rect = rects_3[_i]; + for (var col = rect.span.start; col < rect.span.end; col += 1) { + rectsByEachCol[col].push(rect); + } } - return classNames; -} -function renderScrollShim(arg) { - return createElement("div", { className: "fc-scrollgrid-sticky-shim", style: { - width: arg.clientWidth, - minWidth: arg.tableMinWidth - } }); + return rectsByEachCol; } -function getStickyHeaderDates(options) { - var stickyHeaderDates = options.stickyHeaderDates; - if (stickyHeaderDates == null || stickyHeaderDates === "auto") { - stickyHeaderDates = options.height === "auto" || options.viewHeight === "auto"; +function resliceSeg(seg, spanStart, spanEnd, cells) { + if (seg.firstCol === spanStart && seg.lastCol === spanEnd - 1) { + return seg; } - return stickyHeaderDates; + var eventRange = seg.eventRange; + var origRange = eventRange.range; + var slicedRange = intersectRanges(origRange, { + start: cells[spanStart].date, + end: addDays(cells[spanEnd - 1].date, 1) + }); + return __assign(__assign({}, seg), { firstCol: spanStart, lastCol: spanEnd - 1, eventRange: { + def: eventRange.def, + ui: __assign(__assign({}, eventRange.ui), { durationEditable: false }), + instance: eventRange.instance, + range: slicedRange + }, isStart: seg.isStart && slicedRange.start.valueOf() === origRange.start.valueOf(), isEnd: seg.isEnd && slicedRange.end.valueOf() === origRange.end.valueOf() }); } -function getStickyFooterScrollbar(options) { - var stickyFooterScrollbar = options.stickyFooterScrollbar; - if (stickyFooterScrollbar == null || stickyFooterScrollbar === "auto") { - stickyFooterScrollbar = options.height === "auto" || options.viewHeight === "auto"; +var DayGridSegHierarchy = function(_super) { + __extends(DayGridSegHierarchy2, _super); + function DayGridSegHierarchy2() { + var _this = _super !== null && _super.apply(this, arguments) || this; + _this.hiddenConsumes = false; + _this.forceHidden = {}; + return _this; } - return stickyFooterScrollbar; -} -var SimpleScrollGrid = function(_super) { - __extends(SimpleScrollGrid2, _super); - function SimpleScrollGrid2() { + DayGridSegHierarchy2.prototype.addSegs = function(segInputs) { + var _this = this; + var hiddenSegs = _super.prototype.addSegs.call(this, segInputs); + var entriesByLevel = this.entriesByLevel; + var excludeHidden = function(entry) { + return !_this.forceHidden[buildEntryKey(entry)]; + }; + for (var level = 0; level < entriesByLevel.length; level += 1) { + entriesByLevel[level] = entriesByLevel[level].filter(excludeHidden); + } + return hiddenSegs; + }; + DayGridSegHierarchy2.prototype.handleInvalidInsertion = function(insertion, entry, hiddenEntries) { + var _a = this, entriesByLevel = _a.entriesByLevel, forceHidden = _a.forceHidden; + var touchingEntry = insertion.touchingEntry, touchingLevel = insertion.touchingLevel, touchingLateral = insertion.touchingLateral; + if (this.hiddenConsumes && touchingEntry) { + var touchingEntryId = buildEntryKey(touchingEntry); + if (!forceHidden[touchingEntryId]) { + if (this.allowReslicing) { + var placeholderEntry = __assign(__assign({}, touchingEntry), { span: intersectSpans(touchingEntry.span, entry.span) }); + var placeholderEntryId = buildEntryKey(placeholderEntry); + forceHidden[placeholderEntryId] = true; + entriesByLevel[touchingLevel][touchingLateral] = placeholderEntry; + this.splitEntry(touchingEntry, entry, hiddenEntries); + } else { + forceHidden[touchingEntryId] = true; + hiddenEntries.push(touchingEntry); + } + } + } + return _super.prototype.handleInvalidInsertion.call(this, insertion, entry, hiddenEntries); + }; + return DayGridSegHierarchy2; +}(SegHierarchy); +var TableRow = function(_super) { + __extends(TableRow2, _super); + function TableRow2() { var _this = _super !== null && _super.apply(this, arguments) || this; - _this.processCols = memoize(function(a3) { - return a3; - }, isColPropsEqual); - _this.renderMicroColGroup = memoize(renderMicroColGroup); - _this.scrollerRefs = new RefMap(); - _this.scrollerElRefs = new RefMap(_this._handleScrollerEl.bind(_this)); + _this.cellElRefs = new RefMap(); + _this.frameElRefs = new RefMap(); + _this.fgElRefs = new RefMap(); + _this.segHarnessRefs = new RefMap(); + _this.rootElRef = createRef(); _this.state = { - shrinkWidth: null, - forceYScrollbars: false, - scrollerClientWidths: {}, - scrollerClientHeights: {} - }; - _this.handleSizing = function() { - _this.safeSetState(__assign({ shrinkWidth: _this.computeShrinkWidth() }, _this.computeScrollerDims())); + framePositions: null, + maxContentHeight: null, + eventInstanceHeights: {} }; return _this; } - SimpleScrollGrid2.prototype.render = function() { + TableRow2.prototype.render = function() { + var _this = this; var _a = this, props = _a.props, state = _a.state, context = _a.context; - var sectionConfigs = props.sections || []; - var cols = this.processCols(props.cols); - var microColGroupNode = this.renderMicroColGroup(cols, state.shrinkWidth); - var classNames = getScrollGridClassNames(props.liquid, context); - if (props.collapsibleWidth) { - classNames.push("fc-scrollgrid-collapsible"); - } - var configCnt = sectionConfigs.length; - var configI = 0; - var currentConfig; - var headSectionNodes = []; - var bodySectionNodes = []; - var footSectionNodes = []; - while (configI < configCnt && (currentConfig = sectionConfigs[configI]).type === "header") { - headSectionNodes.push(this.renderSection(currentConfig, microColGroupNode, true)); - configI += 1; - } - while (configI < configCnt && (currentConfig = sectionConfigs[configI]).type === "body") { - bodySectionNodes.push(this.renderSection(currentConfig, microColGroupNode, false)); - configI += 1; + var options = context.options; + var colCnt = props.cells.length; + var businessHoursByCol = splitSegsByFirstCol(props.businessHourSegs, colCnt); + var bgEventSegsByCol = splitSegsByFirstCol(props.bgEventSegs, colCnt); + var highlightSegsByCol = splitSegsByFirstCol(this.getHighlightSegs(), colCnt); + var mirrorSegsByCol = splitSegsByFirstCol(this.getMirrorSegs(), colCnt); + var _b = computeFgSegPlacement(sortEventSegs(props.fgEventSegs, options.eventOrder), props.dayMaxEvents, props.dayMaxEventRows, options.eventOrderStrict, state.eventInstanceHeights, state.maxContentHeight, props.cells), singleColPlacements = _b.singleColPlacements, multiColPlacements = _b.multiColPlacements, moreCnts = _b.moreCnts, moreMarginTops = _b.moreMarginTops; + var isForcedInvisible = props.eventDrag && props.eventDrag.affectedInstances || props.eventResize && props.eventResize.affectedInstances || {}; + return createElement("tr", { ref: this.rootElRef, role: "row" }, props.renderIntro && props.renderIntro(), props.cells.map(function(cell, col) { + var normalFgNodes = _this.renderFgSegs(col, props.forPrint ? singleColPlacements[col] : multiColPlacements[col], props.todayRange, isForcedInvisible); + var mirrorFgNodes = _this.renderFgSegs(col, buildMirrorPlacements(mirrorSegsByCol[col], multiColPlacements), props.todayRange, {}, Boolean(props.eventDrag), Boolean(props.eventResize), false); + return createElement(TableCell, { key: cell.key, elRef: _this.cellElRefs.createRef(cell.key), innerElRef: _this.frameElRefs.createRef(cell.key), dateProfile: props.dateProfile, date: cell.date, showDayNumber: props.showDayNumbers, showWeekNumber: props.showWeekNumbers && col === 0, forceDayTop: props.showWeekNumbers, todayRange: props.todayRange, eventSelection: props.eventSelection, eventDrag: props.eventDrag, eventResize: props.eventResize, extraHookProps: cell.extraHookProps, extraDataAttrs: cell.extraDataAttrs, extraClassNames: cell.extraClassNames, extraDateSpan: cell.extraDateSpan, moreCnt: moreCnts[col], moreMarginTop: moreMarginTops[col], singlePlacements: singleColPlacements[col], fgContentElRef: _this.fgElRefs.createRef(cell.key), fgContent: createElement(Fragment, null, createElement(Fragment, null, normalFgNodes), createElement(Fragment, null, mirrorFgNodes)), bgContent: createElement(Fragment, null, _this.renderFillSegs(highlightSegsByCol[col], "highlight"), _this.renderFillSegs(businessHoursByCol[col], "non-business"), _this.renderFillSegs(bgEventSegsByCol[col], "bg-event")) }); + })); + }; + TableRow2.prototype.componentDidMount = function() { + this.updateSizing(true); + }; + TableRow2.prototype.componentDidUpdate = function(prevProps, prevState) { + var currentProps = this.props; + this.updateSizing(!isPropsEqual(prevProps, currentProps)); + }; + TableRow2.prototype.getHighlightSegs = function() { + var props = this.props; + if (props.eventDrag && props.eventDrag.segs.length) { + return props.eventDrag.segs; } - while (configI < configCnt && (currentConfig = sectionConfigs[configI]).type === "footer") { - footSectionNodes.push(this.renderSection(currentConfig, microColGroupNode, true)); - configI += 1; + if (props.eventResize && props.eventResize.segs.length) { + return props.eventResize.segs; } - var isBuggy = !getCanVGrowWithinCell(); - var roleAttrs = { role: "rowgroup" }; - return createElement("table", { - role: "grid", - className: classNames.join(" "), - style: { height: props.height } - }, Boolean(!isBuggy && headSectionNodes.length) && createElement.apply(void 0, __spreadArray(["thead", roleAttrs], headSectionNodes)), Boolean(!isBuggy && bodySectionNodes.length) && createElement.apply(void 0, __spreadArray(["tbody", roleAttrs], bodySectionNodes)), Boolean(!isBuggy && footSectionNodes.length) && createElement.apply(void 0, __spreadArray(["tfoot", roleAttrs], footSectionNodes)), isBuggy && createElement.apply(void 0, __spreadArray(__spreadArray(__spreadArray(["tbody", roleAttrs], headSectionNodes), bodySectionNodes), footSectionNodes))); + return props.dateSelectionSegs; }; - SimpleScrollGrid2.prototype.renderSection = function(sectionConfig, microColGroupNode, isHeader) { - if ("outerContent" in sectionConfig) { - return createElement(Fragment, { key: sectionConfig.key }, sectionConfig.outerContent); + TableRow2.prototype.getMirrorSegs = function() { + var props = this.props; + if (props.eventResize && props.eventResize.segs.length) { + return props.eventResize.segs; } - return createElement("tr", { key: sectionConfig.key, role: "presentation", className: getSectionClassNames(sectionConfig, this.props.liquid).join(" ") }, this.renderChunkTd(sectionConfig, microColGroupNode, sectionConfig.chunk, isHeader)); + return []; }; - SimpleScrollGrid2.prototype.renderChunkTd = function(sectionConfig, microColGroupNode, chunkConfig, isHeader) { - if ("outerContent" in chunkConfig) { - return chunkConfig.outerContent; - } - var props = this.props; - var _a = this.state, forceYScrollbars = _a.forceYScrollbars, scrollerClientWidths = _a.scrollerClientWidths, scrollerClientHeights = _a.scrollerClientHeights; - var needsYScrolling = getAllowYScrolling(props, sectionConfig); - var isLiquid = getSectionHasLiquidHeight(props, sectionConfig); - var overflowY = !props.liquid ? "visible" : forceYScrollbars ? "scroll" : !needsYScrolling ? "hidden" : "auto"; - var sectionKey = sectionConfig.key; - var content = renderChunkContent(sectionConfig, chunkConfig, { - tableColGroupNode: microColGroupNode, - tableMinWidth: "", - clientWidth: !props.collapsibleWidth && scrollerClientWidths[sectionKey] !== void 0 ? scrollerClientWidths[sectionKey] : null, - clientHeight: scrollerClientHeights[sectionKey] !== void 0 ? scrollerClientHeights[sectionKey] : null, - expandRows: sectionConfig.expandRows, - syncRowHeights: false, - rowSyncHeights: [], - reportRowHeightChange: function() { + TableRow2.prototype.renderFgSegs = function(col, segPlacements, todayRange, isForcedInvisible, isDragging, isResizing, isDateSelecting) { + var context = this.context; + var eventSelection = this.props.eventSelection; + var framePositions = this.state.framePositions; + var defaultDisplayEventEnd = this.props.cells.length === 1; + var isMirror = isDragging || isResizing || isDateSelecting; + var nodes = []; + if (framePositions) { + for (var _i = 0, segPlacements_1 = segPlacements; _i < segPlacements_1.length; _i++) { + var placement = segPlacements_1[_i]; + var seg = placement.seg; + var instanceId = seg.eventRange.instance.instanceId; + var key = instanceId + ":" + col; + var isVisible = placement.isVisible && !isForcedInvisible[instanceId]; + var isAbsolute = placement.isAbsolute; + var left = ""; + var right = ""; + if (isAbsolute) { + if (context.isRtl) { + right = 0; + left = framePositions.lefts[seg.lastCol] - framePositions.lefts[seg.firstCol]; + } else { + left = 0; + right = framePositions.rights[seg.firstCol] - framePositions.rights[seg.lastCol]; + } + } + nodes.push(createElement("div", { className: "fc-daygrid-event-harness" + (isAbsolute ? " fc-daygrid-event-harness-abs" : ""), key, ref: isMirror ? null : this.segHarnessRefs.createRef(key), style: { + visibility: isVisible ? "" : "hidden", + marginTop: isAbsolute ? "" : placement.marginTop, + top: isAbsolute ? placement.absoluteTop : "", + left, + right + } }, hasListItemDisplay(seg) ? createElement(TableListItemEvent, __assign({ seg, isDragging, isSelected: instanceId === eventSelection, defaultDisplayEventEnd }, getSegMeta(seg, todayRange))) : createElement(TableBlockEvent, __assign({ seg, isDragging, isResizing, isDateSelecting, isSelected: instanceId === eventSelection, defaultDisplayEventEnd }, getSegMeta(seg, todayRange))))); } - }, isHeader); - return createElement(isHeader ? "th" : "td", { - ref: chunkConfig.elRef, - role: "presentation" - }, createElement("div", { className: "fc-scroller-harness" + (isLiquid ? " fc-scroller-harness-liquid" : "") }, createElement(Scroller, { ref: this.scrollerRefs.createRef(sectionKey), elRef: this.scrollerElRefs.createRef(sectionKey), overflowY, overflowX: !props.liquid ? "visible" : "hidden", maxHeight: sectionConfig.maxHeight, liquid: isLiquid, liquidIsAbsolute: true }, content))); - }; - SimpleScrollGrid2.prototype._handleScrollerEl = function(scrollerEl, key) { - var section = getSectionByKey(this.props.sections, key); - if (section) { - setRef(section.chunk.scrollerElRef, scrollerEl); } + return nodes; }; - SimpleScrollGrid2.prototype.componentDidMount = function() { - this.handleSizing(); - this.context.addResizeHandler(this.handleSizing); - }; - SimpleScrollGrid2.prototype.componentDidUpdate = function() { - this.handleSizing(); - }; - SimpleScrollGrid2.prototype.componentWillUnmount = function() { - this.context.removeResizeHandler(this.handleSizing); - }; - SimpleScrollGrid2.prototype.computeShrinkWidth = function() { - return hasShrinkWidth(this.props.cols) ? computeShrinkWidth(this.scrollerElRefs.getAll()) : 0; - }; - SimpleScrollGrid2.prototype.computeScrollerDims = function() { - var scrollbarWidth = getScrollbarWidths(); - var _a = this, scrollerRefs = _a.scrollerRefs, scrollerElRefs = _a.scrollerElRefs; - var forceYScrollbars = false; - var scrollerClientWidths = {}; - var scrollerClientHeights = {}; - for (var sectionKey in scrollerRefs.currentMap) { - var scroller = scrollerRefs.currentMap[sectionKey]; - if (scroller && scroller.needsYScrolling()) { - forceYScrollbars = true; - break; + TableRow2.prototype.renderFillSegs = function(segs, fillType) { + var isRtl = this.context.isRtl; + var todayRange = this.props.todayRange; + var framePositions = this.state.framePositions; + var nodes = []; + if (framePositions) { + for (var _i = 0, segs_1 = segs; _i < segs_1.length; _i++) { + var seg = segs_1[_i]; + var leftRightCss = isRtl ? { + right: 0, + left: framePositions.lefts[seg.lastCol] - framePositions.lefts[seg.firstCol] + } : { + left: 0, + right: framePositions.rights[seg.firstCol] - framePositions.rights[seg.lastCol] + }; + nodes.push(createElement("div", { key: buildEventRangeKey(seg.eventRange), className: "fc-daygrid-bg-harness", style: leftRightCss }, fillType === "bg-event" ? createElement(BgEvent, __assign({ seg }, getSegMeta(seg, todayRange))) : renderFill(fillType))); } } - for (var _i = 0, _b = this.props.sections; _i < _b.length; _i++) { - var section = _b[_i]; - var sectionKey = section.key; - var scrollerEl = scrollerElRefs.currentMap[sectionKey]; - if (scrollerEl) { - var harnessEl = scrollerEl.parentNode; - scrollerClientWidths[sectionKey] = Math.floor(harnessEl.getBoundingClientRect().width - (forceYScrollbars ? scrollbarWidth.y : 0)); - scrollerClientHeights[sectionKey] = Math.floor(harnessEl.getBoundingClientRect().height); + return createElement.apply(void 0, __spreadArray([Fragment, {}], nodes)); + }; + TableRow2.prototype.updateSizing = function(isExternalSizingChange) { + var _a = this, props = _a.props, frameElRefs = _a.frameElRefs; + if (!props.forPrint && props.clientWidth !== null) { + if (isExternalSizingChange) { + var frameEls = props.cells.map(function(cell) { + return frameElRefs.currentMap[cell.key]; + }); + if (frameEls.length) { + var originEl = this.rootElRef.current; + this.setState({ + framePositions: new PositionCache(originEl, frameEls, true, false) + }); + } } + var oldInstanceHeights = this.state.eventInstanceHeights; + var newInstanceHeights = this.queryEventInstanceHeights(); + var limitByContentHeight = props.dayMaxEvents === true || props.dayMaxEventRows === true; + this.safeSetState({ + eventInstanceHeights: __assign(__assign({}, oldInstanceHeights), newInstanceHeights), + maxContentHeight: limitByContentHeight ? this.computeMaxContentHeight() : null + }); } - return { forceYScrollbars, scrollerClientWidths, scrollerClientHeights }; }; - return SimpleScrollGrid2; -}(BaseComponent); -SimpleScrollGrid.addStateEquality({ - scrollerClientWidths: isPropsEqual, - scrollerClientHeights: isPropsEqual + TableRow2.prototype.queryEventInstanceHeights = function() { + var segElMap = this.segHarnessRefs.currentMap; + var eventInstanceHeights = {}; + for (var key in segElMap) { + var height = Math.round(segElMap[key].getBoundingClientRect().height); + var instanceId = key.split(":")[0]; + eventInstanceHeights[instanceId] = Math.max(eventInstanceHeights[instanceId] || 0, height); + } + return eventInstanceHeights; + }; + TableRow2.prototype.computeMaxContentHeight = function() { + var firstKey = this.props.cells[0].key; + var cellEl = this.cellElRefs.currentMap[firstKey]; + var fcContainerEl = this.fgElRefs.currentMap[firstKey]; + return cellEl.getBoundingClientRect().bottom - fcContainerEl.getBoundingClientRect().top; + }; + TableRow2.prototype.getCellEls = function() { + var elMap = this.cellElRefs.currentMap; + return this.props.cells.map(function(cell) { + return elMap[cell.key]; + }); + }; + return TableRow2; +}(DateComponent); +TableRow.addStateEquality({ + eventInstanceHeights: isPropsEqual }); -function getSectionByKey(sections, key) { - for (var _i = 0, sections_1 = sections; _i < sections_1.length; _i++) { - var section = sections_1[_i]; - if (section.key === key) { - return section; +function buildMirrorPlacements(mirrorSegs, colPlacements) { + if (!mirrorSegs.length) { + return []; + } + var topsByInstanceId = buildAbsoluteTopHash(colPlacements); + return mirrorSegs.map(function(seg) { + return { + seg, + isVisible: true, + isAbsolute: true, + absoluteTop: topsByInstanceId[seg.eventRange.instance.instanceId], + marginTop: 0 + }; + }); +} +function buildAbsoluteTopHash(colPlacements) { + var topsByInstanceId = {}; + for (var _i = 0, colPlacements_1 = colPlacements; _i < colPlacements_1.length; _i++) { + var placements = colPlacements_1[_i]; + for (var _a = 0, placements_1 = placements; _a < placements_1.length; _a++) { + var placement = placements_1[_a]; + topsByInstanceId[placement.seg.eventRange.instance.instanceId] = placement.absoluteTop; } } - return null; + return topsByInstanceId; } -var EventRoot = function(_super) { - __extends(EventRoot2, _super); - function EventRoot2() { +var Table = function(_super) { + __extends(Table2, _super); + function Table2() { var _this = _super !== null && _super.apply(this, arguments) || this; - _this.elRef = createRef(); + _this.splitBusinessHourSegs = memoize(splitSegsByRow); + _this.splitBgEventSegs = memoize(splitSegsByRow); + _this.splitFgEventSegs = memoize(splitSegsByRow); + _this.splitDateSelectionSegs = memoize(splitSegsByRow); + _this.splitEventDrag = memoize(splitInteractionByRow); + _this.splitEventResize = memoize(splitInteractionByRow); + _this.rowRefs = new RefMap(); + _this.handleRootEl = function(rootEl) { + _this.rootEl = rootEl; + if (rootEl) { + _this.context.registerInteractiveComponent(_this, { + el: rootEl, + isHitComboAllowed: _this.props.isHitComboAllowed + }); + } else { + _this.context.unregisterInteractiveComponent(_this); + } + }; return _this; } - EventRoot2.prototype.render = function() { - var _a = this, props = _a.props, context = _a.context; - var options = context.options; - var seg = props.seg; - var eventRange = seg.eventRange; - var ui = eventRange.ui; - var hookProps = { - event: new EventApi(context, eventRange.def, eventRange.instance), - view: context.viewApi, - timeText: props.timeText, - textColor: ui.textColor, - backgroundColor: ui.backgroundColor, - borderColor: ui.borderColor, - isDraggable: !props.disableDragging && computeSegDraggable(seg, context), - isStartResizable: !props.disableResizing && computeSegStartResizable(seg, context), - isEndResizable: !props.disableResizing && computeSegEndResizable(seg), - isMirror: Boolean(props.isDragging || props.isResizing || props.isDateSelecting), - isStart: Boolean(seg.isStart), - isEnd: Boolean(seg.isEnd), - isPast: Boolean(props.isPast), - isFuture: Boolean(props.isFuture), - isToday: Boolean(props.isToday), - isSelected: Boolean(props.isSelected), - isDragging: Boolean(props.isDragging), - isResizing: Boolean(props.isResizing) - }; - var standardClassNames = getEventClassNames(hookProps).concat(ui.classNames); - return createElement(RenderHook, { hookProps, classNames: options.eventClassNames, content: options.eventContent, defaultContent: props.defaultContent, didMount: options.eventDidMount, willUnmount: options.eventWillUnmount, elRef: this.elRef }, function(rootElRef, customClassNames, innerElRef, innerContent) { - return props.children(rootElRef, standardClassNames.concat(customClassNames), innerElRef, innerContent, hookProps); - }); + Table2.prototype.render = function() { + var _this = this; + var props = this.props; + var dateProfile = props.dateProfile, dayMaxEventRows = props.dayMaxEventRows, dayMaxEvents = props.dayMaxEvents, expandRows = props.expandRows; + var rowCnt = props.cells.length; + var businessHourSegsByRow = this.splitBusinessHourSegs(props.businessHourSegs, rowCnt); + var bgEventSegsByRow = this.splitBgEventSegs(props.bgEventSegs, rowCnt); + var fgEventSegsByRow = this.splitFgEventSegs(props.fgEventSegs, rowCnt); + var dateSelectionSegsByRow = this.splitDateSelectionSegs(props.dateSelectionSegs, rowCnt); + var eventDragByRow = this.splitEventDrag(props.eventDrag, rowCnt); + var eventResizeByRow = this.splitEventResize(props.eventResize, rowCnt); + var limitViaBalanced = dayMaxEvents === true || dayMaxEventRows === true; + if (limitViaBalanced && !expandRows) { + limitViaBalanced = false; + dayMaxEventRows = null; + dayMaxEvents = null; + } + var classNames = [ + "fc-daygrid-body", + limitViaBalanced ? "fc-daygrid-body-balanced" : "fc-daygrid-body-unbalanced", + expandRows ? "" : "fc-daygrid-body-natural" + ]; + return createElement("div", { className: classNames.join(" "), ref: this.handleRootEl, style: { + width: props.clientWidth, + minWidth: props.tableMinWidth + } }, createElement(NowTimer, { unit: "day" }, function(nowDate, todayRange) { + return createElement(Fragment, null, createElement("table", { role: "presentation", className: "fc-scrollgrid-sync-table", style: { + width: props.clientWidth, + minWidth: props.tableMinWidth, + height: expandRows ? props.clientHeight : "" + } }, props.colGroupNode, createElement("tbody", { role: "presentation" }, props.cells.map(function(cells, row) { + return createElement(TableRow, { + ref: _this.rowRefs.createRef(row), + key: cells.length ? cells[0].date.toISOString() : row, + showDayNumbers: rowCnt > 1, + showWeekNumbers: props.showWeekNumbers, + todayRange, + dateProfile, + cells, + renderIntro: props.renderRowIntro, + businessHourSegs: businessHourSegsByRow[row], + eventSelection: props.eventSelection, + bgEventSegs: bgEventSegsByRow[row].filter(isSegAllDay), + fgEventSegs: fgEventSegsByRow[row], + dateSelectionSegs: dateSelectionSegsByRow[row], + eventDrag: eventDragByRow[row], + eventResize: eventResizeByRow[row], + dayMaxEvents, + dayMaxEventRows, + clientWidth: props.clientWidth, + clientHeight: props.clientHeight, + forPrint: props.forPrint + }); + })))); + })); }; - EventRoot2.prototype.componentDidMount = function() { - setElSeg(this.elRef.current, this.props.seg); + Table2.prototype.prepareHits = function() { + this.rowPositions = new PositionCache(this.rootEl, this.rowRefs.collect().map(function(rowObj) { + return rowObj.getCellEls()[0]; + }), false, true); + this.colPositions = new PositionCache(this.rootEl, this.rowRefs.currentMap[0].getCellEls(), true, false); }; - EventRoot2.prototype.componentDidUpdate = function(prevProps) { - var seg = this.props.seg; - if (seg !== prevProps.seg) { - setElSeg(this.elRef.current, seg); + Table2.prototype.queryHit = function(positionLeft, positionTop) { + var _a = this, colPositions = _a.colPositions, rowPositions = _a.rowPositions; + var col = colPositions.leftToIndex(positionLeft); + var row = rowPositions.topToIndex(positionTop); + if (row != null && col != null) { + var cell = this.props.cells[row][col]; + return { + dateProfile: this.props.dateProfile, + dateSpan: __assign({ range: this.getCellRange(row, col), allDay: true }, cell.extraDateSpan), + dayEl: this.getCellEl(row, col), + rect: { + left: colPositions.lefts[col], + right: colPositions.rights[col], + top: rowPositions.tops[row], + bottom: rowPositions.bottoms[row] + }, + layer: 0 + }; } + return null; }; - return EventRoot2; -}(BaseComponent); -var StandardEvent = function(_super) { - __extends(StandardEvent2, _super); - function StandardEvent2() { - return _super !== null && _super.apply(this, arguments) || this; - } - StandardEvent2.prototype.render = function() { - var _a = this, props = _a.props, context = _a.context; - var seg = props.seg; - var timeFormat = context.options.eventTimeFormat || props.defaultTimeFormat; - var timeText = buildSegTimeText(seg, timeFormat, context, props.defaultDisplayEventTime, props.defaultDisplayEventEnd); - return createElement(EventRoot, { seg, timeText, disableDragging: props.disableDragging, disableResizing: props.disableResizing, defaultContent: props.defaultContent || renderInnerContent$1, isDragging: props.isDragging, isResizing: props.isResizing, isDateSelecting: props.isDateSelecting, isSelected: props.isSelected, isPast: props.isPast, isFuture: props.isFuture, isToday: props.isToday }, function(rootElRef, classNames, innerElRef, innerContent, hookProps) { - return createElement("a", __assign({ className: props.extraClassNames.concat(classNames).join(" "), style: { - borderColor: hookProps.borderColor, - backgroundColor: hookProps.backgroundColor - }, ref: rootElRef }, getSegAnchorAttrs(seg, context)), createElement("div", { className: "fc-event-main", ref: innerElRef, style: { color: hookProps.textColor } }, innerContent), hookProps.isStartResizable && createElement("div", { className: "fc-event-resizer fc-event-resizer-start" }), hookProps.isEndResizable && createElement("div", { className: "fc-event-resizer fc-event-resizer-end" })); - }); + Table2.prototype.getCellEl = function(row, col) { + return this.rowRefs.currentMap[row].getCellEls()[col]; }; - return StandardEvent2; -}(BaseComponent); -function renderInnerContent$1(innerProps) { - return createElement("div", { className: "fc-event-main-frame" }, innerProps.timeText && createElement("div", { className: "fc-event-time" }, innerProps.timeText), createElement("div", { className: "fc-event-title-container" }, createElement("div", { className: "fc-event-title fc-sticky" }, innerProps.event.title || createElement(Fragment, null, "\xA0")))); + Table2.prototype.getCellRange = function(row, col) { + var start = this.props.cells[row][col].date; + var end = addDays(start, 1); + return { start, end }; + }; + return Table2; +}(DateComponent); +function isSegAllDay(seg) { + return seg.eventRange.def.allDay; } -var NowIndicatorRoot = function(props) { - return createElement(ViewContextType.Consumer, null, function(context) { - var options = context.options; - var hookProps = { - isAxis: props.isAxis, - date: context.dateEnv.toDate(props.date), - view: context.viewApi - }; - return createElement(RenderHook, { hookProps, classNames: options.nowIndicatorClassNames, content: options.nowIndicatorContent, didMount: options.nowIndicatorDidMount, willUnmount: options.nowIndicatorWillUnmount }, props.children); - }); -}; -var DAY_NUM_FORMAT = createFormatter({ day: "numeric" }); -var DayCellContent = function(_super) { - __extends(DayCellContent2, _super); - function DayCellContent2() { - return _super !== null && _super.apply(this, arguments) || this; +var DayTableSlicer = function(_super) { + __extends(DayTableSlicer2, _super); + function DayTableSlicer2() { + var _this = _super !== null && _super.apply(this, arguments) || this; + _this.forceDayIfListItem = true; + return _this; } - DayCellContent2.prototype.render = function() { - var _a = this, props = _a.props, context = _a.context; - var options = context.options; - var hookProps = refineDayCellHookProps({ - date: props.date, - dateProfile: props.dateProfile, - todayRange: props.todayRange, - showDayNumber: props.showDayNumber, - extraProps: props.extraHookProps, - viewApi: context.viewApi, - dateEnv: context.dateEnv - }); - return createElement(ContentHook, { hookProps, content: options.dayCellContent, defaultContent: props.defaultContent }, props.children); + DayTableSlicer2.prototype.sliceRange = function(dateRange, dayTableModel) { + return dayTableModel.sliceRange(dateRange); }; - return DayCellContent2; -}(BaseComponent); -function refineDayCellHookProps(raw) { - var date = raw.date, dateEnv = raw.dateEnv; - var dayMeta = getDateMeta(date, raw.todayRange, null, raw.dateProfile); - return __assign(__assign(__assign({ date: dateEnv.toDate(date), view: raw.viewApi }, dayMeta), { dayNumberText: raw.showDayNumber ? dateEnv.format(date, DAY_NUM_FORMAT) : "" }), raw.extraProps); -} -var DayCellRoot = function(_super) { - __extends(DayCellRoot2, _super); - function DayCellRoot2() { + return DayTableSlicer2; +}(Slicer); +var DayTable = function(_super) { + __extends(DayTable2, _super); + function DayTable2() { var _this = _super !== null && _super.apply(this, arguments) || this; - _this.refineHookProps = memoizeObjArg(refineDayCellHookProps); - _this.normalizeClassNames = buildClassNameNormalizer(); + _this.slicer = new DayTableSlicer(); + _this.tableRef = createRef(); return _this; } - DayCellRoot2.prototype.render = function() { + DayTable2.prototype.render = function() { var _a = this, props = _a.props, context = _a.context; - var options = context.options; - var hookProps = this.refineHookProps({ - date: props.date, - dateProfile: props.dateProfile, - todayRange: props.todayRange, - showDayNumber: props.showDayNumber, - extraProps: props.extraHookProps, - viewApi: context.viewApi, - dateEnv: context.dateEnv - }); - var classNames = getDayClassNames(hookProps, context.theme).concat(hookProps.isDisabled ? [] : this.normalizeClassNames(options.dayCellClassNames, hookProps)); - var dataAttrs = hookProps.isDisabled ? {} : { - "data-date": formatDayString(props.date) - }; - return createElement(MountHook, { hookProps, didMount: options.dayCellDidMount, willUnmount: options.dayCellWillUnmount, elRef: props.elRef }, function(rootElRef) { - return props.children(rootElRef, classNames, dataAttrs, hookProps.isDisabled); - }); + return createElement(Table, __assign({ ref: this.tableRef }, this.slicer.sliceProps(props, props.dateProfile, props.nextDayThreshold, context, props.dayTableModel), { dateProfile: props.dateProfile, cells: props.dayTableModel.cells, colGroupNode: props.colGroupNode, tableMinWidth: props.tableMinWidth, renderRowIntro: props.renderRowIntro, dayMaxEvents: props.dayMaxEvents, dayMaxEventRows: props.dayMaxEventRows, showWeekNumbers: props.showWeekNumbers, expandRows: props.expandRows, headerAlignElRef: props.headerAlignElRef, clientWidth: props.clientWidth, clientHeight: props.clientHeight, forPrint: props.forPrint })); }; - return DayCellRoot2; -}(BaseComponent); -function renderFill(fillType) { - return createElement("div", { className: "fc-" + fillType }); -} -var BgEvent = function(props) { - return createElement(EventRoot, { defaultContent: renderInnerContent, seg: props.seg, timeText: "", disableDragging: true, disableResizing: true, isDragging: false, isResizing: false, isDateSelecting: false, isSelected: false, isPast: props.isPast, isFuture: props.isFuture, isToday: props.isToday }, function(rootElRef, classNames, innerElRef, innerContent, hookProps) { - return createElement("div", { ref: rootElRef, className: ["fc-bg-event"].concat(classNames).join(" "), style: { - backgroundColor: hookProps.backgroundColor - } }, innerContent); - }); -}; -function renderInnerContent(props) { - var title = props.event.title; - return title && createElement("div", { className: "fc-event-title" }, props.event.title); -} -var WeekNumberRoot = function(props) { - return createElement(ViewContextType.Consumer, null, function(context) { - var dateEnv = context.dateEnv, options = context.options; - var date = props.date; - var format = options.weekNumberFormat || props.defaultFormat; - var num = dateEnv.computeWeekNumber(date); - var text = dateEnv.format(date, format); - var hookProps = { num, text, date }; - return createElement(RenderHook, { hookProps, classNames: options.weekNumberClassNames, content: options.weekNumberContent, defaultContent: renderInner, didMount: options.weekNumberDidMount, willUnmount: options.weekNumberWillUnmount }, props.children); - }); -}; -function renderInner(innerProps) { - return innerProps.text; -} -var PADDING_FROM_VIEWPORT = 10; -var Popover = function(_super) { - __extends(Popover2, _super); - function Popover2() { + return DayTable2; +}(DateComponent); +var DayTableView = function(_super) { + __extends(DayTableView2, _super); + function DayTableView2() { var _this = _super !== null && _super.apply(this, arguments) || this; - _this.state = { - titleId: getUniqueDomId() - }; - _this.handleRootEl = function(el) { - _this.rootEl = el; - if (_this.props.elRef) { - setRef(_this.props.elRef, el); - } - }; - _this.handleDocumentMouseDown = function(ev) { - var target = getEventTargetViaRoot(ev); - if (!_this.rootEl.contains(target)) { - _this.handleCloseClick(); - } - }; - _this.handleDocumentKeyDown = function(ev) { - if (ev.key === "Escape") { - _this.handleCloseClick(); - } - }; - _this.handleCloseClick = function() { - var onClose = _this.props.onClose; - if (onClose) { - onClose(); - } - }; + _this.buildDayTableModel = memoize(buildDayTableModel); + _this.headerRef = createRef(); + _this.tableRef = createRef(); return _this; } - Popover2.prototype.render = function() { - var _a = this.context, theme = _a.theme, options = _a.options; - var _b = this, props = _b.props, state = _b.state; - var classNames = [ - "fc-popover", - theme.getClass("popover") - ].concat(props.extraClassNames || []); - return createPortal(createElement("div", __assign({ id: props.id, className: classNames.join(" "), "aria-labelledby": state.titleId }, props.extraAttrs, { ref: this.handleRootEl }), createElement("div", { className: "fc-popover-header " + theme.getClass("popoverHeader") }, createElement("span", { className: "fc-popover-title", id: state.titleId }, props.title), createElement("span", { className: "fc-popover-close " + theme.getIconClass("close"), title: options.closeHint, onClick: this.handleCloseClick })), createElement("div", { className: "fc-popover-body " + theme.getClass("popoverContent") }, props.children)), props.parentEl); + DayTableView2.prototype.render = function() { + var _this = this; + var _a = this.context, options = _a.options, dateProfileGenerator = _a.dateProfileGenerator; + var props = this.props; + var dayTableModel = this.buildDayTableModel(props.dateProfile, dateProfileGenerator); + var headerContent = options.dayHeaders && createElement(DayHeader, { ref: this.headerRef, dateProfile: props.dateProfile, dates: dayTableModel.headerDates, datesRepDistinctDays: dayTableModel.rowCnt === 1 }); + var bodyContent = function(contentArg) { + return createElement(DayTable, { ref: _this.tableRef, dateProfile: props.dateProfile, dayTableModel, businessHours: props.businessHours, dateSelection: props.dateSelection, eventStore: props.eventStore, eventUiBases: props.eventUiBases, eventSelection: props.eventSelection, eventDrag: props.eventDrag, eventResize: props.eventResize, nextDayThreshold: options.nextDayThreshold, colGroupNode: contentArg.tableColGroupNode, tableMinWidth: contentArg.tableMinWidth, dayMaxEvents: options.dayMaxEvents, dayMaxEventRows: options.dayMaxEventRows, showWeekNumbers: options.weekNumbers, expandRows: !props.isHeightAuto, headerAlignElRef: _this.headerElRef, clientWidth: contentArg.clientWidth, clientHeight: contentArg.clientHeight, forPrint: props.forPrint }); + }; + return options.dayMinWidth ? this.renderHScrollLayout(headerContent, bodyContent, dayTableModel.colCnt, options.dayMinWidth) : this.renderSimpleLayout(headerContent, bodyContent); }; - Popover2.prototype.componentDidMount = function() { - document.addEventListener("mousedown", this.handleDocumentMouseDown); - document.addEventListener("keydown", this.handleDocumentKeyDown); - this.updateSize(); + return DayTableView2; +}(TableView); +function buildDayTableModel(dateProfile, dateProfileGenerator) { + var daySeries = new DaySeriesModel(dateProfile.renderRange, dateProfileGenerator); + return new DayTableModel(daySeries, /year|month|week/.test(dateProfile.currentRangeUnit)); +} +var TableDateProfileGenerator = function(_super) { + __extends(TableDateProfileGenerator2, _super); + function TableDateProfileGenerator2() { + return _super !== null && _super.apply(this, arguments) || this; + } + TableDateProfileGenerator2.prototype.buildRenderRange = function(currentRange, currentRangeUnit, isRangeAllDay) { + var dateEnv = this.props.dateEnv; + var renderRange = _super.prototype.buildRenderRange.call(this, currentRange, currentRangeUnit, isRangeAllDay); + var start = renderRange.start; + var end = renderRange.end; + var endOfWeek; + if (/^(year|month)$/.test(currentRangeUnit)) { + start = dateEnv.startOfWeek(start); + endOfWeek = dateEnv.startOfWeek(end); + if (endOfWeek.valueOf() !== end.valueOf()) { + end = addWeeks(endOfWeek, 1); + } + } + if (this.props.monthMode && this.props.fixedWeekCount) { + var rowCnt = Math.ceil(diffWeeks(start, end)); + end = addWeeks(end, 6 - rowCnt); + } + return { start, end }; }; - Popover2.prototype.componentWillUnmount = function() { - document.removeEventListener("mousedown", this.handleDocumentMouseDown); - document.removeEventListener("keydown", this.handleDocumentKeyDown); + return TableDateProfileGenerator2; +}(DateProfileGenerator); +var main = createPlugin({ + initialView: "dayGridMonth", + views: { + dayGrid: { + component: DayTableView, + dateProfileGeneratorClass: TableDateProfileGenerator + }, + dayGridDay: { + type: "dayGrid", + duration: { days: 1 } + }, + dayGridWeek: { + type: "dayGrid", + duration: { weeks: 1 } + }, + dayGridMonth: { + type: "dayGrid", + duration: { months: 1 }, + monthMode: true, + fixedWeekCount: true + } + } +}); +var main_default = main; + +// node_modules/@fullcalendar/timegrid/main.js +var AllDaySplitter = function(_super) { + __extends(AllDaySplitter2, _super); + function AllDaySplitter2() { + return _super !== null && _super.apply(this, arguments) || this; + } + AllDaySplitter2.prototype.getKeyInfo = function() { + return { + allDay: {}, + timed: {} + }; }; - Popover2.prototype.updateSize = function() { - var isRtl = this.context.isRtl; - var _a = this.props, alignmentEl = _a.alignmentEl, alignGridTop = _a.alignGridTop; - var rootEl = this.rootEl; - var alignmentRect = computeClippedClientRect(alignmentEl); - if (alignmentRect) { - var popoverDims = rootEl.getBoundingClientRect(); - var popoverTop = alignGridTop ? elementClosest(alignmentEl, ".fc-scrollgrid").getBoundingClientRect().top : alignmentRect.top; - var popoverLeft = isRtl ? alignmentRect.right - popoverDims.width : alignmentRect.left; - popoverTop = Math.max(popoverTop, PADDING_FROM_VIEWPORT); - popoverLeft = Math.min(popoverLeft, document.documentElement.clientWidth - PADDING_FROM_VIEWPORT - popoverDims.width); - popoverLeft = Math.max(popoverLeft, PADDING_FROM_VIEWPORT); - var origin_1 = rootEl.offsetParent.getBoundingClientRect(); - applyStyle(rootEl, { - top: popoverTop - origin_1.top, - left: popoverLeft - origin_1.left - }); + AllDaySplitter2.prototype.getKeysForDateSpan = function(dateSpan) { + if (dateSpan.allDay) { + return ["allDay"]; } + return ["timed"]; }; - return Popover2; -}(BaseComponent); -var MorePopover = function(_super) { - __extends(MorePopover2, _super); - function MorePopover2() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.handleRootEl = function(rootEl) { - _this.rootEl = rootEl; - if (rootEl) { - _this.context.registerInteractiveComponent(_this, { - el: rootEl, - useEventCenter: false - }); - } else { - _this.context.unregisterInteractiveComponent(_this); - } + AllDaySplitter2.prototype.getKeysForEventDef = function(eventDef) { + if (!eventDef.allDay) { + return ["timed"]; + } + if (hasBgRendering(eventDef)) { + return ["timed", "allDay"]; + } + return ["allDay"]; + }; + return AllDaySplitter2; +}(Splitter); +var DEFAULT_SLAT_LABEL_FORMAT = createFormatter({ + hour: "numeric", + minute: "2-digit", + omitZeroMinute: true, + meridiem: "short" +}); +function TimeColsAxisCell(props) { + var classNames = [ + "fc-timegrid-slot", + "fc-timegrid-slot-label", + props.isLabeled ? "fc-scrollgrid-shrink" : "fc-timegrid-slot-minor" + ]; + return createElement(ViewContextType.Consumer, null, function(context) { + if (!props.isLabeled) { + return createElement("td", { className: classNames.join(" "), "data-time": props.isoTimeStr }); + } + var dateEnv = context.dateEnv, options = context.options, viewApi = context.viewApi; + var labelFormat = options.slotLabelFormat == null ? DEFAULT_SLAT_LABEL_FORMAT : Array.isArray(options.slotLabelFormat) ? createFormatter(options.slotLabelFormat[0]) : createFormatter(options.slotLabelFormat); + var hookProps = { + level: 0, + time: props.time, + date: dateEnv.toDate(props.date), + view: viewApi, + text: dateEnv.format(props.date, labelFormat) }; - return _this; + return createElement(RenderHook, { hookProps, classNames: options.slotLabelClassNames, content: options.slotLabelContent, defaultContent: renderInnerContent3, didMount: options.slotLabelDidMount, willUnmount: options.slotLabelWillUnmount }, function(rootElRef, customClassNames, innerElRef, innerContent) { + return createElement("td", { ref: rootElRef, className: classNames.concat(customClassNames).join(" "), "data-time": props.isoTimeStr }, createElement("div", { className: "fc-timegrid-slot-label-frame fc-scrollgrid-shrink-frame" }, createElement("div", { className: "fc-timegrid-slot-label-cushion fc-scrollgrid-shrink-cushion", ref: innerElRef }, innerContent))); + }); + }); +} +function renderInnerContent3(props) { + return props.text; +} +var TimeBodyAxis = function(_super) { + __extends(TimeBodyAxis2, _super); + function TimeBodyAxis2() { + return _super !== null && _super.apply(this, arguments) || this; } - MorePopover2.prototype.render = function() { - var _a = this.context, options = _a.options, dateEnv = _a.dateEnv; - var props = this.props; - var startDate = props.startDate, todayRange = props.todayRange, dateProfile = props.dateProfile; - var title = dateEnv.format(startDate, options.dayPopoverFormat); - return createElement(DayCellRoot, { date: startDate, dateProfile, todayRange, elRef: this.handleRootEl }, function(rootElRef, dayClassNames, dataAttrs) { - return createElement(Popover, { elRef: rootElRef, id: props.id, title, extraClassNames: ["fc-more-popover"].concat(dayClassNames), extraAttrs: dataAttrs, parentEl: props.parentEl, alignmentEl: props.alignmentEl, alignGridTop: props.alignGridTop, onClose: props.onClose }, createElement(DayCellContent, { date: startDate, dateProfile, todayRange }, function(innerElRef, innerContent) { - return innerContent && createElement("div", { className: "fc-more-popover-misc", ref: innerElRef }, innerContent); - }), props.children); + TimeBodyAxis2.prototype.render = function() { + return this.props.slatMetas.map(function(slatMeta) { + return createElement("tr", { key: slatMeta.key }, createElement(TimeColsAxisCell, __assign({}, slatMeta))); }); }; - MorePopover2.prototype.queryHit = function(positionLeft, positionTop, elWidth, elHeight) { - var _a = this, rootEl = _a.rootEl, props = _a.props; - if (positionLeft >= 0 && positionLeft < elWidth && positionTop >= 0 && positionTop < elHeight) { - return { - dateProfile: props.dateProfile, - dateSpan: __assign({ allDay: true, range: { - start: props.startDate, - end: props.endDate - } }, props.extraDateSpan), - dayEl: rootEl, - rect: { - left: 0, - top: 0, - right: elWidth, - bottom: elHeight - }, - layer: 1 - }; - } - return null; - }; - return MorePopover2; -}(DateComponent); -var MoreLinkRoot = function(_super) { - __extends(MoreLinkRoot2, _super); - function MoreLinkRoot2() { + return TimeBodyAxis2; +}(BaseComponent); +var DEFAULT_WEEK_NUM_FORMAT2 = createFormatter({ week: "short" }); +var AUTO_ALL_DAY_MAX_EVENT_ROWS = 5; +var TimeColsView = function(_super) { + __extends(TimeColsView2, _super); + function TimeColsView2() { var _this = _super !== null && _super.apply(this, arguments) || this; - _this.linkElRef = createRef(); + _this.allDaySplitter = new AllDaySplitter(); + _this.headerElRef = createRef(); + _this.rootElRef = createRef(); + _this.scrollerElRef = createRef(); _this.state = { - isPopoverOpen: false, - popoverId: getUniqueDomId() + slatCoords: null }; - _this.handleClick = function(ev) { - var _a = _this, props = _a.props, context = _a.context; - var moreLinkClick = context.options.moreLinkClick; - var date = computeRange(props).start; - function buildPublicSeg(seg) { - var _a2 = seg.eventRange, def = _a2.def, instance = _a2.instance, range = _a2.range; - return { - event: new EventApi(context, def, instance), - start: context.dateEnv.toDate(range.start), - end: context.dateEnv.toDate(range.end), - isStart: seg.isStart, - isEnd: seg.isEnd - }; + _this.handleScrollTopRequest = function(scrollTop) { + var scrollerEl = _this.scrollerElRef.current; + if (scrollerEl) { + scrollerEl.scrollTop = scrollTop; } - if (typeof moreLinkClick === "function") { - moreLinkClick = moreLinkClick({ - date, - allDay: Boolean(props.allDayDate), - allSegs: props.allSegs.map(buildPublicSeg), - hiddenSegs: props.hiddenSegs.map(buildPublicSeg), - jsEvent: ev, - view: context.viewApi - }); + }; + _this.renderHeadAxis = function(rowKey, frameHeight) { + if (frameHeight === void 0) { + frameHeight = ""; } - if (!moreLinkClick || moreLinkClick === "popover") { - _this.setState({ isPopoverOpen: true }); - } else if (typeof moreLinkClick === "string") { - context.calendarApi.zoomTo(date, moreLinkClick); + var options = _this.context.options; + var dateProfile = _this.props.dateProfile; + var range2 = dateProfile.renderRange; + var dayCnt = diffDays(range2.start, range2.end); + var navLinkAttrs = dayCnt === 1 ? buildNavLinkAttrs(_this.context, range2.start, "week") : {}; + if (options.weekNumbers && rowKey === "day") { + return createElement(WeekNumberRoot, { date: range2.start, defaultFormat: DEFAULT_WEEK_NUM_FORMAT2 }, function(rootElRef, classNames, innerElRef, innerContent) { + return createElement("th", { ref: rootElRef, "aria-hidden": true, className: [ + "fc-timegrid-axis", + "fc-scrollgrid-shrink" + ].concat(classNames).join(" ") }, createElement("div", { className: "fc-timegrid-axis-frame fc-scrollgrid-shrink-frame fc-timegrid-axis-frame-liquid", style: { height: frameHeight } }, createElement("a", __assign({ ref: innerElRef, className: "fc-timegrid-axis-cushion fc-scrollgrid-shrink-cushion fc-scrollgrid-sync-inner" }, navLinkAttrs), innerContent))); + }); } + return createElement("th", { "aria-hidden": true, className: "fc-timegrid-axis" }, createElement("div", { className: "fc-timegrid-axis-frame", style: { height: frameHeight } })); }; - _this.handlePopoverClose = function() { - _this.setState({ isPopoverOpen: false }); - }; - return _this; - } - MoreLinkRoot2.prototype.render = function() { - var _this = this; - var _a = this, props = _a.props, state = _a.state; - return createElement(ViewContextType.Consumer, null, function(context) { - var viewApi = context.viewApi, options = context.options, calendarApi = context.calendarApi; - var moreLinkText = options.moreLinkText; - var moreCnt = props.moreCnt; - var range = computeRange(props); - var text = typeof moreLinkText === "function" ? moreLinkText.call(calendarApi, moreCnt) : "+" + moreCnt + " " + moreLinkText; - var title = formatWithOrdinals(options.moreLinkHint, [moreCnt], text); + _this.renderTableRowAxis = function(rowHeight) { + var _a = _this.context, options = _a.options, viewApi = _a.viewApi; var hookProps = { - num: moreCnt, - shortText: "+" + moreCnt, - text, + text: options.allDayText, view: viewApi }; - return createElement(Fragment, null, Boolean(props.moreCnt) && createElement(RenderHook, { elRef: _this.linkElRef, hookProps, classNames: options.moreLinkClassNames, content: options.moreLinkContent, defaultContent: props.defaultContent || renderMoreLinkInner, didMount: options.moreLinkDidMount, willUnmount: options.moreLinkWillUnmount }, function(rootElRef, customClassNames, innerElRef, innerContent) { - return props.children(rootElRef, ["fc-more-link"].concat(customClassNames), innerElRef, innerContent, _this.handleClick, title, state.isPopoverOpen, state.isPopoverOpen ? state.popoverId : ""); - }), state.isPopoverOpen && createElement(MorePopover, { id: state.popoverId, startDate: range.start, endDate: range.end, dateProfile: props.dateProfile, todayRange: props.todayRange, extraDateSpan: props.extraDateSpan, parentEl: _this.parentEl, alignmentEl: props.alignmentElRef.current, alignGridTop: props.alignGridTop, onClose: _this.handlePopoverClose }, props.popoverContent())); - }); - }; - MoreLinkRoot2.prototype.componentDidMount = function() { - this.updateParentEl(); - }; - MoreLinkRoot2.prototype.componentDidUpdate = function() { - this.updateParentEl(); - }; - MoreLinkRoot2.prototype.updateParentEl = function() { - if (this.linkElRef.current) { - this.parentEl = elementClosest(this.linkElRef.current, ".fc-view-harness"); - } - }; - return MoreLinkRoot2; -}(BaseComponent); -function renderMoreLinkInner(props) { - return props.text; -} -function computeRange(props) { - if (props.allDayDate) { - return { - start: props.allDayDate, - end: addDays(props.allDayDate, 1) - }; - } - var hiddenSegs = props.hiddenSegs; - return { - start: computeEarliestSegStart(hiddenSegs), - end: computeLatestSegEnd(hiddenSegs) - }; -} -function computeEarliestSegStart(segs) { - return segs.reduce(pickEarliestStart).eventRange.range.start; -} -function pickEarliestStart(seg0, seg1) { - return seg0.eventRange.range.start < seg1.eventRange.range.start ? seg0 : seg1; -} -function computeLatestSegEnd(segs) { - return segs.reduce(pickLatestEnd).eventRange.range.end; -} -function pickLatestEnd(seg0, seg1) { - return seg0.eventRange.range.end > seg1.eventRange.range.end ? seg0 : seg1; -} - -// node_modules/@fullcalendar/core/main.js -var Calendar = function(_super) { - __extends(Calendar3, _super); - function Calendar3(el, optionOverrides) { - if (optionOverrides === void 0) { - optionOverrides = {}; - } - var _this = _super.call(this) || this; - _this.isRendering = false; - _this.isRendered = false; - _this.currentClassNames = []; - _this.customContentRenderId = 0; - _this.handleAction = function(action) { - switch (action.type) { - case "SET_EVENT_DRAG": - case "SET_EVENT_RESIZE": - _this.renderRunner.tryDrain(); - } - }; - _this.handleData = function(data) { - _this.currentData = data; - _this.renderRunner.request(data.calendarOptions.rerenderDelay); + return createElement(RenderHook, { hookProps, classNames: options.allDayClassNames, content: options.allDayContent, defaultContent: renderAllDayInner, didMount: options.allDayDidMount, willUnmount: options.allDayWillUnmount }, function(rootElRef, classNames, innerElRef, innerContent) { + return createElement("td", { ref: rootElRef, "aria-hidden": true, className: [ + "fc-timegrid-axis", + "fc-scrollgrid-shrink" + ].concat(classNames).join(" ") }, createElement("div", { className: "fc-timegrid-axis-frame fc-scrollgrid-shrink-frame" + (rowHeight == null ? " fc-timegrid-axis-frame-liquid" : ""), style: { height: rowHeight } }, createElement("span", { className: "fc-timegrid-axis-cushion fc-scrollgrid-shrink-cushion fc-scrollgrid-sync-inner", ref: innerElRef }, innerContent))); + }); }; - _this.handleRenderRequest = function() { - if (_this.isRendering) { - _this.isRendered = true; - var currentData_1 = _this.currentData; - flushSync2(function() { - render(createElement(CalendarRoot, { options: currentData_1.calendarOptions, theme: currentData_1.theme, emitter: currentData_1.emitter }, function(classNames, height, isHeightAuto, forPrint) { - _this.setClassNames(classNames); - _this.setHeight(height); - return createElement(CustomContentRenderContext.Provider, { value: _this.customContentRenderId }, createElement(CalendarContent, __assign({ isHeightAuto, forPrint }, currentData_1))); - }), _this.el); - }); - } else if (_this.isRendered) { - _this.isRendered = false; - unmountComponentAtNode2(_this.el); - _this.setClassNames([]); - _this.setHeight(""); - } + _this.handleSlatCoords = function(slatCoords) { + _this.setState({ slatCoords }); }; - _this.el = el; - _this.renderRunner = new DelayedRunner(_this.handleRenderRequest); - new CalendarDataManager({ - optionOverrides, - calendarApi: _this, - onAction: _this.handleAction, - onData: _this.handleData - }); - return _this; - } - Object.defineProperty(Calendar3.prototype, "view", { - get: function() { - return this.currentData.viewApi; - }, - enumerable: false, - configurable: true - }); - Calendar3.prototype.render = function() { - var wasRendering = this.isRendering; - if (!wasRendering) { - this.isRendering = true; - } else { - this.customContentRenderId += 1; - } - this.renderRunner.request(); - if (wasRendering) { - this.updateSize(); - } - }; - Calendar3.prototype.destroy = function() { - if (this.isRendering) { - this.isRendering = false; - this.renderRunner.request(); - } - }; - Calendar3.prototype.updateSize = function() { - var _this = this; - flushSync2(function() { - _super.prototype.updateSize.call(_this); - }); - }; - Calendar3.prototype.batchRendering = function(func) { - this.renderRunner.pause("batchRendering"); - func(); - this.renderRunner.resume("batchRendering"); - }; - Calendar3.prototype.pauseRendering = function() { - this.renderRunner.pause("pauseRendering"); - }; - Calendar3.prototype.resumeRendering = function() { - this.renderRunner.resume("pauseRendering", true); - }; - Calendar3.prototype.resetOptions = function(optionOverrides, append) { - this.currentDataManager.resetOptions(optionOverrides, append); - }; - Calendar3.prototype.setClassNames = function(classNames) { - if (!isArraysEqual(classNames, this.currentClassNames)) { - var classList = this.el.classList; - for (var _i = 0, _a = this.currentClassNames; _i < _a.length; _i++) { - var className = _a[_i]; - classList.remove(className); - } - for (var _b = 0, classNames_1 = classNames; _b < classNames_1.length; _b++) { - var className = classNames_1[_b]; - classList.add(className); - } - this.currentClassNames = classNames; - } - }; - Calendar3.prototype.setHeight = function(height) { - applyStyleProp(this.el, "height", height); - }; - return Calendar3; -}(CalendarApi); - -// node_modules/@fullcalendar/daygrid/main.js -var TableView = function(_super) { - __extends(TableView2, _super); - function TableView2() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.headerElRef = createRef(); return _this; } - TableView2.prototype.renderSimpleLayout = function(headerRowContent, bodyContent) { - var _a = this, props = _a.props, context = _a.context; + TimeColsView2.prototype.renderSimpleLayout = function(headerRowContent, allDayContent, timeContent) { + var _a = this, context = _a.context, props = _a.props; var sections = []; var stickyHeaderDates = getStickyHeaderDates(context.options); if (headerRowContent) { @@ -47064,94 +51877,282 @@ var TableView = function(_super) { } }); } + if (allDayContent) { + sections.push({ + type: "body", + key: "all-day", + chunk: { content: allDayContent } + }); + sections.push({ + type: "body", + key: "all-day-divider", + outerContent: createElement("tr", { role: "presentation", className: "fc-scrollgrid-section" }, createElement("td", { className: "fc-timegrid-divider " + context.theme.getClass("tableCellShaded") })) + }); + } sections.push({ type: "body", key: "body", liquid: true, - chunk: { content: bodyContent } + expandRows: Boolean(context.options.expandRows), + chunk: { + scrollerElRef: this.scrollerElRef, + content: timeContent + } }); - return createElement(ViewRoot, { viewSpec: context.viewSpec }, function(rootElRef, classNames) { - return createElement("div", { ref: rootElRef, className: ["fc-daygrid"].concat(classNames).join(" ") }, createElement(SimpleScrollGrid, { liquid: !props.isHeightAuto && !props.forPrint, collapsibleWidth: props.forPrint, cols: [], sections })); + return createElement(ViewRoot, { viewSpec: context.viewSpec, elRef: this.rootElRef }, function(rootElRef, classNames) { + return createElement("div", { className: ["fc-timegrid"].concat(classNames).join(" "), ref: rootElRef }, createElement(SimpleScrollGrid, { liquid: !props.isHeightAuto && !props.forPrint, collapsibleWidth: props.forPrint, cols: [{ width: "shrink" }], sections })); + }); + }; + TimeColsView2.prototype.renderHScrollLayout = function(headerRowContent, allDayContent, timeContent, colCnt, dayMinWidth, slatMetas, slatCoords) { + var _this = this; + var ScrollGrid = this.context.pluginHooks.scrollGridImpl; + if (!ScrollGrid) { + throw new Error("No ScrollGrid implementation"); + } + var _a = this, context = _a.context, props = _a.props; + var stickyHeaderDates = !props.forPrint && getStickyHeaderDates(context.options); + var stickyFooterScrollbar = !props.forPrint && getStickyFooterScrollbar(context.options); + var sections = []; + if (headerRowContent) { + sections.push({ + type: "header", + key: "header", + isSticky: stickyHeaderDates, + syncRowHeights: true, + chunks: [ + { + key: "axis", + rowContent: function(arg) { + return createElement("tr", { role: "presentation" }, _this.renderHeadAxis("day", arg.rowSyncHeights[0])); + } + }, + { + key: "cols", + elRef: this.headerElRef, + tableClassName: "fc-col-header", + rowContent: headerRowContent + } + ] + }); + } + if (allDayContent) { + sections.push({ + type: "body", + key: "all-day", + syncRowHeights: true, + chunks: [ + { + key: "axis", + rowContent: function(contentArg) { + return createElement("tr", { role: "presentation" }, _this.renderTableRowAxis(contentArg.rowSyncHeights[0])); + } + }, + { + key: "cols", + content: allDayContent + } + ] + }); + sections.push({ + key: "all-day-divider", + type: "body", + outerContent: createElement("tr", { role: "presentation", className: "fc-scrollgrid-section" }, createElement("td", { colSpan: 2, className: "fc-timegrid-divider " + context.theme.getClass("tableCellShaded") })) + }); + } + var isNowIndicator = context.options.nowIndicator; + sections.push({ + type: "body", + key: "body", + liquid: true, + expandRows: Boolean(context.options.expandRows), + chunks: [ + { + key: "axis", + content: function(arg) { + return createElement("div", { className: "fc-timegrid-axis-chunk" }, createElement("table", { "aria-hidden": true, style: { height: arg.expandRows ? arg.clientHeight : "" } }, arg.tableColGroupNode, createElement("tbody", null, createElement(TimeBodyAxis, { slatMetas }))), createElement("div", { className: "fc-timegrid-now-indicator-container" }, createElement(NowTimer, { unit: isNowIndicator ? "minute" : "day" }, function(nowDate) { + var nowIndicatorTop = isNowIndicator && slatCoords && slatCoords.safeComputeTop(nowDate); + if (typeof nowIndicatorTop === "number") { + return createElement(NowIndicatorRoot, { isAxis: true, date: nowDate }, function(rootElRef, classNames, innerElRef, innerContent) { + return createElement("div", { ref: rootElRef, className: ["fc-timegrid-now-indicator-arrow"].concat(classNames).join(" "), style: { top: nowIndicatorTop } }, innerContent); + }); + } + return null; + }))); + } + }, + { + key: "cols", + scrollerElRef: this.scrollerElRef, + content: timeContent + } + ] + }); + if (stickyFooterScrollbar) { + sections.push({ + key: "footer", + type: "footer", + isSticky: true, + chunks: [ + { + key: "axis", + content: renderScrollShim + }, + { + key: "cols", + content: renderScrollShim + } + ] + }); + } + return createElement(ViewRoot, { viewSpec: context.viewSpec, elRef: this.rootElRef }, function(rootElRef, classNames) { + return createElement("div", { className: ["fc-timegrid"].concat(classNames).join(" "), ref: rootElRef }, createElement(ScrollGrid, { liquid: !props.isHeightAuto && !props.forPrint, collapsibleWidth: false, colGroups: [ + { width: "shrink", cols: [{ width: "shrink" }] }, + { cols: [{ span: colCnt, minWidth: dayMinWidth }] } + ], sections })); }); }; - TableView2.prototype.renderHScrollLayout = function(headerRowContent, bodyContent, colCnt, dayMinWidth) { - var ScrollGrid = this.context.pluginHooks.scrollGridImpl; - if (!ScrollGrid) { - throw new Error("No ScrollGrid implementation"); - } + TimeColsView2.prototype.getAllDayMaxEventProps = function() { + var _a = this.context.options, dayMaxEvents = _a.dayMaxEvents, dayMaxEventRows = _a.dayMaxEventRows; + if (dayMaxEvents === true || dayMaxEventRows === true) { + dayMaxEvents = void 0; + dayMaxEventRows = AUTO_ALL_DAY_MAX_EVENT_ROWS; + } + return { dayMaxEvents, dayMaxEventRows }; + }; + return TimeColsView2; +}(DateComponent); +function renderAllDayInner(hookProps) { + return hookProps.text; +} +var TimeColsSlatsCoords = function() { + function TimeColsSlatsCoords2(positions, dateProfile, slotDuration) { + this.positions = positions; + this.dateProfile = dateProfile; + this.slotDuration = slotDuration; + } + TimeColsSlatsCoords2.prototype.safeComputeTop = function(date) { + var dateProfile = this.dateProfile; + if (rangeContainsMarker(dateProfile.currentRange, date)) { + var startOfDayDate = startOfDay(date); + var timeMs = date.valueOf() - startOfDayDate.valueOf(); + if (timeMs >= asRoughMs(dateProfile.slotMinTime) && timeMs < asRoughMs(dateProfile.slotMaxTime)) { + return this.computeTimeTop(createDuration(timeMs)); + } + } + return null; + }; + TimeColsSlatsCoords2.prototype.computeDateTop = function(when, startOfDayDate) { + if (!startOfDayDate) { + startOfDayDate = startOfDay(when); + } + return this.computeTimeTop(createDuration(when.valueOf() - startOfDayDate.valueOf())); + }; + TimeColsSlatsCoords2.prototype.computeTimeTop = function(duration) { + var _a = this, positions = _a.positions, dateProfile = _a.dateProfile; + var len = positions.els.length; + var slatCoverage = (duration.milliseconds - asRoughMs(dateProfile.slotMinTime)) / asRoughMs(this.slotDuration); + var slatIndex; + var slatRemainder; + slatCoverage = Math.max(0, slatCoverage); + slatCoverage = Math.min(len, slatCoverage); + slatIndex = Math.floor(slatCoverage); + slatIndex = Math.min(slatIndex, len - 1); + slatRemainder = slatCoverage - slatIndex; + return positions.tops[slatIndex] + positions.getHeight(slatIndex) * slatRemainder; + }; + return TimeColsSlatsCoords2; +}(); +var TimeColsSlatsBody = function(_super) { + __extends(TimeColsSlatsBody2, _super); + function TimeColsSlatsBody2() { + return _super !== null && _super.apply(this, arguments) || this; + } + TimeColsSlatsBody2.prototype.render = function() { + var _a = this, props = _a.props, context = _a.context; + var options = context.options; + var slatElRefs = props.slatElRefs; + return createElement("tbody", null, props.slatMetas.map(function(slatMeta, i3) { + var hookProps = { + time: slatMeta.time, + date: context.dateEnv.toDate(slatMeta.date), + view: context.viewApi + }; + var classNames = [ + "fc-timegrid-slot", + "fc-timegrid-slot-lane", + slatMeta.isLabeled ? "" : "fc-timegrid-slot-minor" + ]; + return createElement("tr", { key: slatMeta.key, ref: slatElRefs.createRef(slatMeta.key) }, props.axis && createElement(TimeColsAxisCell, __assign({}, slatMeta)), createElement(RenderHook, { hookProps, classNames: options.slotLaneClassNames, content: options.slotLaneContent, didMount: options.slotLaneDidMount, willUnmount: options.slotLaneWillUnmount }, function(rootElRef, customClassNames, innerElRef, innerContent) { + return createElement("td", { ref: rootElRef, className: classNames.concat(customClassNames).join(" "), "data-time": slatMeta.isoTimeStr }, innerContent); + })); + })); + }; + return TimeColsSlatsBody2; +}(BaseComponent); +var TimeColsSlats = function(_super) { + __extends(TimeColsSlats2, _super); + function TimeColsSlats2() { + var _this = _super !== null && _super.apply(this, arguments) || this; + _this.rootElRef = createRef(); + _this.slatElRefs = new RefMap(); + return _this; + } + TimeColsSlats2.prototype.render = function() { var _a = this, props = _a.props, context = _a.context; - var stickyHeaderDates = !props.forPrint && getStickyHeaderDates(context.options); - var stickyFooterScrollbar = !props.forPrint && getStickyFooterScrollbar(context.options); - var sections = []; - if (headerRowContent) { - sections.push({ - type: "header", - key: "header", - isSticky: stickyHeaderDates, - chunks: [{ - key: "main", - elRef: this.headerElRef, - tableClassName: "fc-col-header", - rowContent: headerRowContent - }] - }); + return createElement("div", { ref: this.rootElRef, className: "fc-timegrid-slots" }, createElement("table", { "aria-hidden": true, className: context.theme.getClass("table"), style: { + minWidth: props.tableMinWidth, + width: props.clientWidth, + height: props.minHeight + } }, props.tableColGroupNode, createElement(TimeColsSlatsBody, { slatElRefs: this.slatElRefs, axis: props.axis, slatMetas: props.slatMetas }))); + }; + TimeColsSlats2.prototype.componentDidMount = function() { + this.updateSizing(); + }; + TimeColsSlats2.prototype.componentDidUpdate = function() { + this.updateSizing(); + }; + TimeColsSlats2.prototype.componentWillUnmount = function() { + if (this.props.onCoords) { + this.props.onCoords(null); } - sections.push({ - type: "body", - key: "body", - liquid: true, - chunks: [{ - key: "main", - content: bodyContent - }] - }); - if (stickyFooterScrollbar) { - sections.push({ - type: "footer", - key: "footer", - isSticky: true, - chunks: [{ - key: "main", - content: renderScrollShim - }] - }); + }; + TimeColsSlats2.prototype.updateSizing = function() { + var _a = this, context = _a.context, props = _a.props; + if (props.onCoords && props.clientWidth !== null) { + var rootEl = this.rootElRef.current; + if (rootEl.offsetHeight) { + props.onCoords(new TimeColsSlatsCoords(new PositionCache(this.rootElRef.current, collectSlatEls(this.slatElRefs.currentMap, props.slatMetas), false, true), this.props.dateProfile, context.options.slotDuration)); + } } - return createElement(ViewRoot, { viewSpec: context.viewSpec }, function(rootElRef, classNames) { - return createElement("div", { ref: rootElRef, className: ["fc-daygrid"].concat(classNames).join(" ") }, createElement(ScrollGrid, { liquid: !props.isHeightAuto && !props.forPrint, collapsibleWidth: props.forPrint, colGroups: [{ cols: [{ span: colCnt, minWidth: dayMinWidth }] }], sections })); - }); }; - return TableView2; -}(DateComponent); -function splitSegsByRow(segs, rowCnt) { - var byRow = []; - for (var i3 = 0; i3 < rowCnt; i3 += 1) { - byRow[i3] = []; - } - for (var _i = 0, segs_1 = segs; _i < segs_1.length; _i++) { - var seg = segs_1[_i]; - byRow[seg.row].push(seg); - } - return byRow; + return TimeColsSlats2; +}(BaseComponent); +function collectSlatEls(elMap, slatMetas) { + return slatMetas.map(function(slatMeta) { + return elMap[slatMeta.key]; + }); } -function splitSegsByFirstCol(segs, colCnt) { - var byCol = []; - for (var i3 = 0; i3 < colCnt; i3 += 1) { - byCol[i3] = []; +function splitSegsByCol(segs, colCnt) { + var segsByCol = []; + var i3; + for (i3 = 0; i3 < colCnt; i3 += 1) { + segsByCol.push([]); } - for (var _i = 0, segs_2 = segs; _i < segs_2.length; _i++) { - var seg = segs_2[_i]; - byCol[seg.firstCol].push(seg); + if (segs) { + for (i3 = 0; i3 < segs.length; i3 += 1) { + segsByCol[segs[i3].col].push(segs[i3]); + } } - return byCol; + return segsByCol; } -function splitInteractionByRow(ui, rowCnt) { +function splitInteractionByCol(ui, colCnt) { var byRow = []; if (!ui) { - for (var i3 = 0; i3 < rowCnt; i3 += 1) { + for (var i3 = 0; i3 < colCnt; i3 += 1) { byRow[i3] = null; } } else { - for (var i3 = 0; i3 < rowCnt; i3 += 1) { + for (var i3 = 0; i3 < colCnt; i3 += 1) { byRow[i3] = { affectedInstances: ui.affectedInstances, isEvent: ui.isEvent, @@ -47160,1890 +52161,3667 @@ function splitInteractionByRow(ui, rowCnt) { } for (var _i = 0, _a = ui.segs; _i < _a.length; _i++) { var seg = _a[_i]; - byRow[seg.row].segs.push(seg); + byRow[seg.col].segs.push(seg); } } return byRow; } -var TableCellTop = function(_super) { - __extends(TableCellTop2, _super); - function TableCellTop2() { - return _super !== null && _super.apply(this, arguments) || this; +var TimeColMoreLink = function(_super) { + __extends(TimeColMoreLink2, _super); + function TimeColMoreLink2() { + var _this = _super !== null && _super.apply(this, arguments) || this; + _this.rootElRef = createRef(); + return _this; } - TableCellTop2.prototype.render = function() { + TimeColMoreLink2.prototype.render = function() { + var _this = this; var props = this.props; - var navLinkAttrs = buildNavLinkAttrs(this.context, props.date); - return createElement(DayCellContent, { date: props.date, dateProfile: props.dateProfile, todayRange: props.todayRange, showDayNumber: props.showDayNumber, extraHookProps: props.extraHookProps, defaultContent: renderTopInner }, function(innerElRef, innerContent) { - return (innerContent || props.forceDayTop) && createElement("div", { className: "fc-daygrid-day-top", ref: innerElRef }, createElement("a", __assign({ id: props.dayNumberId, className: "fc-daygrid-day-number" }, navLinkAttrs), innerContent || createElement(Fragment, null, "\xA0"))); + return createElement(MoreLinkRoot, { allDayDate: null, moreCnt: props.hiddenSegs.length, allSegs: props.hiddenSegs, hiddenSegs: props.hiddenSegs, alignmentElRef: this.rootElRef, defaultContent: renderMoreLinkInner2, extraDateSpan: props.extraDateSpan, dateProfile: props.dateProfile, todayRange: props.todayRange, popoverContent: function() { + return renderPlainFgSegs(props.hiddenSegs, props); + } }, function(rootElRef, classNames, innerElRef, innerContent, handleClick, title, isExpanded, popoverId) { + return createElement("a", { ref: function(el) { + setRef(rootElRef, el); + setRef(_this.rootElRef, el); + }, className: ["fc-timegrid-more-link"].concat(classNames).join(" "), style: { top: props.top, bottom: props.bottom }, onClick: handleClick, title, "aria-expanded": isExpanded, "aria-controls": popoverId }, createElement("div", { ref: innerElRef, className: "fc-timegrid-more-link-inner fc-sticky" }, innerContent)); }); }; - return TableCellTop2; + return TimeColMoreLink2; }(BaseComponent); -function renderTopInner(props) { - return props.dayNumberText; -} -var DEFAULT_TABLE_EVENT_TIME_FORMAT = createFormatter({ - hour: "numeric", - minute: "2-digit", - omitZeroMinute: true, - meridiem: "narrow" -}); -function hasListItemDisplay(seg) { - var display = seg.eventRange.ui.display; - return display === "list-item" || display === "auto" && !seg.eventRange.def.allDay && seg.firstCol === seg.lastCol && seg.isStart && seg.isEnd; +function renderMoreLinkInner2(props) { + return props.shortText; } -var TableBlockEvent = function(_super) { - __extends(TableBlockEvent2, _super); - function TableBlockEvent2() { - return _super !== null && _super.apply(this, arguments) || this; +function buildPositioning(segInputs, strictOrder, maxStackCnt) { + var hierarchy = new SegHierarchy(); + if (strictOrder != null) { + hierarchy.strictOrder = strictOrder; } - TableBlockEvent2.prototype.render = function() { - var props = this.props; - return createElement(StandardEvent, __assign({}, props, { extraClassNames: ["fc-daygrid-event", "fc-daygrid-block-event", "fc-h-event"], defaultTimeFormat: DEFAULT_TABLE_EVENT_TIME_FORMAT, defaultDisplayEventEnd: props.defaultDisplayEventEnd, disableResizing: !props.seg.eventRange.def.allDay })); - }; - return TableBlockEvent2; -}(BaseComponent); -var TableListItemEvent = function(_super) { - __extends(TableListItemEvent2, _super); - function TableListItemEvent2() { - return _super !== null && _super.apply(this, arguments) || this; + if (maxStackCnt != null) { + hierarchy.maxStackCnt = maxStackCnt; } - TableListItemEvent2.prototype.render = function() { - var _a = this, props = _a.props, context = _a.context; - var timeFormat = context.options.eventTimeFormat || DEFAULT_TABLE_EVENT_TIME_FORMAT; - var timeText = buildSegTimeText(props.seg, timeFormat, context, true, props.defaultDisplayEventEnd); - return createElement(EventRoot, { seg: props.seg, timeText, defaultContent: renderInnerContent2, isDragging: props.isDragging, isResizing: false, isDateSelecting: false, isSelected: props.isSelected, isPast: props.isPast, isFuture: props.isFuture, isToday: props.isToday }, function(rootElRef, classNames, innerElRef, innerContent) { - return createElement("a", __assign({ className: ["fc-daygrid-event", "fc-daygrid-dot-event"].concat(classNames).join(" "), ref: rootElRef }, getSegAnchorAttrs(props.seg, context)), innerContent); - }); - }; - return TableListItemEvent2; -}(BaseComponent); -function renderInnerContent2(innerProps) { - return createElement(Fragment, null, createElement("div", { className: "fc-daygrid-event-dot", style: { borderColor: innerProps.borderColor || innerProps.backgroundColor } }), innerProps.timeText && createElement("div", { className: "fc-event-time" }, innerProps.timeText), createElement("div", { className: "fc-event-title" }, innerProps.event.title || createElement(Fragment, null, "\xA0"))); + var hiddenEntries = hierarchy.addSegs(segInputs); + var hiddenGroups = groupIntersectingEntries(hiddenEntries); + var web = buildWeb(hierarchy); + web = stretchWeb(web, 1); + var segRects = webToRects(web); + return { segRects, hiddenGroups }; } -var TableCellMoreLink = function(_super) { - __extends(TableCellMoreLink2, _super); - function TableCellMoreLink2() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.compileSegs = memoize(compileSegs); - return _this; +function buildWeb(hierarchy) { + var entriesByLevel = hierarchy.entriesByLevel; + var buildNode = cacheable(function(level, lateral) { + return level + ":" + lateral; + }, function(level, lateral) { + var siblingRange = findNextLevelSegs(hierarchy, level, lateral); + var nextLevelRes = buildNodes(siblingRange, buildNode); + var entry = entriesByLevel[level][lateral]; + return [ + __assign(__assign({}, entry), { nextLevelNodes: nextLevelRes[0] }), + entry.thickness + nextLevelRes[1] + ]; + }); + return buildNodes(entriesByLevel.length ? { level: 0, lateralStart: 0, lateralEnd: entriesByLevel[0].length } : null, buildNode)[0]; +} +function buildNodes(siblingRange, buildNode) { + if (!siblingRange) { + return [[], 0]; } - TableCellMoreLink2.prototype.render = function() { - var props = this.props; - var _a = this.compileSegs(props.singlePlacements), allSegs = _a.allSegs, invisibleSegs = _a.invisibleSegs; - return createElement(MoreLinkRoot, { dateProfile: props.dateProfile, todayRange: props.todayRange, allDayDate: props.allDayDate, moreCnt: props.moreCnt, allSegs, hiddenSegs: invisibleSegs, alignmentElRef: props.alignmentElRef, alignGridTop: props.alignGridTop, extraDateSpan: props.extraDateSpan, popoverContent: function() { - var isForcedInvisible = (props.eventDrag ? props.eventDrag.affectedInstances : null) || (props.eventResize ? props.eventResize.affectedInstances : null) || {}; - return createElement(Fragment, null, allSegs.map(function(seg) { - var instanceId = seg.eventRange.instance.instanceId; - return createElement("div", { className: "fc-daygrid-event-harness", key: instanceId, style: { - visibility: isForcedInvisible[instanceId] ? "hidden" : "" - } }, hasListItemDisplay(seg) ? createElement(TableListItemEvent, __assign({ seg, isDragging: false, isSelected: instanceId === props.eventSelection, defaultDisplayEventEnd: false }, getSegMeta(seg, props.todayRange))) : createElement(TableBlockEvent, __assign({ seg, isDragging: false, isResizing: false, isDateSelecting: false, isSelected: instanceId === props.eventSelection, defaultDisplayEventEnd: false }, getSegMeta(seg, props.todayRange)))); - })); - } }, function(rootElRef, classNames, innerElRef, innerContent, handleClick, title, isExpanded, popoverId) { - return createElement("a", __assign({ ref: rootElRef, className: ["fc-daygrid-more-link"].concat(classNames).join(" "), title, "aria-expanded": isExpanded, "aria-controls": popoverId }, createAriaClickAttrs(handleClick)), innerContent); - }); - }; - return TableCellMoreLink2; -}(BaseComponent); -function compileSegs(singlePlacements) { - var allSegs = []; - var invisibleSegs = []; - for (var _i = 0, singlePlacements_1 = singlePlacements; _i < singlePlacements_1.length; _i++) { - var placement = singlePlacements_1[_i]; - allSegs.push(placement.seg); - if (!placement.isVisible) { - invisibleSegs.push(placement.seg); - } + var level = siblingRange.level, lateralStart = siblingRange.lateralStart, lateralEnd = siblingRange.lateralEnd; + var lateral = lateralStart; + var pairs = []; + while (lateral < lateralEnd) { + pairs.push(buildNode(level, lateral)); + lateral += 1; } - return { allSegs, invisibleSegs }; + pairs.sort(cmpDescPressures); + return [ + pairs.map(extractNode), + pairs[0][1] + ]; } -var DEFAULT_WEEK_NUM_FORMAT = createFormatter({ week: "narrow" }); -var TableCell = function(_super) { - __extends(TableCell2, _super); - function TableCell2() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.rootElRef = createRef(); - _this.state = { - dayNumberId: getUniqueDomId() - }; - _this.handleRootEl = function(el) { - setRef(_this.rootElRef, el); - setRef(_this.props.elRef, el); - }; - return _this; - } - TableCell2.prototype.render = function() { - var _a = this, context = _a.context, props = _a.props, state = _a.state, rootElRef = _a.rootElRef; - var date = props.date, dateProfile = props.dateProfile; - var navLinkAttrs = buildNavLinkAttrs(context, date, "week"); - return createElement(DayCellRoot, { date, dateProfile, todayRange: props.todayRange, showDayNumber: props.showDayNumber, extraHookProps: props.extraHookProps, elRef: this.handleRootEl }, function(dayElRef, dayClassNames, rootDataAttrs, isDisabled) { - return createElement("td", __assign({ ref: dayElRef, role: "gridcell", className: ["fc-daygrid-day"].concat(dayClassNames, props.extraClassNames || []).join(" ") }, rootDataAttrs, props.extraDataAttrs, props.showDayNumber ? { "aria-labelledby": state.dayNumberId } : {}), createElement("div", { className: "fc-daygrid-day-frame fc-scrollgrid-sync-inner", ref: props.innerElRef }, props.showWeekNumber && createElement(WeekNumberRoot, { date, defaultFormat: DEFAULT_WEEK_NUM_FORMAT }, function(weekElRef, weekClassNames, innerElRef, innerContent) { - return createElement("a", __assign({ ref: weekElRef, className: ["fc-daygrid-week-number"].concat(weekClassNames).join(" ") }, navLinkAttrs), innerContent); - }), !isDisabled && createElement(TableCellTop, { date, dateProfile, showDayNumber: props.showDayNumber, dayNumberId: state.dayNumberId, forceDayTop: props.forceDayTop, todayRange: props.todayRange, extraHookProps: props.extraHookProps }), createElement("div", { className: "fc-daygrid-day-events", ref: props.fgContentElRef }, props.fgContent, createElement("div", { className: "fc-daygrid-day-bottom", style: { marginTop: props.moreMarginTop } }, createElement(TableCellMoreLink, { allDayDate: date, singlePlacements: props.singlePlacements, moreCnt: props.moreCnt, alignmentElRef: rootElRef, alignGridTop: !props.showDayNumber, extraDateSpan: props.extraDateSpan, dateProfile: props.dateProfile, eventSelection: props.eventSelection, eventDrag: props.eventDrag, eventResize: props.eventResize, todayRange: props.todayRange }))), createElement("div", { className: "fc-daygrid-day-bg" }, props.bgContent))); - }); - }; - return TableCell2; -}(DateComponent); -function computeFgSegPlacement(segs, dayMaxEvents, dayMaxEventRows, strictOrder, eventInstanceHeights, maxContentHeight, cells) { - var hierarchy = new DayGridSegHierarchy(); - hierarchy.allowReslicing = true; - hierarchy.strictOrder = strictOrder; - if (dayMaxEvents === true || dayMaxEventRows === true) { - hierarchy.maxCoord = maxContentHeight; - hierarchy.hiddenConsumes = true; - } else if (typeof dayMaxEvents === "number") { - hierarchy.maxStackCnt = dayMaxEvents; - } else if (typeof dayMaxEventRows === "number") { - hierarchy.maxStackCnt = dayMaxEventRows; - hierarchy.hiddenConsumes = true; +function cmpDescPressures(a3, b3) { + return b3[1] - a3[1]; +} +function extractNode(a3) { + return a3[0]; +} +function findNextLevelSegs(hierarchy, subjectLevel, subjectLateral) { + var levelCoords = hierarchy.levelCoords, entriesByLevel = hierarchy.entriesByLevel; + var subjectEntry = entriesByLevel[subjectLevel][subjectLateral]; + var afterSubject = levelCoords[subjectLevel] + subjectEntry.thickness; + var levelCnt = levelCoords.length; + var level = subjectLevel; + for (; level < levelCnt && levelCoords[level] < afterSubject; level += 1) + ; + for (; level < levelCnt; level += 1) { + var entries = entriesByLevel[level]; + var entry = void 0; + var searchIndex = binarySearch(entries, subjectEntry.span.start, getEntrySpanEnd); + var lateralStart = searchIndex[0] + searchIndex[1]; + var lateralEnd = lateralStart; + while ((entry = entries[lateralEnd]) && entry.span.start < subjectEntry.span.end) { + lateralEnd += 1; + } + if (lateralStart < lateralEnd) { + return { level, lateralStart, lateralEnd }; + } } - var segInputs = []; - var unknownHeightSegs = []; - for (var i3 = 0; i3 < segs.length; i3 += 1) { - var seg = segs[i3]; - var instanceId = seg.eventRange.instance.instanceId; - var eventHeight = eventInstanceHeights[instanceId]; - if (eventHeight != null) { - segInputs.push({ - index: i3, - thickness: eventHeight, - span: { - start: seg.firstCol, - end: seg.lastCol + 1 - } - }); + return null; +} +function stretchWeb(topLevelNodes, totalThickness) { + var stretchNode = cacheable(function(node, startCoord, prevThickness) { + return buildEntryKey(node); + }, function(node, startCoord, prevThickness) { + var nextLevelNodes = node.nextLevelNodes, thickness = node.thickness; + var allThickness = thickness + prevThickness; + var thicknessFraction = thickness / allThickness; + var endCoord; + var newChildren = []; + if (!nextLevelNodes.length) { + endCoord = totalThickness; } else { - unknownHeightSegs.push(seg); + for (var _i = 0, nextLevelNodes_1 = nextLevelNodes; _i < nextLevelNodes_1.length; _i++) { + var childNode = nextLevelNodes_1[_i]; + if (endCoord === void 0) { + var res = stretchNode(childNode, startCoord, allThickness); + endCoord = res[0]; + newChildren.push(res[1]); + } else { + var res = stretchNode(childNode, endCoord, 0); + newChildren.push(res[1]); + } + } } - } - var hiddenEntries = hierarchy.addSegs(segInputs); - var segRects = hierarchy.toRects(); - var _a = placeRects(segRects, segs, cells), singleColPlacements = _a.singleColPlacements, multiColPlacements = _a.multiColPlacements, leftoverMargins = _a.leftoverMargins; - var moreCnts = []; - var moreMarginTops = []; - for (var _i = 0, unknownHeightSegs_1 = unknownHeightSegs; _i < unknownHeightSegs_1.length; _i++) { - var seg = unknownHeightSegs_1[_i]; - multiColPlacements[seg.firstCol].push({ - seg, - isVisible: false, - isAbsolute: true, - absoluteTop: 0, - marginTop: 0 + var newThickness = (endCoord - startCoord) * thicknessFraction; + return [endCoord - newThickness, __assign(__assign({}, node), { thickness: newThickness, nextLevelNodes: newChildren })]; + }); + return topLevelNodes.map(function(node) { + return stretchNode(node, 0, 0)[1]; + }); +} +function webToRects(topLevelNodes) { + var rects = []; + var processNode = cacheable(function(node, levelCoord, stackDepth) { + return buildEntryKey(node); + }, function(node, levelCoord, stackDepth) { + var rect = __assign(__assign({}, node), { + levelCoord, + stackDepth, + stackForward: 0 }); - for (var col = seg.firstCol; col <= seg.lastCol; col += 1) { - singleColPlacements[col].push({ - seg: resliceSeg(seg, col, col + 1, cells), - isVisible: false, - isAbsolute: false, - absoluteTop: 0, - marginTop: 0 - }); + rects.push(rect); + return rect.stackForward = processNodes(node.nextLevelNodes, levelCoord + node.thickness, stackDepth + 1) + 1; + }); + function processNodes(nodes, levelCoord, stackDepth) { + var stackForward = 0; + for (var _i = 0, nodes_1 = nodes; _i < nodes_1.length; _i++) { + var node = nodes_1[_i]; + stackForward = Math.max(processNode(node, levelCoord, stackDepth), stackForward); } + return stackForward; } - for (var col = 0; col < cells.length; col += 1) { - moreCnts.push(0); - } - for (var _b = 0, hiddenEntries_1 = hiddenEntries; _b < hiddenEntries_1.length; _b++) { - var hiddenEntry = hiddenEntries_1[_b]; - var seg = segs[hiddenEntry.index]; - var hiddenSpan = hiddenEntry.span; - multiColPlacements[hiddenSpan.start].push({ - seg: resliceSeg(seg, hiddenSpan.start, hiddenSpan.end, cells), - isVisible: false, - isAbsolute: true, - absoluteTop: 0, - marginTop: 0 - }); - for (var col = hiddenSpan.start; col < hiddenSpan.end; col += 1) { - moreCnts[col] += 1; - singleColPlacements[col].push({ - seg: resliceSeg(seg, col, col + 1, cells), - isVisible: false, - isAbsolute: false, - absoluteTop: 0, - marginTop: 0 - }); + processNodes(topLevelNodes, 0, 0); + return rects; +} +function cacheable(keyFunc, workFunc) { + var cache = {}; + return function() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; } + var key = keyFunc.apply(void 0, args); + return key in cache ? cache[key] : cache[key] = workFunc.apply(void 0, args); + }; +} +function computeSegVCoords(segs, colDate, slatCoords, eventMinHeight) { + if (slatCoords === void 0) { + slatCoords = null; } - for (var col = 0; col < cells.length; col += 1) { - moreMarginTops.push(leftoverMargins[col]); + if (eventMinHeight === void 0) { + eventMinHeight = 0; } - return { singleColPlacements, multiColPlacements, moreCnts, moreMarginTops }; -} -function placeRects(allRects, segs, cells) { - var rectsByEachCol = groupRectsByEachCol(allRects, cells.length); - var singleColPlacements = []; - var multiColPlacements = []; - var leftoverMargins = []; - for (var col = 0; col < cells.length; col += 1) { - var rects = rectsByEachCol[col]; - var singlePlacements = []; - var currentHeight = 0; - var currentMarginTop = 0; - for (var _i = 0, rects_1 = rects; _i < rects_1.length; _i++) { - var rect = rects_1[_i]; - var seg = segs[rect.index]; - singlePlacements.push({ - seg: resliceSeg(seg, col, col + 1, cells), - isVisible: true, - isAbsolute: false, - absoluteTop: rect.levelCoord, - marginTop: rect.levelCoord - currentHeight - }); - currentHeight = rect.levelCoord + rect.thickness; - } - var multiPlacements = []; - currentHeight = 0; - currentMarginTop = 0; - for (var _a = 0, rects_2 = rects; _a < rects_2.length; _a++) { - var rect = rects_2[_a]; - var seg = segs[rect.index]; - var isAbsolute = rect.span.end - rect.span.start > 1; - var isFirstCol = rect.span.start === col; - currentMarginTop += rect.levelCoord - currentHeight; - currentHeight = rect.levelCoord + rect.thickness; - if (isAbsolute) { - currentMarginTop += rect.thickness; - if (isFirstCol) { - multiPlacements.push({ - seg: resliceSeg(seg, rect.span.start, rect.span.end, cells), - isVisible: true, - isAbsolute: true, - absoluteTop: rect.levelCoord, - marginTop: 0 - }); - } - } else if (isFirstCol) { - multiPlacements.push({ - seg: resliceSeg(seg, rect.span.start, rect.span.end, cells), - isVisible: true, - isAbsolute: false, - absoluteTop: rect.levelCoord, - marginTop: currentMarginTop - }); - currentMarginTop = 0; - } + var vcoords = []; + if (slatCoords) { + for (var i3 = 0; i3 < segs.length; i3 += 1) { + var seg = segs[i3]; + var spanStart = slatCoords.computeDateTop(seg.start, colDate); + var spanEnd = Math.max(spanStart + (eventMinHeight || 0), slatCoords.computeDateTop(seg.end, colDate)); + vcoords.push({ + start: Math.round(spanStart), + end: Math.round(spanEnd) + }); } - singleColPlacements.push(singlePlacements); - multiColPlacements.push(multiPlacements); - leftoverMargins.push(currentMarginTop); } - return { singleColPlacements, multiColPlacements, leftoverMargins }; + return vcoords; } -function groupRectsByEachCol(rects, colCnt) { - var rectsByEachCol = []; - for (var col = 0; col < colCnt; col += 1) { - rectsByEachCol.push([]); - } - for (var _i = 0, rects_3 = rects; _i < rects_3.length; _i++) { - var rect = rects_3[_i]; - for (var col = rect.span.start; col < rect.span.end; col += 1) { - rectsByEachCol[col].push(rect); +function computeFgSegPlacements(segs, segVCoords, eventOrderStrict, eventMaxStack) { + var segInputs = []; + var dumbSegs = []; + for (var i3 = 0; i3 < segs.length; i3 += 1) { + var vcoords = segVCoords[i3]; + if (vcoords) { + segInputs.push({ + index: i3, + thickness: 1, + span: vcoords + }); + } else { + dumbSegs.push(segs[i3]); } } - return rectsByEachCol; -} -function resliceSeg(seg, spanStart, spanEnd, cells) { - if (seg.firstCol === spanStart && seg.lastCol === spanEnd - 1) { - return seg; + var _a = buildPositioning(segInputs, eventOrderStrict, eventMaxStack), segRects = _a.segRects, hiddenGroups = _a.hiddenGroups; + var segPlacements = []; + for (var _i = 0, segRects_1 = segRects; _i < segRects_1.length; _i++) { + var segRect = segRects_1[_i]; + segPlacements.push({ + seg: segs[segRect.index], + rect: segRect + }); } - var eventRange = seg.eventRange; - var origRange = eventRange.range; - var slicedRange = intersectRanges(origRange, { - start: cells[spanStart].date, - end: addDays(cells[spanEnd - 1].date, 1) - }); - return __assign(__assign({}, seg), { firstCol: spanStart, lastCol: spanEnd - 1, eventRange: { - def: eventRange.def, - ui: __assign(__assign({}, eventRange.ui), { durationEditable: false }), - instance: eventRange.instance, - range: slicedRange - }, isStart: seg.isStart && slicedRange.start.valueOf() === origRange.start.valueOf(), isEnd: seg.isEnd && slicedRange.end.valueOf() === origRange.end.valueOf() }); + for (var _b = 0, dumbSegs_1 = dumbSegs; _b < dumbSegs_1.length; _b++) { + var dumbSeg = dumbSegs_1[_b]; + segPlacements.push({ seg: dumbSeg, rect: null }); + } + return { segPlacements, hiddenGroups }; } -var DayGridSegHierarchy = function(_super) { - __extends(DayGridSegHierarchy2, _super); - function DayGridSegHierarchy2() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.hiddenConsumes = false; - _this.forceHidden = {}; - return _this; +var DEFAULT_TIME_FORMAT = createFormatter({ + hour: "numeric", + minute: "2-digit", + meridiem: false +}); +var TimeColEvent = function(_super) { + __extends(TimeColEvent2, _super); + function TimeColEvent2() { + return _super !== null && _super.apply(this, arguments) || this; } - DayGridSegHierarchy2.prototype.addSegs = function(segInputs) { - var _this = this; - var hiddenSegs = _super.prototype.addSegs.call(this, segInputs); - var entriesByLevel = this.entriesByLevel; - var excludeHidden = function(entry) { - return !_this.forceHidden[buildEntryKey(entry)]; - }; - for (var level = 0; level < entriesByLevel.length; level += 1) { - entriesByLevel[level] = entriesByLevel[level].filter(excludeHidden); + TimeColEvent2.prototype.render = function() { + var classNames = [ + "fc-timegrid-event", + "fc-v-event" + ]; + if (this.props.isShort) { + classNames.push("fc-timegrid-event-short"); } - return hiddenSegs; + return createElement(StandardEvent, __assign({}, this.props, { defaultTimeFormat: DEFAULT_TIME_FORMAT, extraClassNames: classNames })); }; - DayGridSegHierarchy2.prototype.handleInvalidInsertion = function(insertion, entry, hiddenEntries) { - var _a = this, entriesByLevel = _a.entriesByLevel, forceHidden = _a.forceHidden; - var touchingEntry = insertion.touchingEntry, touchingLevel = insertion.touchingLevel, touchingLateral = insertion.touchingLateral; - if (this.hiddenConsumes && touchingEntry) { - var touchingEntryId = buildEntryKey(touchingEntry); - if (!forceHidden[touchingEntryId]) { - if (this.allowReslicing) { - var placeholderEntry = __assign(__assign({}, touchingEntry), { span: intersectSpans(touchingEntry.span, entry.span) }); - var placeholderEntryId = buildEntryKey(placeholderEntry); - forceHidden[placeholderEntryId] = true; - entriesByLevel[touchingLevel][touchingLateral] = placeholderEntry; - this.splitEntry(touchingEntry, entry, hiddenEntries); - } else { - forceHidden[touchingEntryId] = true; - hiddenEntries.push(touchingEntry); - } - } - } - return _super.prototype.handleInvalidInsertion.call(this, insertion, entry, hiddenEntries); + return TimeColEvent2; +}(BaseComponent); +var TimeColMisc = function(_super) { + __extends(TimeColMisc2, _super); + function TimeColMisc2() { + return _super !== null && _super.apply(this, arguments) || this; + } + TimeColMisc2.prototype.render = function() { + var props = this.props; + return createElement(DayCellContent, { date: props.date, dateProfile: props.dateProfile, todayRange: props.todayRange, extraHookProps: props.extraHookProps }, function(innerElRef, innerContent) { + return innerContent && createElement("div", { className: "fc-timegrid-col-misc", ref: innerElRef }, innerContent); + }); }; - return DayGridSegHierarchy2; -}(SegHierarchy); -var TableRow = function(_super) { - __extends(TableRow2, _super); - function TableRow2() { + return TimeColMisc2; +}(BaseComponent); +var TimeCol = function(_super) { + __extends(TimeCol2, _super); + function TimeCol2() { var _this = _super !== null && _super.apply(this, arguments) || this; - _this.cellElRefs = new RefMap(); - _this.frameElRefs = new RefMap(); - _this.fgElRefs = new RefMap(); - _this.segHarnessRefs = new RefMap(); - _this.rootElRef = createRef(); - _this.state = { - framePositions: null, - maxContentHeight: null, - eventInstanceHeights: {} - }; + _this.sortEventSegs = memoize(sortEventSegs); return _this; } - TableRow2.prototype.render = function() { + TimeCol2.prototype.render = function() { var _this = this; - var _a = this, props = _a.props, state = _a.state, context = _a.context; - var options = context.options; - var colCnt = props.cells.length; - var businessHoursByCol = splitSegsByFirstCol(props.businessHourSegs, colCnt); - var bgEventSegsByCol = splitSegsByFirstCol(props.bgEventSegs, colCnt); - var highlightSegsByCol = splitSegsByFirstCol(this.getHighlightSegs(), colCnt); - var mirrorSegsByCol = splitSegsByFirstCol(this.getMirrorSegs(), colCnt); - var _b = computeFgSegPlacement(sortEventSegs(props.fgEventSegs, options.eventOrder), props.dayMaxEvents, props.dayMaxEventRows, options.eventOrderStrict, state.eventInstanceHeights, state.maxContentHeight, props.cells), singleColPlacements = _b.singleColPlacements, multiColPlacements = _b.multiColPlacements, moreCnts = _b.moreCnts, moreMarginTops = _b.moreMarginTops; - var isForcedInvisible = props.eventDrag && props.eventDrag.affectedInstances || props.eventResize && props.eventResize.affectedInstances || {}; - return createElement("tr", { ref: this.rootElRef, role: "row" }, props.renderIntro && props.renderIntro(), props.cells.map(function(cell, col) { - var normalFgNodes = _this.renderFgSegs(col, props.forPrint ? singleColPlacements[col] : multiColPlacements[col], props.todayRange, isForcedInvisible); - var mirrorFgNodes = _this.renderFgSegs(col, buildMirrorPlacements(mirrorSegsByCol[col], multiColPlacements), props.todayRange, {}, Boolean(props.eventDrag), Boolean(props.eventResize), false); - return createElement(TableCell, { key: cell.key, elRef: _this.cellElRefs.createRef(cell.key), innerElRef: _this.frameElRefs.createRef(cell.key), dateProfile: props.dateProfile, date: cell.date, showDayNumber: props.showDayNumbers, showWeekNumber: props.showWeekNumbers && col === 0, forceDayTop: props.showWeekNumbers, todayRange: props.todayRange, eventSelection: props.eventSelection, eventDrag: props.eventDrag, eventResize: props.eventResize, extraHookProps: cell.extraHookProps, extraDataAttrs: cell.extraDataAttrs, extraClassNames: cell.extraClassNames, extraDateSpan: cell.extraDateSpan, moreCnt: moreCnts[col], moreMarginTop: moreMarginTops[col], singlePlacements: singleColPlacements[col], fgContentElRef: _this.fgElRefs.createRef(cell.key), fgContent: createElement(Fragment, null, createElement(Fragment, null, normalFgNodes), createElement(Fragment, null, mirrorFgNodes)), bgContent: createElement(Fragment, null, _this.renderFillSegs(highlightSegsByCol[col], "highlight"), _this.renderFillSegs(businessHoursByCol[col], "non-business"), _this.renderFillSegs(bgEventSegsByCol[col], "bg-event")) }); - })); - }; - TableRow2.prototype.componentDidMount = function() { - this.updateSizing(true); - }; - TableRow2.prototype.componentDidUpdate = function(prevProps, prevState) { - var currentProps = this.props; - this.updateSizing(!isPropsEqual(prevProps, currentProps)); - }; - TableRow2.prototype.getHighlightSegs = function() { - var props = this.props; - if (props.eventDrag && props.eventDrag.segs.length) { - return props.eventDrag.segs; - } - if (props.eventResize && props.eventResize.segs.length) { - return props.eventResize.segs; - } - return props.dateSelectionSegs; + var _a = this, props = _a.props, context = _a.context; + var isSelectMirror = context.options.selectMirror; + var mirrorSegs = props.eventDrag && props.eventDrag.segs || props.eventResize && props.eventResize.segs || isSelectMirror && props.dateSelectionSegs || []; + var interactionAffectedInstances = props.eventDrag && props.eventDrag.affectedInstances || props.eventResize && props.eventResize.affectedInstances || {}; + var sortedFgSegs = this.sortEventSegs(props.fgEventSegs, context.options.eventOrder); + return createElement(DayCellRoot, { elRef: props.elRef, date: props.date, dateProfile: props.dateProfile, todayRange: props.todayRange, extraHookProps: props.extraHookProps }, function(rootElRef, classNames, dataAttrs) { + return createElement("td", __assign({ ref: rootElRef, role: "gridcell", className: ["fc-timegrid-col"].concat(classNames, props.extraClassNames || []).join(" ") }, dataAttrs, props.extraDataAttrs), createElement("div", { className: "fc-timegrid-col-frame" }, createElement("div", { className: "fc-timegrid-col-bg" }, _this.renderFillSegs(props.businessHourSegs, "non-business"), _this.renderFillSegs(props.bgEventSegs, "bg-event"), _this.renderFillSegs(props.dateSelectionSegs, "highlight")), createElement("div", { className: "fc-timegrid-col-events" }, _this.renderFgSegs(sortedFgSegs, interactionAffectedInstances, false, false, false)), createElement("div", { className: "fc-timegrid-col-events" }, _this.renderFgSegs(mirrorSegs, {}, Boolean(props.eventDrag), Boolean(props.eventResize), Boolean(isSelectMirror))), createElement("div", { className: "fc-timegrid-now-indicator-container" }, _this.renderNowIndicator(props.nowIndicatorSegs)), createElement(TimeColMisc, { date: props.date, dateProfile: props.dateProfile, todayRange: props.todayRange, extraHookProps: props.extraHookProps }))); + }); }; - TableRow2.prototype.getMirrorSegs = function() { + TimeCol2.prototype.renderFgSegs = function(sortedFgSegs, segIsInvisible, isDragging, isResizing, isDateSelecting) { var props = this.props; - if (props.eventResize && props.eventResize.segs.length) { - return props.eventResize.segs; + if (props.forPrint) { + return renderPlainFgSegs(sortedFgSegs, props); } - return []; + return this.renderPositionedFgSegs(sortedFgSegs, segIsInvisible, isDragging, isResizing, isDateSelecting); }; - TableRow2.prototype.renderFgSegs = function(col, segPlacements, todayRange, isForcedInvisible, isDragging, isResizing, isDateSelecting) { - var context = this.context; - var eventSelection = this.props.eventSelection; - var framePositions = this.state.framePositions; - var defaultDisplayEventEnd = this.props.cells.length === 1; + TimeCol2.prototype.renderPositionedFgSegs = function(segs, segIsInvisible, isDragging, isResizing, isDateSelecting) { + var _this = this; + var _a = this.context.options, eventMaxStack = _a.eventMaxStack, eventShortHeight = _a.eventShortHeight, eventOrderStrict = _a.eventOrderStrict, eventMinHeight = _a.eventMinHeight; + var _b = this.props, date = _b.date, slatCoords = _b.slatCoords, eventSelection = _b.eventSelection, todayRange = _b.todayRange, nowDate = _b.nowDate; var isMirror = isDragging || isResizing || isDateSelecting; - var nodes = []; - if (framePositions) { - for (var _i = 0, segPlacements_1 = segPlacements; _i < segPlacements_1.length; _i++) { - var placement = segPlacements_1[_i]; - var seg = placement.seg; - var instanceId = seg.eventRange.instance.instanceId; - var key = instanceId + ":" + col; - var isVisible = placement.isVisible && !isForcedInvisible[instanceId]; - var isAbsolute = placement.isAbsolute; - var left = ""; - var right = ""; - if (isAbsolute) { - if (context.isRtl) { - right = 0; - left = framePositions.lefts[seg.lastCol] - framePositions.lefts[seg.firstCol]; - } else { - left = 0; - right = framePositions.rights[seg.firstCol] - framePositions.rights[seg.lastCol]; - } - } - nodes.push(createElement("div", { className: "fc-daygrid-event-harness" + (isAbsolute ? " fc-daygrid-event-harness-abs" : ""), key, ref: isMirror ? null : this.segHarnessRefs.createRef(key), style: { - visibility: isVisible ? "" : "hidden", - marginTop: isAbsolute ? "" : placement.marginTop, - top: isAbsolute ? placement.absoluteTop : "", - left, - right - } }, hasListItemDisplay(seg) ? createElement(TableListItemEvent, __assign({ seg, isDragging, isSelected: instanceId === eventSelection, defaultDisplayEventEnd }, getSegMeta(seg, todayRange))) : createElement(TableBlockEvent, __assign({ seg, isDragging, isResizing, isDateSelecting, isSelected: instanceId === eventSelection, defaultDisplayEventEnd }, getSegMeta(seg, todayRange))))); - } - } - return nodes; + var segVCoords = computeSegVCoords(segs, date, slatCoords, eventMinHeight); + var _c = computeFgSegPlacements(segs, segVCoords, eventOrderStrict, eventMaxStack), segPlacements = _c.segPlacements, hiddenGroups = _c.hiddenGroups; + return createElement(Fragment, null, this.renderHiddenGroups(hiddenGroups, segs), segPlacements.map(function(segPlacement) { + var seg = segPlacement.seg, rect = segPlacement.rect; + var instanceId = seg.eventRange.instance.instanceId; + var isVisible = isMirror || Boolean(!segIsInvisible[instanceId] && rect); + var vStyle = computeSegVStyle(rect && rect.span); + var hStyle = !isMirror && rect ? _this.computeSegHStyle(rect) : { left: 0, right: 0 }; + var isInset = Boolean(rect) && rect.stackForward > 0; + var isShort = Boolean(rect) && rect.span.end - rect.span.start < eventShortHeight; + return createElement("div", { className: "fc-timegrid-event-harness" + (isInset ? " fc-timegrid-event-harness-inset" : ""), key: instanceId, style: __assign(__assign({ visibility: isVisible ? "" : "hidden" }, vStyle), hStyle) }, createElement(TimeColEvent, __assign({ seg, isDragging, isResizing, isDateSelecting, isSelected: instanceId === eventSelection, isShort }, getSegMeta(seg, todayRange, nowDate)))); + })); }; - TableRow2.prototype.renderFillSegs = function(segs, fillType) { - var isRtl = this.context.isRtl; - var todayRange = this.props.todayRange; - var framePositions = this.state.framePositions; - var nodes = []; - if (framePositions) { - for (var _i = 0, segs_1 = segs; _i < segs_1.length; _i++) { - var seg = segs_1[_i]; - var leftRightCss = isRtl ? { - right: 0, - left: framePositions.lefts[seg.lastCol] - framePositions.lefts[seg.firstCol] - } : { - left: 0, - right: framePositions.rights[seg.firstCol] - framePositions.rights[seg.lastCol] - }; - nodes.push(createElement("div", { key: buildEventRangeKey(seg.eventRange), className: "fc-daygrid-bg-harness", style: leftRightCss }, fillType === "bg-event" ? createElement(BgEvent, __assign({ seg }, getSegMeta(seg, todayRange))) : renderFill(fillType))); - } - } - return createElement.apply(void 0, __spreadArray([Fragment, {}], nodes)); + TimeCol2.prototype.renderHiddenGroups = function(hiddenGroups, segs) { + var _a = this.props, extraDateSpan = _a.extraDateSpan, dateProfile = _a.dateProfile, todayRange = _a.todayRange, nowDate = _a.nowDate, eventSelection = _a.eventSelection, eventDrag = _a.eventDrag, eventResize = _a.eventResize; + return createElement(Fragment, null, hiddenGroups.map(function(hiddenGroup) { + var positionCss = computeSegVStyle(hiddenGroup.span); + var hiddenSegs = compileSegsFromEntries(hiddenGroup.entries, segs); + return createElement(TimeColMoreLink, { key: buildIsoString(computeEarliestSegStart(hiddenSegs)), hiddenSegs, top: positionCss.top, bottom: positionCss.bottom, extraDateSpan, dateProfile, todayRange, nowDate, eventSelection, eventDrag, eventResize }); + })); }; - TableRow2.prototype.updateSizing = function(isExternalSizingChange) { - var _a = this, props = _a.props, frameElRefs = _a.frameElRefs; - if (!props.forPrint && props.clientWidth !== null) { - if (isExternalSizingChange) { - var frameEls = props.cells.map(function(cell) { - return frameElRefs.currentMap[cell.key]; - }); - if (frameEls.length) { - var originEl = this.rootElRef.current; - this.setState({ - framePositions: new PositionCache(originEl, frameEls, true, false) - }); - } - } - var oldInstanceHeights = this.state.eventInstanceHeights; - var newInstanceHeights = this.queryEventInstanceHeights(); - var limitByContentHeight = props.dayMaxEvents === true || props.dayMaxEventRows === true; - this.safeSetState({ - eventInstanceHeights: __assign(__assign({}, oldInstanceHeights), newInstanceHeights), - maxContentHeight: limitByContentHeight ? this.computeMaxContentHeight() : null - }); - } + TimeCol2.prototype.renderFillSegs = function(segs, fillType) { + var _a = this, props = _a.props, context = _a.context; + var segVCoords = computeSegVCoords(segs, props.date, props.slatCoords, context.options.eventMinHeight); + var children = segVCoords.map(function(vcoords, i3) { + var seg = segs[i3]; + return createElement("div", { key: buildEventRangeKey(seg.eventRange), className: "fc-timegrid-bg-harness", style: computeSegVStyle(vcoords) }, fillType === "bg-event" ? createElement(BgEvent, __assign({ seg }, getSegMeta(seg, props.todayRange, props.nowDate))) : renderFill(fillType)); + }); + return createElement(Fragment, null, children); }; - TableRow2.prototype.queryEventInstanceHeights = function() { - var segElMap = this.segHarnessRefs.currentMap; - var eventInstanceHeights = {}; - for (var key in segElMap) { - var height = Math.round(segElMap[key].getBoundingClientRect().height); - var instanceId = key.split(":")[0]; - eventInstanceHeights[instanceId] = Math.max(eventInstanceHeights[instanceId] || 0, height); + TimeCol2.prototype.renderNowIndicator = function(segs) { + var _a = this.props, slatCoords = _a.slatCoords, date = _a.date; + if (!slatCoords) { + return null; } - return eventInstanceHeights; - }; - TableRow2.prototype.computeMaxContentHeight = function() { - var firstKey = this.props.cells[0].key; - var cellEl = this.cellElRefs.currentMap[firstKey]; - var fcContainerEl = this.fgElRefs.currentMap[firstKey]; - return cellEl.getBoundingClientRect().bottom - fcContainerEl.getBoundingClientRect().top; - }; - TableRow2.prototype.getCellEls = function() { - var elMap = this.cellElRefs.currentMap; - return this.props.cells.map(function(cell) { - return elMap[cell.key]; + return segs.map(function(seg, i3) { + return createElement(NowIndicatorRoot, { + isAxis: false, + date, + key: i3 + }, function(rootElRef, classNames, innerElRef, innerContent) { + return createElement("div", { ref: rootElRef, className: ["fc-timegrid-now-indicator-line"].concat(classNames).join(" "), style: { top: slatCoords.computeDateTop(seg.start, date) } }, innerContent); + }); }); }; - return TableRow2; -}(DateComponent); -TableRow.addStateEquality({ - eventInstanceHeights: isPropsEqual -}); -function buildMirrorPlacements(mirrorSegs, colPlacements) { - if (!mirrorSegs.length) { - return []; - } - var topsByInstanceId = buildAbsoluteTopHash(colPlacements); - return mirrorSegs.map(function(seg) { - return { - seg, - isVisible: true, - isAbsolute: true, - absoluteTop: topsByInstanceId[seg.eventRange.instance.instanceId], - marginTop: 0 + TimeCol2.prototype.computeSegHStyle = function(segHCoords) { + var _a = this.context, isRtl = _a.isRtl, options = _a.options; + var shouldOverlap = options.slotEventOverlap; + var nearCoord = segHCoords.levelCoord; + var farCoord = segHCoords.levelCoord + segHCoords.thickness; + var left; + var right; + if (shouldOverlap) { + farCoord = Math.min(1, nearCoord + (farCoord - nearCoord) * 2); + } + if (isRtl) { + left = 1 - farCoord; + right = nearCoord; + } else { + left = nearCoord; + right = 1 - farCoord; + } + var props = { + zIndex: segHCoords.stackDepth + 1, + left: left * 100 + "%", + right: right * 100 + "%" }; + if (shouldOverlap && !segHCoords.stackForward) { + props[isRtl ? "marginLeft" : "marginRight"] = 10 * 2; + } + return props; + }; + return TimeCol2; +}(BaseComponent); +function renderPlainFgSegs(sortedFgSegs, _a) { + var todayRange = _a.todayRange, nowDate = _a.nowDate, eventSelection = _a.eventSelection, eventDrag = _a.eventDrag, eventResize = _a.eventResize; + var hiddenInstances = (eventDrag ? eventDrag.affectedInstances : null) || (eventResize ? eventResize.affectedInstances : null) || {}; + return createElement(Fragment, null, sortedFgSegs.map(function(seg) { + var instanceId = seg.eventRange.instance.instanceId; + return createElement("div", { key: instanceId, style: { visibility: hiddenInstances[instanceId] ? "hidden" : "" } }, createElement(TimeColEvent, __assign({ seg, isDragging: false, isResizing: false, isDateSelecting: false, isSelected: instanceId === eventSelection, isShort: false }, getSegMeta(seg, todayRange, nowDate)))); + })); +} +function computeSegVStyle(segVCoords) { + if (!segVCoords) { + return { top: "", bottom: "" }; + } + return { + top: segVCoords.start, + bottom: -segVCoords.end + }; +} +function compileSegsFromEntries(segEntries, allSegs) { + return segEntries.map(function(segEntry) { + return allSegs[segEntry.index]; }); } -function buildAbsoluteTopHash(colPlacements) { - var topsByInstanceId = {}; - for (var _i = 0, colPlacements_1 = colPlacements; _i < colPlacements_1.length; _i++) { - var placements = colPlacements_1[_i]; - for (var _a = 0, placements_1 = placements; _a < placements_1.length; _a++) { - var placement = placements_1[_a]; - topsByInstanceId[placement.seg.eventRange.instance.instanceId] = placement.absoluteTop; - } +var TimeColsContent = function(_super) { + __extends(TimeColsContent2, _super); + function TimeColsContent2() { + var _this = _super !== null && _super.apply(this, arguments) || this; + _this.splitFgEventSegs = memoize(splitSegsByCol); + _this.splitBgEventSegs = memoize(splitSegsByCol); + _this.splitBusinessHourSegs = memoize(splitSegsByCol); + _this.splitNowIndicatorSegs = memoize(splitSegsByCol); + _this.splitDateSelectionSegs = memoize(splitSegsByCol); + _this.splitEventDrag = memoize(splitInteractionByCol); + _this.splitEventResize = memoize(splitInteractionByCol); + _this.rootElRef = createRef(); + _this.cellElRefs = new RefMap(); + return _this; } - return topsByInstanceId; + TimeColsContent2.prototype.render = function() { + var _this = this; + var _a = this, props = _a.props, context = _a.context; + var nowIndicatorTop = context.options.nowIndicator && props.slatCoords && props.slatCoords.safeComputeTop(props.nowDate); + var colCnt = props.cells.length; + var fgEventSegsByRow = this.splitFgEventSegs(props.fgEventSegs, colCnt); + var bgEventSegsByRow = this.splitBgEventSegs(props.bgEventSegs, colCnt); + var businessHourSegsByRow = this.splitBusinessHourSegs(props.businessHourSegs, colCnt); + var nowIndicatorSegsByRow = this.splitNowIndicatorSegs(props.nowIndicatorSegs, colCnt); + var dateSelectionSegsByRow = this.splitDateSelectionSegs(props.dateSelectionSegs, colCnt); + var eventDragByRow = this.splitEventDrag(props.eventDrag, colCnt); + var eventResizeByRow = this.splitEventResize(props.eventResize, colCnt); + return createElement("div", { className: "fc-timegrid-cols", ref: this.rootElRef }, createElement("table", { role: "presentation", style: { + minWidth: props.tableMinWidth, + width: props.clientWidth + } }, props.tableColGroupNode, createElement("tbody", { role: "presentation" }, createElement("tr", { role: "row" }, props.axis && createElement("td", { "aria-hidden": true, className: "fc-timegrid-col fc-timegrid-axis" }, createElement("div", { className: "fc-timegrid-col-frame" }, createElement("div", { className: "fc-timegrid-now-indicator-container" }, typeof nowIndicatorTop === "number" && createElement(NowIndicatorRoot, { isAxis: true, date: props.nowDate }, function(rootElRef, classNames, innerElRef, innerContent) { + return createElement("div", { ref: rootElRef, className: ["fc-timegrid-now-indicator-arrow"].concat(classNames).join(" "), style: { top: nowIndicatorTop } }, innerContent); + })))), props.cells.map(function(cell, i3) { + return createElement(TimeCol, { key: cell.key, elRef: _this.cellElRefs.createRef(cell.key), dateProfile: props.dateProfile, date: cell.date, nowDate: props.nowDate, todayRange: props.todayRange, extraHookProps: cell.extraHookProps, extraDataAttrs: cell.extraDataAttrs, extraClassNames: cell.extraClassNames, extraDateSpan: cell.extraDateSpan, fgEventSegs: fgEventSegsByRow[i3], bgEventSegs: bgEventSegsByRow[i3], businessHourSegs: businessHourSegsByRow[i3], nowIndicatorSegs: nowIndicatorSegsByRow[i3], dateSelectionSegs: dateSelectionSegsByRow[i3], eventDrag: eventDragByRow[i3], eventResize: eventResizeByRow[i3], slatCoords: props.slatCoords, eventSelection: props.eventSelection, forPrint: props.forPrint }); + }))))); + }; + TimeColsContent2.prototype.componentDidMount = function() { + this.updateCoords(); + }; + TimeColsContent2.prototype.componentDidUpdate = function() { + this.updateCoords(); + }; + TimeColsContent2.prototype.updateCoords = function() { + var props = this.props; + if (props.onColCoords && props.clientWidth !== null) { + props.onColCoords(new PositionCache(this.rootElRef.current, collectCellEls(this.cellElRefs.currentMap, props.cells), true, false)); + } + }; + return TimeColsContent2; +}(BaseComponent); +function collectCellEls(elMap, cells) { + return cells.map(function(cell) { + return elMap[cell.key]; + }); } -var Table = function(_super) { - __extends(Table2, _super); - function Table2() { +var TimeCols = function(_super) { + __extends(TimeCols2, _super); + function TimeCols2() { var _this = _super !== null && _super.apply(this, arguments) || this; - _this.splitBusinessHourSegs = memoize(splitSegsByRow); - _this.splitBgEventSegs = memoize(splitSegsByRow); - _this.splitFgEventSegs = memoize(splitSegsByRow); - _this.splitDateSelectionSegs = memoize(splitSegsByRow); - _this.splitEventDrag = memoize(splitInteractionByRow); - _this.splitEventResize = memoize(splitInteractionByRow); - _this.rowRefs = new RefMap(); - _this.handleRootEl = function(rootEl) { - _this.rootEl = rootEl; - if (rootEl) { + _this.processSlotOptions = memoize(processSlotOptions); + _this.state = { + slatCoords: null + }; + _this.handleRootEl = function(el) { + if (el) { _this.context.registerInteractiveComponent(_this, { - el: rootEl, + el, isHitComboAllowed: _this.props.isHitComboAllowed }); } else { _this.context.unregisterInteractiveComponent(_this); } }; + _this.handleScrollRequest = function(request2) { + var onScrollTopRequest = _this.props.onScrollTopRequest; + var slatCoords = _this.state.slatCoords; + if (onScrollTopRequest && slatCoords) { + if (request2.time) { + var top_1 = slatCoords.computeTimeTop(request2.time); + top_1 = Math.ceil(top_1); + if (top_1) { + top_1 += 1; + } + onScrollTopRequest(top_1); + } + return true; + } + return false; + }; + _this.handleColCoords = function(colCoords) { + _this.colCoords = colCoords; + }; + _this.handleSlatCoords = function(slatCoords) { + _this.setState({ slatCoords }); + if (_this.props.onSlatCoords) { + _this.props.onSlatCoords(slatCoords); + } + }; return _this; } - Table2.prototype.render = function() { - var _this = this; - var props = this.props; - var dateProfile = props.dateProfile, dayMaxEventRows = props.dayMaxEventRows, dayMaxEvents = props.dayMaxEvents, expandRows = props.expandRows; - var rowCnt = props.cells.length; - var businessHourSegsByRow = this.splitBusinessHourSegs(props.businessHourSegs, rowCnt); - var bgEventSegsByRow = this.splitBgEventSegs(props.bgEventSegs, rowCnt); - var fgEventSegsByRow = this.splitFgEventSegs(props.fgEventSegs, rowCnt); - var dateSelectionSegsByRow = this.splitDateSelectionSegs(props.dateSelectionSegs, rowCnt); - var eventDragByRow = this.splitEventDrag(props.eventDrag, rowCnt); - var eventResizeByRow = this.splitEventResize(props.eventResize, rowCnt); - var limitViaBalanced = dayMaxEvents === true || dayMaxEventRows === true; - if (limitViaBalanced && !expandRows) { - limitViaBalanced = false; - dayMaxEventRows = null; - dayMaxEvents = null; - } - var classNames = [ - "fc-daygrid-body", - limitViaBalanced ? "fc-daygrid-body-balanced" : "fc-daygrid-body-unbalanced", - expandRows ? "" : "fc-daygrid-body-natural" - ]; - return createElement("div", { className: classNames.join(" "), ref: this.handleRootEl, style: { + TimeCols2.prototype.render = function() { + var _a = this, props = _a.props, state = _a.state; + return createElement("div", { className: "fc-timegrid-body", ref: this.handleRootEl, style: { width: props.clientWidth, minWidth: props.tableMinWidth - } }, createElement(NowTimer, { unit: "day" }, function(nowDate, todayRange) { - return createElement(Fragment, null, createElement("table", { role: "presentation", className: "fc-scrollgrid-sync-table", style: { - width: props.clientWidth, - minWidth: props.tableMinWidth, - height: expandRows ? props.clientHeight : "" - } }, props.colGroupNode, createElement("tbody", { role: "presentation" }, props.cells.map(function(cells, row) { - return createElement(TableRow, { - ref: _this.rowRefs.createRef(row), - key: cells.length ? cells[0].date.toISOString() : row, - showDayNumbers: rowCnt > 1, - showWeekNumbers: props.showWeekNumbers, - todayRange, - dateProfile, - cells, - renderIntro: props.renderRowIntro, - businessHourSegs: businessHourSegsByRow[row], - eventSelection: props.eventSelection, - bgEventSegs: bgEventSegsByRow[row].filter(isSegAllDay), - fgEventSegs: fgEventSegsByRow[row], - dateSelectionSegs: dateSelectionSegsByRow[row], - eventDrag: eventDragByRow[row], - eventResize: eventResizeByRow[row], - dayMaxEvents, - dayMaxEventRows, - clientWidth: props.clientWidth, - clientHeight: props.clientHeight, - forPrint: props.forPrint - }); - })))); - })); + } }, createElement(TimeColsSlats, { axis: props.axis, dateProfile: props.dateProfile, slatMetas: props.slatMetas, clientWidth: props.clientWidth, minHeight: props.expandRows ? props.clientHeight : "", tableMinWidth: props.tableMinWidth, tableColGroupNode: props.axis ? props.tableColGroupNode : null, onCoords: this.handleSlatCoords }), createElement(TimeColsContent, { cells: props.cells, axis: props.axis, dateProfile: props.dateProfile, businessHourSegs: props.businessHourSegs, bgEventSegs: props.bgEventSegs, fgEventSegs: props.fgEventSegs, dateSelectionSegs: props.dateSelectionSegs, eventSelection: props.eventSelection, eventDrag: props.eventDrag, eventResize: props.eventResize, todayRange: props.todayRange, nowDate: props.nowDate, nowIndicatorSegs: props.nowIndicatorSegs, clientWidth: props.clientWidth, tableMinWidth: props.tableMinWidth, tableColGroupNode: props.tableColGroupNode, slatCoords: state.slatCoords, onColCoords: this.handleColCoords, forPrint: props.forPrint })); }; - Table2.prototype.prepareHits = function() { - this.rowPositions = new PositionCache(this.rootEl, this.rowRefs.collect().map(function(rowObj) { - return rowObj.getCellEls()[0]; - }), false, true); - this.colPositions = new PositionCache(this.rootEl, this.rowRefs.currentMap[0].getCellEls(), true, false); + TimeCols2.prototype.componentDidMount = function() { + this.scrollResponder = this.context.createScrollResponder(this.handleScrollRequest); }; - Table2.prototype.queryHit = function(positionLeft, positionTop) { - var _a = this, colPositions = _a.colPositions, rowPositions = _a.rowPositions; - var col = colPositions.leftToIndex(positionLeft); - var row = rowPositions.topToIndex(positionTop); - if (row != null && col != null) { - var cell = this.props.cells[row][col]; + TimeCols2.prototype.componentDidUpdate = function(prevProps) { + this.scrollResponder.update(prevProps.dateProfile !== this.props.dateProfile); + }; + TimeCols2.prototype.componentWillUnmount = function() { + this.scrollResponder.detach(); + }; + TimeCols2.prototype.queryHit = function(positionLeft, positionTop) { + var _a = this.context, dateEnv = _a.dateEnv, options = _a.options; + var colCoords = this.colCoords; + var dateProfile = this.props.dateProfile; + var slatCoords = this.state.slatCoords; + var _b = this.processSlotOptions(this.props.slotDuration, options.snapDuration), snapDuration = _b.snapDuration, snapsPerSlot = _b.snapsPerSlot; + var colIndex = colCoords.leftToIndex(positionLeft); + var slatIndex = slatCoords.positions.topToIndex(positionTop); + if (colIndex != null && slatIndex != null) { + var cell = this.props.cells[colIndex]; + var slatTop = slatCoords.positions.tops[slatIndex]; + var slatHeight = slatCoords.positions.getHeight(slatIndex); + var partial = (positionTop - slatTop) / slatHeight; + var localSnapIndex = Math.floor(partial * snapsPerSlot); + var snapIndex = slatIndex * snapsPerSlot + localSnapIndex; + var dayDate = this.props.cells[colIndex].date; + var time = addDurations(dateProfile.slotMinTime, multiplyDuration(snapDuration, snapIndex)); + var start = dateEnv.add(dayDate, time); + var end = dateEnv.add(start, snapDuration); return { - dateProfile: this.props.dateProfile, - dateSpan: __assign({ range: this.getCellRange(row, col), allDay: true }, cell.extraDateSpan), - dayEl: this.getCellEl(row, col), + dateProfile, + dateSpan: __assign({ range: { start, end }, allDay: false }, cell.extraDateSpan), + dayEl: colCoords.els[colIndex], rect: { - left: colPositions.lefts[col], - right: colPositions.rights[col], - top: rowPositions.tops[row], - bottom: rowPositions.bottoms[row] + left: colCoords.lefts[colIndex], + right: colCoords.rights[colIndex], + top: slatTop, + bottom: slatTop + slatHeight }, layer: 0 }; } return null; }; - Table2.prototype.getCellEl = function(row, col) { - return this.rowRefs.currentMap[row].getCellEls()[col]; - }; - Table2.prototype.getCellRange = function(row, col) { - var start = this.props.cells[row][col].date; - var end = addDays(start, 1); - return { start, end }; - }; - return Table2; + return TimeCols2; }(DateComponent); -function isSegAllDay(seg) { - return seg.eventRange.def.allDay; +function processSlotOptions(slotDuration, snapDurationOverride) { + var snapDuration = snapDurationOverride || slotDuration; + var snapsPerSlot = wholeDivideDurations(slotDuration, snapDuration); + if (snapsPerSlot === null) { + snapDuration = slotDuration; + snapsPerSlot = 1; + } + return { snapDuration, snapsPerSlot }; } -var DayTableSlicer = function(_super) { - __extends(DayTableSlicer2, _super); - function DayTableSlicer2() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.forceDayIfListItem = true; - return _this; +var DayTimeColsSlicer = function(_super) { + __extends(DayTimeColsSlicer2, _super); + function DayTimeColsSlicer2() { + return _super !== null && _super.apply(this, arguments) || this; } - DayTableSlicer2.prototype.sliceRange = function(dateRange, dayTableModel) { - return dayTableModel.sliceRange(dateRange); + DayTimeColsSlicer2.prototype.sliceRange = function(range2, dayRanges) { + var segs = []; + for (var col = 0; col < dayRanges.length; col += 1) { + var segRange = intersectRanges(range2, dayRanges[col]); + if (segRange) { + segs.push({ + start: segRange.start, + end: segRange.end, + isStart: segRange.start.valueOf() === range2.start.valueOf(), + isEnd: segRange.end.valueOf() === range2.end.valueOf(), + col + }); + } + } + return segs; }; - return DayTableSlicer2; + return DayTimeColsSlicer2; }(Slicer); -var DayTable = function(_super) { - __extends(DayTable2, _super); - function DayTable2() { +var DayTimeCols = function(_super) { + __extends(DayTimeCols2, _super); + function DayTimeCols2() { var _this = _super !== null && _super.apply(this, arguments) || this; - _this.slicer = new DayTableSlicer(); - _this.tableRef = createRef(); + _this.buildDayRanges = memoize(buildDayRanges); + _this.slicer = new DayTimeColsSlicer(); + _this.timeColsRef = createRef(); return _this; } - DayTable2.prototype.render = function() { + DayTimeCols2.prototype.render = function() { + var _this = this; var _a = this, props = _a.props, context = _a.context; - return createElement(Table, __assign({ ref: this.tableRef }, this.slicer.sliceProps(props, props.dateProfile, props.nextDayThreshold, context, props.dayTableModel), { dateProfile: props.dateProfile, cells: props.dayTableModel.cells, colGroupNode: props.colGroupNode, tableMinWidth: props.tableMinWidth, renderRowIntro: props.renderRowIntro, dayMaxEvents: props.dayMaxEvents, dayMaxEventRows: props.dayMaxEventRows, showWeekNumbers: props.showWeekNumbers, expandRows: props.expandRows, headerAlignElRef: props.headerAlignElRef, clientWidth: props.clientWidth, clientHeight: props.clientHeight, forPrint: props.forPrint })); + var dateProfile = props.dateProfile, dayTableModel = props.dayTableModel; + var isNowIndicator = context.options.nowIndicator; + var dayRanges = this.buildDayRanges(dayTableModel, dateProfile, context.dateEnv); + return createElement(NowTimer, { unit: isNowIndicator ? "minute" : "day" }, function(nowDate, todayRange) { + return createElement(TimeCols, __assign({ ref: _this.timeColsRef }, _this.slicer.sliceProps(props, dateProfile, null, context, dayRanges), { forPrint: props.forPrint, axis: props.axis, dateProfile, slatMetas: props.slatMetas, slotDuration: props.slotDuration, cells: dayTableModel.cells[0], tableColGroupNode: props.tableColGroupNode, tableMinWidth: props.tableMinWidth, clientWidth: props.clientWidth, clientHeight: props.clientHeight, expandRows: props.expandRows, nowDate, nowIndicatorSegs: isNowIndicator && _this.slicer.sliceNowDate(nowDate, context, dayRanges), todayRange, onScrollTopRequest: props.onScrollTopRequest, onSlatCoords: props.onSlatCoords })); + }); }; - return DayTable2; + return DayTimeCols2; }(DateComponent); -var DayTableView = function(_super) { - __extends(DayTableView2, _super); - function DayTableView2() { +function buildDayRanges(dayTableModel, dateProfile, dateEnv) { + var ranges = []; + for (var _i = 0, _a = dayTableModel.headerDates; _i < _a.length; _i++) { + var date = _a[_i]; + ranges.push({ + start: dateEnv.add(date, dateProfile.slotMinTime), + end: dateEnv.add(date, dateProfile.slotMaxTime) + }); + } + return ranges; +} +var STOCK_SUB_DURATIONS = [ + { hours: 1 }, + { minutes: 30 }, + { minutes: 15 }, + { seconds: 30 }, + { seconds: 15 } +]; +function buildSlatMetas(slotMinTime, slotMaxTime, explicitLabelInterval, slotDuration, dateEnv) { + var dayStart = new Date(0); + var slatTime = slotMinTime; + var slatIterator = createDuration(0); + var labelInterval = explicitLabelInterval || computeLabelInterval(slotDuration); + var metas = []; + while (asRoughMs(slatTime) < asRoughMs(slotMaxTime)) { + var date = dateEnv.add(dayStart, slatTime); + var isLabeled = wholeDivideDurations(slatIterator, labelInterval) !== null; + metas.push({ + date, + time: slatTime, + key: date.toISOString(), + isoTimeStr: formatIsoTimeString(date), + isLabeled + }); + slatTime = addDurations(slatTime, slotDuration); + slatIterator = addDurations(slatIterator, slotDuration); + } + return metas; +} +function computeLabelInterval(slotDuration) { + var i3; + var labelInterval; + var slotsPerLabel; + for (i3 = STOCK_SUB_DURATIONS.length - 1; i3 >= 0; i3 -= 1) { + labelInterval = createDuration(STOCK_SUB_DURATIONS[i3]); + slotsPerLabel = wholeDivideDurations(labelInterval, slotDuration); + if (slotsPerLabel !== null && slotsPerLabel > 1) { + return labelInterval; + } + } + return slotDuration; +} +var DayTimeColsView = function(_super) { + __extends(DayTimeColsView2, _super); + function DayTimeColsView2() { var _this = _super !== null && _super.apply(this, arguments) || this; - _this.buildDayTableModel = memoize(buildDayTableModel); - _this.headerRef = createRef(); - _this.tableRef = createRef(); + _this.buildTimeColsModel = memoize(buildTimeColsModel); + _this.buildSlatMetas = memoize(buildSlatMetas); return _this; } - DayTableView2.prototype.render = function() { + DayTimeColsView2.prototype.render = function() { var _this = this; - var _a = this.context, options = _a.options, dateProfileGenerator = _a.dateProfileGenerator; + var _a = this.context, options = _a.options, dateEnv = _a.dateEnv, dateProfileGenerator = _a.dateProfileGenerator; var props = this.props; - var dayTableModel = this.buildDayTableModel(props.dateProfile, dateProfileGenerator); - var headerContent = options.dayHeaders && createElement(DayHeader, { ref: this.headerRef, dateProfile: props.dateProfile, dates: dayTableModel.headerDates, datesRepDistinctDays: dayTableModel.rowCnt === 1 }); - var bodyContent = function(contentArg) { - return createElement(DayTable, { ref: _this.tableRef, dateProfile: props.dateProfile, dayTableModel, businessHours: props.businessHours, dateSelection: props.dateSelection, eventStore: props.eventStore, eventUiBases: props.eventUiBases, eventSelection: props.eventSelection, eventDrag: props.eventDrag, eventResize: props.eventResize, nextDayThreshold: options.nextDayThreshold, colGroupNode: contentArg.tableColGroupNode, tableMinWidth: contentArg.tableMinWidth, dayMaxEvents: options.dayMaxEvents, dayMaxEventRows: options.dayMaxEventRows, showWeekNumbers: options.weekNumbers, expandRows: !props.isHeightAuto, headerAlignElRef: _this.headerElRef, clientWidth: contentArg.clientWidth, clientHeight: contentArg.clientHeight, forPrint: props.forPrint }); + var dateProfile = props.dateProfile; + var dayTableModel = this.buildTimeColsModel(dateProfile, dateProfileGenerator); + var splitProps = this.allDaySplitter.splitProps(props); + var slatMetas = this.buildSlatMetas(dateProfile.slotMinTime, dateProfile.slotMaxTime, options.slotLabelInterval, options.slotDuration, dateEnv); + var dayMinWidth = options.dayMinWidth; + var hasAttachedAxis = !dayMinWidth; + var hasDetachedAxis = dayMinWidth; + var headerContent = options.dayHeaders && createElement(DayHeader, { dates: dayTableModel.headerDates, dateProfile, datesRepDistinctDays: true, renderIntro: hasAttachedAxis ? this.renderHeadAxis : null }); + var allDayContent = options.allDaySlot !== false && function(contentArg) { + return createElement(DayTable, __assign({}, splitProps.allDay, { dateProfile, dayTableModel, nextDayThreshold: options.nextDayThreshold, tableMinWidth: contentArg.tableMinWidth, colGroupNode: contentArg.tableColGroupNode, renderRowIntro: hasAttachedAxis ? _this.renderTableRowAxis : null, showWeekNumbers: false, expandRows: false, headerAlignElRef: _this.headerElRef, clientWidth: contentArg.clientWidth, clientHeight: contentArg.clientHeight, forPrint: props.forPrint }, _this.getAllDayMaxEventProps())); }; - return options.dayMinWidth ? this.renderHScrollLayout(headerContent, bodyContent, dayTableModel.colCnt, options.dayMinWidth) : this.renderSimpleLayout(headerContent, bodyContent); + var timeGridContent = function(contentArg) { + return createElement(DayTimeCols, __assign({}, splitProps.timed, { dayTableModel, dateProfile, axis: hasAttachedAxis, slotDuration: options.slotDuration, slatMetas, forPrint: props.forPrint, tableColGroupNode: contentArg.tableColGroupNode, tableMinWidth: contentArg.tableMinWidth, clientWidth: contentArg.clientWidth, clientHeight: contentArg.clientHeight, onSlatCoords: _this.handleSlatCoords, expandRows: contentArg.expandRows, onScrollTopRequest: _this.handleScrollTopRequest })); + }; + return hasDetachedAxis ? this.renderHScrollLayout(headerContent, allDayContent, timeGridContent, dayTableModel.colCnt, dayMinWidth, slatMetas, this.state.slatCoords) : this.renderSimpleLayout(headerContent, allDayContent, timeGridContent); }; - return DayTableView2; -}(TableView); -function buildDayTableModel(dateProfile, dateProfileGenerator) { + return DayTimeColsView2; +}(TimeColsView); +function buildTimeColsModel(dateProfile, dateProfileGenerator) { var daySeries = new DaySeriesModel(dateProfile.renderRange, dateProfileGenerator); - return new DayTableModel(daySeries, /year|month|week/.test(dateProfile.currentRangeUnit)); + return new DayTableModel(daySeries, false); } -var TableDateProfileGenerator = function(_super) { - __extends(TableDateProfileGenerator2, _super); - function TableDateProfileGenerator2() { - return _super !== null && _super.apply(this, arguments) || this; - } - TableDateProfileGenerator2.prototype.buildRenderRange = function(currentRange, currentRangeUnit, isRangeAllDay) { - var dateEnv = this.props.dateEnv; - var renderRange = _super.prototype.buildRenderRange.call(this, currentRange, currentRangeUnit, isRangeAllDay); - var start = renderRange.start; - var end = renderRange.end; - var endOfWeek; - if (/^(year|month)$/.test(currentRangeUnit)) { - start = dateEnv.startOfWeek(start); - endOfWeek = dateEnv.startOfWeek(end); - if (endOfWeek.valueOf() !== end.valueOf()) { - end = addWeeks(endOfWeek, 1); - } - } - if (this.props.monthMode && this.props.fixedWeekCount) { - var rowCnt = Math.ceil(diffWeeks(start, end)); - end = addWeeks(end, 6 - rowCnt); - } - return { start, end }; - }; - return TableDateProfileGenerator2; -}(DateProfileGenerator); -var main = createPlugin({ - initialView: "dayGridMonth", +var OPTION_REFINERS = { + allDaySlot: Boolean +}; +var main2 = createPlugin({ + initialView: "timeGridWeek", + optionRefiners: OPTION_REFINERS, views: { - dayGrid: { - component: DayTableView, - dateProfileGeneratorClass: TableDateProfileGenerator + timeGrid: { + component: DayTimeColsView, + usesMinMaxTime: true, + allDaySlot: true, + slotDuration: "00:30:00", + slotEventOverlap: true }, - dayGridDay: { - type: "dayGrid", + timeGridDay: { + type: "timeGrid", duration: { days: 1 } }, - dayGridWeek: { - type: "dayGrid", + timeGridWeek: { + type: "timeGrid", duration: { weeks: 1 } - }, - dayGridMonth: { - type: "dayGrid", - duration: { months: 1 }, - monthMode: true, - fixedWeekCount: true } } }); -var main_default = main; +var main_default2 = main2; -// node_modules/@fullcalendar/timegrid/main.js -var AllDaySplitter = function(_super) { - __extends(AllDaySplitter2, _super); - function AllDaySplitter2() { - return _super !== null && _super.apply(this, arguments) || this; - } - AllDaySplitter2.prototype.getKeyInfo = function() { - return { - allDay: {}, - timed: {} - }; +// node_modules/rrule/dist/esm/weekday.js +var ALL_WEEKDAYS = [ + "MO", + "TU", + "WE", + "TH", + "FR", + "SA", + "SU" +]; +var Weekday = function() { + function Weekday2(weekday, n3) { + if (n3 === 0) + throw new Error("Can't create weekday with n == 0"); + this.weekday = weekday; + this.n = n3; + } + Weekday2.fromStr = function(str) { + return new Weekday2(ALL_WEEKDAYS.indexOf(str)); + }; + Weekday2.prototype.nth = function(n3) { + return this.n === n3 ? this : new Weekday2(this.weekday, n3); + }; + Weekday2.prototype.equals = function(other) { + return this.weekday === other.weekday && this.n === other.n; + }; + Weekday2.prototype.toString = function() { + var s4 = ALL_WEEKDAYS[this.weekday]; + if (this.n) + s4 = (this.n > 0 ? "+" : "") + String(this.n) + s4; + return s4; }; - AllDaySplitter2.prototype.getKeysForDateSpan = function(dateSpan) { - if (dateSpan.allDay) { - return ["allDay"]; - } - return ["timed"]; + Weekday2.prototype.getJsWeekday = function() { + return this.weekday === 6 ? 0 : this.weekday + 1; }; - AllDaySplitter2.prototype.getKeysForEventDef = function(eventDef) { - if (!eventDef.allDay) { - return ["timed"]; - } - if (hasBgRendering(eventDef)) { - return ["timed", "allDay"]; + return Weekday2; +}(); + +// node_modules/rrule/dist/esm/helpers.js +var isPresent = function(value) { + return value !== null && value !== void 0; +}; +var isNumber = function(value) { + return typeof value === "number"; +}; +var isWeekdayStr = function(value) { + return typeof value === "string" && ALL_WEEKDAYS.includes(value); +}; +var isArray = Array.isArray; +var range = function(start, end) { + if (end === void 0) { + end = start; + } + if (arguments.length === 1) { + end = start; + start = 0; + } + var rang = []; + for (var i3 = start; i3 < end; i3++) + rang.push(i3); + return rang; +}; +var repeat = function(value, times) { + var i3 = 0; + var array = []; + if (isArray(value)) { + for (; i3 < times; i3++) + array[i3] = [].concat(value); + } else { + for (; i3 < times; i3++) + array[i3] = value; + } + return array; +}; +var toArray = function(item) { + if (isArray(item)) { + return item; + } + return [item]; +}; +function padStart2(item, targetLength, padString) { + if (padString === void 0) { + padString = " "; + } + var str = String(item); + targetLength = targetLength >> 0; + if (str.length > targetLength) { + return String(str); + } + targetLength = targetLength - str.length; + if (targetLength > padString.length) { + padString += repeat(padString, targetLength / padString.length); + } + return padString.slice(0, targetLength) + String(str); +} +var split = function(str, sep, num) { + var splits = str.split(sep); + return num ? splits.slice(0, num).concat([splits.slice(num).join(sep)]) : splits; +}; +var pymod = function(a3, b3) { + var r3 = a3 % b3; + return r3 * b3 < 0 ? r3 + b3 : r3; +}; +var divmod = function(a3, b3) { + return { div: Math.floor(a3 / b3), mod: pymod(a3, b3) }; +}; +var empty = function(obj) { + return !isPresent(obj) || obj.length === 0; +}; +var notEmpty = function(obj) { + return !empty(obj); +}; +var includes = function(arr, val) { + return notEmpty(arr) && arr.indexOf(val) !== -1; +}; + +// node_modules/rrule/dist/esm/dateutil.js +var datetime = function(y3, m3, d2, h3, i3, s4) { + if (h3 === void 0) { + h3 = 0; + } + if (i3 === void 0) { + i3 = 0; + } + if (s4 === void 0) { + s4 = 0; + } + return new Date(Date.UTC(y3, m3 - 1, d2, h3, i3, s4)); +}; +var MONTH_DAYS = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; +var ONE_DAY = 1e3 * 60 * 60 * 24; +var MAXYEAR = 9999; +var ORDINAL_BASE = datetime(1970, 1, 1); +var PY_WEEKDAYS = [6, 0, 1, 2, 3, 4, 5]; +var isLeapYear = function(year) { + return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0; +}; +var isDate = function(value) { + return value instanceof Date; +}; +var isValidDate2 = function(value) { + return isDate(value) && !isNaN(value.getTime()); +}; +var tzOffset = function(date) { + return date.getTimezoneOffset() * 60 * 1e3; +}; +var daysBetween = function(date1, date2) { + var date1ms = date1.getTime() - tzOffset(date1); + var date2ms = date2.getTime() - tzOffset(date2); + var differencems = date1ms - date2ms; + return Math.round(differencems / ONE_DAY); +}; +var toOrdinal = function(date) { + return daysBetween(date, ORDINAL_BASE); +}; +var fromOrdinal = function(ordinal) { + return new Date(ORDINAL_BASE.getTime() + ordinal * ONE_DAY); +}; +var getMonthDays = function(date) { + var month = date.getUTCMonth(); + return month === 1 && isLeapYear(date.getUTCFullYear()) ? 29 : MONTH_DAYS[month]; +}; +var getWeekday = function(date) { + return PY_WEEKDAYS[date.getUTCDay()]; +}; +var monthRange = function(year, month) { + var date = datetime(year, month + 1, 1); + return [getWeekday(date), getMonthDays(date)]; +}; +var combine = function(date, time) { + time = time || date; + return new Date(Date.UTC(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), time.getHours(), time.getMinutes(), time.getSeconds(), time.getMilliseconds())); +}; +var clone = function(date) { + var dolly = new Date(date.getTime()); + return dolly; +}; +var cloneDates = function(dates) { + var clones = []; + for (var i3 = 0; i3 < dates.length; i3++) { + clones.push(clone(dates[i3])); + } + return clones; +}; +var sort = function(dates) { + dates.sort(function(a3, b3) { + return a3.getTime() - b3.getTime(); + }); +}; +var timeToUntilString = function(time, utc) { + if (utc === void 0) { + utc = true; + } + var date = new Date(time); + return [ + padStart2(date.getUTCFullYear().toString(), 4, "0"), + padStart2(date.getUTCMonth() + 1, 2, "0"), + padStart2(date.getUTCDate(), 2, "0"), + "T", + padStart2(date.getUTCHours(), 2, "0"), + padStart2(date.getUTCMinutes(), 2, "0"), + padStart2(date.getUTCSeconds(), 2, "0"), + utc ? "Z" : "" + ].join(""); +}; +var untilStringToDate = function(until) { + var re = /^(\d{4})(\d{2})(\d{2})(T(\d{2})(\d{2})(\d{2})Z?)?$/; + var bits = re.exec(until); + if (!bits) + throw new Error("Invalid UNTIL value: ".concat(until)); + return new Date(Date.UTC(parseInt(bits[1], 10), parseInt(bits[2], 10) - 1, parseInt(bits[3], 10), parseInt(bits[5], 10) || 0, parseInt(bits[6], 10) || 0, parseInt(bits[7], 10) || 0)); +}; +var dateTZtoISO8601 = function(date, timeZone) { + var dateStr = date.toLocaleString("sv-SE", { timeZone }); + return dateStr.replace(" ", "T") + "Z"; +}; +var dateInTimeZone = function(date, timeZone) { + var localTimeZone = Intl.DateTimeFormat().resolvedOptions().timeZone; + var dateInLocalTZ = new Date(dateTZtoISO8601(date, localTimeZone)); + var dateInTargetTZ = new Date(dateTZtoISO8601(date, timeZone !== null && timeZone !== void 0 ? timeZone : "UTC")); + var tzOffset2 = dateInTargetTZ.getTime() - dateInLocalTZ.getTime(); + return new Date(date.getTime() - tzOffset2); +}; + +// node_modules/rrule/dist/esm/iterresult.js +var IterResult = function() { + function IterResult2(method, args) { + this.minDate = null; + this.maxDate = null; + this._result = []; + this.total = 0; + this.method = method; + this.args = args; + if (method === "between") { + this.maxDate = args.inc ? args.before : new Date(args.before.getTime() - 1); + this.minDate = args.inc ? args.after : new Date(args.after.getTime() + 1); + } else if (method === "before") { + this.maxDate = args.inc ? args.dt : new Date(args.dt.getTime() - 1); + } else if (method === "after") { + this.minDate = args.inc ? args.dt : new Date(args.dt.getTime() + 1); + } + } + IterResult2.prototype.accept = function(date) { + ++this.total; + var tooEarly = this.minDate && date < this.minDate; + var tooLate = this.maxDate && date > this.maxDate; + if (this.method === "between") { + if (tooEarly) + return true; + if (tooLate) + return false; + } else if (this.method === "before") { + if (tooLate) + return false; + } else if (this.method === "after") { + if (tooEarly) + return true; + this.add(date); + return false; } - return ["allDay"]; + return this.add(date); }; - return AllDaySplitter2; -}(Splitter); -var DEFAULT_SLAT_LABEL_FORMAT = createFormatter({ - hour: "numeric", - minute: "2-digit", - omitZeroMinute: true, - meridiem: "short" -}); -function TimeColsAxisCell(props) { - var classNames = [ - "fc-timegrid-slot", - "fc-timegrid-slot-label", - props.isLabeled ? "fc-scrollgrid-shrink" : "fc-timegrid-slot-minor" - ]; - return createElement(ViewContextType.Consumer, null, function(context) { - if (!props.isLabeled) { - return createElement("td", { className: classNames.join(" "), "data-time": props.isoTimeStr }); + IterResult2.prototype.add = function(date) { + this._result.push(date); + return true; + }; + IterResult2.prototype.getValue = function() { + var res = this._result; + switch (this.method) { + case "all": + case "between": + return res; + case "before": + case "after": + default: + return res.length ? res[res.length - 1] : null; } - var dateEnv = context.dateEnv, options = context.options, viewApi = context.viewApi; - var labelFormat = options.slotLabelFormat == null ? DEFAULT_SLAT_LABEL_FORMAT : Array.isArray(options.slotLabelFormat) ? createFormatter(options.slotLabelFormat[0]) : createFormatter(options.slotLabelFormat); - var hookProps = { - level: 0, - time: props.time, - date: dateEnv.toDate(props.date), - view: viewApi, - text: dateEnv.format(props.date, labelFormat) - }; - return createElement(RenderHook, { hookProps, classNames: options.slotLabelClassNames, content: options.slotLabelContent, defaultContent: renderInnerContent3, didMount: options.slotLabelDidMount, willUnmount: options.slotLabelWillUnmount }, function(rootElRef, customClassNames, innerElRef, innerContent) { - return createElement("td", { ref: rootElRef, className: classNames.concat(customClassNames).join(" "), "data-time": props.isoTimeStr }, createElement("div", { className: "fc-timegrid-slot-label-frame fc-scrollgrid-shrink-frame" }, createElement("div", { className: "fc-timegrid-slot-label-cushion fc-scrollgrid-shrink-cushion", ref: innerElRef }, innerContent))); - }); - }); -} -function renderInnerContent3(props) { - return props.text; -} -var TimeBodyAxis = function(_super) { - __extends(TimeBodyAxis2, _super); - function TimeBodyAxis2() { - return _super !== null && _super.apply(this, arguments) || this; - } - TimeBodyAxis2.prototype.render = function() { - return this.props.slatMetas.map(function(slatMeta) { - return createElement("tr", { key: slatMeta.key }, createElement(TimeColsAxisCell, __assign({}, slatMeta))); - }); }; - return TimeBodyAxis2; -}(BaseComponent); -var DEFAULT_WEEK_NUM_FORMAT2 = createFormatter({ week: "short" }); -var AUTO_ALL_DAY_MAX_EVENT_ROWS = 5; -var TimeColsView = function(_super) { - __extends(TimeColsView2, _super); - function TimeColsView2() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.allDaySplitter = new AllDaySplitter(); - _this.headerElRef = createRef(); - _this.rootElRef = createRef(); - _this.scrollerElRef = createRef(); - _this.state = { - slatCoords: null - }; - _this.handleScrollTopRequest = function(scrollTop) { - var scrollerEl = _this.scrollerElRef.current; - if (scrollerEl) { - scrollerEl.scrollTop = scrollTop; - } - }; - _this.renderHeadAxis = function(rowKey, frameHeight) { - if (frameHeight === void 0) { - frameHeight = ""; - } - var options = _this.context.options; - var dateProfile = _this.props.dateProfile; - var range = dateProfile.renderRange; - var dayCnt = diffDays(range.start, range.end); - var navLinkAttrs = dayCnt === 1 ? buildNavLinkAttrs(_this.context, range.start, "week") : {}; - if (options.weekNumbers && rowKey === "day") { - return createElement(WeekNumberRoot, { date: range.start, defaultFormat: DEFAULT_WEEK_NUM_FORMAT2 }, function(rootElRef, classNames, innerElRef, innerContent) { - return createElement("th", { ref: rootElRef, "aria-hidden": true, className: [ - "fc-timegrid-axis", - "fc-scrollgrid-shrink" - ].concat(classNames).join(" ") }, createElement("div", { className: "fc-timegrid-axis-frame fc-scrollgrid-shrink-frame fc-timegrid-axis-frame-liquid", style: { height: frameHeight } }, createElement("a", __assign({ ref: innerElRef, className: "fc-timegrid-axis-cushion fc-scrollgrid-shrink-cushion fc-scrollgrid-sync-inner" }, navLinkAttrs), innerContent))); - }); - } - return createElement("th", { "aria-hidden": true, className: "fc-timegrid-axis" }, createElement("div", { className: "fc-timegrid-axis-frame", style: { height: frameHeight } })); - }; - _this.renderTableRowAxis = function(rowHeight) { - var _a = _this.context, options = _a.options, viewApi = _a.viewApi; - var hookProps = { - text: options.allDayText, - view: viewApi - }; - return createElement(RenderHook, { hookProps, classNames: options.allDayClassNames, content: options.allDayContent, defaultContent: renderAllDayInner, didMount: options.allDayDidMount, willUnmount: options.allDayWillUnmount }, function(rootElRef, classNames, innerElRef, innerContent) { - return createElement("td", { ref: rootElRef, "aria-hidden": true, className: [ - "fc-timegrid-axis", - "fc-scrollgrid-shrink" - ].concat(classNames).join(" ") }, createElement("div", { className: "fc-timegrid-axis-frame fc-scrollgrid-shrink-frame" + (rowHeight == null ? " fc-timegrid-axis-frame-liquid" : ""), style: { height: rowHeight } }, createElement("span", { className: "fc-timegrid-axis-cushion fc-scrollgrid-shrink-cushion fc-scrollgrid-sync-inner", ref: innerElRef }, innerContent))); - }); - }; - _this.handleSlatCoords = function(slatCoords) { - _this.setState({ slatCoords }); - }; + IterResult2.prototype.clone = function() { + return new IterResult2(this.method, this.args); + }; + return IterResult2; +}(); +var iterresult_default = IterResult; + +// node_modules/rrule/node_modules/tslib/modules/index.js +var import_tslib7 = __toModule(require_tslib2()); +var { + __extends: __extends2, + __assign: __assign2, + __rest: __rest2, + __decorate: __decorate2, + __param: __param2, + __esDecorate, + __runInitializers, + __propKey, + __setFunctionName, + __metadata: __metadata2, + __awaiter: __awaiter2, + __generator: __generator2, + __exportStar: __exportStar2, + __createBinding: __createBinding2, + __values: __values2, + __read: __read2, + __spread: __spread2, + __spreadArrays: __spreadArrays2, + __spreadArray: __spreadArray2, + __await: __await2, + __asyncGenerator: __asyncGenerator2, + __asyncDelegator: __asyncDelegator2, + __asyncValues: __asyncValues2, + __makeTemplateObject: __makeTemplateObject2, + __importStar: __importStar2, + __importDefault: __importDefault2, + __classPrivateFieldGet: __classPrivateFieldGet2, + __classPrivateFieldSet: __classPrivateFieldSet2, + __classPrivateFieldIn +} = import_tslib7.default; + +// node_modules/rrule/dist/esm/callbackiterresult.js +var CallbackIterResult = function(_super) { + __extends2(CallbackIterResult2, _super); + function CallbackIterResult2(method, args, iterator) { + var _this = _super.call(this, method, args) || this; + _this.iterator = iterator; return _this; } - TimeColsView2.prototype.renderSimpleLayout = function(headerRowContent, allDayContent, timeContent) { - var _a = this, context = _a.context, props = _a.props; - var sections = []; - var stickyHeaderDates = getStickyHeaderDates(context.options); - if (headerRowContent) { - sections.push({ - type: "header", - key: "header", - isSticky: stickyHeaderDates, - chunk: { - elRef: this.headerElRef, - tableClassName: "fc-col-header", - rowContent: headerRowContent - } - }); + CallbackIterResult2.prototype.add = function(date) { + if (this.iterator(date, this._result.length)) { + this._result.push(date); + return true; } - if (allDayContent) { - sections.push({ - type: "body", - key: "all-day", - chunk: { content: allDayContent } + return false; + }; + return CallbackIterResult2; +}(iterresult_default); +var callbackiterresult_default = CallbackIterResult; + +// node_modules/rrule/dist/esm/nlp/i18n.js +var ENGLISH = { + dayNames: [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + monthNames: [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + tokens: { + SKIP: /^[ \r\n\t]+|^\.$/, + number: /^[1-9][0-9]*/, + numberAsText: /^(one|two|three)/i, + every: /^every/i, + "day(s)": /^days?/i, + "weekday(s)": /^weekdays?/i, + "week(s)": /^weeks?/i, + "hour(s)": /^hours?/i, + "minute(s)": /^minutes?/i, + "month(s)": /^months?/i, + "year(s)": /^years?/i, + on: /^(on|in)/i, + at: /^(at)/i, + the: /^the/i, + first: /^first/i, + second: /^second/i, + third: /^third/i, + nth: /^([1-9][0-9]*)(\.|th|nd|rd|st)/i, + last: /^last/i, + for: /^for/i, + "time(s)": /^times?/i, + until: /^(un)?til/i, + monday: /^mo(n(day)?)?/i, + tuesday: /^tu(e(s(day)?)?)?/i, + wednesday: /^we(d(n(esday)?)?)?/i, + thursday: /^th(u(r(sday)?)?)?/i, + friday: /^fr(i(day)?)?/i, + saturday: /^sa(t(urday)?)?/i, + sunday: /^su(n(day)?)?/i, + january: /^jan(uary)?/i, + february: /^feb(ruary)?/i, + march: /^mar(ch)?/i, + april: /^apr(il)?/i, + may: /^may/i, + june: /^june?/i, + july: /^july?/i, + august: /^aug(ust)?/i, + september: /^sep(t(ember)?)?/i, + october: /^oct(ober)?/i, + november: /^nov(ember)?/i, + december: /^dec(ember)?/i, + comma: /^(,\s*|(and|or)\s*)+/i + } +}; +var i18n_default = ENGLISH; + +// node_modules/rrule/dist/esm/nlp/totext.js +var contains = function(arr, val) { + return arr.indexOf(val) !== -1; +}; +var defaultGetText = function(id) { + return id.toString(); +}; +var defaultDateFormatter = function(year, month, day) { + return "".concat(month, " ").concat(day, ", ").concat(year); +}; +var ToText = function() { + function ToText2(rrule, gettext, language, dateFormatter) { + if (gettext === void 0) { + gettext = defaultGetText; + } + if (language === void 0) { + language = i18n_default; + } + if (dateFormatter === void 0) { + dateFormatter = defaultDateFormatter; + } + this.text = []; + this.language = language || i18n_default; + this.gettext = gettext; + this.dateFormatter = dateFormatter; + this.rrule = rrule; + this.options = rrule.options; + this.origOptions = rrule.origOptions; + if (this.origOptions.bymonthday) { + var bymonthday = [].concat(this.options.bymonthday); + var bynmonthday = [].concat(this.options.bynmonthday); + bymonthday.sort(function(a3, b3) { + return a3 - b3; }); - sections.push({ - type: "body", - key: "all-day-divider", - outerContent: createElement("tr", { role: "presentation", className: "fc-scrollgrid-section" }, createElement("td", { className: "fc-timegrid-divider " + context.theme.getClass("tableCellShaded") })) + bynmonthday.sort(function(a3, b3) { + return b3 - a3; }); + this.bymonthday = bymonthday.concat(bynmonthday); + if (!this.bymonthday.length) + this.bymonthday = null; + } + if (isPresent(this.origOptions.byweekday)) { + var byweekday = !isArray(this.origOptions.byweekday) ? [this.origOptions.byweekday] : this.origOptions.byweekday; + var days = String(byweekday); + this.byweekday = { + allWeeks: byweekday.filter(function(weekday) { + return !weekday.n; + }), + someWeeks: byweekday.filter(function(weekday) { + return Boolean(weekday.n); + }), + isWeekdays: days.indexOf("MO") !== -1 && days.indexOf("TU") !== -1 && days.indexOf("WE") !== -1 && days.indexOf("TH") !== -1 && days.indexOf("FR") !== -1 && days.indexOf("SA") === -1 && days.indexOf("SU") === -1, + isEveryDay: days.indexOf("MO") !== -1 && days.indexOf("TU") !== -1 && days.indexOf("WE") !== -1 && days.indexOf("TH") !== -1 && days.indexOf("FR") !== -1 && days.indexOf("SA") !== -1 && days.indexOf("SU") !== -1 + }; + var sortWeekDays = function(a3, b3) { + return a3.weekday - b3.weekday; + }; + this.byweekday.allWeeks.sort(sortWeekDays); + this.byweekday.someWeeks.sort(sortWeekDays); + if (!this.byweekday.allWeeks.length) + this.byweekday.allWeeks = null; + if (!this.byweekday.someWeeks.length) + this.byweekday.someWeeks = null; + } else { + this.byweekday = null; } - sections.push({ - type: "body", - key: "body", - liquid: true, - expandRows: Boolean(context.options.expandRows), - chunk: { - scrollerElRef: this.scrollerElRef, - content: timeContent + } + ToText2.isFullyConvertible = function(rrule) { + var canConvert = true; + if (!(rrule.options.freq in ToText2.IMPLEMENTED)) + return false; + if (rrule.origOptions.until && rrule.origOptions.count) + return false; + for (var key in rrule.origOptions) { + if (contains(["dtstart", "wkst", "freq"], key)) + return true; + if (!contains(ToText2.IMPLEMENTED[rrule.options.freq], key)) + return false; + } + return canConvert; + }; + ToText2.prototype.isFullyConvertible = function() { + return ToText2.isFullyConvertible(this.rrule); + }; + ToText2.prototype.toString = function() { + var gettext = this.gettext; + if (!(this.options.freq in ToText2.IMPLEMENTED)) { + return gettext("RRule error: Unable to fully convert this rrule to text"); + } + this.text = [gettext("every")]; + this[RRule.FREQUENCIES[this.options.freq]](); + if (this.options.until) { + this.add(gettext("until")); + var until = this.options.until; + this.add(this.dateFormatter(until.getUTCFullYear(), this.language.monthNames[until.getUTCMonth()], until.getUTCDate())); + } else if (this.options.count) { + this.add(gettext("for")).add(this.options.count.toString()).add(this.plural(this.options.count) ? gettext("times") : gettext("time")); + } + if (!this.isFullyConvertible()) + this.add(gettext("(~ approximate)")); + return this.text.join(""); + }; + ToText2.prototype.HOURLY = function() { + var gettext = this.gettext; + if (this.options.interval !== 1) + this.add(this.options.interval.toString()); + this.add(this.plural(this.options.interval) ? gettext("hours") : gettext("hour")); + }; + ToText2.prototype.MINUTELY = function() { + var gettext = this.gettext; + if (this.options.interval !== 1) + this.add(this.options.interval.toString()); + this.add(this.plural(this.options.interval) ? gettext("minutes") : gettext("minute")); + }; + ToText2.prototype.DAILY = function() { + var gettext = this.gettext; + if (this.options.interval !== 1) + this.add(this.options.interval.toString()); + if (this.byweekday && this.byweekday.isWeekdays) { + this.add(this.plural(this.options.interval) ? gettext("weekdays") : gettext("weekday")); + } else { + this.add(this.plural(this.options.interval) ? gettext("days") : gettext("day")); + } + if (this.origOptions.bymonth) { + this.add(gettext("in")); + this._bymonth(); + } + if (this.bymonthday) { + this._bymonthday(); + } else if (this.byweekday) { + this._byweekday(); + } else if (this.origOptions.byhour) { + this._byhour(); + } + }; + ToText2.prototype.WEEKLY = function() { + var gettext = this.gettext; + if (this.options.interval !== 1) { + this.add(this.options.interval.toString()).add(this.plural(this.options.interval) ? gettext("weeks") : gettext("week")); + } + if (this.byweekday && this.byweekday.isWeekdays) { + if (this.options.interval === 1) { + this.add(this.plural(this.options.interval) ? gettext("weekdays") : gettext("weekday")); + } else { + this.add(gettext("on")).add(gettext("weekdays")); } - }); - return createElement(ViewRoot, { viewSpec: context.viewSpec, elRef: this.rootElRef }, function(rootElRef, classNames) { - return createElement("div", { className: ["fc-timegrid"].concat(classNames).join(" "), ref: rootElRef }, createElement(SimpleScrollGrid, { liquid: !props.isHeightAuto && !props.forPrint, collapsibleWidth: props.forPrint, cols: [{ width: "shrink" }], sections })); - }); + } else if (this.byweekday && this.byweekday.isEveryDay) { + this.add(this.plural(this.options.interval) ? gettext("days") : gettext("day")); + } else { + if (this.options.interval === 1) + this.add(gettext("week")); + if (this.origOptions.bymonth) { + this.add(gettext("in")); + this._bymonth(); + } + if (this.bymonthday) { + this._bymonthday(); + } else if (this.byweekday) { + this._byweekday(); + } + } + }; + ToText2.prototype.MONTHLY = function() { + var gettext = this.gettext; + if (this.origOptions.bymonth) { + if (this.options.interval !== 1) { + this.add(this.options.interval.toString()).add(gettext("months")); + if (this.plural(this.options.interval)) + this.add(gettext("in")); + } else { + } + this._bymonth(); + } else { + if (this.options.interval !== 1) { + this.add(this.options.interval.toString()); + } + this.add(this.plural(this.options.interval) ? gettext("months") : gettext("month")); + } + if (this.bymonthday) { + this._bymonthday(); + } else if (this.byweekday && this.byweekday.isWeekdays) { + this.add(gettext("on")).add(gettext("weekdays")); + } else if (this.byweekday) { + this._byweekday(); + } }; - TimeColsView2.prototype.renderHScrollLayout = function(headerRowContent, allDayContent, timeContent, colCnt, dayMinWidth, slatMetas, slatCoords) { - var _this = this; - var ScrollGrid = this.context.pluginHooks.scrollGridImpl; - if (!ScrollGrid) { - throw new Error("No ScrollGrid implementation"); + ToText2.prototype.YEARLY = function() { + var gettext = this.gettext; + if (this.origOptions.bymonth) { + if (this.options.interval !== 1) { + this.add(this.options.interval.toString()); + this.add(gettext("years")); + } else { + } + this._bymonth(); + } else { + if (this.options.interval !== 1) { + this.add(this.options.interval.toString()); + } + this.add(this.plural(this.options.interval) ? gettext("years") : gettext("year")); } - var _a = this, context = _a.context, props = _a.props; - var stickyHeaderDates = !props.forPrint && getStickyHeaderDates(context.options); - var stickyFooterScrollbar = !props.forPrint && getStickyFooterScrollbar(context.options); - var sections = []; - if (headerRowContent) { - sections.push({ - type: "header", - key: "header", - isSticky: stickyHeaderDates, - syncRowHeights: true, - chunks: [ - { - key: "axis", - rowContent: function(arg) { - return createElement("tr", { role: "presentation" }, _this.renderHeadAxis("day", arg.rowSyncHeights[0])); - } - }, - { - key: "cols", - elRef: this.headerElRef, - tableClassName: "fc-col-header", - rowContent: headerRowContent - } - ] - }); + if (this.bymonthday) { + this._bymonthday(); + } else if (this.byweekday) { + this._byweekday(); } - if (allDayContent) { - sections.push({ - type: "body", - key: "all-day", - syncRowHeights: true, - chunks: [ - { - key: "axis", - rowContent: function(contentArg) { - return createElement("tr", { role: "presentation" }, _this.renderTableRowAxis(contentArg.rowSyncHeights[0])); - } - }, - { - key: "cols", - content: allDayContent - } - ] - }); - sections.push({ - key: "all-day-divider", - type: "body", - outerContent: createElement("tr", { role: "presentation", className: "fc-scrollgrid-section" }, createElement("td", { colSpan: 2, className: "fc-timegrid-divider " + context.theme.getClass("tableCellShaded") })) - }); + if (this.options.byyearday) { + this.add(gettext("on the")).add(this.list(this.options.byyearday, this.nth, gettext("and"))).add(gettext("day")); } - var isNowIndicator = context.options.nowIndicator; - sections.push({ - type: "body", - key: "body", - liquid: true, - expandRows: Boolean(context.options.expandRows), - chunks: [ - { - key: "axis", - content: function(arg) { - return createElement("div", { className: "fc-timegrid-axis-chunk" }, createElement("table", { "aria-hidden": true, style: { height: arg.expandRows ? arg.clientHeight : "" } }, arg.tableColGroupNode, createElement("tbody", null, createElement(TimeBodyAxis, { slatMetas }))), createElement("div", { className: "fc-timegrid-now-indicator-container" }, createElement(NowTimer, { unit: isNowIndicator ? "minute" : "day" }, function(nowDate) { - var nowIndicatorTop = isNowIndicator && slatCoords && slatCoords.safeComputeTop(nowDate); - if (typeof nowIndicatorTop === "number") { - return createElement(NowIndicatorRoot, { isAxis: true, date: nowDate }, function(rootElRef, classNames, innerElRef, innerContent) { - return createElement("div", { ref: rootElRef, className: ["fc-timegrid-now-indicator-arrow"].concat(classNames).join(" "), style: { top: nowIndicatorTop } }, innerContent); - }); - } - return null; - }))); - } - }, - { - key: "cols", - scrollerElRef: this.scrollerElRef, - content: timeContent - } - ] - }); - if (stickyFooterScrollbar) { - sections.push({ - key: "footer", - type: "footer", - isSticky: true, - chunks: [ - { - key: "axis", - content: renderScrollShim - }, - { - key: "cols", - content: renderScrollShim - } - ] - }); + if (this.options.byweekno) { + this.add(gettext("in")).add(this.plural(this.options.byweekno.length) ? gettext("weeks") : gettext("week")).add(this.list(this.options.byweekno, void 0, gettext("and"))); } - return createElement(ViewRoot, { viewSpec: context.viewSpec, elRef: this.rootElRef }, function(rootElRef, classNames) { - return createElement("div", { className: ["fc-timegrid"].concat(classNames).join(" "), ref: rootElRef }, createElement(ScrollGrid, { liquid: !props.isHeightAuto && !props.forPrint, collapsibleWidth: false, colGroups: [ - { width: "shrink", cols: [{ width: "shrink" }] }, - { cols: [{ span: colCnt, minWidth: dayMinWidth }] } - ], sections })); - }); }; - TimeColsView2.prototype.getAllDayMaxEventProps = function() { - var _a = this.context.options, dayMaxEvents = _a.dayMaxEvents, dayMaxEventRows = _a.dayMaxEventRows; - if (dayMaxEvents === true || dayMaxEventRows === true) { - dayMaxEvents = void 0; - dayMaxEventRows = AUTO_ALL_DAY_MAX_EVENT_ROWS; + ToText2.prototype._bymonthday = function() { + var gettext = this.gettext; + if (this.byweekday && this.byweekday.allWeeks) { + this.add(gettext("on")).add(this.list(this.byweekday.allWeeks, this.weekdaytext, gettext("or"))).add(gettext("the")).add(this.list(this.bymonthday, this.nth, gettext("or"))); + } else { + this.add(gettext("on the")).add(this.list(this.bymonthday, this.nth, gettext("and"))); } - return { dayMaxEvents, dayMaxEventRows }; }; - return TimeColsView2; -}(DateComponent); -function renderAllDayInner(hookProps) { - return hookProps.text; -} -var TimeColsSlatsCoords = function() { - function TimeColsSlatsCoords2(positions, dateProfile, slotDuration) { - this.positions = positions; - this.dateProfile = dateProfile; - this.slotDuration = slotDuration; - } - TimeColsSlatsCoords2.prototype.safeComputeTop = function(date) { - var dateProfile = this.dateProfile; - if (rangeContainsMarker(dateProfile.currentRange, date)) { - var startOfDayDate = startOfDay(date); - var timeMs = date.valueOf() - startOfDayDate.valueOf(); - if (timeMs >= asRoughMs(dateProfile.slotMinTime) && timeMs < asRoughMs(dateProfile.slotMaxTime)) { - return this.computeTimeTop(createDuration(timeMs)); + ToText2.prototype._byweekday = function() { + var gettext = this.gettext; + if (this.byweekday.allWeeks && !this.byweekday.isWeekdays) { + this.add(gettext("on")).add(this.list(this.byweekday.allWeeks, this.weekdaytext)); + } + if (this.byweekday.someWeeks) { + if (this.byweekday.allWeeks) + this.add(gettext("and")); + this.add(gettext("on the")).add(this.list(this.byweekday.someWeeks, this.weekdaytext, gettext("and"))); + } + }; + ToText2.prototype._byhour = function() { + var gettext = this.gettext; + this.add(gettext("at")).add(this.list(this.origOptions.byhour, void 0, gettext("and"))); + }; + ToText2.prototype._bymonth = function() { + this.add(this.list(this.options.bymonth, this.monthtext, this.gettext("and"))); + }; + ToText2.prototype.nth = function(n3) { + n3 = parseInt(n3.toString(), 10); + var nth; + var gettext = this.gettext; + if (n3 === -1) + return gettext("last"); + var npos = Math.abs(n3); + switch (npos) { + case 1: + case 21: + case 31: + nth = npos + gettext("st"); + break; + case 2: + case 22: + nth = npos + gettext("nd"); + break; + case 3: + case 23: + nth = npos + gettext("rd"); + break; + default: + nth = npos + gettext("th"); + } + return n3 < 0 ? nth + " " + gettext("last") : nth; + }; + ToText2.prototype.monthtext = function(m3) { + return this.language.monthNames[m3 - 1]; + }; + ToText2.prototype.weekdaytext = function(wday) { + var weekday = isNumber(wday) ? (wday + 1) % 7 : wday.getJsWeekday(); + return (wday.n ? this.nth(wday.n) + " " : "") + this.language.dayNames[weekday]; + }; + ToText2.prototype.plural = function(n3) { + return n3 % 100 !== 1; + }; + ToText2.prototype.add = function(s4) { + this.text.push(" "); + this.text.push(s4); + return this; + }; + ToText2.prototype.list = function(arr, callback, finalDelim, delim) { + var _this = this; + if (delim === void 0) { + delim = ","; + } + if (!isArray(arr)) { + arr = [arr]; + } + var delimJoin = function(array, delimiter, finalDelimiter) { + var list = ""; + for (var i3 = 0; i3 < array.length; i3++) { + if (i3 !== 0) { + if (i3 === array.length - 1) { + list += " " + finalDelimiter + " "; + } else { + list += delimiter + " "; + } + } + list += array[i3]; } + return list; + }; + callback = callback || function(o2) { + return o2.toString(); + }; + var realCallback = function(arg) { + return callback && callback.call(_this, arg); + }; + if (finalDelim) { + return delimJoin(arr.map(realCallback), delim, finalDelim); + } else { + return arr.map(realCallback).join(delim + " "); } - return null; }; - TimeColsSlatsCoords2.prototype.computeDateTop = function(when, startOfDayDate) { - if (!startOfDayDate) { - startOfDayDate = startOfDay(when); + return ToText2; +}(); +var totext_default = ToText; + +// node_modules/rrule/dist/esm/nlp/parsetext.js +var Parser = function() { + function Parser2(rules) { + this.done = true; + this.rules = rules; + } + Parser2.prototype.start = function(text) { + this.text = text; + this.done = false; + return this.nextSymbol(); + }; + Parser2.prototype.isDone = function() { + return this.done && this.symbol === null; + }; + Parser2.prototype.nextSymbol = function() { + var best; + var bestSymbol; + this.symbol = null; + this.value = null; + do { + if (this.done) + return false; + var rule = void 0; + best = null; + for (var name_1 in this.rules) { + rule = this.rules[name_1]; + var match2 = rule.exec(this.text); + if (match2) { + if (best === null || match2[0].length > best[0].length) { + best = match2; + bestSymbol = name_1; + } + } + } + if (best != null) { + this.text = this.text.substr(best[0].length); + if (this.text === "") + this.done = true; + } + if (best == null) { + this.done = true; + this.symbol = null; + this.value = null; + return; + } + } while (bestSymbol === "SKIP"); + this.symbol = bestSymbol; + this.value = best; + return true; + }; + Parser2.prototype.accept = function(name) { + if (this.symbol === name) { + if (this.value) { + var v3 = this.value; + this.nextSymbol(); + return v3; + } + this.nextSymbol(); + return true; } - return this.computeTimeTop(createDuration(when.valueOf() - startOfDayDate.valueOf())); + return false; }; - TimeColsSlatsCoords2.prototype.computeTimeTop = function(duration) { - var _a = this, positions = _a.positions, dateProfile = _a.dateProfile; - var len = positions.els.length; - var slatCoverage = (duration.milliseconds - asRoughMs(dateProfile.slotMinTime)) / asRoughMs(this.slotDuration); - var slatIndex; - var slatRemainder; - slatCoverage = Math.max(0, slatCoverage); - slatCoverage = Math.min(len, slatCoverage); - slatIndex = Math.floor(slatCoverage); - slatIndex = Math.min(slatIndex, len - 1); - slatRemainder = slatCoverage - slatIndex; - return positions.tops[slatIndex] + positions.getHeight(slatIndex) * slatRemainder; + Parser2.prototype.acceptNumber = function() { + return this.accept("number"); }; - return TimeColsSlatsCoords2; + Parser2.prototype.expect = function(name) { + if (this.accept(name)) + return true; + throw new Error("expected " + name + " but found " + this.symbol); + }; + return Parser2; }(); -var TimeColsSlatsBody = function(_super) { - __extends(TimeColsSlatsBody2, _super); - function TimeColsSlatsBody2() { - return _super !== null && _super.apply(this, arguments) || this; +function parseText(text, language) { + if (language === void 0) { + language = i18n_default; } - TimeColsSlatsBody2.prototype.render = function() { - var _a = this, props = _a.props, context = _a.context; - var options = context.options; - var slatElRefs = props.slatElRefs; - return createElement("tbody", null, props.slatMetas.map(function(slatMeta, i3) { - var hookProps = { - time: slatMeta.time, - date: context.dateEnv.toDate(slatMeta.date), - view: context.viewApi - }; - var classNames = [ - "fc-timegrid-slot", - "fc-timegrid-slot-lane", - slatMeta.isLabeled ? "" : "fc-timegrid-slot-minor" - ]; - return createElement("tr", { key: slatMeta.key, ref: slatElRefs.createRef(slatMeta.key) }, props.axis && createElement(TimeColsAxisCell, __assign({}, slatMeta)), createElement(RenderHook, { hookProps, classNames: options.slotLaneClassNames, content: options.slotLaneContent, didMount: options.slotLaneDidMount, willUnmount: options.slotLaneWillUnmount }, function(rootElRef, customClassNames, innerElRef, innerContent) { - return createElement("td", { ref: rootElRef, className: classNames.concat(customClassNames).join(" "), "data-time": slatMeta.isoTimeStr }, innerContent); - })); - })); + var options = {}; + var ttr = new Parser(language.tokens); + if (!ttr.start(text)) + return null; + S2(); + return options; + function S2() { + ttr.expect("every"); + var n3 = ttr.acceptNumber(); + if (n3) + options.interval = parseInt(n3[0], 10); + if (ttr.isDone()) + throw new Error("Unexpected end"); + switch (ttr.symbol) { + case "day(s)": + options.freq = RRule.DAILY; + if (ttr.nextSymbol()) { + AT(); + F3(); + } + break; + case "weekday(s)": + options.freq = RRule.WEEKLY; + options.byweekday = [RRule.MO, RRule.TU, RRule.WE, RRule.TH, RRule.FR]; + ttr.nextSymbol(); + F3(); + break; + case "week(s)": + options.freq = RRule.WEEKLY; + if (ttr.nextSymbol()) { + ON(); + F3(); + } + break; + case "hour(s)": + options.freq = RRule.HOURLY; + if (ttr.nextSymbol()) { + ON(); + F3(); + } + break; + case "minute(s)": + options.freq = RRule.MINUTELY; + if (ttr.nextSymbol()) { + ON(); + F3(); + } + break; + case "month(s)": + options.freq = RRule.MONTHLY; + if (ttr.nextSymbol()) { + ON(); + F3(); + } + break; + case "year(s)": + options.freq = RRule.YEARLY; + if (ttr.nextSymbol()) { + ON(); + F3(); + } + break; + case "monday": + case "tuesday": + case "wednesday": + case "thursday": + case "friday": + case "saturday": + case "sunday": + options.freq = RRule.WEEKLY; + var key = ttr.symbol.substr(0, 2).toUpperCase(); + options.byweekday = [RRule[key]]; + if (!ttr.nextSymbol()) + return; + while (ttr.accept("comma")) { + if (ttr.isDone()) + throw new Error("Unexpected end"); + var wkd = decodeWKD(); + if (!wkd) { + throw new Error("Unexpected symbol " + ttr.symbol + ", expected weekday"); + } + options.byweekday.push(RRule[wkd]); + ttr.nextSymbol(); + } + MDAYs(); + F3(); + break; + case "january": + case "february": + case "march": + case "april": + case "may": + case "june": + case "july": + case "august": + case "september": + case "october": + case "november": + case "december": + options.freq = RRule.YEARLY; + options.bymonth = [decodeM()]; + if (!ttr.nextSymbol()) + return; + while (ttr.accept("comma")) { + if (ttr.isDone()) + throw new Error("Unexpected end"); + var m3 = decodeM(); + if (!m3) { + throw new Error("Unexpected symbol " + ttr.symbol + ", expected month"); + } + options.bymonth.push(m3); + ttr.nextSymbol(); + } + ON(); + F3(); + break; + default: + throw new Error("Unknown symbol"); + } + } + function ON() { + var on = ttr.accept("on"); + var the = ttr.accept("the"); + if (!(on || the)) + return; + do { + var nth = decodeNTH(); + var wkd = decodeWKD(); + var m3 = decodeM(); + if (nth) { + if (wkd) { + ttr.nextSymbol(); + if (!options.byweekday) + options.byweekday = []; + options.byweekday.push(RRule[wkd].nth(nth)); + } else { + if (!options.bymonthday) + options.bymonthday = []; + options.bymonthday.push(nth); + ttr.accept("day(s)"); + } + } else if (wkd) { + ttr.nextSymbol(); + if (!options.byweekday) + options.byweekday = []; + options.byweekday.push(RRule[wkd]); + } else if (ttr.symbol === "weekday(s)") { + ttr.nextSymbol(); + if (!options.byweekday) { + options.byweekday = [RRule.MO, RRule.TU, RRule.WE, RRule.TH, RRule.FR]; + } + } else if (ttr.symbol === "week(s)") { + ttr.nextSymbol(); + var n3 = ttr.acceptNumber(); + if (!n3) { + throw new Error("Unexpected symbol " + ttr.symbol + ", expected week number"); + } + options.byweekno = [parseInt(n3[0], 10)]; + while (ttr.accept("comma")) { + n3 = ttr.acceptNumber(); + if (!n3) { + throw new Error("Unexpected symbol " + ttr.symbol + "; expected monthday"); + } + options.byweekno.push(parseInt(n3[0], 10)); + } + } else if (m3) { + ttr.nextSymbol(); + if (!options.bymonth) + options.bymonth = []; + options.bymonth.push(m3); + } else { + return; + } + } while (ttr.accept("comma") || ttr.accept("the") || ttr.accept("on")); + } + function AT() { + var at = ttr.accept("at"); + if (!at) + return; + do { + var n3 = ttr.acceptNumber(); + if (!n3) { + throw new Error("Unexpected symbol " + ttr.symbol + ", expected hour"); + } + options.byhour = [parseInt(n3[0], 10)]; + while (ttr.accept("comma")) { + n3 = ttr.acceptNumber(); + if (!n3) { + throw new Error("Unexpected symbol " + ttr.symbol + "; expected hour"); + } + options.byhour.push(parseInt(n3[0], 10)); + } + } while (ttr.accept("comma") || ttr.accept("at")); + } + function decodeM() { + switch (ttr.symbol) { + case "january": + return 1; + case "february": + return 2; + case "march": + return 3; + case "april": + return 4; + case "may": + return 5; + case "june": + return 6; + case "july": + return 7; + case "august": + return 8; + case "september": + return 9; + case "october": + return 10; + case "november": + return 11; + case "december": + return 12; + default: + return false; + } + } + function decodeWKD() { + switch (ttr.symbol) { + case "monday": + case "tuesday": + case "wednesday": + case "thursday": + case "friday": + case "saturday": + case "sunday": + return ttr.symbol.substr(0, 2).toUpperCase(); + default: + return false; + } + } + function decodeNTH() { + switch (ttr.symbol) { + case "last": + ttr.nextSymbol(); + return -1; + case "first": + ttr.nextSymbol(); + return 1; + case "second": + ttr.nextSymbol(); + return ttr.accept("last") ? -2 : 2; + case "third": + ttr.nextSymbol(); + return ttr.accept("last") ? -3 : 3; + case "nth": + var v3 = parseInt(ttr.value[1], 10); + if (v3 < -366 || v3 > 366) + throw new Error("Nth out of range: " + v3); + ttr.nextSymbol(); + return ttr.accept("last") ? -v3 : v3; + default: + return false; + } + } + function MDAYs() { + ttr.accept("on"); + ttr.accept("the"); + var nth = decodeNTH(); + if (!nth) + return; + options.bymonthday = [nth]; + ttr.nextSymbol(); + while (ttr.accept("comma")) { + nth = decodeNTH(); + if (!nth) { + throw new Error("Unexpected symbol " + ttr.symbol + "; expected monthday"); + } + options.bymonthday.push(nth); + ttr.nextSymbol(); + } + } + function F3() { + if (ttr.symbol === "until") { + var date = Date.parse(ttr.text); + if (!date) + throw new Error("Cannot parse until date:" + ttr.text); + options.until = new Date(date); + } else if (ttr.accept("for")) { + options.count = parseInt(ttr.value[0], 10); + ttr.expect("number"); + } + } +} + +// node_modules/rrule/dist/esm/types.js +var Frequency; +(function(Frequency2) { + Frequency2[Frequency2["YEARLY"] = 0] = "YEARLY"; + Frequency2[Frequency2["MONTHLY"] = 1] = "MONTHLY"; + Frequency2[Frequency2["WEEKLY"] = 2] = "WEEKLY"; + Frequency2[Frequency2["DAILY"] = 3] = "DAILY"; + Frequency2[Frequency2["HOURLY"] = 4] = "HOURLY"; + Frequency2[Frequency2["MINUTELY"] = 5] = "MINUTELY"; + Frequency2[Frequency2["SECONDLY"] = 6] = "SECONDLY"; +})(Frequency || (Frequency = {})); +function freqIsDailyOrGreater(freq) { + return freq < Frequency.HOURLY; +} + +// node_modules/rrule/dist/esm/nlp/index.js +var fromText = function(text, language) { + if (language === void 0) { + language = i18n_default; + } + return new RRule(parseText(text, language) || void 0); +}; +var common = [ + "count", + "until", + "interval", + "byweekday", + "bymonthday", + "bymonth" +]; +totext_default.IMPLEMENTED = []; +totext_default.IMPLEMENTED[Frequency.HOURLY] = common; +totext_default.IMPLEMENTED[Frequency.MINUTELY] = common; +totext_default.IMPLEMENTED[Frequency.DAILY] = ["byhour"].concat(common); +totext_default.IMPLEMENTED[Frequency.WEEKLY] = common; +totext_default.IMPLEMENTED[Frequency.MONTHLY] = common; +totext_default.IMPLEMENTED[Frequency.YEARLY] = ["byweekno", "byyearday"].concat(common); +var toText = function(rrule, gettext, language, dateFormatter) { + return new totext_default(rrule, gettext, language, dateFormatter).toString(); +}; +var isFullyConvertible = totext_default.isFullyConvertible; + +// node_modules/rrule/dist/esm/datetime.js +var Time = function() { + function Time2(hour, minute, second, millisecond) { + this.hour = hour; + this.minute = minute; + this.second = second; + this.millisecond = millisecond || 0; + } + Time2.prototype.getHours = function() { + return this.hour; }; - return TimeColsSlatsBody2; -}(BaseComponent); -var TimeColsSlats = function(_super) { - __extends(TimeColsSlats2, _super); - function TimeColsSlats2() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.rootElRef = createRef(); - _this.slatElRefs = new RefMap(); + Time2.prototype.getMinutes = function() { + return this.minute; + }; + Time2.prototype.getSeconds = function() { + return this.second; + }; + Time2.prototype.getMilliseconds = function() { + return this.millisecond; + }; + Time2.prototype.getTime = function() { + return (this.hour * 60 * 60 + this.minute * 60 + this.second) * 1e3 + this.millisecond; + }; + return Time2; +}(); +var DateTime = function(_super) { + __extends2(DateTime3, _super); + function DateTime3(year, month, day, hour, minute, second, millisecond) { + var _this = _super.call(this, hour, minute, second, millisecond) || this; + _this.year = year; + _this.month = month; + _this.day = day; return _this; } - TimeColsSlats2.prototype.render = function() { - var _a = this, props = _a.props, context = _a.context; - return createElement("div", { ref: this.rootElRef, className: "fc-timegrid-slots" }, createElement("table", { "aria-hidden": true, className: context.theme.getClass("table"), style: { - minWidth: props.tableMinWidth, - width: props.clientWidth, - height: props.minHeight - } }, props.tableColGroupNode, createElement(TimeColsSlatsBody, { slatElRefs: this.slatElRefs, axis: props.axis, slatMetas: props.slatMetas }))); + DateTime3.fromDate = function(date) { + return new this(date.getUTCFullYear(), date.getUTCMonth() + 1, date.getUTCDate(), date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds(), date.valueOf() % 1e3); }; - TimeColsSlats2.prototype.componentDidMount = function() { - this.updateSizing(); + DateTime3.prototype.getWeekday = function() { + return getWeekday(new Date(this.getTime())); }; - TimeColsSlats2.prototype.componentDidUpdate = function() { - this.updateSizing(); + DateTime3.prototype.getTime = function() { + return new Date(Date.UTC(this.year, this.month - 1, this.day, this.hour, this.minute, this.second, this.millisecond)).getTime(); }; - TimeColsSlats2.prototype.componentWillUnmount = function() { - if (this.props.onCoords) { - this.props.onCoords(null); + DateTime3.prototype.getDay = function() { + return this.day; + }; + DateTime3.prototype.getMonth = function() { + return this.month; + }; + DateTime3.prototype.getYear = function() { + return this.year; + }; + DateTime3.prototype.addYears = function(years) { + this.year += years; + }; + DateTime3.prototype.addMonths = function(months2) { + this.month += months2; + if (this.month > 12) { + var yearDiv = Math.floor(this.month / 12); + var monthMod = pymod(this.month, 12); + this.month = monthMod; + this.year += yearDiv; + if (this.month === 0) { + this.month = 12; + --this.year; + } } }; - TimeColsSlats2.prototype.updateSizing = function() { - var _a = this, context = _a.context, props = _a.props; - if (props.onCoords && props.clientWidth !== null) { - var rootEl = this.rootElRef.current; - if (rootEl.offsetHeight) { - props.onCoords(new TimeColsSlatsCoords(new PositionCache(this.rootElRef.current, collectSlatEls(this.slatElRefs.currentMap, props.slatMetas), false, true), this.props.dateProfile, context.options.slotDuration)); + DateTime3.prototype.addWeekly = function(days, wkst) { + if (wkst > this.getWeekday()) { + this.day += -(this.getWeekday() + 1 + (6 - wkst)) + days * 7; + } else { + this.day += -(this.getWeekday() - wkst) + days * 7; + } + this.fixDay(); + }; + DateTime3.prototype.addDaily = function(days) { + this.day += days; + this.fixDay(); + }; + DateTime3.prototype.addHours = function(hours, filtered, byhour) { + if (filtered) { + this.hour += Math.floor((23 - this.hour) / hours) * hours; + } + for (; ; ) { + this.hour += hours; + var _a = divmod(this.hour, 24), dayDiv = _a.div, hourMod = _a.mod; + if (dayDiv) { + this.hour = hourMod; + this.addDaily(dayDiv); } + if (empty(byhour) || includes(byhour, this.hour)) + break; } }; - return TimeColsSlats2; -}(BaseComponent); -function collectSlatEls(elMap, slatMetas) { - return slatMetas.map(function(slatMeta) { - return elMap[slatMeta.key]; - }); -} -function splitSegsByCol(segs, colCnt) { - var segsByCol = []; - var i3; - for (i3 = 0; i3 < colCnt; i3 += 1) { - segsByCol.push([]); + DateTime3.prototype.addMinutes = function(minutes, filtered, byhour, byminute) { + if (filtered) { + this.minute += Math.floor((1439 - (this.hour * 60 + this.minute)) / minutes) * minutes; + } + for (; ; ) { + this.minute += minutes; + var _a = divmod(this.minute, 60), hourDiv = _a.div, minuteMod = _a.mod; + if (hourDiv) { + this.minute = minuteMod; + this.addHours(hourDiv, false, byhour); + } + if ((empty(byhour) || includes(byhour, this.hour)) && (empty(byminute) || includes(byminute, this.minute))) { + break; + } + } + }; + DateTime3.prototype.addSeconds = function(seconds, filtered, byhour, byminute, bysecond) { + if (filtered) { + this.second += Math.floor((86399 - (this.hour * 3600 + this.minute * 60 + this.second)) / seconds) * seconds; + } + for (; ; ) { + this.second += seconds; + var _a = divmod(this.second, 60), minuteDiv = _a.div, secondMod = _a.mod; + if (minuteDiv) { + this.second = secondMod; + this.addMinutes(minuteDiv, false, byhour, byminute); + } + if ((empty(byhour) || includes(byhour, this.hour)) && (empty(byminute) || includes(byminute, this.minute)) && (empty(bysecond) || includes(bysecond, this.second))) { + break; + } + } + }; + DateTime3.prototype.fixDay = function() { + if (this.day <= 28) { + return; + } + var daysinmonth = monthRange(this.year, this.month - 1)[1]; + if (this.day <= daysinmonth) { + return; + } + while (this.day > daysinmonth) { + this.day -= daysinmonth; + ++this.month; + if (this.month === 13) { + this.month = 1; + ++this.year; + if (this.year > MAXYEAR) { + return; + } + } + daysinmonth = monthRange(this.year, this.month - 1)[1]; + } + }; + DateTime3.prototype.add = function(options, filtered) { + var freq = options.freq, interval = options.interval, wkst = options.wkst, byhour = options.byhour, byminute = options.byminute, bysecond = options.bysecond; + switch (freq) { + case Frequency.YEARLY: + return this.addYears(interval); + case Frequency.MONTHLY: + return this.addMonths(interval); + case Frequency.WEEKLY: + return this.addWeekly(interval, wkst); + case Frequency.DAILY: + return this.addDaily(interval); + case Frequency.HOURLY: + return this.addHours(interval, filtered, byhour); + case Frequency.MINUTELY: + return this.addMinutes(interval, filtered, byhour, byminute); + case Frequency.SECONDLY: + return this.addSeconds(interval, filtered, byhour, byminute, bysecond); + } + }; + return DateTime3; +}(Time); + +// node_modules/rrule/dist/esm/parseoptions.js +function initializeOptions(options) { + var invalid = []; + var keys = Object.keys(options); + for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) { + var key = keys_1[_i]; + if (!includes(defaultKeys, key)) + invalid.push(key); + if (isDate(options[key]) && !isValidDate2(options[key])) { + invalid.push(key); + } + } + if (invalid.length) { + throw new Error("Invalid options: " + invalid.join(", ")); + } + return __assign2({}, options); +} +function parseOptions(options) { + var opts = __assign2(__assign2({}, DEFAULT_OPTIONS), initializeOptions(options)); + if (isPresent(opts.byeaster)) + opts.freq = RRule.YEARLY; + if (!(isPresent(opts.freq) && RRule.FREQUENCIES[opts.freq])) { + throw new Error("Invalid frequency: ".concat(opts.freq, " ").concat(options.freq)); + } + if (!opts.dtstart) + opts.dtstart = new Date(new Date().setMilliseconds(0)); + if (!isPresent(opts.wkst)) { + opts.wkst = RRule.MO.weekday; + } else if (isNumber(opts.wkst)) { + } else { + opts.wkst = opts.wkst.weekday; } - if (segs) { - for (i3 = 0; i3 < segs.length; i3 += 1) { - segsByCol[segs[i3].col].push(segs[i3]); + if (isPresent(opts.bysetpos)) { + if (isNumber(opts.bysetpos)) + opts.bysetpos = [opts.bysetpos]; + for (var i3 = 0; i3 < opts.bysetpos.length; i3++) { + var v3 = opts.bysetpos[i3]; + if (v3 === 0 || !(v3 >= -366 && v3 <= 366)) { + throw new Error("bysetpos must be between 1 and 366, or between -366 and -1"); + } } } - return segsByCol; -} -function splitInteractionByCol(ui, colCnt) { - var byRow = []; - if (!ui) { - for (var i3 = 0; i3 < colCnt; i3 += 1) { - byRow[i3] = null; + if (!(Boolean(opts.byweekno) || notEmpty(opts.byweekno) || notEmpty(opts.byyearday) || Boolean(opts.bymonthday) || notEmpty(opts.bymonthday) || isPresent(opts.byweekday) || isPresent(opts.byeaster))) { + switch (opts.freq) { + case RRule.YEARLY: + if (!opts.bymonth) + opts.bymonth = opts.dtstart.getUTCMonth() + 1; + opts.bymonthday = opts.dtstart.getUTCDate(); + break; + case RRule.MONTHLY: + opts.bymonthday = opts.dtstart.getUTCDate(); + break; + case RRule.WEEKLY: + opts.byweekday = [getWeekday(opts.dtstart)]; + break; + } + } + if (isPresent(opts.bymonth) && !isArray(opts.bymonth)) { + opts.bymonth = [opts.bymonth]; + } + if (isPresent(opts.byyearday) && !isArray(opts.byyearday) && isNumber(opts.byyearday)) { + opts.byyearday = [opts.byyearday]; + } + if (!isPresent(opts.bymonthday)) { + opts.bymonthday = []; + opts.bynmonthday = []; + } else if (isArray(opts.bymonthday)) { + var bymonthday = []; + var bynmonthday = []; + for (var i3 = 0; i3 < opts.bymonthday.length; i3++) { + var v3 = opts.bymonthday[i3]; + if (v3 > 0) { + bymonthday.push(v3); + } else if (v3 < 0) { + bynmonthday.push(v3); + } } + opts.bymonthday = bymonthday; + opts.bynmonthday = bynmonthday; + } else if (opts.bymonthday < 0) { + opts.bynmonthday = [opts.bymonthday]; + opts.bymonthday = []; } else { - for (var i3 = 0; i3 < colCnt; i3 += 1) { - byRow[i3] = { - affectedInstances: ui.affectedInstances, - isEvent: ui.isEvent, - segs: [] - }; + opts.bynmonthday = []; + opts.bymonthday = [opts.bymonthday]; + } + if (isPresent(opts.byweekno) && !isArray(opts.byweekno)) { + opts.byweekno = [opts.byweekno]; + } + if (!isPresent(opts.byweekday)) { + opts.bynweekday = null; + } else if (isNumber(opts.byweekday)) { + opts.byweekday = [opts.byweekday]; + opts.bynweekday = null; + } else if (isWeekdayStr(opts.byweekday)) { + opts.byweekday = [Weekday.fromStr(opts.byweekday).weekday]; + opts.bynweekday = null; + } else if (opts.byweekday instanceof Weekday) { + if (!opts.byweekday.n || opts.freq > RRule.MONTHLY) { + opts.byweekday = [opts.byweekday.weekday]; + opts.bynweekday = null; + } else { + opts.bynweekday = [[opts.byweekday.weekday, opts.byweekday.n]]; + opts.byweekday = null; } - for (var _i = 0, _a = ui.segs; _i < _a.length; _i++) { - var seg = _a[_i]; - byRow[seg.col].segs.push(seg); + } else { + var byweekday = []; + var bynweekday = []; + for (var i3 = 0; i3 < opts.byweekday.length; i3++) { + var wday = opts.byweekday[i3]; + if (isNumber(wday)) { + byweekday.push(wday); + continue; + } else if (isWeekdayStr(wday)) { + byweekday.push(Weekday.fromStr(wday).weekday); + continue; + } + if (!wday.n || opts.freq > RRule.MONTHLY) { + byweekday.push(wday.weekday); + } else { + bynweekday.push([wday.weekday, wday.n]); + } } + opts.byweekday = notEmpty(byweekday) ? byweekday : null; + opts.bynweekday = notEmpty(bynweekday) ? bynweekday : null; } - return byRow; -} -var TimeColMoreLink = function(_super) { - __extends(TimeColMoreLink2, _super); - function TimeColMoreLink2() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.rootElRef = createRef(); - return _this; + if (!isPresent(opts.byhour)) { + opts.byhour = opts.freq < RRule.HOURLY ? [opts.dtstart.getUTCHours()] : null; + } else if (isNumber(opts.byhour)) { + opts.byhour = [opts.byhour]; } - TimeColMoreLink2.prototype.render = function() { - var _this = this; - var props = this.props; - return createElement(MoreLinkRoot, { allDayDate: null, moreCnt: props.hiddenSegs.length, allSegs: props.hiddenSegs, hiddenSegs: props.hiddenSegs, alignmentElRef: this.rootElRef, defaultContent: renderMoreLinkInner2, extraDateSpan: props.extraDateSpan, dateProfile: props.dateProfile, todayRange: props.todayRange, popoverContent: function() { - return renderPlainFgSegs(props.hiddenSegs, props); - } }, function(rootElRef, classNames, innerElRef, innerContent, handleClick, title, isExpanded, popoverId) { - return createElement("a", { ref: function(el) { - setRef(rootElRef, el); - setRef(_this.rootElRef, el); - }, className: ["fc-timegrid-more-link"].concat(classNames).join(" "), style: { top: props.top, bottom: props.bottom }, onClick: handleClick, title, "aria-expanded": isExpanded, "aria-controls": popoverId }, createElement("div", { ref: innerElRef, className: "fc-timegrid-more-link-inner fc-sticky" }, innerContent)); - }); - }; - return TimeColMoreLink2; -}(BaseComponent); -function renderMoreLinkInner2(props) { - return props.shortText; -} -function buildPositioning(segInputs, strictOrder, maxStackCnt) { - var hierarchy = new SegHierarchy(); - if (strictOrder != null) { - hierarchy.strictOrder = strictOrder; + if (!isPresent(opts.byminute)) { + opts.byminute = opts.freq < RRule.MINUTELY ? [opts.dtstart.getUTCMinutes()] : null; + } else if (isNumber(opts.byminute)) { + opts.byminute = [opts.byminute]; } - if (maxStackCnt != null) { - hierarchy.maxStackCnt = maxStackCnt; + if (!isPresent(opts.bysecond)) { + opts.bysecond = opts.freq < RRule.SECONDLY ? [opts.dtstart.getUTCSeconds()] : null; + } else if (isNumber(opts.bysecond)) { + opts.bysecond = [opts.bysecond]; } - var hiddenEntries = hierarchy.addSegs(segInputs); - var hiddenGroups = groupIntersectingEntries(hiddenEntries); - var web = buildWeb(hierarchy); - web = stretchWeb(web, 1); - var segRects = webToRects(web); - return { segRects, hiddenGroups }; + return { parsedOptions: opts }; } -function buildWeb(hierarchy) { - var entriesByLevel = hierarchy.entriesByLevel; - var buildNode = cacheable(function(level, lateral) { - return level + ":" + lateral; - }, function(level, lateral) { - var siblingRange = findNextLevelSegs(hierarchy, level, lateral); - var nextLevelRes = buildNodes(siblingRange, buildNode); - var entry = entriesByLevel[level][lateral]; - return [ - __assign(__assign({}, entry), { nextLevelNodes: nextLevelRes[0] }), - entry.thickness + nextLevelRes[1] - ]; +function buildTimeset(opts) { + var millisecondModulo = opts.dtstart.getTime() % 1e3; + if (!freqIsDailyOrGreater(opts.freq)) { + return []; + } + var timeset = []; + opts.byhour.forEach(function(hour) { + opts.byminute.forEach(function(minute) { + opts.bysecond.forEach(function(second) { + timeset.push(new Time(hour, minute, second, millisecondModulo)); + }); + }); }); - return buildNodes(entriesByLevel.length ? { level: 0, lateralStart: 0, lateralEnd: entriesByLevel[0].length } : null, buildNode)[0]; + return timeset; } -function buildNodes(siblingRange, buildNode) { - if (!siblingRange) { - return [[], 0]; + +// node_modules/rrule/dist/esm/parsestring.js +function parseString2(rfcString) { + var options = rfcString.split("\n").map(parseLine).filter(function(x3) { + return x3 !== null; + }); + return __assign2(__assign2({}, options[0]), options[1]); +} +function parseDtstart(line) { + var options = {}; + var dtstartWithZone = /DTSTART(?:;TZID=([^:=]+?))?(?::|=)([^;\s]+)/i.exec(line); + if (!dtstartWithZone) { + return options; } - var level = siblingRange.level, lateralStart = siblingRange.lateralStart, lateralEnd = siblingRange.lateralEnd; - var lateral = lateralStart; - var pairs = []; - while (lateral < lateralEnd) { - pairs.push(buildNode(level, lateral)); - lateral += 1; + var tzid = dtstartWithZone[1], dtstart = dtstartWithZone[2]; + if (tzid) { + options.tzid = tzid; } - pairs.sort(cmpDescPressures); - return [ - pairs.map(extractNode), - pairs[0][1] - ]; + options.dtstart = untilStringToDate(dtstart); + return options; } -function cmpDescPressures(a3, b3) { - return b3[1] - a3[1]; +function parseLine(rfcString) { + rfcString = rfcString.replace(/^\s+|\s+$/, ""); + if (!rfcString.length) + return null; + var header = /^([A-Z]+?)[:;]/.exec(rfcString.toUpperCase()); + if (!header) { + return parseRrule(rfcString); + } + var key = header[1]; + switch (key.toUpperCase()) { + case "RRULE": + case "EXRULE": + return parseRrule(rfcString); + case "DTSTART": + return parseDtstart(rfcString); + default: + throw new Error("Unsupported RFC prop ".concat(key, " in ").concat(rfcString)); + } +} +function parseRrule(line) { + var strippedLine = line.replace(/^RRULE:/i, ""); + var options = parseDtstart(strippedLine); + var attrs = line.replace(/^(?:RRULE|EXRULE):/i, "").split(";"); + attrs.forEach(function(attr) { + var _a = attr.split("="), key = _a[0], value = _a[1]; + switch (key.toUpperCase()) { + case "FREQ": + options.freq = Frequency[value.toUpperCase()]; + break; + case "WKST": + options.wkst = Days[value.toUpperCase()]; + break; + case "COUNT": + case "INTERVAL": + case "BYSETPOS": + case "BYMONTH": + case "BYMONTHDAY": + case "BYYEARDAY": + case "BYWEEKNO": + case "BYHOUR": + case "BYMINUTE": + case "BYSECOND": + var num = parseNumber(value); + var optionKey = key.toLowerCase(); + options[optionKey] = num; + break; + case "BYWEEKDAY": + case "BYDAY": + options.byweekday = parseWeekday(value); + break; + case "DTSTART": + case "TZID": + var dtstart = parseDtstart(line); + options.tzid = dtstart.tzid; + options.dtstart = dtstart.dtstart; + break; + case "UNTIL": + options.until = untilStringToDate(value); + break; + case "BYEASTER": + options.byeaster = Number(value); + break; + default: + throw new Error("Unknown RRULE property '" + key + "'"); + } + }); + return options; } -function extractNode(a3) { - return a3[0]; +function parseNumber(value) { + if (value.indexOf(",") !== -1) { + var values = value.split(","); + return values.map(parseIndividualNumber); + } + return parseIndividualNumber(value); } -function findNextLevelSegs(hierarchy, subjectLevel, subjectLateral) { - var levelCoords = hierarchy.levelCoords, entriesByLevel = hierarchy.entriesByLevel; - var subjectEntry = entriesByLevel[subjectLevel][subjectLateral]; - var afterSubject = levelCoords[subjectLevel] + subjectEntry.thickness; - var levelCnt = levelCoords.length; - var level = subjectLevel; - for (; level < levelCnt && levelCoords[level] < afterSubject; level += 1) - ; - for (; level < levelCnt; level += 1) { - var entries = entriesByLevel[level]; - var entry = void 0; - var searchIndex = binarySearch(entries, subjectEntry.span.start, getEntrySpanEnd); - var lateralStart = searchIndex[0] + searchIndex[1]; - var lateralEnd = lateralStart; - while ((entry = entries[lateralEnd]) && entry.span.start < subjectEntry.span.end) { - lateralEnd += 1; - } - if (lateralStart < lateralEnd) { - return { level, lateralStart, lateralEnd }; - } +function parseIndividualNumber(value) { + if (/^[+-]?\d+$/.test(value)) { + return Number(value); } - return null; + return value; } -function stretchWeb(topLevelNodes, totalThickness) { - var stretchNode = cacheable(function(node, startCoord, prevThickness) { - return buildEntryKey(node); - }, function(node, startCoord, prevThickness) { - var nextLevelNodes = node.nextLevelNodes, thickness = node.thickness; - var allThickness = thickness + prevThickness; - var thicknessFraction = thickness / allThickness; - var endCoord; - var newChildren = []; - if (!nextLevelNodes.length) { - endCoord = totalThickness; - } else { - for (var _i = 0, nextLevelNodes_1 = nextLevelNodes; _i < nextLevelNodes_1.length; _i++) { - var childNode = nextLevelNodes_1[_i]; - if (endCoord === void 0) { - var res = stretchNode(childNode, startCoord, allThickness); - endCoord = res[0]; - newChildren.push(res[1]); - } else { - var res = stretchNode(childNode, endCoord, 0); - newChildren.push(res[1]); - } - } +function parseWeekday(value) { + var days = value.split(","); + return days.map(function(day) { + if (day.length === 2) { + return Days[day]; } - var newThickness = (endCoord - startCoord) * thicknessFraction; - return [endCoord - newThickness, __assign(__assign({}, node), { thickness: newThickness, nextLevelNodes: newChildren })]; - }); - return topLevelNodes.map(function(node) { - return stretchNode(node, 0, 0)[1]; + var parts = day.match(/^([+-]?\d{1,2})([A-Z]{2})$/); + if (!parts || parts.length < 3) { + throw new SyntaxError("Invalid weekday string: ".concat(day)); + } + var n3 = Number(parts[1]); + var wdaypart = parts[2]; + var wday = Days[wdaypart].weekday; + return new Weekday(wday, n3); }); } -function webToRects(topLevelNodes) { - var rects = []; - var processNode = cacheable(function(node, levelCoord, stackDepth) { - return buildEntryKey(node); - }, function(node, levelCoord, stackDepth) { - var rect = __assign(__assign({}, node), { - levelCoord, - stackDepth, - stackForward: 0 - }); - rects.push(rect); - return rect.stackForward = processNodes(node.nextLevelNodes, levelCoord + node.thickness, stackDepth + 1) + 1; - }); - function processNodes(nodes, levelCoord, stackDepth) { - var stackForward = 0; - for (var _i = 0, nodes_1 = nodes; _i < nodes_1.length; _i++) { - var node = nodes_1[_i]; - stackForward = Math.max(processNode(node, levelCoord, stackDepth), stackForward); + +// node_modules/rrule/dist/esm/datewithzone.js +var DateWithZone = function() { + function DateWithZone2(date, tzid) { + if (isNaN(date.getTime())) { + throw new RangeError("Invalid date passed to DateWithZone"); } - return stackForward; + this.date = date; + this.tzid = tzid; } - processNodes(topLevelNodes, 0, 0); - return rects; -} -function cacheable(keyFunc, workFunc) { - var cache = {}; - return function() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; + Object.defineProperty(DateWithZone2.prototype, "isUTC", { + get: function() { + return !this.tzid || this.tzid.toUpperCase() === "UTC"; + }, + enumerable: false, + configurable: true + }); + DateWithZone2.prototype.toString = function() { + var datestr = timeToUntilString(this.date.getTime(), this.isUTC); + if (!this.isUTC) { + return ";TZID=".concat(this.tzid, ":").concat(datestr); } - var key = keyFunc.apply(void 0, args); - return key in cache ? cache[key] : cache[key] = workFunc.apply(void 0, args); + return ":".concat(datestr); }; -} -function computeSegVCoords(segs, colDate, slatCoords, eventMinHeight) { - if (slatCoords === void 0) { - slatCoords = null; - } - if (eventMinHeight === void 0) { - eventMinHeight = 0; - } - var vcoords = []; - if (slatCoords) { - for (var i3 = 0; i3 < segs.length; i3 += 1) { - var seg = segs[i3]; - var spanStart = slatCoords.computeDateTop(seg.start, colDate); - var spanEnd = Math.max(spanStart + (eventMinHeight || 0), slatCoords.computeDateTop(seg.end, colDate)); - vcoords.push({ - start: Math.round(spanStart), - end: Math.round(spanEnd) - }); + DateWithZone2.prototype.getTime = function() { + return this.date.getTime(); + }; + DateWithZone2.prototype.rezonedDate = function() { + if (this.isUTC) { + return this.date; + } + return dateInTimeZone(this.date, this.tzid); + }; + return DateWithZone2; +}(); + +// node_modules/rrule/dist/esm/optionstostring.js +function optionsToString(options) { + var rrule = []; + var dtstart = ""; + var keys = Object.keys(options); + var defaultKeys2 = Object.keys(DEFAULT_OPTIONS); + for (var i3 = 0; i3 < keys.length; i3++) { + if (keys[i3] === "tzid") + continue; + if (!includes(defaultKeys2, keys[i3])) + continue; + var key = keys[i3].toUpperCase(); + var value = options[keys[i3]]; + var outValue = ""; + if (!isPresent(value) || isArray(value) && !value.length) + continue; + switch (key) { + case "FREQ": + outValue = RRule.FREQUENCIES[options.freq]; + break; + case "WKST": + if (isNumber(value)) { + outValue = new Weekday(value).toString(); + } else { + outValue = value.toString(); + } + break; + case "BYWEEKDAY": + key = "BYDAY"; + outValue = toArray(value).map(function(wday) { + if (wday instanceof Weekday) { + return wday; + } + if (isArray(wday)) { + return new Weekday(wday[0], wday[1]); + } + return new Weekday(wday); + }).toString(); + break; + case "DTSTART": + dtstart = buildDtstart(value, options.tzid); + break; + case "UNTIL": + outValue = timeToUntilString(value, !options.tzid); + break; + default: + if (isArray(value)) { + var strValues = []; + for (var j4 = 0; j4 < value.length; j4++) { + strValues[j4] = String(value[j4]); + } + outValue = strValues.toString(); + } else { + outValue = String(value); + } + } + if (outValue) { + rrule.push([key, outValue]); } } - return vcoords; + var rules = rrule.map(function(_a) { + var key2 = _a[0], value2 = _a[1]; + return "".concat(key2, "=").concat(value2.toString()); + }).join(";"); + var ruleString = ""; + if (rules !== "") { + ruleString = "RRULE:".concat(rules); + } + return [dtstart, ruleString].filter(function(x3) { + return !!x3; + }).join("\n"); } -function computeFgSegPlacements(segs, segVCoords, eventOrderStrict, eventMaxStack) { - var segInputs = []; - var dumbSegs = []; - for (var i3 = 0; i3 < segs.length; i3 += 1) { - var vcoords = segVCoords[i3]; - if (vcoords) { - segInputs.push({ - index: i3, - thickness: 1, - span: vcoords - }); - } else { - dumbSegs.push(segs[i3]); - } +function buildDtstart(dtstart, tzid) { + if (!dtstart) { + return ""; } - var _a = buildPositioning(segInputs, eventOrderStrict, eventMaxStack), segRects = _a.segRects, hiddenGroups = _a.hiddenGroups; - var segPlacements = []; - for (var _i = 0, segRects_1 = segRects; _i < segRects_1.length; _i++) { - var segRect = segRects_1[_i]; - segPlacements.push({ - seg: segs[segRect.index], - rect: segRect + return "DTSTART" + new DateWithZone(new Date(dtstart), tzid).toString(); +} + +// node_modules/rrule/dist/esm/cache.js +function argsMatch(left, right) { + if (Array.isArray(left)) { + if (!Array.isArray(right)) + return false; + if (left.length !== right.length) + return false; + return left.every(function(date, i3) { + return date.getTime() === right[i3].getTime(); }); } - for (var _b = 0, dumbSegs_1 = dumbSegs; _b < dumbSegs_1.length; _b++) { - var dumbSeg = dumbSegs_1[_b]; - segPlacements.push({ seg: dumbSeg, rect: null }); + if (left instanceof Date) { + return right instanceof Date && left.getTime() === right.getTime(); } - return { segPlacements, hiddenGroups }; + return left === right; } -var DEFAULT_TIME_FORMAT = createFormatter({ - hour: "numeric", - minute: "2-digit", - meridiem: false -}); -var TimeColEvent = function(_super) { - __extends(TimeColEvent2, _super); - function TimeColEvent2() { - return _super !== null && _super.apply(this, arguments) || this; +var Cache = function() { + function Cache2() { + this.all = false; + this.before = []; + this.after = []; + this.between = []; } - TimeColEvent2.prototype.render = function() { - var classNames = [ - "fc-timegrid-event", - "fc-v-event" - ]; - if (this.props.isShort) { - classNames.push("fc-timegrid-event-short"); + Cache2.prototype._cacheAdd = function(what, value, args) { + if (value) { + value = value instanceof Date ? clone(value) : cloneDates(value); + } + if (what === "all") { + this.all = value; + } else { + args._value = value; + this[what].push(args); } - return createElement(StandardEvent, __assign({}, this.props, { defaultTimeFormat: DEFAULT_TIME_FORMAT, extraClassNames: classNames })); }; - return TimeColEvent2; -}(BaseComponent); -var TimeColMisc = function(_super) { - __extends(TimeColMisc2, _super); - function TimeColMisc2() { - return _super !== null && _super.apply(this, arguments) || this; - } - TimeColMisc2.prototype.render = function() { - var props = this.props; - return createElement(DayCellContent, { date: props.date, dateProfile: props.dateProfile, todayRange: props.todayRange, extraHookProps: props.extraHookProps }, function(innerElRef, innerContent) { - return innerContent && createElement("div", { className: "fc-timegrid-col-misc", ref: innerElRef }, innerContent); - }); + Cache2.prototype._cacheGet = function(what, args) { + var cached = false; + var argsKeys = args ? Object.keys(args) : []; + var findCacheDiff = function(item2) { + for (var i4 = 0; i4 < argsKeys.length; i4++) { + var key = argsKeys[i4]; + if (!argsMatch(args[key], item2[key])) { + return true; + } + } + return false; + }; + var cachedObject = this[what]; + if (what === "all") { + cached = this.all; + } else if (isArray(cachedObject)) { + for (var i3 = 0; i3 < cachedObject.length; i3++) { + var item = cachedObject[i3]; + if (argsKeys.length && findCacheDiff(item)) + continue; + cached = item._value; + break; + } + } + if (!cached && this.all) { + var iterResult = new iterresult_default(what, args); + for (var i3 = 0; i3 < this.all.length; i3++) { + if (!iterResult.accept(this.all[i3])) + break; + } + cached = iterResult.getValue(); + this._cacheAdd(what, cached, args); + } + return isArray(cached) ? cloneDates(cached) : cached instanceof Date ? clone(cached) : cached; }; - return TimeColMisc2; -}(BaseComponent); -var TimeCol = function(_super) { - __extends(TimeCol2, _super); - function TimeCol2() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.sortEventSegs = memoize(sortEventSegs); - return _this; + return Cache2; +}(); + +// node_modules/rrule/dist/esm/masks.js +var M365MASK = __spreadArray2(__spreadArray2(__spreadArray2(__spreadArray2(__spreadArray2(__spreadArray2(__spreadArray2(__spreadArray2(__spreadArray2(__spreadArray2(__spreadArray2(__spreadArray2(__spreadArray2([], repeat(1, 31), true), repeat(2, 28), true), repeat(3, 31), true), repeat(4, 30), true), repeat(5, 31), true), repeat(6, 30), true), repeat(7, 31), true), repeat(8, 31), true), repeat(9, 30), true), repeat(10, 31), true), repeat(11, 30), true), repeat(12, 31), true), repeat(1, 7), true); +var M366MASK = __spreadArray2(__spreadArray2(__spreadArray2(__spreadArray2(__spreadArray2(__spreadArray2(__spreadArray2(__spreadArray2(__spreadArray2(__spreadArray2(__spreadArray2(__spreadArray2(__spreadArray2([], repeat(1, 31), true), repeat(2, 29), true), repeat(3, 31), true), repeat(4, 30), true), repeat(5, 31), true), repeat(6, 30), true), repeat(7, 31), true), repeat(8, 31), true), repeat(9, 30), true), repeat(10, 31), true), repeat(11, 30), true), repeat(12, 31), true), repeat(1, 7), true); +var M28 = range(1, 29); +var M29 = range(1, 30); +var M30 = range(1, 31); +var M31 = range(1, 32); +var MDAY366MASK = __spreadArray2(__spreadArray2(__spreadArray2(__spreadArray2(__spreadArray2(__spreadArray2(__spreadArray2(__spreadArray2(__spreadArray2(__spreadArray2(__spreadArray2(__spreadArray2(__spreadArray2([], M31, true), M29, true), M31, true), M30, true), M31, true), M30, true), M31, true), M31, true), M30, true), M31, true), M30, true), M31, true), M31.slice(0, 7), true); +var MDAY365MASK = __spreadArray2(__spreadArray2(__spreadArray2(__spreadArray2(__spreadArray2(__spreadArray2(__spreadArray2(__spreadArray2(__spreadArray2(__spreadArray2(__spreadArray2(__spreadArray2(__spreadArray2([], M31, true), M28, true), M31, true), M30, true), M31, true), M30, true), M31, true), M31, true), M30, true), M31, true), M30, true), M31, true), M31.slice(0, 7), true); +var NM28 = range(-28, 0); +var NM29 = range(-29, 0); +var NM30 = range(-30, 0); +var NM31 = range(-31, 0); +var NMDAY366MASK = __spreadArray2(__spreadArray2(__spreadArray2(__spreadArray2(__spreadArray2(__spreadArray2(__spreadArray2(__spreadArray2(__spreadArray2(__spreadArray2(__spreadArray2(__spreadArray2(__spreadArray2([], NM31, true), NM29, true), NM31, true), NM30, true), NM31, true), NM30, true), NM31, true), NM31, true), NM30, true), NM31, true), NM30, true), NM31, true), NM31.slice(0, 7), true); +var NMDAY365MASK = __spreadArray2(__spreadArray2(__spreadArray2(__spreadArray2(__spreadArray2(__spreadArray2(__spreadArray2(__spreadArray2(__spreadArray2(__spreadArray2(__spreadArray2(__spreadArray2(__spreadArray2([], NM31, true), NM28, true), NM31, true), NM30, true), NM31, true), NM30, true), NM31, true), NM31, true), NM30, true), NM31, true), NM30, true), NM31, true), NM31.slice(0, 7), true); +var M366RANGE = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366]; +var M365RANGE = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365]; +var WDAYMASK = function() { + var wdaymask = []; + for (var i3 = 0; i3 < 55; i3++) + wdaymask = wdaymask.concat(range(7)); + return wdaymask; +}(); + +// node_modules/rrule/dist/esm/iterinfo/yearinfo.js +function rebuildYear(year, options) { + var firstyday = datetime(year, 1, 1); + var yearlen = isLeapYear(year) ? 366 : 365; + var nextyearlen = isLeapYear(year + 1) ? 366 : 365; + var yearordinal = toOrdinal(firstyday); + var yearweekday = getWeekday(firstyday); + var result = __assign2(__assign2({ yearlen, nextyearlen, yearordinal, yearweekday }, baseYearMasks(year)), { wnomask: null }); + if (empty(options.byweekno)) { + return result; + } + result.wnomask = repeat(0, yearlen + 7); + var firstwkst; + var wyearlen; + var no1wkst = firstwkst = pymod(7 - yearweekday + options.wkst, 7); + if (no1wkst >= 4) { + no1wkst = 0; + wyearlen = result.yearlen + pymod(yearweekday - options.wkst, 7); + } else { + wyearlen = yearlen - no1wkst; } - TimeCol2.prototype.render = function() { - var _this = this; - var _a = this, props = _a.props, context = _a.context; - var isSelectMirror = context.options.selectMirror; - var mirrorSegs = props.eventDrag && props.eventDrag.segs || props.eventResize && props.eventResize.segs || isSelectMirror && props.dateSelectionSegs || []; - var interactionAffectedInstances = props.eventDrag && props.eventDrag.affectedInstances || props.eventResize && props.eventResize.affectedInstances || {}; - var sortedFgSegs = this.sortEventSegs(props.fgEventSegs, context.options.eventOrder); - return createElement(DayCellRoot, { elRef: props.elRef, date: props.date, dateProfile: props.dateProfile, todayRange: props.todayRange, extraHookProps: props.extraHookProps }, function(rootElRef, classNames, dataAttrs) { - return createElement("td", __assign({ ref: rootElRef, role: "gridcell", className: ["fc-timegrid-col"].concat(classNames, props.extraClassNames || []).join(" ") }, dataAttrs, props.extraDataAttrs), createElement("div", { className: "fc-timegrid-col-frame" }, createElement("div", { className: "fc-timegrid-col-bg" }, _this.renderFillSegs(props.businessHourSegs, "non-business"), _this.renderFillSegs(props.bgEventSegs, "bg-event"), _this.renderFillSegs(props.dateSelectionSegs, "highlight")), createElement("div", { className: "fc-timegrid-col-events" }, _this.renderFgSegs(sortedFgSegs, interactionAffectedInstances, false, false, false)), createElement("div", { className: "fc-timegrid-col-events" }, _this.renderFgSegs(mirrorSegs, {}, Boolean(props.eventDrag), Boolean(props.eventResize), Boolean(isSelectMirror))), createElement("div", { className: "fc-timegrid-now-indicator-container" }, _this.renderNowIndicator(props.nowIndicatorSegs)), createElement(TimeColMisc, { date: props.date, dateProfile: props.dateProfile, todayRange: props.todayRange, extraHookProps: props.extraHookProps }))); - }); - }; - TimeCol2.prototype.renderFgSegs = function(sortedFgSegs, segIsInvisible, isDragging, isResizing, isDateSelecting) { - var props = this.props; - if (props.forPrint) { - return renderPlainFgSegs(sortedFgSegs, props); + var div = Math.floor(wyearlen / 7); + var mod = pymod(wyearlen, 7); + var numweeks = Math.floor(div + mod / 4); + for (var j4 = 0; j4 < options.byweekno.length; j4++) { + var n3 = options.byweekno[j4]; + if (n3 < 0) { + n3 += numweeks + 1; } - return this.renderPositionedFgSegs(sortedFgSegs, segIsInvisible, isDragging, isResizing, isDateSelecting); - }; - TimeCol2.prototype.renderPositionedFgSegs = function(segs, segIsInvisible, isDragging, isResizing, isDateSelecting) { - var _this = this; - var _a = this.context.options, eventMaxStack = _a.eventMaxStack, eventShortHeight = _a.eventShortHeight, eventOrderStrict = _a.eventOrderStrict, eventMinHeight = _a.eventMinHeight; - var _b = this.props, date = _b.date, slatCoords = _b.slatCoords, eventSelection = _b.eventSelection, todayRange = _b.todayRange, nowDate = _b.nowDate; - var isMirror = isDragging || isResizing || isDateSelecting; - var segVCoords = computeSegVCoords(segs, date, slatCoords, eventMinHeight); - var _c = computeFgSegPlacements(segs, segVCoords, eventOrderStrict, eventMaxStack), segPlacements = _c.segPlacements, hiddenGroups = _c.hiddenGroups; - return createElement(Fragment, null, this.renderHiddenGroups(hiddenGroups, segs), segPlacements.map(function(segPlacement) { - var seg = segPlacement.seg, rect = segPlacement.rect; - var instanceId = seg.eventRange.instance.instanceId; - var isVisible = isMirror || Boolean(!segIsInvisible[instanceId] && rect); - var vStyle = computeSegVStyle(rect && rect.span); - var hStyle = !isMirror && rect ? _this.computeSegHStyle(rect) : { left: 0, right: 0 }; - var isInset = Boolean(rect) && rect.stackForward > 0; - var isShort = Boolean(rect) && rect.span.end - rect.span.start < eventShortHeight; - return createElement("div", { className: "fc-timegrid-event-harness" + (isInset ? " fc-timegrid-event-harness-inset" : ""), key: instanceId, style: __assign(__assign({ visibility: isVisible ? "" : "hidden" }, vStyle), hStyle) }, createElement(TimeColEvent, __assign({ seg, isDragging, isResizing, isDateSelecting, isSelected: instanceId === eventSelection, isShort }, getSegMeta(seg, todayRange, nowDate)))); - })); - }; - TimeCol2.prototype.renderHiddenGroups = function(hiddenGroups, segs) { - var _a = this.props, extraDateSpan = _a.extraDateSpan, dateProfile = _a.dateProfile, todayRange = _a.todayRange, nowDate = _a.nowDate, eventSelection = _a.eventSelection, eventDrag = _a.eventDrag, eventResize = _a.eventResize; - return createElement(Fragment, null, hiddenGroups.map(function(hiddenGroup) { - var positionCss = computeSegVStyle(hiddenGroup.span); - var hiddenSegs = compileSegsFromEntries(hiddenGroup.entries, segs); - return createElement(TimeColMoreLink, { key: buildIsoString(computeEarliestSegStart(hiddenSegs)), hiddenSegs, top: positionCss.top, bottom: positionCss.bottom, extraDateSpan, dateProfile, todayRange, nowDate, eventSelection, eventDrag, eventResize }); - })); - }; - TimeCol2.prototype.renderFillSegs = function(segs, fillType) { - var _a = this, props = _a.props, context = _a.context; - var segVCoords = computeSegVCoords(segs, props.date, props.slatCoords, context.options.eventMinHeight); - var children = segVCoords.map(function(vcoords, i3) { - var seg = segs[i3]; - return createElement("div", { key: buildEventRangeKey(seg.eventRange), className: "fc-timegrid-bg-harness", style: computeSegVStyle(vcoords) }, fillType === "bg-event" ? createElement(BgEvent, __assign({ seg }, getSegMeta(seg, props.todayRange, props.nowDate))) : renderFill(fillType)); - }); - return createElement(Fragment, null, children); - }; - TimeCol2.prototype.renderNowIndicator = function(segs) { - var _a = this.props, slatCoords = _a.slatCoords, date = _a.date; - if (!slatCoords) { - return null; + if (!(n3 > 0 && n3 <= numweeks)) { + continue; } - return segs.map(function(seg, i3) { - return createElement(NowIndicatorRoot, { - isAxis: false, - date, - key: i3 - }, function(rootElRef, classNames, innerElRef, innerContent) { - return createElement("div", { ref: rootElRef, className: ["fc-timegrid-now-indicator-line"].concat(classNames).join(" "), style: { top: slatCoords.computeDateTop(seg.start, date) } }, innerContent); - }); - }); - }; - TimeCol2.prototype.computeSegHStyle = function(segHCoords) { - var _a = this.context, isRtl = _a.isRtl, options = _a.options; - var shouldOverlap = options.slotEventOverlap; - var nearCoord = segHCoords.levelCoord; - var farCoord = segHCoords.levelCoord + segHCoords.thickness; - var left; - var right; - if (shouldOverlap) { - farCoord = Math.min(1, nearCoord + (farCoord - nearCoord) * 2); + var i3 = void 0; + if (n3 > 1) { + i3 = no1wkst + (n3 - 1) * 7; + if (no1wkst !== firstwkst) { + i3 -= 7 - firstwkst; + } + } else { + i3 = no1wkst; } - if (isRtl) { - left = 1 - farCoord; - right = nearCoord; + for (var k3 = 0; k3 < 7; k3++) { + result.wnomask[i3] = 1; + i3++; + if (result.wdaymask[i3] === options.wkst) + break; + } + } + if (includes(options.byweekno, 1)) { + var i3 = no1wkst + numweeks * 7; + if (no1wkst !== firstwkst) + i3 -= 7 - firstwkst; + if (i3 < yearlen) { + for (var j4 = 0; j4 < 7; j4++) { + result.wnomask[i3] = 1; + i3 += 1; + if (result.wdaymask[i3] === options.wkst) + break; + } + } + } + if (no1wkst) { + var lnumweeks = void 0; + if (!includes(options.byweekno, -1)) { + var lyearweekday = getWeekday(datetime(year - 1, 1, 1)); + var lno1wkst = pymod(7 - lyearweekday.valueOf() + options.wkst, 7); + var lyearlen = isLeapYear(year - 1) ? 366 : 365; + var weekst = void 0; + if (lno1wkst >= 4) { + lno1wkst = 0; + weekst = lyearlen + pymod(lyearweekday - options.wkst, 7); + } else { + weekst = yearlen - no1wkst; + } + lnumweeks = Math.floor(52 + pymod(weekst, 7) / 4); } else { - left = nearCoord; - right = 1 - farCoord; + lnumweeks = -1; } - var props = { - zIndex: segHCoords.stackDepth + 1, - left: left * 100 + "%", - right: right * 100 + "%" - }; - if (shouldOverlap && !segHCoords.stackForward) { - props[isRtl ? "marginLeft" : "marginRight"] = 10 * 2; + if (includes(options.byweekno, lnumweeks)) { + for (var i3 = 0; i3 < no1wkst; i3++) + result.wnomask[i3] = 1; } - return props; - }; - return TimeCol2; -}(BaseComponent); -function renderPlainFgSegs(sortedFgSegs, _a) { - var todayRange = _a.todayRange, nowDate = _a.nowDate, eventSelection = _a.eventSelection, eventDrag = _a.eventDrag, eventResize = _a.eventResize; - var hiddenInstances = (eventDrag ? eventDrag.affectedInstances : null) || (eventResize ? eventResize.affectedInstances : null) || {}; - return createElement(Fragment, null, sortedFgSegs.map(function(seg) { - var instanceId = seg.eventRange.instance.instanceId; - return createElement("div", { key: instanceId, style: { visibility: hiddenInstances[instanceId] ? "hidden" : "" } }, createElement(TimeColEvent, __assign({ seg, isDragging: false, isResizing: false, isDateSelecting: false, isSelected: instanceId === eventSelection, isShort: false }, getSegMeta(seg, todayRange, nowDate)))); - })); + } + return result; } -function computeSegVStyle(segVCoords) { - if (!segVCoords) { - return { top: "", bottom: "" }; +function baseYearMasks(year) { + var yearlen = isLeapYear(year) ? 366 : 365; + var firstyday = datetime(year, 1, 1); + var wday = getWeekday(firstyday); + if (yearlen === 365) { + return { + mmask: M365MASK, + mdaymask: MDAY365MASK, + nmdaymask: NMDAY365MASK, + wdaymask: WDAYMASK.slice(wday), + mrange: M365RANGE + }; } return { - top: segVCoords.start, - bottom: -segVCoords.end + mmask: M366MASK, + mdaymask: MDAY366MASK, + nmdaymask: NMDAY366MASK, + wdaymask: WDAYMASK.slice(wday), + mrange: M366RANGE }; } -function compileSegsFromEntries(segEntries, allSegs) { - return segEntries.map(function(segEntry) { - return allSegs[segEntry.index]; - }); + +// node_modules/rrule/dist/esm/iterinfo/monthinfo.js +function rebuildMonth(year, month, yearlen, mrange, wdaymask, options) { + var result = { + lastyear: year, + lastmonth: month, + nwdaymask: [] + }; + var ranges = []; + if (options.freq === RRule.YEARLY) { + if (empty(options.bymonth)) { + ranges = [[0, yearlen]]; + } else { + for (var j4 = 0; j4 < options.bymonth.length; j4++) { + month = options.bymonth[j4]; + ranges.push(mrange.slice(month - 1, month + 1)); + } + } + } else if (options.freq === RRule.MONTHLY) { + ranges = [mrange.slice(month - 1, month + 1)]; + } + if (empty(ranges)) { + return result; + } + result.nwdaymask = repeat(0, yearlen); + for (var j4 = 0; j4 < ranges.length; j4++) { + var rang = ranges[j4]; + var first = rang[0]; + var last = rang[1] - 1; + for (var k3 = 0; k3 < options.bynweekday.length; k3++) { + var i3 = void 0; + var _a = options.bynweekday[k3], wday = _a[0], n3 = _a[1]; + if (n3 < 0) { + i3 = last + (n3 + 1) * 7; + i3 -= pymod(wdaymask[i3] - wday, 7); + } else { + i3 = first + (n3 - 1) * 7; + i3 += pymod(7 - wdaymask[i3] + wday, 7); + } + if (first <= i3 && i3 <= last) + result.nwdaymask[i3] = 1; + } + } + return result; } -var TimeColsContent = function(_super) { - __extends(TimeColsContent2, _super); - function TimeColsContent2() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.splitFgEventSegs = memoize(splitSegsByCol); - _this.splitBgEventSegs = memoize(splitSegsByCol); - _this.splitBusinessHourSegs = memoize(splitSegsByCol); - _this.splitNowIndicatorSegs = memoize(splitSegsByCol); - _this.splitDateSelectionSegs = memoize(splitSegsByCol); - _this.splitEventDrag = memoize(splitInteractionByCol); - _this.splitEventResize = memoize(splitInteractionByCol); - _this.rootElRef = createRef(); - _this.cellElRefs = new RefMap(); - return _this; + +// node_modules/rrule/dist/esm/iterinfo/easter.js +function easter(y3, offset2) { + if (offset2 === void 0) { + offset2 = 0; } - TimeColsContent2.prototype.render = function() { - var _this = this; - var _a = this, props = _a.props, context = _a.context; - var nowIndicatorTop = context.options.nowIndicator && props.slatCoords && props.slatCoords.safeComputeTop(props.nowDate); - var colCnt = props.cells.length; - var fgEventSegsByRow = this.splitFgEventSegs(props.fgEventSegs, colCnt); - var bgEventSegsByRow = this.splitBgEventSegs(props.bgEventSegs, colCnt); - var businessHourSegsByRow = this.splitBusinessHourSegs(props.businessHourSegs, colCnt); - var nowIndicatorSegsByRow = this.splitNowIndicatorSegs(props.nowIndicatorSegs, colCnt); - var dateSelectionSegsByRow = this.splitDateSelectionSegs(props.dateSelectionSegs, colCnt); - var eventDragByRow = this.splitEventDrag(props.eventDrag, colCnt); - var eventResizeByRow = this.splitEventResize(props.eventResize, colCnt); - return createElement("div", { className: "fc-timegrid-cols", ref: this.rootElRef }, createElement("table", { role: "presentation", style: { - minWidth: props.tableMinWidth, - width: props.clientWidth - } }, props.tableColGroupNode, createElement("tbody", { role: "presentation" }, createElement("tr", { role: "row" }, props.axis && createElement("td", { "aria-hidden": true, className: "fc-timegrid-col fc-timegrid-axis" }, createElement("div", { className: "fc-timegrid-col-frame" }, createElement("div", { className: "fc-timegrid-now-indicator-container" }, typeof nowIndicatorTop === "number" && createElement(NowIndicatorRoot, { isAxis: true, date: props.nowDate }, function(rootElRef, classNames, innerElRef, innerContent) { - return createElement("div", { ref: rootElRef, className: ["fc-timegrid-now-indicator-arrow"].concat(classNames).join(" "), style: { top: nowIndicatorTop } }, innerContent); - })))), props.cells.map(function(cell, i3) { - return createElement(TimeCol, { key: cell.key, elRef: _this.cellElRefs.createRef(cell.key), dateProfile: props.dateProfile, date: cell.date, nowDate: props.nowDate, todayRange: props.todayRange, extraHookProps: cell.extraHookProps, extraDataAttrs: cell.extraDataAttrs, extraClassNames: cell.extraClassNames, extraDateSpan: cell.extraDateSpan, fgEventSegs: fgEventSegsByRow[i3], bgEventSegs: bgEventSegsByRow[i3], businessHourSegs: businessHourSegsByRow[i3], nowIndicatorSegs: nowIndicatorSegsByRow[i3], dateSelectionSegs: dateSelectionSegsByRow[i3], eventDrag: eventDragByRow[i3], eventResize: eventResizeByRow[i3], slatCoords: props.slatCoords, eventSelection: props.eventSelection, forPrint: props.forPrint }); - }))))); + var a3 = y3 % 19; + var b3 = Math.floor(y3 / 100); + var c3 = y3 % 100; + var d2 = Math.floor(b3 / 4); + var e3 = b3 % 4; + var f3 = Math.floor((b3 + 8) / 25); + var g4 = Math.floor((b3 - f3 + 1) / 3); + var h3 = Math.floor(19 * a3 + b3 - d2 - g4 + 15) % 30; + var i3 = Math.floor(c3 / 4); + var k3 = c3 % 4; + var l4 = Math.floor(32 + 2 * e3 + 2 * i3 - h3 - k3) % 7; + var m3 = Math.floor((a3 + 11 * h3 + 22 * l4) / 451); + var month = Math.floor((h3 + l4 - 7 * m3 + 114) / 31); + var day = (h3 + l4 - 7 * m3 + 114) % 31 + 1; + var date = Date.UTC(y3, month - 1, day + offset2); + var yearStart = Date.UTC(y3, 0, 1); + return [Math.ceil((date - yearStart) / (1e3 * 60 * 60 * 24))]; +} + +// node_modules/rrule/dist/esm/iterinfo/index.js +var Iterinfo = function() { + function Iterinfo2(options) { + this.options = options; + } + Iterinfo2.prototype.rebuild = function(year, month) { + var options = this.options; + if (year !== this.lastyear) { + this.yearinfo = rebuildYear(year, options); + } + if (notEmpty(options.bynweekday) && (month !== this.lastmonth || year !== this.lastyear)) { + var _a = this.yearinfo, yearlen = _a.yearlen, mrange = _a.mrange, wdaymask = _a.wdaymask; + this.monthinfo = rebuildMonth(year, month, yearlen, mrange, wdaymask, options); + } + if (isPresent(options.byeaster)) { + this.eastermask = easter(year, options.byeaster); + } }; - TimeColsContent2.prototype.componentDidMount = function() { - this.updateCoords(); + Object.defineProperty(Iterinfo2.prototype, "lastyear", { + get: function() { + return this.monthinfo ? this.monthinfo.lastyear : null; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(Iterinfo2.prototype, "lastmonth", { + get: function() { + return this.monthinfo ? this.monthinfo.lastmonth : null; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(Iterinfo2.prototype, "yearlen", { + get: function() { + return this.yearinfo.yearlen; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(Iterinfo2.prototype, "yearordinal", { + get: function() { + return this.yearinfo.yearordinal; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(Iterinfo2.prototype, "mrange", { + get: function() { + return this.yearinfo.mrange; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(Iterinfo2.prototype, "wdaymask", { + get: function() { + return this.yearinfo.wdaymask; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(Iterinfo2.prototype, "mmask", { + get: function() { + return this.yearinfo.mmask; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(Iterinfo2.prototype, "wnomask", { + get: function() { + return this.yearinfo.wnomask; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(Iterinfo2.prototype, "nwdaymask", { + get: function() { + return this.monthinfo ? this.monthinfo.nwdaymask : []; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(Iterinfo2.prototype, "nextyearlen", { + get: function() { + return this.yearinfo.nextyearlen; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(Iterinfo2.prototype, "mdaymask", { + get: function() { + return this.yearinfo.mdaymask; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(Iterinfo2.prototype, "nmdaymask", { + get: function() { + return this.yearinfo.nmdaymask; + }, + enumerable: false, + configurable: true + }); + Iterinfo2.prototype.ydayset = function() { + return [range(this.yearlen), 0, this.yearlen]; + }; + Iterinfo2.prototype.mdayset = function(_3, month) { + var start = this.mrange[month - 1]; + var end = this.mrange[month]; + var set = repeat(null, this.yearlen); + for (var i3 = start; i3 < end; i3++) + set[i3] = i3; + return [set, start, end]; + }; + Iterinfo2.prototype.wdayset = function(year, month, day) { + var set = repeat(null, this.yearlen + 7); + var i3 = toOrdinal(datetime(year, month, day)) - this.yearordinal; + var start = i3; + for (var j4 = 0; j4 < 7; j4++) { + set[i3] = i3; + ++i3; + if (this.wdaymask[i3] === this.options.wkst) + break; + } + return [set, start, i3]; }; - TimeColsContent2.prototype.componentDidUpdate = function() { - this.updateCoords(); + Iterinfo2.prototype.ddayset = function(year, month, day) { + var set = repeat(null, this.yearlen); + var i3 = toOrdinal(datetime(year, month, day)) - this.yearordinal; + set[i3] = i3; + return [set, i3, i3 + 1]; }; - TimeColsContent2.prototype.updateCoords = function() { - var props = this.props; - if (props.onColCoords && props.clientWidth !== null) { - props.onColCoords(new PositionCache(this.rootElRef.current, collectCellEls(this.cellElRefs.currentMap, props.cells), true, false)); + Iterinfo2.prototype.htimeset = function(hour, _3, second, millisecond) { + var _this = this; + var set = []; + this.options.byminute.forEach(function(minute) { + set = set.concat(_this.mtimeset(hour, minute, second, millisecond)); + }); + sort(set); + return set; + }; + Iterinfo2.prototype.mtimeset = function(hour, minute, _3, millisecond) { + var set = this.options.bysecond.map(function(second) { + return new Time(hour, minute, second, millisecond); + }); + sort(set); + return set; + }; + Iterinfo2.prototype.stimeset = function(hour, minute, second, millisecond) { + return [new Time(hour, minute, second, millisecond)]; + }; + Iterinfo2.prototype.getdayset = function(freq) { + switch (freq) { + case Frequency.YEARLY: + return this.ydayset.bind(this); + case Frequency.MONTHLY: + return this.mdayset.bind(this); + case Frequency.WEEKLY: + return this.wdayset.bind(this); + case Frequency.DAILY: + return this.ddayset.bind(this); + default: + return this.ddayset.bind(this); + } + }; + Iterinfo2.prototype.gettimeset = function(freq) { + switch (freq) { + case Frequency.HOURLY: + return this.htimeset.bind(this); + case Frequency.MINUTELY: + return this.mtimeset.bind(this); + case Frequency.SECONDLY: + return this.stimeset.bind(this); } }; - return TimeColsContent2; -}(BaseComponent); -function collectCellEls(elMap, cells) { - return cells.map(function(cell) { - return elMap[cell.key]; - }); + return Iterinfo2; +}(); +var iterinfo_default = Iterinfo; + +// node_modules/rrule/dist/esm/iter/poslist.js +function buildPoslist(bysetpos, timeset, start, end, ii, dayset) { + var poslist = []; + for (var j4 = 0; j4 < bysetpos.length; j4++) { + var daypos = void 0; + var timepos = void 0; + var pos = bysetpos[j4]; + if (pos < 0) { + daypos = Math.floor(pos / timeset.length); + timepos = pymod(pos, timeset.length); + } else { + daypos = Math.floor((pos - 1) / timeset.length); + timepos = pymod(pos - 1, timeset.length); + } + var tmp = []; + for (var k3 = start; k3 < end; k3++) { + var val = dayset[k3]; + if (!isPresent(val)) + continue; + tmp.push(val); + } + var i3 = void 0; + if (daypos < 0) { + i3 = tmp.slice(daypos)[0]; + } else { + i3 = tmp[daypos]; + } + var time = timeset[timepos]; + var date = fromOrdinal(ii.yearordinal + i3); + var res = combine(date, time); + if (!includes(poslist, res)) + poslist.push(res); + } + sort(poslist); + return poslist; } -var TimeCols = function(_super) { - __extends(TimeCols2, _super); - function TimeCols2() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.processSlotOptions = memoize(processSlotOptions); - _this.state = { - slatCoords: null - }; - _this.handleRootEl = function(el) { - if (el) { - _this.context.registerInteractiveComponent(_this, { - el, - isHitComboAllowed: _this.props.isHitComboAllowed - }); - } else { - _this.context.unregisterInteractiveComponent(_this); - } - }; - _this.handleScrollRequest = function(request3) { - var onScrollTopRequest = _this.props.onScrollTopRequest; - var slatCoords = _this.state.slatCoords; - if (onScrollTopRequest && slatCoords) { - if (request3.time) { - var top_1 = slatCoords.computeTimeTop(request3.time); - top_1 = Math.ceil(top_1); - if (top_1) { - top_1 += 1; + +// node_modules/rrule/dist/esm/iter/index.js +function iter(iterResult, options) { + var dtstart = options.dtstart, freq = options.freq, interval = options.interval, until = options.until, bysetpos = options.bysetpos; + var count = options.count; + if (count === 0 || interval === 0) { + return emitResult(iterResult); + } + var counterDate = DateTime.fromDate(dtstart); + var ii = new iterinfo_default(options); + ii.rebuild(counterDate.year, counterDate.month); + var timeset = makeTimeset(ii, counterDate, options); + for (; ; ) { + var _a = ii.getdayset(freq)(counterDate.year, counterDate.month, counterDate.day), dayset = _a[0], start = _a[1], end = _a[2]; + var filtered = removeFilteredDays(dayset, start, end, ii, options); + if (notEmpty(bysetpos)) { + var poslist = buildPoslist(bysetpos, timeset, start, end, ii, dayset); + for (var j4 = 0; j4 < poslist.length; j4++) { + var res = poslist[j4]; + if (until && res > until) { + return emitResult(iterResult); + } + if (res >= dtstart) { + var rezonedDate = rezoneIfNeeded(res, options); + if (!iterResult.accept(rezonedDate)) { + return emitResult(iterResult); + } + if (count) { + --count; + if (!count) { + return emitResult(iterResult); + } } - onScrollTopRequest(top_1); } - return true; } - return false; - }; - _this.handleColCoords = function(colCoords) { - _this.colCoords = colCoords; - }; - _this.handleSlatCoords = function(slatCoords) { - _this.setState({ slatCoords }); - if (_this.props.onSlatCoords) { - _this.props.onSlatCoords(slatCoords); + } else { + for (var j4 = start; j4 < end; j4++) { + var currentDay = dayset[j4]; + if (!isPresent(currentDay)) { + continue; + } + var date = fromOrdinal(ii.yearordinal + currentDay); + for (var k3 = 0; k3 < timeset.length; k3++) { + var time = timeset[k3]; + var res = combine(date, time); + if (until && res > until) { + return emitResult(iterResult); + } + if (res >= dtstart) { + var rezonedDate = rezoneIfNeeded(res, options); + if (!iterResult.accept(rezonedDate)) { + return emitResult(iterResult); + } + if (count) { + --count; + if (!count) { + return emitResult(iterResult); + } + } + } + } } - }; - return _this; + } + if (options.interval === 0) { + return emitResult(iterResult); + } + counterDate.add(options, filtered); + if (counterDate.year > MAXYEAR) { + return emitResult(iterResult); + } + if (!freqIsDailyOrGreater(freq)) { + timeset = ii.gettimeset(freq)(counterDate.hour, counterDate.minute, counterDate.second, 0); + } + ii.rebuild(counterDate.year, counterDate.month); } - TimeCols2.prototype.render = function() { - var _a = this, props = _a.props, state = _a.state; - return createElement("div", { className: "fc-timegrid-body", ref: this.handleRootEl, style: { - width: props.clientWidth, - minWidth: props.tableMinWidth - } }, createElement(TimeColsSlats, { axis: props.axis, dateProfile: props.dateProfile, slatMetas: props.slatMetas, clientWidth: props.clientWidth, minHeight: props.expandRows ? props.clientHeight : "", tableMinWidth: props.tableMinWidth, tableColGroupNode: props.axis ? props.tableColGroupNode : null, onCoords: this.handleSlatCoords }), createElement(TimeColsContent, { cells: props.cells, axis: props.axis, dateProfile: props.dateProfile, businessHourSegs: props.businessHourSegs, bgEventSegs: props.bgEventSegs, fgEventSegs: props.fgEventSegs, dateSelectionSegs: props.dateSelectionSegs, eventSelection: props.eventSelection, eventDrag: props.eventDrag, eventResize: props.eventResize, todayRange: props.todayRange, nowDate: props.nowDate, nowIndicatorSegs: props.nowIndicatorSegs, clientWidth: props.clientWidth, tableMinWidth: props.tableMinWidth, tableColGroupNode: props.tableColGroupNode, slatCoords: state.slatCoords, onColCoords: this.handleColCoords, forPrint: props.forPrint })); +} +function isFiltered(ii, currentDay, options) { + var bymonth = options.bymonth, byweekno = options.byweekno, byweekday = options.byweekday, byeaster = options.byeaster, bymonthday = options.bymonthday, bynmonthday = options.bynmonthday, byyearday = options.byyearday; + return notEmpty(bymonth) && !includes(bymonth, ii.mmask[currentDay]) || notEmpty(byweekno) && !ii.wnomask[currentDay] || notEmpty(byweekday) && !includes(byweekday, ii.wdaymask[currentDay]) || notEmpty(ii.nwdaymask) && !ii.nwdaymask[currentDay] || byeaster !== null && !includes(ii.eastermask, currentDay) || (notEmpty(bymonthday) || notEmpty(bynmonthday)) && !includes(bymonthday, ii.mdaymask[currentDay]) && !includes(bynmonthday, ii.nmdaymask[currentDay]) || notEmpty(byyearday) && (currentDay < ii.yearlen && !includes(byyearday, currentDay + 1) && !includes(byyearday, -ii.yearlen + currentDay) || currentDay >= ii.yearlen && !includes(byyearday, currentDay + 1 - ii.yearlen) && !includes(byyearday, -ii.nextyearlen + currentDay - ii.yearlen)); +} +function rezoneIfNeeded(date, options) { + return new DateWithZone(date, options.tzid).rezonedDate(); +} +function emitResult(iterResult) { + return iterResult.getValue(); +} +function removeFilteredDays(dayset, start, end, ii, options) { + var filtered = false; + for (var dayCounter = start; dayCounter < end; dayCounter++) { + var currentDay = dayset[dayCounter]; + filtered = isFiltered(ii, currentDay, options); + if (filtered) + dayset[currentDay] = null; + } + return filtered; +} +function makeTimeset(ii, counterDate, options) { + var freq = options.freq, byhour = options.byhour, byminute = options.byminute, bysecond = options.bysecond; + if (freqIsDailyOrGreater(freq)) { + return buildTimeset(options); + } + if (freq >= RRule.HOURLY && notEmpty(byhour) && !includes(byhour, counterDate.hour) || freq >= RRule.MINUTELY && notEmpty(byminute) && !includes(byminute, counterDate.minute) || freq >= RRule.SECONDLY && notEmpty(bysecond) && !includes(bysecond, counterDate.second)) { + return []; + } + return ii.gettimeset(freq)(counterDate.hour, counterDate.minute, counterDate.second, counterDate.millisecond); +} + +// node_modules/rrule/dist/esm/rrule.js +var Days = { + MO: new Weekday(0), + TU: new Weekday(1), + WE: new Weekday(2), + TH: new Weekday(3), + FR: new Weekday(4), + SA: new Weekday(5), + SU: new Weekday(6) +}; +var DEFAULT_OPTIONS = { + freq: Frequency.YEARLY, + dtstart: null, + interval: 1, + wkst: Days.MO, + count: null, + until: null, + tzid: null, + bysetpos: null, + bymonth: null, + bymonthday: null, + bynmonthday: null, + byyearday: null, + byweekno: null, + byweekday: null, + bynweekday: null, + byhour: null, + byminute: null, + bysecond: null, + byeaster: null +}; +var defaultKeys = Object.keys(DEFAULT_OPTIONS); +var RRule = function() { + function RRule2(options, noCache) { + if (options === void 0) { + options = {}; + } + if (noCache === void 0) { + noCache = false; + } + this._cache = noCache ? null : new Cache(); + this.origOptions = initializeOptions(options); + var parsedOptions = parseOptions(options).parsedOptions; + this.options = parsedOptions; + } + RRule2.parseText = function(text, language) { + return parseText(text, language); }; - TimeCols2.prototype.componentDidMount = function() { - this.scrollResponder = this.context.createScrollResponder(this.handleScrollRequest); + RRule2.fromText = function(text, language) { + return fromText(text, language); }; - TimeCols2.prototype.componentDidUpdate = function(prevProps) { - this.scrollResponder.update(prevProps.dateProfile !== this.props.dateProfile); + RRule2.fromString = function(str) { + return new RRule2(RRule2.parseString(str) || void 0); }; - TimeCols2.prototype.componentWillUnmount = function() { - this.scrollResponder.detach(); + RRule2.prototype._iter = function(iterResult) { + return iter(iterResult, this.options); }; - TimeCols2.prototype.queryHit = function(positionLeft, positionTop) { - var _a = this.context, dateEnv = _a.dateEnv, options = _a.options; - var colCoords = this.colCoords; - var dateProfile = this.props.dateProfile; - var slatCoords = this.state.slatCoords; - var _b = this.processSlotOptions(this.props.slotDuration, options.snapDuration), snapDuration = _b.snapDuration, snapsPerSlot = _b.snapsPerSlot; - var colIndex = colCoords.leftToIndex(positionLeft); - var slatIndex = slatCoords.positions.topToIndex(positionTop); - if (colIndex != null && slatIndex != null) { - var cell = this.props.cells[colIndex]; - var slatTop = slatCoords.positions.tops[slatIndex]; - var slatHeight = slatCoords.positions.getHeight(slatIndex); - var partial = (positionTop - slatTop) / slatHeight; - var localSnapIndex = Math.floor(partial * snapsPerSlot); - var snapIndex = slatIndex * snapsPerSlot + localSnapIndex; - var dayDate = this.props.cells[colIndex].date; - var time = addDurations(dateProfile.slotMinTime, multiplyDuration(snapDuration, snapIndex)); - var start = dateEnv.add(dayDate, time); - var end = dateEnv.add(start, snapDuration); - return { - dateProfile, - dateSpan: __assign({ range: { start, end }, allDay: false }, cell.extraDateSpan), - dayEl: colCoords.els[colIndex], - rect: { - left: colCoords.lefts[colIndex], - right: colCoords.rights[colIndex], - top: slatTop, - bottom: slatTop + slatHeight - }, - layer: 0 - }; + RRule2.prototype._cacheGet = function(what, args) { + if (!this._cache) + return false; + return this._cache._cacheGet(what, args); + }; + RRule2.prototype._cacheAdd = function(what, value, args) { + if (!this._cache) + return; + return this._cache._cacheAdd(what, value, args); + }; + RRule2.prototype.all = function(iterator) { + if (iterator) { + return this._iter(new callbackiterresult_default("all", {}, iterator)); } - return null; + var result = this._cacheGet("all"); + if (result === false) { + result = this._iter(new iterresult_default("all", {})); + this._cacheAdd("all", result); + } + return result; }; - return TimeCols2; -}(DateComponent); -function processSlotOptions(slotDuration, snapDurationOverride) { - var snapDuration = snapDurationOverride || slotDuration; - var snapsPerSlot = wholeDivideDurations(slotDuration, snapDuration); - if (snapsPerSlot === null) { - snapDuration = slotDuration; - snapsPerSlot = 1; - } - return { snapDuration, snapsPerSlot }; -} -var DayTimeColsSlicer = function(_super) { - __extends(DayTimeColsSlicer2, _super); - function DayTimeColsSlicer2() { - return _super !== null && _super.apply(this, arguments) || this; + RRule2.prototype.between = function(after, before, inc, iterator) { + if (inc === void 0) { + inc = false; + } + if (!isValidDate2(after) || !isValidDate2(before)) { + throw new Error("Invalid date passed in to RRule.between"); + } + var args = { + before, + after, + inc + }; + if (iterator) { + return this._iter(new callbackiterresult_default("between", args, iterator)); + } + var result = this._cacheGet("between", args); + if (result === false) { + result = this._iter(new iterresult_default("between", args)); + this._cacheAdd("between", result, args); + } + return result; + }; + RRule2.prototype.before = function(dt, inc) { + if (inc === void 0) { + inc = false; + } + if (!isValidDate2(dt)) { + throw new Error("Invalid date passed in to RRule.before"); + } + var args = { dt, inc }; + var result = this._cacheGet("before", args); + if (result === false) { + result = this._iter(new iterresult_default("before", args)); + this._cacheAdd("before", result, args); + } + return result; + }; + RRule2.prototype.after = function(dt, inc) { + if (inc === void 0) { + inc = false; + } + if (!isValidDate2(dt)) { + throw new Error("Invalid date passed in to RRule.after"); + } + var args = { dt, inc }; + var result = this._cacheGet("after", args); + if (result === false) { + result = this._iter(new iterresult_default("after", args)); + this._cacheAdd("after", result, args); + } + return result; + }; + RRule2.prototype.count = function() { + return this.all().length; + }; + RRule2.prototype.toString = function() { + return optionsToString(this.origOptions); + }; + RRule2.prototype.toText = function(gettext, language, dateFormatter) { + return toText(this, gettext, language, dateFormatter); + }; + RRule2.prototype.isFullyConvertibleToText = function() { + return isFullyConvertible(this); + }; + RRule2.prototype.clone = function() { + return new RRule2(this.origOptions); + }; + RRule2.FREQUENCIES = [ + "YEARLY", + "MONTHLY", + "WEEKLY", + "DAILY", + "HOURLY", + "MINUTELY", + "SECONDLY" + ]; + RRule2.YEARLY = Frequency.YEARLY; + RRule2.MONTHLY = Frequency.MONTHLY; + RRule2.WEEKLY = Frequency.WEEKLY; + RRule2.DAILY = Frequency.DAILY; + RRule2.HOURLY = Frequency.HOURLY; + RRule2.MINUTELY = Frequency.MINUTELY; + RRule2.SECONDLY = Frequency.SECONDLY; + RRule2.MO = Days.MO; + RRule2.TU = Days.TU; + RRule2.WE = Days.WE; + RRule2.TH = Days.TH; + RRule2.FR = Days.FR; + RRule2.SA = Days.SA; + RRule2.SU = Days.SU; + RRule2.parseString = parseString2; + RRule2.optionsToString = optionsToString; + return RRule2; +}(); + +// node_modules/rrule/dist/esm/iterset.js +function iterSet(iterResult, _rrule, _exrule, _rdate, _exdate, tzid) { + var _exdateHash = {}; + var _accept = iterResult.accept; + function evalExdate(after, before) { + _exrule.forEach(function(rrule) { + rrule.between(after, before, true).forEach(function(date) { + _exdateHash[Number(date)] = true; + }); + }); } - DayTimeColsSlicer2.prototype.sliceRange = function(range, dayRanges) { - var segs = []; - for (var col = 0; col < dayRanges.length; col += 1) { - var segRange = intersectRanges(range, dayRanges[col]); - if (segRange) { - segs.push({ - start: segRange.start, - end: segRange.end, - isStart: segRange.start.valueOf() === range.start.valueOf(), - isEnd: segRange.end.valueOf() === range.end.valueOf(), - col - }); + _exdate.forEach(function(date) { + var zonedDate2 = new DateWithZone(date, tzid).rezonedDate(); + _exdateHash[Number(zonedDate2)] = true; + }); + iterResult.accept = function(date) { + var dt = Number(date); + if (isNaN(dt)) + return _accept.call(this, date); + if (!_exdateHash[dt]) { + evalExdate(new Date(dt - 1), new Date(dt + 1)); + if (!_exdateHash[dt]) { + _exdateHash[dt] = true; + return _accept.call(this, date); } } - return segs; + return true; }; - return DayTimeColsSlicer2; -}(Slicer); -var DayTimeCols = function(_super) { - __extends(DayTimeCols2, _super); - function DayTimeCols2() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.buildDayRanges = memoize(buildDayRanges); - _this.slicer = new DayTimeColsSlicer(); - _this.timeColsRef = createRef(); - return _this; + if (iterResult.method === "between") { + evalExdate(iterResult.args.after, iterResult.args.before); + iterResult.accept = function(date) { + var dt = Number(date); + if (!_exdateHash[dt]) { + _exdateHash[dt] = true; + return _accept.call(this, date); + } + return true; + }; } - DayTimeCols2.prototype.render = function() { - var _this = this; - var _a = this, props = _a.props, context = _a.context; - var dateProfile = props.dateProfile, dayTableModel = props.dayTableModel; - var isNowIndicator = context.options.nowIndicator; - var dayRanges = this.buildDayRanges(dayTableModel, dateProfile, context.dateEnv); - return createElement(NowTimer, { unit: isNowIndicator ? "minute" : "day" }, function(nowDate, todayRange) { - return createElement(TimeCols, __assign({ ref: _this.timeColsRef }, _this.slicer.sliceProps(props, dateProfile, null, context, dayRanges), { forPrint: props.forPrint, axis: props.axis, dateProfile, slatMetas: props.slatMetas, slotDuration: props.slotDuration, cells: dayTableModel.cells[0], tableColGroupNode: props.tableColGroupNode, tableMinWidth: props.tableMinWidth, clientWidth: props.clientWidth, clientHeight: props.clientHeight, expandRows: props.expandRows, nowDate, nowIndicatorSegs: isNowIndicator && _this.slicer.sliceNowDate(nowDate, context, dayRanges), todayRange, onScrollTopRequest: props.onScrollTopRequest, onSlatCoords: props.onSlatCoords })); + for (var i3 = 0; i3 < _rdate.length; i3++) { + var zonedDate = new DateWithZone(_rdate[i3], tzid).rezonedDate(); + if (!iterResult.accept(new Date(zonedDate.getTime()))) + break; + } + _rrule.forEach(function(rrule) { + iter(iterResult, rrule.options); + }); + var res = iterResult._result; + sort(res); + switch (iterResult.method) { + case "all": + case "between": + return res; + case "before": + return res.length && res[res.length - 1] || null; + case "after": + default: + return res.length && res[0] || null; + } +} + +// node_modules/rrule/dist/esm/rrulestr.js +var DEFAULT_OPTIONS2 = { + dtstart: null, + cache: false, + unfold: false, + forceset: false, + compatible: false, + tzid: null +}; +function parseInput(s4, options) { + var rrulevals = []; + var rdatevals = []; + var exrulevals = []; + var exdatevals = []; + var parsedDtstart = parseDtstart(s4); + var dtstart = parsedDtstart.dtstart; + var tzid = parsedDtstart.tzid; + var lines = splitIntoLines(s4, options.unfold); + lines.forEach(function(line) { + var _a; + if (!line) + return; + var _b = breakDownLine(line), name = _b.name, parms = _b.parms, value = _b.value; + switch (name.toUpperCase()) { + case "RRULE": + if (parms.length) { + throw new Error("unsupported RRULE parm: ".concat(parms.join(","))); + } + rrulevals.push(parseString2(line)); + break; + case "RDATE": + var _c = (_a = /RDATE(?:;TZID=([^:=]+))?/i.exec(line)) !== null && _a !== void 0 ? _a : [], rdateTzid = _c[1]; + if (rdateTzid && !tzid) { + tzid = rdateTzid; + } + rdatevals = rdatevals.concat(parseRDate(value, parms)); + break; + case "EXRULE": + if (parms.length) { + throw new Error("unsupported EXRULE parm: ".concat(parms.join(","))); + } + exrulevals.push(parseString2(value)); + break; + case "EXDATE": + exdatevals = exdatevals.concat(parseRDate(value, parms)); + break; + case "DTSTART": + break; + default: + throw new Error("unsupported property: " + name); + } + }); + return { + dtstart, + tzid, + rrulevals, + rdatevals, + exrulevals, + exdatevals + }; +} +function buildRule(s4, options) { + var _a = parseInput(s4, options), rrulevals = _a.rrulevals, rdatevals = _a.rdatevals, exrulevals = _a.exrulevals, exdatevals = _a.exdatevals, dtstart = _a.dtstart, tzid = _a.tzid; + var noCache = options.cache === false; + if (options.compatible) { + options.forceset = true; + options.unfold = true; + } + if (options.forceset || rrulevals.length > 1 || rdatevals.length || exrulevals.length || exdatevals.length) { + var rset_1 = new RRuleSet(noCache); + rset_1.dtstart(dtstart); + rset_1.tzid(tzid || void 0); + rrulevals.forEach(function(val2) { + rset_1.rrule(new RRule(groomRruleOptions(val2, dtstart, tzid), noCache)); }); - }; - return DayTimeCols2; -}(DateComponent); -function buildDayRanges(dayTableModel, dateProfile, dateEnv) { - var ranges = []; - for (var _i = 0, _a = dayTableModel.headerDates; _i < _a.length; _i++) { - var date = _a[_i]; - ranges.push({ - start: dateEnv.add(date, dateProfile.slotMinTime), - end: dateEnv.add(date, dateProfile.slotMaxTime) + rdatevals.forEach(function(date) { + rset_1.rdate(date); + }); + exrulevals.forEach(function(val2) { + rset_1.exrule(new RRule(groomRruleOptions(val2, dtstart, tzid), noCache)); + }); + exdatevals.forEach(function(date) { + rset_1.exdate(date); }); + if (options.compatible && options.dtstart) + rset_1.rdate(dtstart); + return rset_1; } - return ranges; + var val = rrulevals[0] || {}; + return new RRule(groomRruleOptions(val, val.dtstart || options.dtstart || dtstart, val.tzid || options.tzid || tzid), noCache); } -var STOCK_SUB_DURATIONS = [ - { hours: 1 }, - { minutes: 30 }, - { minutes: 15 }, - { seconds: 30 }, - { seconds: 15 } -]; -function buildSlatMetas(slotMinTime, slotMaxTime, explicitLabelInterval, slotDuration, dateEnv) { - var dayStart = new Date(0); - var slatTime = slotMinTime; - var slatIterator = createDuration(0); - var labelInterval = explicitLabelInterval || computeLabelInterval(slotDuration); - var metas = []; - while (asRoughMs(slatTime) < asRoughMs(slotMaxTime)) { - var date = dateEnv.add(dayStart, slatTime); - var isLabeled = wholeDivideDurations(slatIterator, labelInterval) !== null; - metas.push({ - date, - time: slatTime, - key: date.toISOString(), - isoTimeStr: formatIsoTimeString(date), - isLabeled - }); - slatTime = addDurations(slatTime, slotDuration); - slatIterator = addDurations(slatIterator, slotDuration); +function rrulestr(s4, options) { + if (options === void 0) { + options = {}; } - return metas; + return buildRule(s4, initializeOptions2(options)); } -function computeLabelInterval(slotDuration) { - var i3; - var labelInterval; - var slotsPerLabel; - for (i3 = STOCK_SUB_DURATIONS.length - 1; i3 >= 0; i3 -= 1) { - labelInterval = createDuration(STOCK_SUB_DURATIONS[i3]); - slotsPerLabel = wholeDivideDurations(labelInterval, slotDuration); - if (slotsPerLabel !== null && slotsPerLabel > 1) { - return labelInterval; +function groomRruleOptions(val, dtstart, tzid) { + return __assign2(__assign2({}, val), { dtstart, tzid }); +} +function initializeOptions2(options) { + var invalid = []; + var keys = Object.keys(options); + var defaultKeys2 = Object.keys(DEFAULT_OPTIONS2); + keys.forEach(function(key) { + if (!includes(defaultKeys2, key)) + invalid.push(key); + }); + if (invalid.length) { + throw new Error("Invalid options: " + invalid.join(", ")); + } + return __assign2(__assign2({}, DEFAULT_OPTIONS2), options); +} +function extractName(line) { + if (line.indexOf(":") === -1) { + return { + name: "RRULE", + value: line + }; + } + var _a = split(line, ":", 1), name = _a[0], value = _a[1]; + return { + name, + value + }; +} +function breakDownLine(line) { + var _a = extractName(line), name = _a.name, value = _a.value; + var parms = name.split(";"); + if (!parms) + throw new Error("empty property name"); + return { + name: parms[0].toUpperCase(), + parms: parms.slice(1), + value + }; +} +function splitIntoLines(s4, unfold) { + if (unfold === void 0) { + unfold = false; + } + s4 = s4 && s4.trim(); + if (!s4) + throw new Error("Invalid empty string"); + if (!unfold) { + return s4.split(/\s/); + } + var lines = s4.split("\n"); + var i3 = 0; + while (i3 < lines.length) { + var line = lines[i3] = lines[i3].replace(/\s+$/g, ""); + if (!line) { + lines.splice(i3, 1); + } else if (i3 > 0 && line[0] === " ") { + lines[i3 - 1] += line.slice(1); + lines.splice(i3, 1); + } else { + i3 += 1; } } - return slotDuration; + return lines; } -var DayTimeColsView = function(_super) { - __extends(DayTimeColsView2, _super); - function DayTimeColsView2() { - var _this = _super !== null && _super.apply(this, arguments) || this; - _this.buildTimeColsModel = memoize(buildTimeColsModel); - _this.buildSlatMetas = memoize(buildSlatMetas); +function validateDateParm(parms) { + parms.forEach(function(parm) { + if (!/(VALUE=DATE(-TIME)?)|(TZID=)/.test(parm)) { + throw new Error("unsupported RDATE/EXDATE parm: " + parm); + } + }); +} +function parseRDate(rdateval, parms) { + validateDateParm(parms); + return rdateval.split(",").map(function(datestr) { + return untilStringToDate(datestr); + }); +} + +// node_modules/rrule/dist/esm/rruleset.js +function createGetterSetter(fieldName) { + var _this = this; + return function(field) { + if (field !== void 0) { + _this["_".concat(fieldName)] = field; + } + if (_this["_".concat(fieldName)] !== void 0) { + return _this["_".concat(fieldName)]; + } + for (var i3 = 0; i3 < _this._rrule.length; i3++) { + var field_1 = _this._rrule[i3].origOptions[fieldName]; + if (field_1) { + return field_1; + } + } + }; +} +var RRuleSet = function(_super) { + __extends2(RRuleSet2, _super); + function RRuleSet2(noCache) { + if (noCache === void 0) { + noCache = false; + } + var _this = _super.call(this, {}, noCache) || this; + _this.dtstart = createGetterSetter.apply(_this, ["dtstart"]); + _this.tzid = createGetterSetter.apply(_this, ["tzid"]); + _this._rrule = []; + _this._rdate = []; + _this._exrule = []; + _this._exdate = []; return _this; } - DayTimeColsView2.prototype.render = function() { - var _this = this; - var _a = this.context, options = _a.options, dateEnv = _a.dateEnv, dateProfileGenerator = _a.dateProfileGenerator; - var props = this.props; - var dateProfile = props.dateProfile; - var dayTableModel = this.buildTimeColsModel(dateProfile, dateProfileGenerator); - var splitProps = this.allDaySplitter.splitProps(props); - var slatMetas = this.buildSlatMetas(dateProfile.slotMinTime, dateProfile.slotMaxTime, options.slotLabelInterval, options.slotDuration, dateEnv); - var dayMinWidth = options.dayMinWidth; - var hasAttachedAxis = !dayMinWidth; - var hasDetachedAxis = dayMinWidth; - var headerContent = options.dayHeaders && createElement(DayHeader, { dates: dayTableModel.headerDates, dateProfile, datesRepDistinctDays: true, renderIntro: hasAttachedAxis ? this.renderHeadAxis : null }); - var allDayContent = options.allDaySlot !== false && function(contentArg) { - return createElement(DayTable, __assign({}, splitProps.allDay, { dateProfile, dayTableModel, nextDayThreshold: options.nextDayThreshold, tableMinWidth: contentArg.tableMinWidth, colGroupNode: contentArg.tableColGroupNode, renderRowIntro: hasAttachedAxis ? _this.renderTableRowAxis : null, showWeekNumbers: false, expandRows: false, headerAlignElRef: _this.headerElRef, clientWidth: contentArg.clientWidth, clientHeight: contentArg.clientHeight, forPrint: props.forPrint }, _this.getAllDayMaxEventProps())); - }; - var timeGridContent = function(contentArg) { - return createElement(DayTimeCols, __assign({}, splitProps.timed, { dayTableModel, dateProfile, axis: hasAttachedAxis, slotDuration: options.slotDuration, slatMetas, forPrint: props.forPrint, tableColGroupNode: contentArg.tableColGroupNode, tableMinWidth: contentArg.tableMinWidth, clientWidth: contentArg.clientWidth, clientHeight: contentArg.clientHeight, onSlatCoords: _this.handleSlatCoords, expandRows: contentArg.expandRows, onScrollTopRequest: _this.handleScrollTopRequest })); - }; - return hasDetachedAxis ? this.renderHScrollLayout(headerContent, allDayContent, timeGridContent, dayTableModel.colCnt, dayMinWidth, slatMetas, this.state.slatCoords) : this.renderSimpleLayout(headerContent, allDayContent, timeGridContent); + RRuleSet2.prototype._iter = function(iterResult) { + return iterSet(iterResult, this._rrule, this._exrule, this._rdate, this._exdate, this.tzid()); }; - return DayTimeColsView2; -}(TimeColsView); -function buildTimeColsModel(dateProfile, dateProfileGenerator) { - var daySeries = new DaySeriesModel(dateProfile.renderRange, dateProfileGenerator); - return new DayTableModel(daySeries, false); + RRuleSet2.prototype.rrule = function(rrule) { + _addRule(rrule, this._rrule); + }; + RRuleSet2.prototype.exrule = function(rrule) { + _addRule(rrule, this._exrule); + }; + RRuleSet2.prototype.rdate = function(date) { + _addDate(date, this._rdate); + }; + RRuleSet2.prototype.exdate = function(date) { + _addDate(date, this._exdate); + }; + RRuleSet2.prototype.rrules = function() { + return this._rrule.map(function(e3) { + return rrulestr(e3.toString()); + }); + }; + RRuleSet2.prototype.exrules = function() { + return this._exrule.map(function(e3) { + return rrulestr(e3.toString()); + }); + }; + RRuleSet2.prototype.rdates = function() { + return this._rdate.map(function(e3) { + return new Date(e3.getTime()); + }); + }; + RRuleSet2.prototype.exdates = function() { + return this._exdate.map(function(e3) { + return new Date(e3.getTime()); + }); + }; + RRuleSet2.prototype.valueOf = function() { + var result = []; + if (!this._rrule.length && this._dtstart) { + result = result.concat(optionsToString({ dtstart: this._dtstart })); + } + this._rrule.forEach(function(rrule) { + result = result.concat(rrule.toString().split("\n")); + }); + this._exrule.forEach(function(exrule) { + result = result.concat(exrule.toString().split("\n").map(function(line) { + return line.replace(/^RRULE:/, "EXRULE:"); + }).filter(function(line) { + return !/^DTSTART/.test(line); + })); + }); + if (this._rdate.length) { + result.push(rdatesToString("RDATE", this._rdate, this.tzid())); + } + if (this._exdate.length) { + result.push(rdatesToString("EXDATE", this._exdate, this.tzid())); + } + return result; + }; + RRuleSet2.prototype.toString = function() { + return this.valueOf().join("\n"); + }; + RRuleSet2.prototype.clone = function() { + var rrs = new RRuleSet2(!!this._cache); + this._rrule.forEach(function(rule) { + return rrs.rrule(rule.clone()); + }); + this._exrule.forEach(function(rule) { + return rrs.exrule(rule.clone()); + }); + this._rdate.forEach(function(date) { + return rrs.rdate(new Date(date.getTime())); + }); + this._exdate.forEach(function(date) { + return rrs.exdate(new Date(date.getTime())); + }); + return rrs; + }; + return RRuleSet2; +}(RRule); +function _addRule(rrule, collection) { + if (!(rrule instanceof RRule)) { + throw new TypeError(String(rrule) + " is not RRule instance"); + } + if (!includes(collection.map(String), String(rrule))) { + collection.push(rrule); + } } -var OPTION_REFINERS = { - allDaySlot: Boolean +function _addDate(date, collection) { + if (!(date instanceof Date)) { + throw new TypeError(String(date) + " is not Date instance"); + } + if (!includes(collection.map(Number), Number(date))) { + collection.push(date); + sort(collection); + } +} +function rdatesToString(param, rdates, tzid) { + var isUTC = !tzid || tzid.toUpperCase() === "UTC"; + var header = isUTC ? "".concat(param, ":") : "".concat(param, ";TZID=").concat(tzid, ":"); + var dateString = rdates.map(function(rdate) { + return timeToUntilString(rdate.valueOf(), isUTC); + }).join(","); + return "".concat(header).concat(dateString); +} + +// node_modules/@fullcalendar/rrule/main.js +var RRULE_EVENT_REFINERS = { + rrule: identity, + exrule: identity, + exdate: identity, + duration: createDuration }; -var main2 = createPlugin({ - initialView: "timeGridWeek", - optionRefiners: OPTION_REFINERS, - views: { - timeGrid: { - component: DayTimeColsView, - usesMinMaxTime: true, - allDaySlot: true, - slotDuration: "00:30:00", - slotEventOverlap: true - }, - timeGridDay: { - type: "timeGrid", - duration: { days: 1 } - }, - timeGridWeek: { - type: "timeGrid", - duration: { weeks: 1 } +var recurring2 = { + parse: function(eventProps, dateEnv) { + if (eventProps.rrule != null) { + var eventRRuleData = parseEventRRule(eventProps, dateEnv); + if (eventRRuleData) { + return { + typeData: { rruleSet: eventRRuleData.rruleSet, isTimeZoneSpecified: eventRRuleData.isTimeZoneSpecified }, + allDayGuess: !eventRRuleData.isTimeSpecified, + duration: eventProps.duration + }; + } + } + return null; + }, + expand: function(eventRRuleData, framingRange, dateEnv) { + var dates; + if (eventRRuleData.isTimeZoneSpecified) { + dates = eventRRuleData.rruleSet.between(dateEnv.toDate(framingRange.start), dateEnv.toDate(framingRange.end), true).map(function(date) { + return dateEnv.createMarker(date); + }); + } else { + dates = eventRRuleData.rruleSet.between(framingRange.start, framingRange.end, true); } + return dates; } +}; +var main3 = createPlugin({ + recurringTypes: [recurring2], + eventRefiners: RRULE_EVENT_REFINERS }); -var main_default2 = main2; +function parseEventRRule(eventProps, dateEnv) { + var rruleSet; + var isTimeSpecified = false; + var isTimeZoneSpecified = false; + if (typeof eventProps.rrule === "string") { + var res = parseRRuleString(eventProps.rrule); + rruleSet = res.rruleSet; + isTimeSpecified = res.isTimeSpecified; + isTimeZoneSpecified = res.isTimeZoneSpecified; + } + if (typeof eventProps.rrule === "object" && eventProps.rrule) { + var res = parseRRuleObject(eventProps.rrule, dateEnv); + rruleSet = new RRuleSet(); + rruleSet.rrule(res.rrule); + isTimeSpecified = res.isTimeSpecified; + isTimeZoneSpecified = res.isTimeZoneSpecified; + } + var exdateInputs = [].concat(eventProps.exdate || []); + var exruleInputs = [].concat(eventProps.exrule || []); + for (var _i = 0, exdateInputs_1 = exdateInputs; _i < exdateInputs_1.length; _i++) { + var exdateInput = exdateInputs_1[_i]; + var res = parse(exdateInput); + isTimeSpecified = isTimeSpecified || !res.isTimeUnspecified; + isTimeZoneSpecified = isTimeZoneSpecified || res.timeZoneOffset !== null; + rruleSet.exdate(new Date(res.marker.valueOf() - (res.timeZoneOffset || 0) * 60 * 1e3)); + } + for (var _a = 0, exruleInputs_1 = exruleInputs; _a < exruleInputs_1.length; _a++) { + var exruleInput = exruleInputs_1[_a]; + var res = parseRRuleObject(exruleInput, dateEnv); + isTimeSpecified = isTimeSpecified || res.isTimeSpecified; + isTimeZoneSpecified = isTimeZoneSpecified || res.isTimeZoneSpecified; + rruleSet.exrule(res.rrule); + } + return { rruleSet, isTimeSpecified, isTimeZoneSpecified }; +} +function parseRRuleObject(rruleInput, dateEnv) { + var isTimeSpecified = false; + var isTimeZoneSpecified = false; + function processDateInput(dateInput) { + if (typeof dateInput === "string") { + var markerData = parse(dateInput); + if (markerData) { + isTimeSpecified = isTimeSpecified || !markerData.isTimeUnspecified; + isTimeZoneSpecified = isTimeZoneSpecified || markerData.timeZoneOffset !== null; + return new Date(markerData.marker.valueOf() - (markerData.timeZoneOffset || 0) * 60 * 1e3); + } + return null; + } + return dateInput; + } + var rruleOptions = __assign(__assign({}, rruleInput), { dtstart: processDateInput(rruleInput.dtstart), until: processDateInput(rruleInput.until), freq: convertConstant(rruleInput.freq), wkst: rruleInput.wkst == null ? (dateEnv.weekDow - 1 + 7) % 7 : convertConstant(rruleInput.wkst), byweekday: convertConstants(rruleInput.byweekday) }); + return { rrule: new RRule(rruleOptions), isTimeSpecified, isTimeZoneSpecified }; +} +function parseRRuleString(str) { + var rruleSet = rrulestr(str, { forceset: true }); + var analysis = analyzeRRuleString(str); + return __assign({ rruleSet }, analysis); +} +function analyzeRRuleString(str) { + var isTimeSpecified = false; + var isTimeZoneSpecified = false; + function processMatch(whole, introPart, datePart) { + var result = parse(datePart); + isTimeSpecified = isTimeSpecified || !result.isTimeUnspecified; + isTimeZoneSpecified = isTimeZoneSpecified || result.timeZoneOffset !== null; + } + str.replace(/\b(DTSTART:)([^\n]*)/, processMatch); + str.replace(/\b(EXDATE:)([^\n]*)/, processMatch); + str.replace(/\b(UNTIL=)([^;\n]*)/, processMatch); + return { isTimeSpecified, isTimeZoneSpecified }; +} +function convertConstants(input) { + if (Array.isArray(input)) { + return input.map(convertConstant); + } + return convertConstant(input); +} +function convertConstant(input) { + if (typeof input === "string") { + return RRule[input.toUpperCase()]; + } + return input; +} +var main_default3 = main3; // node_modules/@fullcalendar/list/main.js var ListViewHeaderRow = function(_super) { @@ -49238,27 +56016,27 @@ var ListView = function(_super) { ListView2.prototype.eventRangeToSegs = function(eventRange, dayRanges) { var dateEnv = this.context.dateEnv; var nextDayThreshold = this.context.options.nextDayThreshold; - var range = eventRange.range; + var range2 = eventRange.range; var allDay = eventRange.def.allDay; var dayIndex; var segRange; var seg; var segs = []; for (dayIndex = 0; dayIndex < dayRanges.length; dayIndex += 1) { - segRange = intersectRanges(range, dayRanges[dayIndex]); + segRange = intersectRanges(range2, dayRanges[dayIndex]); if (segRange) { seg = { component: this, eventRange, start: segRange.start, end: segRange.end, - isStart: eventRange.isStart && segRange.start.valueOf() === range.start.valueOf(), - isEnd: eventRange.isEnd && segRange.end.valueOf() === range.end.valueOf(), + isStart: eventRange.isStart && segRange.start.valueOf() === range2.start.valueOf(), + isEnd: eventRange.isEnd && segRange.end.valueOf() === range2.end.valueOf(), dayIndex }; segs.push(seg); - if (!seg.isEnd && !allDay && dayIndex + 1 < dayRanges.length && range.end < dateEnv.add(dayRanges[dayIndex + 1].start, nextDayThreshold)) { - seg.end = range.end; + if (!seg.isEnd && !allDay && dayIndex + 1 < dayRanges.length && range2.end < dateEnv.add(dayRanges[dayIndex + 1].start, nextDayThreshold)) { + seg.end = range2.end; seg.isEnd = true; break; } @@ -49307,7 +56085,7 @@ var OPTION_REFINERS2 = { function createFalsableFormatter(input) { return input === false ? null : createFormatter(input); } -var main3 = createPlugin({ +var main4 = createPlugin({ optionRefiners: OPTION_REFINERS2, views: { list: { @@ -49338,7 +56116,7 @@ var main3 = createPlugin({ } } }); -var main_default3 = main3; +var main_default4 = main4; // node_modules/@fullcalendar/interaction/main.js config.touchMouseIgnoreWait = 500; @@ -51171,14 +57949,14 @@ var ThirdPartyDraggable = function() { }; return ThirdPartyDraggable2; }(); -var main4 = createPlugin({ +var main5 = createPlugin({ componentInteractions: [DateClicking, DateSelecting, EventDragging, EventResizing], calendarInteractions: [UnselectAuto], elementDraggingImpl: FeaturefulElementDragging, optionRefiners: OPTION_REFINERS3, listenerRefiners: LISTENER_REFINERS }); -var main_default4 = main4; +var main_default5 = main5; // node_modules/@fullcalendar/google-calendar/main.js var OPTION_REFINERS4 = { @@ -51256,16 +58034,16 @@ function buildUrl(meta) { } return apiBase + "/" + encodeURIComponent(meta.googleCalendarId) + "/events"; } -function buildRequestParams2(range, apiKey, extraParams, dateEnv) { +function buildRequestParams2(range2, apiKey, extraParams, dateEnv) { var params; var startStr; var endStr; if (dateEnv.canComputeOffset) { - startStr = dateEnv.formatIso(range.start); - endStr = dateEnv.formatIso(range.end); + startStr = dateEnv.formatIso(range2.start); + endStr = dateEnv.formatIso(range2.end); } else { - startStr = addDays(range.start, -1).toISOString(); - endStr = addDays(range.end, 1).toISOString(); + startStr = addDays(range2.start, -1).toISOString(); + endStr = addDays(range2.end, 1).toISOString(); } params = __assign(__assign({}, extraParams || {}), { key: apiKey, timeMin: startStr, timeMax: endStr, singleEvents: true, maxResults: 9999 }); if (dateEnv.timeZone !== "local") { @@ -51300,17 +58078,17 @@ function injectQsComponent(url, component) { return (qs ? qs + "&" : "?") + component + hash; }); } -var main5 = createPlugin({ +var main6 = createPlugin({ eventSourceDefs: [eventSourceDef2], optionRefiners: OPTION_REFINERS4, eventSourceRefiners: EVENT_SOURCE_REFINERS2 }); -var main_default5 = main5; +var main_default6 = main6; // node_modules/@fullcalendar/icalendar/main.js var ICAL = __toModule(require_ical()); var IcalExpander = function() { - function IcalExpander3(opts) { + function IcalExpander2(opts) { this.maxIterations = opts.maxIterations != null ? opts.maxIterations : 1e3; this.skipInvalidDates = opts.skipInvalidDates != null ? opts.skipInvalidDates : false; this.jCalData = ICAL.parse(opts.ics); @@ -51330,7 +58108,7 @@ var IcalExpander = function() { }); } } - IcalExpander3.prototype.between = function(after, before) { + IcalExpander2.prototype.between = function(after, before) { var _this = this; function isEventWithinRange(startTime, endTime) { return (!after || endTime >= after.getTime()) && (!before || startTime <= before.getTime()); @@ -51398,16 +58176,16 @@ var IcalExpander = function() { }); return ret; }; - IcalExpander3.prototype.before = function(before) { + IcalExpander2.prototype.before = function(before) { return this.between(void 0, before); }; - IcalExpander3.prototype.after = function(after) { + IcalExpander2.prototype.after = function(after) { return this.between(after); }; - IcalExpander3.prototype.all = function() { + IcalExpander2.prototype.all = function() { return this.between(); }; - return IcalExpander3; + return IcalExpander2; }(); var eventSourceDef3 = { parseMeta: function(refined) { @@ -51482,9 +58260,9 @@ function requestICal(url, successCallback, failureCallback) { }; xhr.send(null); } -function expandICalEvents(iCalExpander, range) { - var rangeStart = addDays(range.start, -1); - var rangeEnd = addDays(range.end, 1); +function expandICalEvents(iCalExpander, range2) { + var rangeStart = addDays(range2.start, -1); + var rangeEnd = addDays(range2.end, 1); var iCalRes = iCalExpander.between(rangeStart, rangeEnd); var expanded = []; for (var _i = 0, _a = iCalRes.events; _i < _a.length; _i++) { @@ -51516,12 +58294,18 @@ function extractEventUrl(iCalEvent) { function specifiesEnd(iCalEvent) { return Boolean(iCalEvent.component.getFirstProperty("dtend")) || Boolean(iCalEvent.component.getFirstProperty("duration")); } -var main6 = createPlugin({ +var main7 = createPlugin({ eventSourceDefs: [eventSourceDef3] }); -var main_default6 = main6; +var main_default7 = main7; // src/ui/calendar.ts +main_default3.recurringTypes[0].expand = function(errd, fr, de) { + const hours = errd.rruleSet._dtstart.getHours(); + return errd.rruleSet.between(de.toDate(fr.start), de.toDate(fr.end), true).map((d2) => { + return new Date(Date.UTC(d2.getFullYear(), d2.getMonth(), d2.getDate(), hours, d2.getMinutes())); + }); +}; function renderCalendar(containerEl, eventSources, settings) { var _a; const isMobile = window.innerWidth < 500; @@ -51532,7 +58316,7 @@ function renderCalendar(containerEl, eventSources, settings) { modifyEvent, eventMouseEnter, openContextMenuForEvent, - toggleTask + toggleTask: toggleTask2 } = settings || {}; const modifyEventCallback = modifyEvent && ((_0) => __async(this, [_0], function* ({ event, @@ -51548,10 +58332,11 @@ function renderCalendar(containerEl, eventSources, settings) { plugins: [ main_default, main_default2, - main_default3, main_default4, main_default5, - main_default6 + main_default6, + main_default7, + main_default3 ], googleCalendarApiKey: "AIzaSyDIiklFwJXaLWuT_4y6I9ZRVVsPuf4xGrk", initialView: ((_a = settings == null ? void 0 : settings.initialView) == null ? void 0 : _a[isNarrow ? "mobile" : "desktop"]) || (isNarrow ? "timeGrid3Days" : "timeGridWeek"), @@ -51611,7 +58396,7 @@ function renderCalendar(containerEl, eventSources, settings) { e3.preventDefault(); openContextMenuForEvent && openContextMenuForEvent(event, e3); }); - if (toggleTask) { + if (toggleTask2) { if (event.extendedProps.isTask) { const checkbox = document.createElement("input"); checkbox.type = "checkbox"; @@ -51619,7 +58404,7 @@ function renderCalendar(containerEl, eventSources, settings) { checkbox.onclick = (e3) => __async(this, null, function* () { e3.stopPropagation(); if (e3.target) { - let ret = yield toggleTask(event, e3.target.checked); + let ret = yield toggleTask2(event, e3.target.checked); if (!ret) { e3.target.checked = !e3.target.checked; } @@ -51645,10 +58430,98 @@ function renderCalendar(containerEl, eventSources, settings) { return cal; } -// src/ui/modal.ts -var import_obsidian5 = __toModule(require("obsidian")); -var React2 = __toModule(require_react()); -var ReactDOM = __toModule(require_react_dom()); +// src/types/validation.ts +function validateEvent(obj) { + if (obj === void 0) { + return null; + } + if (!obj.title) { + return null; + } + if (!obj.allDay && !obj.startTime) { + return null; + } + const timeInfo = obj.allDay ? { allDay: true } : { + startTime: obj.startTime, + endTime: obj.endTime + }; + if (obj.type === void 0 || obj.type === "single") { + if (!obj.date) { + return null; + } + const event = __spreadValues({ + title: obj.title, + type: "single", + date: obj.date + }, timeInfo); + if (obj.completed !== void 0 || obj.completed !== null) { + event.completed = obj.completed; + } + if (obj.endDate) { + event.endDate = obj.endDate; + } + if (obj.id) { + event.id = obj.id; + } + return event; + } else if (obj.type === "recurring") { + if (obj.daysOfWeek === void 0) { + return null; + } + const event = __spreadValues({ + title: obj.title, + type: "recurring", + daysOfWeek: obj.daysOfWeek, + startRecur: obj.startRecur, + endRecur: obj.endRecur + }, timeInfo); + if (obj.id) { + event.id = obj.id; + } + return event; + } else if (obj.type === "rrule") { + if (!obj.rrule) { + return null; + } + if (!obj.startDate) { + return null; + } + const event = __spreadValues({ + type: "rrule", + title: obj.title, + rrule: obj.rrule, + skipDates: obj.skipDates, + startDate: obj.startDate + }, timeInfo); + if (obj.id) { + event.id = obj.id; + } + return event; + } + return null; +} + +// src/types/index.ts +var PLUGIN_SLUG = "full-calendar-plugin"; +function makeDefaultPartialCalendarSource(type) { + if (type === "icloud") { + return { + type, + color: getComputedStyle(document.body).getPropertyValue("--interactive-accent").trim(), + url: "https://caldav.icloud.com" + }; + } + return { + type, + color: getComputedStyle(document.body).getPropertyValue("--interactive-accent").trim() + }; +} +var FCError = class { + constructor(message) { + this.message = message; + } +}; +var validateEvent2 = validateEvent; // node_modules/luxon/src/errors.js var LuxonError = class extends Error { @@ -51839,7 +58712,7 @@ var DATETIME_HUGE_WITH_SECONDS = { function isUndefined(o2) { return typeof o2 === "undefined"; } -function isNumber(o2) { +function isNumber2(o2) { return typeof o2 === "number"; } function isInteger(o2) { @@ -51848,7 +58721,7 @@ function isInteger(o2) { function isString(o2) { return typeof o2 === "string"; } -function isDate(o2) { +function isDate2(o2) { return Object.prototype.toString.call(o2) === "[object Date]"; } function hasRelative() { @@ -51888,10 +58761,10 @@ function hasOwnProperty2(obj, prop) { function integerBetween(thing, bottom, top) { return isInteger(thing) && thing >= bottom && thing <= top; } -function floorMod(x4, n3) { - return x4 - n3 * Math.floor(x4 / n3); +function floorMod(x3, n3) { + return x3 - n3 * Math.floor(x3 / n3); } -function padStart2(input, n3 = 2) { +function padStart3(input, n3 = 2) { const isNeg = input < 0; let padded; if (isNeg) { @@ -51927,16 +58800,16 @@ function roundTo(number, digits, towardZero = false) { const factor = 10 ** digits, rounder = towardZero ? Math.trunc : Math.round; return rounder(number * factor) / factor; } -function isLeapYear(year) { +function isLeapYear2(year) { return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0); } function daysInYear(year) { - return isLeapYear(year) ? 366 : 365; + return isLeapYear2(year) ? 366 : 365; } function daysInMonth(year, month) { const modMonth = floorMod(month - 1, 12) + 1, modYear = year + (month - modMonth) / 12; if (modMonth === 2) { - return isLeapYear(modYear) ? 29 : 28; + return isLeapYear2(modYear) ? 29 : 28; } else { return [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][modMonth - 1]; } @@ -52005,11 +58878,11 @@ function formatOffset(offset2, format) { const hours = Math.trunc(Math.abs(offset2 / 60)), minutes = Math.trunc(Math.abs(offset2 % 60)), sign = offset2 >= 0 ? "+" : "-"; switch (format) { case "short": - return `${sign}${padStart2(hours, 2)}:${padStart2(minutes, 2)}`; + return `${sign}${padStart3(hours, 2)}:${padStart3(minutes, 2)}`; case "narrow": return `${sign}${hours}${minutes > 0 ? `:${minutes}` : ""}`; case "techie": - return `${sign}${padStart2(hours, 2)}${padStart2(minutes, 2)}`; + return `${sign}${padStart3(hours, 2)}${padStart3(minutes, 2)}`; default: throw new RangeError(`Value format ${format} is out of range for property format`); } @@ -52242,7 +59115,7 @@ var Formatter = class { } num(n3, p3 = 0) { if (this.opts.forceSimple) { - return padStart2(n3, p3); + return padStart3(n3, p3); } const opts = __spreadValues({}, this.opts); if (p3 > 0) { @@ -52727,7 +59600,7 @@ function normalizeZone(input, defaultZone2) { return FixedOffsetZone.utcInstance; else return FixedOffsetZone.parseSpecifier(lowered) || IANAZone.create(input); - } else if (isNumber(input)) { + } else if (isNumber2(input)) { return FixedOffsetZone.instance(input); } else if (typeof input === "object" && input.offset && typeof input.offset === "number") { return input; @@ -52870,7 +59743,7 @@ function intlConfigString(localeStr, numberingSystem, outputCalendar) { function mapMonths(f3) { const ms = []; for (let i3 = 1; i3 <= 12; i3++) { - const dt = DateTime.utc(2016, i3, 1); + const dt = DateTime2.utc(2016, i3, 1); ms.push(f3(dt)); } return ms; @@ -52878,7 +59751,7 @@ function mapMonths(f3) { function mapWeekdays(f3) { const ms = []; for (let i3 = 1; i3 <= 7; i3++) { - const dt = DateTime.utc(2016, 11, 13 + i3); + const dt = DateTime2.utc(2016, 11, 13 + i3); ms.push(f3(dt)); } return ms; @@ -52918,7 +59791,7 @@ var PolyNumberFormatter = class { return this.inf.format(fixed); } else { const fixed = this.floor ? Math.floor(i3) : roundTo(i3, 3); - return padStart2(fixed, this.padTo); + return padStart3(fixed, this.padTo); } } }; @@ -52937,7 +59810,7 @@ var PolyDateFormatter = class { if (opts.timeZoneName) { this.dt = dt; } else { - this.dt = dt.offset === 0 ? dt : DateTime.fromMillis(dt.ts + dt.offset * 60 * 1e3); + this.dt = dt.offset === 0 ? dt : DateTime2.fromMillis(dt.ts + dt.offset * 60 * 1e3); } } } else if (dt.zone.type === "system") { @@ -53063,7 +59936,7 @@ var Locale = class { return listStuff(this, void 0, defaultOK, () => meridiems, () => { if (!this.meridiemCache) { const intl = { hour: "numeric", hourCycle: "h12" }; - this.meridiemCache = [DateTime.utc(2016, 11, 13, 9), DateTime.utc(2016, 11, 13, 19)].map((dt) => this.extract(dt, intl, "dayperiod")); + this.meridiemCache = [DateTime2.utc(2016, 11, 13, 9), DateTime2.utc(2016, 11, 13, 19)].map((dt) => this.extract(dt, intl, "dayperiod")); } return this.meridiemCache; }); @@ -53072,7 +59945,7 @@ var Locale = class { return listStuff(this, length, defaultOK, eras, () => { const intl = { era: length }; if (!this.eraCache[length]) { - this.eraCache[length] = [DateTime.utc(-40, 1, 1), DateTime.utc(2017, 1, 1)].map((dt) => this.extract(dt, intl, "era")); + this.eraCache[length] = [DateTime2.utc(-40, 1, 1), DateTime2.utc(2017, 1, 1)].map((dt) => this.extract(dt, intl, "era")); } return this.eraCache[length]; }); @@ -53179,7 +60052,17 @@ function extractIANAZone(match2, cursor) { var isoTimeOnly = RegExp(`^T?${isoTimeBaseRegex.source}$`); var isoDuration = /^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/; function extractISODuration(match2) { - const [s4, yearStr, monthStr, weekStr, dayStr, hourStr, minuteStr, secondStr, millisecondsStr] = match2; + const [ + s4, + yearStr, + monthStr, + weekStr, + dayStr, + hourStr, + minuteStr, + secondStr, + millisecondsStr + ] = match2; const hasNegativePrefix = s4[0] === "-"; const negativeSeconds = secondStr && secondStr[0] === "-"; const maybeNegate = (num, force = false) => num !== void 0 && (force || num && hasNegativePrefix) ? -num : num; @@ -53249,7 +60132,7 @@ function extractRFC2822(match2) { return [result, new FixedOffsetZone(offset2)]; } function preprocessRFC2822(s4) { - return s4.replace(/\([^)]*\)|[\n\t]/g, " ").replace(/(\s\s+)/g, " ").trim(); + return s4.replace(/\([^()]*\)|[\n\t]/g, " ").replace(/(\s\s+)/g, " ").trim(); } var rfc1123 = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/; var rfc850 = /^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/; @@ -53385,7 +60268,7 @@ var orderedUnits = [ "milliseconds" ]; var reverseUnits = orderedUnits.slice(0).reverse(); -function clone(dur, alts, clear = false) { +function clone2(dur, alts, clear = false) { const conf = { values: clear ? alts.values : __spreadValues(__spreadValues({}, dur.values), alts.values || {}), loc: dur.loc.clone(alts.loc), @@ -53437,7 +60320,7 @@ var Duration = class { }); } static fromDurationLike(durationLike) { - if (isNumber(durationLike)) { + if (isNumber2(durationLike)) { return Duration.fromMillis(durationLike); } else if (Duration.isDuration(durationLike)) { return durationLike; @@ -53600,7 +60483,7 @@ var Duration = class { result[k3] = dur.get(k3) + this.get(k3); } } - return clone(this, { values: result }, true); + return clone2(this, { values: result }, true); } minus(duration) { if (!this.isValid) @@ -53615,7 +60498,7 @@ var Duration = class { for (const k3 of Object.keys(this.values)) { result[k3] = asNumber(fn(this.values[k3], k3)); } - return clone(this, { values: result }, true); + return clone2(this, { values: result }, true); } get(unit) { return this[Duration.normalizeUnit(unit)]; @@ -53624,14 +60507,14 @@ var Duration = class { if (!this.isValid) return this; const mixed = __spreadValues(__spreadValues({}, this.values), normalizeObject(values, Duration.normalizeUnit)); - return clone(this, { values: mixed }); + return clone2(this, { values: mixed }); } reconfigure({ locale, numberingSystem, conversionAccuracy } = {}) { const loc = this.loc.clone({ locale, numberingSystem }), opts = { loc }; if (conversionAccuracy) { opts.conversionAccuracy = conversionAccuracy; } - return clone(this, opts); + return clone2(this, opts); } as(unit) { return this.isValid ? this.shiftTo(unit).get(unit) : NaN; @@ -53641,7 +60524,7 @@ var Duration = class { return this; const vals = this.toObject(); normalizeValues(this.matrix, vals); - return clone(this, { values: vals }, true); + return clone2(this, { values: vals }, true); } shiftTo(...units) { if (!this.isValid) @@ -53660,7 +60543,7 @@ var Duration = class { own += this.matrix[ak][k3] * accumulated[ak]; accumulated[ak] = 0; } - if (isNumber(vals[k3])) { + if (isNumber2(vals[k3])) { own += vals[k3]; } const i3 = Math.trunc(own); @@ -53671,7 +60554,7 @@ var Duration = class { convert(this.matrix, vals, down, built, k3); } } - } else if (isNumber(vals[k3])) { + } else if (isNumber2(vals[k3])) { accumulated[k3] = vals[k3]; } } @@ -53680,7 +60563,7 @@ var Duration = class { built[lastUnit] += key === lastUnit ? accumulated[key] : accumulated[key] / this.matrix[lastUnit][key]; } } - return clone(this, { values: built }, true).normalize(); + return clone2(this, { values: built }, true).normalize(); } negate() { if (!this.isValid) @@ -53689,7 +60572,7 @@ var Duration = class { for (const k3 of Object.keys(this.values)) { negated[k3] = this.values[k3] === 0 ? 0 : -this.values[k3]; } - return clone(this, { values: negated }, true); + return clone2(this, { values: negated }, true); } get years() { return this.isValid ? this.values.years || 0 : NaN; @@ -53804,14 +60687,14 @@ var Interval = class { if (s4 && e3) { let start, startIsValid; try { - start = DateTime.fromISO(s4, opts); + start = DateTime2.fromISO(s4, opts); startIsValid = start.isValid; } catch (e4) { startIsValid = false; } let end, endIsValid; try { - end = DateTime.fromISO(e3, opts); + end = DateTime2.fromISO(e3, opts); endIsValid = end.isValid; } catch (e4) { endIsValid = false; @@ -53907,7 +60790,7 @@ var Interval = class { let { s: s4 } = this, idx = 1, next; const results = []; while (s4 < this.e) { - const added = this.start.plus(dur.mapUnits((x4) => x4 * idx)); + const added = this.start.plus(dur.mapUnits((x3) => x3 * idx)); next = +added > +this.e ? this.e : added; results.push(Interval.fromDateTimes(s4, next)); s4 = next; @@ -54036,7 +60919,7 @@ var Interval = class { // node_modules/luxon/src/info.js var Info = class { static hasDST(zone = Settings.defaultZone) { - const proto = DateTime.now().setZone(zone).set({ month: 12 }); + const proto = DateTime2.now().setZone(zone).set({ month: 12 }); return !zone.isUniversal && proto.offset !== proto.set({ month: 6 }).offset; } static isValidIANAZone(zone) { @@ -54493,7 +61376,7 @@ function dateTimeFromMatches(matches) { var dummyDateTimeCache = null; function getDummyDateTime() { if (!dummyDateTimeCache) { - dummyDateTimeCache = DateTime.fromMillis(1555555555555); + dummyDateTimeCache = DateTime2.fromMillis(1555555555555); } return dummyDateTimeCache; } @@ -54548,10 +61431,10 @@ function dayOfWeek(year, month, day) { return js === 0 ? 7 : js; } function computeOrdinal(year, month, day) { - return day + (isLeapYear(year) ? leapLadder : nonLeapLadder)[month - 1]; + return day + (isLeapYear2(year) ? leapLadder : nonLeapLadder)[month - 1]; } function uncomputeOrdinal(year, ordinal) { - const table = isLeapYear(year) ? leapLadder : nonLeapLadder, month0 = table.findIndex((i3) => i3 < ordinal), day = ordinal - table[month0]; + const table = isLeapYear2(year) ? leapLadder : nonLeapLadder, month0 = table.findIndex((i3) => i3 < ordinal), day = ordinal - table[month0]; return { month: month0 + 1, day }; } function gregorianToWeek(gregObj) { @@ -54651,7 +61534,7 @@ function possiblyCachedWeekData(dt) { } return dt.weekData; } -function clone2(inst, alts) { +function clone3(inst, alts) { const current = { ts: inst.ts, zone: inst.zone, @@ -54660,7 +61543,7 @@ function clone2(inst, alts) { loc: inst.loc, invalid: inst.invalid }; - return new DateTime(__spreadProps(__spreadValues(__spreadValues({}, current), alts), { old: current })); + return new DateTime2(__spreadProps(__spreadValues(__spreadValues({}, current), alts), { old: current })); } function fixOffset(localTS, o2, tz) { let utcGuess = localTS - o2 * 60 * 1e3; @@ -54717,13 +61600,13 @@ function adjustTime(inst, dur) { function parseDataToDateTime(parsed, parsedZone, opts, format, text, specificOffset) { const { setZone, zone } = opts; if (parsed && Object.keys(parsed).length !== 0) { - const interpretationZone = parsedZone || zone, inst = DateTime.fromObject(parsed, __spreadProps(__spreadValues({}, opts), { + const interpretationZone = parsedZone || zone, inst = DateTime2.fromObject(parsed, __spreadProps(__spreadValues({}, opts), { zone: interpretationZone, specificOffset })); return setZone ? inst : inst.setZone(zone); } else { - return DateTime.invalid(new Invalid("unparsable", `the input "${text}" can't be parsed as ${format}`)); + return DateTime2.invalid(new Invalid("unparsable", `the input "${text}" can't be parsed as ${format}`)); } } function toTechFormat(dt, format, allowZ = true) { @@ -54737,34 +61620,34 @@ function toISODate(o2, extended) { let c3 = ""; if (longFormat && o2.c.year >= 0) c3 += "+"; - c3 += padStart2(o2.c.year, longFormat ? 6 : 4); + c3 += padStart3(o2.c.year, longFormat ? 6 : 4); if (extended) { c3 += "-"; - c3 += padStart2(o2.c.month); + c3 += padStart3(o2.c.month); c3 += "-"; - c3 += padStart2(o2.c.day); + c3 += padStart3(o2.c.day); } else { - c3 += padStart2(o2.c.month); - c3 += padStart2(o2.c.day); + c3 += padStart3(o2.c.month); + c3 += padStart3(o2.c.day); } return c3; } function toISOTime(o2, extended, suppressSeconds, suppressMilliseconds, includeOffset, extendedZone) { - let c3 = padStart2(o2.c.hour); + let c3 = padStart3(o2.c.hour); if (extended) { c3 += ":"; - c3 += padStart2(o2.c.minute); + c3 += padStart3(o2.c.minute); if (o2.c.second !== 0 || !suppressSeconds) { c3 += ":"; } } else { - c3 += padStart2(o2.c.minute); + c3 += padStart3(o2.c.minute); } if (o2.c.second !== 0 || !suppressSeconds) { - c3 += padStart2(o2.c.second); + c3 += padStart3(o2.c.second); if (o2.c.millisecond !== 0 || !suppressMilliseconds) { c3 += "."; - c3 += padStart2(o2.c.millisecond, 3); + c3 += padStart3(o2.c.millisecond, 3); } } if (includeOffset) { @@ -54772,14 +61655,14 @@ function toISOTime(o2, extended, suppressSeconds, suppressMilliseconds, includeO c3 += "Z"; } else if (o2.o < 0) { c3 += "-"; - c3 += padStart2(Math.trunc(-o2.o / 60)); + c3 += padStart3(Math.trunc(-o2.o / 60)); c3 += ":"; - c3 += padStart2(Math.trunc(-o2.o % 60)); + c3 += padStart3(Math.trunc(-o2.o % 60)); } else { c3 += "+"; - c3 += padStart2(Math.trunc(o2.o / 60)); + c3 += padStart3(Math.trunc(o2.o / 60)); c3 += ":"; - c3 += padStart2(Math.trunc(o2.o % 60)); + c3 += padStart3(Math.trunc(o2.o % 60)); } } if (extendedZone) { @@ -54863,14 +61746,14 @@ function quickDT(obj, opts) { } const invalid = hasInvalidGregorianData(obj) || hasInvalidTimeData(obj); if (invalid) { - return DateTime.invalid(invalid); + return DateTime2.invalid(invalid); } const offsetProvis = zone.offset(tsNow); [ts, o2] = objToTS(obj, offsetProvis, zone); } else { ts = tsNow; } - return new DateTime({ ts, zone, loc, o: o2 }); + return new DateTime2({ ts, zone, loc, o: o2 }); } function diffRelative(start, end, opts) { const round = isUndefined(opts.round) ? true : opts.round, format = (c3, unit) => { @@ -54908,7 +61791,7 @@ function lastOpts(argList) { } return [opts, args]; } -var DateTime = class { +var DateTime2 = class { constructor(config2) { const zone = config2.zone || Settings.defaultZone; let invalid = config2.invalid || (Number.isNaN(config2.ts) ? new Invalid("invalid input") : null) || (!zone.isValid ? unsupportedZone(zone) : null); @@ -54935,7 +61818,7 @@ var DateTime = class { this.isLuxonDateTime = true; } static now() { - return new DateTime({}); + return new DateTime2({}); } static local() { const [opts, args] = lastOpts(arguments), [year, month, day, hour, minute, second, millisecond] = args; @@ -54947,27 +61830,27 @@ var DateTime = class { return quickDT({ year, month, day, hour, minute, second, millisecond }, opts); } static fromJSDate(date, options = {}) { - const ts = isDate(date) ? date.valueOf() : NaN; + const ts = isDate2(date) ? date.valueOf() : NaN; if (Number.isNaN(ts)) { - return DateTime.invalid("invalid input"); + return DateTime2.invalid("invalid input"); } const zoneToUse = normalizeZone(options.zone, Settings.defaultZone); if (!zoneToUse.isValid) { - return DateTime.invalid(unsupportedZone(zoneToUse)); + return DateTime2.invalid(unsupportedZone(zoneToUse)); } - return new DateTime({ + return new DateTime2({ ts, zone: zoneToUse, loc: Locale.fromObject(options) }); } static fromMillis(milliseconds, options = {}) { - if (!isNumber(milliseconds)) { + if (!isNumber2(milliseconds)) { throw new InvalidArgumentError(`fromMillis requires a numerical input, but received a ${typeof milliseconds} with value ${milliseconds}`); } else if (milliseconds < -MAX_DATE || milliseconds > MAX_DATE) { - return DateTime.invalid("Timestamp out of range"); + return DateTime2.invalid("Timestamp out of range"); } else { - return new DateTime({ + return new DateTime2({ ts: milliseconds, zone: normalizeZone(options.zone, Settings.defaultZone), loc: Locale.fromObject(options) @@ -54975,10 +61858,10 @@ var DateTime = class { } } static fromSeconds(seconds, options = {}) { - if (!isNumber(seconds)) { + if (!isNumber2(seconds)) { throw new InvalidArgumentError("fromSeconds requires a numerical input"); } else { - return new DateTime({ + return new DateTime2({ ts: seconds * 1e3, zone: normalizeZone(options.zone, Settings.defaultZone), loc: Locale.fromObject(options) @@ -54989,7 +61872,7 @@ var DateTime = class { obj = obj || {}; const zoneToUse = normalizeZone(opts.zone, Settings.defaultZone); if (!zoneToUse.isValid) { - return DateTime.invalid(unsupportedZone(zoneToUse)); + return DateTime2.invalid(unsupportedZone(zoneToUse)); } const tsNow = Settings.now(), offsetProvis = !isUndefined(opts.specificOffset) ? opts.specificOffset : zoneToUse.offset(tsNow), normalized = normalizeObject(obj, normalizeUnit), containsOrdinal = !isUndefined(normalized.ordinal), containsGregorYear = !isUndefined(normalized.year), containsGregorMD = !isUndefined(normalized.month) || !isUndefined(normalized.day), containsGregor = containsGregorYear || containsGregorMD, definiteWeekDef = normalized.weekYear || normalized.weekNumber, loc = Locale.fromObject(opts); if ((containsGregor || containsOrdinal) && definiteWeekDef) { @@ -55025,16 +61908,16 @@ var DateTime = class { } const higherOrderInvalid = useWeekData ? hasInvalidWeekData(normalized) : containsOrdinal ? hasInvalidOrdinalData(normalized) : hasInvalidGregorianData(normalized), invalid = higherOrderInvalid || hasInvalidTimeData(normalized); if (invalid) { - return DateTime.invalid(invalid); + return DateTime2.invalid(invalid); } - const gregorian = useWeekData ? weekToGregorian(normalized) : containsOrdinal ? ordinalToGregorian(normalized) : normalized, [tsFinal, offsetFinal] = objToTS(gregorian, offsetProvis, zoneToUse), inst = new DateTime({ + const gregorian = useWeekData ? weekToGregorian(normalized) : containsOrdinal ? ordinalToGregorian(normalized) : normalized, [tsFinal, offsetFinal] = objToTS(gregorian, offsetProvis, zoneToUse), inst = new DateTime2({ ts: tsFinal, zone: zoneToUse, o: offsetFinal, loc }); if (normalized.weekday && containsGregor && obj.weekday !== inst.weekday) { - return DateTime.invalid("mismatched weekday", `you can't specify both a weekday of ${normalized.weekday} and a date of ${inst.toISO()}`); + return DateTime2.invalid("mismatched weekday", `you can't specify both a weekday of ${normalized.weekday} and a date of ${inst.toISO()}`); } return inst; } @@ -55060,13 +61943,13 @@ var DateTime = class { defaultToEN: true }), [vals, parsedZone, specificOffset, invalid] = parseFromTokens(localeToUse, text, fmt); if (invalid) { - return DateTime.invalid(invalid); + return DateTime2.invalid(invalid); } else { return parseDataToDateTime(vals, parsedZone, opts, `format ${fmt}`, text, specificOffset); } } static fromString(text, fmt, opts = {}) { - return DateTime.fromFormat(text, fmt, opts); + return DateTime2.fromFormat(text, fmt, opts); } static fromSQL(text, opts = {}) { const [vals, parsedZone] = parseSQL(text); @@ -55080,7 +61963,7 @@ var DateTime = class { if (Settings.throwOnInvalid) { throw new InvalidDateTimeError(invalid); } else { - return new DateTime({ invalid }); + return new DateTime2({ invalid }); } } static isDateTime(o2) { @@ -55195,7 +62078,7 @@ var DateTime = class { } } get isInLeapYear() { - return isLeapYear(this.year); + return isLeapYear2(this.year); } get daysInMonth() { return daysInMonth(this.year, this.month); @@ -55221,7 +62104,7 @@ var DateTime = class { if (zone.equals(this.zone)) { return this; } else if (!zone.isValid) { - return DateTime.invalid(unsupportedZone(zone)); + return DateTime2.invalid(unsupportedZone(zone)); } else { let newTS = this.ts; if (keepLocalTime || keepCalendarTime) { @@ -55229,12 +62112,12 @@ var DateTime = class { const asObj = this.toObject(); [newTS] = objToTS(asObj, offsetGuess, zone); } - return clone2(this, { ts: newTS, zone }); + return clone3(this, { ts: newTS, zone }); } } reconfigure({ locale, numberingSystem, outputCalendar } = {}) { const loc = this.loc.clone({ locale, numberingSystem, outputCalendar }); - return clone2(this, { loc }); + return clone3(this, { loc }); } setLocale(locale) { return this.reconfigure({ locale }); @@ -55261,19 +62144,19 @@ var DateTime = class { } } const [ts, o2] = objToTS(mixed, this.o, this.zone); - return clone2(this, { ts, o: o2 }); + return clone3(this, { ts, o: o2 }); } plus(duration) { if (!this.isValid) return this; const dur = Duration.fromDurationLike(duration); - return clone2(this, adjustTime(this, dur)); + return clone3(this, adjustTime(this, dur)); } minus(duration) { if (!this.isValid) return this; const dur = Duration.fromDurationLike(duration).negate(); - return clone2(this, adjustTime(this, dur)); + return clone3(this, adjustTime(this, dur)); } startOf(unit) { if (!this.isValid) @@ -55310,279 +62193,1225 @@ var DateTime = class { endOf(unit) { return this.isValid ? this.plus({ [unit]: 1 }).startOf(unit).minus(1) : this; } - toFormat(fmt, opts = {}) { - return this.isValid ? Formatter.create(this.loc.redefaultToEN(opts)).formatDateTimeFromString(this, fmt) : INVALID3; + toFormat(fmt, opts = {}) { + return this.isValid ? Formatter.create(this.loc.redefaultToEN(opts)).formatDateTimeFromString(this, fmt) : INVALID3; + } + toLocaleString(formatOpts = DATE_SHORT, opts = {}) { + return this.isValid ? Formatter.create(this.loc.clone(opts), formatOpts).formatDateTime(this) : INVALID3; + } + toLocaleParts(opts = {}) { + return this.isValid ? Formatter.create(this.loc.clone(opts), opts).formatDateTimeParts(this) : []; + } + toISO({ + format = "extended", + suppressSeconds = false, + suppressMilliseconds = false, + includeOffset = true, + extendedZone = false + } = {}) { + if (!this.isValid) { + return null; + } + const ext = format === "extended"; + let c3 = toISODate(this, ext); + c3 += "T"; + c3 += toISOTime(this, ext, suppressSeconds, suppressMilliseconds, includeOffset, extendedZone); + return c3; + } + toISODate({ format = "extended" } = {}) { + if (!this.isValid) { + return null; + } + return toISODate(this, format === "extended"); + } + toISOWeekDate() { + return toTechFormat(this, "kkkk-'W'WW-c"); + } + toISOTime({ + suppressMilliseconds = false, + suppressSeconds = false, + includeOffset = true, + includePrefix = false, + extendedZone = false, + format = "extended" + } = {}) { + if (!this.isValid) { + return null; + } + let c3 = includePrefix ? "T" : ""; + return c3 + toISOTime(this, format === "extended", suppressSeconds, suppressMilliseconds, includeOffset, extendedZone); + } + toRFC2822() { + return toTechFormat(this, "EEE, dd LLL yyyy HH:mm:ss ZZZ", false); + } + toHTTP() { + return toTechFormat(this.toUTC(), "EEE, dd LLL yyyy HH:mm:ss 'GMT'"); + } + toSQLDate() { + if (!this.isValid) { + return null; + } + return toISODate(this, true); + } + toSQLTime({ includeOffset = true, includeZone = false, includeOffsetSpace = true } = {}) { + let fmt = "HH:mm:ss.SSS"; + if (includeZone || includeOffset) { + if (includeOffsetSpace) { + fmt += " "; + } + if (includeZone) { + fmt += "z"; + } else if (includeOffset) { + fmt += "ZZ"; + } + } + return toTechFormat(this, fmt, true); + } + toSQL(opts = {}) { + if (!this.isValid) { + return null; + } + return `${this.toSQLDate()} ${this.toSQLTime(opts)}`; + } + toString() { + return this.isValid ? this.toISO() : INVALID3; + } + valueOf() { + return this.toMillis(); + } + toMillis() { + return this.isValid ? this.ts : NaN; + } + toSeconds() { + return this.isValid ? this.ts / 1e3 : NaN; + } + toUnixInteger() { + return this.isValid ? Math.floor(this.ts / 1e3) : NaN; + } + toJSON() { + return this.toISO(); + } + toBSON() { + return this.toJSDate(); + } + toObject(opts = {}) { + if (!this.isValid) + return {}; + const base = __spreadValues({}, this.c); + if (opts.includeConfig) { + base.outputCalendar = this.outputCalendar; + base.numberingSystem = this.loc.numberingSystem; + base.locale = this.loc.locale; + } + return base; + } + toJSDate() { + return new Date(this.isValid ? this.ts : NaN); + } + diff(otherDateTime, unit = "milliseconds", opts = {}) { + if (!this.isValid || !otherDateTime.isValid) { + return Duration.invalid("created by diffing an invalid DateTime"); + } + const durOpts = __spreadValues({ locale: this.locale, numberingSystem: this.numberingSystem }, opts); + const units = maybeArray(unit).map(Duration.normalizeUnit), otherIsLater = otherDateTime.valueOf() > this.valueOf(), earlier = otherIsLater ? this : otherDateTime, later = otherIsLater ? otherDateTime : this, diffed = diff_default(earlier, later, units, durOpts); + return otherIsLater ? diffed.negate() : diffed; + } + diffNow(unit = "milliseconds", opts = {}) { + return this.diff(DateTime2.now(), unit, opts); + } + until(otherDateTime) { + return this.isValid ? Interval.fromDateTimes(this, otherDateTime) : this; + } + hasSame(otherDateTime, unit) { + if (!this.isValid) + return false; + const inputMs = otherDateTime.valueOf(); + const adjustedToZone = this.setZone(otherDateTime.zone, { keepLocalTime: true }); + return adjustedToZone.startOf(unit) <= inputMs && inputMs <= adjustedToZone.endOf(unit); + } + equals(other) { + return this.isValid && other.isValid && this.valueOf() === other.valueOf() && this.zone.equals(other.zone) && this.loc.equals(other.loc); + } + toRelative(options = {}) { + if (!this.isValid) + return null; + const base = options.base || DateTime2.fromObject({}, { zone: this.zone }), padding = options.padding ? this < base ? -options.padding : options.padding : 0; + let units = ["years", "months", "days", "hours", "minutes", "seconds"]; + let unit = options.unit; + if (Array.isArray(options.unit)) { + units = options.unit; + unit = void 0; + } + return diffRelative(base, this.plus(padding), __spreadProps(__spreadValues({}, options), { + numeric: "always", + units, + unit + })); + } + toRelativeCalendar(options = {}) { + if (!this.isValid) + return null; + return diffRelative(options.base || DateTime2.fromObject({}, { zone: this.zone }), this, __spreadProps(__spreadValues({}, options), { + numeric: "auto", + units: ["years", "months", "days"], + calendary: true + })); + } + static min(...dateTimes) { + if (!dateTimes.every(DateTime2.isDateTime)) { + throw new InvalidArgumentError("min requires all arguments be DateTimes"); + } + return bestBy(dateTimes, (i3) => i3.valueOf(), Math.min); + } + static max(...dateTimes) { + if (!dateTimes.every(DateTime2.isDateTime)) { + throw new InvalidArgumentError("max requires all arguments be DateTimes"); + } + return bestBy(dateTimes, (i3) => i3.valueOf(), Math.max); + } + static fromFormatExplain(text, fmt, options = {}) { + const { locale = null, numberingSystem = null } = options, localeToUse = Locale.fromOpts({ + locale, + numberingSystem, + defaultToEN: true + }); + return explainFromTokens(localeToUse, text, fmt); + } + static fromStringExplain(text, fmt, options = {}) { + return DateTime2.fromFormatExplain(text, fmt, options); + } + static get DATE_SHORT() { + return DATE_SHORT; + } + static get DATE_MED() { + return DATE_MED; + } + static get DATE_MED_WITH_WEEKDAY() { + return DATE_MED_WITH_WEEKDAY; + } + static get DATE_FULL() { + return DATE_FULL; + } + static get DATE_HUGE() { + return DATE_HUGE; + } + static get TIME_SIMPLE() { + return TIME_SIMPLE; + } + static get TIME_WITH_SECONDS() { + return TIME_WITH_SECONDS; + } + static get TIME_WITH_SHORT_OFFSET() { + return TIME_WITH_SHORT_OFFSET; + } + static get TIME_WITH_LONG_OFFSET() { + return TIME_WITH_LONG_OFFSET; + } + static get TIME_24_SIMPLE() { + return TIME_24_SIMPLE; + } + static get TIME_24_WITH_SECONDS() { + return TIME_24_WITH_SECONDS; + } + static get TIME_24_WITH_SHORT_OFFSET() { + return TIME_24_WITH_SHORT_OFFSET; + } + static get TIME_24_WITH_LONG_OFFSET() { + return TIME_24_WITH_LONG_OFFSET; + } + static get DATETIME_SHORT() { + return DATETIME_SHORT; + } + static get DATETIME_SHORT_WITH_SECONDS() { + return DATETIME_SHORT_WITH_SECONDS; + } + static get DATETIME_MED() { + return DATETIME_MED; + } + static get DATETIME_MED_WITH_SECONDS() { + return DATETIME_MED_WITH_SECONDS; + } + static get DATETIME_MED_WITH_WEEKDAY() { + return DATETIME_MED_WITH_WEEKDAY; + } + static get DATETIME_FULL() { + return DATETIME_FULL; + } + static get DATETIME_FULL_WITH_SECONDS() { + return DATETIME_FULL_WITH_SECONDS; + } + static get DATETIME_HUGE() { + return DATETIME_HUGE; + } + static get DATETIME_HUGE_WITH_SECONDS() { + return DATETIME_HUGE_WITH_SECONDS; + } +}; +function friendlyDateTime(dateTimeish) { + if (DateTime2.isDateTime(dateTimeish)) { + return dateTimeish; + } else if (dateTimeish && dateTimeish.valueOf && isNumber2(dateTimeish.valueOf())) { + return DateTime2.fromJSDate(dateTimeish); + } else if (dateTimeish && typeof dateTimeish === "object") { + return DateTime2.fromObject(dateTimeish); + } else { + throw new InvalidArgumentError(`Unknown datetime argument: ${dateTimeish}, of type ${typeof dateTimeish}`); + } +} + +// src/interop.ts +var parseTime = (time) => { + let parsed = DateTime2.fromFormat(time, "h:mm a"); + if (parsed.invalidReason) { + parsed = DateTime2.fromFormat(time, "HH:mm"); + } + if (parsed.invalidReason) { + console.error(`FC: Error parsing time string '${time}': ${parsed.invalidReason}'`); + return null; + } + return Duration.fromISOTime(parsed.toISOTime({ + includeOffset: false, + includePrefix: false + })); +}; +var normalizeTimeString = (time) => { + const parsed = parseTime(time); + if (!parsed) { + return null; + } + return parsed.toISOTime({ + suppressMilliseconds: true, + includePrefix: false, + suppressSeconds: true + }); +}; +var add = (date, time) => { + let hours = time.hours; + let minutes = time.minutes; + return date.set({ hour: hours, minute: minutes }); +}; +var getTime2 = (date) => DateTime2.fromJSDate(date).toISOTime({ + suppressMilliseconds: true, + includeOffset: false, + suppressSeconds: true +}); +var getDate = (date) => DateTime2.fromJSDate(date).toISODate(); +var combineDateTimeStrings = (date, time) => { + const parsedDate = DateTime2.fromISO(date); + if (parsedDate.invalidReason) { + console.error(`FC: Error parsing time string '${date}': ${parsedDate.invalidReason}`); + return null; + } + const parsedTime = parseTime(time); + if (!parsedTime) { + return null; + } + return add(parsedDate, parsedTime).toISO({ + includeOffset: false, + suppressMilliseconds: true + }); +}; +var DAYS = "UMTWRFS"; +function dateEndpointsToFrontmatter(start, end, allDay) { + const date = getDate(start); + const endDate = getDate(end); + return __spreadValues({ + type: "single", + date, + endDate: date !== endDate ? endDate : void 0, + allDay + }, allDay ? {} : { + startTime: getTime2(start), + endTime: getTime2(end) + }); +} +function toEventInput(id, frontmatter) { + let event = { + id, + title: frontmatter.title, + allDay: frontmatter.allDay + }; + if (frontmatter.type === "recurring") { + event = __spreadProps(__spreadValues({}, event), { + daysOfWeek: frontmatter.daysOfWeek.map((c3) => DAYS.indexOf(c3)), + startRecur: frontmatter.startRecur, + endRecur: frontmatter.endRecur, + extendedProps: { isTask: false } + }); + if (!frontmatter.allDay) { + event = __spreadProps(__spreadValues({}, event), { + startTime: normalizeTimeString(frontmatter.startTime || ""), + endTime: frontmatter.endTime ? normalizeTimeString(frontmatter.endTime) : void 0 + }); + } + } else if (frontmatter.type === "rrule") { + const dtstart = (() => { + if (frontmatter.allDay) { + return DateTime2.fromISO(frontmatter.startDate); + } else { + const dtstartStr = combineDateTimeStrings(frontmatter.startDate, frontmatter.startTime); + if (!dtstartStr) { + return null; + } + return DateTime2.fromISO(dtstartStr); + } + })(); + if (dtstart === null) { + return null; + } + const exdate = frontmatter.skipDates.map((d2) => { + const date = DateTime2.fromISO(d2).toISODate(); + const time = dtstart.toJSDate().toISOString().split("T")[1]; + return `${date}T${time}`; + }).flatMap((d2) => d2 ? d2 : []); + event = { + id, + title: frontmatter.title, + allDay: frontmatter.allDay, + rrule: rrulestr(frontmatter.rrule, { + dtstart: dtstart.toJSDate() + }).toString(), + exdate + }; + if (!frontmatter.allDay) { + const startTime = parseTime(frontmatter.startTime); + if (startTime && frontmatter.endTime) { + const endTime = parseTime(frontmatter.endTime); + const duration = endTime == null ? void 0 : endTime.minus(startTime); + if (duration) { + event.duration = duration.toISOTime({ + includePrefix: false, + suppressMilliseconds: true, + suppressSeconds: true + }); + } + } + } + } else if (frontmatter.type === "single" || frontmatter.type === void 0) { + if (!frontmatter.allDay) { + const start = combineDateTimeStrings(frontmatter.date, frontmatter.startTime); + if (!start) { + return null; + } + let end = void 0; + if (frontmatter.endTime) { + end = combineDateTimeStrings(frontmatter.endDate || frontmatter.date, frontmatter.endTime); + if (!end) { + return null; + } + } + event = __spreadProps(__spreadValues({}, event), { + start, + end, + extendedProps: { + isTask: frontmatter.completed !== void 0 && frontmatter.completed !== null, + taskCompleted: frontmatter.completed + } + }); + } else { + event = __spreadProps(__spreadValues({}, event), { + start: frontmatter.date, + end: frontmatter.endDate || void 0, + extendedProps: { + isTask: frontmatter.completed !== void 0 && frontmatter.completed !== null, + taskCompleted: frontmatter.completed + } + }); + } + } + return event; +} +function fromEventApi(event) { + const isRecurring = event.extendedProps.daysOfWeek !== void 0; + const startDate = getDate(event.start); + const endDate = getDate(event.end); + return __spreadValues(__spreadValues({ + title: event.title + }, event.allDay ? { allDay: true } : { + allDay: false, + startTime: getTime2(event.start), + endTime: getTime2(event.end) + }), isRecurring ? { + type: "recurring", + daysOfWeek: event.extendedProps.daysOfWeek.map((i3) => DAYS[i3]), + startRecur: event.extendedProps.startRecur && getDate(event.extendedProps.startRecur), + endRecur: event.extendedProps.endRecur && getDate(event.extendedProps.endRecur) + } : __spreadProps(__spreadValues({ + type: "single", + date: startDate + }, startDate !== endDate ? { endDate } : {}), { + completed: event.extendedProps.taskCompleted + })); +} + +// src/ui/settings.ts +var import_obsidian4 = __toModule(require("obsidian")); + +// src/ui/components/CalendarSetting.tsx +var import_obsidian = __toModule(require("obsidian")); +var React = __toModule(require_react()); +function DirectorySetting({ + source +}) { + let sourceWithDirectory = source; + return /* @__PURE__ */ React.createElement("div", { + className: "setting-item-control" + }, /* @__PURE__ */ React.createElement("input", { + disabled: true, + type: "text", + value: sourceWithDirectory.directory, + style: { + width: "100%", + marginLeft: 4, + marginRight: 4 + } + })); +} +function HeadingSetting({ + source +}) { + let sourceWithHeading = source; + return /* @__PURE__ */ React.createElement("div", { + className: "setting-item-control", + style: { display: "block", textAlign: "center" } + }, /* @__PURE__ */ React.createElement("span", null, "Under heading"), " ", /* @__PURE__ */ React.createElement("input", { + disabled: true, + type: "text", + value: sourceWithHeading.heading, + style: { + marginLeft: 4, + marginRight: 4 + } + }), " ", /* @__PURE__ */ React.createElement("span", { + style: { paddingRight: ".5rem" } + }, "in daily notes")); +} +function UrlSetting({ + source +}) { + let sourceWithUrl = source; + return /* @__PURE__ */ React.createElement("div", { + className: "setting-item-control" + }, /* @__PURE__ */ React.createElement("input", { + disabled: true, + type: "text", + value: sourceWithUrl.url, + style: { + width: "100%", + marginLeft: 4, + marginRight: 4 + } + })); +} +function NameSetting({ + source +}) { + let sourceWithName = source; + return /* @__PURE__ */ React.createElement("div", { + className: "setting-item-control" + }, /* @__PURE__ */ React.createElement("input", { + disabled: true, + type: "text", + value: sourceWithName.name, + style: { + width: "100%", + marginLeft: 4, + marginRight: 4 + } + })); +} +function Username({ source }) { + let sourceWithUsername = source; + return /* @__PURE__ */ React.createElement("div", { + className: "setting-item-control" + }, /* @__PURE__ */ React.createElement("input", { + disabled: true, + type: "text", + value: sourceWithUsername.username, + style: { + width: "100%", + marginLeft: 4, + marginRight: 4 + } + })); +} +var CalendarSettingRow = ({ + setting, + onColorChange, + deleteCalendar +}) => { + const isCalDAV = setting.type === "caldav" || setting.type === "icloud"; + return /* @__PURE__ */ React.createElement("div", { + className: "setting-item" + }, /* @__PURE__ */ React.createElement("button", { + type: "button", + onClick: deleteCalendar, + style: { maxWidth: "15%" } + }, "\u2715"), setting.type === "local" ? /* @__PURE__ */ React.createElement(DirectorySetting, { + source: setting + }) : setting.type === "dailynote" ? /* @__PURE__ */ React.createElement(HeadingSetting, { + source: setting + }) : /* @__PURE__ */ React.createElement(UrlSetting, { + source: setting + }), isCalDAV && /* @__PURE__ */ React.createElement(NameSetting, { + source: setting + }), isCalDAV && /* @__PURE__ */ React.createElement(Username, { + source: setting + }), /* @__PURE__ */ React.createElement("input", { + style: { maxWidth: "25%", minWidth: "3rem" }, + type: "color", + value: setting.color, + onChange: (e3) => onColorChange(e3.target.value) + })); +}; +var CalendarSettings = class extends React.Component { + constructor(props) { + super(props); + this.state = { sources: props.sources, dirty: false }; + } + addSource(source) { + this.setState((state, props) => ({ + sources: [...state.sources, source], + dirty: true + })); } - toLocaleString(formatOpts = DATE_SHORT, opts = {}) { - return this.isValid ? Formatter.create(this.loc.clone(opts), formatOpts).formatDateTime(this) : INVALID3; + render() { + return /* @__PURE__ */ React.createElement("div", { + style: { width: "100%" } + }, this.state.sources.map((s4, idx) => /* @__PURE__ */ React.createElement(CalendarSettingRow, { + key: idx, + setting: s4, + onColorChange: (color) => this.setState((state, props) => ({ + sources: [ + ...state.sources.slice(0, idx), + __spreadProps(__spreadValues({}, state.sources[idx]), { color }), + ...state.sources.slice(idx + 1) + ], + dirty: true + })), + deleteCalendar: () => this.setState((state, props) => ({ + sources: [ + ...state.sources.slice(0, idx), + ...state.sources.slice(idx + 1) + ], + dirty: true + })) + })), /* @__PURE__ */ React.createElement("div", { + className: "setting-item-control" + }, this.state.dirty && /* @__PURE__ */ React.createElement("button", { + onClick: () => { + if (this.state.sources.filter((s4) => s4.type === "dailynote").length > 1) { + new import_obsidian.Notice("Only one daily note calendar is allowed."); + return; + } + this.props.submit(this.state.sources.map((elt) => elt)); + this.setState({ dirty: false }); + }, + style: { + backgroundColor: this.state.dirty ? "var(--interactive-accent)" : void 0, + color: this.state.dirty ? "var(--text-on-accent)" : void 0 + } + }, this.state.dirty ? "Save" : "Settings Saved"))); } - toLocaleParts(opts = {}) { - return this.isValid ? Formatter.create(this.loc.clone(opts), opts).formatDateTimeParts(this) : []; +}; + +// src/ui/components/AddCalendarSource.tsx +var React2 = __toModule(require_react()); +var import_react = __toModule(require_react()); +function DirectorySelect({ + source, + changeListener, + directories +}) { + const dirOptions = [...directories]; + dirOptions.sort(); + let sourceWithDirectory = source; + return /* @__PURE__ */ React2.createElement("div", { + className: "setting-item" + }, /* @__PURE__ */ React2.createElement("div", { + className: "setting-item-info" + }, /* @__PURE__ */ React2.createElement("div", { + className: "setting-item-name" + }, "Directory"), /* @__PURE__ */ React2.createElement("div", { + className: "setting-item-description" + }, "Directory to store events")), /* @__PURE__ */ React2.createElement("div", { + className: "setting-item-control" + }, /* @__PURE__ */ React2.createElement("select", { + required: true, + value: sourceWithDirectory.directory || "", + onChange: changeListener((x3) => __spreadProps(__spreadValues({}, sourceWithDirectory), { + directory: x3 + })) + }, /* @__PURE__ */ React2.createElement("option", { + value: "", + disabled: true, + hidden: true + }, "Choose a directory"), dirOptions.map((o2, idx) => /* @__PURE__ */ React2.createElement("option", { + key: idx, + value: o2 + }, o2))))); +} +function ColorPicker({ + source, + changeListener +}) { + return /* @__PURE__ */ React2.createElement("div", { + className: "setting-item" + }, /* @__PURE__ */ React2.createElement("div", { + className: "setting-item-info" + }, /* @__PURE__ */ React2.createElement("div", { + className: "setting-item-name" + }, "Color"), /* @__PURE__ */ React2.createElement("div", { + className: "setting-item-description" + }, "The color of events on the calendar")), /* @__PURE__ */ React2.createElement("div", { + className: "setting-item-control" + }, /* @__PURE__ */ React2.createElement("input", { + required: true, + type: "color", + value: source.color, + style: { maxWidth: "25%", minWidth: "3rem" }, + onChange: changeListener((x3) => __spreadProps(__spreadValues({}, source), { color: x3 })) + }))); +} +function UrlInput({ + source, + changeListener +}) { + let sourceWithUrl = source; + return /* @__PURE__ */ React2.createElement("div", { + className: "setting-item" + }, /* @__PURE__ */ React2.createElement("div", { + className: "setting-item-info" + }, /* @__PURE__ */ React2.createElement("div", { + className: "setting-item-name" + }, "Url"), /* @__PURE__ */ React2.createElement("div", { + className: "setting-item-description" + }, "Url of the server")), /* @__PURE__ */ React2.createElement("div", { + className: "setting-item-control" + }, /* @__PURE__ */ React2.createElement("input", { + required: true, + type: "text", + value: sourceWithUrl.url || "", + onChange: changeListener((x3) => __spreadProps(__spreadValues({}, sourceWithUrl), { + url: x3 + })) + }))); +} +function UsernameInput({ + source, + changeListener +}) { + let sourceWithUsername = source; + return /* @__PURE__ */ React2.createElement("div", { + className: "setting-item" + }, /* @__PURE__ */ React2.createElement("div", { + className: "setting-item-info" + }, /* @__PURE__ */ React2.createElement("div", { + className: "setting-item-name" + }, "Username"), /* @__PURE__ */ React2.createElement("div", { + className: "setting-item-description" + }, "Username for the account")), /* @__PURE__ */ React2.createElement("div", { + className: "setting-item-control" + }, /* @__PURE__ */ React2.createElement("input", { + required: true, + type: "text", + value: sourceWithUsername.username || "", + onChange: changeListener((x3) => __spreadProps(__spreadValues({}, sourceWithUsername), { + username: x3 + })) + }))); +} +function HeadingInput({ + source, + changeListener, + headings +}) { + let sourceWithHeading = source; + return /* @__PURE__ */ React2.createElement("div", { + className: "setting-item" + }, /* @__PURE__ */ React2.createElement("div", { + className: "setting-item-info" + }, /* @__PURE__ */ React2.createElement("div", { + className: "setting-item-name" + }, "Heading"), /* @__PURE__ */ React2.createElement("div", { + className: "setting-item-description" + }, "Heading to store events under in the daily note.")), /* @__PURE__ */ React2.createElement("div", { + className: "setting-item-control" + }, headings.length > 0 ? /* @__PURE__ */ React2.createElement("select", { + required: true, + value: sourceWithHeading.heading || "", + onChange: changeListener((x3) => __spreadProps(__spreadValues({}, sourceWithHeading), { + heading: x3 + })) + }, /* @__PURE__ */ React2.createElement("option", { + value: "", + disabled: true, + hidden: true + }, "Choose a heading"), headings.map((o2, idx) => /* @__PURE__ */ React2.createElement("option", { + key: idx, + value: o2 + }, o2))) : /* @__PURE__ */ React2.createElement("input", { + required: true, + type: "text", + value: sourceWithHeading.heading || "", + onChange: changeListener((x3) => __spreadProps(__spreadValues({}, sourceWithHeading), { + heading: x3 + })) + }))); +} +function PasswordInput({ + source, + changeListener +}) { + let sourceWithPassword = source; + return /* @__PURE__ */ React2.createElement("div", { + className: "setting-item" + }, /* @__PURE__ */ React2.createElement("div", { + className: "setting-item-info" + }, /* @__PURE__ */ React2.createElement("div", { + className: "setting-item-name" + }, "Password"), /* @__PURE__ */ React2.createElement("div", { + className: "setting-item-description" + }, "Password for the account")), /* @__PURE__ */ React2.createElement("div", { + className: "setting-item-control" + }, /* @__PURE__ */ React2.createElement("input", { + required: true, + type: "password", + value: sourceWithPassword.password || "", + onChange: changeListener((x3) => __spreadProps(__spreadValues({}, sourceWithPassword), { + password: x3 + })) + }))); +} +var AddCalendarSource = ({ + source, + directories, + headings, + submit +}) => { + const isCalDAV = source.type === "caldav" || source.type === "icloud"; + const [setting, setSettingState] = (0, import_react.useState)(source); + const [submitting, setSubmitingState] = (0, import_react.useState)(false); + const [submitText, setSubmitText] = (0, import_react.useState)(isCalDAV ? "Import Calendars" : "Add Calendar"); + function makeChangeListener2(fromString) { + return (e3) => setSettingState(fromString(e3.target.value)); } - toISO({ - format = "extended", - suppressSeconds = false, - suppressMilliseconds = false, - includeOffset = true, - extendedZone = false - } = {}) { - if (!this.isValid) { - return null; + const handleSubmit = (e3) => __async(void 0, null, function* () { + e3.preventDefault(); + if (!submitting) { + setSubmitingState(true); + setSubmitText(isCalDAV ? "Importing Calendars" : "Adding Calendar"); + yield submit(setting); } - const ext = format === "extended"; - let c3 = toISODate(this, ext); - c3 += "T"; - c3 += toISOTime(this, ext, suppressSeconds, suppressMilliseconds, includeOffset, extendedZone); - return c3; + }); + return /* @__PURE__ */ React2.createElement("div", { + className: "vertical-tab-content" + }, /* @__PURE__ */ React2.createElement("form", { + onSubmit: handleSubmit + }, !isCalDAV && /* @__PURE__ */ React2.createElement(ColorPicker, { + source: setting, + changeListener: makeChangeListener2 + }), source.type === "local" && /* @__PURE__ */ React2.createElement(DirectorySelect, { + source: setting, + changeListener: makeChangeListener2, + directories + }), source.type === "dailynote" && /* @__PURE__ */ React2.createElement(HeadingInput, { + source: setting, + changeListener: makeChangeListener2, + headings + }), source.type === "gcal" || source.type === "ical" || source.type === "caldav" ? /* @__PURE__ */ React2.createElement(UrlInput, { + source: setting, + changeListener: makeChangeListener2 + }) : null, isCalDAV && /* @__PURE__ */ React2.createElement(UsernameInput, { + source: setting, + changeListener: makeChangeListener2 + }), isCalDAV && /* @__PURE__ */ React2.createElement(PasswordInput, { + source: setting, + changeListener: makeChangeListener2 + }), /* @__PURE__ */ React2.createElement("div", { + className: "setting-item" + }, /* @__PURE__ */ React2.createElement("div", { + className: "setting-item-info" + }), /* @__PURE__ */ React2.createElement("div", { + className: "setting-control" + }, /* @__PURE__ */ React2.createElement("button", { + className: "mod-cta", + type: "submit", + disabled: submitting + }, submitText))))); +}; + +// src/ui/settings.ts +var ReactDOM2 = __toModule(require_react_dom()); +var import_react2 = __toModule(require_react()); +var import_obsidian_daily_notes_interface = __toModule(require_main()); + +// src/ui/ReactModal.ts +var ReactDOM = __toModule(require_react_dom()); +var import_obsidian2 = __toModule(require("obsidian")); +var ReactModal = class extends import_obsidian2.Modal { + constructor(app, onOpenCallback) { + super(app); + this.onOpenCallback = onOpenCallback; } - toISODate({ format = "extended" } = {}) { - if (!this.isValid) { - return null; - } - return toISODate(this, format === "extended"); + onOpen() { + return __async(this, null, function* () { + const { contentEl } = this; + ReactDOM.render(yield this.onOpenCallback(() => this.close()), contentEl); + }); } - toISOWeekDate() { - return toTechFormat(this, "kkkk-'W'WW-c"); + onClose() { + const { contentEl } = this; + ReactDOM.unmountComponentAtNode(contentEl); } - toISOTime({ - suppressMilliseconds = false, - suppressSeconds = false, - includeOffset = true, - includePrefix = false, - extendedZone = false, - format = "extended" - } = {}) { - if (!this.isValid) { - return null; +}; + +// src/parsing/caldav/import.ts +var import_color = __toModule(require_color()); +var import_dav2 = __toModule(require_dav()); + +// src/parsing/caldav/transport.ts +var import_co = __toModule(require_co()); +var import_dav = __toModule(require_dav()); +var import_obsidian3 = __toModule(require("obsidian")); +var RequestBridge = class { + constructor(credentials) { + this.headers = {}; + if (credentials) { + this.setRequestHeader("Authorization", "Basic " + this.encode(credentials)); } - let c3 = includePrefix ? "T" : ""; - return c3 + toISOTime(this, format === "extended", suppressSeconds, suppressMilliseconds, includeOffset, extendedZone); - } - toRFC2822() { - return toTechFormat(this, "EEE, dd LLL yyyy HH:mm:ss ZZZ", false); } - toHTTP() { - return toTechFormat(this.toUTC(), "EEE, dd LLL yyyy HH:mm:ss 'GMT'"); + encode(credentials) { + return window.btoa(credentials.username + ":" + credentials.password); } - toSQLDate() { - if (!this.isValid) { - return null; + setRequestHeader(header, value) { + if (header.toLowerCase() == "content-type") { + this.contentType = value.toString(); + } else { + this.headers[header] = value.toString(); } - return toISODate(this, true); } - toSQLTime({ includeOffset = true, includeZone = false, includeOffsetSpace = true } = {}) { - let fmt = "HH:mm:ss.SSS"; - if (includeZone || includeOffset) { - if (includeOffsetSpace) { - fmt += " "; - } - if (includeZone) { - fmt += "z"; - } else if (includeOffset) { - fmt += "ZZ"; +}; +var Basic = class extends import_dav.transport.Transport { + constructor(credentials) { + super(credentials); + } + send(request2, url, options) { + return (0, import_co.co)(function* () { + let sandbox = options && options.sandbox; + let transformRequest = request2.transformRequest; + let transformResponse = request2.transformResponse; + let onerror = request2.onerror; + let requestBridge = new RequestBridge(this.credentials); + if (sandbox) + sandbox.add(requestBridge); + if (transformRequest) + transformRequest(requestBridge); + let result; + try { + let response = (0, import_obsidian3.request)({ + url, + method: request2.method, + contentType: requestBridge.contentType, + body: request2.requestData, + headers: requestBridge.headers + }); + requestBridge.responseText = yield Promise.resolve(response); + result = transformResponse ? transformResponse(requestBridge) : requestBridge.responseText; + } catch (error) { + if (onerror) + onerror(error); + throw error; } - } - return toTechFormat(this, fmt, true); + return result; + }.bind(this)); } - toSQL(opts = {}) { - if (!this.isValid) { - return null; +}; + +// src/parsing/caldav/import.ts +function importCalendars(auth, url) { + return __async(this, null, function* () { + try { + let xhr = new Basic(new import_dav2.default.Credentials({ + username: auth.username, + password: auth.password + })); + let account = yield import_dav2.default.createAccount({ + xhr, + server: url, + loadObjects: false, + loadCollections: true + }); + let colorRequest = import_dav2.default.request.propfind({ + props: [{ name: "calendar-color", namespace: import_dav2.default.ns.CALDAV_APPLE }], + depth: "0" + }); + const calendars = yield Promise.all(account.calendars.map((calendar) => __async(this, null, function* () { + var _a; + if (!calendar.components.includes("VEVENT")) { + return null; + } + let colorResponse = yield xhr.send(colorRequest, calendar.url); + let color = (_a = colorResponse[0].props) == null ? void 0 : _a.calendarColor; + return { + name: calendar.displayName, + url: calendar.url, + color: color ? (0, import_color.default)(color).hex() : null + }; + }))); + return calendars.flatMap((c3) => c3 ? c3 : []).map((c3) => ({ + type: "caldav", + name: c3.name, + url, + homeUrl: c3.url, + color: c3.color || null, + username: auth.username, + password: auth.password + })); + } catch (e3) { + console.error(`Error importing calendars from ${url}`, e3); + console.error(e3); + throw e3; } - return `${this.toSQLDate()} ${this.toSQLTime(opts)}`; - } - toString() { - return this.isValid ? this.toISO() : INVALID3; - } - valueOf() { - return this.toMillis(); - } - toMillis() { - return this.isValid ? this.ts : NaN; - } - toSeconds() { - return this.isValid ? this.ts / 1e3 : NaN; - } - toUnixInteger() { - return this.isValid ? Math.floor(this.ts / 1e3) : NaN; - } - toJSON() { - return this.toISO(); - } - toBSON() { - return this.toJSDate(); + }); +} + +// src/ui/settings.ts +var DEFAULT_SETTINGS = { + calendarSources: [], + defaultCalendar: 0, + firstDay: 0, + initialView: { + desktop: "timeGridWeek", + mobile: "timeGrid3Days" + }, + timeFormat24h: false +}; +var WEEKDAYS = [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" +]; +var INITIAL_VIEW_OPTIONS = { + DESKTOP: { + timeGridDay: "Day", + timeGridWeek: "Week", + dayGridMonth: "Month", + listWeek: "List" + }, + MOBILE: { + timeGrid3Days: "3 Days", + timeGridDay: "Day", + listWeek: "List" } - toObject(opts = {}) { - if (!this.isValid) - return {}; - const base = __spreadValues({}, this.c); - if (opts.includeConfig) { - base.outputCalendar = this.outputCalendar; - base.numberingSystem = this.loc.numberingSystem; - base.locale = this.loc.locale; - } - return base; +}; +function addCalendarButton(app, plugin, containerEl, submitCallback, listUsedDirectories) { + let dropdown; + const directories = app.vault.getAllLoadedFiles().filter((f3) => f3 instanceof import_obsidian4.TFolder).map((f3) => f3.path); + return new import_obsidian4.Setting(containerEl).setName("Calendars").setDesc("Add calendar").addDropdown((d2) => dropdown = d2.addOptions({ + local: "Full note", + dailynote: "Daily Note", + icloud: "iCloud", + caldav: "CalDAV", + ical: "Remote (.ics format)" + })).addExtraButton((button) => { + button.setTooltip("Add Calendar"); + button.setIcon("plus-with-circle"); + button.onClick(() => { + let modal = new ReactModal(app, () => __async(this, null, function* () { + var _a, _b; + yield plugin.loadSettings(); + const usedDirectories = (listUsedDirectories ? listUsedDirectories : () => plugin.settings.calendarSources.map((s4) => s4.type === "local" && s4.directory).filter((s4) => !!s4))(); + let headings = []; + let { template } = (0, import_obsidian_daily_notes_interface.getDailyNoteSettings)(); + if (template) { + if (!template.endsWith(".md")) { + template += ".md"; + } + const file = app.vault.getAbstractFileByPath(template); + if (file instanceof import_obsidian4.TFile) { + headings = ((_b = (_a = app.metadataCache.getFileCache(file)) == null ? void 0 : _a.headings) == null ? void 0 : _b.map((h3) => h3.heading)) || []; + } + } + return (0, import_react2.createElement)(AddCalendarSource, { + source: makeDefaultPartialCalendarSource(dropdown.getValue()), + directories: directories.filter((dir) => usedDirectories.indexOf(dir) === -1), + headings, + submit: (source) => __async(this, null, function* () { + if (source.type === "caldav" || source.type === "icloud") { + try { + let sources = yield importCalendars({ + type: "basic", + username: source.username, + password: source.password + }, source.url); + sources.forEach((source2) => submitCallback(source2)); + } catch (e3) { + if (e3 instanceof Error) { + new import_obsidian4.Notice(e3.message); + } + } + } else { + submitCallback(source); + } + modal.close(); + }) + }); + })); + modal.open(); + }); + }); +} +var FullCalendarSettingTab = class extends import_obsidian4.PluginSettingTab { + constructor(app, plugin) { + super(app, plugin); + this.plugin = plugin; } - toJSDate() { - return new Date(this.isValid ? this.ts : NaN); + display() { + return __async(this, null, function* () { + const { containerEl } = this; + containerEl.empty(); + containerEl.createEl("h2", { text: "Calendar Preferences" }); + new import_obsidian4.Setting(containerEl).setName("Desktop Initial View").setDesc("Choose the initial view range on desktop devices.").addDropdown((dropdown) => { + Object.entries(INITIAL_VIEW_OPTIONS.DESKTOP).forEach(([value, display]) => { + dropdown.addOption(value, display); + }); + dropdown.setValue(this.plugin.settings.initialView.desktop); + dropdown.onChange((initialView) => __async(this, null, function* () { + this.plugin.settings.initialView.desktop = initialView; + yield this.plugin.saveSettings(); + })); + }); + new import_obsidian4.Setting(containerEl).setName("Mobile Initial View").setDesc("Choose the initial view range on mobile devices.").addDropdown((dropdown) => { + Object.entries(INITIAL_VIEW_OPTIONS.MOBILE).forEach(([value, display]) => { + dropdown.addOption(value, display); + }); + dropdown.setValue(this.plugin.settings.initialView.mobile); + dropdown.onChange((initialView) => __async(this, null, function* () { + this.plugin.settings.initialView.mobile = initialView; + yield this.plugin.saveSettings(); + })); + }); + new import_obsidian4.Setting(containerEl).setName("Starting Day of the Week").setDesc("Choose what day of the week to start.").addDropdown((dropdown) => { + WEEKDAYS.forEach((day, code) => { + dropdown.addOption(code.toString(), day); + }); + dropdown.setValue(this.plugin.settings.firstDay.toString()); + dropdown.onChange((codeAsString) => __async(this, null, function* () { + this.plugin.settings.firstDay = Number(codeAsString); + yield this.plugin.saveSettings(); + })); + }); + new import_obsidian4.Setting(containerEl).setName("24-hour format").setDesc("Display the time in a 24-hour format.").addToggle((toggle) => { + toggle.setValue(this.plugin.settings.timeFormat24h); + toggle.onChange((val) => __async(this, null, function* () { + this.plugin.settings.timeFormat24h = val; + yield this.plugin.saveSettings(); + })); + }); + containerEl.createEl("h2", { text: "Manage Calendars" }); + addCalendarButton(this.app, this.plugin, containerEl, (source) => __async(this, null, function* () { + sourceList.addSource(source); + }), () => sourceList.state.sources.map((s4) => s4.type === "local" && s4.directory).filter((s4) => !!s4)); + const sourcesDiv = containerEl.createDiv(); + sourcesDiv.style.display = "block"; + let sourceList = ReactDOM2.render((0, import_react2.createElement)(CalendarSettings, { + sources: this.plugin.settings.calendarSources, + submit: (settings) => __async(this, null, function* () { + this.plugin.settings.calendarSources = settings; + yield this.plugin.saveSettings(); + }) + }), sourcesDiv); + }); } - diff(otherDateTime, unit = "milliseconds", opts = {}) { - if (!this.isValid || !otherDateTime.isValid) { - return Duration.invalid("created by diffing an invalid DateTime"); +}; + +// src/ui/onboard.ts +function renderOnboarding(app, plugin, el) { + el.style.height = "100%"; + const nocal = el.createDiv(); + nocal.style.height = "100%"; + nocal.style.display = "flex"; + nocal.style.alignItems = "center"; + nocal.style.justifyContent = "center"; + const notice = nocal.createDiv(); + notice.createEl("h1").textContent = "No calendar available"; + notice.createEl("p").textContent = "Thanks for downloading Full Calendar! Create a calendar below to begin."; + const container = notice.createDiv(); + container.style.position = "fixed"; + addCalendarButton(app, plugin, container, (source) => __async(this, null, function* () { + const { calendarSources } = plugin.settings; + calendarSources.push(source); + yield plugin.saveSettings(); + yield plugin.activateView(); + })); +} + +// src/ui/actions.ts +var import_obsidian5 = __toModule(require("obsidian")); +function openFileForEvent(_0, _1, _22) { + return __async(this, arguments, function* (cache, { workspace, vault }, id) { + const details = cache.getInfoForEditableEvent(id); + if (!details) { + throw new Error("Event does not have local representation."); + } + const { + location: { path, lineNumber } + } = details; + let leaf = workspace.getMostRecentLeaf(); + const file = vault.getAbstractFileByPath(path); + if (!(file instanceof import_obsidian5.TFile)) { + return; } - const durOpts = __spreadValues({ locale: this.locale, numberingSystem: this.numberingSystem }, opts); - const units = maybeArray(unit).map(Duration.normalizeUnit), otherIsLater = otherDateTime.valueOf() > this.valueOf(), earlier = otherIsLater ? this : otherDateTime, later = otherIsLater ? otherDateTime : this, diffed = diff_default(earlier, later, units, durOpts); - return otherIsLater ? diffed.negate() : diffed; - } - diffNow(unit = "milliseconds", opts = {}) { - return this.diff(DateTime.now(), unit, opts); - } - until(otherDateTime) { - return this.isValid ? Interval.fromDateTimes(this, otherDateTime) : this; - } - hasSame(otherDateTime, unit) { - if (!this.isValid) - return false; - const inputMs = otherDateTime.valueOf(); - const adjustedToZone = this.setZone(otherDateTime.zone, { keepLocalTime: true }); - return adjustedToZone.startOf(unit) <= inputMs && inputMs <= adjustedToZone.endOf(unit); - } - equals(other) { - return this.isValid && other.isValid && this.valueOf() === other.valueOf() && this.zone.equals(other.zone) && this.loc.equals(other.loc); - } - toRelative(options = {}) { - if (!this.isValid) - return null; - const base = options.base || DateTime.fromObject({}, { zone: this.zone }), padding = options.padding ? this < base ? -options.padding : options.padding : 0; - let units = ["years", "months", "days", "hours", "minutes", "seconds"]; - let unit = options.unit; - if (Array.isArray(options.unit)) { - units = options.unit; - unit = void 0; + if (!leaf) { + return; } - return diffRelative(base, this.plus(padding), __spreadProps(__spreadValues({}, options), { - numeric: "always", - units, - unit - })); - } - toRelativeCalendar(options = {}) { - if (!this.isValid) - return null; - return diffRelative(options.base || DateTime.fromObject({}, { zone: this.zone }), this, __spreadProps(__spreadValues({}, options), { - numeric: "auto", - units: ["years", "months", "days"], - calendary: true - })); - } - static min(...dateTimes) { - if (!dateTimes.every(DateTime.isDateTime)) { - throw new InvalidArgumentError("min requires all arguments be DateTimes"); + if (leaf.getViewState().pinned) { + leaf = workspace.getLeaf("tab"); } - return bestBy(dateTimes, (i3) => i3.valueOf(), Math.min); - } - static max(...dateTimes) { - if (!dateTimes.every(DateTime.isDateTime)) { - throw new InvalidArgumentError("max requires all arguments be DateTimes"); + yield leaf.openFile(file); + if (lineNumber && leaf.view instanceof import_obsidian5.MarkdownView) { + leaf.view.editor.setCursor({ line: lineNumber, ch: 0 }); } - return bestBy(dateTimes, (i3) => i3.valueOf(), Math.max); - } - static fromFormatExplain(text, fmt, options = {}) { - const { locale = null, numberingSystem = null } = options, localeToUse = Locale.fromOpts({ - locale, - numberingSystem, - defaultToEN: true - }); - return explainFromTokens(localeToUse, text, fmt); - } - static fromStringExplain(text, fmt, options = {}) { - return DateTime.fromFormatExplain(text, fmt, options); - } - static get DATE_SHORT() { - return DATE_SHORT; - } - static get DATE_MED() { - return DATE_MED; - } - static get DATE_MED_WITH_WEEKDAY() { - return DATE_MED_WITH_WEEKDAY; - } - static get DATE_FULL() { - return DATE_FULL; - } - static get DATE_HUGE() { - return DATE_HUGE; - } - static get TIME_SIMPLE() { - return TIME_SIMPLE; - } - static get TIME_WITH_SECONDS() { - return TIME_WITH_SECONDS; - } - static get TIME_WITH_SHORT_OFFSET() { - return TIME_WITH_SHORT_OFFSET; - } - static get TIME_WITH_LONG_OFFSET() { - return TIME_WITH_LONG_OFFSET; - } - static get TIME_24_SIMPLE() { - return TIME_24_SIMPLE; - } - static get TIME_24_WITH_SECONDS() { - return TIME_24_WITH_SECONDS; - } - static get TIME_24_WITH_SHORT_OFFSET() { - return TIME_24_WITH_SHORT_OFFSET; - } - static get TIME_24_WITH_LONG_OFFSET() { - return TIME_24_WITH_LONG_OFFSET; - } - static get DATETIME_SHORT() { - return DATETIME_SHORT; - } - static get DATETIME_SHORT_WITH_SECONDS() { - return DATETIME_SHORT_WITH_SECONDS; - } - static get DATETIME_MED() { - return DATETIME_MED; - } - static get DATETIME_MED_WITH_SECONDS() { - return DATETIME_MED_WITH_SECONDS; - } - static get DATETIME_MED_WITH_WEEKDAY() { - return DATETIME_MED_WITH_WEEKDAY; - } - static get DATETIME_FULL() { - return DATETIME_FULL; + }); +} + +// src/ui/event_modal.ts +var import_obsidian6 = __toModule(require("obsidian")); +var React4 = __toModule(require_react()); + +// src/calendars/Calendar.ts +var ID_SEPARATOR = "::"; +var Calendar2 = class { + constructor(color) { + this.color = color; } - static get DATETIME_FULL_WITH_SECONDS() { - return DATETIME_FULL_WITH_SECONDS; + get id() { + return `${this.type}${ID_SEPARATOR}${this.identifier}`; } - static get DATETIME_HUGE() { - return DATETIME_HUGE; +}; + +// src/calendars/EditableCalendar.ts +var EditableCalendar = class extends Calendar2 { + constructor(color) { + super(color); } - static get DATETIME_HUGE_WITH_SECONDS() { - return DATETIME_HUGE_WITH_SECONDS; + containsPath(path) { + return path.startsWith(this.directory); } }; -function friendlyDateTime(dateTimeish) { - if (DateTime.isDateTime(dateTimeish)) { - return dateTimeish; - } else if (dateTimeish && dateTimeish.valueOf && isNumber(dateTimeish.valueOf())) { - return DateTime.fromJSDate(dateTimeish); - } else if (dateTimeish && typeof dateTimeish === "object") { - return DateTime.fromObject(dateTimeish); - } else { - throw new InvalidArgumentError(`Unknown datetime argument: ${dateTimeish}, of type ${typeof dateTimeish}`); - } -} // src/ui/components/EditEvent.tsx -var React = __toModule(require_react()); -var import_react = __toModule(require_react()); +var React3 = __toModule(require_react()); +var import_react3 = __toModule(require_react()); function makeChangeListener(setState, fromString) { return (e3) => setState(fromString(e3.target.value)); } -var DayChoice = ({ code, label, isSelected, onClick }) => /* @__PURE__ */ React.createElement("button", { +var DayChoice = ({ code, label, isSelected, onClick }) => /* @__PURE__ */ React3.createElement("button", { type: "button", style: { marginLeft: "0.25rem", @@ -55597,7 +63426,7 @@ var DayChoice = ({ code, label, isSelected, onClick }) => /* @__PURE__ */ React. height: "25px" }, onClick: () => onClick(code) -}, /* @__PURE__ */ React.createElement("b", null, label[0])); +}, /* @__PURE__ */ React3.createElement("b", null, label[0])); var DAY_MAP = { U: "Sunday", M: "Monday", @@ -55611,7 +63440,7 @@ var DaySelect = ({ value: days, onChange }) => { - return /* @__PURE__ */ React.createElement("div", null, Object.entries(DAY_MAP).map(([code, label]) => /* @__PURE__ */ React.createElement(DayChoice, { + return /* @__PURE__ */ React3.createElement("div", null, Object.entries(DAY_MAP).map(([code, label]) => /* @__PURE__ */ React3.createElement(DayChoice, { key: code, code, label, @@ -55627,8 +63456,8 @@ var EditEvent = ({ calendars, defaultCalendarIndex }) => { - const [date, setDate] = (0, import_react.useState)(initialEvent ? initialEvent.type !== "recurring" ? initialEvent.date : initialEvent.startRecur || "" : ""); - const [endDate, setEndDate] = (0, import_react.useState)(initialEvent && initialEvent.type === "single" ? initialEvent.endDate : void 0); + const [date, setDate] = (0, import_react3.useState)(initialEvent ? initialEvent.type !== "recurring" ? initialEvent.date : initialEvent.startRecur || "" : ""); + const [endDate, setEndDate] = (0, import_react3.useState)(initialEvent && initialEvent.type === "single" ? initialEvent.endDate : void 0); let initialStartTime = ""; let initialEndTime = ""; if (initialEvent && (initialEvent.allDay === false || initialEvent.allDay === void 0)) { @@ -55636,18 +63465,18 @@ var EditEvent = ({ initialStartTime = startTime2 || ""; initialEndTime = endTime2 || ""; } - const [startTime, setStartTime] = (0, import_react.useState)(initialStartTime); - const [endTime, setEndTime] = (0, import_react.useState)(initialEndTime); - const [title, setTitle] = (0, import_react.useState)((initialEvent == null ? void 0 : initialEvent.title) || ""); - const [isRecurring, setIsRecurring] = (0, import_react.useState)((initialEvent == null ? void 0 : initialEvent.type) === "recurring" || false); - const [endRecur, setEndRecur] = (0, import_react.useState)(""); - const [daysOfWeek, setDaysOfWeek] = (0, import_react.useState)(((initialEvent == null ? void 0 : initialEvent.type) === "recurring" ? initialEvent.daysOfWeek : []) || []); - const [allDay, setAllDay] = (0, import_react.useState)((initialEvent == null ? void 0 : initialEvent.allDay) || false); - const [calendarIndex, setCalendarIndex] = (0, import_react.useState)(defaultCalendarIndex); - const [complete, setComplete] = (0, import_react.useState)((initialEvent == null ? void 0 : initialEvent.type) === "single" && initialEvent.completed !== null && initialEvent.completed !== void 0 ? initialEvent.completed : false); - const [isTask, setIsTask] = (0, import_react.useState)((initialEvent == null ? void 0 : initialEvent.type) === "single" && initialEvent.completed !== void 0 && initialEvent.completed !== null); - const titleRef = (0, import_react.useRef)(null); - (0, import_react.useEffect)(() => { + const [startTime, setStartTime] = (0, import_react3.useState)(initialStartTime); + const [endTime, setEndTime] = (0, import_react3.useState)(initialEndTime); + const [title, setTitle] = (0, import_react3.useState)((initialEvent == null ? void 0 : initialEvent.title) || ""); + const [isRecurring, setIsRecurring] = (0, import_react3.useState)((initialEvent == null ? void 0 : initialEvent.type) === "recurring" || false); + const [endRecur, setEndRecur] = (0, import_react3.useState)(""); + const [daysOfWeek, setDaysOfWeek] = (0, import_react3.useState)(((initialEvent == null ? void 0 : initialEvent.type) === "recurring" ? initialEvent.daysOfWeek : []) || []); + const [allDay, setAllDay] = (0, import_react3.useState)((initialEvent == null ? void 0 : initialEvent.allDay) || false); + const [calendarIndex, setCalendarIndex] = (0, import_react3.useState)(defaultCalendarIndex); + const [complete, setComplete] = (0, import_react3.useState)((initialEvent == null ? void 0 : initialEvent.type) === "single" && initialEvent.completed !== null && initialEvent.completed !== void 0 ? initialEvent.completed : false); + const [isTask2, setIsTask] = (0, import_react3.useState)((initialEvent == null ? void 0 : initialEvent.type) === "single" && initialEvent.completed !== void 0 && initialEvent.completed !== null); + const titleRef = (0, import_react3.useRef)(null); + (0, import_react3.useEffect)(() => { if (titleRef.current) { titleRef.current.focus(); } @@ -55662,101 +63491,101 @@ var EditEvent = ({ } : { date, endDate, - completed: isTask ? complete : null + completed: isTask2 ? complete : null }), calendarIndex); }); - return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("p", { + return /* @__PURE__ */ React3.createElement(React3.Fragment, null, /* @__PURE__ */ React3.createElement("div", null, /* @__PURE__ */ React3.createElement("p", { style: { float: "right" } - }, open && /* @__PURE__ */ React.createElement("button", { + }, open && /* @__PURE__ */ React3.createElement("button", { onClick: open - }, "Open Note"))), /* @__PURE__ */ React.createElement("form", { + }, "Open Note"))), /* @__PURE__ */ React3.createElement("form", { onSubmit: handleSubmit - }, /* @__PURE__ */ React.createElement("p", null, /* @__PURE__ */ React.createElement("input", { + }, /* @__PURE__ */ React3.createElement("p", null, /* @__PURE__ */ React3.createElement("input", { ref: titleRef, type: "text", id: "title", value: title, placeholder: "Add title", required: true, - onChange: makeChangeListener(setTitle, (x4) => x4) - })), /* @__PURE__ */ React.createElement("p", null, /* @__PURE__ */ React.createElement("select", { + onChange: makeChangeListener(setTitle, (x3) => x3) + })), /* @__PURE__ */ React3.createElement("p", null, /* @__PURE__ */ React3.createElement("select", { id: "calendar", value: calendarIndex, onChange: makeChangeListener(setCalendarIndex, parseInt) - }, calendars.flatMap((cal) => cal.type === "local" || cal.type === "dailynote" ? [cal] : []).map((cal, idx) => /* @__PURE__ */ React.createElement("option", { + }, calendars.flatMap((cal) => cal.type === "local" || cal.type === "dailynote" ? [cal] : []).map((cal, idx) => /* @__PURE__ */ React3.createElement("option", { key: idx, value: idx, disabled: !((initialEvent == null ? void 0 : initialEvent.title) === void 0 || calendars[calendarIndex].type === cal.type) - }, cal.type === "local" ? cal.directory : "Daily Note")))), /* @__PURE__ */ React.createElement("p", null, !isRecurring && /* @__PURE__ */ React.createElement("input", { + }, cal.type === "local" ? cal.name : "Daily Note")))), /* @__PURE__ */ React3.createElement("p", null, !isRecurring && /* @__PURE__ */ React3.createElement("input", { type: "date", id: "date", value: date, required: !isRecurring, - onChange: makeChangeListener(setDate, (x4) => x4) - }), allDay ? /* @__PURE__ */ React.createElement(React.Fragment, null) : /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("input", { + onChange: makeChangeListener(setDate, (x3) => x3) + }), allDay ? /* @__PURE__ */ React3.createElement(React3.Fragment, null) : /* @__PURE__ */ React3.createElement(React3.Fragment, null, /* @__PURE__ */ React3.createElement("input", { type: "time", id: "startTime", value: startTime, required: true, - onChange: makeChangeListener(setStartTime, (x4) => x4) - }), "-", /* @__PURE__ */ React.createElement("input", { + onChange: makeChangeListener(setStartTime, (x3) => x3) + }), "-", /* @__PURE__ */ React3.createElement("input", { type: "time", id: "endTime", value: endTime, required: true, - onChange: makeChangeListener(setEndTime, (x4) => x4) - }))), /* @__PURE__ */ React.createElement("p", null, /* @__PURE__ */ React.createElement("label", { + onChange: makeChangeListener(setEndTime, (x3) => x3) + }))), /* @__PURE__ */ React3.createElement("p", null, /* @__PURE__ */ React3.createElement("label", { htmlFor: "allDay" - }, "All day event "), /* @__PURE__ */ React.createElement("input", { + }, "All day event "), /* @__PURE__ */ React3.createElement("input", { id: "allDay", checked: allDay, onChange: (e3) => setAllDay(e3.target.checked), type: "checkbox" - })), /* @__PURE__ */ React.createElement("p", null, /* @__PURE__ */ React.createElement("label", { + })), /* @__PURE__ */ React3.createElement("p", null, /* @__PURE__ */ React3.createElement("label", { htmlFor: "recurring" - }, "Recurring Event "), /* @__PURE__ */ React.createElement("input", { + }, "Recurring Event "), /* @__PURE__ */ React3.createElement("input", { id: "recurring", checked: isRecurring, onChange: (e3) => setIsRecurring(e3.target.checked), type: "checkbox" - })), isRecurring && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(DaySelect, { + })), isRecurring && /* @__PURE__ */ React3.createElement(React3.Fragment, null, /* @__PURE__ */ React3.createElement(DaySelect, { value: daysOfWeek, onChange: setDaysOfWeek - }), /* @__PURE__ */ React.createElement("p", null, "Starts recurring", /* @__PURE__ */ React.createElement("input", { + }), /* @__PURE__ */ React3.createElement("p", null, "Starts recurring", /* @__PURE__ */ React3.createElement("input", { type: "date", id: "startDate", value: date, - onChange: makeChangeListener(setDate, (x4) => x4) - }), "and stops recurring", /* @__PURE__ */ React.createElement("input", { + onChange: makeChangeListener(setDate, (x3) => x3) + }), "and stops recurring", /* @__PURE__ */ React3.createElement("input", { type: "date", id: "endDate", value: endRecur, - onChange: makeChangeListener(setEndRecur, (x4) => x4) - }))), /* @__PURE__ */ React.createElement("p", null, /* @__PURE__ */ React.createElement("label", { + onChange: makeChangeListener(setEndRecur, (x3) => x3) + }))), /* @__PURE__ */ React3.createElement("p", null, /* @__PURE__ */ React3.createElement("label", { htmlFor: "task" - }, "Task Event "), /* @__PURE__ */ React.createElement("input", { + }, "Task Event "), /* @__PURE__ */ React3.createElement("input", { id: "task", - checked: isTask, + checked: isTask2, onChange: (e3) => { setIsTask(e3.target.checked); }, type: "checkbox" - })), isTask && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("label", { + })), isTask2 && /* @__PURE__ */ React3.createElement(React3.Fragment, null, /* @__PURE__ */ React3.createElement("label", { htmlFor: "taskStatus" - }, "Complete? "), /* @__PURE__ */ React.createElement("input", { + }, "Complete? "), /* @__PURE__ */ React3.createElement("input", { id: "taskStatus", checked: !(complete === false || complete === void 0), - onChange: (e3) => setComplete(e3.target.checked ? DateTime.now().toISO() : false), + onChange: (e3) => setComplete(e3.target.checked ? DateTime2.now().toISO() : false), type: "checkbox" - })), /* @__PURE__ */ React.createElement("p", { + })), /* @__PURE__ */ React3.createElement("p", { style: { display: "flex", justifyContent: "space-between", width: "100%" } - }, /* @__PURE__ */ React.createElement("button", { + }, /* @__PURE__ */ React3.createElement("button", { type: "submit" - }, " Save Event "), /* @__PURE__ */ React.createElement("span", null, deleteEvent && /* @__PURE__ */ React.createElement("button", { + }, " Save Event "), /* @__PURE__ */ React3.createElement("span", null, deleteEvent && /* @__PURE__ */ React3.createElement("button", { type: "button", style: { backgroundColor: "var(--interactive-normal)", @@ -55769,307 +63598,560 @@ var EditEvent = ({ }, "Delete Event"))))); }; -// src/models/Event.ts -var import_obsidian = __toModule(require("obsidian")); - -// src/fullcalendar_interop.ts -var parseTime = (time) => { - let parsed = DateTime.fromFormat(time, "h:mm a"); - if (parsed.invalidReason) { - parsed = DateTime.fromFormat(time, "HH:mm"); - } - if (parsed.invalidReason) { - console.error(`FC: Error parsing time string '${time}': ${parsed.invalidReason}'`); - return null; - } - return Duration.fromISOTime(parsed.toISOTime({ - includeOffset: false, - includePrefix: false - })); -}; -var normalizeTimeString = (time) => { - const parsed = parseTime(time); - if (!parsed) { - return null; +// src/ui/event_modal.ts +function launchCreateModal(plugin, partialEvent) { + const calendars = [...plugin.cache.calendars.entries()].filter(([_3, cal]) => cal instanceof EditableCalendar).map(([id, cal]) => { + return { + id, + type: cal.type, + name: cal.name + }; + }); + new ReactModal(plugin.app, (closeModal) => __async(this, null, function* () { + return React4.createElement(EditEvent, { + initialEvent: partialEvent, + calendars, + defaultCalendarIndex: 0, + submit: (data, calendarIndex) => __async(this, null, function* () { + const calendarId = calendars[calendarIndex].id; + try { + yield plugin.cache.addEvent(calendarId, data); + } catch (e3) { + if (e3 instanceof Error) { + new import_obsidian6.Notice("Error when creating event: " + e3.message); + console.error(e3); + } + } + closeModal(); + }) + }); + })).open(); +} +function launchEditModal(plugin, eventId) { + const eventToEdit = plugin.cache.getEventById(eventId); + if (!eventToEdit) { + throw new Error("Cannot edit event that doesn't exist."); } - return parsed.toISOTime({ - suppressMilliseconds: true, - includePrefix: false, - suppressSeconds: true + const calId = plugin.cache.getInfoForEditableEvent(eventId).calendar.id; + const calendars = [...plugin.cache.calendars.entries()].filter(([_3, cal]) => cal instanceof EditableCalendar).map(([id, cal]) => { + return { + id, + type: cal.type, + name: cal.name + }; }); + const calIdx = calendars.findIndex(({ id }) => id === calId); + new ReactModal(plugin.app, (closeModal) => __async(this, null, function* () { + return React4.createElement(EditEvent, { + initialEvent: eventToEdit, + calendars, + defaultCalendarIndex: calIdx, + submit: (data, calendarIndex) => __async(this, null, function* () { + try { + if (calendarIndex !== calIdx) { + yield plugin.cache.moveEventToCalendar(eventId, calendars[calendarIndex].id); + } + yield plugin.cache.updateEventWithId(eventId, data); + } catch (e3) { + if (e3 instanceof Error) { + new import_obsidian6.Notice("Error when updating event: " + e3.message); + console.error(e3); + } + } + closeModal(); + }), + open: () => __async(this, null, function* () { + openFileForEvent(plugin.cache, plugin.app, eventId); + }), + deleteEvent: () => __async(this, null, function* () { + try { + yield plugin.cache.deleteEvent(eventId); + } catch (e3) { + if (e3 instanceof Error) { + new import_obsidian6.Notice("Error when deleting event: " + e3.message); + console.error(e3); + } + } + }) + }); + })).open(); +} + +// src/tasks/index.ts +var isTask = (e3) => e3.type === "single" && e3.completed !== void 0 && e3.completed !== null; +var unmakeTask = (event) => { + if (event.type !== "single") { + return event; + } + return __spreadProps(__spreadValues({}, event), { completed: null }); }; -var add = (date, time) => { - let hours = time.hours; - let minutes = time.minutes; - return date.set({ hour: hours, minute: minutes }); -}; -var getTime2 = (date) => DateTime.fromJSDate(date).toISOTime({ - suppressMilliseconds: true, - includeOffset: false, - suppressSeconds: true -}); -var getDate = (date) => DateTime.fromJSDate(date).toISODate(); -var combineDateTimeStrings = (date, time) => { - const parsedDate = DateTime.fromISO(date); - if (parsedDate.invalidReason) { - console.error(`FC: Error parsing time string '${date}': ${parsedDate.invalidReason}`); - return null; +var toggleTask = (event, isDone) => { + if (event.type !== "single") { + return event; } - const parsedTime = parseTime(time); - if (!parsedTime) { - return null; + if (isDone) { + return __spreadProps(__spreadValues({}, event), { completed: DateTime2.now().toISO() }); + } else { + return __spreadProps(__spreadValues({}, event), { completed: false }); } - return add(parsedDate, parsedTime).toISO(); }; -var DAYS = "UMTWRFS"; -function dateEndpointsToFrontmatter(start, end, allDay) { - const date = getDate(start); - const endDate = getDate(end); - return __spreadValues({ - type: "single", - date, - endDate: date !== endDate ? endDate : void 0, - allDay - }, allDay ? {} : { - startTime: getTime2(start), - endTime: getTime2(end) - }); -} -function toEventInput(id, frontmatter) { - let event = { - id, - title: frontmatter.title, - allDay: frontmatter.allDay - }; - if (frontmatter.type === "recurring") { - event = __spreadProps(__spreadValues({}, event), { - daysOfWeek: frontmatter.daysOfWeek.map((c3) => DAYS.indexOf(c3)), - startRecur: frontmatter.startRecur, - endRecur: frontmatter.endRecur, - extendedProps: { isTask: false } - }); - if (!frontmatter.allDay) { - event = __spreadProps(__spreadValues({}, event), { - startTime: normalizeTimeString(frontmatter.startTime || ""), - endTime: frontmatter.endTime ? normalizeTimeString(frontmatter.endTime) : void 0 - }); - } - } else { - if (!frontmatter.allDay) { - const start = combineDateTimeStrings(frontmatter.date, frontmatter.startTime); - if (!start) { - return null; - } - let end = void 0; - if (frontmatter.endTime) { - end = combineDateTimeStrings(frontmatter.endDate || frontmatter.date, frontmatter.endTime); - if (!end) { - return null; - } + +// src/ui/view.ts +var FULL_CALENDAR_VIEW_TYPE = "full-calendar-view"; +var FULL_CALENDAR_SIDEBAR_VIEW_TYPE = "full-calendar-sidebar-view"; +function getCalendarColors(color) { + let textVar = getComputedStyle(document.body).getPropertyValue("--text-on-accent"); + if (color) { + const m3 = color.slice(1).match(color.length == 7 ? /(\S{2})/g : /(\S{1})/g); + if (m3) { + const r3 = parseInt(m3[0], 16), g4 = parseInt(m3[1], 16), b3 = parseInt(m3[2], 16); + const brightness = (r3 * 299 + g4 * 587 + b3 * 114) / 1e3; + if (brightness > 150) { + textVar = "black"; } - event = __spreadProps(__spreadValues({}, event), { - start, - end, - extendedProps: { - isTask: frontmatter.completed !== void 0 && frontmatter.completed !== null, - taskCompleted: frontmatter.completed - } - }); - } else { - event = __spreadProps(__spreadValues({}, event), { - start: frontmatter.date, - end: frontmatter.endDate || void 0, - extendedProps: { - isTask: frontmatter.completed !== void 0 && frontmatter.completed !== null, - taskCompleted: frontmatter.completed - } - }); } } - return event; -} -function fromEventApi(event) { - const isRecurring = event.extendedProps.daysOfWeek !== void 0; - const startDate = getDate(event.start); - const endDate = getDate(event.end); - return __spreadValues(__spreadValues({ - title: event.title - }, event.allDay ? { allDay: true } : { - allDay: false, - startTime: getTime2(event.start), - endTime: getTime2(event.end) - }), isRecurring ? { - type: "recurring", - daysOfWeek: event.extendedProps.daysOfWeek.map((i3) => DAYS[i3]), - startRecur: event.extendedProps.startRecur && getDate(event.extendedProps.startRecur), - endRecur: event.extendedProps.endRecur && getDate(event.extendedProps.endRecur) - } : __spreadProps(__spreadValues({ - type: "single", - date: startDate - }, startDate !== endDate ? { endDate } : {}), { - completed: event.extendedProps.taskCompleted - })); + return { + color: color || getComputedStyle(document.body).getPropertyValue("--interactive-accent"), + textColor: textVar + }; } - -// src/types.ts -var PLUGIN_SLUG = "full-calendar-plugin"; -function validateEvent(obj) { - if (obj === void 0) { - return null; +var CalendarView = class extends import_obsidian7.ItemView { + constructor(leaf, plugin, inSidebar = false) { + super(leaf); + this.fullCalendarView = null; + this.callback = null; + this.plugin = plugin; + this.inSidebar = inSidebar; } - if (!obj.title) { - return null; + getIcon() { + return "calendar-glyph"; } - if (!obj.allDay && !obj.startTime) { - return null; + getViewType() { + return this.inSidebar ? FULL_CALENDAR_SIDEBAR_VIEW_TYPE : FULL_CALENDAR_VIEW_TYPE; } - const timeInfo = obj.allDay ? { allDay: true } : { - startTime: obj.startTime, - endTime: obj.endTime - }; - if (obj.type === void 0 || obj.type === "single") { - if (!obj.date) { - return null; - } - return __spreadValues({ - title: obj.title, - type: "single", - date: obj.date, - endDate: obj.endDate, - completed: obj.completed - }, timeInfo); - } else if (obj.type === "recurring") { - if (obj.daysOfWeek === void 0) { - return null; - } - return __spreadValues({ - title: obj.title, - type: "recurring", - daysOfWeek: obj.daysOfWeek, - startRecur: obj.startRecur, - endRecur: obj.endRecur - }, timeInfo); + getDisplayText() { + return this.inSidebar ? "Full Calendar" : "Calendar"; } - return null; -} -function makeDefaultPartialCalendarSource(type) { - if (type === "icloud") { - return { - type, - color: getComputedStyle(document.body).getPropertyValue("--interactive-accent").trim(), - url: "https://caldav.icloud.com" - }; + translateSources() { + return this.plugin.cache.getAllEvents().map(({ events, editable, color, id }) => __spreadValues({ + id, + events: events.flatMap((e3) => toEventInput(e3.id, e3.event) || []), + editable + }, getCalendarColors(color))); + } + onOpen() { + return __async(this, null, function* () { + yield this.plugin.loadSettings(); + if (!this.plugin.cache) { + new import_obsidian7.Notice("Full Calendar event cache not loaded."); + return; + } + if (!this.plugin.cache.initialized) { + yield this.plugin.cache.populate(); + } + const container = this.containerEl.children[1]; + container.empty(); + let calendarEl = container.createEl("div"); + if (this.plugin.settings.calendarSources.filter((s4) => s4.type !== "FOR_TEST_ONLY" && s4.type !== "gcal").length === 0) { + renderOnboarding(this.app, this.plugin, calendarEl); + return; + } + const sources = this.translateSources(); + if (this.fullCalendarView) { + this.fullCalendarView.destroy(); + this.fullCalendarView = null; + } + this.fullCalendarView = renderCalendar(calendarEl, sources, { + forceNarrow: this.inSidebar, + eventClick: (info) => __async(this, null, function* () { + try { + if (info.jsEvent.getModifierState("Control") || info.jsEvent.getModifierState("Meta")) { + yield openFileForEvent(this.plugin.cache, this.app, info.event.id); + } else { + launchEditModal(this.plugin, info.event.id); + } + } catch (e3) { + if (e3 instanceof Error) { + console.warn(e3); + new import_obsidian7.Notice(e3.message); + } + } + }), + select: (start, end, allDay, viewType) => __async(this, null, function* () { + if (viewType === "dayGridMonth") { + end.setDate(end.getDate() - 1); + } + const partialEvent = dateEndpointsToFrontmatter(start, end, allDay); + try { + launchCreateModal(this.plugin, partialEvent); + } catch (e3) { + if (e3 instanceof Error) { + console.error(e3); + new import_obsidian7.Notice(e3.message); + } + } + }), + modifyEvent: (newEvent, oldEvent) => __async(this, null, function* () { + try { + const didModify = yield this.plugin.cache.updateEventWithId(oldEvent.id, fromEventApi(newEvent)); + return !!didModify; + } catch (e3) { + console.error(e3); + new import_obsidian7.Notice(e3.message); + return false; + } + }), + eventMouseEnter: (info) => __async(this, null, function* () { + try { + const location = this.plugin.cache.getInfoForEditableEvent(info.event.id).location; + if (location) { + this.app.workspace.trigger("hover-link", { + event: info.jsEvent, + source: PLUGIN_SLUG, + hoverParent: calendarEl, + targetEl: info.jsEvent.target, + linktext: location.path, + sourcePath: location.path + }); + } + } catch (e3) { + } + }), + firstDay: this.plugin.settings.firstDay, + initialView: this.plugin.settings.initialView, + timeFormat24h: this.plugin.settings.timeFormat24h, + openContextMenuForEvent: (e3, mouseEvent) => __async(this, null, function* () { + const menu = new import_obsidian7.Menu(); + if (!this.plugin.cache) { + return; + } + const event = this.plugin.cache.getEventById(e3.id); + if (!event) { + return; + } + if (this.plugin.cache.isEventEditable(e3.id)) { + if (!isTask(event)) { + menu.addItem((item) => item.setTitle("Turn into task").onClick(() => __async(this, null, function* () { + yield this.plugin.cache.processEvent(e3.id, (e4) => toggleTask(e4, false)); + }))); + } else { + menu.addItem((item) => item.setTitle("Remove checkbox").onClick(() => __async(this, null, function* () { + yield this.plugin.cache.processEvent(e3.id, unmakeTask); + }))); + } + menu.addSeparator(); + menu.addItem((item) => item.setTitle("Go to note").onClick(() => { + if (!this.plugin.cache) { + return; + } + openFileForEvent(this.plugin.cache, this.app, e3.id); + })); + menu.addItem((item) => item.setTitle("Delete").onClick(() => __async(this, null, function* () { + if (!this.plugin.cache) { + return; + } + yield this.plugin.cache.deleteEvent(e3.id); + new import_obsidian7.Notice(`Deleted event "${e3.title}".`); + }))); + } else { + menu.addItem((item) => { + item.setTitle("No actions available on remote events").setDisabled(true); + }); + } + menu.showAtMouseEvent(mouseEvent); + }), + toggleTask: (e3, isDone) => __async(this, null, function* () { + const event = this.plugin.cache.getEventById(e3.id); + if (!event) { + return false; + } + if (event.type !== "single") { + return false; + } + try { + yield this.plugin.cache.updateEventWithId(e3.id, toggleTask(event, isDone)); + } catch (e4) { + if (e4 instanceof FCError) { + new import_obsidian7.Notice(e4.message); + } + return false; + } + return true; + }) + }); + window.fc = this.fullCalendarView; + this.registerDomEvent(this.containerEl, "mouseenter", () => { + this.plugin.cache.revalidateRemoteCalendars(); + }); + if (this.callback) { + this.plugin.cache.off("update", this.callback); + this.callback = null; + } + this.callback = this.plugin.cache.on("update", (payload) => { + var _a; + if (payload.resync) { + (_a = this.fullCalendarView) == null ? void 0 : _a.removeAllEventSources(); + const sources2 = this.translateSources(); + sources2.forEach((source) => { + var _a2; + return (_a2 = this.fullCalendarView) == null ? void 0 : _a2.addEventSource(source); + }); + return; + } + const { toRemove, toAdd } = payload; + console.debug("updating view from cache...", { + toRemove, + toAdd + }); + toRemove.forEach((id) => { + var _a2; + const event = (_a2 = this.fullCalendarView) == null ? void 0 : _a2.getEventById(id); + if (event) { + console.debug("removing event", event.toPlainObject()); + event.remove(); + } else { + console.warn(`Event with id=${id} was slated to be removed but does not exist in the calendar.`); + } + }); + toAdd.forEach(({ id, event, calendarId }) => { + var _a2; + const eventInput = toEventInput(id, event); + console.debug("adding event", { + id, + event, + eventInput, + calendarId + }); + const addedEvent = (_a2 = this.fullCalendarView) == null ? void 0 : _a2.addEvent(eventInput, calendarId); + console.debug("event that was added", addedEvent); + }); + }); + }); } - return { - type, - color: getComputedStyle(document.body).getPropertyValue("--interactive-accent").trim() - }; -} -var FCError = class { - constructor(message) { - this.message = message; + onResize() { + if (this.fullCalendarView) { + this.fullCalendarView.render(); + } } -}; - -// src/models/util.ts -function getColors(color) { - let textVar = getComputedStyle(document.body).getPropertyValue("--text-on-accent"); - if (color) { - const m3 = color.slice(1).match(color.length == 7 ? /(\S{2})/g : /(\S{1})/g); - if (m3) { - const r3 = parseInt(m3[0], 16), g4 = parseInt(m3[1], 16), b3 = parseInt(m3[2], 16); - const brightness = (r3 * 299 + g4 * 587 + b3 * 114) / 1e3; - if (brightness > 150) { - textVar = "black"; + onunload() { + return __async(this, null, function* () { + if (this.fullCalendarView) { + this.fullCalendarView.destroy(); + this.fullCalendarView = null; } - } + if (this.callback) { + this.plugin.cache.off("update", this.callback); + this.callback = null; + } + }); } - return { - color: color || getComputedStyle(document.body).getPropertyValue("--interactive-accent"), - textColor: textVar - }; -} +}; -// src/models/Event.ts -function basenameFromEvent(event) { - switch (event.type) { - case "single": - case void 0: - return `${event.date} ${event.title}`; - case "recurring": - return `(Every ${event.daysOfWeek.join(",")}) ${event.title})`; - } -} -var _CalendarEvent = class { - constructor(cache, vault, data) { - this.cache = cache; - this.vault = vault; - this._data = data; +// src/core/EventCache.ts +var import_obsidian10 = __toModule(require("obsidian")); +var import_deep_equal = __toModule(require_deep_equal()); + +// src/core/EventStore.ts +var Path = class { + constructor(file) { + this.id = file.path; } - get isTask() { - return this._data.type === "single" && this._data.completed !== void 0 && this._data.completed !== null; +}; +var EventID = class { + constructor(id) { + this.id = id; } - get idForCalendar() { - return this.PREFIX + _CalendarEvent.ID_SEPARATOR + this.identifier; +}; +var OneToMany = class { + constructor() { + this.foreign = new Map(); + this.related = new Map(); } - toCalendarEvent() { - return toEventInput(this.idForCalendar, this.data); + clear() { + this.foreign.clear(); + this.related.clear(); } - get data() { - return __spreadValues({}, this._data); + add(one, many) { + this.foreign.set(many.id, one.id); + let related = this.related.get(one.id); + if (!related) { + related = new Set(); + this.related.set(one.id, related); + } + related.add(many.id); } - addTo(calendar, source) { - let event = this.toCalendarEvent(); - if (!event) { - console.error("Malformed event, will not add to calendar.", this); + delete(many) { + const oneId = this.foreign.get(many.id); + if (!oneId) { return; } - calendar.addEvent(__spreadValues(__spreadValues({}, event), getColors(source.color))); + this.foreign.delete(many.id); + const related = this.related.get(oneId); + if (!related) { + throw new Error(`Unreachable: state: relation <${oneId}> exists in the foreign map but not the related map.`); + } + related.delete(many.id); } -}; -var CalendarEvent = _CalendarEvent; -CalendarEvent.ID_SEPARATOR = "::"; -var EditableEvent = class extends CalendarEvent { - constructor(cache, vault, data) { - super(cache, vault, data); + getBy(key) { + const related = this.related.get(key.id); + if (!related) { + return new Set(); + } + return new Set(related); } - get editable() { - return true; + getRelated(key) { + return this.foreign.get(key.id) || null; } - setIsTask(isTask) { - return __async(this, null, function* () { - if (this._data.type !== "single") { + renameKey(oldKey, newKey) { + const related = this.related.get(oldKey.id); + if (!related) { + throw new Error(`Key does not exist in map: ${related}`); + } + this.related.delete(oldKey.id); + this.related.set(newKey.id, related); + } + get numEntries() { + return this.foreign.size; + } + get relatedCount() { + return [...this.related.values()].filter((s4) => s4.size > 0).length; + } + get groupByRelated() { + const result = new Map(); + for (const [key, values] of this.related.entries()) { + result.set(key, [...values.values()]); + } + return result; + } +}; +var EventStore = class { + constructor() { + this.store = new Map(); + this.calendarIndex = new OneToMany(); + this.pathIndex = new OneToMany(); + this.lineNumbers = new Map(); + } + clear() { + const ids = [...this.store.keys()]; + this.store.clear(); + this.calendarIndex.clear(); + this.pathIndex.clear(); + this.lineNumbers.clear(); + return ids; + } + get fileCount() { + return this.pathIndex.relatedCount; + } + get calendarCount() { + return this.calendarIndex.relatedCount; + } + get eventCount() { + return this.store.size; + } + fetch(ids) { + const result = []; + ids.forEach((id) => { + const event = this.store.get(id); + if (!event) { return; } - if (isTask && (this._data.completed === void 0 || this._data.completed === null)) { - yield this.setData(__spreadProps(__spreadValues({}, this._data), { completed: false })); - } else if (!isTask) { - yield this.setData(__spreadProps(__spreadValues({}, this._data), { completed: null })); + const path = this.pathIndex.getRelated(new EventID(id)); + let lineNumber = void 0; + if (path) { + lineNumber = this.lineNumbers.get(id); + } + const location = path ? { path, lineNumber } : null; + const calendarId = this.calendarIndex.getRelated(new EventID(id)); + if (!calendarId) { + throw new Error(`Event with id ${id} does not have an associated calendar.`); } + result.push({ id, event, location, calendarId }); }); + return result; } -}; -var LocalEvent = class extends EditableEvent { - constructor(cache, vault, data, directory, filename) { - super(cache, vault, data); - this.directory = directory; - this.filename = filename; - } - get file() { - const file = this.vault.getAbstractFileByPath(this.path); - if (file instanceof import_obsidian.TFile) { - return file; - } else { - throw new FCError(`Cannot find file for event at path ${this.path}.`); + add({ calendar, location, id, event }) { + if (this.store.has(id)) { + throw new Error(`Event with given ID "${id}" that was supposed to be added to calendar "${calendar.id}" already exists in the EventStore within calendar "${this.calendarIndex.getRelated(new EventID(id))}".`); + } + console.debug("adding event", { id, event, location }); + this.store.set(id, event); + this.calendarIndex.add(calendar, new EventID(id)); + if (location) { + const { file, lineNumber } = location; + console.debug("adding event in file:", file.path); + this.pathIndex.add(new Path(file), new EventID(id)); + if (lineNumber) { + this.lineNumbers.set(id, lineNumber); + } + } + return id; + } + delete(id) { + const event = this.store.get(id); + if (!event) { + return null; + } + console.debug("deleting event", { id, event }); + this.calendarIndex.delete(new EventID(id)); + this.pathIndex.delete(new EventID(id)); + this.lineNumbers.delete(id); + this.store.delete(id); + return event; + } + deleteEventsAtPath(path) { + const eventIds = this.pathIndex.getBy(new Path({ path })); + eventIds.forEach((id) => this.delete(id)); + return eventIds; + } + deleteEventsInCalendar(calendar) { + const eventIds = this.calendarIndex.getBy(calendar); + eventIds.forEach((id) => this.delete(id)); + return eventIds; + } + getEventById(id) { + return this.store.get(id) || null; + } + getEventsInFile(file) { + return this.fetch(this.pathIndex.getBy(new Path(file))); + } + getEventsInCalendar(calendar) { + return this.fetch(this.calendarIndex.getBy(calendar)); + } + getEventsInFileAndCalendar(file, calendar) { + const inFile = this.pathIndex.getBy(new Path(file)); + const inCalendar = this.calendarIndex.getBy(calendar); + return this.fetch([...inFile].filter((id) => inCalendar.has(id))); + } + get eventsByCalendar() { + const result = new Map(); + for (const [k3, vs] of this.calendarIndex.groupByRelated) { + result.set(k3, this.fetch(vs)); + } + return result; + } + getEventDetails(eventId) { + const event = this.getEventById(eventId); + const calendarId = this.calendarIndex.getRelated(new EventID(eventId)); + if (!event || !calendarId) { + return null; } + const path = this.pathIndex.getRelated(new EventID(eventId)); + const lineNumber = this.lineNumbers.get(eventId); + const location = path ? { path, lineNumber } : null; + return { id: eventId, event, calendarId, location }; } }; -// src/models/NoteEvent.ts -var import_obsidian3 = __toModule(require("obsidian")); +// src/calendars/RemoteCalendar.ts +var RemoteCalendar = class extends Calendar2 { +}; + +// src/calendars/FullNoteCalendar.ts +var import_obsidian9 = __toModule(require("obsidian")); // src/serialization/frontmatter.ts -var import_obsidian2 = __toModule(require("obsidian")); +var import_obsidian8 = __toModule(require("obsidian")); var FRONTMATTER_SEPARATOR = "---"; function hasFrontmatter(page) { return page.indexOf(FRONTMATTER_SEPARATOR) === 0 && page.slice(3).indexOf(FRONTMATTER_SEPARATOR) !== -1; @@ -56087,9 +64169,9 @@ function extractPageContents(page) { return page; } } -function replaceFrontmatter(page, newFrontmatter) { +function replaceFrontmatter(page, newFrontmatter2) { return `--- -${newFrontmatter}---${extractPageContents(page)}`; +${newFrontmatter2}---${extractPageContents(page)}`; } function stringifyYamlAtom(v3) { let result = ""; @@ -56105,1932 +64187,1084 @@ function stringifyYamlAtom(v3) { function stringifyYamlLine(k3, v3) { return `${String(k3)}: ${stringifyYamlAtom(v3)}`; } -function modifyFrontmatter(vault, file, modifications) { - return __async(this, null, function* () { - var _a; - let page = yield vault.read(file); - const frontmatter = (_a = extractFrontmatter(page)) == null ? void 0 : _a.split("\n"); - let newFrontmatter = []; - if (!frontmatter) { - newFrontmatter = Object.entries(modifications).filter(([k3, v3]) => v3 !== void 0).map(([k3, v3]) => stringifyYamlLine(k3, v3)); - page = "\n" + page; - } else { - const linesAdded = new Set(); - for (let i3 = 0; i3 < frontmatter.length; i3++) { - const line = frontmatter[i3]; - const obj = (0, import_obsidian2.parseYaml)(line); - if (!obj) { - continue; - } - const keys = Object.keys(obj); - if (keys.length !== 1) { - throw new Error("One YAML line parsed to multiple keys."); - } - const key = keys[0]; - linesAdded.add(key); - const newVal = modifications[key]; - if (newVal !== void 0) { - newFrontmatter.push(stringifyYamlLine(key, newVal)); - } else { - newFrontmatter.push(line); - } - } - newFrontmatter.push(...Object.keys(modifications).filter((k3) => !linesAdded.has(k3)).filter((k3) => modifications[k3] !== void 0).map((k3) => stringifyYamlLine(k3, modifications[k3]))); - } - const newPage = replaceFrontmatter(page, newFrontmatter.join("\n") + "\n"); - yield vault.modify(file, newPage); - }); -} - -// src/models/NoteEvent.ts -var _NoteEvent = class extends LocalEvent { - get path() { - return `${this.directory}/${this.filename}`; - } - get identifier() { - return this.path; - } - get PREFIX() { - return _NoteEvent.ID_PREFIX; - } - constructor(cache, vault, data, { directory, filename }) { - super(cache, vault, data, directory, filename); - } - static create(cache, vault, directory, data) { - return __async(this, null, function* () { - const filename = `${directory}/${basenameFromEvent(data)}.md`; - if (vault.getAbstractFileByPath(filename)) { - throw new FCError(`File with name '${filename}' already exists`); - } - const file = yield vault.create(filename, ""); - yield modifyFrontmatter(vault, file, data); - return new _NoteEvent(cache, vault, data, { - directory: file.parent.path, - filename: file.name - }); - }); - } - static upgrade(cache, vault, file, data) { - return __async(this, null, function* () { - yield modifyFrontmatter(vault, file, data); - return new _NoteEvent(cache, vault, data, { - directory: file.parent.path, - filename: file.name - }); - }); - } - static fromFile(cache, vault, file) { - var _a; - let data = validateEvent((_a = cache.getFileCache(file)) == null ? void 0 : _a.frontmatter); - if (!data) - return null; - if (!data.title) { - data.title = file.basename; - } - return new _NoteEvent(cache, vault, data, { - directory: file.parent.path, - filename: file.name - }); - } - static fromPath(cache, vault, path) { - const file = vault.getAbstractFileByPath(path); - if (!(file instanceof import_obsidian3.TFile)) { - throw new FCError(`File not found at path: ${path}`); - } - const event = this.fromFile(cache, vault, file); - if (!event) { - throw new FCError(`Could not construct event from file at path: ${path}`); - } - return event; - } - openIn(leaf, workspace) { - return __async(this, null, function* () { - if (leaf.getViewState().pinned) { - leaf = workspace.getLeaf("tab"); - } - yield leaf.openFile(this.file); - }); - } - delete() { - return __async(this, null, function* () { - yield this.vault.trash(this.file, true); - }); - } - setDirectory(newDirectory) { - return __async(this, null, function* () { - if (this.directory.startsWith(newDirectory)) { - return; - } - let newPath = `${newDirectory}/${this.filename}`; - if (this.path === newPath) { - return; - } - if (this.vault.getAbstractFileByPath(newPath)) { - throw new FCError("Multiple events with the same name on the same date are not yet supported. Please rename your event before moving it."); - } - const file = this.file; - yield this.vault.rename(file, newPath); - this.directory = newDirectory; - }); - } - setData(data) { - return __async(this, null, function* () { - let file = this.file; - let newFilename = `${basenameFromEvent(data)}.md`; - if (this.filename !== newFilename && this.vault.getAbstractFileByPath(`${file.parent.path}/${newFilename}`)) { - throw new FCError("Multiple events with the same name on the same date are not yet supported. Please rename your event before moving it."); - } - yield modifyFrontmatter(this.vault, file, data); - if (this.filename !== newFilename) { - this.filename = newFilename; - yield this.vault.rename(file, this.path); - } - this._data = data; - }); - } -}; -var NoteEvent = _NoteEvent; -NoteEvent.ID_PREFIX = "note"; - -// src/models/ICSEvent.ts -var _ICSEvent = class extends CalendarEvent { - constructor(cache, vault, data, id) { - super(cache, vault, data); - this.id = id; - } - get PREFIX() { - return _ICSEvent.ID_PREFIX; - } - get identifier() { - return this.id; - } -}; -var ICSEvent = _ICSEvent; -ICSEvent.ID_PREFIX = "ics"; - -// src/models/CalDAVEvent.ts -var _CalDAVEvent = class extends CalendarEvent { - constructor(cache, vault, data, id) { - super(cache, vault, data); - this.id = id; - } - get PREFIX() { - return _CalDAVEvent.ID_PREFIX; - } - get identifier() { - return this.id; - } -}; -var CalDAVEvent = _CalDAVEvent; -CalDAVEvent.ID_PREFIX = "caldav"; - -// src/models/DailyNoteEvent.ts -var import_moment = __toModule(require_moment()); -var import_obsidian4 = __toModule(require("obsidian")); -var import_obsidian_daily_notes_interface2 = __toModule(require_main()); - -// src/serialization/inline.ts -var parseBool = (s4) => s4 === "true" ? true : s4 === "false" ? false : s4; -var fieldRegex = /\[([^\]]+):: ?([^\]]+)\]/g; -function getInlineAttributes(s4) { - return Object.fromEntries(Array.from(s4.matchAll(fieldRegex)).map((m3) => [m3[1], parseBool(m3[2])])); -} -var getHeadingPosition = (headingText, metadata, endOfDoc) => { - if (!metadata.headings) { - return null; - } - let level = null; - let startingPos = null; - let endingPos = null; - for (const heading of metadata.headings) { - if (!level && heading.heading === headingText) { - level = heading.level; - startingPos = heading.position; - } else if (level && heading.level <= level) { - endingPos = heading.position; - break; - } - } - if (!level || !startingPos) { - return null; - } - return { start: startingPos.end, end: (endingPos == null ? void 0 : endingPos.start) || endOfDoc }; -}; -var getListsUnderHeading = (headingText, metadata) => { - var _a, _b, _c; - if (!metadata.listItems) { - return []; - } - const endOfDoc = (_b = (_a = metadata.sections) == null ? void 0 : _a.last()) == null ? void 0 : _b.position.end; - if (!endOfDoc) { - return []; - } - const headingPos = getHeadingPosition(headingText, metadata, endOfDoc); - if (!headingPos) { - return []; - } - return (_c = metadata.listItems) == null ? void 0 : _c.filter((l4) => headingPos.start.offset < l4.position.start.offset && l4.position.end.offset <= headingPos.end.offset); -}; -var listRegex = /^(\s*)\-\s+(\[(.)\]\s+)?/; -var checkboxRegex = /^\s*\-\s+\[(.)\]\s+/; -var checkboxTodo = (s4) => { - const match2 = s4.match(checkboxRegex); - if (!match2 || !match2[1]) { - return null; - } - return match2[1] === " " ? false : match2[1]; -}; -var getInlineEventFromLine = (text, globalAttrs) => { - const attrs = getInlineAttributes(text); - if (Object.keys(attrs).length === 0) { - return null; - } - return validateEvent(__spreadValues(__spreadValues({ - title: text.replace(listRegex, "").replace(fieldRegex, "").trim(), - completed: checkboxTodo(text) - }, globalAttrs), attrs)); -}; -function getAllInlineEventsFromFile(fileText, listItems, fileGlobalAttrs) { - const lines = fileText.split("\n"); - const listItemText = listItems.map((i3) => i3.position.start.line).map((idx) => ({ lineNumber: idx, text: lines[idx] })); - return listItemText.map((l4) => ({ - lineNumber: l4.lineNumber, - event: getInlineEventFromLine(l4.text, __spreadProps(__spreadValues({}, fileGlobalAttrs), { - type: "single" - })) - })).flatMap(({ event, lineNumber }) => event ? [{ event, lineNumber }] : []); -} -function withFile(vault, file, processText) { - return (params) => __async(this, null, function* () { - const modifiedFile = processText(yield vault.read(file), params); - if (!modifiedFile) { - return; - } - return vault.modify(file, modifiedFile); - }); +function newFrontmatter(fields) { + return "---\n" + Object.entries(fields).filter(([_3, v3]) => v3 !== void 0).map(([k3, v3]) => stringifyYamlLine(k3, v3)).join("\n") + "\n---\n"; } -var generateInlineAttributes = (attrs) => { - return Object.entries(attrs).map(([k3, v3]) => `[${k3}:: ${v3}]`).join(" "); -}; -var makeListItem = (data, whitespacePrefix = "") => { - const { completed, title } = data; - const checkbox = (() => { - if (completed !== null && completed !== void 0) { - return `[${completed ? "x" : " "}]`; - } - return null; - })(); - const attrs = __spreadValues({}, data); - delete attrs["completed"]; - delete attrs["title"]; - delete attrs["type"]; - delete attrs["date"]; - for (const key of Object.keys(attrs)) { - if (attrs[key] === void 0 || attrs[key] === null) { - delete attrs[key]; - } - } - if (!attrs["allDay"]) { - delete attrs["allDay"]; - } - return `${whitespacePrefix}- ${checkbox || ""} ${title} ${generateInlineAttributes(attrs)}`; -}; -var modifyListItem = (page, { lineNumber, data }) => { - let lines = page.split("\n"); - let line = lines[lineNumber]; - const listMatch = line.match(listRegex); - if (!listMatch) { - console.warn("Tried modifying a list item with a position that wasn't a list item", { lineNumber, line }); - return null; - } - lines[lineNumber] = makeListItem(data, listMatch[1]); - return lines.join("\n"); -}; -var addToHeading = (page, { heading, item, headingText }) => { - let lines = page.split("\n"); - const listItem = makeListItem(item); - if (heading) { - const headingLine = heading.position.start.line; - lines.splice(headingLine + 1, 0, listItem); +function modifyFrontmatterString(page, modifications) { + var _a; + const frontmatter = (_a = extractFrontmatter(page)) == null ? void 0 : _a.split("\n"); + let newFrontmatter2 = []; + if (!frontmatter) { + newFrontmatter2 = Object.entries(modifications).filter(([k3, v3]) => v3 !== void 0).map(([k3, v3]) => stringifyYamlLine(k3, v3)); + page = "\n" + page; } else { - lines.push(`## ${headingText}`); - lines.push(listItem); - } - return lines.join("\n"); -}; - -// src/models/DailyNoteSource.ts -var import_obsidian_daily_notes_interface = __toModule(require_main()); - -// src/models/EventSource.ts -var EventSource = class { -}; - -// src/models/DailyNoteSource.ts -var DATE_FORMAT = "YYYY-MM-DD"; -var DailyNoteSource = class extends EventSource { - constructor(vault, cache, info) { - super(); - this.vault = vault; - this.cache = cache; - this.info = info; - } - getAllEventDataFromFile(f3) { - return __async(this, null, function* () { - var _a; - const fileDate = (_a = (0, import_obsidian_daily_notes_interface.getDateFromPath)(f3.path, "day")) == null ? void 0 : _a.format(DATE_FORMAT); - if (!fileDate) { - return null; - } - const cache = this.cache.getFileCache(f3); - if (!cache) { - return null; - } - const listItems = getListsUnderHeading(this.info.heading, cache); - const text = yield this.vault.cachedRead(f3); - return getAllInlineEventsFromFile(text, listItems, { - date: fileDate - }); - }); - } - getAllEventsFromFile(f3) { - return __async(this, null, function* () { - var _a; - let i3 = 0; - return (_a = yield this.getAllEventDataFromFile(f3)) == null ? void 0 : _a.map(({ event, lineNumber }) => { - const evt = toEventInput(`dailynote::${f3.path}::${i3}`, event); - if (evt) { - ++i3; - evt.extendedProps = __spreadProps(__spreadValues({}, evt.extendedProps || {}), { - lineNumber - }); - } - return evt; - }); - }); - } - toApi() { - return __async(this, null, function* () { - if (!(0, import_obsidian_daily_notes_interface.appHasDailyNotesPluginLoaded)()) { - console.warn("Daily note calendar can't be loaded without daily notes plugin."); - return new FCError("Daily note calendar cannot be loaded without daily notes plugin."); - } - const notes = (0, import_obsidian_daily_notes_interface.getAllDailyNotes)(); - const events = (yield Promise.all(Object.values(notes).map((f3) => this.getAllEventsFromFile(f3)))).flat().flatMap((e3) => e3 ? [e3] : []); - return __spreadValues({ - events - }, getColors(this.info.color)); - }); - } -}; - -// src/models/DailyNoteEvent.ts -var _DailyNoteEvent = class extends LocalEvent { - constructor(cache, vault, data, { - directory, - filename, - heading, - lineNumber - }) { - super(cache, vault, data, directory, filename); - this.lineNumber = lineNumber; - this.heading = heading; - } - openIn(leaf, workspace) { - return __async(this, null, function* () { - if (leaf.getViewState().pinned) { - leaf = workspace.getLeaf("tab"); - } - yield leaf.openFile(this.file); - if (leaf.view instanceof import_obsidian4.MarkdownView) { - leaf.view.editor.setCursor({ - line: this.lineNumber, - ch: 0 - }); - } - }); - } - static fromFile(cache, vault, file, lineNumber, heading) { - return __async(this, null, function* () { - var _a; - const contents = yield vault.read(file); - const lines = contents.split("\n"); - const line = lines[lineNumber]; - const date = (_a = (0, import_obsidian_daily_notes_interface2.getDateFromPath)(file.path, "day")) == null ? void 0 : _a.format(DATE_FORMAT); - if (!date) { - return null; - } - const event = getInlineEventFromLine(line, { date }); - if (!event) { - return null; - } - return new _DailyNoteEvent(cache, vault, event, { - directory: file.parent.path, - filename: file.name, - lineNumber, - heading - }); - }); - } - static fromPath(cache, vault, path, lineNumber, heading) { - return __async(this, null, function* () { - const file = vault.getAbstractFileByPath(path); - if (!(file instanceof import_obsidian4.TFile)) { - throw new FCError(`File not found at path: ${path}`); - } - return this.fromFile(cache, vault, file, lineNumber, heading); - }); - } - get path() { - return `${this.directory}/${this.filename}`; - } - static create(cache, vault, heading, data) { - return __async(this, null, function* () { - var _a, _b; - if (data.type === "recurring") { - return null; - } - const m3 = (0, import_moment.default)(data.date); - let file = (0, import_obsidian_daily_notes_interface2.getDailyNote)(m3, (0, import_obsidian_daily_notes_interface2.getAllDailyNotes)()); - if (!file) { - file = yield (0, import_obsidian_daily_notes_interface2.createDailyNote)(m3); - } - yield vault.cachedRead(file); - const headingCache = (_b = (_a = cache.getFileCache(file)) == null ? void 0 : _a.headings) == null ? void 0 : _b.find((h3) => h3.heading == heading); - let contents = yield vault.read(file); - contents = addToHeading(contents, { - heading: headingCache, - item: data, - headingText: heading - }); - yield vault.modify(file, contents); - }); - } - setData(newData) { - return __async(this, null, function* () { - const oldData = this.data; - if (newData.type === "recurring" || oldData.type === "recurring") { - throw new Error("Recurring events in daily notes are not supported."); + const linesAdded = new Set(); + for (let i3 = 0; i3 < frontmatter.length; i3++) { + const line = frontmatter[i3]; + const obj = (0, import_obsidian8.parseYaml)(line); + if (!obj) { + continue; } - if (newData.endDate || oldData.endDate) { - throw new Error("Multi-day events in daily notes are not supported."); + const keys = Object.keys(obj); + if (keys.length !== 1) { + throw new Error("One YAML line parsed to multiple keys."); } - this._data = newData; - if (newData.date !== oldData.date) { - const m3 = (0, import_moment.default)(newData.date); - let note = (0, import_obsidian_daily_notes_interface2.getDailyNote)(m3, (0, import_obsidian_daily_notes_interface2.getAllDailyNotes)()); - if (!note) { - note = yield (0, import_obsidian_daily_notes_interface2.createDailyNote)(m3); - } - yield this.removeFromFile(); - yield this.addToFile(note); + const key = keys[0]; + linesAdded.add(key); + const newVal = modifications[key]; + if (newVal !== void 0) { + newFrontmatter2.push(stringifyYamlLine(key, newVal)); } else { - yield withFile(this.vault, this.file, modifyListItem)({ lineNumber: this.lineNumber, data: newData }); - } - }); - } - removeFromFile() { - return __async(this, null, function* () { - const file = this.file; - let lines = (yield this.vault.read(file)).split("\n"); - lines.splice(this.lineNumber, 1); - yield this.vault.modify(file, lines.join("\n")); - this.lineNumber = -1; - }); - } - addToFile(file) { - return __async(this, null, function* () { - var _a, _b; - const heading = (_b = (_a = this.cache.getFileCache(file)) == null ? void 0 : _a.headings) == null ? void 0 : _b.find((h3) => h3.heading == this.heading); - if (this.data.type !== "single") { - throw new FCError("Daily note calendar does not support recurring events."); - } - yield withFile(this.vault, file, addToHeading)({ heading, item: this.data, headingText: this.heading }); - this.directory = file.parent.path; - this.filename = file.name; - }); - } - delete() { - return __async(this, null, function* () { - this.removeFromFile(); - }); - } - get identifier() { - return `${this.path}${CalendarEvent.ID_SEPARATOR}${this.lineNumber}`; - } - get PREFIX() { - return _DailyNoteEvent.ID_PREFIX; - } -}; -var DailyNoteEvent = _DailyNoteEvent; -DailyNoteEvent.ID_PREFIX = "dailynote"; - -// src/models/index.ts -function eventFromApi(cache, vault, settings, event) { - return __async(this, null, function* () { - const [prefix, ...rest] = event.id.split(CalendarEvent.ID_SEPARATOR); - switch (prefix) { - case ICSEvent.ID_PREFIX: - case CalDAVEvent.ID_PREFIX: - throw new FCError("Cannot create instance of ICS event given its ID."); - case NoteEvent.ID_PREFIX: { - const path = rest.join(CalendarEvent.ID_SEPARATOR); - return NoteEvent.fromPath(cache, vault, path); - } - case DailyNoteEvent.ID_PREFIX: { - const [path, idx] = rest; - const { lineNumber } = event.extendedProps; - const dailyNoteCal = settings.calendarSources.flatMap((c3) => c3.type === "dailynote" ? [c3] : [])[0]; - if (!dailyNoteCal) { - throw new FCError("Daily note calendar not loaded."); - } - return DailyNoteEvent.fromPath(cache, vault, path, lineNumber, dailyNoteCal.heading); + newFrontmatter2.push(line); } } - }); -} - -// src/ui/modal.ts -var import_obsidian_daily_notes_interface3 = __toModule(require_main()); -var EventModal = class extends import_obsidian5.Modal { - constructor(app, plugin, calendar, event) { - super(app); - this.plugin = plugin; - this.data = event; - this.calendar = calendar; - } - editInModal(input) { - return __async(this, null, function* () { - let frontmatter = null; - if (input instanceof EventApi) { - const event = yield eventFromApi(this.app.metadataCache, this.app.vault, this.plugin.settings, input); - if (event) { - this.data = event.data; - this.event = event; - this.open(); - } else { - new import_obsidian5.Notice("Full Calendar: Selected event cannot be edited."); - console.warn("Full Calendar: Selected event cannot be edited.", input); - } - } else if (input instanceof import_obsidian5.TFile) { - const e3 = NoteEvent.fromFile(this.app.metadataCache, this.app.vault, input); - frontmatter = e3 == null ? void 0 : e3.data; - this.file = input; - this.data = frontmatter || { title: input.basename }; - this.event = e3 || void 0; - this.open(); - } - }); + newFrontmatter2.push(...Object.keys(modifications).filter((k3) => !linesAdded.has(k3)).filter((k3) => modifications[k3] !== void 0).map((k3) => stringifyYamlLine(k3, modifications[k3]))); } - onOpen() { - return __async(this, null, function* () { - const { contentEl } = this; - yield this.plugin.loadSettings(); - const calIdx = (() => { - const event = this.event; - if (!event) { - return null; - } - if (!(event instanceof LocalEvent)) { - return null; - } - return this.plugin.settings.calendarSources.flatMap((c3) => c3.type == "local" || c3.type == "dailynote" ? [c3] : []).findIndex((c3) => event.directory.startsWith(c3.type === "local" ? c3.directory : (0, import_obsidian_daily_notes_interface3.getDailyNoteSettings)().folder || "::UNMATCHABLE::")); - })(); - ReactDOM.render(React2.createElement(EditEvent, { - initialEvent: this.data, - submit: (data, calendarIndex) => __async(this, null, function* () { - const source = this.plugin.settings.calendarSources.flatMap((s4) => s4.type === "local" || s4.type === "dailynote" ? [s4] : [])[calendarIndex]; - try { - if (!this.event) { - if (source.type === "local") { - const directory = source.directory; - if (this.file) { - NoteEvent.upgrade(this.app.metadataCache, this.app.vault, this.file, data); - } else { - NoteEvent.create(this.app.metadataCache, this.app.vault, directory, data); - } - } else if (source.type === "dailynote") { - DailyNoteEvent.create(this.app.metadataCache, this.app.vault, source.heading, data); - } - } else { - if (this.event instanceof EditableEvent) { - yield this.event.setData(data); - if (source.type === "local" && this.event instanceof NoteEvent) { - yield this.event.setDirectory(source.directory); - } - } - } - } catch (e3) { - new import_obsidian5.Notice(e3.message); - } finally { - this.close(); - } - }), - defaultCalendarIndex: calIdx || this.plugin.settings.defaultCalendar, - calendars: this.plugin.settings.calendarSources, - open: this.event instanceof LocalEvent ? () => __async(this, null, function* () { - if (this.event instanceof LocalEvent) { - let leaf = this.app.workspace.getMostRecentLeaf(); - if (leaf) { - yield this.event.openIn(leaf, this.app.workspace); - this.close(); - } - } - }) : void 0, - deleteEvent: this.event instanceof LocalEvent ? () => __async(this, null, function* () { - if (this.event instanceof LocalEvent) { - yield this.event.delete(); - this.close(); - } - }) : void 0 - }), contentEl); - }); - } - onClose() { - const { contentEl } = this; - ReactDOM.unmountComponentAtNode(contentEl); - } -}; -var ReactModal = class extends import_obsidian5.Modal { - constructor(app, onOpenCallback) { - super(app); - this.onOpenCallback = onOpenCallback; - } - onOpen() { - return __async(this, null, function* () { - const { contentEl } = this; - ReactDOM.render(yield this.onOpenCallback(), contentEl); - }); - } - onClose() { - const { contentEl } = this; - ReactDOM.unmountComponentAtNode(contentEl); - } -}; - -// src/models/IcsSource.ts -var import_obsidian6 = __toModule(require("obsidian")); + return replaceFrontmatter(page, newFrontmatter2.join("\n") + "\n"); +} -// vendor/fullcalendar-ical/ical-expander/IcalExpander.js -var ICAL2 = __toModule(require_ical()); -var IcalExpander2 = class { - constructor(opts) { - this.maxIterations = opts.maxIterations != null ? opts.maxIterations : 1e3; - this.skipInvalidDates = opts.skipInvalidDates != null ? opts.skipInvalidDates : false; - this.jCalData = ICAL2.parse(opts.ics); - this.component = new ICAL2.Component(this.jCalData); - this.events = this.component.getAllSubcomponents("vevent").map((vevent) => new ICAL2.Event(vevent)); - if (this.skipInvalidDates) { - this.events = this.events.filter((evt) => { - try { - evt.startDate.toJSDate(); - evt.endDate.toJSDate(); - return true; - } catch (err) { - return false; - } - }); - } - } - between(after, before) { - function isEventWithinRange(startTime, endTime) { - return (!after || endTime >= after.getTime()) && (!before || startTime <= before.getTime()); - } - function getTimes(eventOrOccurrence) { - const startTime = eventOrOccurrence.startDate.toJSDate().getTime(); - let endTime = eventOrOccurrence.endDate.toJSDate().getTime(); - if (eventOrOccurrence.endDate.isDate && endTime > startTime) { - endTime -= 1; - } - return { startTime, endTime }; - } - const exceptions = []; - this.events.forEach((event) => { - if (event.isRecurrenceException()) - exceptions.push(event); - }); - const ret = { - events: [], - occurrences: [] - }; - this.events.filter((e3) => !e3.isRecurrenceException()).forEach((event) => { - const exdates = []; - event.component.getAllProperties("exdate").forEach((exdateProp) => { - const exdate = exdateProp.getFirstValue(); - exdates.push(exdate.toJSDate().getTime()); - }); - if (event.isRecurring()) { - const iterator = event.iterator(); - let next; - let i3 = 0; - do { - i3 += 1; - next = iterator.next(); - if (next) { - const occurrence = event.getOccurrenceDetails(next); - const { startTime: startTime2, endTime: endTime2 } = getTimes(occurrence); - const isOccurrenceExcluded = exdates.indexOf(startTime2) !== -1; - const exception = exceptions.find((ex) => ex.uid === event.uid && ex.recurrenceId.toJSDate().getTime() === occurrence.startDate.toJSDate().getTime()); - if (before && startTime2 > before.getTime()) - break; - if (isEventWithinRange(startTime2, endTime2)) { - if (exception) { - ret.events.push(exception); - } else if (!isOccurrenceExcluded) { - ret.occurrences.push(occurrence); - } - } - } - } while (next && (!this.maxIterations || i3 < this.maxIterations)); - return; - } - const { startTime, endTime } = getTimes(event); - if (isEventWithinRange(startTime, endTime)) - ret.events.push(event); - }); - return ret; - } - before(before) { - return this.between(void 0, before); - } - after(after) { - return this.between(after); - } - all() { - return this.between(); +// src/calendars/FullNoteCalendar.ts +var basenameFromEvent = (event) => { + switch (event.type) { + case void 0: + case "single": + return `${event.date} ${event.title}`; + case "recurring": + return `(Every ${event.daysOfWeek.join(",")}) ${event.title}`; + case "rrule": + return `(${rrulestr(event.rrule).toText()}) ${event.title}`; } }; - -// vendor/fullcalendar-ical/icalendar.ts -function makeICalExpander(text) { - return new IcalExpander2({ - ics: text, - skipInvalidDates: true - }); -} -function expandICalEvents2(iCalExpander, range) { - let rangeStart = addDays(range.start, -1); - let rangeEnd = addDays(range.end, 1); - let iCalRes = iCalExpander.between(rangeStart, rangeEnd); - let expanded = []; - for (let iCalEvent of iCalRes.events) { - expanded.push(__spreadProps(__spreadValues({}, buildNonDateProps2(iCalEvent)), { - start: iCalEvent.startDate.toString(), - end: specifiesEnd2(iCalEvent) && iCalEvent.endDate ? iCalEvent.endDate.toString() : null - })); +var filenameForEvent = (event) => `${basenameFromEvent(event)}.md`; +var FullNoteCalendar = class extends EditableCalendar { + constructor(app, color, directory) { + super(color); + this.app = app; + this._directory = directory; } - for (let iCalOccurence of iCalRes.occurrences) { - let iCalEvent = iCalOccurence.item; - expanded.push(__spreadProps(__spreadValues({}, buildNonDateProps2(iCalEvent)), { - start: iCalOccurence.startDate.toString(), - end: specifiesEnd2(iCalEvent) && iCalOccurence.endDate ? iCalOccurence.endDate.toString() : null - })); + get directory() { + return this._directory; } - return expanded; -} -function buildNonDateProps2(iCalEvent) { - return { - title: iCalEvent.summary, - url: extractEventUrl2(iCalEvent), - extendedProps: { - location: iCalEvent.location, - organizer: iCalEvent.organizer, - description: iCalEvent.description - } - }; -} -function extractEventUrl2(iCalEvent) { - let urlProp = iCalEvent.component.getFirstProperty("url"); - return urlProp ? urlProp.getFirstValue() : ""; -} -function specifiesEnd2(iCalEvent) { - return Boolean(iCalEvent.component.getFirstProperty("dtend")) || Boolean(iCalEvent.component.getFirstProperty("duration")); -} - -// src/models/IcsSource.ts -var IcsSource = class extends EventSource { - constructor(info) { - super(); - this.info = info; + get type() { + return "local"; } - toApi() { + get identifier() { + return this.directory; + } + get name() { + return this.directory; + } + getEventsInFile(file) { return __async(this, null, function* () { - let url = this.info.url; - if (url.startsWith("webcal")) { - url = "https" + url.slice("webcal".length); + const metadata = this.app.getMetadata(file); + let event = validateEvent2(metadata == null ? void 0 : metadata.frontmatter); + if (!event) { + return []; } - let expander = null; - const getExpander = () => __async(this, null, function* () { - if (expander !== null) { - return expander; - } - try { - let text = yield (0, import_obsidian6.request)({ - url, - method: "GET" - }); - expander = makeICalExpander(text); - return expander; - } catch (e3) { - console.error(`Error loading calendar from ${url}`); - console.error(e3); - return new FCError(`There was an error loading a calendar. Check the console for full details.`); - } - }); - return __spreadValues({ - events: function(_0) { - return __async(this, arguments, function* ({ start, end }) { - const ical = yield getExpander(); - if (ical instanceof FCError) { - throw new Error("Could not get calendar: " + ical.message); - } - const events = expandICalEvents2(ical, { - start, - end - }); - return events; - }); - }, - editable: false - }, getColors(this.info.color)); + if (!event.title) { + event.title = file.basename; + } + return [[event, { file, lineNumber: void 0 }]]; }); } -}; - -// src/models/NoteSource.ts -var import_obsidian7 = __toModule(require("obsidian")); -var NoteSource = class extends EventSource { - constructor(vault, cache, info) { - super(); - this.vault = vault; - this.cache = cache; - this.info = info; + getEventsInFolderRecursive(folder) { + return __async(this, null, function* () { + const events = yield Promise.all(folder.children.map((file) => __async(this, null, function* () { + if (file instanceof import_obsidian9.TFile) { + return yield this.getEventsInFile(file); + } else if (file instanceof import_obsidian9.TFolder) { + return yield this.getEventsInFolderRecursive(file); + } else { + return []; + } + }))); + return events.flat(); + }); } - getEventInputsFromPath(recursive, path) { + getEvents() { return __async(this, null, function* () { - const eventFolder = this.vault.getAbstractFileByPath(path || this.info.directory); - if (!(eventFolder instanceof import_obsidian7.TFolder)) { - return new FCError("Directory"); - } - let events = []; - for (let file of eventFolder.children) { - if (file instanceof import_obsidian7.TFile) { - let event = NoteEvent.fromFile(this.cache, this.vault, file); - if (event) { - let calEvent = event.toCalendarEvent(); - if (calEvent) { - events.push(calEvent); - } else { - console.error("FC: Event malformed, will not add to calendar.", event); - } - } - } else if (recursive) { - const childEvents = yield this.getEventInputsFromPath(recursive, file.path); - if (childEvents instanceof FCError) { - return childEvents; - } - events.push(...childEvents); + const eventFolder = this.app.getAbstractFileByPath(this.directory); + if (!eventFolder) { + throw new Error(`Cannot get folder ${this.directory}`); + } + if (!(eventFolder instanceof import_obsidian9.TFolder)) { + throw new Error(`${eventFolder} is not a directory.`); + } + const events = []; + for (const file of eventFolder.children) { + if (file instanceof import_obsidian9.TFile) { + const results = yield this.getEventsInFile(file); + events.push(...results); } } return events; }); } - toApi(recursive = false) { + createEvent(event) { return __async(this, null, function* () { - const events = yield this.getEventInputsFromPath(recursive); - if (events instanceof FCError) { - return events; + const path = `${this.directory}/${filenameForEvent(event)}`; + if (this.app.getAbstractFileByPath(path)) { + throw new Error(`Event at ${path} already exists.`); } - return __spreadValues({ - events - }, getColors(this.info.color)); + const file = yield this.app.create(path, newFrontmatter(event)); + return { file, lineNumber: void 0 }; }); } -}; - -// src/models/RemoteSource.ts -var import_color = __toModule(require_color()); -var dav = __toModule(require_dav()); - -// src/caldav/transport.ts -var import_co = __toModule(require_co()); -var import_dav = __toModule(require_dav()); -var import_obsidian8 = __toModule(require("obsidian")); -var RequestBridge = class { - constructor(credentials) { - this.headers = {}; - if (credentials) { - this.setRequestHeader("Authorization", "Basic " + this.encode(credentials)); + getNewLocation(location, event) { + const { path, lineNumber } = location; + if (lineNumber !== void 0) { + throw new Error("Note calendar cannot handle inline events."); } - } - encode(credentials) { - return window.btoa(credentials.username + ":" + credentials.password); - } - setRequestHeader(header, value) { - if (header.toLowerCase() == "content-type") { - this.contentType = value.toString(); - } else { - this.headers[header] = value.toString(); + const file = this.app.getFileByPath(path); + if (!file) { + throw new Error(`File ${path} either doesn't exist or is a folder.`); } + const updatedPath = `${file.parent.path}/${filenameForEvent(event)}`; + return { file: { path: updatedPath }, lineNumber: void 0 }; } -}; -var Basic = class extends import_dav.transport.Transport { - constructor(credentials) { - super(credentials); - } - send(request3, url, options) { - return (0, import_co.co)(function* () { - let sandbox = options && options.sandbox; - let transformRequest = request3.transformRequest; - let transformResponse = request3.transformResponse; - let onerror = request3.onerror; - let requestBridge = new RequestBridge(this.credentials); - if (sandbox) - sandbox.add(requestBridge); - if (transformRequest) - transformRequest(requestBridge); - let result; - try { - let response = (0, import_obsidian8.request)({ - url, - method: request3.method, - contentType: requestBridge.contentType, - body: request3.requestData, - headers: requestBridge.headers - }); - requestBridge.responseText = yield Promise.resolve(response); - result = transformResponse ? transformResponse(requestBridge) : requestBridge.responseText; - } catch (error) { - if (onerror) - onerror(error); - throw error; - } - return result; - }.bind(this)); - } -}; - -// src/models/RemoteSource.ts -var RemoteSource = class extends EventSource { - constructor(info) { - super(); - this.info = info; - } - importCalendars() { + modifyEvent(location, event, updateCacheWithLocation) { return __async(this, null, function* () { - try { - let xhr = new Basic(new dav.Credentials({ - username: this.info.username, - password: this.info.password - })); - let account = yield dav.createAccount({ - xhr, - server: this.info.url, - loadObjects: false, - loadCollections: true - }); - let colorRequest = dav.request.propfind({ - props: [ - { name: "calendar-color", namespace: dav.ns.CALDAV_APPLE } - ], - depth: "0" - }); - return (yield Promise.all(account.calendars.map((calendar) => __async(this, null, function* () { - var _a; - if (!calendar.components.includes("VEVENT")) { - return null; - } - let colorResponse = yield xhr.send(colorRequest, calendar.url); - let color = (_a = colorResponse[0].props) == null ? void 0 : _a.calendarColor; - return __spreadProps(__spreadValues({}, this.info), { - type: "caldav", - name: calendar.displayName, - homeUrl: calendar.url, - color: color ? (0, import_color.default)(color).hex() : this.info.color - }); - })))).filter((source) => source != null); - } catch (e3) { - console.error(`Error importing calendars from ${this.info.url}`); - console.error(e3); - return new FCError(`There was an error loading a calendar. Check the console for full details.`); + const { path } = location; + const file = this.app.getFileByPath(path); + if (!file) { + throw new Error(`File ${path} either doesn't exist or is a folder.`); + } + const newLocation = this.getNewLocation(location, event); + updateCacheWithLocation(newLocation); + if (file.path !== newLocation.file.path) { + yield this.app.rename(file, newLocation.file.path); } + yield this.app.rewrite(file, (page) => modifyFrontmatterString(page, event)); + return; }); } - toApi() { + move(fromLocation, toCalendar, updateCacheWithLocation) { return __async(this, null, function* () { - let expanders = []; - const getExpanders = () => __async(this, null, function* () { - if (expanders.length) { - return expanders; - } - try { - let xhr = new Basic(new dav.Credentials({ - username: this.info.username, - password: this.info.password - })); - let account = yield dav.createAccount({ - xhr, - server: this.info.url - }); - let calendar = account.calendars.find((calendar2) => calendar2.url === this.info.homeUrl); - if (!calendar) { - return [ - new FCError(`There was an error loading a calendar event. Check the console for full details.`) - ]; - } - let events = yield dav.listCalendarObjects(calendar, { - xhr - }); - expanders = events.map((vevent) => { - try { - return (vevent == null ? void 0 : vevent.calendarData) ? makeICalExpander(vevent.calendarData) : null; - } catch (e3) { - console.error("Unable to parse calendar"); - console.error(e3); - new FCError(`There was an error loading a calendar event. Check the console for full details.`); - } - }).filter((expander) => !!expander); - return expanders; - } catch (e3) { - console.error(`Error loading calendar from ${this.info.url}`); - console.error(e3); - return [ - new FCError(`There was an error loading a calendar. Check the console for full details.`) - ]; - } + const { path, lineNumber } = fromLocation; + if (lineNumber !== void 0) { + throw new Error("Note calendar cannot handle inline events."); + } + if (!(toCalendar instanceof FullNoteCalendar)) { + throw new Error(`Event cannot be moved to a note calendar from a calendar of type ${toCalendar.type}.`); + } + const file = this.app.getFileByPath(path); + if (!file) { + throw new Error(`File ${path} not found.`); + } + const destDir = toCalendar.directory; + const newPath = `${destDir}/${file.name}`; + updateCacheWithLocation({ + file: { path: newPath }, + lineNumber: void 0 }); - return __spreadValues({ - events: function(_0) { - return __async(this, arguments, function* ({ start, end }) { - const icals = yield getExpanders(); - const events = icals.flatMap((ical) => { - if (ical instanceof FCError) { - console.error("Unable to parse calendar"); - console.error(ical); - return null; - } else { - return expandICalEvents2(ical, { - start, - end - }); - } - }).filter((e3) => !!e3); - return events; - }); - }, - editable: false - }, getColors(this.info.color)); + yield this.app.rename(file, newPath); }); } -}; - -// src/ui/settings.ts -var import_obsidian10 = __toModule(require("obsidian")); - -// src/ui/components/CalendarSetting.tsx -var import_obsidian9 = __toModule(require("obsidian")); -var React3 = __toModule(require_react()); -function DirectorySetting({ - source -}) { - let sourceWithDirectory = source; - return /* @__PURE__ */ React3.createElement("div", { - className: "setting-item-control" - }, /* @__PURE__ */ React3.createElement("input", { - disabled: true, - type: "text", - value: sourceWithDirectory.directory, - style: { - width: "100%", - marginLeft: 4, - marginRight: 4 - } - })); -} -function HeadingSetting({ - source -}) { - let sourceWithHeading = source; - return /* @__PURE__ */ React3.createElement("div", { - className: "setting-item-control", - style: { display: "block", textAlign: "center" } - }, /* @__PURE__ */ React3.createElement("span", null, "Under heading"), " ", /* @__PURE__ */ React3.createElement("input", { - disabled: true, - type: "text", - value: sourceWithHeading.heading, - style: { - marginLeft: 4, - marginRight: 4 - } - }), " ", /* @__PURE__ */ React3.createElement("span", { - style: { paddingRight: ".5rem" } - }, "in daily notes")); -} -function UrlSetting({ - source -}) { - let sourceWithUrl = source; - return /* @__PURE__ */ React3.createElement("div", { - className: "setting-item-control" - }, /* @__PURE__ */ React3.createElement("input", { - disabled: true, - type: "text", - value: sourceWithUrl.url, - style: { - width: "100%", - marginLeft: 4, - marginRight: 4 - } - })); -} -function NameSetting({ - source -}) { - let sourceWithName = source; - return /* @__PURE__ */ React3.createElement("div", { - className: "setting-item-control" - }, /* @__PURE__ */ React3.createElement("input", { - disabled: true, - type: "text", - value: sourceWithName.name, - style: { - width: "100%", - marginLeft: 4, - marginRight: 4 + deleteEvent({ path, lineNumber }) { + if (lineNumber !== void 0) { + throw new Error("Note calendar cannot handle inline events."); } - })); -} -function Username({ - source -}) { - let sourceWithUsername = source; - return /* @__PURE__ */ React3.createElement("div", { - className: "setting-item-control" - }, /* @__PURE__ */ React3.createElement("input", { - disabled: true, - type: "text", - value: sourceWithUsername.username, - style: { - width: "100%", - marginLeft: 4, - marginRight: 4 + const file = this.app.getFileByPath(path); + if (!file) { + throw new Error(`File ${path} not found.`); } - })); -} -var CalendarSettingRow = ({ - setting, - onColorChange, - deleteCalendar -}) => { - const isCalDAV = setting.type === "caldav" || setting.type === "icloud"; - return /* @__PURE__ */ React3.createElement("div", { - className: "setting-item" - }, /* @__PURE__ */ React3.createElement("button", { - type: "button", - onClick: deleteCalendar, - style: { maxWidth: "15%" } - }, "\u2715"), setting.type === "local" ? /* @__PURE__ */ React3.createElement(DirectorySetting, { - source: setting - }) : setting.type === "dailynote" ? /* @__PURE__ */ React3.createElement(HeadingSetting, { - source: setting - }) : /* @__PURE__ */ React3.createElement(UrlSetting, { - source: setting - }), isCalDAV && /* @__PURE__ */ React3.createElement(NameSetting, { - source: setting - }), isCalDAV && /* @__PURE__ */ React3.createElement(Username, { - source: setting - }), /* @__PURE__ */ React3.createElement("input", { - style: { maxWidth: "25%", minWidth: "3rem" }, - type: "color", - value: setting.color, - onChange: (e3) => onColorChange(e3.target.value) - })); + return this.app.delete(file); + } }; -var CalendarSettings = class extends React3.Component { - constructor(props) { - super(props); - this.state = { sources: props.sources, dirty: false }; + +// src/core/EventCache.ts +var SECOND = 1e3; +var MINUTE = 60 * SECOND; +var MILLICONDS_BETWEEN_REVALIDATIONS = 5 * MINUTE; +var eventsAreDifferent = (oldEvents, newEvents) => { + oldEvents.sort((a3, b3) => a3.title.localeCompare(b3.title)); + newEvents.sort((a3, b3) => a3.title.localeCompare(b3.title)); + oldEvents = oldEvents.flatMap((e3) => validateEvent2(e3) || []); + newEvents = newEvents.flatMap((e3) => validateEvent2(e3) || []); + console.debug("comparing events", oldEvents, newEvents); + if (oldEvents.length !== newEvents.length) { + return true; } - addSource(source) { - this.setState((state, props) => ({ - sources: [...state.sources, source], - dirty: true - })); + const unmatchedEvents = oldEvents.map((e3, i3) => ({ oldEvent: e3, newEvent: newEvents[i3] })).filter(({ oldEvent, newEvent }) => !(0, import_deep_equal.default)(oldEvent, newEvent)); + if (unmatchedEvents.length > 0) { + console.debug("unmached events when comparing", unmatchedEvents); } - render() { - return /* @__PURE__ */ React3.createElement("div", { - style: { width: "100%" } - }, this.state.sources.map((s4, idx) => /* @__PURE__ */ React3.createElement(CalendarSettingRow, { - key: idx, - setting: s4, - onColorChange: (color) => this.setState((state, props) => ({ - sources: [ - ...state.sources.slice(0, idx), - __spreadProps(__spreadValues({}, state.sources[idx]), { color }), - ...state.sources.slice(idx + 1) - ], - dirty: true - })), - deleteCalendar: () => this.setState((state, props) => ({ - sources: [ - ...state.sources.slice(0, idx), - ...state.sources.slice(idx + 1) - ], - dirty: true - })) - })), /* @__PURE__ */ React3.createElement("div", { - className: "setting-item-control" - }, this.state.dirty && /* @__PURE__ */ React3.createElement("button", { - onClick: () => { - if (this.state.sources.filter((s4) => s4.type === "dailynote").length > 1) { - new import_obsidian9.Notice("Only one daily note calendar is allowed."); - return; - } - this.props.submit(this.state.sources.map((elt) => elt)); - this.setState({ dirty: false }); - }, - style: { - backgroundColor: this.state.dirty ? "var(--interactive-accent)" : void 0, - color: this.state.dirty ? "var(--text-on-accent)" : void 0 + return unmatchedEvents.length > 0; +}; +var EventCache = class { + constructor(calendarInitializers) { + this.calendarInfos = []; + this.store = new EventStore(); + this.calendars = new Map(); + this.pkCounter = 0; + this.revalidating = false; + this.updateViewCallbacks = []; + this.initialized = false; + this.lastRevalidation = 0; + this.calendarInitializers = calendarInitializers; + } + generateId() { + return `${this.pkCounter++}`; + } + reset(infos) { + this.lastRevalidation = 0; + this.initialized = false; + this.calendarInfos = infos; + this.pkCounter = 0; + this.updateViews(this.store.clear(), []); + this.calendars.clear(); + this.init(); + } + init() { + this.calendarInfos.flatMap((s4) => { + const cal = this.calendarInitializers[s4.type](s4); + return cal || []; + }).forEach((cal) => this.calendars.set(cal.id, cal)); + } + populate() { + return __async(this, null, function* () { + if (!this.initialized || this.calendars.size === 0) { + this.init(); + } + for (const calendar of this.calendars.values()) { + const results = yield calendar.getEvents(); + results.forEach(([event, location]) => this.store.add({ + calendar, + location, + id: event.id || this.generateId(), + event + })); } - }, this.state.dirty ? "Save" : "Settings Saved"))); + this.initialized = true; + this.revalidateRemoteCalendars(); + }); } -}; - -// src/ui/components/AddCalendarSource.tsx -var React4 = __toModule(require_react()); -var import_react2 = __toModule(require_react()); -function DirectorySelect({ - source, - changeListener, - directories -}) { - const dirOptions = [...directories]; - dirOptions.sort(); - let sourceWithDirectory = source; - return /* @__PURE__ */ React4.createElement("div", { - className: "setting-item" - }, /* @__PURE__ */ React4.createElement("div", { - className: "setting-item-info" - }, /* @__PURE__ */ React4.createElement("div", { - className: "setting-item-name" - }, "Directory"), /* @__PURE__ */ React4.createElement("div", { - className: "setting-item-description" - }, "Directory to store events")), /* @__PURE__ */ React4.createElement("div", { - className: "setting-item-control" - }, /* @__PURE__ */ React4.createElement("select", { - required: true, - value: sourceWithDirectory.directory || "", - onChange: changeListener((x4) => __spreadProps(__spreadValues({}, sourceWithDirectory), { - directory: x4 - })) - }, /* @__PURE__ */ React4.createElement("option", { - value: "", - disabled: true, - hidden: true - }, "Choose a directory"), dirOptions.map((o2, idx) => /* @__PURE__ */ React4.createElement("option", { - key: idx, - value: o2 - }, o2))))); -} -function ColorPicker({ - source, - changeListener -}) { - return /* @__PURE__ */ React4.createElement("div", { - className: "setting-item" - }, /* @__PURE__ */ React4.createElement("div", { - className: "setting-item-info" - }, /* @__PURE__ */ React4.createElement("div", { - className: "setting-item-name" - }, "Color"), /* @__PURE__ */ React4.createElement("div", { - className: "setting-item-description" - }, "The color of events on the calendar")), /* @__PURE__ */ React4.createElement("div", { - className: "setting-item-control" - }, /* @__PURE__ */ React4.createElement("input", { - required: true, - type: "color", - value: source.color, - style: { maxWidth: "25%", minWidth: "3rem" }, - onChange: changeListener((x4) => __spreadProps(__spreadValues({}, source), { color: x4 })) - }))); -} -function UrlInput({ - source, - changeListener -}) { - let sourceWithUrl = source; - return /* @__PURE__ */ React4.createElement("div", { - className: "setting-item" - }, /* @__PURE__ */ React4.createElement("div", { - className: "setting-item-info" - }, /* @__PURE__ */ React4.createElement("div", { - className: "setting-item-name" - }, "Url"), /* @__PURE__ */ React4.createElement("div", { - className: "setting-item-description" - }, "Url of the server")), /* @__PURE__ */ React4.createElement("div", { - className: "setting-item-control" - }, /* @__PURE__ */ React4.createElement("input", { - required: true, - type: "text", - value: sourceWithUrl.url || "", - onChange: changeListener((x4) => __spreadProps(__spreadValues({}, sourceWithUrl), { - url: x4 - })) - }))); -} -function UsernameInput({ - source, - changeListener -}) { - let sourceWithUsername = source; - return /* @__PURE__ */ React4.createElement("div", { - className: "setting-item" - }, /* @__PURE__ */ React4.createElement("div", { - className: "setting-item-info" - }, /* @__PURE__ */ React4.createElement("div", { - className: "setting-item-name" - }, "Username"), /* @__PURE__ */ React4.createElement("div", { - className: "setting-item-description" - }, "Username for the account")), /* @__PURE__ */ React4.createElement("div", { - className: "setting-item-control" - }, /* @__PURE__ */ React4.createElement("input", { - required: true, - type: "text", - value: sourceWithUsername.username || "", - onChange: changeListener((x4) => __spreadProps(__spreadValues({}, sourceWithUsername), { - username: x4 - })) - }))); -} -function HeadingInput({ - source, - changeListener, - headings -}) { - let sourceWithHeading = source; - return /* @__PURE__ */ React4.createElement("div", { - className: "setting-item" - }, /* @__PURE__ */ React4.createElement("div", { - className: "setting-item-info" - }, /* @__PURE__ */ React4.createElement("div", { - className: "setting-item-name" - }, "Heading"), /* @__PURE__ */ React4.createElement("div", { - className: "setting-item-description" - }, "Heading to store events under in the daily note.")), /* @__PURE__ */ React4.createElement("div", { - className: "setting-item-control" - }, headings.length > 0 ? /* @__PURE__ */ React4.createElement("select", { - required: true, - value: sourceWithHeading.heading || "", - onChange: changeListener((x4) => __spreadProps(__spreadValues({}, sourceWithHeading), { - heading: x4 - })) - }, /* @__PURE__ */ React4.createElement("option", { - value: "", - disabled: true, - hidden: true - }, "Choose a heading"), headings.map((o2, idx) => /* @__PURE__ */ React4.createElement("option", { - key: idx, - value: o2 - }, o2))) : /* @__PURE__ */ React4.createElement("input", { - required: true, - type: "text", - value: sourceWithHeading.heading || "", - onChange: changeListener((x4) => __spreadProps(__spreadValues({}, sourceWithHeading), { - heading: x4 - })) - }))); -} -function PasswordInput({ - source, - changeListener -}) { - let sourceWithPassword = source; - return /* @__PURE__ */ React4.createElement("div", { - className: "setting-item" - }, /* @__PURE__ */ React4.createElement("div", { - className: "setting-item-info" - }, /* @__PURE__ */ React4.createElement("div", { - className: "setting-item-name" - }, "Password"), /* @__PURE__ */ React4.createElement("div", { - className: "setting-item-description" - }, "Password for the account")), /* @__PURE__ */ React4.createElement("div", { - className: "setting-item-control" - }, /* @__PURE__ */ React4.createElement("input", { - required: true, - type: "password", - value: sourceWithPassword.password || "", - onChange: changeListener((x4) => __spreadProps(__spreadValues({}, sourceWithPassword), { - password: x4 - })) - }))); -} -var AddCalendarSource = ({ - source, - directories, - headings, - submit -}) => { - const isCalDAV = source.type === "caldav" || source.type === "icloud"; - const [setting, setSettingState] = (0, import_react2.useState)(source); - const [submitting, setSubmitingState] = (0, import_react2.useState)(false); - const [submitText, setSubmitText] = (0, import_react2.useState)(isCalDAV ? "Import Calendars" : "Add Calendar"); - function makeChangeListener2(fromString) { - return (e3) => setSettingState(fromString(e3.target.value)); + resync() { + for (const callback of this.updateViewCallbacks) { + callback({ resync: true }); + } + } + getAllEvents() { + const result = []; + const eventsByCalendar = this.store.eventsByCalendar; + for (const [calId, calendar] of this.calendars.entries()) { + const events = eventsByCalendar.get(calId) || []; + result.push({ + editable: calendar instanceof EditableCalendar, + events: events.map(({ event, id }) => ({ event, id })), + color: calendar.color, + id: calId + }); + } + return result; } - const handleSubmit = (e3) => __async(void 0, null, function* () { - e3.preventDefault(); - if (!submitting) { - setSubmitingState(true); - setSubmitText(isCalDAV ? "Importing Calendars" : "Adding Calendar"); - yield submit(setting); + isEventEditable(id) { + var _a; + const calId = (_a = this.store.getEventDetails(id)) == null ? void 0 : _a.calendarId; + if (!calId) { + return false; } - }); - return /* @__PURE__ */ React4.createElement("div", { - className: "vertical-tab-content" - }, /* @__PURE__ */ React4.createElement("form", { - onSubmit: handleSubmit - }, !isCalDAV && /* @__PURE__ */ React4.createElement(ColorPicker, { - source: setting, - changeListener: makeChangeListener2 - }), source.type === "local" && /* @__PURE__ */ React4.createElement(DirectorySelect, { - source: setting, - changeListener: makeChangeListener2, - directories - }), source.type === "dailynote" && /* @__PURE__ */ React4.createElement(HeadingInput, { - source: setting, - changeListener: makeChangeListener2, - headings - }), source.type === "gcal" || source.type === "ical" || source.type === "caldav" ? /* @__PURE__ */ React4.createElement(UrlInput, { - source: setting, - changeListener: makeChangeListener2 - }) : null, isCalDAV && /* @__PURE__ */ React4.createElement(UsernameInput, { - source: setting, - changeListener: makeChangeListener2 - }), isCalDAV && /* @__PURE__ */ React4.createElement(PasswordInput, { - source: setting, - changeListener: makeChangeListener2 - }), /* @__PURE__ */ React4.createElement("div", { - className: "setting-item" - }, /* @__PURE__ */ React4.createElement("div", { - className: "setting-item-info" - }), /* @__PURE__ */ React4.createElement("div", { - className: "setting-control" - }, /* @__PURE__ */ React4.createElement("button", { - className: "mod-cta", - type: "submit", - disabled: submitting - }, submitText))))); -}; - -// src/ui/settings.ts -var ReactDOM2 = __toModule(require_react_dom()); -var import_react3 = __toModule(require_react()); -var import_obsidian_daily_notes_interface4 = __toModule(require_main()); -var DEFAULT_SETTINGS = { - calendarSources: [], - defaultCalendar: 0, - recursiveLocal: false, - firstDay: 0, - initialView: { - desktop: "timeGridWeek", - mobile: "timeGrid3Days" - }, - timeFormat24h: false -}; -var WEEKDAYS = [ - "Sunday", - "Monday", - "Tuesday", - "Wednesday", - "Thursday", - "Friday", - "Saturday" -]; -var INITIAL_VIEW_OPTIONS = { - DESKTOP: { - timeGridDay: "Day", - timeGridWeek: "Week", - dayGridMonth: "Month", - listWeek: "List" - }, - MOBILE: { - timeGrid3Days: "3 Days", - timeGridDay: "Day", - listWeek: "List" + const cal = this.getCalendarById(calId); + return cal instanceof EditableCalendar; } -}; -function addCalendarButton(app, plugin, containerEl, submitCallback, listUsedDirectories) { - let dropdown; - const directories = app.vault.getAllLoadedFiles().filter((f3) => f3 instanceof import_obsidian10.TFolder).map((f3) => f3.path); - return new import_obsidian10.Setting(containerEl).setName("Calendars").setDesc("Add calendar").addDropdown((d2) => dropdown = d2.addOptions({ - local: "Full note", - dailynote: "Daily Note", - icloud: "iCloud", - caldav: "CalDAV", - ical: "Remote (.ics format)" - })).addExtraButton((button) => { - button.setTooltip("Add Calendar"); - button.setIcon("plus-with-circle"); - button.onClick(() => { - let modal = new ReactModal(app, () => __async(this, null, function* () { - var _a, _b; - yield plugin.loadSettings(); - const usedDirectories = (listUsedDirectories ? listUsedDirectories : () => plugin.settings.calendarSources.map((s4) => s4.type === "local" && s4.directory).filter((s4) => !!s4))(); - let headings = []; - let { template } = (0, import_obsidian_daily_notes_interface4.getDailyNoteSettings)(); - if (template) { - if (!template.endsWith(".md")) { - template += ".md"; - } - const file = app.vault.getAbstractFileByPath(template); - if (file instanceof import_obsidian10.TFile) { - headings = ((_b = (_a = app.metadataCache.getFileCache(file)) == null ? void 0 : _a.headings) == null ? void 0 : _b.map((h3) => h3.heading)) || []; - } - } - return (0, import_react3.createElement)(AddCalendarSource, { - source: makeDefaultPartialCalendarSource(dropdown.getValue()), - directories: directories.filter((dir) => usedDirectories.indexOf(dir) === -1), - headings, - submit: (source) => __async(this, null, function* () { - if (source.type === "caldav" || source.type === "icloud") { - let sources = yield new RemoteSource(source).importCalendars(); - if (sources instanceof FCError) { - new import_obsidian10.Notice(sources.message); - } else { - sources.forEach((source2) => submitCallback(source2)); - } - } else { - submitCallback(source); - } - modal.close(); - }) - }); - })); - modal.open(); - }); - }); -} -var FullCalendarSettingTab = class extends import_obsidian10.PluginSettingTab { - constructor(app, plugin) { - super(app, plugin); - this.plugin = plugin; + getEventById(s4) { + return this.store.getEventById(s4); + } + getCalendarById(c3) { + return this.calendars.get(c3); + } + getInfoForEditableEvent(eventId) { + const details = this.store.getEventDetails(eventId); + if (!details) { + throw new Error(`Event ID ${eventId} not present in event store.`); + } + const { calendarId, location } = details; + const calendar = this.calendars.get(calendarId); + if (!calendar) { + throw new Error(`Calendar ID ${calendarId} is not registered.`); + } + if (!(calendar instanceof EditableCalendar)) { + throw new Error(`Read-only events cannot be modified.`); + } + if (!location) { + throw new Error(`Event with ID ${eventId} does not have a location in the Vault.`); + } + return { calendar, location }; } - display() { + on(eventType, callback) { + switch (eventType) { + case "update": + this.updateViewCallbacks.push(callback); + break; + } + return callback; + } + off(eventType, callback) { + switch (eventType) { + case "update": + this.updateViewCallbacks.remove(callback); + break; + } + } + updateViews(toRemove, toAdd) { + const payload = { + toRemove, + toAdd + }; + for (const callback of this.updateViewCallbacks) { + callback(__spreadValues({ resync: false }, payload)); + } + } + addEvent(calendarId, event) { return __async(this, null, function* () { - const { containerEl } = this; - containerEl.empty(); - containerEl.createEl("h2", { text: "Calendar Preferences" }); - new import_obsidian10.Setting(containerEl).setName("Desktop Initial View").setDesc("Choose the initial view range on desktop devices.").addDropdown((dropdown) => { - Object.entries(INITIAL_VIEW_OPTIONS.DESKTOP).forEach(([value, display]) => { - dropdown.addOption(value, display); - }); - dropdown.setValue(this.plugin.settings.initialView.desktop); - dropdown.onChange((initialView) => __async(this, null, function* () { - this.plugin.settings.initialView.desktop = initialView; - yield this.plugin.saveSettings(); - })); + const calendar = this.calendars.get(calendarId); + if (!calendar) { + throw new Error(`Calendar ID ${calendarId} is not registered.`); + } + if (!(calendar instanceof EditableCalendar)) { + console.error(`Event cannot be added to non-editable calendar of type ${calendar.type}`); + throw new Error(`Cannot add event to a read-only calendar`); + } + const location = yield calendar.createEvent(event); + const id = this.store.add({ + calendar, + location, + id: event.id || this.generateId(), + event }); - new import_obsidian10.Setting(containerEl).setName("Mobile Initial View").setDesc("Choose the initial view range on mobile devices.").addDropdown((dropdown) => { - Object.entries(INITIAL_VIEW_OPTIONS.MOBILE).forEach(([value, display]) => { - dropdown.addOption(value, display); + this.updateViews([], [{ event, id, calendarId: calendar.id }]); + return true; + }); + } + deleteEvent(eventId) { + return __async(this, null, function* () { + const { calendar, location } = this.getInfoForEditableEvent(eventId); + this.store.delete(eventId); + yield calendar.deleteEvent(location); + this.updateViews([eventId], []); + }); + } + updateEventWithId(eventId, newEvent) { + return __async(this, null, function* () { + const { calendar, location: oldLocation } = this.getInfoForEditableEvent(eventId); + const { path, lineNumber } = oldLocation; + console.debug("updating event with ID", eventId); + yield calendar.modifyEvent({ path, lineNumber }, newEvent, (newLocation) => { + this.store.delete(eventId); + this.store.add({ + calendar, + location: newLocation, + id: eventId, + event: newEvent }); - dropdown.setValue(this.plugin.settings.initialView.mobile); - dropdown.onChange((initialView) => __async(this, null, function* () { - this.plugin.settings.initialView.mobile = initialView; - })); }); - new import_obsidian10.Setting(containerEl).setName("Starting Day of the Week").setDesc("Choose what day of the week to start.").addDropdown((dropdown) => { - WEEKDAYS.forEach((day, code) => { - dropdown.addOption(code.toString(), day); + this.updateViews([eventId], [{ id: eventId, calendarId: calendar.id, event: newEvent }]); + return true; + }); + } + processEvent(id, process2) { + const event = this.store.getEventById(id); + if (!event) { + throw new Error("Event does not exist"); + } + const newEvent = process2(event); + console.debug("process", newEvent, process2); + return this.updateEventWithId(id, newEvent); + } + moveEventToCalendar(eventId, newCalendarId) { + return __async(this, null, function* () { + const event = this.store.getEventById(eventId); + const details = this.store.getEventDetails(eventId); + if (!details || !event) { + throw new Error(`Tried moving unknown event ID ${eventId} to calendar ${newCalendarId}`); + } + const { calendarId: oldCalendarId, location } = details; + const oldCalendar = this.calendars.get(oldCalendarId); + if (!oldCalendar) { + throw new Error(`Source calendar ${oldCalendarId} did not exist.`); + } + const newCalendar = this.calendars.get(newCalendarId); + if (!newCalendar) { + throw new Error(`Source calendar ${newCalendarId} does not exist.`); + } + if (!(oldCalendar instanceof FullNoteCalendar && newCalendar instanceof FullNoteCalendar && location)) { + throw new Error(`Both calendars must be Full Note Calendars to move events between them.`); + } + yield oldCalendar.move(location, newCalendar, (newLocation) => { + this.store.delete(eventId); + this.store.add({ + calendar: newCalendar, + location: newLocation, + id: eventId, + event }); - dropdown.setValue(this.plugin.settings.firstDay.toString()); - dropdown.onChange((codeAsString) => __async(this, null, function* () { - this.plugin.settings.firstDay = Number(codeAsString); - yield this.plugin.saveSettings(); - })); }); - new import_obsidian10.Setting(containerEl).setName("24-hour format").setDesc("Display the time in a 24-hour format.").addToggle((toggle) => { - toggle.setValue(this.plugin.settings.timeFormat24h); - toggle.onChange((val) => __async(this, null, function* () { - this.plugin.settings.timeFormat24h = val; - yield this.plugin.saveSettings(); + }); + } + deleteEventsAtPath(path) { + this.updateViews([...this.store.deleteEventsAtPath(path)], []); + } + fileUpdated(file) { + return __async(this, null, function* () { + console.debug("fileUpdated() called for file", file.path); + const calendars = [...this.calendars.values()].flatMap((c3) => c3 instanceof EditableCalendar && c3.containsPath(file.path) ? c3 : []); + if (calendars.length === 0) { + return; + } + const idsToRemove = []; + const eventsToAdd = []; + for (const calendar of calendars) { + const oldEvents = this.store.getEventsInFileAndCalendar(file, calendar); + console.debug("get events in file", file.path); + const newEvents = yield calendar.getEventsInFile(file); + const oldEventsMapped = oldEvents.map(({ event }) => event); + const newEventsMapped = newEvents.map(([event, _3]) => event); + console.debug("comparing events", file.path, oldEvents, newEvents); + const eventsHaveChanged = eventsAreDifferent(oldEventsMapped, newEventsMapped); + if (!eventsHaveChanged) { + console.debug("events have not changed, do not update store or view."); + return; + } + console.debug("events have changed, updating store and views...", oldEvents, newEvents); + const newEventsWithIds = newEvents.map(([event, location]) => ({ + event, + id: event.id || this.generateId(), + location, + calendarId: calendar.id })); - }); - containerEl.createEl("h2", { text: "Events settings" }); - new import_obsidian10.Setting(containerEl).setName("Recursive event folders").setDesc("Search through sub-folders for events").addToggle((toggle) => { - toggle.setValue(this.plugin.settings.recursiveLocal); - toggle.onChange((val) => __async(this, null, function* () { - this.plugin.settings.recursiveLocal = val; - yield this.plugin.saveSettings(); + const oldIds = oldEvents.map((r3) => r3.id); + oldIds.forEach((id) => { + this.store.delete(id); + }); + newEventsWithIds.forEach(({ event, id, location }) => { + this.store.add({ + calendar, + location, + id, + event + }); + }); + idsToRemove.push(...oldIds); + eventsToAdd.push(...newEventsWithIds); + } + this.updateViews(idsToRemove, eventsToAdd); + }); + } + revalidateRemoteCalendars(force = false) { + if (this.revalidating) { + console.warn("Revalidation already in progress."); + return; + } + const now2 = Date.now(); + if (!force && now2 - this.lastRevalidation < MILLICONDS_BETWEEN_REVALIDATIONS) { + console.debug("Last revalidation was too soon."); + return; + } + this.revalidating = true; + console.warn("Revalidating remote calendars..."); + const remoteCalendars = [...this.calendars.values()].flatMap((c3) => c3 instanceof RemoteCalendar ? c3 : []); + const promises = remoteCalendars.map((calendar) => { + return calendar.revalidate().then(() => calendar.getEvents()).then((events) => { + const deletedEvents = [ + ...this.store.deleteEventsInCalendar(calendar) + ]; + const newEvents = events.map(([event, location]) => ({ + event, + id: event.id || this.generateId(), + location, + calendarId: calendar.id })); + newEvents.forEach(({ event, id, location }) => { + this.store.add({ + calendar, + location, + id, + event + }); + }); + this.updateViews(deletedEvents, newEvents); }); - containerEl.createEl("h2", { text: "Manage Calendars" }); - addCalendarButton(this.app, this.plugin, containerEl, (source) => __async(this, null, function* () { - sourceList.addSource(source); - }), () => sourceList.state.sources.map((s4) => s4.type === "local" && s4.directory).filter((s4) => !!s4)); - const sourcesDiv = containerEl.createDiv(); - sourcesDiv.style.display = "block"; - let sourceList = ReactDOM2.render((0, import_react3.createElement)(CalendarSettings, { - sources: this.plugin.settings.calendarSources, - submit: (settings) => __async(this, null, function* () { - this.plugin.settings.calendarSources = settings; - yield this.plugin.saveSettings(); - }) - }), sourcesDiv); }); + Promise.allSettled(promises).then((results) => { + this.revalidating = false; + this.lastRevalidation = Date.now(); + new import_obsidian10.Notice("All remote calendars have been fetched."); + const errors = results.flatMap((result) => result.status === "rejected" ? result.reason : []); + if (errors.length > 0) { + new import_obsidian10.Notice("A remote calendar failed to load. Check the console for more details."); + errors.forEach((reason) => { + console.error(`Revalidation failed with reason: ${reason}`); + }); + } + }); + } + get _storeForTest() { + return this.store; } }; -// src/ui/onboard.ts -function renderOnboarding(app, plugin, el) { - el.style.height = "100%"; - const nocal = el.createDiv(); - nocal.style.height = "100%"; - nocal.style.display = "flex"; - nocal.style.alignItems = "center"; - nocal.style.justifyContent = "center"; - const notice = nocal.createDiv(); - notice.createEl("h1").textContent = "No calendar available"; - notice.createEl("p").textContent = "Thanks for downloading Full Calendar! Create a calendar below to begin."; - const container = notice.createDiv(); - container.style.position = "fixed"; - addCalendarButton(app, plugin, container, (source) => __async(this, null, function* () { - const { calendarSources } = plugin.settings; - calendarSources.push(source); - yield plugin.saveSettings(); - yield plugin.activateView(); - })); -} - -// src/ui/view.ts -var import_obsidian_daily_notes_interface5 = __toModule(require_main()); -var FULL_CALENDAR_VIEW_TYPE = "full-calendar-view"; -var FULL_CALENDAR_SIDEBAR_VIEW_TYPE = "full-calendar-sidebar-view"; -var CalendarView = class extends import_obsidian11.ItemView { - constructor(leaf, plugin, inSidebar = false) { - super(leaf); - this.plugin = plugin; - this.calendar = null; - this.cacheCallback = this.onCacheUpdate.bind(this); - this.inSidebar = inSidebar; - } - getIcon() { - return "calendar-glyph"; +// src/ObsidianAdapter.ts +var import_obsidian11 = __toModule(require("obsidian")); +var ObsidianIO = class { + constructor(app, systemTrash = true) { + this.vault = app.vault; + this.metadataCache = app.metadataCache; + this.fileManager = app.fileManager; + this.systemTrash = systemTrash; } - getViewType() { - return FULL_CALENDAR_VIEW_TYPE; + delete(file) { + return this.vault.trash(file, this.systemTrash); } - getDisplayText() { - return this.inSidebar ? "Full Calendar" : "Calendar"; + rename(file, newPath) { + return this.fileManager.renameFile(file, newPath); } - onCacheUpdate(file) { + rewrite(file, rewriteFunc) { return __async(this, null, function* () { - var _a; - if (!this.calendar) { + const page = yield this.vault.read(file); + let result = rewriteFunc(page); + if (result instanceof Promise) { + result = yield result; + } + if (Array.isArray(result)) { + yield this.vault.modify(file, result[0]); + return result[1]; + } else { + yield this.vault.modify(file, result); return; } - const source = this.plugin.settings.calendarSources.find((c3) => c3.type === "local" && file.path.startsWith(c3.directory)); - const dailyNoteSettings = (0, import_obsidian_daily_notes_interface5.getDailyNoteSettings)(); - if (source) { - const event = NoteEvent.fromFile(this.app.metadataCache, this.app.vault, file); - if (!event) { - return; - } - let calendarEvent = this.calendar.getEventById(event.idForCalendar); - if (source && event) { - if (calendarEvent) { - calendarEvent.remove(); - } - event.addTo(this.calendar, source); - } - } else if (dailyNoteSettings.folder && file.path.startsWith(dailyNoteSettings.folder)) { - const source2 = this.plugin.settings.calendarSources.find((c3) => c3.type === "dailynote"); - if (!source2 || source2.type !== "dailynote") { - console.warn("Daily note calendar not loaded."); + }); + } + create(path, contents) { + return this.vault.create(path, contents); + } + getAbstractFileByPath(path) { + return this.vault.getAbstractFileByPath(path); + } + getFileByPath(path) { + const f3 = this.vault.getAbstractFileByPath(path); + if (!f3) { + return null; + } + if (!(f3 instanceof import_obsidian11.TFile)) { + return null; + } + return f3; + } + getMetadata(file) { + return this.metadataCache.getFileCache(file); + } + waitForMetadata(file) { + return new Promise((resolve, reject) => { + const cache = this.metadataCache.getFileCache(file); + let ref = null; + if (cache) { + resolve(cache); + return; + } + ref = this.metadataCache.on("changed", (changedFile, data, cache2) => { + if (changedFile.path !== file.path) { + console.debug("waitForMetadata(): a different file has changed. continue listening..."); return; } - const s4 = new DailyNoteSource(this.app.vault, this.app.metadataCache, source2); - const newEvents = (_a = yield s4.getAllEventsFromFile(file)) == null ? void 0 : _a.flatMap((e3) => e3 ? [e3] : []); - let idx = 0; - let calendarEvent = null; - const oldEvents = {}; - while (calendarEvent = this.calendar.getEventById(`dailynote::${file.path}::${idx++}`)) { - oldEvents[calendarEvent.id] = calendarEvent; - } - Object.values(oldEvents).forEach((e3) => { - e3.remove(); - }); - if (!newEvents) { - return; + resolve(cache2); + if (ref) { + this.metadataCache.offref(ref); + } else { + console.warn("No ref was found after cache loaded."); } - newEvents.forEach((newEvent) => { - var _a2; - (_a2 = this.calendar) == null ? void 0 : _a2.addEvent(__spreadValues(__spreadValues({}, newEvent), getColors(source2.color))); - }); + return; + }); + }); + } + read(file) { + return this.vault.cachedRead(file); + } + process(file, func) { + return __async(this, null, function* () { + return func(yield this.read(file)); + }); + } +}; + +// src/calendars/DailyNoteCalendar.ts +var import_moment = __toModule(require_moment()); +var import_obsidian_daily_notes_interface2 = __toModule(require_main()); + +// src/serialization/inline.ts +var parseBool = (s4) => s4 === "true" ? true : s4 === "false" ? false : s4; +var fieldRegex = /\[([^\]]+):: ?([^\]]+)\]/g; +function getInlineAttributes(s4) { + return Object.fromEntries(Array.from(s4.matchAll(fieldRegex)).map((m3) => [m3[1], parseBool(m3[2])])); +} +var getHeadingPosition = (headingText, metadata, endOfDoc) => { + if (!metadata.headings) { + return null; + } + let level = null; + let startingPos = null; + let endingPos = null; + for (const heading of metadata.headings) { + if (!level && heading.heading === headingText) { + level = heading.level; + startingPos = heading.position; + } else if (level && heading.level <= level) { + endingPos = heading.position; + break; + } + } + if (!level || !startingPos) { + return null; + } + return { start: startingPos.end, end: (endingPos == null ? void 0 : endingPos.start) || endOfDoc }; +}; +var getListsUnderHeading = (headingText, metadata) => { + var _a, _b, _c; + if (!metadata.listItems) { + return []; + } + const endOfDoc = (_b = (_a = metadata.sections) == null ? void 0 : _a.last()) == null ? void 0 : _b.position.end; + if (!endOfDoc) { + return []; + } + const headingPos = getHeadingPosition(headingText, metadata, endOfDoc); + if (!headingPos) { + return []; + } + return (_c = metadata.listItems) == null ? void 0 : _c.filter((l4) => headingPos.start.offset < l4.position.start.offset && l4.position.end.offset <= headingPos.end.offset); +}; +var listRegex = /^(\s*)\-\s+(\[(.)\]\s+)?/; +var checkboxRegex = /^\s*\-\s+\[(.)\]\s+/; +var checkboxTodo = (s4) => { + const match2 = s4.match(checkboxRegex); + if (!match2 || !match2[1]) { + return null; + } + return match2[1] === " " ? false : match2[1]; +}; +var getInlineEventFromLine = (text, globalAttrs) => { + const attrs = getInlineAttributes(text); + if (Object.keys(attrs).length === 0) { + return null; + } + return validateEvent2(__spreadValues(__spreadValues({ + title: text.replace(listRegex, "").replace(fieldRegex, "").trim(), + completed: checkboxTodo(text) + }, globalAttrs), attrs)); +}; +function getAllInlineEventsFromFile(fileText, listItems, fileGlobalAttrs) { + const lines = fileText.split("\n"); + const listItemText = listItems.map((i3) => i3.position.start.line).map((idx) => ({ lineNumber: idx, text: lines[idx] })); + return listItemText.map((l4) => ({ + lineNumber: l4.lineNumber, + event: getInlineEventFromLine(l4.text, __spreadProps(__spreadValues({}, fileGlobalAttrs), { + type: "single" + })) + })).flatMap(({ event, lineNumber }) => event ? [{ event, lineNumber }] : []); +} +var generateInlineAttributes = (attrs) => { + return Object.entries(attrs).map(([k3, v3]) => `[${k3}:: ${v3}]`).join(" "); +}; +var makeListItem = (data, whitespacePrefix = "") => { + const { completed, title } = data; + const checkbox = (() => { + if (completed !== null && completed !== void 0) { + return `[${completed ? "x" : " "}]`; + } + return null; + })(); + const attrs = __spreadValues({}, data); + delete attrs["completed"]; + delete attrs["title"]; + delete attrs["type"]; + delete attrs["date"]; + for (const key of Object.keys(attrs)) { + if (attrs[key] === void 0 || attrs[key] === null) { + delete attrs[key]; + } + } + if (!attrs["allDay"]) { + delete attrs["allDay"]; + } + return `${whitespacePrefix}- ${checkbox || ""} ${title} ${generateInlineAttributes(attrs)}`; +}; +var modifyListItem = (line, data) => { + const listMatch = line.match(listRegex); + if (!listMatch) { + console.warn("Tried modifying a list item with a position that wasn't a list item", { line }); + return null; + } + return makeListItem(data, listMatch[1]); +}; +var addToHeading = (page, { heading, item, headingText }) => { + let lines = page.split("\n"); + const listItem = makeListItem(item); + if (heading) { + const headingLine = heading.position.start.line; + const lineNumber = headingLine + 1; + lines.splice(lineNumber, 0, listItem); + return { page: lines.join("\n"), lineNumber }; + } else { + lines.push(`## ${headingText}`); + lines.push(listItem); + return { page: lines.join("\n"), lineNumber: lines.length - 1 }; + } +}; + +// src/calendars/DailyNoteCalendar.ts +var DATE_FORMAT = "YYYY-MM-DD"; +var DailyNoteCalendar = class extends EditableCalendar { + constructor(app, color, heading) { + super(color); + (0, import_obsidian_daily_notes_interface2.appHasDailyNotesPluginLoaded)(); + this.app = app; + this.heading = heading; + } + get type() { + return "dailynote"; + } + get identifier() { + return this.heading; + } + get name() { + return `Daily note under "${this.heading}"`; + } + get directory() { + const { folder } = (0, import_obsidian_daily_notes_interface2.getDailyNoteSettings)(); + if (!folder) { + throw new Error("Could not load daily note settings."); + } + return folder; + } + getEventsInFile(file) { + return __async(this, null, function* () { + var _a; + const date = (_a = (0, import_obsidian_daily_notes_interface2.getDateFromFile)(file, "day")) == null ? void 0 : _a.format(DATE_FORMAT); + if (!date) { + return []; } + const cache = this.app.getMetadata(file); + if (!cache) { + return []; + } + const listItems = getListsUnderHeading(this.heading, cache); + const inlineEvents = yield this.app.process(file, (text) => getAllInlineEventsFromFile(text, listItems, { date })); + return inlineEvents.map(({ event, lineNumber }) => [ + event, + { file, lineNumber } + ]); }); } - onOpen() { + getEvents() { return __async(this, null, function* () { - yield this.plugin.loadSettings(); - const noteSourcePromises = this.plugin.settings.calendarSources.flatMap((s4) => s4.type === "local" ? [s4] : []).map((s4) => new NoteSource(this.app.vault, this.app.metadataCache, s4)).map((ns2) => ns2.toApi(this.plugin.settings.recursiveLocal)); - const container = this.containerEl.children[1]; - container.empty(); - let calendarEl = container.createEl("div"); - const noteSourceResults = yield Promise.all(noteSourcePromises); - const sources = noteSourceResults.flatMap((s4) => s4 instanceof FCError ? [] : [s4]); - if (sources.length === 0 && this.plugin.settings.calendarSources.filter((s4) => s4.type === "ical" || s4.type === "caldav" || s4.type === "icloud" || s4.type === "dailynote").length === 0) { - renderOnboarding(this.app, this.plugin, calendarEl); - return; + const notes = (0, import_obsidian_daily_notes_interface2.getAllDailyNotes)(); + const files = Object.values(notes); + return (yield Promise.all(files.map((f3) => this.getEventsInFile(f3)))).flat(); + }); + } + createEvent(event) { + return __async(this, null, function* () { + var _a; + if (event.type !== "single" && event.type !== void 0) { + console.debug("tried creating a recurring event in a daily note", event); + throw new Error("Cannot create a recurring event in a daily note."); } - let errs = noteSourceResults.flatMap((s4) => s4 instanceof FCError ? [s4] : []); - for (const err of errs) { - new import_obsidian11.Notice(err.message); + const m3 = (0, import_moment.default)(event.date); + let file = (0, import_obsidian_daily_notes_interface2.getDailyNote)(m3, (0, import_obsidian_daily_notes_interface2.getAllDailyNotes)()); + if (!file) { + file = yield (0, import_obsidian_daily_notes_interface2.createDailyNote)(m3); } - this.calendar = renderCalendar(calendarEl, sources, { - forceNarrow: this.inSidebar, - eventClick: (info) => __async(this, null, function* () { - if (info.jsEvent.getModifierState("Control") || info.jsEvent.getModifierState("Meta")) { - console.log("open", info.event.id); - const event = yield eventFromApi(this.app.metadataCache, this.app.vault, this.plugin.settings, info.event); - if (!event) { - return; - } - let leaf = this.app.workspace.getMostRecentLeaf(); - if (leaf) { - event.openIn(leaf, this.app.workspace); - } - } else { - new EventModal(this.app, this.plugin, this.calendar).editInModal(info.event); - } - }), - select: (start, end, allDay, viewType) => __async(this, null, function* () { - if (viewType === "dayGridMonth") { - end.setDate(end.getDate() - 1); - } - const partialEvent = dateEndpointsToFrontmatter(start, end, allDay); - let modal = new EventModal(this.app, this.plugin, this.calendar, partialEvent); - modal.open(); - }), - modifyEvent: (newEvent, oldEvent) => __async(this, null, function* () { - try { - const existingEvent = yield eventFromApi(this.app.metadataCache, this.app.vault, this.plugin.settings, oldEvent); - if (!existingEvent) { - return false; - } - const frontmatter = fromEventApi(newEvent); - yield existingEvent.setData(frontmatter); - } catch (e3) { - new import_obsidian11.Notice(e3.message); - return false; - } - return true; - }), - eventMouseEnter: (info) => __async(this, null, function* () { - const event = yield eventFromApi(this.app.metadataCache, this.app.vault, this.plugin.settings, info.event); - if (event instanceof LocalEvent) { - this.app.workspace.trigger("hover-link", { - event: info.jsEvent, - source: PLUGIN_SLUG, - hoverParent: calendarEl, - targetEl: info.jsEvent.target, - linktext: event.path, - sourcePath: event.path - }); - } - }), - firstDay: this.plugin.settings.firstDay, - initialView: this.plugin.settings.initialView, - timeFormat24h: this.plugin.settings.timeFormat24h, - openContextMenuForEvent: (e3, mouseEvent) => __async(this, null, function* () { - const menu = new import_obsidian11.Menu(); - const event = yield eventFromApi(this.app.metadataCache, this.app.vault, this.plugin.settings, e3); - if (event instanceof EditableEvent) { - if (!event.isTask) { - menu.addItem((item) => item.setTitle("Turn into task").onClick(() => __async(this, null, function* () { - yield event.setIsTask(true); - }))); - } else { - menu.addItem((item) => item.setTitle("Remove checkbox").onClick(() => __async(this, null, function* () { - yield event.setIsTask(false); - }))); - } - } - if (event instanceof LocalEvent) { - menu.addSeparator(); - menu.addItem((item) => item.setTitle("Go to note").onClick(() => { - let leaf = this.app.workspace.getMostRecentLeaf(); - if (leaf) { - event.openIn(leaf, this.app.workspace); - new import_obsidian11.Notice(`Opening "${e3.title}"`); - } - })); - menu.addItem((item) => item.setTitle("Delete").onClick(() => __async(this, null, function* () { - yield event.delete(); - new import_obsidian11.Notice(`Deleted event "${e3.title}".`); - }))); - } else { - menu.addItem((item) => { - item.setTitle("No actions available on remote events").setDisabled(true); - }); - } - menu.showAtMouseEvent(mouseEvent); - }), - toggleTask: (e3, isDone) => __async(this, null, function* () { - const event = yield eventFromApi(this.app.metadataCache, this.app.vault, this.plugin.settings, e3); - if (!event) { - return false; - } - const newData = event.data; - if (newData.type !== "single") { - return false; - } - if (isDone) { - const completionDate = DateTime.now().toISO(); - newData.completed = completionDate; - } else { - newData.completed = false; - } - try { - event.setData(newData); - } catch (e4) { - if (e4 instanceof FCError) { - new import_obsidian11.Notice(e4.message); - } - return false; - } - return true; - }) + const metadata = yield this.app.waitForMetadata(file); + const headingInfo = (_a = metadata.headings) == null ? void 0 : _a.find((h3) => h3.heading == this.heading); + if (!headingInfo) { + throw new Error(`Could not find heading ${this.heading} in daily note ${file.path}.`); + } + let lineNumber = yield this.app.rewrite(file, (contents) => { + const { page, lineNumber: lineNumber2 } = addToHeading(contents, { + heading: headingInfo, + item: event, + headingText: this.heading + }); + return [page, lineNumber2]; }); - window.calendar = this.calendar; - this.plugin.settings.calendarSources.flatMap((s4) => s4.type === "ical" ? [s4] : []).map((s4) => new IcsSource(s4)).map((s4) => s4.toApi()).forEach((resultPromise) => resultPromise.then((result) => { - var _a; - if (result instanceof FCError) { - new import_obsidian11.Notice(result.message); - } else { - (_a = this.calendar) == null ? void 0 : _a.addEventSource(result); - } - })); - this.plugin.settings.calendarSources.flatMap((s4) => s4.type === "caldav" || s4.type === "icloud" ? [s4] : []).map((s4) => new RemoteSource(s4)).map((s4) => s4.toApi()).forEach((resultPromise) => resultPromise.then((result) => { - var _a; - if (result instanceof FCError) { - new import_obsidian11.Notice(result.message); - } else { - (_a = this.calendar) == null ? void 0 : _a.addEventSource(result); - } - })); - this.plugin.settings.calendarSources.flatMap((s4) => s4.type === "dailynote" ? [s4] : []).map((s4) => new DailyNoteSource(this.app.vault, this.app.metadataCache, s4)).map((s4) => s4.toApi()).forEach((resultPromise) => resultPromise.then((result) => { - var _a; - if (result instanceof FCError) { - new import_obsidian11.Notice(result.message); - } else { - (_a = this.calendar) == null ? void 0 : _a.addEventSource(result); - } - })); - this.registerEvent(this.app.metadataCache.on("changed", this.cacheCallback)); - this.registerEvent(this.app.vault.on("delete", (file) => { - var _a; - if (file instanceof import_obsidian11.TFile) { - let id = NoteEvent.ID_PREFIX + CalendarEvent.ID_SEPARATOR + file.path; - const event = (_a = this.calendar) == null ? void 0 : _a.getEventById(id); - if (event) { - event.remove(); - } - } - })); - this.registerEvent(this.app.vault.on("rename", (file, oldPath) => { - var _a; - const oldEvent = (_a = this.calendar) == null ? void 0 : _a.getEventById(NoteEvent.ID_PREFIX + CalendarEvent.ID_SEPARATOR + oldPath); - if (oldEvent) { - oldEvent.remove(); - } - if (file instanceof import_obsidian11.TFile) { - this.onCacheUpdate(file); - } - })); + return { file, lineNumber }; }); } - onResize() { - if (this.calendar) { - this.calendar.render(); + getConcreteLocation({ path, lineNumber }) { + const file = this.app.getFileByPath(path); + if (!file) { + throw new Error(`File not found at path: ${path}`); + } + if (!lineNumber) { + throw new Error(`Daily note events must have a line number.`); } + return { file, lineNumber }; } - onClose() { + deleteEvent(loc) { + return __async(this, null, function* () { + const { file, lineNumber } = this.getConcreteLocation(loc); + this.app.rewrite(file, (contents) => { + let lines = contents.split("\n"); + lines.splice(lineNumber, 1); + return lines.join("\n"); + }); + }); + } + modifyEvent(loc, newEvent, updateCacheWithLocation) { + return __async(this, null, function* () { + var _a, _b; + console.debug("modified daily note event"); + if (newEvent.type !== "single" && newEvent.type !== void 0) { + throw new Error("Recurring events in daily notes are not supported."); + } + if (newEvent.endDate) { + throw new Error("Multi-day events are not supported in daily notes."); + } + const { file, lineNumber } = this.getConcreteLocation(loc); + const oldDate = (_a = (0, import_obsidian_daily_notes_interface2.getDateFromFile)(file, "day")) == null ? void 0 : _a.format(DATE_FORMAT); + if (!oldDate) { + throw new Error(`Could not get date from file at path ${file.path}`); + } + if (newEvent.date !== oldDate) { + console.debug("daily note event moving to a new file."); + const m3 = (0, import_moment.default)(newEvent.date); + let newFile = (0, import_obsidian_daily_notes_interface2.getDailyNote)(m3, (0, import_obsidian_daily_notes_interface2.getAllDailyNotes)()); + if (!newFile) { + newFile = yield (0, import_obsidian_daily_notes_interface2.createDailyNote)(m3); + } + yield this.app.read(newFile); + const metadata = this.app.getMetadata(newFile); + if (!metadata) { + throw new Error("No metadata for file " + file.path); + } + const headingInfo = (_b = metadata.headings) == null ? void 0 : _b.find((h3) => h3.heading == this.heading); + if (!headingInfo) { + throw new Error(`Could not find heading ${this.heading} in daily note ${file.path}.`); + } + yield this.app.rewrite(file, (oldFileContents) => __async(this, null, function* () { + let lines = oldFileContents.split("\n"); + lines.splice(lineNumber, 1); + yield this.app.rewrite(newFile, (newFileContents) => { + const { page, lineNumber: lineNumber2 } = addToHeading(newFileContents, { + heading: headingInfo, + item: newEvent, + headingText: this.heading + }); + updateCacheWithLocation({ file: newFile, lineNumber: lineNumber2 }); + return page; + }); + return lines.join("\n"); + })); + } else { + console.debug("daily note event staying in same file."); + updateCacheWithLocation({ file, lineNumber }); + yield this.app.rewrite(file, (contents) => { + const lines = contents.split("\n"); + const newLine = modifyListItem(lines[lineNumber], newEvent); + if (!newLine) { + throw new Error("Did not successfully update line."); + } + lines[lineNumber] = newLine; + return lines.join("\n"); + }); + } + }); + } + move(from, to) { + throw new Error("Method not implemented."); + } +}; + +// src/calendars/ICSCalendar.ts +var import_obsidian12 = __toModule(require("obsidian")); + +// src/parsing/ics.ts +var import_ical = __toModule(require_ical()); +function getDate2(t3) { + return DateTime2.fromSeconds(t3.toUnixTime(), { zone: "UTC" }).toISODate(); +} +function getTime3(t3) { + if (t3.isDate) { + return "00:00"; + } + return DateTime2.fromSeconds(t3.toUnixTime(), { zone: "UTC" }).toISOTime({ + includeOffset: false, + includePrefix: false, + suppressMilliseconds: true, + suppressSeconds: true + }); +} +function specifiesEnd2(iCalEvent) { + return Boolean(iCalEvent.component.getFirstProperty("dtend")) || Boolean(iCalEvent.component.getFirstProperty("duration")); +} +function icsToOFC(input) { + if (input.isRecurring()) { + const rrule = rrulestr(input.component.getFirstProperty("rrule").getFirstValue().toString()); + const allDay = input.startDate.isDate; + const exdates = input.component.getAllProperties("exdate").map((exdateProp) => { + const exdate = exdateProp.getFirstValue(); + return getDate2(exdate); + }); + return __spreadValues({ + type: "rrule", + title: input.summary, + id: `ics::${input.uid}::${DateTime2.fromJSDate(rrule.options.dtstart).toISODate()}::recurring`, + rrule: rrule.toString(), + skipDates: exdates, + startDate: getDate2(input.startDate.convertToZone(import_ical.default.Timezone.utcTimezone)) + }, allDay ? { allDay: true } : { + allDay: false, + startTime: getTime3(input.startDate.convertToZone(import_ical.default.Timezone.utcTimezone)), + endTime: getTime3(input.endDate.convertToZone(import_ical.default.Timezone.utcTimezone)) + }); + } else { + const date = getDate2(input.startDate); + const endDate = specifiesEnd2(input) && input.endDate ? getDate2(input.endDate) : void 0; + const allDay = input.startDate.isDate; + return __spreadValues({ + type: "single", + id: `ics::${input.uid}::${date}::single`, + title: input.summary, + date, + endDate: date !== endDate ? endDate : void 0 + }, allDay ? { allDay: true } : { + allDay: false, + startTime: getTime3(input.startDate), + endTime: getTime3(input.endDate) + }); + } +} +function getEventsFromICS(text) { + const jCalData = import_ical.default.parse(text); + const component = new import_ical.default.Component(jCalData); + const events = component.getAllSubcomponents("vevent").map((vevent) => new import_ical.default.Event(vevent)).filter((evt) => { + evt.iterator; + try { + evt.startDate.toJSDate(); + evt.endDate.toJSDate(); + return true; + } catch (err) { + return false; + } + }); + const baseEvents = Object.fromEntries(events.filter((e3) => e3.recurrenceId === null).map((e3) => [e3.uid, icsToOFC(e3)])); + const recurrenceExceptions = events.filter((e3) => e3.recurrenceId !== null).map((e3) => [e3.uid, icsToOFC(e3)]); + for (const [uid, event] of recurrenceExceptions) { + const baseEvent = baseEvents[uid]; + if (!baseEvent) { + continue; + } + if (baseEvent.type !== "rrule" || event.type !== "single") { + console.warn("Recurrence exception was recurring or base event was not recurring", { baseEvent, recurrenceException: event }); + continue; + } + baseEvent.skipDates.push(event.date); + } + const allEvents = Object.values(baseEvents).concat(recurrenceExceptions.map((e3) => e3[1])); + return allEvents.map(validateEvent2).flatMap((e3) => e3 ? [e3] : []); +} + +// src/calendars/ICSCalendar.ts +var WEBCAL = "webcal"; +var ICSCalendar = class extends RemoteCalendar { + constructor(color, url) { + super(color); + this.response = null; + if (url.startsWith(WEBCAL)) { + url = "https" + url.slice(WEBCAL.length); + } + this.url = url; + } + get type() { + return "ical"; + } + get identifier() { + return this.url; + } + get name() { + return this.url; + } + revalidate() { + return __async(this, null, function* () { + console.debug("revalidating ICS calendar " + this.name); + this.response = yield (0, import_obsidian12.request)({ + url: this.url, + method: "GET" + }); + }); + } + getEvents() { + return __async(this, null, function* () { + if (!this.response) { + return []; + } + return getEventsFromICS(this.response).map((e3) => [e3, null]); + }); + } +}; + +// src/calendars/CalDAVCalendar.ts +var import_dav3 = __toModule(require_dav()); +var CalDAVCalendar = class extends RemoteCalendar { + constructor(color, name, credentials, serverUrl, calendarUrl) { + super(color); + this.events = []; + this._name = name; + this.credentials = credentials; + this.serverUrl = serverUrl; + this.calendarUrl = calendarUrl; + } + revalidate() { return __async(this, null, function* () { - if (this.calendar) { - this.calendar.destroy(); - this.calendar = null; + let xhr = new Basic(new import_dav3.default.Credentials({ + username: this.credentials.username, + password: this.credentials.password + })); + let account = yield import_dav3.default.createAccount({ + xhr, + server: this.serverUrl + }); + let calendar = account.calendars.find((calendar2) => calendar2.url === this.calendarUrl); + if (!calendar) { + return; } + let caldavEvents = yield import_dav3.default.listCalendarObjects(calendar, { xhr }); + this.events = caldavEvents.filter((vevent) => vevent.calendarData).flatMap((vevent) => getEventsFromICS(vevent.calendarData)); + }); + } + get type() { + return "caldav"; + } + get identifier() { + return this.calendarUrl; + } + get name() { + return this._name; + } + getEvents() { + return __async(this, null, function* () { + return this.events.map((e3) => [e3, null]); }); } }; // src/main.ts -var FullCalendarPlugin = class extends import_obsidian12.Plugin { +var FullCalendarPlugin = class extends import_obsidian13.Plugin { constructor() { super(...arguments); this.settings = DEFAULT_SETTINGS; + this.cache = new EventCache({ + local: (info) => info.type === "local" ? new FullNoteCalendar(new ObsidianIO(this.app), info.color, info.directory) : null, + dailynote: (info) => info.type === "dailynote" ? new DailyNoteCalendar(new ObsidianIO(this.app), info.color, info.heading) : null, + ical: (info) => info.type === "ical" ? new ICSCalendar(info.color, info.url) : null, + gcal: () => null, + caldav: (info) => info.type === "caldav" ? new CalDAVCalendar(info.color, info.name, { + type: "basic", + username: info.username, + password: info.password + }, info.url, info.homeUrl) : null, + icloud: () => null, + FOR_TEST_ONLY: () => null + }); this.renderCalendar = renderCalendar; this.processFrontmatter = toEventInput; } @@ -58051,6 +65285,23 @@ var FullCalendarPlugin = class extends import_obsidian12.Plugin { onload() { return __async(this, null, function* () { yield this.loadSettings(); + this.cache.reset(this.settings.calendarSources); + this.registerEvent(this.app.metadataCache.on("changed", (file) => { + this.cache.fileUpdated(file); + })); + this.registerEvent(this.app.vault.on("rename", (file, oldPath) => { + if (file instanceof import_obsidian13.TFile) { + console.debug("FILE RENAMED", file.path); + this.cache.deleteEventsAtPath(oldPath); + } + })); + this.registerEvent(this.app.vault.on("delete", (file) => { + if (file instanceof import_obsidian13.TFile) { + console.debug("FILE DELETED", file.path); + this.cache.deleteEventsAtPath(file.path); + } + })); + window.cache = this.cache; this.registerView(FULL_CALENDAR_VIEW_TYPE, (leaf) => new CalendarView(leaf, this, false)); this.registerView(FULL_CALENDAR_SIDEBAR_VIEW_TYPE, (leaf) => new CalendarView(leaf, this, true)); this.addRibbonIcon("calendar-glyph", "Open Full Calendar", (_3) => __async(this, null, function* () { @@ -58061,7 +65312,24 @@ var FullCalendarPlugin = class extends import_obsidian12.Plugin { id: "full-calendar-new-event", name: "New Event", callback: () => { - new EventModal(this.app, this, null).open(); + launchCreateModal(this, {}); + } + }); + this.addCommand({ + id: "full-calendar-reset", + name: "Reset Event Cache", + callback: () => { + this.cache.reset(this.settings.calendarSources); + this.app.workspace.detachLeavesOfType(FULL_CALENDAR_VIEW_TYPE); + this.app.workspace.detachLeavesOfType(FULL_CALENDAR_SIDEBAR_VIEW_TYPE); + new import_obsidian13.Notice("Full Calendar has been reset."); + } + }); + this.addCommand({ + id: "full-calendar-revalidate", + name: "Revalidate remote calendars", + callback: () => { + this.cache.revalidateRemoteCalendars(true); } }); this.addCommand({ @@ -58083,17 +65351,6 @@ var FullCalendarPlugin = class extends import_obsidian12.Plugin { }); } }); - this.addCommand({ - id: "full-calendar-upgrade-note", - name: "Upgrade note to event", - callback: () => { - const view = this.app.workspace.getActiveViewOfType(import_obsidian12.MarkdownView); - if (view) { - const file = view.file; - new EventModal(this.app, this, null).editInModal(file); - } - } - }); this.app.workspace.registerHoverLinkSource(PLUGIN_SLUG, { display: "Full Calendar", defaultMod: true @@ -58111,7 +65368,11 @@ var FullCalendarPlugin = class extends import_obsidian12.Plugin { } saveSettings() { return __async(this, null, function* () { + new import_obsidian13.Notice("Resetting the event cache with new settings..."); yield this.saveData(this.settings); + this.cache.reset(this.settings.calendarSources); + yield this.cache.populate(); + this.cache.resync(); }); } }; @@ -58121,7 +65382,12 @@ object-assign @license MIT */ /*! -FullCalendar v5.11.3 +FullCalendar v5.11.2 +Docs & License: https://fullcalendar.io/ +(c) 2022 Adam Shaw +*/ +/*! +FullCalendar v5.11.4 Docs & License: https://fullcalendar.io/ (c) 2022 Adam Shaw */ diff --git a/.obsidian/plugins/obsidian-full-calendar/manifest.json b/.obsidian/plugins/obsidian-full-calendar/manifest.json index 30ff9dae..20009e25 100644 --- a/.obsidian/plugins/obsidian-full-calendar/manifest.json +++ b/.obsidian/plugins/obsidian-full-calendar/manifest.json @@ -1,7 +1,7 @@ { "id": "obsidian-full-calendar", "name": "Full Calendar", - "version": "0.9.5", + "version": "0.10.5", "minAppVersion": "0.16.3", "description": "Obsidian integration with Full Calendar (fullcalendar.io)", "author": "Davis Haupt", diff --git a/.obsidian/plugins/obsidian-react-components/data.json b/.obsidian/plugins/obsidian-react-components/data.json deleted file mode 100644 index 9f41126b..00000000 --- a/.obsidian/plugins/obsidian-react-components/data.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "template_folder": "00.01 Admin/React", - "auto_refresh": true -} \ No newline at end of file diff --git a/.obsidian/plugins/obsidian-react-components/main.js b/.obsidian/plugins/obsidian-react-components/main.js deleted file mode 100644 index 885e023e..00000000 --- a/.obsidian/plugins/obsidian-react-components/main.js +++ /dev/null @@ -1,145705 +0,0 @@ -/* -THIS IS A GENERATED/BUNDLED FILE BY ROLLUP -if you want to view the source visit the plugins github repository -*/ - -'use strict'; - -var obsidian = require('obsidian'); -var streamParser = require('@codemirror/stream-parser'); -var view = require('@codemirror/view'); -var rangeset = require('@codemirror/rangeset'); -var language = require('@codemirror/language'); - -function _interopNamespace(e) { - if (e && e.__esModule) return e; - var n = Object.create(null); - if (e) { - Object.keys(e).forEach(function (k) { - if (k !== 'default') { - var d = Object.getOwnPropertyDescriptor(e, k); - Object.defineProperty(n, k, d.get ? d : { - enumerable: true, - get: function () { return e[k]; } - }); - } - }); - } - n["default"] = e; - return Object.freeze(n); -} - -var obsidian__namespace = /*#__PURE__*/_interopNamespace(obsidian); - -/*! ***************************************************************************** -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. -***************************************************************************** */ - -function __awaiter(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()); - }); -} - -var global$1 = (typeof global$1 !== "undefined" ? global$1 : - typeof self !== "undefined" ? self : - typeof window !== "undefined" ? window : {}); - -// shim for using process in browser -// based off https://github.com/defunctzombie/node-process/blob/master/browser.js - -function defaultSetTimout() { - throw new Error('setTimeout has not been defined'); -} -function defaultClearTimeout () { - throw new Error('clearTimeout has not been defined'); -} -var cachedSetTimeout = defaultSetTimout; -var cachedClearTimeout = defaultClearTimeout; -if (typeof global$1.setTimeout === 'function') { - cachedSetTimeout = setTimeout; -} -if (typeof global$1.clearTimeout === 'function') { - cachedClearTimeout = clearTimeout; -} - -function runTimeout(fun) { - if (cachedSetTimeout === setTimeout) { - //normal enviroments in sane situations - return setTimeout(fun, 0); - } - // if setTimeout wasn't available but was latter defined - if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { - cachedSetTimeout = setTimeout; - return setTimeout(fun, 0); - } - try { - // when when somebody has screwed with setTimeout but no I.E. maddness - return cachedSetTimeout(fun, 0); - } catch(e){ - try { - // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally - return cachedSetTimeout.call(null, fun, 0); - } catch(e){ - // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error - return cachedSetTimeout.call(this, fun, 0); - } - } - - -} -function runClearTimeout(marker) { - if (cachedClearTimeout === clearTimeout) { - //normal enviroments in sane situations - return clearTimeout(marker); - } - // if clearTimeout wasn't available but was latter defined - if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { - cachedClearTimeout = clearTimeout; - return clearTimeout(marker); - } - try { - // when when somebody has screwed with setTimeout but no I.E. maddness - return cachedClearTimeout(marker); - } catch (e){ - try { - // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally - return cachedClearTimeout.call(null, marker); - } catch (e){ - // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. - // Some versions of I.E. have different rules for clearTimeout vs setTimeout - return cachedClearTimeout.call(this, marker); - } - } - - - -} -var queue = []; -var draining = false; -var currentQueue; -var queueIndex = -1; - -function cleanUpNextTick() { - if (!draining || !currentQueue) { - return; - } - draining = false; - if (currentQueue.length) { - queue = currentQueue.concat(queue); - } else { - queueIndex = -1; - } - if (queue.length) { - drainQueue(); - } -} - -function drainQueue() { - if (draining) { - return; - } - var timeout = runTimeout(cleanUpNextTick); - draining = true; - - var len = queue.length; - while(len) { - currentQueue = queue; - queue = []; - while (++queueIndex < len) { - if (currentQueue) { - currentQueue[queueIndex].run(); - } - } - queueIndex = -1; - len = queue.length; - } - currentQueue = null; - draining = false; - runClearTimeout(timeout); -} -function nextTick(fun) { - var args = new Array(arguments.length - 1); - if (arguments.length > 1) { - for (var i = 1; i < arguments.length; i++) { - args[i - 1] = arguments[i]; - } - } - queue.push(new Item(fun, args)); - if (queue.length === 1 && !draining) { - runTimeout(drainQueue); - } -} -// v8 likes predictible objects -function Item(fun, array) { - this.fun = fun; - this.array = array; -} -Item.prototype.run = function () { - this.fun.apply(null, this.array); -}; -var title = 'browser'; -var platform = 'browser'; -var browser = true; -var env = {}; -var argv = []; -var version$1 = ''; // empty string to avoid regexp issues -var versions = {}; -var release = {}; -var config = {}; - -function noop() {} - -var on = noop; -var addListener = noop; -var once = noop; -var off = noop; -var removeListener = noop; -var removeAllListeners = noop; -var emit = noop; - -function binding(name) { - throw new Error('process.binding is not supported'); -} - -function cwd () { return '/' } -function chdir (dir) { - throw new Error('process.chdir is not supported'); -}function umask() { return 0; } - -// from https://github.com/kumavis/browser-process-hrtime/blob/master/index.js -var performance$1 = global$1.performance || {}; -var performanceNow = - performance$1.now || - performance$1.mozNow || - performance$1.msNow || - performance$1.oNow || - performance$1.webkitNow || - function(){ return (new Date()).getTime() }; - -// generate timestamp or delta -// see http://nodejs.org/api/process.html#process_process_hrtime -function hrtime(previousTimestamp){ - var clocktime = performanceNow.call(performance$1)*1e-3; - var seconds = Math.floor(clocktime); - var nanoseconds = Math.floor((clocktime%1)*1e9); - if (previousTimestamp) { - seconds = seconds - previousTimestamp[0]; - nanoseconds = nanoseconds - previousTimestamp[1]; - if (nanoseconds<0) { - seconds--; - nanoseconds += 1e9; - } - } - return [seconds,nanoseconds] -} - -var startTime = new Date(); -function uptime() { - var currentTime = new Date(); - var dif = currentTime - startTime; - return dif / 1000; -} - -var browser$1 = { - nextTick: nextTick, - title: title, - browser: browser, - env: env, - argv: argv, - version: version$1, - versions: versions, - on: on, - addListener: addListener, - once: once, - off: off, - removeListener: removeListener, - removeAllListeners: removeAllListeners, - emit: emit, - binding: binding, - cwd: cwd, - chdir: chdir, - umask: umask, - hrtime: hrtime, - platform: platform, - release: release, - config: config, - uptime: uptime -}; - -var process = browser$1; - -var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; - -function getDefaultExportFromCjs (x) { - return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x; -} - -function createCommonjsModule(fn) { - var module = { exports: {} }; - return fn(module, module.exports), module.exports; -} - -function commonjsRequire (path) { - throw new Error('Could not dynamically require "' + path + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.'); -} - -/* -object-assign -(c) Sindre Sorhus -@license MIT -*/ -/* eslint-disable no-unused-vars */ -var getOwnPropertySymbols = Object.getOwnPropertySymbols; -var hasOwnProperty$1 = Object.prototype.hasOwnProperty; -var propIsEnumerable = Object.prototype.propertyIsEnumerable; - -function toObject(val) { - if (val === null || val === undefined) { - throw new TypeError('Object.assign cannot be called with null or undefined'); - } - - return Object(val); -} - -function shouldUseNative() { - try { - if (!Object.assign) { - return false; - } - - // Detect buggy property enumeration order in older V8 versions. - - // https://bugs.chromium.org/p/v8/issues/detail?id=4118 - var test1 = new String('abc'); // eslint-disable-line no-new-wrappers - test1[5] = 'de'; - if (Object.getOwnPropertyNames(test1)[0] === '5') { - return false; - } - - // https://bugs.chromium.org/p/v8/issues/detail?id=3056 - var test2 = {}; - for (var i = 0; i < 10; i++) { - test2['_' + String.fromCharCode(i)] = i; - } - var order2 = Object.getOwnPropertyNames(test2).map(function (n) { - return test2[n]; - }); - if (order2.join('') !== '0123456789') { - return false; - } - - // https://bugs.chromium.org/p/v8/issues/detail?id=3056 - var test3 = {}; - 'abcdefghijklmnopqrst'.split('').forEach(function (letter) { - test3[letter] = letter; - }); - if (Object.keys(Object.assign({}, test3)).join('') !== - 'abcdefghijklmnopqrst') { - return false; - } - - return true; - } catch (err) { - // We don't expect any of the above to throw, but better to be safe. - return false; - } -} - -var objectAssign = shouldUseNative() ? Object.assign : function (target, source) { - var from; - var to = toObject(target); - var symbols; - - for (var s = 1; s < arguments.length; s++) { - from = Object(arguments[s]); - - for (var key in from) { - if (hasOwnProperty$1.call(from, key)) { - to[key] = from[key]; - } - } - - if (getOwnPropertySymbols) { - symbols = getOwnPropertySymbols(from); - for (var i = 0; i < symbols.length; i++) { - if (propIsEnumerable.call(from, symbols[i])) { - to[symbols[i]] = from[symbols[i]]; - } - } - } - } - - return to; -}; - -/** @license React v17.0.2 - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -var react_production_min = createCommonjsModule(function (module, exports) { -var n=60103,p=60106;exports.Fragment=60107;exports.StrictMode=60108;exports.Profiler=60114;var q=60109,r=60110,t=60112;exports.Suspense=60113;var u=60115,v=60116; -if("function"===typeof Symbol&&Symbol.for){var w=Symbol.for;n=w("react.element");p=w("react.portal");exports.Fragment=w("react.fragment");exports.StrictMode=w("react.strict_mode");exports.Profiler=w("react.profiler");q=w("react.provider");r=w("react.context");t=w("react.forward_ref");exports.Suspense=w("react.suspense");u=w("react.memo");v=w("react.lazy");}var x="function"===typeof Symbol&&Symbol.iterator; -function y(a){if(null===a||"object"!==typeof a)return null;a=x&&a[x]||a["@@iterator"];return "function"===typeof a?a:null}function z(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - args[_key - 1] = arguments[_key]; - } - - printWarning('warn', format, args); - } -} -function error(format) { - { - for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { - args[_key2 - 1] = arguments[_key2]; - } - - printWarning('error', format, args); - } -} - -function printWarning(level, format, args) { - // When changing this logic, you might want to also - // update consoleWithStackDev.www.js as well. - { - var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; - var stack = ReactDebugCurrentFrame.getStackAddendum(); - - if (stack !== '') { - format += '%s'; - args = args.concat([stack]); - } - - var argsWithFormat = args.map(function (item) { - return '' + item; - }); // Careful: RN currently depends on this prefix - - argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it - // breaks IE9: https://github.com/facebook/react/issues/13610 - // eslint-disable-next-line react-internal/no-production-logging - - Function.prototype.apply.call(console[level], console, argsWithFormat); - } -} - -var didWarnStateUpdateForUnmountedComponent = {}; - -function warnNoop(publicInstance, callerName) { - { - var _constructor = publicInstance.constructor; - var componentName = _constructor && (_constructor.displayName || _constructor.name) || 'ReactClass'; - var warningKey = componentName + "." + callerName; - - if (didWarnStateUpdateForUnmountedComponent[warningKey]) { - return; - } - - error("Can't call %s on a component that is not yet mounted. " + 'This is a no-op, but it might indicate a bug in your application. ' + 'Instead, assign to `this.state` directly or define a `state = {};` ' + 'class property with the desired state in the %s component.', callerName, componentName); - - didWarnStateUpdateForUnmountedComponent[warningKey] = true; - } -} -/** - * This is the abstract API for an update queue. - */ - - -var ReactNoopUpdateQueue = { - /** - * Checks whether or not this composite component is mounted. - * @param {ReactClass} publicInstance The instance we want to test. - * @return {boolean} True if mounted, false otherwise. - * @protected - * @final - */ - isMounted: function (publicInstance) { - return false; - }, - - /** - * Forces an update. This should only be invoked when it is known with - * certainty that we are **not** in a DOM transaction. - * - * You may want to call this when you know that some deeper aspect of the - * component's state has changed but `setState` was not called. - * - * This will not invoke `shouldComponentUpdate`, but it will invoke - * `componentWillUpdate` and `componentDidUpdate`. - * - * @param {ReactClass} publicInstance The instance that should rerender. - * @param {?function} callback Called after component is updated. - * @param {?string} callerName name of the calling function in the public API. - * @internal - */ - enqueueForceUpdate: function (publicInstance, callback, callerName) { - warnNoop(publicInstance, 'forceUpdate'); - }, - - /** - * Replaces all of the state. Always use this or `setState` to mutate state. - * You should treat `this.state` as immutable. - * - * There is no guarantee that `this.state` will be immediately updated, so - * accessing `this.state` after calling this method may return the old value. - * - * @param {ReactClass} publicInstance The instance that should rerender. - * @param {object} completeState Next state. - * @param {?function} callback Called after component is updated. - * @param {?string} callerName name of the calling function in the public API. - * @internal - */ - enqueueReplaceState: function (publicInstance, completeState, callback, callerName) { - warnNoop(publicInstance, 'replaceState'); - }, - - /** - * Sets a subset of the state. This only exists because _pendingState is - * internal. This provides a merging strategy that is not available to deep - * properties which is confusing. TODO: Expose pendingState or don't use it - * during the merge. - * - * @param {ReactClass} publicInstance The instance that should rerender. - * @param {object} partialState Next partial state to be merged with state. - * @param {?function} callback Called after component is updated. - * @param {?string} Name of the calling function in the public API. - * @internal - */ - enqueueSetState: function (publicInstance, partialState, callback, callerName) { - warnNoop(publicInstance, 'setState'); - } -}; - -var emptyObject = {}; - -{ - Object.freeze(emptyObject); -} -/** - * Base class helpers for the updating state of a component. - */ - - -function Component(props, context, updater) { - this.props = props; - this.context = context; // If a component has string refs, we will assign a different object later. - - this.refs = emptyObject; // We initialize the default updater but the real one gets injected by the - // renderer. - - this.updater = updater || ReactNoopUpdateQueue; -} - -Component.prototype.isReactComponent = {}; -/** - * Sets a subset of the state. Always use this to mutate - * state. You should treat `this.state` as immutable. - * - * There is no guarantee that `this.state` will be immediately updated, so - * accessing `this.state` after calling this method may return the old value. - * - * There is no guarantee that calls to `setState` will run synchronously, - * as they may eventually be batched together. You can provide an optional - * callback that will be executed when the call to setState is actually - * completed. - * - * When a function is provided to setState, it will be called at some point in - * the future (not synchronously). It will be called with the up to date - * component arguments (state, props, context). These values can be different - * from this.* because your function may be called after receiveProps but before - * shouldComponentUpdate, and this new state, props, and context will not yet be - * assigned to this. - * - * @param {object|function} partialState Next partial state or function to - * produce next partial state to be merged with current state. - * @param {?function} callback Called after state is updated. - * @final - * @protected - */ - -Component.prototype.setState = function (partialState, callback) { - if (!(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null)) { - { - throw Error( "setState(...): takes an object of state variables to update or a function which returns an object of state variables." ); - } - } - - this.updater.enqueueSetState(this, partialState, callback, 'setState'); -}; -/** - * Forces an update. This should only be invoked when it is known with - * certainty that we are **not** in a DOM transaction. - * - * You may want to call this when you know that some deeper aspect of the - * component's state has changed but `setState` was not called. - * - * This will not invoke `shouldComponentUpdate`, but it will invoke - * `componentWillUpdate` and `componentDidUpdate`. - * - * @param {?function} callback Called after update is complete. - * @final - * @protected - */ - - -Component.prototype.forceUpdate = function (callback) { - this.updater.enqueueForceUpdate(this, callback, 'forceUpdate'); -}; -/** - * Deprecated APIs. These APIs used to exist on classic React classes but since - * we would like to deprecate them, we're not going to move them over to this - * modern base class. Instead, we define a getter that warns if it's accessed. - */ - - -{ - var deprecatedAPIs = { - isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'], - replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).'] - }; - - var defineDeprecationWarning = function (methodName, info) { - Object.defineProperty(Component.prototype, methodName, { - get: function () { - warn('%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]); - - return undefined; - } - }); - }; - - for (var fnName in deprecatedAPIs) { - if (deprecatedAPIs.hasOwnProperty(fnName)) { - defineDeprecationWarning(fnName, deprecatedAPIs[fnName]); - } - } -} - -function ComponentDummy() {} - -ComponentDummy.prototype = Component.prototype; -/** - * Convenience component with default shallow equality check for sCU. - */ - -function PureComponent(props, context, updater) { - this.props = props; - this.context = context; // If a component has string refs, we will assign a different object later. - - this.refs = emptyObject; - this.updater = updater || ReactNoopUpdateQueue; -} - -var pureComponentPrototype = PureComponent.prototype = new ComponentDummy(); -pureComponentPrototype.constructor = PureComponent; // Avoid an extra prototype jump for these methods. - -_assign(pureComponentPrototype, Component.prototype); - -pureComponentPrototype.isPureReactComponent = true; - -// an immutable object with a single mutable value -function createRef() { - var refObject = { - current: null - }; - - { - Object.seal(refObject); - } - - return refObject; -} - -function getWrappedName(outerType, innerType, wrapperName) { - var functionName = innerType.displayName || innerType.name || ''; - return outerType.displayName || (functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName); -} - -function getContextName(type) { - return type.displayName || 'Context'; -} - -function getComponentName(type) { - if (type == null) { - // Host root, text node or just invalid type. - return null; - } - - { - if (typeof type.tag === 'number') { - error('Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.'); - } - } - - if (typeof type === 'function') { - return type.displayName || type.name || null; - } - - if (typeof type === 'string') { - return type; - } - - switch (type) { - case exports.Fragment: - return 'Fragment'; - - case REACT_PORTAL_TYPE: - return 'Portal'; - - case exports.Profiler: - return 'Profiler'; - - case exports.StrictMode: - return 'StrictMode'; - - case exports.Suspense: - return 'Suspense'; - - case REACT_SUSPENSE_LIST_TYPE: - return 'SuspenseList'; - } - - if (typeof type === 'object') { - switch (type.$$typeof) { - case REACT_CONTEXT_TYPE: - var context = type; - return getContextName(context) + '.Consumer'; - - case REACT_PROVIDER_TYPE: - var provider = type; - return getContextName(provider._context) + '.Provider'; - - case REACT_FORWARD_REF_TYPE: - return getWrappedName(type, type.render, 'ForwardRef'); - - case REACT_MEMO_TYPE: - return getComponentName(type.type); - - case REACT_BLOCK_TYPE: - return getComponentName(type._render); - - case REACT_LAZY_TYPE: - { - var lazyComponent = type; - var payload = lazyComponent._payload; - var init = lazyComponent._init; - - try { - return getComponentName(init(payload)); - } catch (x) { - return null; - } - } - } - } - - return null; -} - -var hasOwnProperty = Object.prototype.hasOwnProperty; -var RESERVED_PROPS = { - key: true, - ref: true, - __self: true, - __source: true -}; -var specialPropKeyWarningShown, specialPropRefWarningShown, didWarnAboutStringRefs; - -{ - didWarnAboutStringRefs = {}; -} - -function hasValidRef(config) { - { - if (hasOwnProperty.call(config, 'ref')) { - var getter = Object.getOwnPropertyDescriptor(config, 'ref').get; - - if (getter && getter.isReactWarning) { - return false; - } - } - } - - return config.ref !== undefined; -} - -function hasValidKey(config) { - { - if (hasOwnProperty.call(config, 'key')) { - var getter = Object.getOwnPropertyDescriptor(config, 'key').get; - - if (getter && getter.isReactWarning) { - return false; - } - } - } - - return config.key !== undefined; -} - -function defineKeyPropWarningGetter(props, displayName) { - var warnAboutAccessingKey = function () { - { - if (!specialPropKeyWarningShown) { - specialPropKeyWarningShown = true; - - error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName); - } - } - }; - - warnAboutAccessingKey.isReactWarning = true; - Object.defineProperty(props, 'key', { - get: warnAboutAccessingKey, - configurable: true - }); -} - -function defineRefPropWarningGetter(props, displayName) { - var warnAboutAccessingRef = function () { - { - if (!specialPropRefWarningShown) { - specialPropRefWarningShown = true; - - error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName); - } - } - }; - - warnAboutAccessingRef.isReactWarning = true; - Object.defineProperty(props, 'ref', { - get: warnAboutAccessingRef, - configurable: true - }); -} - -function warnIfStringRefCannotBeAutoConverted(config) { - { - if (typeof config.ref === 'string' && ReactCurrentOwner.current && config.__self && ReactCurrentOwner.current.stateNode !== config.__self) { - var componentName = getComponentName(ReactCurrentOwner.current.type); - - if (!didWarnAboutStringRefs[componentName]) { - error('Component "%s" contains the string ref "%s". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', componentName, config.ref); - - didWarnAboutStringRefs[componentName] = true; - } - } - } -} -/** - * Factory method to create a new React element. This no longer adheres to - * the class pattern, so do not use new to call it. Also, instanceof check - * will not work. Instead test $$typeof field against Symbol.for('react.element') to check - * if something is a React Element. - * - * @param {*} type - * @param {*} props - * @param {*} key - * @param {string|object} ref - * @param {*} owner - * @param {*} self A *temporary* helper to detect places where `this` is - * different from the `owner` when React.createElement is called, so that we - * can warn. We want to get rid of owner and replace string `ref`s with arrow - * functions, and as long as `this` and owner are the same, there will be no - * change in behavior. - * @param {*} source An annotation object (added by a transpiler or otherwise) - * indicating filename, line number, and/or other information. - * @internal - */ - - -var ReactElement = function (type, key, ref, self, source, owner, props) { - var element = { - // This tag allows us to uniquely identify this as a React Element - $$typeof: REACT_ELEMENT_TYPE, - // Built-in properties that belong on the element - type: type, - key: key, - ref: ref, - props: props, - // Record the component responsible for creating this element. - _owner: owner - }; - - { - // The validation flag is currently mutative. We put it on - // an external backing store so that we can freeze the whole object. - // This can be replaced with a WeakMap once they are implemented in - // commonly used development environments. - element._store = {}; // To make comparing ReactElements easier for testing purposes, we make - // the validation flag non-enumerable (where possible, which should - // include every environment we run tests in), so the test framework - // ignores it. - - Object.defineProperty(element._store, 'validated', { - configurable: false, - enumerable: false, - writable: true, - value: false - }); // self and source are DEV only properties. - - Object.defineProperty(element, '_self', { - configurable: false, - enumerable: false, - writable: false, - value: self - }); // Two elements created in two different places should be considered - // equal for testing purposes and therefore we hide it from enumeration. - - Object.defineProperty(element, '_source', { - configurable: false, - enumerable: false, - writable: false, - value: source - }); - - if (Object.freeze) { - Object.freeze(element.props); - Object.freeze(element); - } - } - - return element; -}; -/** - * Create and return a new ReactElement of the given type. - * See https://reactjs.org/docs/react-api.html#createelement - */ - -function createElement(type, config, children) { - var propName; // Reserved names are extracted - - var props = {}; - var key = null; - var ref = null; - var self = null; - var source = null; - - if (config != null) { - if (hasValidRef(config)) { - ref = config.ref; - - { - warnIfStringRefCannotBeAutoConverted(config); - } - } - - if (hasValidKey(config)) { - key = '' + config.key; - } - - self = config.__self === undefined ? null : config.__self; - source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object - - for (propName in config) { - if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { - props[propName] = config[propName]; - } - } - } // Children can be more than one argument, and those are transferred onto - // the newly allocated props object. - - - var childrenLength = arguments.length - 2; - - if (childrenLength === 1) { - props.children = children; - } else if (childrenLength > 1) { - var childArray = Array(childrenLength); - - for (var i = 0; i < childrenLength; i++) { - childArray[i] = arguments[i + 2]; - } - - { - if (Object.freeze) { - Object.freeze(childArray); - } - } - - props.children = childArray; - } // Resolve default props - - - if (type && type.defaultProps) { - var defaultProps = type.defaultProps; - - for (propName in defaultProps) { - if (props[propName] === undefined) { - props[propName] = defaultProps[propName]; - } - } - } - - { - if (key || ref) { - var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type; - - if (key) { - defineKeyPropWarningGetter(props, displayName); - } - - if (ref) { - defineRefPropWarningGetter(props, displayName); - } - } - } - - return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props); -} -function cloneAndReplaceKey(oldElement, newKey) { - var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props); - return newElement; -} -/** - * Clone and return a new ReactElement using element as the starting point. - * See https://reactjs.org/docs/react-api.html#cloneelement - */ - -function cloneElement(element, config, children) { - if (!!(element === null || element === undefined)) { - { - throw Error( "React.cloneElement(...): The argument must be a React element, but you passed " + element + "." ); - } - } - - var propName; // Original props are copied - - var props = _assign({}, element.props); // Reserved names are extracted - - - var key = element.key; - var ref = element.ref; // Self is preserved since the owner is preserved. - - var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a - // transpiler, and the original source is probably a better indicator of the - // true owner. - - var source = element._source; // Owner will be preserved, unless ref is overridden - - var owner = element._owner; - - if (config != null) { - if (hasValidRef(config)) { - // Silently steal the ref from the parent. - ref = config.ref; - owner = ReactCurrentOwner.current; - } - - if (hasValidKey(config)) { - key = '' + config.key; - } // Remaining properties override existing props - - - var defaultProps; - - if (element.type && element.type.defaultProps) { - defaultProps = element.type.defaultProps; - } - - for (propName in config) { - if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { - if (config[propName] === undefined && defaultProps !== undefined) { - // Resolve default props - props[propName] = defaultProps[propName]; - } else { - props[propName] = config[propName]; - } - } - } - } // Children can be more than one argument, and those are transferred onto - // the newly allocated props object. - - - var childrenLength = arguments.length - 2; - - if (childrenLength === 1) { - props.children = children; - } else if (childrenLength > 1) { - var childArray = Array(childrenLength); - - for (var i = 0; i < childrenLength; i++) { - childArray[i] = arguments[i + 2]; - } - - props.children = childArray; - } - - return ReactElement(element.type, key, ref, self, source, owner, props); -} -/** - * Verifies the object is a ReactElement. - * See https://reactjs.org/docs/react-api.html#isvalidelement - * @param {?object} object - * @return {boolean} True if `object` is a ReactElement. - * @final - */ - -function isValidElement(object) { - return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; -} - -var SEPARATOR = '.'; -var SUBSEPARATOR = ':'; -/** - * Escape and wrap key so it is safe to use as a reactid - * - * @param {string} key to be escaped. - * @return {string} the escaped key. - */ - -function escape(key) { - var escapeRegex = /[=:]/g; - var escaperLookup = { - '=': '=0', - ':': '=2' - }; - var escapedString = key.replace(escapeRegex, function (match) { - return escaperLookup[match]; - }); - return '$' + escapedString; -} -/** - * TODO: Test that a single child and an array with one item have the same key - * pattern. - */ - - -var didWarnAboutMaps = false; -var userProvidedKeyEscapeRegex = /\/+/g; - -function escapeUserProvidedKey(text) { - return text.replace(userProvidedKeyEscapeRegex, '$&/'); -} -/** - * Generate a key string that identifies a element within a set. - * - * @param {*} element A element that could contain a manual key. - * @param {number} index Index that is used if a manual key is not provided. - * @return {string} - */ - - -function getElementKey(element, index) { - // Do some typechecking here since we call this blindly. We want to ensure - // that we don't block potential future ES APIs. - if (typeof element === 'object' && element !== null && element.key != null) { - // Explicit key - return escape('' + element.key); - } // Implicit key determined by the index in the set - - - return index.toString(36); -} - -function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) { - var type = typeof children; - - if (type === 'undefined' || type === 'boolean') { - // All of the above are perceived as null. - children = null; - } - - var invokeCallback = false; - - if (children === null) { - invokeCallback = true; - } else { - switch (type) { - case 'string': - case 'number': - invokeCallback = true; - break; - - case 'object': - switch (children.$$typeof) { - case REACT_ELEMENT_TYPE: - case REACT_PORTAL_TYPE: - invokeCallback = true; - } - - } - } - - if (invokeCallback) { - var _child = children; - var mappedChild = callback(_child); // If it's the only child, treat the name as if it was wrapped in an array - // so that it's consistent if the number of children grows: - - var childKey = nameSoFar === '' ? SEPARATOR + getElementKey(_child, 0) : nameSoFar; - - if (Array.isArray(mappedChild)) { - var escapedChildKey = ''; - - if (childKey != null) { - escapedChildKey = escapeUserProvidedKey(childKey) + '/'; - } - - mapIntoArray(mappedChild, array, escapedChildKey, '', function (c) { - return c; - }); - } else if (mappedChild != null) { - if (isValidElement(mappedChild)) { - mappedChild = cloneAndReplaceKey(mappedChild, // Keep both the (mapped) and old keys if they differ, just as - // traverseAllChildren used to do for objects as children - escapedPrefix + ( // $FlowFixMe Flow incorrectly thinks React.Portal doesn't have a key - mappedChild.key && (!_child || _child.key !== mappedChild.key) ? // $FlowFixMe Flow incorrectly thinks existing element's key can be a number - escapeUserProvidedKey('' + mappedChild.key) + '/' : '') + childKey); - } - - array.push(mappedChild); - } - - return 1; - } - - var child; - var nextName; - var subtreeCount = 0; // Count of children found in the current subtree. - - var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR; - - if (Array.isArray(children)) { - for (var i = 0; i < children.length; i++) { - child = children[i]; - nextName = nextNamePrefix + getElementKey(child, i); - subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback); - } - } else { - var iteratorFn = getIteratorFn(children); - - if (typeof iteratorFn === 'function') { - var iterableChildren = children; - - { - // Warn about using Maps as children - if (iteratorFn === iterableChildren.entries) { - if (!didWarnAboutMaps) { - warn('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.'); - } - - didWarnAboutMaps = true; - } - } - - var iterator = iteratorFn.call(iterableChildren); - var step; - var ii = 0; - - while (!(step = iterator.next()).done) { - child = step.value; - nextName = nextNamePrefix + getElementKey(child, ii++); - subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback); - } - } else if (type === 'object') { - var childrenString = '' + children; - - { - { - throw Error( "Objects are not valid as a React child (found: " + (childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString) + "). If you meant to render a collection of children, use an array instead." ); - } - } - } - } - - return subtreeCount; -} - -/** - * Maps children that are typically specified as `props.children`. - * - * See https://reactjs.org/docs/react-api.html#reactchildrenmap - * - * The provided mapFunction(child, index) will be called for each - * leaf child. - * - * @param {?*} children Children tree container. - * @param {function(*, int)} func The map function. - * @param {*} context Context for mapFunction. - * @return {object} Object containing the ordered map of results. - */ -function mapChildren(children, func, context) { - if (children == null) { - return children; - } - - var result = []; - var count = 0; - mapIntoArray(children, result, '', '', function (child) { - return func.call(context, child, count++); - }); - return result; -} -/** - * Count the number of children that are typically specified as - * `props.children`. - * - * See https://reactjs.org/docs/react-api.html#reactchildrencount - * - * @param {?*} children Children tree container. - * @return {number} The number of children. - */ - - -function countChildren(children) { - var n = 0; - mapChildren(children, function () { - n++; // Don't return anything - }); - return n; -} - -/** - * Iterates through children that are typically specified as `props.children`. - * - * See https://reactjs.org/docs/react-api.html#reactchildrenforeach - * - * The provided forEachFunc(child, index) will be called for each - * leaf child. - * - * @param {?*} children Children tree container. - * @param {function(*, int)} forEachFunc - * @param {*} forEachContext Context for forEachContext. - */ -function forEachChildren(children, forEachFunc, forEachContext) { - mapChildren(children, function () { - forEachFunc.apply(this, arguments); // Don't return anything. - }, forEachContext); -} -/** - * Flatten a children object (typically specified as `props.children`) and - * return an array with appropriately re-keyed children. - * - * See https://reactjs.org/docs/react-api.html#reactchildrentoarray - */ - - -function toArray(children) { - return mapChildren(children, function (child) { - return child; - }) || []; -} -/** - * Returns the first child in a collection of children and verifies that there - * is only one child in the collection. - * - * See https://reactjs.org/docs/react-api.html#reactchildrenonly - * - * The current implementation of this function assumes that a single child gets - * passed without a wrapper, but the purpose of this helper function is to - * abstract away the particular structure of children. - * - * @param {?object} children Child collection structure. - * @return {ReactElement} The first and only `ReactElement` contained in the - * structure. - */ - - -function onlyChild(children) { - if (!isValidElement(children)) { - { - throw Error( "React.Children.only expected to receive a single React element child." ); - } - } - - return children; -} - -function createContext(defaultValue, calculateChangedBits) { - if (calculateChangedBits === undefined) { - calculateChangedBits = null; - } else { - { - if (calculateChangedBits !== null && typeof calculateChangedBits !== 'function') { - error('createContext: Expected the optional second argument to be a ' + 'function. Instead received: %s', calculateChangedBits); - } - } - } - - var context = { - $$typeof: REACT_CONTEXT_TYPE, - _calculateChangedBits: calculateChangedBits, - // As a workaround to support multiple concurrent renderers, we categorize - // some renderers as primary and others as secondary. We only expect - // there to be two concurrent renderers at most: React Native (primary) and - // Fabric (secondary); React DOM (primary) and React ART (secondary). - // Secondary renderers store their context values on separate fields. - _currentValue: defaultValue, - _currentValue2: defaultValue, - // Used to track how many concurrent renderers this context currently - // supports within in a single renderer. Such as parallel server rendering. - _threadCount: 0, - // These are circular - Provider: null, - Consumer: null - }; - context.Provider = { - $$typeof: REACT_PROVIDER_TYPE, - _context: context - }; - var hasWarnedAboutUsingNestedContextConsumers = false; - var hasWarnedAboutUsingConsumerProvider = false; - var hasWarnedAboutDisplayNameOnConsumer = false; - - { - // A separate object, but proxies back to the original context object for - // backwards compatibility. It has a different $$typeof, so we can properly - // warn for the incorrect usage of Context as a Consumer. - var Consumer = { - $$typeof: REACT_CONTEXT_TYPE, - _context: context, - _calculateChangedBits: context._calculateChangedBits - }; // $FlowFixMe: Flow complains about not setting a value, which is intentional here - - Object.defineProperties(Consumer, { - Provider: { - get: function () { - if (!hasWarnedAboutUsingConsumerProvider) { - hasWarnedAboutUsingConsumerProvider = true; - - error('Rendering is not supported and will be removed in ' + 'a future major release. Did you mean to render instead?'); - } - - return context.Provider; - }, - set: function (_Provider) { - context.Provider = _Provider; - } - }, - _currentValue: { - get: function () { - return context._currentValue; - }, - set: function (_currentValue) { - context._currentValue = _currentValue; - } - }, - _currentValue2: { - get: function () { - return context._currentValue2; - }, - set: function (_currentValue2) { - context._currentValue2 = _currentValue2; - } - }, - _threadCount: { - get: function () { - return context._threadCount; - }, - set: function (_threadCount) { - context._threadCount = _threadCount; - } - }, - Consumer: { - get: function () { - if (!hasWarnedAboutUsingNestedContextConsumers) { - hasWarnedAboutUsingNestedContextConsumers = true; - - error('Rendering is not supported and will be removed in ' + 'a future major release. Did you mean to render instead?'); - } - - return context.Consumer; - } - }, - displayName: { - get: function () { - return context.displayName; - }, - set: function (displayName) { - if (!hasWarnedAboutDisplayNameOnConsumer) { - warn('Setting `displayName` on Context.Consumer has no effect. ' + "You should set it directly on the context with Context.displayName = '%s'.", displayName); - - hasWarnedAboutDisplayNameOnConsumer = true; - } - } - } - }); // $FlowFixMe: Flow complains about missing properties because it doesn't understand defineProperty - - context.Consumer = Consumer; - } - - { - context._currentRenderer = null; - context._currentRenderer2 = null; - } - - return context; -} - -var Uninitialized = -1; -var Pending = 0; -var Resolved = 1; -var Rejected = 2; - -function lazyInitializer(payload) { - if (payload._status === Uninitialized) { - var ctor = payload._result; - var thenable = ctor(); // Transition to the next state. - - var pending = payload; - pending._status = Pending; - pending._result = thenable; - thenable.then(function (moduleObject) { - if (payload._status === Pending) { - var defaultExport = moduleObject.default; - - { - if (defaultExport === undefined) { - error('lazy: Expected the result of a dynamic import() call. ' + 'Instead received: %s\n\nYour code should look like: \n ' + // Break up imports to avoid accidentally parsing them as dependencies. - 'const MyComponent = lazy(() => imp' + "ort('./MyComponent'))", moduleObject); - } - } // Transition to the next state. - - - var resolved = payload; - resolved._status = Resolved; - resolved._result = defaultExport; - } - }, function (error) { - if (payload._status === Pending) { - // Transition to the next state. - var rejected = payload; - rejected._status = Rejected; - rejected._result = error; - } - }); - } - - if (payload._status === Resolved) { - return payload._result; - } else { - throw payload._result; - } -} - -function lazy(ctor) { - var payload = { - // We use these fields to store the result. - _status: -1, - _result: ctor - }; - var lazyType = { - $$typeof: REACT_LAZY_TYPE, - _payload: payload, - _init: lazyInitializer - }; - - { - // In production, this would just set it on the object. - var defaultProps; - var propTypes; // $FlowFixMe - - Object.defineProperties(lazyType, { - defaultProps: { - configurable: true, - get: function () { - return defaultProps; - }, - set: function (newDefaultProps) { - error('React.lazy(...): It is not supported to assign `defaultProps` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.'); - - defaultProps = newDefaultProps; // Match production behavior more closely: - // $FlowFixMe - - Object.defineProperty(lazyType, 'defaultProps', { - enumerable: true - }); - } - }, - propTypes: { - configurable: true, - get: function () { - return propTypes; - }, - set: function (newPropTypes) { - error('React.lazy(...): It is not supported to assign `propTypes` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.'); - - propTypes = newPropTypes; // Match production behavior more closely: - // $FlowFixMe - - Object.defineProperty(lazyType, 'propTypes', { - enumerable: true - }); - } - } - }); - } - - return lazyType; -} - -function forwardRef(render) { - { - if (render != null && render.$$typeof === REACT_MEMO_TYPE) { - error('forwardRef requires a render function but received a `memo` ' + 'component. Instead of forwardRef(memo(...)), use ' + 'memo(forwardRef(...)).'); - } else if (typeof render !== 'function') { - error('forwardRef requires a render function but was given %s.', render === null ? 'null' : typeof render); - } else { - if (render.length !== 0 && render.length !== 2) { - error('forwardRef render functions accept exactly two parameters: props and ref. %s', render.length === 1 ? 'Did you forget to use the ref parameter?' : 'Any additional parameter will be undefined.'); - } - } - - if (render != null) { - if (render.defaultProps != null || render.propTypes != null) { - error('forwardRef render functions do not support propTypes or defaultProps. ' + 'Did you accidentally pass a React component?'); - } - } - } - - var elementType = { - $$typeof: REACT_FORWARD_REF_TYPE, - render: render - }; - - { - var ownName; - Object.defineProperty(elementType, 'displayName', { - enumerable: false, - configurable: true, - get: function () { - return ownName; - }, - set: function (name) { - ownName = name; - - if (render.displayName == null) { - render.displayName = name; - } - } - }); - } - - return elementType; -} - -// Filter certain DOM attributes (e.g. src, href) if their values are empty strings. - -var enableScopeAPI = false; // Experimental Create Event Handle API. - -function isValidElementType(type) { - if (typeof type === 'string' || typeof type === 'function') { - return true; - } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill). - - - if (type === exports.Fragment || type === exports.Profiler || type === REACT_DEBUG_TRACING_MODE_TYPE || type === exports.StrictMode || type === exports.Suspense || type === REACT_SUSPENSE_LIST_TYPE || type === REACT_LEGACY_HIDDEN_TYPE || enableScopeAPI ) { - return true; - } - - if (typeof type === 'object' && type !== null) { - if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_BLOCK_TYPE || type[0] === REACT_SERVER_BLOCK_TYPE) { - return true; - } - } - - return false; -} - -function memo(type, compare) { - { - if (!isValidElementType(type)) { - error('memo: The first argument must be a component. Instead ' + 'received: %s', type === null ? 'null' : typeof type); - } - } - - var elementType = { - $$typeof: REACT_MEMO_TYPE, - type: type, - compare: compare === undefined ? null : compare - }; - - { - var ownName; - Object.defineProperty(elementType, 'displayName', { - enumerable: false, - configurable: true, - get: function () { - return ownName; - }, - set: function (name) { - ownName = name; - - if (type.displayName == null) { - type.displayName = name; - } - } - }); - } - - return elementType; -} - -function resolveDispatcher() { - var dispatcher = ReactCurrentDispatcher.current; - - if (!(dispatcher !== null)) { - { - throw Error( "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem." ); - } - } - - return dispatcher; -} - -function useContext(Context, unstable_observedBits) { - var dispatcher = resolveDispatcher(); - - { - if (unstable_observedBits !== undefined) { - error('useContext() second argument is reserved for future ' + 'use in React. Passing it is not supported. ' + 'You passed: %s.%s', unstable_observedBits, typeof unstable_observedBits === 'number' && Array.isArray(arguments[2]) ? '\n\nDid you call array.map(useContext)? ' + 'Calling Hooks inside a loop is not supported. ' + 'Learn more at https://reactjs.org/link/rules-of-hooks' : ''); - } // TODO: add a more generic warning for invalid values. - - - if (Context._context !== undefined) { - var realContext = Context._context; // Don't deduplicate because this legitimately causes bugs - // and nobody should be using this in existing code. - - if (realContext.Consumer === Context) { - error('Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be ' + 'removed in a future major release. Did you mean to call useContext(Context) instead?'); - } else if (realContext.Provider === Context) { - error('Calling useContext(Context.Provider) is not supported. ' + 'Did you mean to call useContext(Context) instead?'); - } - } - } - - return dispatcher.useContext(Context, unstable_observedBits); -} -function useState(initialState) { - var dispatcher = resolveDispatcher(); - return dispatcher.useState(initialState); -} -function useReducer(reducer, initialArg, init) { - var dispatcher = resolveDispatcher(); - return dispatcher.useReducer(reducer, initialArg, init); -} -function useRef(initialValue) { - var dispatcher = resolveDispatcher(); - return dispatcher.useRef(initialValue); -} -function useEffect(create, deps) { - var dispatcher = resolveDispatcher(); - return dispatcher.useEffect(create, deps); -} -function useLayoutEffect(create, deps) { - var dispatcher = resolveDispatcher(); - return dispatcher.useLayoutEffect(create, deps); -} -function useCallback(callback, deps) { - var dispatcher = resolveDispatcher(); - return dispatcher.useCallback(callback, deps); -} -function useMemo(create, deps) { - var dispatcher = resolveDispatcher(); - return dispatcher.useMemo(create, deps); -} -function useImperativeHandle(ref, create, deps) { - var dispatcher = resolveDispatcher(); - return dispatcher.useImperativeHandle(ref, create, deps); -} -function useDebugValue(value, formatterFn) { - { - var dispatcher = resolveDispatcher(); - return dispatcher.useDebugValue(value, formatterFn); - } -} - -// Helpers to patch console.logs to avoid logging during side-effect free -// replaying on render function. This currently only patches the object -// lazily which won't cover if the log function was extracted eagerly. -// We could also eagerly patch the method. -var disabledDepth = 0; -var prevLog; -var prevInfo; -var prevWarn; -var prevError; -var prevGroup; -var prevGroupCollapsed; -var prevGroupEnd; - -function disabledLog() {} - -disabledLog.__reactDisabledLog = true; -function disableLogs() { - { - if (disabledDepth === 0) { - /* eslint-disable react-internal/no-production-logging */ - prevLog = console.log; - prevInfo = console.info; - prevWarn = console.warn; - prevError = console.error; - prevGroup = console.group; - prevGroupCollapsed = console.groupCollapsed; - prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099 - - var props = { - configurable: true, - enumerable: true, - value: disabledLog, - writable: true - }; // $FlowFixMe Flow thinks console is immutable. - - Object.defineProperties(console, { - info: props, - log: props, - warn: props, - error: props, - group: props, - groupCollapsed: props, - groupEnd: props - }); - /* eslint-enable react-internal/no-production-logging */ - } - - disabledDepth++; - } -} -function reenableLogs() { - { - disabledDepth--; - - if (disabledDepth === 0) { - /* eslint-disable react-internal/no-production-logging */ - var props = { - configurable: true, - enumerable: true, - writable: true - }; // $FlowFixMe Flow thinks console is immutable. - - Object.defineProperties(console, { - log: _assign({}, props, { - value: prevLog - }), - info: _assign({}, props, { - value: prevInfo - }), - warn: _assign({}, props, { - value: prevWarn - }), - error: _assign({}, props, { - value: prevError - }), - group: _assign({}, props, { - value: prevGroup - }), - groupCollapsed: _assign({}, props, { - value: prevGroupCollapsed - }), - groupEnd: _assign({}, props, { - value: prevGroupEnd - }) - }); - /* eslint-enable react-internal/no-production-logging */ - } - - if (disabledDepth < 0) { - error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.'); - } - } -} - -var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher; -var prefix; -function describeBuiltInComponentFrame(name, source, ownerFn) { - { - if (prefix === undefined) { - // Extract the VM specific prefix used by each line. - try { - throw Error(); - } catch (x) { - var match = x.stack.trim().match(/\n( *(at )?)/); - prefix = match && match[1] || ''; - } - } // We use the prefix to ensure our stacks line up with native stack frames. - - - return '\n' + prefix + name; - } -} -var reentry = false; -var componentFrameCache; - -{ - var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map; - componentFrameCache = new PossiblyWeakMap(); -} - -function describeNativeComponentFrame(fn, construct) { - // If something asked for a stack inside a fake render, it should get ignored. - if (!fn || reentry) { - return ''; - } - - { - var frame = componentFrameCache.get(fn); - - if (frame !== undefined) { - return frame; - } - } - - var control; - reentry = true; - var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined. - - Error.prepareStackTrace = undefined; - var previousDispatcher; - - { - previousDispatcher = ReactCurrentDispatcher$1.current; // Set the dispatcher in DEV because this might be call in the render function - // for warnings. - - ReactCurrentDispatcher$1.current = null; - disableLogs(); - } - - try { - // This should throw. - if (construct) { - // Something should be setting the props in the constructor. - var Fake = function () { - throw Error(); - }; // $FlowFixMe - - - Object.defineProperty(Fake.prototype, 'props', { - set: function () { - // We use a throwing setter instead of frozen or non-writable props - // because that won't throw in a non-strict mode function. - throw Error(); - } - }); - - if (typeof Reflect === 'object' && Reflect.construct) { - // We construct a different control for this case to include any extra - // frames added by the construct call. - try { - Reflect.construct(Fake, []); - } catch (x) { - control = x; - } - - Reflect.construct(fn, [], Fake); - } else { - try { - Fake.call(); - } catch (x) { - control = x; - } - - fn.call(Fake.prototype); - } - } else { - try { - throw Error(); - } catch (x) { - control = x; - } - - fn(); - } - } catch (sample) { - // This is inlined manually because closure doesn't do it for us. - if (sample && control && typeof sample.stack === 'string') { - // This extracts the first frame from the sample that isn't also in the control. - // Skipping one frame that we assume is the frame that calls the two. - var sampleLines = sample.stack.split('\n'); - var controlLines = control.stack.split('\n'); - var s = sampleLines.length - 1; - var c = controlLines.length - 1; - - while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) { - // We expect at least one stack frame to be shared. - // Typically this will be the root most one. However, stack frames may be - // cut off due to maximum stack limits. In this case, one maybe cut off - // earlier than the other. We assume that the sample is longer or the same - // and there for cut off earlier. So we should find the root most frame in - // the sample somewhere in the control. - c--; - } - - for (; s >= 1 && c >= 0; s--, c--) { - // Next we find the first one that isn't the same which should be the - // frame that called our sample function and the control. - if (sampleLines[s] !== controlLines[c]) { - // In V8, the first line is describing the message but other VMs don't. - // If we're about to return the first line, and the control is also on the same - // line, that's a pretty good indicator that our sample threw at same line as - // the control. I.e. before we entered the sample frame. So we ignore this result. - // This can happen if you passed a class to function component, or non-function. - if (s !== 1 || c !== 1) { - do { - s--; - c--; // We may still have similar intermediate frames from the construct call. - // The next one that isn't the same should be our match though. - - if (c < 0 || sampleLines[s] !== controlLines[c]) { - // V8 adds a "new" prefix for native classes. Let's remove it to make it prettier. - var _frame = '\n' + sampleLines[s].replace(' at new ', ' at '); - - { - if (typeof fn === 'function') { - componentFrameCache.set(fn, _frame); - } - } // Return the line we found. - - - return _frame; - } - } while (s >= 1 && c >= 0); - } - - break; - } - } - } - } finally { - reentry = false; - - { - ReactCurrentDispatcher$1.current = previousDispatcher; - reenableLogs(); - } - - Error.prepareStackTrace = previousPrepareStackTrace; - } // Fallback to just using the name if we couldn't make it throw. - - - var name = fn ? fn.displayName || fn.name : ''; - var syntheticFrame = name ? describeBuiltInComponentFrame(name) : ''; - - { - if (typeof fn === 'function') { - componentFrameCache.set(fn, syntheticFrame); - } - } - - return syntheticFrame; -} -function describeFunctionComponentFrame(fn, source, ownerFn) { - { - return describeNativeComponentFrame(fn, false); - } -} - -function shouldConstruct(Component) { - var prototype = Component.prototype; - return !!(prototype && prototype.isReactComponent); -} - -function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) { - - if (type == null) { - return ''; - } - - if (typeof type === 'function') { - { - return describeNativeComponentFrame(type, shouldConstruct(type)); - } - } - - if (typeof type === 'string') { - return describeBuiltInComponentFrame(type); - } - - switch (type) { - case exports.Suspense: - return describeBuiltInComponentFrame('Suspense'); - - case REACT_SUSPENSE_LIST_TYPE: - return describeBuiltInComponentFrame('SuspenseList'); - } - - if (typeof type === 'object') { - switch (type.$$typeof) { - case REACT_FORWARD_REF_TYPE: - return describeFunctionComponentFrame(type.render); - - case REACT_MEMO_TYPE: - // Memo may contain any component type so we recursively resolve it. - return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn); - - case REACT_BLOCK_TYPE: - return describeFunctionComponentFrame(type._render); - - case REACT_LAZY_TYPE: - { - var lazyComponent = type; - var payload = lazyComponent._payload; - var init = lazyComponent._init; - - try { - // Lazy may contain any component type so we recursively resolve it. - return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn); - } catch (x) {} - } - } - } - - return ''; -} - -var loggedTypeFailures = {}; -var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame; - -function setCurrentlyValidatingElement(element) { - { - if (element) { - var owner = element._owner; - var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null); - ReactDebugCurrentFrame$1.setExtraStackFrame(stack); - } else { - ReactDebugCurrentFrame$1.setExtraStackFrame(null); - } - } -} - -function checkPropTypes(typeSpecs, values, location, componentName, element) { - { - // $FlowFixMe This is okay but Flow doesn't know it. - var has = Function.call.bind(Object.prototype.hasOwnProperty); - - for (var typeSpecName in typeSpecs) { - if (has(typeSpecs, typeSpecName)) { - var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to - // fail the render phase where it didn't fail before. So we log it. - // After these have been cleaned up, we'll let them throw. - - try { - // This is intentionally an invariant that gets caught. It's the same - // behavior as without this statement except with a better message. - if (typeof typeSpecs[typeSpecName] !== 'function') { - var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'); - err.name = 'Invariant Violation'; - throw err; - } - - error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'); - } catch (ex) { - error$1 = ex; - } - - if (error$1 && !(error$1 instanceof Error)) { - setCurrentlyValidatingElement(element); - - error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1); - - setCurrentlyValidatingElement(null); - } - - if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) { - // Only monitor this failure once because there tends to be a lot of the - // same error. - loggedTypeFailures[error$1.message] = true; - setCurrentlyValidatingElement(element); - - error('Failed %s type: %s', location, error$1.message); - - setCurrentlyValidatingElement(null); - } - } - } - } -} - -function setCurrentlyValidatingElement$1(element) { - { - if (element) { - var owner = element._owner; - var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null); - setExtraStackFrame(stack); - } else { - setExtraStackFrame(null); - } - } -} - -var propTypesMisspellWarningShown; - -{ - propTypesMisspellWarningShown = false; -} - -function getDeclarationErrorAddendum() { - if (ReactCurrentOwner.current) { - var name = getComponentName(ReactCurrentOwner.current.type); - - if (name) { - return '\n\nCheck the render method of `' + name + '`.'; - } - } - - return ''; -} - -function getSourceInfoErrorAddendum(source) { - if (source !== undefined) { - var fileName = source.fileName.replace(/^.*[\\\/]/, ''); - var lineNumber = source.lineNumber; - return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.'; - } - - return ''; -} - -function getSourceInfoErrorAddendumForProps(elementProps) { - if (elementProps !== null && elementProps !== undefined) { - return getSourceInfoErrorAddendum(elementProps.__source); - } - - return ''; -} -/** - * Warn if there's no key explicitly set on dynamic arrays of children or - * object keys are not valid. This allows us to keep track of children between - * updates. - */ - - -var ownerHasKeyUseWarning = {}; - -function getCurrentComponentErrorInfo(parentType) { - var info = getDeclarationErrorAddendum(); - - if (!info) { - var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name; - - if (parentName) { - info = "\n\nCheck the top-level render call using <" + parentName + ">."; - } - } - - return info; -} -/** - * Warn if the element doesn't have an explicit key assigned to it. - * This element is in an array. The array could grow and shrink or be - * reordered. All children that haven't already been validated are required to - * have a "key" property assigned to it. Error statuses are cached so a warning - * will only be shown once. - * - * @internal - * @param {ReactElement} element Element that requires a key. - * @param {*} parentType element's parent's type. - */ - - -function validateExplicitKey(element, parentType) { - if (!element._store || element._store.validated || element.key != null) { - return; - } - - element._store.validated = true; - var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType); - - if (ownerHasKeyUseWarning[currentComponentErrorInfo]) { - return; - } - - ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a - // property, it may be the creator of the child that's responsible for - // assigning it a key. - - var childOwner = ''; - - if (element && element._owner && element._owner !== ReactCurrentOwner.current) { - // Give the component that originally created this child. - childOwner = " It was passed a child from " + getComponentName(element._owner.type) + "."; - } - - { - setCurrentlyValidatingElement$1(element); - - error('Each child in a list should have a unique "key" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner); - - setCurrentlyValidatingElement$1(null); - } -} -/** - * Ensure that every element either is passed in a static location, in an - * array with an explicit keys property defined, or in an object literal - * with valid key property. - * - * @internal - * @param {ReactNode} node Statically passed child of any type. - * @param {*} parentType node's parent's type. - */ - - -function validateChildKeys(node, parentType) { - if (typeof node !== 'object') { - return; - } - - if (Array.isArray(node)) { - for (var i = 0; i < node.length; i++) { - var child = node[i]; - - if (isValidElement(child)) { - validateExplicitKey(child, parentType); - } - } - } else if (isValidElement(node)) { - // This element was passed in a valid location. - if (node._store) { - node._store.validated = true; - } - } else if (node) { - var iteratorFn = getIteratorFn(node); - - if (typeof iteratorFn === 'function') { - // Entry iterators used to provide implicit keys, - // but now we print a separate warning for them later. - if (iteratorFn !== node.entries) { - var iterator = iteratorFn.call(node); - var step; - - while (!(step = iterator.next()).done) { - if (isValidElement(step.value)) { - validateExplicitKey(step.value, parentType); - } - } - } - } - } -} -/** - * Given an element, validate that its props follow the propTypes definition, - * provided by the type. - * - * @param {ReactElement} element - */ - - -function validatePropTypes(element) { - { - var type = element.type; - - if (type === null || type === undefined || typeof type === 'string') { - return; - } - - var propTypes; - - if (typeof type === 'function') { - propTypes = type.propTypes; - } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here. - // Inner props are checked in the reconciler. - type.$$typeof === REACT_MEMO_TYPE)) { - propTypes = type.propTypes; - } else { - return; - } - - if (propTypes) { - // Intentionally inside to avoid triggering lazy initializers: - var name = getComponentName(type); - checkPropTypes(propTypes, element.props, 'prop', name, element); - } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) { - propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers: - - var _name = getComponentName(type); - - error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown'); - } - - if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) { - error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.'); - } - } -} -/** - * Given a fragment, validate that it can only be provided with fragment props - * @param {ReactElement} fragment - */ - - -function validateFragmentProps(fragment) { - { - var keys = Object.keys(fragment.props); - - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - - if (key !== 'children' && key !== 'key') { - setCurrentlyValidatingElement$1(fragment); - - error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key); - - setCurrentlyValidatingElement$1(null); - break; - } - } - - if (fragment.ref !== null) { - setCurrentlyValidatingElement$1(fragment); - - error('Invalid attribute `ref` supplied to `React.Fragment`.'); - - setCurrentlyValidatingElement$1(null); - } - } -} -function createElementWithValidation(type, props, children) { - var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to - // succeed and there will likely be errors in render. - - if (!validType) { - var info = ''; - - if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) { - info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and named imports."; - } - - var sourceInfo = getSourceInfoErrorAddendumForProps(props); - - if (sourceInfo) { - info += sourceInfo; - } else { - info += getDeclarationErrorAddendum(); - } - - var typeString; - - if (type === null) { - typeString = 'null'; - } else if (Array.isArray(type)) { - typeString = 'array'; - } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) { - typeString = "<" + (getComponentName(type.type) || 'Unknown') + " />"; - info = ' Did you accidentally export a JSX literal instead of a component?'; - } else { - typeString = typeof type; - } - - { - error('React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info); - } - } - - var element = createElement.apply(this, arguments); // The result can be nullish if a mock or a custom function is used. - // TODO: Drop this when these are no longer allowed as the type argument. - - if (element == null) { - return element; - } // Skip key warning if the type isn't valid since our key validation logic - // doesn't expect a non-string/function type and can throw confusing errors. - // We don't want exception behavior to differ between dev and prod. - // (Rendering will throw with a helpful message and as soon as the type is - // fixed, the key warnings will appear.) - - - if (validType) { - for (var i = 2; i < arguments.length; i++) { - validateChildKeys(arguments[i], type); - } - } - - if (type === exports.Fragment) { - validateFragmentProps(element); - } else { - validatePropTypes(element); - } - - return element; -} -var didWarnAboutDeprecatedCreateFactory = false; -function createFactoryWithValidation(type) { - var validatedFactory = createElementWithValidation.bind(null, type); - validatedFactory.type = type; - - { - if (!didWarnAboutDeprecatedCreateFactory) { - didWarnAboutDeprecatedCreateFactory = true; - - warn('React.createFactory() is deprecated and will be removed in ' + 'a future major release. Consider using JSX ' + 'or use React.createElement() directly instead.'); - } // Legacy hook: remove it - - - Object.defineProperty(validatedFactory, 'type', { - enumerable: false, - get: function () { - warn('Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.'); - - Object.defineProperty(this, 'type', { - value: type - }); - return type; - } - }); - } - - return validatedFactory; -} -function cloneElementWithValidation(element, props, children) { - var newElement = cloneElement.apply(this, arguments); - - for (var i = 2; i < arguments.length; i++) { - validateChildKeys(arguments[i], newElement.type); - } - - validatePropTypes(newElement); - return newElement; -} - -{ - - try { - var frozenObject = Object.freeze({}); - /* eslint-disable no-new */ - - new Map([[frozenObject, null]]); - new Set([frozenObject]); - /* eslint-enable no-new */ - } catch (e) { - } -} - -var createElement$1 = createElementWithValidation ; -var cloneElement$1 = cloneElementWithValidation ; -var createFactory = createFactoryWithValidation ; -var Children = { - map: mapChildren, - forEach: forEachChildren, - count: countChildren, - toArray: toArray, - only: onlyChild -}; - -exports.Children = Children; -exports.Component = Component; -exports.PureComponent = PureComponent; -exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals; -exports.cloneElement = cloneElement$1; -exports.createContext = createContext; -exports.createElement = createElement$1; -exports.createFactory = createFactory; -exports.createRef = createRef; -exports.forwardRef = forwardRef; -exports.isValidElement = isValidElement; -exports.lazy = lazy; -exports.memo = memo; -exports.useCallback = useCallback; -exports.useContext = useContext; -exports.useDebugValue = useDebugValue; -exports.useEffect = useEffect; -exports.useImperativeHandle = useImperativeHandle; -exports.useLayoutEffect = useLayoutEffect; -exports.useMemo = useMemo; -exports.useReducer = useReducer; -exports.useRef = useRef; -exports.useState = useState; -exports.version = ReactVersion; - })(); -} -}); - -var react = createCommonjsModule(function (module) { - -if (process.env.NODE_ENV === 'production') { - module.exports = react_production_min; -} else { - module.exports = react_development; -} -}); - -/** @license React v0.20.2 - * scheduler.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -var scheduler_production_min = createCommonjsModule(function (module, exports) { -var f,g,h,k;if("object"===typeof performance&&"function"===typeof performance.now){var l=performance;exports.unstable_now=function(){return l.now()};}else {var p=Date,q=p.now();exports.unstable_now=function(){return p.now()-q};} -if("undefined"===typeof window||"function"!==typeof MessageChannel){var t=null,u=null,w=function(){if(null!==t)try{var a=exports.unstable_now();t(!0,a);t=null;}catch(b){throw setTimeout(w,0),b;}};f=function(a){null!==t?setTimeout(f,0,a):(t=a,setTimeout(w,0));};g=function(a,b){u=setTimeout(a,b);};h=function(){clearTimeout(u);};exports.unstable_shouldYield=function(){return !1};k=exports.unstable_forceFrameRate=function(){};}else {var x=window.setTimeout,y=window.clearTimeout;if("undefined"!==typeof console){var z= -window.cancelAnimationFrame;"function"!==typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills");"function"!==typeof z&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills");}var A=!1,B=null,C=-1,D=5,E=0;exports.unstable_shouldYield=function(){return exports.unstable_now()>= -E};k=function(){};exports.unstable_forceFrameRate=function(a){0>a||125>>1,e=a[d];if(void 0!==e&&0I(n,c))void 0!==r&&0>I(r,n)?(a[d]=r,a[v]=c,d=v):(a[d]=n,a[m]=c,d=m);else if(void 0!==r&&0>I(r,c))a[d]=r,a[v]=c,d=v;else break a}}return b}return null}function I(a,b){var c=a.sortIndex-b.sortIndex;return 0!==c?c:a.id-b.id}var L=[],M=[],N=1,O=null,P=3,Q=!1,R=!1,S=!1; -function T(a){for(var b=J(M);null!==b;){if(null===b.callback)K(M);else if(b.startTime<=a)K(M),b.sortIndex=b.expirationTime,H(L,b);else break;b=J(M);}}function U(a){S=!1;T(a);if(!R)if(null!==J(L))R=!0,f(V);else {var b=J(M);null!==b&&g(U,b.startTime-a);}} -function V(a,b){R=!1;S&&(S=!1,h());Q=!0;var c=P;try{T(b);for(O=J(L);null!==O&&(!(O.expirationTime>b)||a&&!exports.unstable_shouldYield());){var d=O.callback;if("function"===typeof d){O.callback=null;P=O.priorityLevel;var e=d(O.expirationTime<=b);b=exports.unstable_now();"function"===typeof e?O.callback=e:O===J(L)&&K(L);T(b);}else K(L);O=J(L);}if(null!==O)var m=!0;else {var n=J(M);null!==n&&g(U,n.startTime-b);m=!1;}return m}finally{O=null,P=c,Q=!1;}}var W=k;exports.unstable_IdlePriority=5; -exports.unstable_ImmediatePriority=1;exports.unstable_LowPriority=4;exports.unstable_NormalPriority=3;exports.unstable_Profiling=null;exports.unstable_UserBlockingPriority=2;exports.unstable_cancelCallback=function(a){a.callback=null;};exports.unstable_continueExecution=function(){R||Q||(R=!0,f(V));};exports.unstable_getCurrentPriorityLevel=function(){return P};exports.unstable_getFirstCallbackNode=function(){return J(L)}; -exports.unstable_next=function(a){switch(P){case 1:case 2:case 3:var b=3;break;default:b=P;}var c=P;P=b;try{return a()}finally{P=c;}};exports.unstable_pauseExecution=function(){};exports.unstable_requestPaint=W;exports.unstable_runWithPriority=function(a,b){switch(a){case 1:case 2:case 3:case 4:case 5:break;default:a=3;}var c=P;P=a;try{return b()}finally{P=c;}}; -exports.unstable_scheduleCallback=function(a,b,c){var d=exports.unstable_now();"object"===typeof c&&null!==c?(c=c.delay,c="number"===typeof c&&0d?(a.sortIndex=c,H(M,a),null===J(L)&&a===J(M)&&(S?h():S=!0,g(U,c-d))):(a.sortIndex=e,H(L,a),R||Q||(R=!0,f(V)));return a}; -exports.unstable_wrapCallback=function(a){var b=P;return function(){var c=P;P=b;try{return a.apply(this,arguments)}finally{P=c;}}}; -}); - -var scheduler_development = createCommonjsModule(function (module, exports) { - -if (process.env.NODE_ENV !== "production") { - (function() { - -var enableSchedulerDebugging = false; -var enableProfiling = false; - -var requestHostCallback; -var requestHostTimeout; -var cancelHostTimeout; -var requestPaint; -var hasPerformanceNow = typeof performance === 'object' && typeof performance.now === 'function'; - -if (hasPerformanceNow) { - var localPerformance = performance; - - exports.unstable_now = function () { - return localPerformance.now(); - }; -} else { - var localDate = Date; - var initialTime = localDate.now(); - - exports.unstable_now = function () { - return localDate.now() - initialTime; - }; -} - -if ( // If Scheduler runs in a non-DOM environment, it falls back to a naive -// implementation using setTimeout. -typeof window === 'undefined' || // Check if MessageChannel is supported, too. -typeof MessageChannel !== 'function') { - // If this accidentally gets imported in a non-browser environment, e.g. JavaScriptCore, - // fallback to a naive implementation. - var _callback = null; - var _timeoutID = null; - - var _flushCallback = function () { - if (_callback !== null) { - try { - var currentTime = exports.unstable_now(); - var hasRemainingTime = true; - - _callback(hasRemainingTime, currentTime); - - _callback = null; - } catch (e) { - setTimeout(_flushCallback, 0); - throw e; - } - } - }; - - requestHostCallback = function (cb) { - if (_callback !== null) { - // Protect against re-entrancy. - setTimeout(requestHostCallback, 0, cb); - } else { - _callback = cb; - setTimeout(_flushCallback, 0); - } - }; - - requestHostTimeout = function (cb, ms) { - _timeoutID = setTimeout(cb, ms); - }; - - cancelHostTimeout = function () { - clearTimeout(_timeoutID); - }; - - exports.unstable_shouldYield = function () { - return false; - }; - - requestPaint = exports.unstable_forceFrameRate = function () {}; -} else { - // Capture local references to native APIs, in case a polyfill overrides them. - var _setTimeout = window.setTimeout; - var _clearTimeout = window.clearTimeout; - - if (typeof console !== 'undefined') { - // TODO: Scheduler no longer requires these methods to be polyfilled. But - // maybe we want to continue warning if they don't exist, to preserve the - // option to rely on it in the future? - var requestAnimationFrame = window.requestAnimationFrame; - var cancelAnimationFrame = window.cancelAnimationFrame; - - if (typeof requestAnimationFrame !== 'function') { - // Using console['error'] to evade Babel and ESLint - console['error']("This browser doesn't support requestAnimationFrame. " + 'Make sure that you load a ' + 'polyfill in older browsers. https://reactjs.org/link/react-polyfills'); - } - - if (typeof cancelAnimationFrame !== 'function') { - // Using console['error'] to evade Babel and ESLint - console['error']("This browser doesn't support cancelAnimationFrame. " + 'Make sure that you load a ' + 'polyfill in older browsers. https://reactjs.org/link/react-polyfills'); - } - } - - var isMessageLoopRunning = false; - var scheduledHostCallback = null; - var taskTimeoutID = -1; // Scheduler periodically yields in case there is other work on the main - // thread, like user events. By default, it yields multiple times per frame. - // It does not attempt to align with frame boundaries, since most tasks don't - // need to be frame aligned; for those that do, use requestAnimationFrame. - - var yieldInterval = 5; - var deadline = 0; // TODO: Make this configurable - - { - // `isInputPending` is not available. Since we have no way of knowing if - // there's pending input, always yield at the end of the frame. - exports.unstable_shouldYield = function () { - return exports.unstable_now() >= deadline; - }; // Since we yield every frame regardless, `requestPaint` has no effect. - - - requestPaint = function () {}; - } - - exports.unstable_forceFrameRate = function (fps) { - if (fps < 0 || fps > 125) { - // Using console['error'] to evade Babel and ESLint - console['error']('forceFrameRate takes a positive int between 0 and 125, ' + 'forcing frame rates higher than 125 fps is not supported'); - return; - } - - if (fps > 0) { - yieldInterval = Math.floor(1000 / fps); - } else { - // reset the framerate - yieldInterval = 5; - } - }; - - var performWorkUntilDeadline = function () { - if (scheduledHostCallback !== null) { - var currentTime = exports.unstable_now(); // Yield after `yieldInterval` ms, regardless of where we are in the vsync - // cycle. This means there's always time remaining at the beginning of - // the message event. - - deadline = currentTime + yieldInterval; - var hasTimeRemaining = true; - - try { - var hasMoreWork = scheduledHostCallback(hasTimeRemaining, currentTime); - - if (!hasMoreWork) { - isMessageLoopRunning = false; - scheduledHostCallback = null; - } else { - // If there's more work, schedule the next message event at the end - // of the preceding one. - port.postMessage(null); - } - } catch (error) { - // If a scheduler task throws, exit the current browser task so the - // error can be observed. - port.postMessage(null); - throw error; - } - } else { - isMessageLoopRunning = false; - } // Yielding to the browser will give it a chance to paint, so we can - }; - - var channel = new MessageChannel(); - var port = channel.port2; - channel.port1.onmessage = performWorkUntilDeadline; - - requestHostCallback = function (callback) { - scheduledHostCallback = callback; - - if (!isMessageLoopRunning) { - isMessageLoopRunning = true; - port.postMessage(null); - } - }; - - requestHostTimeout = function (callback, ms) { - taskTimeoutID = _setTimeout(function () { - callback(exports.unstable_now()); - }, ms); - }; - - cancelHostTimeout = function () { - _clearTimeout(taskTimeoutID); - - taskTimeoutID = -1; - }; -} - -function push(heap, node) { - var index = heap.length; - heap.push(node); - siftUp(heap, node, index); -} -function peek(heap) { - var first = heap[0]; - return first === undefined ? null : first; -} -function pop(heap) { - var first = heap[0]; - - if (first !== undefined) { - var last = heap.pop(); - - if (last !== first) { - heap[0] = last; - siftDown(heap, last, 0); - } - - return first; - } else { - return null; - } -} - -function siftUp(heap, node, i) { - var index = i; - - while (true) { - var parentIndex = index - 1 >>> 1; - var parent = heap[parentIndex]; - - if (parent !== undefined && compare(parent, node) > 0) { - // The parent is larger. Swap positions. - heap[parentIndex] = node; - heap[index] = parent; - index = parentIndex; - } else { - // The parent is smaller. Exit. - return; - } - } -} - -function siftDown(heap, node, i) { - var index = i; - var length = heap.length; - - while (index < length) { - var leftIndex = (index + 1) * 2 - 1; - var left = heap[leftIndex]; - var rightIndex = leftIndex + 1; - var right = heap[rightIndex]; // If the left or right node is smaller, swap with the smaller of those. - - if (left !== undefined && compare(left, node) < 0) { - if (right !== undefined && compare(right, left) < 0) { - heap[index] = right; - heap[rightIndex] = node; - index = rightIndex; - } else { - heap[index] = left; - heap[leftIndex] = node; - index = leftIndex; - } - } else if (right !== undefined && compare(right, node) < 0) { - heap[index] = right; - heap[rightIndex] = node; - index = rightIndex; - } else { - // Neither child is smaller. Exit. - return; - } - } -} - -function compare(a, b) { - // Compare sort index first, then task id. - var diff = a.sortIndex - b.sortIndex; - return diff !== 0 ? diff : a.id - b.id; -} - -// TODO: Use symbols? -var ImmediatePriority = 1; -var UserBlockingPriority = 2; -var NormalPriority = 3; -var LowPriority = 4; -var IdlePriority = 5; - -function markTaskErrored(task, ms) { -} - -/* eslint-disable no-var */ -// Math.pow(2, 30) - 1 -// 0b111111111111111111111111111111 - -var maxSigned31BitInt = 1073741823; // Times out immediately - -var IMMEDIATE_PRIORITY_TIMEOUT = -1; // Eventually times out - -var USER_BLOCKING_PRIORITY_TIMEOUT = 250; -var NORMAL_PRIORITY_TIMEOUT = 5000; -var LOW_PRIORITY_TIMEOUT = 10000; // Never times out - -var IDLE_PRIORITY_TIMEOUT = maxSigned31BitInt; // Tasks are stored on a min heap - -var taskQueue = []; -var timerQueue = []; // Incrementing id counter. Used to maintain insertion order. - -var taskIdCounter = 1; // Pausing the scheduler is useful for debugging. -var currentTask = null; -var currentPriorityLevel = NormalPriority; // This is set while performing work, to prevent re-entrancy. - -var isPerformingWork = false; -var isHostCallbackScheduled = false; -var isHostTimeoutScheduled = false; - -function advanceTimers(currentTime) { - // Check for tasks that are no longer delayed and add them to the queue. - var timer = peek(timerQueue); - - while (timer !== null) { - if (timer.callback === null) { - // Timer was cancelled. - pop(timerQueue); - } else if (timer.startTime <= currentTime) { - // Timer fired. Transfer to the task queue. - pop(timerQueue); - timer.sortIndex = timer.expirationTime; - push(taskQueue, timer); - } else { - // Remaining timers are pending. - return; - } - - timer = peek(timerQueue); - } -} - -function handleTimeout(currentTime) { - isHostTimeoutScheduled = false; - advanceTimers(currentTime); - - if (!isHostCallbackScheduled) { - if (peek(taskQueue) !== null) { - isHostCallbackScheduled = true; - requestHostCallback(flushWork); - } else { - var firstTimer = peek(timerQueue); - - if (firstTimer !== null) { - requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime); - } - } - } -} - -function flushWork(hasTimeRemaining, initialTime) { - - - isHostCallbackScheduled = false; - - if (isHostTimeoutScheduled) { - // We scheduled a timeout but it's no longer needed. Cancel it. - isHostTimeoutScheduled = false; - cancelHostTimeout(); - } - - isPerformingWork = true; - var previousPriorityLevel = currentPriorityLevel; - - try { - var currentTime; if (enableProfiling) ; else { - // No catch in prod code path. - return workLoop(hasTimeRemaining, initialTime); - } - } finally { - currentTask = null; - currentPriorityLevel = previousPriorityLevel; - isPerformingWork = false; - } -} - -function workLoop(hasTimeRemaining, initialTime) { - var currentTime = initialTime; - advanceTimers(currentTime); - currentTask = peek(taskQueue); - - while (currentTask !== null && !(enableSchedulerDebugging )) { - if (currentTask.expirationTime > currentTime && (!hasTimeRemaining || exports.unstable_shouldYield())) { - // This currentTask hasn't expired, and we've reached the deadline. - break; - } - - var callback = currentTask.callback; - - if (typeof callback === 'function') { - currentTask.callback = null; - currentPriorityLevel = currentTask.priorityLevel; - var didUserCallbackTimeout = currentTask.expirationTime <= currentTime; - - var continuationCallback = callback(didUserCallbackTimeout); - currentTime = exports.unstable_now(); - - if (typeof continuationCallback === 'function') { - currentTask.callback = continuationCallback; - } else { - - if (currentTask === peek(taskQueue)) { - pop(taskQueue); - } - } - - advanceTimers(currentTime); - } else { - pop(taskQueue); - } - - currentTask = peek(taskQueue); - } // Return whether there's additional work - - - if (currentTask !== null) { - return true; - } else { - var firstTimer = peek(timerQueue); - - if (firstTimer !== null) { - requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime); - } - - return false; - } -} - -function unstable_runWithPriority(priorityLevel, eventHandler) { - switch (priorityLevel) { - case ImmediatePriority: - case UserBlockingPriority: - case NormalPriority: - case LowPriority: - case IdlePriority: - break; - - default: - priorityLevel = NormalPriority; - } - - var previousPriorityLevel = currentPriorityLevel; - currentPriorityLevel = priorityLevel; - - try { - return eventHandler(); - } finally { - currentPriorityLevel = previousPriorityLevel; - } -} - -function unstable_next(eventHandler) { - var priorityLevel; - - switch (currentPriorityLevel) { - case ImmediatePriority: - case UserBlockingPriority: - case NormalPriority: - // Shift down to normal priority - priorityLevel = NormalPriority; - break; - - default: - // Anything lower than normal priority should remain at the current level. - priorityLevel = currentPriorityLevel; - break; - } - - var previousPriorityLevel = currentPriorityLevel; - currentPriorityLevel = priorityLevel; - - try { - return eventHandler(); - } finally { - currentPriorityLevel = previousPriorityLevel; - } -} - -function unstable_wrapCallback(callback) { - var parentPriorityLevel = currentPriorityLevel; - return function () { - // This is a fork of runWithPriority, inlined for performance. - var previousPriorityLevel = currentPriorityLevel; - currentPriorityLevel = parentPriorityLevel; - - try { - return callback.apply(this, arguments); - } finally { - currentPriorityLevel = previousPriorityLevel; - } - }; -} - -function unstable_scheduleCallback(priorityLevel, callback, options) { - var currentTime = exports.unstable_now(); - var startTime; - - if (typeof options === 'object' && options !== null) { - var delay = options.delay; - - if (typeof delay === 'number' && delay > 0) { - startTime = currentTime + delay; - } else { - startTime = currentTime; - } - } else { - startTime = currentTime; - } - - var timeout; - - switch (priorityLevel) { - case ImmediatePriority: - timeout = IMMEDIATE_PRIORITY_TIMEOUT; - break; - - case UserBlockingPriority: - timeout = USER_BLOCKING_PRIORITY_TIMEOUT; - break; - - case IdlePriority: - timeout = IDLE_PRIORITY_TIMEOUT; - break; - - case LowPriority: - timeout = LOW_PRIORITY_TIMEOUT; - break; - - case NormalPriority: - default: - timeout = NORMAL_PRIORITY_TIMEOUT; - break; - } - - var expirationTime = startTime + timeout; - var newTask = { - id: taskIdCounter++, - callback: callback, - priorityLevel: priorityLevel, - startTime: startTime, - expirationTime: expirationTime, - sortIndex: -1 - }; - - if (startTime > currentTime) { - // This is a delayed task. - newTask.sortIndex = startTime; - push(timerQueue, newTask); - - if (peek(taskQueue) === null && newTask === peek(timerQueue)) { - // All tasks are delayed, and this is the task with the earliest delay. - if (isHostTimeoutScheduled) { - // Cancel an existing timeout. - cancelHostTimeout(); - } else { - isHostTimeoutScheduled = true; - } // Schedule a timeout. - - - requestHostTimeout(handleTimeout, startTime - currentTime); - } - } else { - newTask.sortIndex = expirationTime; - push(taskQueue, newTask); - // wait until the next time we yield. - - - if (!isHostCallbackScheduled && !isPerformingWork) { - isHostCallbackScheduled = true; - requestHostCallback(flushWork); - } - } - - return newTask; -} - -function unstable_pauseExecution() { -} - -function unstable_continueExecution() { - - if (!isHostCallbackScheduled && !isPerformingWork) { - isHostCallbackScheduled = true; - requestHostCallback(flushWork); - } -} - -function unstable_getFirstCallbackNode() { - return peek(taskQueue); -} - -function unstable_cancelCallback(task) { - // remove from the queue because you can't remove arbitrary nodes from an - // array based heap, only the first one.) - - - task.callback = null; -} - -function unstable_getCurrentPriorityLevel() { - return currentPriorityLevel; -} - -var unstable_requestPaint = requestPaint; -var unstable_Profiling = null; - -exports.unstable_IdlePriority = IdlePriority; -exports.unstable_ImmediatePriority = ImmediatePriority; -exports.unstable_LowPriority = LowPriority; -exports.unstable_NormalPriority = NormalPriority; -exports.unstable_Profiling = unstable_Profiling; -exports.unstable_UserBlockingPriority = UserBlockingPriority; -exports.unstable_cancelCallback = unstable_cancelCallback; -exports.unstable_continueExecution = unstable_continueExecution; -exports.unstable_getCurrentPriorityLevel = unstable_getCurrentPriorityLevel; -exports.unstable_getFirstCallbackNode = unstable_getFirstCallbackNode; -exports.unstable_next = unstable_next; -exports.unstable_pauseExecution = unstable_pauseExecution; -exports.unstable_requestPaint = unstable_requestPaint; -exports.unstable_runWithPriority = unstable_runWithPriority; -exports.unstable_scheduleCallback = unstable_scheduleCallback; -exports.unstable_wrapCallback = unstable_wrapCallback; - })(); -} -}); - -var scheduler = createCommonjsModule(function (module) { - -if (process.env.NODE_ENV === 'production') { - module.exports = scheduler_production_min; -} else { - module.exports = scheduler_development; -} -}); - -/** @license React v17.0.2 - * react-dom.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -function y(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;cb}return !1}function B(a,b,c,d,e,f,g){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=f;this.removeEmptyString=g;}var D={}; -"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){D[a]=new B(a,0,!1,a,null,!1,!1);});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var b=a[0];D[b]=new B(b,1,!1,a[1],null,!1,!1);});["contentEditable","draggable","spellCheck","value"].forEach(function(a){D[a]=new B(a,2,!1,a.toLowerCase(),null,!1,!1);}); -["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){D[a]=new B(a,2,!1,a,null,!1,!1);});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){D[a]=new B(a,3,!1,a.toLowerCase(),null,!1,!1);}); -["checked","multiple","muted","selected"].forEach(function(a){D[a]=new B(a,3,!0,a,null,!1,!1);});["capture","download"].forEach(function(a){D[a]=new B(a,4,!1,a,null,!1,!1);});["cols","rows","size","span"].forEach(function(a){D[a]=new B(a,6,!1,a,null,!1,!1);});["rowSpan","start"].forEach(function(a){D[a]=new B(a,5,!1,a.toLowerCase(),null,!1,!1);});var oa=/[\-:]([a-z])/g;function pa(a){return a[1].toUpperCase()} -"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a){var b=a.replace(oa, -pa);D[b]=new B(b,1,!1,a,null,!1,!1);});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(oa,pa);D[b]=new B(b,1,!1,a,"http://www.w3.org/1999/xlink",!1,!1);});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(oa,pa);D[b]=new B(b,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1,!1);});["tabIndex","crossOrigin"].forEach(function(a){D[a]=new B(a,1,!1,a.toLowerCase(),null,!1,!1);}); -D.xlinkHref=new B("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(a){D[a]=new B(a,1,!1,a.toLowerCase(),null,!0,!0);}); -function qa(a,b,c,d){var e=D.hasOwnProperty(b)?D[b]:null;var f=null!==e?0===e.type:d?!1:!(2h||e[g]!==f[h])return "\n"+e[g].replace(" at new "," at ");while(1<=g&&0<=h)}break}}}finally{Oa=!1,Error.prepareStackTrace=c;}return (a=a?a.displayName||a.name:"")?Na(a):""} -function Qa(a){switch(a.tag){case 5:return Na(a.type);case 16:return Na("Lazy");case 13:return Na("Suspense");case 19:return Na("SuspenseList");case 0:case 2:case 15:return a=Pa(a.type,!1),a;case 11:return a=Pa(a.type.render,!1),a;case 22:return a=Pa(a.type._render,!1),a;case 1:return a=Pa(a.type,!0),a;default:return ""}} -function Ra(a){if(null==a)return null;if("function"===typeof a)return a.displayName||a.name||null;if("string"===typeof a)return a;switch(a){case ua:return "Fragment";case ta:return "Portal";case xa:return "Profiler";case wa:return "StrictMode";case Ba:return "Suspense";case Ca:return "SuspenseList"}if("object"===typeof a)switch(a.$$typeof){case za:return (a.displayName||"Context")+".Consumer";case ya:return (a._context.displayName||"Context")+".Provider";case Aa:var b=a.render;b=b.displayName||b.name||""; -return a.displayName||(""!==b?"ForwardRef("+b+")":"ForwardRef");case Da:return Ra(a.type);case Fa:return Ra(a._render);case Ea:b=a._payload;a=a._init;try{return Ra(a(b))}catch(c){}}return null}function Sa(a){switch(typeof a){case "boolean":case "number":case "object":case "string":case "undefined":return a;default:return ""}}function Ta(a){var b=a.type;return (a=a.nodeName)&&"input"===a.toLowerCase()&&("checkbox"===b||"radio"===b)} -function Ua(a){var b=Ta(a)?"checked":"value",c=Object.getOwnPropertyDescriptor(a.constructor.prototype,b),d=""+a[b];if(!a.hasOwnProperty(b)&&"undefined"!==typeof c&&"function"===typeof c.get&&"function"===typeof c.set){var e=c.get,f=c.set;Object.defineProperty(a,b,{configurable:!0,get:function(){return e.call(this)},set:function(a){d=""+a;f.call(this,a);}});Object.defineProperty(a,b,{enumerable:c.enumerable});return {getValue:function(){return d},setValue:function(a){d=""+a;},stopTracking:function(){a._valueTracker= -null;delete a[b];}}}}function Va(a){a._valueTracker||(a._valueTracker=Ua(a));}function Wa(a){if(!a)return !1;var b=a._valueTracker;if(!b)return !0;var c=b.getValue();var d="";a&&(d=Ta(a)?a.checked?"true":"false":a.value);a=d;return a!==c?(b.setValue(a),!0):!1}function Xa(a){a=a||("undefined"!==typeof document?document:void 0);if("undefined"===typeof a)return null;try{return a.activeElement||a.body}catch(b){return a.body}} -function Ya(a,b){var c=b.checked;return objectAssign({},b,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=c?c:a._wrapperState.initialChecked})}function Za(a,b){var c=null==b.defaultValue?"":b.defaultValue,d=null!=b.checked?b.checked:b.defaultChecked;c=Sa(null!=b.value?b.value:c);a._wrapperState={initialChecked:d,initialValue:c,controlled:"checkbox"===b.type||"radio"===b.type?null!=b.checked:null!=b.value};}function $a(a,b){b=b.checked;null!=b&&qa(a,"checked",b,!1);} -function ab(a,b){$a(a,b);var c=Sa(b.value),d=b.type;if(null!=c)if("number"===d){if(0===c&&""===a.value||a.value!=c)a.value=""+c;}else a.value!==""+c&&(a.value=""+c);else if("submit"===d||"reset"===d){a.removeAttribute("value");return}b.hasOwnProperty("value")?bb(a,b.type,c):b.hasOwnProperty("defaultValue")&&bb(a,b.type,Sa(b.defaultValue));null==b.checked&&null!=b.defaultChecked&&(a.defaultChecked=!!b.defaultChecked);} -function cb(a,b,c){if(b.hasOwnProperty("value")||b.hasOwnProperty("defaultValue")){var d=b.type;if(!("submit"!==d&&"reset"!==d||void 0!==b.value&&null!==b.value))return;b=""+a._wrapperState.initialValue;c||b===a.value||(a.value=b);a.defaultValue=b;}c=a.name;""!==c&&(a.name="");a.defaultChecked=!!a._wrapperState.initialChecked;""!==c&&(a.name=c);} -function bb(a,b,c){if("number"!==b||Xa(a.ownerDocument)!==a)null==c?a.defaultValue=""+a._wrapperState.initialValue:a.defaultValue!==""+c&&(a.defaultValue=""+c);}function db(a){var b="";react.Children.forEach(a,function(a){null!=a&&(b+=a);});return b}function eb(a,b){a=objectAssign({children:void 0},b);if(b=db(b.children))a.children=b;return a} -function fb(a,b,c,d){a=a.options;if(b){b={};for(var e=0;e=c.length))throw Error(y(93));c=c[0];}b=c;}null==b&&(b="");c=b;}a._wrapperState={initialValue:Sa(c)};} -function ib(a,b){var c=Sa(b.value),d=Sa(b.defaultValue);null!=c&&(c=""+c,c!==a.value&&(a.value=c),null==b.defaultValue&&a.defaultValue!==c&&(a.defaultValue=c));null!=d&&(a.defaultValue=""+d);}function jb(a){var b=a.textContent;b===a._wrapperState.initialValue&&""!==b&&null!==b&&(a.value=b);}var kb={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"}; -function lb(a){switch(a){case "svg":return "http://www.w3.org/2000/svg";case "math":return "http://www.w3.org/1998/Math/MathML";default:return "http://www.w3.org/1999/xhtml"}}function mb(a,b){return null==a||"http://www.w3.org/1999/xhtml"===a?lb(b):"http://www.w3.org/2000/svg"===a&&"foreignObject"===b?"http://www.w3.org/1999/xhtml":a} -var nb,ob=function(a){return "undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(b,c,d,e){MSApp.execUnsafeLocalFunction(function(){return a(b,c,d,e)});}:a}(function(a,b){if(a.namespaceURI!==kb.svg||"innerHTML"in a)a.innerHTML=b;else {nb=nb||document.createElement("div");nb.innerHTML=""+b.valueOf().toString()+"";for(b=nb.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild);}}); -function pb(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b;} -var qb={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0, -floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},rb=["Webkit","ms","Moz","O"];Object.keys(qb).forEach(function(a){rb.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);qb[b]=qb[a];});});function sb(a,b,c){return null==b||"boolean"===typeof b||""===b?"":c||"number"!==typeof b||0===b||qb.hasOwnProperty(a)&&qb[a]?(""+b).trim():b+"px"} -function tb(a,b){a=a.style;for(var c in b)if(b.hasOwnProperty(c)){var d=0===c.indexOf("--"),e=sb(c,b[c],d);"float"===c&&(c="cssFloat");d?a.setProperty(c,e):a[c]=e;}}var ub=objectAssign({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}); -function vb(a,b){if(b){if(ub[a]&&(null!=b.children||null!=b.dangerouslySetInnerHTML))throw Error(y(137,a));if(null!=b.dangerouslySetInnerHTML){if(null!=b.children)throw Error(y(60));if(!("object"===typeof b.dangerouslySetInnerHTML&&"__html"in b.dangerouslySetInnerHTML))throw Error(y(61));}if(null!=b.style&&"object"!==typeof b.style)throw Error(y(62));}} -function wb(a,b){if(-1===a.indexOf("-"))return "string"===typeof b.is;switch(a){case "annotation-xml":case "color-profile":case "font-face":case "font-face-src":case "font-face-uri":case "font-face-format":case "font-face-name":case "missing-glyph":return !1;default:return !0}}function xb(a){a=a.target||a.srcElement||window;a.correspondingUseElement&&(a=a.correspondingUseElement);return 3===a.nodeType?a.parentNode:a}var yb=null,zb=null,Ab=null; -function Bb(a){if(a=Cb(a)){if("function"!==typeof yb)throw Error(y(280));var b=a.stateNode;b&&(b=Db(b),yb(a.stateNode,a.type,b));}}function Eb(a){zb?Ab?Ab.push(a):Ab=[a]:zb=a;}function Fb(){if(zb){var a=zb,b=Ab;Ab=zb=null;Bb(a);if(b)for(a=0;ad?0:1<c;c++)b.push(a);return b} -function $c(a,b,c){a.pendingLanes|=b;var d=b-1;a.suspendedLanes&=d;a.pingedLanes&=d;a=a.eventTimes;b=31-Vc(b);a[b]=c;}var Vc=Math.clz32?Math.clz32:ad,bd=Math.log,cd=Math.LN2;function ad(a){return 0===a?32:31-(bd(a)/cd|0)|0}var dd=scheduler.unstable_UserBlockingPriority,ed=scheduler.unstable_runWithPriority,fd=!0;function gd(a,b,c,d){Kb||Ib();var e=hd,f=Kb;Kb=!0;try{Hb(e,a,b,c,d);}finally{(Kb=f)||Mb();}}function id(a,b,c,d){ed(dd,hd.bind(null,a,b,c,d));} -function hd(a,b,c,d){if(fd){var e;if((e=0===(b&4))&&0=be),ee=String.fromCharCode(32),fe=!1; -function ge(a,b){switch(a){case "keyup":return -1!==$d.indexOf(b.keyCode);case "keydown":return 229!==b.keyCode;case "keypress":case "mousedown":case "focusout":return !0;default:return !1}}function he(a){a=a.detail;return "object"===typeof a&&"data"in a?a.data:null}var ie=!1;function je(a,b){switch(a){case "compositionend":return he(b);case "keypress":if(32!==b.which)return null;fe=!0;return ee;case "textInput":return a=b.data,a===ee&&fe?null:a;default:return null}} -function ke(a,b){if(ie)return "compositionend"===a||!ae&&ge(a,b)?(a=nd(),md=ld=kd=null,ie=!1,a):null;switch(a){case "paste":return null;case "keypress":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1=b)return {node:c,offset:b-a};a=d;}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=c.parentNode;}c=void 0;}c=Ke(c);}}function Me(a,b){return a&&b?a===b?!0:a&&3===a.nodeType?!1:b&&3===b.nodeType?Me(a,b.parentNode):"contains"in a?a.contains(b):a.compareDocumentPosition?!!(a.compareDocumentPosition(b)&16):!1:!1} -function Ne(){for(var a=window,b=Xa();b instanceof a.HTMLIFrameElement;){try{var c="string"===typeof b.contentWindow.location.href;}catch(d){c=!1;}if(c)a=b.contentWindow;else break;b=Xa(a.document);}return b}function Oe(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&("input"===b&&("text"===a.type||"search"===a.type||"tel"===a.type||"url"===a.type||"password"===a.type)||"textarea"===b||"true"===a.contentEditable)} -var Pe=fa&&"documentMode"in document&&11>=document.documentMode,Qe=null,Re=null,Se=null,Te=!1; -function Ue(a,b,c){var d=c.window===c?c.document:9===c.nodeType?c:c.ownerDocument;Te||null==Qe||Qe!==Xa(d)||(d=Qe,"selectionStart"in d&&Oe(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),Se&&Je(Se,d)||(Se=d,d=oe(Re,"onSelect"),0Af||(a.current=zf[Af],zf[Af]=null,Af--);}function I(a,b){Af++;zf[Af]=a.current;a.current=b;}var Cf={},M=Bf(Cf),N=Bf(!1),Df=Cf; -function Ef(a,b){var c=a.type.contextTypes;if(!c)return Cf;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e}function Ff(a){a=a.childContextTypes;return null!==a&&void 0!==a}function Gf(){H(N);H(M);}function Hf(a,b,c){if(M.current!==Cf)throw Error(y(168));I(M,b);I(N,c);} -function If(a,b,c){var d=a.stateNode;a=b.childContextTypes;if("function"!==typeof d.getChildContext)return c;d=d.getChildContext();for(var e in d)if(!(e in a))throw Error(y(108,Ra(b)||"Unknown",e));return objectAssign({},c,d)}function Jf(a){a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||Cf;Df=M.current;I(M,a);I(N,N.current);return !0}function Kf(a,b,c){var d=a.stateNode;if(!d)throw Error(y(169));c?(a=If(a,b,Df),d.__reactInternalMemoizedMergedChildContext=a,H(N),H(M),I(M,a)):H(N);I(N,c);} -var Lf=null,Mf=null,Nf=scheduler.unstable_runWithPriority,Of=scheduler.unstable_scheduleCallback,Pf=scheduler.unstable_cancelCallback,Qf=scheduler.unstable_shouldYield,Rf=scheduler.unstable_requestPaint,Sf=scheduler.unstable_now,Tf=scheduler.unstable_getCurrentPriorityLevel,Uf=scheduler.unstable_ImmediatePriority,Vf=scheduler.unstable_UserBlockingPriority,Wf=scheduler.unstable_NormalPriority,Xf=scheduler.unstable_LowPriority,Yf=scheduler.unstable_IdlePriority,Zf={},$f=void 0!==Rf?Rf:function(){},ag=null,bg=null,cg=!1,dg=Sf(),O=1E4>dg?Sf:function(){return Sf()-dg}; -function eg(){switch(Tf()){case Uf:return 99;case Vf:return 98;case Wf:return 97;case Xf:return 96;case Yf:return 95;default:throw Error(y(332));}}function fg(a){switch(a){case 99:return Uf;case 98:return Vf;case 97:return Wf;case 96:return Xf;case 95:return Yf;default:throw Error(y(332));}}function gg(a,b){a=fg(a);return Nf(a,b)}function hg(a,b,c){a=fg(a);return Of(a,b,c)}function ig(){if(null!==bg){var a=bg;bg=null;Pf(a);}jg();} -function jg(){if(!cg&&null!==ag){cg=!0;var a=0;try{var b=ag;gg(99,function(){for(;az?(q=u,u=null):q=u.sibling;var n=p(e,u,h[z],k);if(null===n){null===u&&(u=q);break}a&&u&&null=== -n.alternate&&b(e,u);g=f(n,g,z);null===t?l=n:t.sibling=n;t=n;u=q;}if(z===h.length)return c(e,u),l;if(null===u){for(;zz?(q=u,u=null):q=u.sibling;var w=p(e,u,n.value,k);if(null===w){null===u&&(u=q);break}a&&u&&null===w.alternate&&b(e,u);g=f(w,g,z);null===t?l=w:t.sibling=w;t=w;u=q;}if(n.done)return c(e,u),l;if(null===u){for(;!n.done;z++,n=h.next())n=A(e,n.value,k),null!==n&&(g=f(n,g,z),null===t?l=n:t.sibling=n,t=n);return l}for(u=d(e,u);!n.done;z++,n=h.next())n=C(u,e,z,n.value,k),null!==n&&(a&&null!==n.alternate&& -u.delete(null===n.key?z:n.key),g=f(n,g,z),null===t?l=n:t.sibling=n,t=n);a&&u.forEach(function(a){return b(e,a)});return l}return function(a,d,f,h){var k="object"===typeof f&&null!==f&&f.type===ua&&null===f.key;k&&(f=f.props.children);var l="object"===typeof f&&null!==f;if(l)switch(f.$$typeof){case sa:a:{l=f.key;for(k=d;null!==k;){if(k.key===l){switch(k.tag){case 7:if(f.type===ua){c(a,k.sibling);d=e(k,f.props.children);d.return=a;a=d;break a}break;default:if(k.elementType===f.type){c(a,k.sibling); -d=e(k,f.props);d.ref=Qg(a,k,f);d.return=a;a=d;break a}}c(a,k);break}else b(a,k);k=k.sibling;}f.type===ua?(d=Xg(f.props.children,a.mode,h,f.key),d.return=a,a=d):(h=Vg(f.type,f.key,f.props,null,a.mode,h),h.ref=Qg(a,d,f),h.return=a,a=h);}return g(a);case ta:a:{for(k=f.key;null!==d;){if(d.key===k)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[]);d.return=a;a=d;break a}else {c(a,d);break}else b(a,d);d=d.sibling;}d= -Wg(f,a.mode,h);d.return=a;a=d;}return g(a)}if("string"===typeof f||"number"===typeof f)return f=""+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f),d.return=a,a=d):(c(a,d),d=Ug(f,a.mode,h),d.return=a,a=d),g(a);if(Pg(f))return x(a,d,f,h);if(La(f))return w(a,d,f,h);l&&Rg(a,f);if("undefined"===typeof f&&!k)switch(a.tag){case 1:case 22:case 0:case 11:case 15:throw Error(y(152,Ra(a.type)||"Component"));}return c(a,d)}}var Yg=Sg(!0),Zg=Sg(!1),$g={},ah=Bf($g),bh=Bf($g),ch=Bf($g); -function dh(a){if(a===$g)throw Error(y(174));return a}function eh(a,b){I(ch,b);I(bh,a);I(ah,$g);a=b.nodeType;switch(a){case 9:case 11:b=(b=b.documentElement)?b.namespaceURI:mb(null,"");break;default:a=8===a?b.parentNode:b,b=a.namespaceURI||null,a=a.tagName,b=mb(b,a);}H(ah);I(ah,b);}function fh(){H(ah);H(bh);H(ch);}function gh(a){dh(ch.current);var b=dh(ah.current);var c=mb(b,a.type);b!==c&&(I(bh,a),I(ah,c));}function hh(a){bh.current===a&&(H(ah),H(bh));}var P=Bf(0); -function ih(a){for(var b=a;null!==b;){if(13===b.tag){var c=b.memoizedState;if(null!==c&&(c=c.dehydrated,null===c||"$?"===c.data||"$!"===c.data))return b}else if(19===b.tag&&void 0!==b.memoizedProps.revealOrder){if(0!==(b.flags&64))return b}else if(null!==b.child){b.child.return=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return null;b=b.return;}b.sibling.return=b.return;b=b.sibling;}return null}var jh=null,kh=null,lh=!1; -function mh(a,b){var c=nh(5,null,null,0);c.elementType="DELETED";c.type="DELETED";c.stateNode=b;c.return=a;c.flags=8;null!==a.lastEffect?(a.lastEffect.nextEffect=c,a.lastEffect=c):a.firstEffect=a.lastEffect=c;}function oh(a,b){switch(a.tag){case 5:var c=a.type;b=1!==b.nodeType||c.toLowerCase()!==b.nodeName.toLowerCase()?null:b;return null!==b?(a.stateNode=b,!0):!1;case 6:return b=""===a.pendingProps||3!==b.nodeType?null:b,null!==b?(a.stateNode=b,!0):!1;case 13:return !1;default:return !1}} -function ph(a){if(lh){var b=kh;if(b){var c=b;if(!oh(a,b)){b=rf(c.nextSibling);if(!b||!oh(a,b)){a.flags=a.flags&-1025|2;lh=!1;jh=a;return}mh(jh,c);}jh=a;kh=rf(b.firstChild);}else a.flags=a.flags&-1025|2,lh=!1,jh=a;}}function qh(a){for(a=a.return;null!==a&&5!==a.tag&&3!==a.tag&&13!==a.tag;)a=a.return;jh=a;} -function rh(a){if(a!==jh)return !1;if(!lh)return qh(a),lh=!0,!1;var b=a.type;if(5!==a.tag||"head"!==b&&"body"!==b&&!nf(b,a.memoizedProps))for(b=kh;b;)mh(a,b),b=rf(b.nextSibling);qh(a);if(13===a.tag){a=a.memoizedState;a=null!==a?a.dehydrated:null;if(!a)throw Error(y(317));a:{a=a.nextSibling;for(b=0;a;){if(8===a.nodeType){var c=a.data;if("/$"===c){if(0===b){kh=rf(a.nextSibling);break a}b--;}else "$"!==c&&"$!"!==c&&"$?"!==c||b++;}a=a.nextSibling;}kh=null;}}else kh=jh?rf(a.stateNode.nextSibling):null;return !0} -function sh(){kh=jh=null;lh=!1;}var th=[];function uh(){for(var a=0;af))throw Error(y(301));f+=1;T=S=null;b.updateQueue=null;vh.current=Fh;a=c(d,e);}while(zh)}vh.current=Gh;b=null!==S&&null!==S.next;xh=0;T=S=R=null;yh=!1;if(b)throw Error(y(300));return a}function Hh(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};null===T?R.memoizedState=T=a:T=T.next=a;return T} -function Ih(){if(null===S){var a=R.alternate;a=null!==a?a.memoizedState:null;}else a=S.next;var b=null===T?R.memoizedState:T.next;if(null!==b)T=b,S=a;else {if(null===a)throw Error(y(310));S=a;a={memoizedState:S.memoizedState,baseState:S.baseState,baseQueue:S.baseQueue,queue:S.queue,next:null};null===T?R.memoizedState=T=a:T=T.next=a;}return T}function Jh(a,b){return "function"===typeof b?b(a):b} -function Kh(a){var b=Ih(),c=b.queue;if(null===c)throw Error(y(311));c.lastRenderedReducer=a;var d=S,e=d.baseQueue,f=c.pending;if(null!==f){if(null!==e){var g=e.next;e.next=f.next;f.next=g;}d.baseQueue=e=f;c.pending=null;}if(null!==e){e=e.next;d=d.baseState;var h=g=f=null,k=e;do{var l=k.lane;if((xh&l)===l)null!==h&&(h=h.next={lane:0,action:k.action,eagerReducer:k.eagerReducer,eagerState:k.eagerState,next:null}),d=k.eagerReducer===a?k.eagerState:a(d,k.action);else {var n={lane:l,action:k.action,eagerReducer:k.eagerReducer, -eagerState:k.eagerState,next:null};null===h?(g=h=n,f=d):h=h.next=n;R.lanes|=l;Dg|=l;}k=k.next;}while(null!==k&&k!==e);null===h?f=d:h.next=g;He(d,b.memoizedState)||(ug=!0);b.memoizedState=d;b.baseState=f;b.baseQueue=h;c.lastRenderedState=d;}return [b.memoizedState,c.dispatch]} -function Lh(a){var b=Ih(),c=b.queue;if(null===c)throw Error(y(311));c.lastRenderedReducer=a;var d=c.dispatch,e=c.pending,f=b.memoizedState;if(null!==e){c.pending=null;var g=e=e.next;do f=a(f,g.action),g=g.next;while(g!==e);He(f,b.memoizedState)||(ug=!0);b.memoizedState=f;null===b.baseQueue&&(b.baseState=f);c.lastRenderedState=f;}return [f,d]} -function Mh(a,b,c){var d=b._getVersion;d=d(b._source);var e=b._workInProgressVersionPrimary;if(null!==e)a=e===d;else if(a=a.mutableReadLanes,a=(xh&a)===a)b._workInProgressVersionPrimary=d,th.push(b);if(a)return c(b._source);th.push(b);throw Error(y(350));} -function Nh(a,b,c,d){var e=U;if(null===e)throw Error(y(349));var f=b._getVersion,g=f(b._source),h=vh.current,k=h.useState(function(){return Mh(e,b,c)}),l=k[1],n=k[0];k=T;var A=a.memoizedState,p=A.refs,C=p.getSnapshot,x=A.source;A=A.subscribe;var w=R;a.memoizedState={refs:p,source:b,subscribe:d};h.useEffect(function(){p.getSnapshot=c;p.setSnapshot=l;var a=f(b._source);if(!He(g,a)){a=c(b._source);He(n,a)||(l(a),a=Ig(w),e.mutableReadLanes|=a&e.pendingLanes);a=e.mutableReadLanes;e.entangledLanes|=a;for(var d= -e.entanglements,h=a;0c?98:c,function(){a(!0);});gg(97\x3c/script>",a=a.removeChild(a.firstChild)):"string"===typeof d.is?a=g.createElement(c,{is:d.is}):(a=g.createElement(c),"select"===c&&(g=a,d.multiple?g.multiple=!0:d.size&&(g.size=d.size))):a=g.createElementNS(a,c);a[wf]=b;a[xf]=d;Bi(a,b,!1,!1);b.stateNode=a;g=wb(c,d);switch(c){case "dialog":G("cancel",a);G("close",a); -e=d;break;case "iframe":case "object":case "embed":G("load",a);e=d;break;case "video":case "audio":for(e=0;eJi&&(b.flags|=64,f=!0,Fi(d,!1),b.lanes=33554432);}else {if(!f)if(a=ih(g),null!==a){if(b.flags|=64,f=!0,c=a.updateQueue,null!==c&&(b.updateQueue=c,b.flags|=4),Fi(d,!0),null===d.tail&&"hidden"===d.tailMode&&!g.alternate&&!lh)return b=b.lastEffect=d.lastEffect,null!==b&&(b.nextEffect=null),null}else 2*O()-d.renderingStartTime>Ji&&1073741824!==c&&(b.flags|= -64,f=!0,Fi(d,!1),b.lanes=33554432);d.isBackwards?(g.sibling=b.child,b.child=g):(c=d.last,null!==c?c.sibling=g:b.child=g,d.last=g);}return null!==d.tail?(c=d.tail,d.rendering=c,d.tail=c.sibling,d.lastEffect=b.lastEffect,d.renderingStartTime=O(),c.sibling=null,b=P.current,I(P,f?b&1|2:b&1),c):null;case 23:case 24:return Ki(),null!==a&&null!==a.memoizedState!==(null!==b.memoizedState)&&"unstable-defer-without-hiding"!==d.mode&&(b.flags|=4),null}throw Error(y(156,b.tag));} -function Li(a){switch(a.tag){case 1:Ff(a.type)&&Gf();var b=a.flags;return b&4096?(a.flags=b&-4097|64,a):null;case 3:fh();H(N);H(M);uh();b=a.flags;if(0!==(b&64))throw Error(y(285));a.flags=b&-4097|64;return a;case 5:return hh(a),null;case 13:return H(P),b=a.flags,b&4096?(a.flags=b&-4097|64,a):null;case 19:return H(P),null;case 4:return fh(),null;case 10:return rg(a),null;case 23:case 24:return Ki(),null;default:return null}} -function Mi(a,b){try{var c="",d=b;do c+=Qa(d),d=d.return;while(d);var e=c;}catch(f){e="\nError generating stack: "+f.message+"\n"+f.stack;}return {value:a,source:b,stack:e}}function Ni(a,b){try{console.error(b.value);}catch(c){setTimeout(function(){throw c;});}}var Oi="function"===typeof WeakMap?WeakMap:Map;function Pi(a,b,c){c=zg(-1,c);c.tag=3;c.payload={element:null};var d=b.value;c.callback=function(){Qi||(Qi=!0,Ri=d);Ni(a,b);};return c} -function Si(a,b,c){c=zg(-1,c);c.tag=3;var d=a.type.getDerivedStateFromError;if("function"===typeof d){var e=b.value;c.payload=function(){Ni(a,b);return d(e)};}var f=a.stateNode;null!==f&&"function"===typeof f.componentDidCatch&&(c.callback=function(){"function"!==typeof d&&(null===Ti?Ti=new Set([this]):Ti.add(this),Ni(a,b));var c=b.stack;this.componentDidCatch(b.value,{componentStack:null!==c?c:""});});return c}var Ui="function"===typeof WeakSet?WeakSet:Set; -function Vi(a){var b=a.ref;if(null!==b)if("function"===typeof b)try{b(null);}catch(c){Wi(a,c);}else b.current=null;}function Xi(a,b){switch(b.tag){case 0:case 11:case 15:case 22:return;case 1:if(b.flags&256&&null!==a){var c=a.memoizedProps,d=a.memoizedState;a=b.stateNode;b=a.getSnapshotBeforeUpdate(b.elementType===b.type?c:lg(b.type,c),d);a.__reactInternalSnapshotBeforeUpdate=b;}return;case 3:b.flags&256&&qf(b.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(y(163));} -function Yi(a,b,c){switch(c.tag){case 0:case 11:case 15:case 22:b=c.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){a=b=b.next;do{if(3===(a.tag&3)){var d=a.create;a.destroy=d();}a=a.next;}while(a!==b)}b=c.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){a=b=b.next;do{var e=a;d=e.next;e=e.tag;0!==(e&4)&&0!==(e&1)&&(Zi(c,a),$i(c,a));a=d;}while(a!==b)}return;case 1:a=c.stateNode;c.flags&4&&(null===b?a.componentDidMount():(d=c.elementType===c.type?b.memoizedProps:lg(c.type,b.memoizedProps),a.componentDidUpdate(d, -b.memoizedState,a.__reactInternalSnapshotBeforeUpdate)));b=c.updateQueue;null!==b&&Eg(c,b,a);return;case 3:b=c.updateQueue;if(null!==b){a=null;if(null!==c.child)switch(c.child.tag){case 5:a=c.child.stateNode;break;case 1:a=c.child.stateNode;}Eg(c,b,a);}return;case 5:a=c.stateNode;null===b&&c.flags&4&&mf(c.type,c.memoizedProps)&&a.focus();return;case 6:return;case 4:return;case 12:return;case 13:null===c.memoizedState&&(c=c.alternate,null!==c&&(c=c.memoizedState,null!==c&&(c=c.dehydrated,null!==c&&Cc(c)))); -return;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(y(163));} -function aj(a,b){for(var c=a;;){if(5===c.tag){var d=c.stateNode;if(b)d=d.style,"function"===typeof d.setProperty?d.setProperty("display","none","important"):d.display="none";else {d=c.stateNode;var e=c.memoizedProps.style;e=void 0!==e&&null!==e&&e.hasOwnProperty("display")?e.display:null;d.style.display=sb("display",e);}}else if(6===c.tag)c.stateNode.nodeValue=b?"":c.memoizedProps;else if((23!==c.tag&&24!==c.tag||null===c.memoizedState||c===a)&&null!==c.child){c.child.return=c;c=c.child;continue}if(c=== -a)break;for(;null===c.sibling;){if(null===c.return||c.return===a)return;c=c.return;}c.sibling.return=c.return;c=c.sibling;}} -function bj(a,b){if(Mf&&"function"===typeof Mf.onCommitFiberUnmount)try{Mf.onCommitFiberUnmount(Lf,b);}catch(f){}switch(b.tag){case 0:case 11:case 14:case 15:case 22:a=b.updateQueue;if(null!==a&&(a=a.lastEffect,null!==a)){var c=a=a.next;do{var d=c,e=d.destroy;d=d.tag;if(void 0!==e)if(0!==(d&4))Zi(b,c);else {d=b;try{e();}catch(f){Wi(d,f);}}c=c.next;}while(c!==a)}break;case 1:Vi(b);a=b.stateNode;if("function"===typeof a.componentWillUnmount)try{a.props=b.memoizedProps,a.state=b.memoizedState,a.componentWillUnmount();}catch(f){Wi(b, -f);}break;case 5:Vi(b);break;case 4:cj(a,b);}}function dj(a){a.alternate=null;a.child=null;a.dependencies=null;a.firstEffect=null;a.lastEffect=null;a.memoizedProps=null;a.memoizedState=null;a.pendingProps=null;a.return=null;a.updateQueue=null;}function ej(a){return 5===a.tag||3===a.tag||4===a.tag} -function fj(a){a:{for(var b=a.return;null!==b;){if(ej(b))break a;b=b.return;}throw Error(y(160));}var c=b;b=c.stateNode;switch(c.tag){case 5:var d=!1;break;case 3:b=b.containerInfo;d=!0;break;case 4:b=b.containerInfo;d=!0;break;default:throw Error(y(161));}c.flags&16&&(pb(b,""),c.flags&=-17);a:b:for(c=a;;){for(;null===c.sibling;){if(null===c.return||ej(c.return)){c=null;break a}c=c.return;}c.sibling.return=c.return;for(c=c.sibling;5!==c.tag&&6!==c.tag&&18!==c.tag;){if(c.flags&2)continue b;if(null=== -c.child||4===c.tag)continue b;else c.child.return=c,c=c.child;}if(!(c.flags&2)){c=c.stateNode;break a}}d?gj(a,c,b):hj(a,c,b);} -function gj(a,b,c){var d=a.tag,e=5===d||6===d;if(e)a=e?a.stateNode:a.stateNode.instance,b?8===c.nodeType?c.parentNode.insertBefore(a,b):c.insertBefore(a,b):(8===c.nodeType?(b=c.parentNode,b.insertBefore(a,c)):(b=c,b.appendChild(a)),c=c._reactRootContainer,null!==c&&void 0!==c||null!==b.onclick||(b.onclick=jf));else if(4!==d&&(a=a.child,null!==a))for(gj(a,b,c),a=a.sibling;null!==a;)gj(a,b,c),a=a.sibling;} -function hj(a,b,c){var d=a.tag,e=5===d||6===d;if(e)a=e?a.stateNode:a.stateNode.instance,b?c.insertBefore(a,b):c.appendChild(a);else if(4!==d&&(a=a.child,null!==a))for(hj(a,b,c),a=a.sibling;null!==a;)hj(a,b,c),a=a.sibling;} -function cj(a,b){for(var c=b,d=!1,e,f;;){if(!d){d=c.return;a:for(;;){if(null===d)throw Error(y(160));e=d.stateNode;switch(d.tag){case 5:f=!1;break a;case 3:e=e.containerInfo;f=!0;break a;case 4:e=e.containerInfo;f=!0;break a}d=d.return;}d=!0;}if(5===c.tag||6===c.tag){a:for(var g=a,h=c,k=h;;)if(bj(g,k),null!==k.child&&4!==k.tag)k.child.return=k,k=k.child;else {if(k===h)break a;for(;null===k.sibling;){if(null===k.return||k.return===h)break a;k=k.return;}k.sibling.return=k.return;k=k.sibling;}f?(g=e,h=c.stateNode, -8===g.nodeType?g.parentNode.removeChild(h):g.removeChild(h)):e.removeChild(c.stateNode);}else if(4===c.tag){if(null!==c.child){e=c.stateNode.containerInfo;f=!0;c.child.return=c;c=c.child;continue}}else if(bj(a,c),null!==c.child){c.child.return=c;c=c.child;continue}if(c===b)break;for(;null===c.sibling;){if(null===c.return||c.return===b)return;c=c.return;4===c.tag&&(d=!1);}c.sibling.return=c.return;c=c.sibling;}} -function ij(a,b){switch(b.tag){case 0:case 11:case 14:case 15:case 22:var c=b.updateQueue;c=null!==c?c.lastEffect:null;if(null!==c){var d=c=c.next;do 3===(d.tag&3)&&(a=d.destroy,d.destroy=void 0,void 0!==a&&a()),d=d.next;while(d!==c)}return;case 1:return;case 5:c=b.stateNode;if(null!=c){d=b.memoizedProps;var e=null!==a?a.memoizedProps:d;a=b.type;var f=b.updateQueue;b.updateQueue=null;if(null!==f){c[xf]=d;"input"===a&&"radio"===d.type&&null!=d.name&&$a(c,d);wb(a,e);b=wb(a,d);for(e=0;ee&&(e=g);c&=~f;}c=e;c=O()-c;c=(120>c?120:480>c?480:1080>c?1080:1920>c?1920:3E3>c?3E3:4320> -c?4320:1960*nj(c/1960))-c;if(10 component higher in the tree to provide a loading indicator or placeholder to display.");}5!==V&&(V=2);k=Mi(k,h);p= -g;do{switch(p.tag){case 3:f=k;p.flags|=4096;b&=-b;p.lanes|=b;var J=Pi(p,f,b);Bg(p,J);break a;case 1:f=k;var K=p.type,Q=p.stateNode;if(0===(p.flags&64)&&("function"===typeof K.getDerivedStateFromError||null!==Q&&"function"===typeof Q.componentDidCatch&&(null===Ti||!Ti.has(Q)))){p.flags|=4096;b&=-b;p.lanes|=b;var L=Si(p,f,b);Bg(p,L);break a}}p=p.return;}while(null!==p)}Zj(c);}catch(va){b=va;Y===c&&null!==c&&(Y=c=c.return);continue}break}while(1)} -function Pj(){var a=oj.current;oj.current=Gh;return null===a?Gh:a}function Tj(a,b){var c=X;X|=16;var d=Pj();U===a&&W===b||Qj(a,b);do try{ak();break}catch(e){Sj(a,e);}while(1);qg();X=c;oj.current=d;if(null!==Y)throw Error(y(261));U=null;W=0;return V}function ak(){for(;null!==Y;)bk(Y);}function Rj(){for(;null!==Y&&!Qf();)bk(Y);}function bk(a){var b=ck(a.alternate,a,qj);a.memoizedProps=a.pendingProps;null===b?Zj(a):Y=b;pj.current=null;} -function Zj(a){var b=a;do{var c=b.alternate;a=b.return;if(0===(b.flags&2048)){c=Gi(c,b,qj);if(null!==c){Y=c;return}c=b;if(24!==c.tag&&23!==c.tag||null===c.memoizedState||0!==(qj&1073741824)||0===(c.mode&4)){for(var d=0,e=c.child;null!==e;)d|=e.lanes|e.childLanes,e=e.sibling;c.childLanes=d;}null!==a&&0===(a.flags&2048)&&(null===a.firstEffect&&(a.firstEffect=b.firstEffect),null!==b.lastEffect&&(null!==a.lastEffect&&(a.lastEffect.nextEffect=b.firstEffect),a.lastEffect=b.lastEffect),1g&&(h=g,g=J,J=h),h=Le(t,J),f=Le(t,g),h&&f&&(1!==v.rangeCount||v.anchorNode!==h.node||v.anchorOffset!==h.offset||v.focusNode!==f.node||v.focusOffset!==f.offset)&&(q=q.createRange(),q.setStart(h.node,h.offset),v.removeAllRanges(),J>g?(v.addRange(q),v.extend(f.node,f.offset)):(q.setEnd(f.node,f.offset),v.addRange(q))))));q=[];for(v=t;v=v.parentNode;)1===v.nodeType&&q.push({element:v,left:v.scrollLeft,top:v.scrollTop});"function"===typeof t.focus&&t.focus();for(t= -0;tO()-jj?Qj(a,0):uj|=c);Mj(a,b);}function lj(a,b){var c=a.stateNode;null!==c&&c.delete(b);b=0;0===b&&(b=a.mode,0===(b&2)?b=1:0===(b&4)?b=99===eg()?1:2:(0===Gj&&(Gj=tj),b=Yc(62914560&~Gj),0===b&&(b=4194304)));c=Hg();a=Kj(a,b);null!==a&&($c(a,b,c),Mj(a,c));}var ck; -ck=function(a,b,c){var d=b.lanes;if(null!==a)if(a.memoizedProps!==b.pendingProps||N.current)ug=!0;else if(0!==(c&d))ug=0!==(a.flags&16384)?!0:!1;else {ug=!1;switch(b.tag){case 3:ri(b);sh();break;case 5:gh(b);break;case 1:Ff(b.type)&&Jf(b);break;case 4:eh(b,b.stateNode.containerInfo);break;case 10:d=b.memoizedProps.value;var e=b.type._context;I(mg,e._currentValue);e._currentValue=d;break;case 13:if(null!==b.memoizedState){if(0!==(c&b.child.childLanes))return ti(a,b,c);I(P,P.current&1);b=hi(a,b,c);return null!== -b?b.sibling:null}I(P,P.current&1);break;case 19:d=0!==(c&b.childLanes);if(0!==(a.flags&64)){if(d)return Ai(a,b,c);b.flags|=64;}e=b.memoizedState;null!==e&&(e.rendering=null,e.tail=null,e.lastEffect=null);I(P,P.current);if(d)break;else return null;case 23:case 24:return b.lanes=0,mi(a,b,c)}return hi(a,b,c)}else ug=!1;b.lanes=0;switch(b.tag){case 2:d=b.type;null!==a&&(a.alternate=null,b.alternate=null,b.flags|=2);a=b.pendingProps;e=Ef(b,M.current);tg(b,c);e=Ch(null,b,d,a,e,c);b.flags|=1;if("object"=== -typeof e&&null!==e&&"function"===typeof e.render&&void 0===e.$$typeof){b.tag=1;b.memoizedState=null;b.updateQueue=null;if(Ff(d)){var f=!0;Jf(b);}else f=!1;b.memoizedState=null!==e.state&&void 0!==e.state?e.state:null;xg(b);var g=d.getDerivedStateFromProps;"function"===typeof g&&Gg(b,d,g,a);e.updater=Kg;b.stateNode=e;e._reactInternals=b;Og(b,d,a,c);b=qi(null,b,d,!0,f,c);}else b.tag=0,fi(null,b,e,c),b=b.child;return b;case 16:e=b.elementType;a:{null!==a&&(a.alternate=null,b.alternate=null,b.flags|=2); -a=b.pendingProps;f=e._init;e=f(e._payload);b.type=e;f=b.tag=hk(e);a=lg(e,a);switch(f){case 0:b=li(null,b,e,a,c);break a;case 1:b=pi(null,b,e,a,c);break a;case 11:b=gi(null,b,e,a,c);break a;case 14:b=ii(null,b,e,lg(e.type,a),d,c);break a}throw Error(y(306,e,""));}return b;case 0:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:lg(d,e),li(a,b,d,e,c);case 1:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:lg(d,e),pi(a,b,d,e,c);case 3:ri(b);d=b.updateQueue;if(null===a||null===d)throw Error(y(282)); -d=b.pendingProps;e=b.memoizedState;e=null!==e?e.element:null;yg(a,b);Cg(b,d,null,c);d=b.memoizedState.element;if(d===e)sh(),b=hi(a,b,c);else {e=b.stateNode;if(f=e.hydrate)kh=rf(b.stateNode.containerInfo.firstChild),jh=b,f=lh=!0;if(f){a=e.mutableSourceEagerHydrationData;if(null!=a)for(e=0;e 3 && arguments[3] !== undefined ? arguments[3] : DEFAULT_THREAD_ID; - - var interaction = { - __count: 1, - id: interactionIDCounter++, - name: name, - timestamp: timestamp - }; - var prevInteractions = exports.__interactionsRef.current; // Traced interactions should stack/accumulate. - // To do that, clone the current interactions. - // The previous set will be restored upon completion. - - var interactions = new Set(prevInteractions); - interactions.add(interaction); - exports.__interactionsRef.current = interactions; - var subscriber = exports.__subscriberRef.current; - var returnValue; - - try { - if (subscriber !== null) { - subscriber.onInteractionTraced(interaction); - } - } finally { - try { - if (subscriber !== null) { - subscriber.onWorkStarted(interactions, threadID); - } - } finally { - try { - returnValue = callback(); - } finally { - exports.__interactionsRef.current = prevInteractions; - - try { - if (subscriber !== null) { - subscriber.onWorkStopped(interactions, threadID); - } - } finally { - interaction.__count--; // If no async work was scheduled for this interaction, - // Notify subscribers that it's completed. - - if (subscriber !== null && interaction.__count === 0) { - subscriber.onInteractionScheduledWorkCompleted(interaction); - } - } - } - } - } - - return returnValue; -} -function unstable_wrap(callback) { - var threadID = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_THREAD_ID; - - var wrappedInteractions = exports.__interactionsRef.current; - var subscriber = exports.__subscriberRef.current; - - if (subscriber !== null) { - subscriber.onWorkScheduled(wrappedInteractions, threadID); - } // Update the pending async work count for the current interactions. - // Update after calling subscribers in case of error. - - - wrappedInteractions.forEach(function (interaction) { - interaction.__count++; - }); - var hasRun = false; - - function wrapped() { - var prevInteractions = exports.__interactionsRef.current; - exports.__interactionsRef.current = wrappedInteractions; - subscriber = exports.__subscriberRef.current; - - try { - var returnValue; - - try { - if (subscriber !== null) { - subscriber.onWorkStarted(wrappedInteractions, threadID); - } - } finally { - try { - returnValue = callback.apply(undefined, arguments); - } finally { - exports.__interactionsRef.current = prevInteractions; - - if (subscriber !== null) { - subscriber.onWorkStopped(wrappedInteractions, threadID); - } - } - } - - return returnValue; - } finally { - if (!hasRun) { - // We only expect a wrapped function to be executed once, - // But in the event that it's executed more than once– - // Only decrement the outstanding interaction counts once. - hasRun = true; // Update pending async counts for all wrapped interactions. - // If this was the last scheduled async work for any of them, - // Mark them as completed. - - wrappedInteractions.forEach(function (interaction) { - interaction.__count--; - - if (subscriber !== null && interaction.__count === 0) { - subscriber.onInteractionScheduledWorkCompleted(interaction); - } - }); - } - } - } - - wrapped.cancel = function cancel() { - subscriber = exports.__subscriberRef.current; - - try { - if (subscriber !== null) { - subscriber.onWorkCanceled(wrappedInteractions, threadID); - } - } finally { - // Update pending async counts for all wrapped interactions. - // If this was the last scheduled async work for any of them, - // Mark them as completed. - wrappedInteractions.forEach(function (interaction) { - interaction.__count--; - - if (subscriber && interaction.__count === 0) { - subscriber.onInteractionScheduledWorkCompleted(interaction); - } - }); - } - }; - - return wrapped; -} - -var subscribers = null; - -{ - subscribers = new Set(); -} - -function unstable_subscribe(subscriber) { - { - subscribers.add(subscriber); - - if (subscribers.size === 1) { - exports.__subscriberRef.current = { - onInteractionScheduledWorkCompleted: onInteractionScheduledWorkCompleted, - onInteractionTraced: onInteractionTraced, - onWorkCanceled: onWorkCanceled, - onWorkScheduled: onWorkScheduled, - onWorkStarted: onWorkStarted, - onWorkStopped: onWorkStopped - }; - } - } -} -function unstable_unsubscribe(subscriber) { - { - subscribers.delete(subscriber); - - if (subscribers.size === 0) { - exports.__subscriberRef.current = null; - } - } -} - -function onInteractionTraced(interaction) { - var didCatchError = false; - var caughtError = null; - subscribers.forEach(function (subscriber) { - try { - subscriber.onInteractionTraced(interaction); - } catch (error) { - if (!didCatchError) { - didCatchError = true; - caughtError = error; - } - } - }); - - if (didCatchError) { - throw caughtError; - } -} - -function onInteractionScheduledWorkCompleted(interaction) { - var didCatchError = false; - var caughtError = null; - subscribers.forEach(function (subscriber) { - try { - subscriber.onInteractionScheduledWorkCompleted(interaction); - } catch (error) { - if (!didCatchError) { - didCatchError = true; - caughtError = error; - } - } - }); - - if (didCatchError) { - throw caughtError; - } -} - -function onWorkScheduled(interactions, threadID) { - var didCatchError = false; - var caughtError = null; - subscribers.forEach(function (subscriber) { - try { - subscriber.onWorkScheduled(interactions, threadID); - } catch (error) { - if (!didCatchError) { - didCatchError = true; - caughtError = error; - } - } - }); - - if (didCatchError) { - throw caughtError; - } -} - -function onWorkStarted(interactions, threadID) { - var didCatchError = false; - var caughtError = null; - subscribers.forEach(function (subscriber) { - try { - subscriber.onWorkStarted(interactions, threadID); - } catch (error) { - if (!didCatchError) { - didCatchError = true; - caughtError = error; - } - } - }); - - if (didCatchError) { - throw caughtError; - } -} - -function onWorkStopped(interactions, threadID) { - var didCatchError = false; - var caughtError = null; - subscribers.forEach(function (subscriber) { - try { - subscriber.onWorkStopped(interactions, threadID); - } catch (error) { - if (!didCatchError) { - didCatchError = true; - caughtError = error; - } - } - }); - - if (didCatchError) { - throw caughtError; - } -} - -function onWorkCanceled(interactions, threadID) { - var didCatchError = false; - var caughtError = null; - subscribers.forEach(function (subscriber) { - try { - subscriber.onWorkCanceled(interactions, threadID); - } catch (error) { - if (!didCatchError) { - didCatchError = true; - caughtError = error; - } - } - }); - - if (didCatchError) { - throw caughtError; - } -} - -exports.unstable_clear = unstable_clear; -exports.unstable_getCurrent = unstable_getCurrent; -exports.unstable_getThreadID = unstable_getThreadID; -exports.unstable_subscribe = unstable_subscribe; -exports.unstable_trace = unstable_trace; -exports.unstable_unsubscribe = unstable_unsubscribe; -exports.unstable_wrap = unstable_wrap; - })(); -} -}); - -var tracing = createCommonjsModule(function (module) { - -if (process.env.NODE_ENV === 'production') { - module.exports = schedulerTracing_production_min; -} else { - module.exports = schedulerTracing_development; -} -}); - -var reactDom_development = createCommonjsModule(function (module, exports) { - -if (process.env.NODE_ENV !== "production") { - (function() { - -var React = react; -var _assign = objectAssign; -var Scheduler = scheduler; -var tracing$1 = tracing; - -var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; - -// by calls to these methods by a Babel plugin. -// -// In PROD (or in packages without access to React internals), -// they are left as they are instead. - -function warn(format) { - { - for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - args[_key - 1] = arguments[_key]; - } - - printWarning('warn', format, args); - } -} -function error(format) { - { - for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { - args[_key2 - 1] = arguments[_key2]; - } - - printWarning('error', format, args); - } -} - -function printWarning(level, format, args) { - // When changing this logic, you might want to also - // update consoleWithStackDev.www.js as well. - { - var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; - var stack = ReactDebugCurrentFrame.getStackAddendum(); - - if (stack !== '') { - format += '%s'; - args = args.concat([stack]); - } - - var argsWithFormat = args.map(function (item) { - return '' + item; - }); // Careful: RN currently depends on this prefix - - argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it - // breaks IE9: https://github.com/facebook/react/issues/13610 - // eslint-disable-next-line react-internal/no-production-logging - - Function.prototype.apply.call(console[level], console, argsWithFormat); - } -} - -if (!React) { - { - throw Error( "ReactDOM was loaded before React. Make sure you load the React package before loading ReactDOM." ); - } -} - -var FunctionComponent = 0; -var ClassComponent = 1; -var IndeterminateComponent = 2; // Before we know whether it is function or class - -var HostRoot = 3; // Root of a host tree. Could be nested inside another node. - -var HostPortal = 4; // A subtree. Could be an entry point to a different renderer. - -var HostComponent = 5; -var HostText = 6; -var Fragment = 7; -var Mode = 8; -var ContextConsumer = 9; -var ContextProvider = 10; -var ForwardRef = 11; -var Profiler = 12; -var SuspenseComponent = 13; -var MemoComponent = 14; -var SimpleMemoComponent = 15; -var LazyComponent = 16; -var IncompleteClassComponent = 17; -var DehydratedFragment = 18; -var SuspenseListComponent = 19; -var FundamentalComponent = 20; -var ScopeComponent = 21; -var Block = 22; -var OffscreenComponent = 23; -var LegacyHiddenComponent = 24; - -// Filter certain DOM attributes (e.g. src, href) if their values are empty strings. - -var enableProfilerTimer = true; // Record durations for commit and passive effects phases. - -var enableFundamentalAPI = false; // Experimental Scope support. -var enableNewReconciler = false; // Errors that are thrown while unmounting (or after in the case of passive effects) -var warnAboutStringRefs = false; - -var allNativeEvents = new Set(); -/** - * Mapping from registration name to event name - */ - - -var registrationNameDependencies = {}; -/** - * Mapping from lowercase registration names to the properly cased version, - * used to warn in the case of missing event handlers. Available - * only in true. - * @type {Object} - */ - -var possibleRegistrationNames = {} ; // Trust the developer to only use possibleRegistrationNames in true - -function registerTwoPhaseEvent(registrationName, dependencies) { - registerDirectEvent(registrationName, dependencies); - registerDirectEvent(registrationName + 'Capture', dependencies); -} -function registerDirectEvent(registrationName, dependencies) { - { - if (registrationNameDependencies[registrationName]) { - error('EventRegistry: More than one plugin attempted to publish the same ' + 'registration name, `%s`.', registrationName); - } - } - - registrationNameDependencies[registrationName] = dependencies; - - { - var lowerCasedName = registrationName.toLowerCase(); - possibleRegistrationNames[lowerCasedName] = registrationName; - - if (registrationName === 'onDoubleClick') { - possibleRegistrationNames.ondblclick = registrationName; - } - } - - for (var i = 0; i < dependencies.length; i++) { - allNativeEvents.add(dependencies[i]); - } -} - -var canUseDOM = !!(typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined'); - -// A reserved attribute. -// It is handled by React separately and shouldn't be written to the DOM. -var RESERVED = 0; // A simple string attribute. -// Attributes that aren't in the filter are presumed to have this type. - -var STRING = 1; // A string attribute that accepts booleans in React. In HTML, these are called -// "enumerated" attributes with "true" and "false" as possible values. -// When true, it should be set to a "true" string. -// When false, it should be set to a "false" string. - -var BOOLEANISH_STRING = 2; // A real boolean attribute. -// When true, it should be present (set either to an empty string or its name). -// When false, it should be omitted. - -var BOOLEAN = 3; // An attribute that can be used as a flag as well as with a value. -// When true, it should be present (set either to an empty string or its name). -// When false, it should be omitted. -// For any other value, should be present with that value. - -var OVERLOADED_BOOLEAN = 4; // An attribute that must be numeric or parse as a numeric. -// When falsy, it should be removed. - -var NUMERIC = 5; // An attribute that must be positive numeric or parse as a positive numeric. -// When falsy, it should be removed. - -var POSITIVE_NUMERIC = 6; - -/* eslint-disable max-len */ -var ATTRIBUTE_NAME_START_CHAR = ":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD"; -/* eslint-enable max-len */ - -var ATTRIBUTE_NAME_CHAR = ATTRIBUTE_NAME_START_CHAR + "\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040"; -var ROOT_ATTRIBUTE_NAME = 'data-reactroot'; -var VALID_ATTRIBUTE_NAME_REGEX = new RegExp('^[' + ATTRIBUTE_NAME_START_CHAR + '][' + ATTRIBUTE_NAME_CHAR + ']*$'); -var hasOwnProperty = Object.prototype.hasOwnProperty; -var illegalAttributeNameCache = {}; -var validatedAttributeNameCache = {}; -function isAttributeNameSafe(attributeName) { - if (hasOwnProperty.call(validatedAttributeNameCache, attributeName)) { - return true; - } - - if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) { - return false; - } - - if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) { - validatedAttributeNameCache[attributeName] = true; - return true; - } - - illegalAttributeNameCache[attributeName] = true; - - { - error('Invalid attribute name: `%s`', attributeName); - } - - return false; -} -function shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag) { - if (propertyInfo !== null) { - return propertyInfo.type === RESERVED; - } - - if (isCustomComponentTag) { - return false; - } - - if (name.length > 2 && (name[0] === 'o' || name[0] === 'O') && (name[1] === 'n' || name[1] === 'N')) { - return true; - } - - return false; -} -function shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag) { - if (propertyInfo !== null && propertyInfo.type === RESERVED) { - return false; - } - - switch (typeof value) { - case 'function': // $FlowIssue symbol is perfectly valid here - - case 'symbol': - // eslint-disable-line - return true; - - case 'boolean': - { - if (isCustomComponentTag) { - return false; - } - - if (propertyInfo !== null) { - return !propertyInfo.acceptsBooleans; - } else { - var prefix = name.toLowerCase().slice(0, 5); - return prefix !== 'data-' && prefix !== 'aria-'; - } - } - - default: - return false; - } -} -function shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag) { - if (value === null || typeof value === 'undefined') { - return true; - } - - if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag)) { - return true; - } - - if (isCustomComponentTag) { - return false; - } - - if (propertyInfo !== null) { - - switch (propertyInfo.type) { - case BOOLEAN: - return !value; - - case OVERLOADED_BOOLEAN: - return value === false; - - case NUMERIC: - return isNaN(value); - - case POSITIVE_NUMERIC: - return isNaN(value) || value < 1; - } - } - - return false; -} -function getPropertyInfo(name) { - return properties.hasOwnProperty(name) ? properties[name] : null; -} - -function PropertyInfoRecord(name, type, mustUseProperty, attributeName, attributeNamespace, sanitizeURL, removeEmptyString) { - this.acceptsBooleans = type === BOOLEANISH_STRING || type === BOOLEAN || type === OVERLOADED_BOOLEAN; - this.attributeName = attributeName; - this.attributeNamespace = attributeNamespace; - this.mustUseProperty = mustUseProperty; - this.propertyName = name; - this.type = type; - this.sanitizeURL = sanitizeURL; - this.removeEmptyString = removeEmptyString; -} // When adding attributes to this list, be sure to also add them to -// the `possibleStandardNames` module to ensure casing and incorrect -// name warnings. - - -var properties = {}; // These props are reserved by React. They shouldn't be written to the DOM. - -var reservedProps = ['children', 'dangerouslySetInnerHTML', // TODO: This prevents the assignment of defaultValue to regular -// elements (not just inputs). Now that ReactDOMInput assigns to the -// defaultValue property -- do we need this? -'defaultValue', 'defaultChecked', 'innerHTML', 'suppressContentEditableWarning', 'suppressHydrationWarning', 'style']; -reservedProps.forEach(function (name) { - properties[name] = new PropertyInfoRecord(name, RESERVED, false, // mustUseProperty - name, // attributeName - null, // attributeNamespace - false, // sanitizeURL - false); -}); // A few React string attributes have a different name. -// This is a mapping from React prop names to the attribute names. - -[['acceptCharset', 'accept-charset'], ['className', 'class'], ['htmlFor', 'for'], ['httpEquiv', 'http-equiv']].forEach(function (_ref) { - var name = _ref[0], - attributeName = _ref[1]; - properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty - attributeName, // attributeName - null, // attributeNamespace - false, // sanitizeURL - false); -}); // These are "enumerated" HTML attributes that accept "true" and "false". -// In React, we let users pass `true` and `false` even though technically -// these aren't boolean attributes (they are coerced to strings). - -['contentEditable', 'draggable', 'spellCheck', 'value'].forEach(function (name) { - properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty - name.toLowerCase(), // attributeName - null, // attributeNamespace - false, // sanitizeURL - false); -}); // These are "enumerated" SVG attributes that accept "true" and "false". -// In React, we let users pass `true` and `false` even though technically -// these aren't boolean attributes (they are coerced to strings). -// Since these are SVG attributes, their attribute names are case-sensitive. - -['autoReverse', 'externalResourcesRequired', 'focusable', 'preserveAlpha'].forEach(function (name) { - properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty - name, // attributeName - null, // attributeNamespace - false, // sanitizeURL - false); -}); // These are HTML boolean attributes. - -['allowFullScreen', 'async', // Note: there is a special case that prevents it from being written to the DOM -// on the client side because the browsers are inconsistent. Instead we call focus(). -'autoFocus', 'autoPlay', 'controls', 'default', 'defer', 'disabled', 'disablePictureInPicture', 'disableRemotePlayback', 'formNoValidate', 'hidden', 'loop', 'noModule', 'noValidate', 'open', 'playsInline', 'readOnly', 'required', 'reversed', 'scoped', 'seamless', // Microdata -'itemScope'].forEach(function (name) { - properties[name] = new PropertyInfoRecord(name, BOOLEAN, false, // mustUseProperty - name.toLowerCase(), // attributeName - null, // attributeNamespace - false, // sanitizeURL - false); -}); // These are the few React props that we set as DOM properties -// rather than attributes. These are all booleans. - -['checked', // Note: `option.selected` is not updated if `select.multiple` is -// disabled with `removeAttribute`. We have special logic for handling this. -'multiple', 'muted', 'selected' // NOTE: if you add a camelCased prop to this list, -// you'll need to set attributeName to name.toLowerCase() -// instead in the assignment below. -].forEach(function (name) { - properties[name] = new PropertyInfoRecord(name, BOOLEAN, true, // mustUseProperty - name, // attributeName - null, // attributeNamespace - false, // sanitizeURL - false); -}); // These are HTML attributes that are "overloaded booleans": they behave like -// booleans, but can also accept a string value. - -['capture', 'download' // NOTE: if you add a camelCased prop to this list, -// you'll need to set attributeName to name.toLowerCase() -// instead in the assignment below. -].forEach(function (name) { - properties[name] = new PropertyInfoRecord(name, OVERLOADED_BOOLEAN, false, // mustUseProperty - name, // attributeName - null, // attributeNamespace - false, // sanitizeURL - false); -}); // These are HTML attributes that must be positive numbers. - -['cols', 'rows', 'size', 'span' // NOTE: if you add a camelCased prop to this list, -// you'll need to set attributeName to name.toLowerCase() -// instead in the assignment below. -].forEach(function (name) { - properties[name] = new PropertyInfoRecord(name, POSITIVE_NUMERIC, false, // mustUseProperty - name, // attributeName - null, // attributeNamespace - false, // sanitizeURL - false); -}); // These are HTML attributes that must be numbers. - -['rowSpan', 'start'].forEach(function (name) { - properties[name] = new PropertyInfoRecord(name, NUMERIC, false, // mustUseProperty - name.toLowerCase(), // attributeName - null, // attributeNamespace - false, // sanitizeURL - false); -}); -var CAMELIZE = /[\-\:]([a-z])/g; - -var capitalize = function (token) { - return token[1].toUpperCase(); -}; // This is a list of all SVG attributes that need special casing, namespacing, -// or boolean value assignment. Regular attributes that just accept strings -// and have the same names are omitted, just like in the HTML attribute filter. -// Some of these attributes can be hard to find. This list was created by -// scraping the MDN documentation. - - -['accent-height', 'alignment-baseline', 'arabic-form', 'baseline-shift', 'cap-height', 'clip-path', 'clip-rule', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'dominant-baseline', 'enable-background', 'fill-opacity', 'fill-rule', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'glyph-name', 'glyph-orientation-horizontal', 'glyph-orientation-vertical', 'horiz-adv-x', 'horiz-origin-x', 'image-rendering', 'letter-spacing', 'lighting-color', 'marker-end', 'marker-mid', 'marker-start', 'overline-position', 'overline-thickness', 'paint-order', 'panose-1', 'pointer-events', 'rendering-intent', 'shape-rendering', 'stop-color', 'stop-opacity', 'strikethrough-position', 'strikethrough-thickness', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke-width', 'text-anchor', 'text-decoration', 'text-rendering', 'underline-position', 'underline-thickness', 'unicode-bidi', 'unicode-range', 'units-per-em', 'v-alphabetic', 'v-hanging', 'v-ideographic', 'v-mathematical', 'vector-effect', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'word-spacing', 'writing-mode', 'xmlns:xlink', 'x-height' // NOTE: if you add a camelCased prop to this list, -// you'll need to set attributeName to name.toLowerCase() -// instead in the assignment below. -].forEach(function (attributeName) { - var name = attributeName.replace(CAMELIZE, capitalize); - properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty - attributeName, null, // attributeNamespace - false, // sanitizeURL - false); -}); // String SVG attributes with the xlink namespace. - -['xlink:actuate', 'xlink:arcrole', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type' // NOTE: if you add a camelCased prop to this list, -// you'll need to set attributeName to name.toLowerCase() -// instead in the assignment below. -].forEach(function (attributeName) { - var name = attributeName.replace(CAMELIZE, capitalize); - properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty - attributeName, 'http://www.w3.org/1999/xlink', false, // sanitizeURL - false); -}); // String SVG attributes with the xml namespace. - -['xml:base', 'xml:lang', 'xml:space' // NOTE: if you add a camelCased prop to this list, -// you'll need to set attributeName to name.toLowerCase() -// instead in the assignment below. -].forEach(function (attributeName) { - var name = attributeName.replace(CAMELIZE, capitalize); - properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty - attributeName, 'http://www.w3.org/XML/1998/namespace', false, // sanitizeURL - false); -}); // These attribute exists both in HTML and SVG. -// The attribute name is case-sensitive in SVG so we can't just use -// the React name like we do for attributes that exist only in HTML. - -['tabIndex', 'crossOrigin'].forEach(function (attributeName) { - properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty - attributeName.toLowerCase(), // attributeName - null, // attributeNamespace - false, // sanitizeURL - false); -}); // These attributes accept URLs. These must not allow javascript: URLS. -// These will also need to accept Trusted Types object in the future. - -var xlinkHref = 'xlinkHref'; -properties[xlinkHref] = new PropertyInfoRecord('xlinkHref', STRING, false, // mustUseProperty -'xlink:href', 'http://www.w3.org/1999/xlink', true, // sanitizeURL -false); -['src', 'href', 'action', 'formAction'].forEach(function (attributeName) { - properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty - attributeName.toLowerCase(), // attributeName - null, // attributeNamespace - true, // sanitizeURL - true); -}); - -// and any newline or tab are filtered out as if they're not part of the URL. -// https://url.spec.whatwg.org/#url-parsing -// Tab or newline are defined as \r\n\t: -// https://infra.spec.whatwg.org/#ascii-tab-or-newline -// A C0 control is a code point in the range \u0000 NULL to \u001F -// INFORMATION SEPARATOR ONE, inclusive: -// https://infra.spec.whatwg.org/#c0-control-or-space - -/* eslint-disable max-len */ - -var isJavaScriptProtocol = /^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i; -var didWarn = false; - -function sanitizeURL(url) { - { - if (!didWarn && isJavaScriptProtocol.test(url)) { - didWarn = true; - - error('A future version of React will block javascript: URLs as a security precaution. ' + 'Use event handlers instead if you can. If you need to generate unsafe HTML try ' + 'using dangerouslySetInnerHTML instead. React was passed %s.', JSON.stringify(url)); - } - } -} - -/** - * Get the value for a property on a node. Only used in DEV for SSR validation. - * The "expected" argument is used as a hint of what the expected value is. - * Some properties have multiple equivalent values. - */ -function getValueForProperty(node, name, expected, propertyInfo) { - { - if (propertyInfo.mustUseProperty) { - var propertyName = propertyInfo.propertyName; - return node[propertyName]; - } else { - if ( propertyInfo.sanitizeURL) { - // If we haven't fully disabled javascript: URLs, and if - // the hydration is successful of a javascript: URL, we - // still want to warn on the client. - sanitizeURL('' + expected); - } - - var attributeName = propertyInfo.attributeName; - var stringValue = null; - - if (propertyInfo.type === OVERLOADED_BOOLEAN) { - if (node.hasAttribute(attributeName)) { - var value = node.getAttribute(attributeName); - - if (value === '') { - return true; - } - - if (shouldRemoveAttribute(name, expected, propertyInfo, false)) { - return value; - } - - if (value === '' + expected) { - return expected; - } - - return value; - } - } else if (node.hasAttribute(attributeName)) { - if (shouldRemoveAttribute(name, expected, propertyInfo, false)) { - // We had an attribute but shouldn't have had one, so read it - // for the error message. - return node.getAttribute(attributeName); - } - - if (propertyInfo.type === BOOLEAN) { - // If this was a boolean, it doesn't matter what the value is - // the fact that we have it is the same as the expected. - return expected; - } // Even if this property uses a namespace we use getAttribute - // because we assume its namespaced name is the same as our config. - // To use getAttributeNS we need the local name which we don't have - // in our config atm. - - - stringValue = node.getAttribute(attributeName); - } - - if (shouldRemoveAttribute(name, expected, propertyInfo, false)) { - return stringValue === null ? expected : stringValue; - } else if (stringValue === '' + expected) { - return expected; - } else { - return stringValue; - } - } - } -} -/** - * Get the value for a attribute on a node. Only used in DEV for SSR validation. - * The third argument is used as a hint of what the expected value is. Some - * attributes have multiple equivalent values. - */ - -function getValueForAttribute(node, name, expected) { - { - if (!isAttributeNameSafe(name)) { - return; - } // If the object is an opaque reference ID, it's expected that - // the next prop is different than the server value, so just return - // expected - - - if (isOpaqueHydratingObject(expected)) { - return expected; - } - - if (!node.hasAttribute(name)) { - return expected === undefined ? undefined : null; - } - - var value = node.getAttribute(name); - - if (value === '' + expected) { - return expected; - } - - return value; - } -} -/** - * Sets the value for a property on a node. - * - * @param {DOMElement} node - * @param {string} name - * @param {*} value - */ - -function setValueForProperty(node, name, value, isCustomComponentTag) { - var propertyInfo = getPropertyInfo(name); - - if (shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag)) { - return; - } - - if (shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag)) { - value = null; - } // If the prop isn't in the special list, treat it as a simple attribute. - - - if (isCustomComponentTag || propertyInfo === null) { - if (isAttributeNameSafe(name)) { - var _attributeName = name; - - if (value === null) { - node.removeAttribute(_attributeName); - } else { - node.setAttribute(_attributeName, '' + value); - } - } - - return; - } - - var mustUseProperty = propertyInfo.mustUseProperty; - - if (mustUseProperty) { - var propertyName = propertyInfo.propertyName; - - if (value === null) { - var type = propertyInfo.type; - node[propertyName] = type === BOOLEAN ? false : ''; - } else { - // Contrary to `setAttribute`, object properties are properly - // `toString`ed by IE8/9. - node[propertyName] = value; - } - - return; - } // The rest are treated as attributes with special cases. - - - var attributeName = propertyInfo.attributeName, - attributeNamespace = propertyInfo.attributeNamespace; - - if (value === null) { - node.removeAttribute(attributeName); - } else { - var _type = propertyInfo.type; - var attributeValue; - - if (_type === BOOLEAN || _type === OVERLOADED_BOOLEAN && value === true) { - // If attribute type is boolean, we know for sure it won't be an execution sink - // and we won't require Trusted Type here. - attributeValue = ''; - } else { - // `setAttribute` with objects becomes only `[object]` in IE8/9, - // ('' + value) makes it output the correct toString()-value. - { - attributeValue = '' + value; - } - - if (propertyInfo.sanitizeURL) { - sanitizeURL(attributeValue.toString()); - } - } - - if (attributeNamespace) { - node.setAttributeNS(attributeNamespace, attributeName, attributeValue); - } else { - node.setAttribute(attributeName, attributeValue); - } - } -} - -// ATTENTION -// When adding new symbols to this file, -// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols' -// The Symbol used to tag the ReactElement-like types. If there is no native Symbol -// nor polyfill, then a plain number is used for performance. -var REACT_ELEMENT_TYPE = 0xeac7; -var REACT_PORTAL_TYPE = 0xeaca; -var REACT_FRAGMENT_TYPE = 0xeacb; -var REACT_STRICT_MODE_TYPE = 0xeacc; -var REACT_PROFILER_TYPE = 0xead2; -var REACT_PROVIDER_TYPE = 0xeacd; -var REACT_CONTEXT_TYPE = 0xeace; -var REACT_FORWARD_REF_TYPE = 0xead0; -var REACT_SUSPENSE_TYPE = 0xead1; -var REACT_SUSPENSE_LIST_TYPE = 0xead8; -var REACT_MEMO_TYPE = 0xead3; -var REACT_LAZY_TYPE = 0xead4; -var REACT_BLOCK_TYPE = 0xead9; -var REACT_SCOPE_TYPE = 0xead7; -var REACT_OPAQUE_ID_TYPE = 0xeae0; -var REACT_DEBUG_TRACING_MODE_TYPE = 0xeae1; -var REACT_OFFSCREEN_TYPE = 0xeae2; -var REACT_LEGACY_HIDDEN_TYPE = 0xeae3; - -if (typeof Symbol === 'function' && Symbol.for) { - var symbolFor = Symbol.for; - REACT_ELEMENT_TYPE = symbolFor('react.element'); - REACT_PORTAL_TYPE = symbolFor('react.portal'); - REACT_FRAGMENT_TYPE = symbolFor('react.fragment'); - REACT_STRICT_MODE_TYPE = symbolFor('react.strict_mode'); - REACT_PROFILER_TYPE = symbolFor('react.profiler'); - REACT_PROVIDER_TYPE = symbolFor('react.provider'); - REACT_CONTEXT_TYPE = symbolFor('react.context'); - REACT_FORWARD_REF_TYPE = symbolFor('react.forward_ref'); - REACT_SUSPENSE_TYPE = symbolFor('react.suspense'); - REACT_SUSPENSE_LIST_TYPE = symbolFor('react.suspense_list'); - REACT_MEMO_TYPE = symbolFor('react.memo'); - REACT_LAZY_TYPE = symbolFor('react.lazy'); - REACT_BLOCK_TYPE = symbolFor('react.block'); - symbolFor('react.server.block'); - symbolFor('react.fundamental'); - REACT_SCOPE_TYPE = symbolFor('react.scope'); - REACT_OPAQUE_ID_TYPE = symbolFor('react.opaque.id'); - REACT_DEBUG_TRACING_MODE_TYPE = symbolFor('react.debug_trace_mode'); - REACT_OFFSCREEN_TYPE = symbolFor('react.offscreen'); - REACT_LEGACY_HIDDEN_TYPE = symbolFor('react.legacy_hidden'); -} - -var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; -var FAUX_ITERATOR_SYMBOL = '@@iterator'; -function getIteratorFn(maybeIterable) { - if (maybeIterable === null || typeof maybeIterable !== 'object') { - return null; - } - - var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]; - - if (typeof maybeIterator === 'function') { - return maybeIterator; - } - - return null; -} - -// Helpers to patch console.logs to avoid logging during side-effect free -// replaying on render function. This currently only patches the object -// lazily which won't cover if the log function was extracted eagerly. -// We could also eagerly patch the method. -var disabledDepth = 0; -var prevLog; -var prevInfo; -var prevWarn; -var prevError; -var prevGroup; -var prevGroupCollapsed; -var prevGroupEnd; - -function disabledLog() {} - -disabledLog.__reactDisabledLog = true; -function disableLogs() { - { - if (disabledDepth === 0) { - /* eslint-disable react-internal/no-production-logging */ - prevLog = console.log; - prevInfo = console.info; - prevWarn = console.warn; - prevError = console.error; - prevGroup = console.group; - prevGroupCollapsed = console.groupCollapsed; - prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099 - - var props = { - configurable: true, - enumerable: true, - value: disabledLog, - writable: true - }; // $FlowFixMe Flow thinks console is immutable. - - Object.defineProperties(console, { - info: props, - log: props, - warn: props, - error: props, - group: props, - groupCollapsed: props, - groupEnd: props - }); - /* eslint-enable react-internal/no-production-logging */ - } - - disabledDepth++; - } -} -function reenableLogs() { - { - disabledDepth--; - - if (disabledDepth === 0) { - /* eslint-disable react-internal/no-production-logging */ - var props = { - configurable: true, - enumerable: true, - writable: true - }; // $FlowFixMe Flow thinks console is immutable. - - Object.defineProperties(console, { - log: _assign({}, props, { - value: prevLog - }), - info: _assign({}, props, { - value: prevInfo - }), - warn: _assign({}, props, { - value: prevWarn - }), - error: _assign({}, props, { - value: prevError - }), - group: _assign({}, props, { - value: prevGroup - }), - groupCollapsed: _assign({}, props, { - value: prevGroupCollapsed - }), - groupEnd: _assign({}, props, { - value: prevGroupEnd - }) - }); - /* eslint-enable react-internal/no-production-logging */ - } - - if (disabledDepth < 0) { - error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.'); - } - } -} - -var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; -var prefix; -function describeBuiltInComponentFrame(name, source, ownerFn) { - { - if (prefix === undefined) { - // Extract the VM specific prefix used by each line. - try { - throw Error(); - } catch (x) { - var match = x.stack.trim().match(/\n( *(at )?)/); - prefix = match && match[1] || ''; - } - } // We use the prefix to ensure our stacks line up with native stack frames. - - - return '\n' + prefix + name; - } -} -var reentry = false; -var componentFrameCache; - -{ - var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map; - componentFrameCache = new PossiblyWeakMap(); -} - -function describeNativeComponentFrame(fn, construct) { - // If something asked for a stack inside a fake render, it should get ignored. - if (!fn || reentry) { - return ''; - } - - { - var frame = componentFrameCache.get(fn); - - if (frame !== undefined) { - return frame; - } - } - - var control; - reentry = true; - var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined. - - Error.prepareStackTrace = undefined; - var previousDispatcher; - - { - previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function - // for warnings. - - ReactCurrentDispatcher.current = null; - disableLogs(); - } - - try { - // This should throw. - if (construct) { - // Something should be setting the props in the constructor. - var Fake = function () { - throw Error(); - }; // $FlowFixMe - - - Object.defineProperty(Fake.prototype, 'props', { - set: function () { - // We use a throwing setter instead of frozen or non-writable props - // because that won't throw in a non-strict mode function. - throw Error(); - } - }); - - if (typeof Reflect === 'object' && Reflect.construct) { - // We construct a different control for this case to include any extra - // frames added by the construct call. - try { - Reflect.construct(Fake, []); - } catch (x) { - control = x; - } - - Reflect.construct(fn, [], Fake); - } else { - try { - Fake.call(); - } catch (x) { - control = x; - } - - fn.call(Fake.prototype); - } - } else { - try { - throw Error(); - } catch (x) { - control = x; - } - - fn(); - } - } catch (sample) { - // This is inlined manually because closure doesn't do it for us. - if (sample && control && typeof sample.stack === 'string') { - // This extracts the first frame from the sample that isn't also in the control. - // Skipping one frame that we assume is the frame that calls the two. - var sampleLines = sample.stack.split('\n'); - var controlLines = control.stack.split('\n'); - var s = sampleLines.length - 1; - var c = controlLines.length - 1; - - while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) { - // We expect at least one stack frame to be shared. - // Typically this will be the root most one. However, stack frames may be - // cut off due to maximum stack limits. In this case, one maybe cut off - // earlier than the other. We assume that the sample is longer or the same - // and there for cut off earlier. So we should find the root most frame in - // the sample somewhere in the control. - c--; - } - - for (; s >= 1 && c >= 0; s--, c--) { - // Next we find the first one that isn't the same which should be the - // frame that called our sample function and the control. - if (sampleLines[s] !== controlLines[c]) { - // In V8, the first line is describing the message but other VMs don't. - // If we're about to return the first line, and the control is also on the same - // line, that's a pretty good indicator that our sample threw at same line as - // the control. I.e. before we entered the sample frame. So we ignore this result. - // This can happen if you passed a class to function component, or non-function. - if (s !== 1 || c !== 1) { - do { - s--; - c--; // We may still have similar intermediate frames from the construct call. - // The next one that isn't the same should be our match though. - - if (c < 0 || sampleLines[s] !== controlLines[c]) { - // V8 adds a "new" prefix for native classes. Let's remove it to make it prettier. - var _frame = '\n' + sampleLines[s].replace(' at new ', ' at '); - - { - if (typeof fn === 'function') { - componentFrameCache.set(fn, _frame); - } - } // Return the line we found. - - - return _frame; - } - } while (s >= 1 && c >= 0); - } - - break; - } - } - } - } finally { - reentry = false; - - { - ReactCurrentDispatcher.current = previousDispatcher; - reenableLogs(); - } - - Error.prepareStackTrace = previousPrepareStackTrace; - } // Fallback to just using the name if we couldn't make it throw. - - - var name = fn ? fn.displayName || fn.name : ''; - var syntheticFrame = name ? describeBuiltInComponentFrame(name) : ''; - - { - if (typeof fn === 'function') { - componentFrameCache.set(fn, syntheticFrame); - } - } - - return syntheticFrame; -} - -function describeClassComponentFrame(ctor, source, ownerFn) { - { - return describeNativeComponentFrame(ctor, true); - } -} -function describeFunctionComponentFrame(fn, source, ownerFn) { - { - return describeNativeComponentFrame(fn, false); - } -} - -function shouldConstruct(Component) { - var prototype = Component.prototype; - return !!(prototype && prototype.isReactComponent); -} - -function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) { - - if (type == null) { - return ''; - } - - if (typeof type === 'function') { - { - return describeNativeComponentFrame(type, shouldConstruct(type)); - } - } - - if (typeof type === 'string') { - return describeBuiltInComponentFrame(type); - } - - switch (type) { - case REACT_SUSPENSE_TYPE: - return describeBuiltInComponentFrame('Suspense'); - - case REACT_SUSPENSE_LIST_TYPE: - return describeBuiltInComponentFrame('SuspenseList'); - } - - if (typeof type === 'object') { - switch (type.$$typeof) { - case REACT_FORWARD_REF_TYPE: - return describeFunctionComponentFrame(type.render); - - case REACT_MEMO_TYPE: - // Memo may contain any component type so we recursively resolve it. - return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn); - - case REACT_BLOCK_TYPE: - return describeFunctionComponentFrame(type._render); - - case REACT_LAZY_TYPE: - { - var lazyComponent = type; - var payload = lazyComponent._payload; - var init = lazyComponent._init; - - try { - // Lazy may contain any component type so we recursively resolve it. - return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn); - } catch (x) {} - } - } - } - - return ''; -} - -function describeFiber(fiber) { - fiber._debugOwner ? fiber._debugOwner.type : null ; - fiber._debugSource ; - - switch (fiber.tag) { - case HostComponent: - return describeBuiltInComponentFrame(fiber.type); - - case LazyComponent: - return describeBuiltInComponentFrame('Lazy'); - - case SuspenseComponent: - return describeBuiltInComponentFrame('Suspense'); - - case SuspenseListComponent: - return describeBuiltInComponentFrame('SuspenseList'); - - case FunctionComponent: - case IndeterminateComponent: - case SimpleMemoComponent: - return describeFunctionComponentFrame(fiber.type); - - case ForwardRef: - return describeFunctionComponentFrame(fiber.type.render); - - case Block: - return describeFunctionComponentFrame(fiber.type._render); - - case ClassComponent: - return describeClassComponentFrame(fiber.type); - - default: - return ''; - } -} - -function getStackByFiberInDevAndProd(workInProgress) { - try { - var info = ''; - var node = workInProgress; - - do { - info += describeFiber(node); - node = node.return; - } while (node); - - return info; - } catch (x) { - return '\nError generating stack: ' + x.message + '\n' + x.stack; - } -} - -function getWrappedName(outerType, innerType, wrapperName) { - var functionName = innerType.displayName || innerType.name || ''; - return outerType.displayName || (functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName); -} - -function getContextName(type) { - return type.displayName || 'Context'; -} - -function getComponentName(type) { - if (type == null) { - // Host root, text node or just invalid type. - return null; - } - - { - if (typeof type.tag === 'number') { - error('Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.'); - } - } - - if (typeof type === 'function') { - return type.displayName || type.name || null; - } - - if (typeof type === 'string') { - return type; - } - - switch (type) { - case REACT_FRAGMENT_TYPE: - return 'Fragment'; - - case REACT_PORTAL_TYPE: - return 'Portal'; - - case REACT_PROFILER_TYPE: - return 'Profiler'; - - case REACT_STRICT_MODE_TYPE: - return 'StrictMode'; - - case REACT_SUSPENSE_TYPE: - return 'Suspense'; - - case REACT_SUSPENSE_LIST_TYPE: - return 'SuspenseList'; - } - - if (typeof type === 'object') { - switch (type.$$typeof) { - case REACT_CONTEXT_TYPE: - var context = type; - return getContextName(context) + '.Consumer'; - - case REACT_PROVIDER_TYPE: - var provider = type; - return getContextName(provider._context) + '.Provider'; - - case REACT_FORWARD_REF_TYPE: - return getWrappedName(type, type.render, 'ForwardRef'); - - case REACT_MEMO_TYPE: - return getComponentName(type.type); - - case REACT_BLOCK_TYPE: - return getComponentName(type._render); - - case REACT_LAZY_TYPE: - { - var lazyComponent = type; - var payload = lazyComponent._payload; - var init = lazyComponent._init; - - try { - return getComponentName(init(payload)); - } catch (x) { - return null; - } - } - } - } - - return null; -} - -var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; -var current = null; -var isRendering = false; -function getCurrentFiberOwnerNameInDevOrNull() { - { - if (current === null) { - return null; - } - - var owner = current._debugOwner; - - if (owner !== null && typeof owner !== 'undefined') { - return getComponentName(owner.type); - } - } - - return null; -} - -function getCurrentFiberStackInDev() { - { - if (current === null) { - return ''; - } // Safe because if current fiber exists, we are reconciling, - // and it is guaranteed to be the work-in-progress version. - - - return getStackByFiberInDevAndProd(current); - } -} - -function resetCurrentFiber() { - { - ReactDebugCurrentFrame.getCurrentStack = null; - current = null; - isRendering = false; - } -} -function setCurrentFiber(fiber) { - { - ReactDebugCurrentFrame.getCurrentStack = getCurrentFiberStackInDev; - current = fiber; - isRendering = false; - } -} -function setIsRendering(rendering) { - { - isRendering = rendering; - } -} -function getIsRendering() { - { - return isRendering; - } -} - -// Flow does not allow string concatenation of most non-string types. To work -// around this limitation, we use an opaque type that can only be obtained by -// passing the value through getToStringValue first. -function toString(value) { - return '' + value; -} -function getToStringValue(value) { - switch (typeof value) { - case 'boolean': - case 'number': - case 'object': - case 'string': - case 'undefined': - return value; - - default: - // function, symbol are assigned as empty strings - return ''; - } -} - -var hasReadOnlyValue = { - button: true, - checkbox: true, - image: true, - hidden: true, - radio: true, - reset: true, - submit: true -}; -function checkControlledValueProps(tagName, props) { - { - if (!(hasReadOnlyValue[props.type] || props.onChange || props.onInput || props.readOnly || props.disabled || props.value == null)) { - error('You provided a `value` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultValue`. Otherwise, ' + 'set either `onChange` or `readOnly`.'); - } - - if (!(props.onChange || props.readOnly || props.disabled || props.checked == null)) { - error('You provided a `checked` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultChecked`. Otherwise, ' + 'set either `onChange` or `readOnly`.'); - } - } -} - -function isCheckable(elem) { - var type = elem.type; - var nodeName = elem.nodeName; - return nodeName && nodeName.toLowerCase() === 'input' && (type === 'checkbox' || type === 'radio'); -} - -function getTracker(node) { - return node._valueTracker; -} - -function detachTracker(node) { - node._valueTracker = null; -} - -function getValueFromNode(node) { - var value = ''; - - if (!node) { - return value; - } - - if (isCheckable(node)) { - value = node.checked ? 'true' : 'false'; - } else { - value = node.value; - } - - return value; -} - -function trackValueOnNode(node) { - var valueField = isCheckable(node) ? 'checked' : 'value'; - var descriptor = Object.getOwnPropertyDescriptor(node.constructor.prototype, valueField); - var currentValue = '' + node[valueField]; // if someone has already defined a value or Safari, then bail - // and don't track value will cause over reporting of changes, - // but it's better then a hard failure - // (needed for certain tests that spyOn input values and Safari) - - if (node.hasOwnProperty(valueField) || typeof descriptor === 'undefined' || typeof descriptor.get !== 'function' || typeof descriptor.set !== 'function') { - return; - } - - var get = descriptor.get, - set = descriptor.set; - Object.defineProperty(node, valueField, { - configurable: true, - get: function () { - return get.call(this); - }, - set: function (value) { - currentValue = '' + value; - set.call(this, value); - } - }); // We could've passed this the first time - // but it triggers a bug in IE11 and Edge 14/15. - // Calling defineProperty() again should be equivalent. - // https://github.com/facebook/react/issues/11768 - - Object.defineProperty(node, valueField, { - enumerable: descriptor.enumerable - }); - var tracker = { - getValue: function () { - return currentValue; - }, - setValue: function (value) { - currentValue = '' + value; - }, - stopTracking: function () { - detachTracker(node); - delete node[valueField]; - } - }; - return tracker; -} - -function track(node) { - if (getTracker(node)) { - return; - } // TODO: Once it's just Fiber we can move this to node._wrapperState - - - node._valueTracker = trackValueOnNode(node); -} -function updateValueIfChanged(node) { - if (!node) { - return false; - } - - var tracker = getTracker(node); // if there is no tracker at this point it's unlikely - // that trying again will succeed - - if (!tracker) { - return true; - } - - var lastValue = tracker.getValue(); - var nextValue = getValueFromNode(node); - - if (nextValue !== lastValue) { - tracker.setValue(nextValue); - return true; - } - - return false; -} - -function getActiveElement(doc) { - doc = doc || (typeof document !== 'undefined' ? document : undefined); - - if (typeof doc === 'undefined') { - return null; - } - - try { - return doc.activeElement || doc.body; - } catch (e) { - return doc.body; - } -} - -var didWarnValueDefaultValue = false; -var didWarnCheckedDefaultChecked = false; -var didWarnControlledToUncontrolled = false; -var didWarnUncontrolledToControlled = false; - -function isControlled(props) { - var usesChecked = props.type === 'checkbox' || props.type === 'radio'; - return usesChecked ? props.checked != null : props.value != null; -} -/** - * Implements an host component that allows setting these optional - * props: `checked`, `value`, `defaultChecked`, and `defaultValue`. - * - * If `checked` or `value` are not supplied (or null/undefined), user actions - * that affect the checked state or value will trigger updates to the element. - * - * If they are supplied (and not null/undefined), the rendered element will not - * trigger updates to the element. Instead, the props must change in order for - * the rendered element to be updated. - * - * The rendered element will be initialized as unchecked (or `defaultChecked`) - * with an empty value (or `defaultValue`). - * - * See http://www.w3.org/TR/2012/WD-html5-20121025/the-input-element.html - */ - - -function getHostProps(element, props) { - var node = element; - var checked = props.checked; - - var hostProps = _assign({}, props, { - defaultChecked: undefined, - defaultValue: undefined, - value: undefined, - checked: checked != null ? checked : node._wrapperState.initialChecked - }); - - return hostProps; -} -function initWrapperState(element, props) { - { - checkControlledValueProps('input', props); - - if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnCheckedDefaultChecked) { - error('%s contains an input of type %s with both checked and defaultChecked props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the checked prop, or the defaultChecked prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component', props.type); - - didWarnCheckedDefaultChecked = true; - } - - if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue) { - error('%s contains an input of type %s with both value and defaultValue props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component', props.type); - - didWarnValueDefaultValue = true; - } - } - - var node = element; - var defaultValue = props.defaultValue == null ? '' : props.defaultValue; - node._wrapperState = { - initialChecked: props.checked != null ? props.checked : props.defaultChecked, - initialValue: getToStringValue(props.value != null ? props.value : defaultValue), - controlled: isControlled(props) - }; -} -function updateChecked(element, props) { - var node = element; - var checked = props.checked; - - if (checked != null) { - setValueForProperty(node, 'checked', checked, false); - } -} -function updateWrapper(element, props) { - var node = element; - - { - var controlled = isControlled(props); - - if (!node._wrapperState.controlled && controlled && !didWarnUncontrolledToControlled) { - error('A component is changing an uncontrolled input to be controlled. ' + 'This is likely caused by the value changing from undefined to ' + 'a defined value, which should not happen. ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components'); - - didWarnUncontrolledToControlled = true; - } - - if (node._wrapperState.controlled && !controlled && !didWarnControlledToUncontrolled) { - error('A component is changing a controlled input to be uncontrolled. ' + 'This is likely caused by the value changing from a defined to ' + 'undefined, which should not happen. ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components'); - - didWarnControlledToUncontrolled = true; - } - } - - updateChecked(element, props); - var value = getToStringValue(props.value); - var type = props.type; - - if (value != null) { - if (type === 'number') { - if (value === 0 && node.value === '' || // We explicitly want to coerce to number here if possible. - // eslint-disable-next-line - node.value != value) { - node.value = toString(value); - } - } else if (node.value !== toString(value)) { - node.value = toString(value); - } - } else if (type === 'submit' || type === 'reset') { - // Submit/reset inputs need the attribute removed completely to avoid - // blank-text buttons. - node.removeAttribute('value'); - return; - } - - { - // When syncing the value attribute, the value comes from a cascade of - // properties: - // 1. The value React property - // 2. The defaultValue React property - // 3. Otherwise there should be no change - if (props.hasOwnProperty('value')) { - setDefaultValue(node, props.type, value); - } else if (props.hasOwnProperty('defaultValue')) { - setDefaultValue(node, props.type, getToStringValue(props.defaultValue)); - } - } - - { - // When syncing the checked attribute, it only changes when it needs - // to be removed, such as transitioning from a checkbox into a text input - if (props.checked == null && props.defaultChecked != null) { - node.defaultChecked = !!props.defaultChecked; - } - } -} -function postMountWrapper(element, props, isHydrating) { - var node = element; // Do not assign value if it is already set. This prevents user text input - // from being lost during SSR hydration. - - if (props.hasOwnProperty('value') || props.hasOwnProperty('defaultValue')) { - var type = props.type; - var isButton = type === 'submit' || type === 'reset'; // Avoid setting value attribute on submit/reset inputs as it overrides the - // default value provided by the browser. See: #12872 - - if (isButton && (props.value === undefined || props.value === null)) { - return; - } - - var initialValue = toString(node._wrapperState.initialValue); // Do not assign value if it is already set. This prevents user text input - // from being lost during SSR hydration. - - if (!isHydrating) { - { - // When syncing the value attribute, the value property should use - // the wrapperState._initialValue property. This uses: - // - // 1. The value React property when present - // 2. The defaultValue React property when present - // 3. An empty string - if (initialValue !== node.value) { - node.value = initialValue; - } - } - } - - { - // Otherwise, the value attribute is synchronized to the property, - // so we assign defaultValue to the same thing as the value property - // assignment step above. - node.defaultValue = initialValue; - } - } // Normally, we'd just do `node.checked = node.checked` upon initial mount, less this bug - // this is needed to work around a chrome bug where setting defaultChecked - // will sometimes influence the value of checked (even after detachment). - // Reference: https://bugs.chromium.org/p/chromium/issues/detail?id=608416 - // We need to temporarily unset name to avoid disrupting radio button groups. - - - var name = node.name; - - if (name !== '') { - node.name = ''; - } - - { - // When syncing the checked attribute, both the checked property and - // attribute are assigned at the same time using defaultChecked. This uses: - // - // 1. The checked React property when present - // 2. The defaultChecked React property when present - // 3. Otherwise, false - node.defaultChecked = !node.defaultChecked; - node.defaultChecked = !!node._wrapperState.initialChecked; - } - - if (name !== '') { - node.name = name; - } -} -function restoreControlledState(element, props) { - var node = element; - updateWrapper(node, props); - updateNamedCousins(node, props); -} - -function updateNamedCousins(rootNode, props) { - var name = props.name; - - if (props.type === 'radio' && name != null) { - var queryRoot = rootNode; - - while (queryRoot.parentNode) { - queryRoot = queryRoot.parentNode; - } // If `rootNode.form` was non-null, then we could try `form.elements`, - // but that sometimes behaves strangely in IE8. We could also try using - // `form.getElementsByName`, but that will only return direct children - // and won't include inputs that use the HTML5 `form=` attribute. Since - // the input might not even be in a form. It might not even be in the - // document. Let's just use the local `querySelectorAll` to ensure we don't - // miss anything. - - - var group = queryRoot.querySelectorAll('input[name=' + JSON.stringify('' + name) + '][type="radio"]'); - - for (var i = 0; i < group.length; i++) { - var otherNode = group[i]; - - if (otherNode === rootNode || otherNode.form !== rootNode.form) { - continue; - } // This will throw if radio buttons rendered by different copies of React - // and the same name are rendered into the same form (same as #1939). - // That's probably okay; we don't support it just as we don't support - // mixing React radio buttons with non-React ones. - - - var otherProps = getFiberCurrentPropsFromNode(otherNode); - - if (!otherProps) { - { - throw Error( "ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported." ); - } - } // We need update the tracked value on the named cousin since the value - // was changed but the input saw no event or value set - - - updateValueIfChanged(otherNode); // If this is a controlled radio button group, forcing the input that - // was previously checked to update will cause it to be come re-checked - // as appropriate. - - updateWrapper(otherNode, otherProps); - } - } -} // In Chrome, assigning defaultValue to certain input types triggers input validation. -// For number inputs, the display value loses trailing decimal points. For email inputs, -// Chrome raises "The specified value is not a valid email address". -// -// Here we check to see if the defaultValue has actually changed, avoiding these problems -// when the user is inputting text -// -// https://github.com/facebook/react/issues/7253 - - -function setDefaultValue(node, type, value) { - if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js - type !== 'number' || getActiveElement(node.ownerDocument) !== node) { - if (value == null) { - node.defaultValue = toString(node._wrapperState.initialValue); - } else if (node.defaultValue !== toString(value)) { - node.defaultValue = toString(value); - } - } -} - -var didWarnSelectedSetOnOption = false; -var didWarnInvalidChild = false; - -function flattenChildren(children) { - var content = ''; // Flatten children. We'll warn if they are invalid - // during validateProps() which runs for hydration too. - // Note that this would throw on non-element objects. - // Elements are stringified (which is normally irrelevant - // but matters for ). - - React.Children.forEach(children, function (child) { - if (child == null) { - return; - } - - content += child; // Note: we don't warn about invalid children here. - // Instead, this is done separately below so that - // it happens during the hydration code path too. - }); - return content; -} -/** - * Implements an