diff --git a/.obsidian/community-plugins.json b/.obsidian/community-plugins.json
index 12dcd2a4..89a6a97d 100644
--- a/.obsidian/community-plugins.json
+++ b/.obsidian/community-plugins.json
@@ -7,7 +7,6 @@
"buttons",
"obsidian-commits",
"copy-as-html",
- "code-block-copy",
"obsidian-crypto-lookup",
"customizable-page-header-buttons",
"customjs",
@@ -38,11 +37,9 @@
"obsidian-memos",
"obsidian42-brat",
"url-into-selection",
- "obsidian-pocket",
"quickadd",
"obsidian-react-components",
"obsidian-reminder-plugin",
- "obsidian-save-as-gist",
"obsidian-sortable",
"obsidian-stopwatch-plugin",
"obsidian-task-collector",
@@ -61,7 +58,6 @@
"tasks-packrat-plugin",
"obsidian-tts",
"obsidian-chat-view",
- "obsidian-bbcode",
"obsidian-style-settings",
"obsidian-camera",
"table-editor-obsidian",
diff --git a/.obsidian/graph.json b/.obsidian/graph.json
index 082dfa7a..f3790217 100644
--- a/.obsidian/graph.json
+++ b/.obsidian/graph.json
@@ -95,6 +95,6 @@
"repelStrength": 10,
"linkStrength": 1,
"linkDistance": 250,
- "scale": 0.1569196941556386,
+ "scale": 0.18304981151782293,
"close": true
}
\ No newline at end of file
diff --git a/.obsidian/plugins/code-block-copy/main.js b/.obsidian/plugins/code-block-copy/main.js
deleted file mode 100644
index 9485e7a4..00000000
--- a/.obsidian/plugins/code-block-copy/main.js
+++ /dev/null
@@ -1,130 +0,0 @@
-'use strict';
-
-var obsidian = require('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.
-***************************************************************************** */
-/* global Reflect, Promise */
-
-var extendStatics = function(d, b) {
- extendStatics = Object.setPrototypeOf ||
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
- return extendStatics(d, b);
-};
-
-function __extends(d, b) {
- extendStatics(d, b);
- function __() { this.constructor = d; }
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
-}
-
-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());
- });
-}
-
-function __generator(thisArg, body) {
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
- function verb(n) { return function (v) { return step([n, v]); }; }
- function step(op) {
- if (f) throw new TypeError("Generator is already executing.");
- while (_) try {
- if (f = 1, y && (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]) {
- case 0: case 1: t = op; break;
- case 4: _.label++; return { value: op[1], done: false };
- case 5: _.label++; y = op[1]; op = [0]; continue;
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
- default:
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
- if (t[2]) _.ops.pop();
- _.trys.pop(); continue;
- }
- op = body.call(thisArg, _);
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
- }
-}
-
-var excludeLangs = [
- "todoist"
-];
-var CMSyntaxHighlightPlugin = /** @class */ (function (_super) {
- __extends(CMSyntaxHighlightPlugin, _super);
- function CMSyntaxHighlightPlugin(app, pluginManifest) {
- return _super.call(this, app, pluginManifest) || this;
- }
- // all I need to do is import the modes.
- CMSyntaxHighlightPlugin.prototype.onload = function () {
- return __awaiter(this, void 0, void 0, function () {
- return __generator(this, function (_a) {
- this.registerInterval(window.setInterval(this.injectButtons.bind(this), 1000));
- return [2 /*return*/];
- });
- });
- };
- CMSyntaxHighlightPlugin.prototype.injectButtons = function () {
- this.addCopyButtons(navigator.clipboard);
- };
- CMSyntaxHighlightPlugin.prototype.addCopyButtons = function (clipboard) {
- document.querySelectorAll('pre > code').forEach(function (codeBlock) {
- var pre = codeBlock.parentNode;
- // check for excluded langs
- for (var _i = 0, excludeLangs_1 = excludeLangs; _i < excludeLangs_1.length; _i++) {
- var lang = excludeLangs_1[_i];
- if (pre.classList.contains("language-" + lang))
- return;
- }
- // Dont add more than once
- if (pre.parentNode.classList.contains('has-copy-button')) {
- return;
- }
- pre.parentNode.classList.add('has-copy-button');
- var button = document.createElement('button');
- button.className = 'copy-code-button';
- button.type = 'button';
- button.innerText = 'Copy';
- button.addEventListener('click', function () {
- clipboard.writeText(codeBlock.innerText).then(function () {
- /* Chrome doesn't seem to blur automatically,
- leaving the button in a focused state. */
- button.blur();
- button.innerText = 'copied!';
- setTimeout(function () {
- button.innerText = 'copy';
- }, 2000);
- }, function (error) {
- button.innerText = 'Error';
- });
- });
- pre.appendChild(button);
- });
- };
- return CMSyntaxHighlightPlugin;
-}(obsidian.Plugin));
-
-module.exports = CMSyntaxHighlightPlugin;
-//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFpbi5qcyIsInNvdXJjZXMiOlsibm9kZV9tb2R1bGVzL3RzbGliL3RzbGliLmVzNi5qcyIsIm1haW4udHMiXSwic291cmNlc0NvbnRlbnQiOlsiLyohICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqXHJcbkNvcHlyaWdodCAoYykgTWljcm9zb2Z0IENvcnBvcmF0aW9uLlxyXG5cclxuUGVybWlzc2lvbiB0byB1c2UsIGNvcHksIG1vZGlmeSwgYW5kL29yIGRpc3RyaWJ1dGUgdGhpcyBzb2Z0d2FyZSBmb3IgYW55XHJcbnB1cnBvc2Ugd2l0aCBvciB3aXRob3V0IGZlZSBpcyBoZXJlYnkgZ3JhbnRlZC5cclxuXHJcblRIRSBTT0ZUV0FSRSBJUyBQUk9WSURFRCBcIkFTIElTXCIgQU5EIFRIRSBBVVRIT1IgRElTQ0xBSU1TIEFMTCBXQVJSQU5USUVTIFdJVEhcclxuUkVHQVJEIFRPIFRISVMgU09GVFdBUkUgSU5DTFVESU5HIEFMTCBJTVBMSUVEIFdBUlJBTlRJRVMgT0YgTUVSQ0hBTlRBQklMSVRZXHJcbkFORCBGSVRORVNTLiBJTiBOTyBFVkVOVCBTSEFMTCBUSEUgQVVUSE9SIEJFIExJQUJMRSBGT1IgQU5ZIFNQRUNJQUwsIERJUkVDVCxcclxuSU5ESVJFQ1QsIE9SIENPTlNFUVV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pIHJldHVybiB0O1xyXG4gICAgICAgICAgICBpZiAoeSA9IDAsIHQpIG9wID0gW29wWzBdICYgMiwgdC52YWx1ZV07XHJcbiAgICAgICAgICAgIHN3aXRjaCAob3BbMF0pIHtcclxuICAgICAgICAgICAgICAgIGNhc2UgMDogY2FzZSAxOiB0ID0gb3A7IGJyZWFrO1xyXG4gICAgICAgICAgICAgICAgY2FzZSA0OiBfLmxhYmVsKys7IHJldHVybiB7IHZhbHVlOiBvcFsxXSwgZG9uZTogZmFsc2UgfTtcclxuICAgICAgICAgICAgICAgIGNhc2UgNTogXy5sYWJlbCsrOyB5ID0gb3BbMV07IG9wID0gWzBdOyBjb250aW51ZTtcclxuICAgICAgICAgICAgICAgIGNhc2UgNzogb3AgPSBfLm9wcy5wb3AoKTsgXy50cnlzLnBvcCgpOyBjb250aW51ZTtcclxuICAgICAgICAgICAgICAgIGRlZmF1bHQ6XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKCEodCA9IF8udHJ5cywgdCA9IHQubGVuZ3RoID4gMCAmJiB0W3QubGVuZ3RoIC0gMV0pICYmIChvcFswXSA9PT0gNiB8fCBvcFswXSA9PT0gMikpIHsgXyA9IDA7IGNvbnRpbnVlOyB9XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKG9wWzBdID09PSAzICYmICghdCB8fCAob3BbMV0gPiB0WzBdICYmIG9wWzFdIDwgdFszXSkpKSB7IF8ubGFiZWwgPSBvcFsxXTsgYnJlYWs7IH1cclxuICAgICAgICAgICAgICAgICAgICBpZiAob3BbMF0gPT09IDYgJiYgXy5sYWJlbCA8IHRbMV0pIHsgXy5sYWJlbCA9IHRbMV07IHQgPSBvcDsgYnJlYWs7IH1cclxuICAgICAgICAgICAgICAgICAgICBpZiAodCAmJiBfLmxhYmVsIDwgdFsyXSkgeyBfLmxhYmVsID0gdFsyXTsgXy5vcHMucHVzaChvcCk7IGJyZWFrOyB9XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRbMl0pIF8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QUcsUUFBUSxDQUFDLGFBQWEsQ0FBQyxRQUFRLENBQUMsQ0FBQztZQUM5QyxNQUFNLENBQUMsU0FBUyxHQUFHLGtCQUFrQixDQUFDO1lBQ3RDLE1BQU0sQ0FBQyxJQUFJLEdBQUcsUUFBUSxDQUFDO1lBQ3ZCLE1BQU0sQ0FBQyxTQUFTLEdBQUcsTUFBTSxDQUFDO1lBRTFCLE1BQU0sQ0FBQyxnQkFBZ0IsQ0FBQyxPQUFPLEVBQUU7Z0JBQzdCLFNBQVMsQ0FBQyxTQUFTLENBQUMsU0FBUyxDQUFDLFNBQVMsQ0FBQyxDQUFDLElBQUksQ0FBQzs7O29CQUcxQyxNQUFNLENBQUMsSUFBSSxFQUFFLENBQUM7b0JBRWQsTUFBTSxDQUFDLFNBQVMsR0FBRyxTQUFTLENBQUM7b0JBRTdCLFVBQVUsQ0FBQzt3QkFDUCxNQUFNLENBQUMsU0FBUyxHQUFHLE1BQU0sQ0FBQztxQkFDN0IsRUFBRSxJQUFJLENBQUMsQ0FBQztpQkFDWixFQUFFLFVBQVUsS0FBSztvQkFDZCxNQUFNLENBQUMsU0FBUyxHQUFHLE9BQU8sQ0FBQztpQkFDOUIsQ0FBQyxDQUFDO2FBQ04sQ0FBQyxDQUFDO1lBRUgsR0FBRyxDQUFDLFdBQVcsQ0FBQyxNQUFNLENBQUMsQ0FBQztTQUUzQixDQUFDLENBQUM7S0FDSjtJQUVILDhCQUFDO0FBQUQsQ0E5REEsQ0FBcURBLGVBQU07Ozs7In0=
diff --git a/.obsidian/plugins/code-block-copy/manifest.json b/.obsidian/plugins/code-block-copy/manifest.json
deleted file mode 100644
index 53c096c1..00000000
--- a/.obsidian/plugins/code-block-copy/manifest.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "id": "code-block-copy",
- "name": "Copy button for code blocks",
- "author": "Daniel Brandenburg",
- "description": "Copy button for code blocks",
- "isDesktopOnly": false,
- "version": "0.1.0"
-}
diff --git a/.obsidian/plugins/code-block-copy/styles.css b/.obsidian/plugins/code-block-copy/styles.css
deleted file mode 100644
index 7a3b79c0..00000000
--- a/.obsidian/plugins/code-block-copy/styles.css
+++ /dev/null
@@ -1,41 +0,0 @@
-.copy-code-button {
- color: var(--background-primary);
- background-color: var(--text-faint);
- border-radius: 1px 1px 0px 0px;
- /* right-align */
- display: block;
- margin-left: auto;
- margin-right: 0;
- margin-bottom: -2px;
- padding: 3px 8px;
- font-size: 0.8em;
- position: absolute;
- top: 0px;
- right: 0px;
-}
-
-.copy-code-button:hover {
- cursor: pointer;
- background-color: var(--text-normal);
-}
-
-.copy-code-button:focus {
- /* Avoid an ugly focus outline on click in Chrome,
- but darken the button for accessibility.
- See https://stackoverflow.com/a/25298082/1481479 */
- background-color: var(--text-normal);
- outline: 0;
-}
-
-.copy-code-button:active {
- background-color: var(--text-normal);
-}
-
-.highlight pre {
- /* Avoid pushing up the copy buttons. */
- margin: 0;
-}
-
-.has-copy-button {
- position: relative;
-}
\ No newline at end of file
diff --git a/.obsidian/plugins/customizable-page-header-buttons/data.json b/.obsidian/plugins/customizable-page-header-buttons/data.json
index 1dac5f50..7e0f582c 100644
--- a/.obsidian/plugins/customizable-page-header-buttons/data.json
+++ b/.obsidian/plugins/customizable-page-header-buttons/data.json
@@ -29,6 +29,12 @@
"icon": "lucide-book",
"name": "Book Search: Create new book note",
"showButtons": "both"
+ },
+ {
+ "id": "garble-text:toggle-garble-text",
+ "icon": "three-horizontal-bars",
+ "name": "Garble Text: Toggle Garble Text",
+ "showButtons": "both"
}
],
"desktop": false,
diff --git a/.obsidian/plugins/obsidian-activity-history/data.json b/.obsidian/plugins/obsidian-activity-history/data.json
index 24567c89..e83683af 100644
--- a/.obsidian/plugins/obsidian-activity-history/data.json
+++ b/.obsidian/plugins/obsidian-activity-history/data.json
@@ -12,8 +12,8 @@
"checkpointList": [
{
"path": "/",
- "date": "2022-08-23",
- "size": 6735708
+ "date": "2022-08-25",
+ "size": 6742148
}
],
"activityHistory": [
@@ -922,7 +922,15 @@
},
{
"date": "2022-08-23",
- "value": 6577
+ "value": 14732
+ },
+ {
+ "date": "2022-08-24",
+ "value": 9463
+ },
+ {
+ "date": "2022-08-25",
+ "value": 1502
}
]
}
diff --git a/.obsidian/plugins/obsidian-bbcode/main.js b/.obsidian/plugins/obsidian-bbcode/main.js
deleted file mode 100644
index 4b7135b0..00000000
--- a/.obsidian/plugins/obsidian-bbcode/main.js
+++ /dev/null
@@ -1,2242 +0,0 @@
-/*
-THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
-if you want to view the source, please visit the github repository of this plugin
-*/
-
-var __create = Object.create;
-var __defProp = Object.defineProperty;
-var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
-var __getOwnPropNames = Object.getOwnPropertyNames;
-var __getProtoOf = Object.getPrototypeOf;
-var __hasOwnProp = Object.prototype.hasOwnProperty;
-var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
-var __commonJS = (cb, mod) => function __require() {
- return mod || (0, cb[Object.keys(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
-};
-var __export = (target, all) => {
- __markAsModule(target);
- for (var name in all)
- __defProp(target, name, { get: all[name], enumerable: true });
-};
-var __reExport = (target, module2, desc) => {
- if (module2 && typeof module2 === "object" || typeof module2 === "function") {
- for (let key of __getOwnPropNames(module2))
- if (!__hasOwnProp.call(target, key) && key !== "default")
- __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
- }
- return target;
-};
-var __toModule = (module2) => {
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", module2 && module2.__esModule && "default" in module2 ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
-};
-var __async = (__this, __arguments, generator) => {
- return new Promise((resolve, reject) => {
- var fulfilled = (value) => {
- try {
- step(generator.next(value));
- } catch (e) {
- reject(e);
- }
- };
- var rejected = (value) => {
- try {
- step(generator.throw(value));
- } catch (e) {
- reject(e);
- }
- };
- var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
- step((generator = generator.apply(__this, __arguments)).next());
- });
-};
-
-// node_modules/md2bbc/dist/md2bbc.js
-var require_md2bbc = __commonJS({
- "node_modules/md2bbc/dist/md2bbc.js"(exports, module2) {
- "use strict";
- var _createClass = function() {
- function defineProperties(target, props) {
- for (var i = 0; i < props.length; i++) {
- var descriptor = props[i];
- descriptor.enumerable = descriptor.enumerable || false;
- descriptor.configurable = true;
- if ("value" in descriptor)
- descriptor.writable = true;
- Object.defineProperty(target, descriptor.key, descriptor);
- }
- }
- return function(Constructor, protoProps, staticProps) {
- if (protoProps)
- defineProperties(Constructor.prototype, protoProps);
- if (staticProps)
- defineProperties(Constructor, staticProps);
- return Constructor;
- };
- }();
- function _typeof(obj) {
- return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
- }
- function _classCallCheck(instance, Constructor) {
- if (!(instance instanceof Constructor)) {
- throw new TypeError("Cannot call a class as a function");
- }
- }
- (function() {
- "use strict";
- var DEFAULT_OPTIONS = {
- paragraphTag: "div",
- tableAttr: "",
- tableAlign: true
- };
- function extend(obj, src) {
- for (var key in src) {
- if (!obj.hasOwnProperty(key)) {
- obj[key] = src[key];
- }
- }
- return obj;
- }
- var Renderer2 = function() {
- function Renderer3() {
- _classCallCheck(this, Renderer3);
- this._options = {};
- }
- _createClass(Renderer3, [{
- key: "code",
- value: function code(_code) {
- return "[code]" + _code + "\n[/code]";
- }
- }, {
- key: "blockquote",
- value: function blockquote(quote) {
- return "[quote]\n" + quote + "[/quote]\n";
- }
- }, {
- key: "html",
- value: function html(_html) {
- return _html;
- }
- }, {
- key: "heading",
- value: function heading(text, level) {
- if (level >= 3) {
- level = 3;
- }
- return "[h" + level + "]" + text + "[/h" + level + "]\n";
- }
- }, {
- key: "hr",
- value: function hr() {
- return "[hr]\n";
- }
- }, {
- key: "list",
- value: function list(body, ordered) {
- var type = ordered ? "ol" : "ul";
- return "[" + type + "]\n" + body + "[/" + type + "]\n";
- }
- }, {
- key: "listitem",
- value: function listitem(text) {
- return "[li]" + text + "[/li]\n";
- }
- }, {
- key: "paragraph",
- value: function paragraph(text) {
- if (this.options.paragraphTag === "") {
- return text + "\n";
- } else {
- return "[" + this.options.paragraphTag + "]" + text + "[/" + this.options.paragraphTag + "]\n";
- }
- }
- }, {
- key: "table",
- value: function table(header, body) {
- var space = this.options.tableAttr ? " " : "";
- return "[table" + space + this.options.tableAttr + "]\n" + header + body + "[/table]\n";
- }
- }, {
- key: "tablerow",
- value: function tablerow(content) {
- return "[tr]\n" + content + "[/tr]\n";
- }
- }, {
- key: "tablecell",
- value: function tablecell(content, flags) {
- var type = flags.header ? "th" : "td";
- var tag = flags.align && this.options.tableAlign ? "[" + type + " align=" + flags.align + "]" : "[" + type + "]";
- return "" + tag + content + "[/" + type + "]\n";
- }
- }, {
- key: "strong",
- value: function strong(text) {
- return "[b]" + text + "[/b]";
- }
- }, {
- key: "em",
- value: function em(text) {
- return "[i]" + text + "[/i]";
- }
- }, {
- key: "codespan",
- value: function codespan(text) {
- return "[code]" + text + "[/code]";
- }
- }, {
- key: "br",
- value: function br() {
- return "\n";
- }
- }, {
- key: "del",
- value: function del(text) {
- return "[s]" + text + "[/s]";
- }
- }, {
- key: "link",
- value: function link(href, title, text) {
- return "[url=" + href + "]" + text + "[/url]";
- }
- }, {
- key: "image",
- value: function image(href) {
- return "[img=" + href + "]";
- }
- }, {
- key: "text",
- value: function text(_text) {
- return _text;
- }
- }, {
- key: "options",
- get: function get() {
- return this._options;
- },
- set: function set(value) {
- this._options = extend(value, DEFAULT_OPTIONS);
- }
- }]);
- return Renderer3;
- }();
- if (typeof module2 !== "undefined" && (typeof exports === "undefined" ? "undefined" : _typeof(exports)) === "object") {
- exports = module2.exports = Renderer2;
- } else if (typeof define === "function" && define.amd) {
- define(function() {
- return Renderer2;
- });
- } else {
- window.md2bbc = Renderer2;
- }
- })();
- }
-});
-
-// node_modules/md2bbc/index.js
-var require_md2bbc2 = __commonJS({
- "node_modules/md2bbc/index.js"(exports, module2) {
- module2.exports = require_md2bbc();
- }
-});
-
-// main.ts
-__export(exports, {
- default: () => BBCode
-});
-
-// node_modules/marked/lib/marked.esm.js
-function getDefaults() {
- return {
- baseUrl: null,
- breaks: false,
- extensions: null,
- gfm: true,
- headerIds: true,
- headerPrefix: "",
- highlight: null,
- langPrefix: "language-",
- mangle: true,
- pedantic: false,
- renderer: null,
- sanitize: false,
- sanitizer: null,
- silent: false,
- smartLists: false,
- smartypants: false,
- tokenizer: null,
- walkTokens: null,
- xhtml: false
- };
-}
-var defaults = getDefaults();
-function changeDefaults(newDefaults) {
- defaults = newDefaults;
-}
-var escapeTest = /[&<>"']/;
-var escapeReplace = /[&<>"']/g;
-var escapeTestNoEncode = /[<>"']|&(?!#?\w+;)/;
-var escapeReplaceNoEncode = /[<>"']|&(?!#?\w+;)/g;
-var escapeReplacements = {
- "&": "&",
- "<": "<",
- ">": ">",
- '"': """,
- "'": "'"
-};
-var getEscapeReplacement = (ch) => escapeReplacements[ch];
-function escape(html, encode) {
- if (encode) {
- if (escapeTest.test(html)) {
- return html.replace(escapeReplace, getEscapeReplacement);
- }
- } else {
- if (escapeTestNoEncode.test(html)) {
- return html.replace(escapeReplaceNoEncode, getEscapeReplacement);
- }
- }
- return html;
-}
-var unescapeTest = /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;
-function unescape(html) {
- return html.replace(unescapeTest, (_, n) => {
- n = n.toLowerCase();
- if (n === "colon")
- return ":";
- if (n.charAt(0) === "#") {
- return n.charAt(1) === "x" ? String.fromCharCode(parseInt(n.substring(2), 16)) : String.fromCharCode(+n.substring(1));
- }
- return "";
- });
-}
-var caret = /(^|[^\[])\^/g;
-function edit(regex, opt) {
- regex = typeof regex === "string" ? regex : regex.source;
- opt = opt || "";
- const obj = {
- replace: (name, val) => {
- val = val.source || val;
- val = val.replace(caret, "$1");
- regex = regex.replace(name, val);
- return obj;
- },
- getRegex: () => {
- return new RegExp(regex, opt);
- }
- };
- return obj;
-}
-var nonWordAndColonTest = /[^\w:]/g;
-var originIndependentUrl = /^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;
-function cleanUrl(sanitize, base, href) {
- if (sanitize) {
- let prot;
- try {
- prot = decodeURIComponent(unescape(href)).replace(nonWordAndColonTest, "").toLowerCase();
- } catch (e) {
- return null;
- }
- if (prot.indexOf("javascript:") === 0 || prot.indexOf("vbscript:") === 0 || prot.indexOf("data:") === 0) {
- return null;
- }
- }
- if (base && !originIndependentUrl.test(href)) {
- href = resolveUrl(base, href);
- }
- try {
- href = encodeURI(href).replace(/%25/g, "%");
- } catch (e) {
- return null;
- }
- return href;
-}
-var baseUrls = {};
-var justDomain = /^[^:]+:\/*[^/]*$/;
-var protocol = /^([^:]+:)[\s\S]*$/;
-var domain = /^([^:]+:\/*[^/]*)[\s\S]*$/;
-function resolveUrl(base, href) {
- if (!baseUrls[" " + base]) {
- if (justDomain.test(base)) {
- baseUrls[" " + base] = base + "/";
- } else {
- baseUrls[" " + base] = rtrim(base, "/", true);
- }
- }
- base = baseUrls[" " + base];
- const relativeBase = base.indexOf(":") === -1;
- if (href.substring(0, 2) === "//") {
- if (relativeBase) {
- return href;
- }
- return base.replace(protocol, "$1") + href;
- } else if (href.charAt(0) === "/") {
- if (relativeBase) {
- return href;
- }
- return base.replace(domain, "$1") + href;
- } else {
- return base + href;
- }
-}
-var noopTest = { exec: function noopTest2() {
-} };
-function merge(obj) {
- let i = 1, target, key;
- for (; i < arguments.length; i++) {
- target = arguments[i];
- for (key in target) {
- if (Object.prototype.hasOwnProperty.call(target, key)) {
- obj[key] = target[key];
- }
- }
- }
- return obj;
-}
-function splitCells(tableRow, count) {
- const row = tableRow.replace(/\|/g, (match, offset, str) => {
- let escaped = false, curr = offset;
- while (--curr >= 0 && str[curr] === "\\")
- escaped = !escaped;
- if (escaped) {
- return "|";
- } else {
- return " |";
- }
- }), cells = row.split(/ \|/);
- let i = 0;
- if (!cells[0].trim()) {
- cells.shift();
- }
- if (cells.length > 0 && !cells[cells.length - 1].trim()) {
- cells.pop();
- }
- if (cells.length > count) {
- cells.splice(count);
- } else {
- while (cells.length < count)
- cells.push("");
- }
- for (; i < cells.length; i++) {
- cells[i] = cells[i].trim().replace(/\\\|/g, "|");
- }
- return cells;
-}
-function rtrim(str, c, invert) {
- const l = str.length;
- if (l === 0) {
- return "";
- }
- let suffLen = 0;
- while (suffLen < l) {
- const currChar = str.charAt(l - suffLen - 1);
- if (currChar === c && !invert) {
- suffLen++;
- } else if (currChar !== c && invert) {
- suffLen++;
- } else {
- break;
- }
- }
- return str.slice(0, l - suffLen);
-}
-function findClosingBracket(str, b) {
- if (str.indexOf(b[1]) === -1) {
- return -1;
- }
- const l = str.length;
- let level = 0, i = 0;
- for (; i < l; i++) {
- if (str[i] === "\\") {
- i++;
- } else if (str[i] === b[0]) {
- level++;
- } else if (str[i] === b[1]) {
- level--;
- if (level < 0) {
- return i;
- }
- }
- }
- return -1;
-}
-function checkSanitizeDeprecation(opt) {
- if (opt && opt.sanitize && !opt.silent) {
- console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options");
- }
-}
-function repeatString(pattern, count) {
- if (count < 1) {
- return "";
- }
- let result = "";
- while (count > 1) {
- if (count & 1) {
- result += pattern;
- }
- count >>= 1;
- pattern += pattern;
- }
- return result + pattern;
-}
-function outputLink(cap, link, raw, lexer2) {
- const href = link.href;
- const title = link.title ? escape(link.title) : null;
- const text = cap[1].replace(/\\([\[\]])/g, "$1");
- if (cap[0].charAt(0) !== "!") {
- lexer2.state.inLink = true;
- const token = {
- type: "link",
- raw,
- href,
- title,
- text,
- tokens: lexer2.inlineTokens(text, [])
- };
- lexer2.state.inLink = false;
- return token;
- }
- return {
- type: "image",
- raw,
- href,
- title,
- text: escape(text)
- };
-}
-function indentCodeCompensation(raw, text) {
- const matchIndentToCode = raw.match(/^(\s+)(?:```)/);
- if (matchIndentToCode === null) {
- return text;
- }
- const indentToCode = matchIndentToCode[1];
- return text.split("\n").map((node) => {
- const matchIndentInNode = node.match(/^\s+/);
- if (matchIndentInNode === null) {
- return node;
- }
- const [indentInNode] = matchIndentInNode;
- if (indentInNode.length >= indentToCode.length) {
- return node.slice(indentToCode.length);
- }
- return node;
- }).join("\n");
-}
-var Tokenizer = class {
- constructor(options2) {
- this.options = options2 || defaults;
- }
- space(src) {
- const cap = this.rules.block.newline.exec(src);
- if (cap && cap[0].length > 0) {
- return {
- type: "space",
- raw: cap[0]
- };
- }
- }
- code(src) {
- const cap = this.rules.block.code.exec(src);
- if (cap) {
- const text = cap[0].replace(/^ {1,4}/gm, "");
- return {
- type: "code",
- raw: cap[0],
- codeBlockStyle: "indented",
- text: !this.options.pedantic ? rtrim(text, "\n") : text
- };
- }
- }
- fences(src) {
- const cap = this.rules.block.fences.exec(src);
- if (cap) {
- const raw = cap[0];
- const text = indentCodeCompensation(raw, cap[3] || "");
- return {
- type: "code",
- raw,
- lang: cap[2] ? cap[2].trim() : cap[2],
- text
- };
- }
- }
- heading(src) {
- const cap = this.rules.block.heading.exec(src);
- if (cap) {
- let text = cap[2].trim();
- if (/#$/.test(text)) {
- const trimmed = rtrim(text, "#");
- if (this.options.pedantic) {
- text = trimmed.trim();
- } else if (!trimmed || / $/.test(trimmed)) {
- text = trimmed.trim();
- }
- }
- const token = {
- type: "heading",
- raw: cap[0],
- depth: cap[1].length,
- text,
- tokens: []
- };
- this.lexer.inline(token.text, token.tokens);
- return token;
- }
- }
- hr(src) {
- const cap = this.rules.block.hr.exec(src);
- if (cap) {
- return {
- type: "hr",
- raw: cap[0]
- };
- }
- }
- blockquote(src) {
- const cap = this.rules.block.blockquote.exec(src);
- if (cap) {
- const text = cap[0].replace(/^ *>[ \t]?/gm, "");
- return {
- type: "blockquote",
- raw: cap[0],
- tokens: this.lexer.blockTokens(text, []),
- text
- };
- }
- }
- list(src) {
- let cap = this.rules.block.list.exec(src);
- if (cap) {
- let raw, istask, ischecked, indent, i, blankLine, endsWithBlankLine, line, nextLine, rawLine, itemContents, endEarly;
- let bull = cap[1].trim();
- const isordered = bull.length > 1;
- const list = {
- type: "list",
- raw: "",
- ordered: isordered,
- start: isordered ? +bull.slice(0, -1) : "",
- loose: false,
- items: []
- };
- bull = isordered ? `\\d{1,9}\\${bull.slice(-1)}` : `\\${bull}`;
- if (this.options.pedantic) {
- bull = isordered ? bull : "[*+-]";
- }
- const itemRegex = new RegExp(`^( {0,3}${bull})((?:[ ][^\\n]*)?(?:\\n|$))`);
- while (src) {
- endEarly = false;
- if (!(cap = itemRegex.exec(src))) {
- break;
- }
- if (this.rules.block.hr.test(src)) {
- break;
- }
- raw = cap[0];
- src = src.substring(raw.length);
- line = cap[2].split("\n", 1)[0];
- nextLine = src.split("\n", 1)[0];
- if (this.options.pedantic) {
- indent = 2;
- itemContents = line.trimLeft();
- } else {
- indent = cap[2].search(/[^ ]/);
- indent = indent > 4 ? 1 : indent;
- itemContents = line.slice(indent);
- indent += cap[1].length;
- }
- blankLine = false;
- if (!line && /^ *$/.test(nextLine)) {
- raw += nextLine + "\n";
- src = src.substring(nextLine.length + 1);
- endEarly = true;
- }
- if (!endEarly) {
- const nextBulletRegex = new RegExp(`^ {0,${Math.min(3, indent - 1)}}(?:[*+-]|\\d{1,9}[.)])((?: [^\\n]*)?(?:\\n|$))`);
- const hrRegex = new RegExp(`^ {0,${Math.min(3, indent - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`);
- while (src) {
- rawLine = src.split("\n", 1)[0];
- line = rawLine;
- if (this.options.pedantic) {
- line = line.replace(/^ {1,4}(?=( {4})*[^ ])/g, " ");
- }
- if (nextBulletRegex.test(line)) {
- break;
- }
- if (hrRegex.test(src)) {
- break;
- }
- if (line.search(/[^ ]/) >= indent || !line.trim()) {
- itemContents += "\n" + line.slice(indent);
- } else if (!blankLine) {
- itemContents += "\n" + line;
- } else {
- break;
- }
- if (!blankLine && !line.trim()) {
- blankLine = true;
- }
- raw += rawLine + "\n";
- src = src.substring(rawLine.length + 1);
- }
- }
- if (!list.loose) {
- if (endsWithBlankLine) {
- list.loose = true;
- } else if (/\n *\n *$/.test(raw)) {
- endsWithBlankLine = true;
- }
- }
- if (this.options.gfm) {
- istask = /^\[[ xX]\] /.exec(itemContents);
- if (istask) {
- ischecked = istask[0] !== "[ ] ";
- itemContents = itemContents.replace(/^\[[ xX]\] +/, "");
- }
- }
- list.items.push({
- type: "list_item",
- raw,
- task: !!istask,
- checked: ischecked,
- loose: false,
- text: itemContents
- });
- list.raw += raw;
- }
- list.items[list.items.length - 1].raw = raw.trimRight();
- list.items[list.items.length - 1].text = itemContents.trimRight();
- list.raw = list.raw.trimRight();
- const l = list.items.length;
- for (i = 0; i < l; i++) {
- this.lexer.state.top = false;
- list.items[i].tokens = this.lexer.blockTokens(list.items[i].text, []);
- const spacers = list.items[i].tokens.filter((t) => t.type === "space");
- const hasMultipleLineBreaks = spacers.every((t) => {
- const chars = t.raw.split("");
- let lineBreaks = 0;
- for (const char of chars) {
- if (char === "\n") {
- lineBreaks += 1;
- }
- if (lineBreaks > 1) {
- return true;
- }
- }
- return false;
- });
- if (!list.loose && spacers.length && hasMultipleLineBreaks) {
- list.loose = true;
- list.items[i].loose = true;
- }
- }
- return list;
- }
- }
- html(src) {
- const cap = this.rules.block.html.exec(src);
- if (cap) {
- const token = {
- type: "html",
- raw: cap[0],
- pre: !this.options.sanitizer && (cap[1] === "pre" || cap[1] === "script" || cap[1] === "style"),
- text: cap[0]
- };
- if (this.options.sanitize) {
- token.type = "paragraph";
- token.text = this.options.sanitizer ? this.options.sanitizer(cap[0]) : escape(cap[0]);
- token.tokens = [];
- this.lexer.inline(token.text, token.tokens);
- }
- return token;
- }
- }
- def(src) {
- const cap = this.rules.block.def.exec(src);
- if (cap) {
- if (cap[3])
- cap[3] = cap[3].substring(1, cap[3].length - 1);
- const tag = cap[1].toLowerCase().replace(/\s+/g, " ");
- return {
- type: "def",
- tag,
- raw: cap[0],
- href: cap[2],
- title: cap[3]
- };
- }
- }
- table(src) {
- const cap = this.rules.block.table.exec(src);
- if (cap) {
- const item = {
- type: "table",
- header: splitCells(cap[1]).map((c) => {
- return { text: c };
- }),
- align: cap[2].replace(/^ *|\| *$/g, "").split(/ *\| */),
- rows: cap[3] && cap[3].trim() ? cap[3].replace(/\n[ \t]*$/, "").split("\n") : []
- };
- if (item.header.length === item.align.length) {
- item.raw = cap[0];
- let l = item.align.length;
- let i, j, k, row;
- for (i = 0; i < l; i++) {
- if (/^ *-+: *$/.test(item.align[i])) {
- item.align[i] = "right";
- } else if (/^ *:-+: *$/.test(item.align[i])) {
- item.align[i] = "center";
- } else if (/^ *:-+ *$/.test(item.align[i])) {
- item.align[i] = "left";
- } else {
- item.align[i] = null;
- }
- }
- l = item.rows.length;
- for (i = 0; i < l; i++) {
- item.rows[i] = splitCells(item.rows[i], item.header.length).map((c) => {
- return { text: c };
- });
- }
- l = item.header.length;
- for (j = 0; j < l; j++) {
- item.header[j].tokens = [];
- this.lexer.inlineTokens(item.header[j].text, item.header[j].tokens);
- }
- l = item.rows.length;
- for (j = 0; j < l; j++) {
- row = item.rows[j];
- for (k = 0; k < row.length; k++) {
- row[k].tokens = [];
- this.lexer.inlineTokens(row[k].text, row[k].tokens);
- }
- }
- return item;
- }
- }
- }
- lheading(src) {
- const cap = this.rules.block.lheading.exec(src);
- if (cap) {
- const token = {
- type: "heading",
- raw: cap[0],
- depth: cap[2].charAt(0) === "=" ? 1 : 2,
- text: cap[1],
- tokens: []
- };
- this.lexer.inline(token.text, token.tokens);
- return token;
- }
- }
- paragraph(src) {
- const cap = this.rules.block.paragraph.exec(src);
- if (cap) {
- const token = {
- type: "paragraph",
- raw: cap[0],
- text: cap[1].charAt(cap[1].length - 1) === "\n" ? cap[1].slice(0, -1) : cap[1],
- tokens: []
- };
- this.lexer.inline(token.text, token.tokens);
- return token;
- }
- }
- text(src) {
- const cap = this.rules.block.text.exec(src);
- if (cap) {
- const token = {
- type: "text",
- raw: cap[0],
- text: cap[0],
- tokens: []
- };
- this.lexer.inline(token.text, token.tokens);
- return token;
- }
- }
- escape(src) {
- const cap = this.rules.inline.escape.exec(src);
- if (cap) {
- return {
- type: "escape",
- raw: cap[0],
- text: escape(cap[1])
- };
- }
- }
- tag(src) {
- const cap = this.rules.inline.tag.exec(src);
- if (cap) {
- if (!this.lexer.state.inLink && /^/i.test(cap[0])) {
- this.lexer.state.inLink = false;
- }
- if (!this.lexer.state.inRawBlock && /^<(pre|code|kbd|script)(\s|>)/i.test(cap[0])) {
- this.lexer.state.inRawBlock = true;
- } else if (this.lexer.state.inRawBlock && /^<\/(pre|code|kbd|script)(\s|>)/i.test(cap[0])) {
- this.lexer.state.inRawBlock = false;
- }
- return {
- type: this.options.sanitize ? "text" : "html",
- raw: cap[0],
- inLink: this.lexer.state.inLink,
- inRawBlock: this.lexer.state.inRawBlock,
- text: this.options.sanitize ? this.options.sanitizer ? this.options.sanitizer(cap[0]) : escape(cap[0]) : cap[0]
- };
- }
- }
- link(src) {
- const cap = this.rules.inline.link.exec(src);
- if (cap) {
- const trimmedUrl = cap[2].trim();
- if (!this.options.pedantic && /^$/.test(trimmedUrl)) {
- return;
- }
- const rtrimSlash = rtrim(trimmedUrl.slice(0, -1), "\\");
- if ((trimmedUrl.length - rtrimSlash.length) % 2 === 0) {
- return;
- }
- } else {
- const lastParenIndex = findClosingBracket(cap[2], "()");
- if (lastParenIndex > -1) {
- const start = cap[0].indexOf("!") === 0 ? 5 : 4;
- const linkLen = start + cap[1].length + lastParenIndex;
- cap[2] = cap[2].substring(0, lastParenIndex);
- cap[0] = cap[0].substring(0, linkLen).trim();
- cap[3] = "";
- }
- }
- let href = cap[2];
- let title = "";
- if (this.options.pedantic) {
- const link = /^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(href);
- if (link) {
- href = link[1];
- title = link[3];
- }
- } else {
- title = cap[3] ? cap[3].slice(1, -1) : "";
- }
- href = href.trim();
- if (/^$/.test(trimmedUrl)) {
- href = href.slice(1);
- } else {
- href = href.slice(1, -1);
- }
- }
- return outputLink(cap, {
- href: href ? href.replace(this.rules.inline._escapes, "$1") : href,
- title: title ? title.replace(this.rules.inline._escapes, "$1") : title
- }, cap[0], this.lexer);
- }
- }
- reflink(src, links) {
- let cap;
- if ((cap = this.rules.inline.reflink.exec(src)) || (cap = this.rules.inline.nolink.exec(src))) {
- let link = (cap[2] || cap[1]).replace(/\s+/g, " ");
- link = links[link.toLowerCase()];
- if (!link || !link.href) {
- const text = cap[0].charAt(0);
- return {
- type: "text",
- raw: text,
- text
- };
- }
- return outputLink(cap, link, cap[0], this.lexer);
- }
- }
- emStrong(src, maskedSrc, prevChar = "") {
- let match = this.rules.inline.emStrong.lDelim.exec(src);
- if (!match)
- return;
- if (match[3] && prevChar.match(/[\p{L}\p{N}]/u))
- return;
- const nextChar = match[1] || match[2] || "";
- if (!nextChar || nextChar && (prevChar === "" || this.rules.inline.punctuation.exec(prevChar))) {
- const lLength = match[0].length - 1;
- let rDelim, rLength, delimTotal = lLength, midDelimTotal = 0;
- const endReg = match[0][0] === "*" ? this.rules.inline.emStrong.rDelimAst : this.rules.inline.emStrong.rDelimUnd;
- endReg.lastIndex = 0;
- maskedSrc = maskedSrc.slice(-1 * src.length + lLength);
- while ((match = endReg.exec(maskedSrc)) != null) {
- rDelim = match[1] || match[2] || match[3] || match[4] || match[5] || match[6];
- if (!rDelim)
- continue;
- rLength = rDelim.length;
- if (match[3] || match[4]) {
- delimTotal += rLength;
- continue;
- } else if (match[5] || match[6]) {
- if (lLength % 3 && !((lLength + rLength) % 3)) {
- midDelimTotal += rLength;
- continue;
- }
- }
- delimTotal -= rLength;
- if (delimTotal > 0)
- continue;
- rLength = Math.min(rLength, rLength + delimTotal + midDelimTotal);
- if (Math.min(lLength, rLength) % 2) {
- const text2 = src.slice(1, lLength + match.index + rLength);
- return {
- type: "em",
- raw: src.slice(0, lLength + match.index + rLength + 1),
- text: text2,
- tokens: this.lexer.inlineTokens(text2, [])
- };
- }
- const text = src.slice(2, lLength + match.index + rLength - 1);
- return {
- type: "strong",
- raw: src.slice(0, lLength + match.index + rLength + 1),
- text,
- tokens: this.lexer.inlineTokens(text, [])
- };
- }
- }
- }
- codespan(src) {
- const cap = this.rules.inline.code.exec(src);
- if (cap) {
- let text = cap[2].replace(/\n/g, " ");
- const hasNonSpaceChars = /[^ ]/.test(text);
- const hasSpaceCharsOnBothEnds = /^ /.test(text) && / $/.test(text);
- if (hasNonSpaceChars && hasSpaceCharsOnBothEnds) {
- text = text.substring(1, text.length - 1);
- }
- text = escape(text, true);
- return {
- type: "codespan",
- raw: cap[0],
- text
- };
- }
- }
- br(src) {
- const cap = this.rules.inline.br.exec(src);
- if (cap) {
- return {
- type: "br",
- raw: cap[0]
- };
- }
- }
- del(src) {
- const cap = this.rules.inline.del.exec(src);
- if (cap) {
- return {
- type: "del",
- raw: cap[0],
- text: cap[2],
- tokens: this.lexer.inlineTokens(cap[2], [])
- };
- }
- }
- autolink(src, mangle2) {
- const cap = this.rules.inline.autolink.exec(src);
- if (cap) {
- let text, href;
- if (cap[2] === "@") {
- text = escape(this.options.mangle ? mangle2(cap[1]) : cap[1]);
- href = "mailto:" + text;
- } else {
- text = escape(cap[1]);
- href = text;
- }
- return {
- type: "link",
- raw: cap[0],
- text,
- href,
- tokens: [
- {
- type: "text",
- raw: text,
- text
- }
- ]
- };
- }
- }
- url(src, mangle2) {
- let cap;
- if (cap = this.rules.inline.url.exec(src)) {
- let text, href;
- if (cap[2] === "@") {
- text = escape(this.options.mangle ? mangle2(cap[0]) : cap[0]);
- href = "mailto:" + text;
- } else {
- let prevCapZero;
- do {
- prevCapZero = cap[0];
- cap[0] = this.rules.inline._backpedal.exec(cap[0])[0];
- } while (prevCapZero !== cap[0]);
- text = escape(cap[0]);
- if (cap[1] === "www.") {
- href = "http://" + text;
- } else {
- href = text;
- }
- }
- return {
- type: "link",
- raw: cap[0],
- text,
- href,
- tokens: [
- {
- type: "text",
- raw: text,
- text
- }
- ]
- };
- }
- }
- inlineText(src, smartypants2) {
- const cap = this.rules.inline.text.exec(src);
- if (cap) {
- let text;
- if (this.lexer.state.inRawBlock) {
- text = this.options.sanitize ? this.options.sanitizer ? this.options.sanitizer(cap[0]) : escape(cap[0]) : cap[0];
- } else {
- text = escape(this.options.smartypants ? smartypants2(cap[0]) : cap[0]);
- }
- return {
- type: "text",
- raw: cap[0],
- text
- };
- }
- }
-};
-var block = {
- newline: /^(?: *(?:\n|$))+/,
- code: /^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,
- fences: /^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,
- hr: /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,
- heading: /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,
- blockquote: /^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,
- list: /^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,
- html: "^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",
- def: /^ {0,3}\[(label)\]: *(?:\n *)?([^\s>]+)>?(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,
- table: noopTest,
- lheading: /^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,
- _paragraph: /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,
- text: /^[^\n]+/
-};
-block._label = /(?!\s*\])(?:\\.|[^\[\]\\])+/;
-block._title = /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/;
-block.def = edit(block.def).replace("label", block._label).replace("title", block._title).getRegex();
-block.bullet = /(?:[*+-]|\d{1,9}[.)])/;
-block.listItemStart = edit(/^( *)(bull) */).replace("bull", block.bullet).getRegex();
-block.list = edit(block.list).replace(/bull/g, block.bullet).replace("hr", "\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def", "\\n+(?=" + block.def.source + ")").getRegex();
-block._tag = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul";
-block._comment = /|$)/;
-block.html = edit(block.html, "i").replace("comment", block._comment).replace("tag", block._tag).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();
-block.paragraph = edit(block._paragraph).replace("hr", block.hr).replace("heading", " {0,3}#{1,6} ").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", block._tag).getRegex();
-block.blockquote = edit(block.blockquote).replace("paragraph", block.paragraph).getRegex();
-block.normal = merge({}, block);
-block.gfm = merge({}, block.normal, {
- table: "^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"
-});
-block.gfm.table = edit(block.gfm.table).replace("hr", block.hr).replace("heading", " {0,3}#{1,6} ").replace("blockquote", " {0,3}>").replace("code", " {4}[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", block._tag).getRegex();
-block.gfm.paragraph = edit(block._paragraph).replace("hr", block.hr).replace("heading", " {0,3}#{1,6} ").replace("|lheading", "").replace("table", block.gfm.table).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", block._tag).getRegex();
-block.pedantic = merge({}, block.normal, {
- html: edit(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?\\1> *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", block._comment).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),
- def: /^ *\[([^\]]+)\]: *([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,
- heading: /^(#{1,6})(.*)(?:\n+|$)/,
- fences: noopTest,
- paragraph: edit(block.normal._paragraph).replace("hr", block.hr).replace("heading", " *#{1,6} *[^\n]").replace("lheading", block.lheading).replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").getRegex()
-});
-var inline = {
- escape: /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,
- autolink: /^<(scheme:[^\s\x00-\x1f<>]*|email)>/,
- url: noopTest,
- tag: "^comment|^[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",
- link: /^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,
- reflink: /^!?\[(label)\]\[(ref)\]/,
- nolink: /^!?\[(ref)\](?:\[\])?/,
- reflinkSearch: "reflink|nolink(?!\\()",
- emStrong: {
- lDelim: /^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,
- rDelimAst: /^[^_*]*?\_\_[^_*]*?\*[^_*]*?(?=\_\_)|[^*]+(?=[^*])|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,
- rDelimUnd: /^[^_*]*?\*\*[^_*]*?\_[^_*]*?(?=\*\*)|[^_]+(?=[^_])|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/
- },
- code: /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,
- br: /^( {2,}|\\)\n(?!\s*$)/,
- del: noopTest,
- text: /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~";
-inline.punctuation = edit(inline.punctuation).replace(/punctuation/g, inline._punctuation).getRegex();
-inline.blockSkip = /\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g;
-inline.escapedEmSt = /\\\*|\\_/g;
-inline._comment = edit(block._comment).replace("(?:-->|$)", "-->").getRegex();
-inline.emStrong.lDelim = edit(inline.emStrong.lDelim).replace(/punct/g, inline._punctuation).getRegex();
-inline.emStrong.rDelimAst = edit(inline.emStrong.rDelimAst, "g").replace(/punct/g, inline._punctuation).getRegex();
-inline.emStrong.rDelimUnd = edit(inline.emStrong.rDelimUnd, "g").replace(/punct/g, inline._punctuation).getRegex();
-inline._escapes = /\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g;
-inline._scheme = /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/;
-inline._email = /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/;
-inline.autolink = edit(inline.autolink).replace("scheme", inline._scheme).replace("email", inline._email).getRegex();
-inline._attribute = /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/;
-inline.tag = edit(inline.tag).replace("comment", inline._comment).replace("attribute", inline._attribute).getRegex();
-inline._label = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;
-inline._href = /<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/;
-inline._title = /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/;
-inline.link = edit(inline.link).replace("label", inline._label).replace("href", inline._href).replace("title", inline._title).getRegex();
-inline.reflink = edit(inline.reflink).replace("label", inline._label).replace("ref", block._label).getRegex();
-inline.nolink = edit(inline.nolink).replace("ref", block._label).getRegex();
-inline.reflinkSearch = edit(inline.reflinkSearch, "g").replace("reflink", inline.reflink).replace("nolink", inline.nolink).getRegex();
-inline.normal = merge({}, inline);
-inline.pedantic = merge({}, inline.normal, {
- strong: {
- start: /^__|\*\*/,
- middle: /^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,
- endAst: /\*\*(?!\*)/g,
- endUnd: /__(?!_)/g
- },
- em: {
- start: /^_|\*/,
- middle: /^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,
- endAst: /\*(?!\*)/g,
- endUnd: /_(?!_)/g
- },
- link: edit(/^!?\[(label)\]\((.*?)\)/).replace("label", inline._label).getRegex(),
- reflink: edit(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", inline._label).getRegex()
-});
-inline.gfm = merge({}, inline.normal, {
- escape: edit(inline.escape).replace("])", "~|])").getRegex(),
- _extended_email: /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,
- url: /^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,
- _backpedal: /(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,
- del: /^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,
- text: /^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\ 0.5) {
- ch = "x" + ch.toString(16);
- }
- out += "" + ch + ";";
- }
- return out;
-}
-var Lexer = class {
- constructor(options2) {
- this.tokens = [];
- this.tokens.links = Object.create(null);
- this.options = options2 || defaults;
- this.options.tokenizer = this.options.tokenizer || new Tokenizer();
- this.tokenizer = this.options.tokenizer;
- this.tokenizer.options = this.options;
- this.tokenizer.lexer = this;
- this.inlineQueue = [];
- this.state = {
- inLink: false,
- inRawBlock: false,
- top: true
- };
- const rules = {
- block: block.normal,
- inline: inline.normal
- };
- if (this.options.pedantic) {
- rules.block = block.pedantic;
- rules.inline = inline.pedantic;
- } else if (this.options.gfm) {
- rules.block = block.gfm;
- if (this.options.breaks) {
- rules.inline = inline.breaks;
- } else {
- rules.inline = inline.gfm;
- }
- }
- this.tokenizer.rules = rules;
- }
- static get rules() {
- return {
- block,
- inline
- };
- }
- static lex(src, options2) {
- const lexer2 = new Lexer(options2);
- return lexer2.lex(src);
- }
- static lexInline(src, options2) {
- const lexer2 = new Lexer(options2);
- return lexer2.inlineTokens(src);
- }
- lex(src) {
- src = src.replace(/\r\n|\r/g, "\n");
- this.blockTokens(src, this.tokens);
- let next;
- while (next = this.inlineQueue.shift()) {
- this.inlineTokens(next.src, next.tokens);
- }
- return this.tokens;
- }
- blockTokens(src, tokens = []) {
- if (this.options.pedantic) {
- src = src.replace(/\t/g, " ").replace(/^ +$/gm, "");
- } else {
- src = src.replace(/^( *)(\t+)/gm, (_, leading, tabs) => {
- return leading + " ".repeat(tabs.length);
- });
- }
- let token, lastToken, cutSrc, lastParagraphClipped;
- while (src) {
- if (this.options.extensions && this.options.extensions.block && this.options.extensions.block.some((extTokenizer) => {
- if (token = extTokenizer.call({ lexer: this }, src, tokens)) {
- src = src.substring(token.raw.length);
- tokens.push(token);
- return true;
- }
- return false;
- })) {
- continue;
- }
- if (token = this.tokenizer.space(src)) {
- src = src.substring(token.raw.length);
- if (token.raw.length === 1 && tokens.length > 0) {
- tokens[tokens.length - 1].raw += "\n";
- } else {
- tokens.push(token);
- }
- continue;
- }
- if (token = this.tokenizer.code(src)) {
- src = src.substring(token.raw.length);
- lastToken = tokens[tokens.length - 1];
- if (lastToken && (lastToken.type === "paragraph" || lastToken.type === "text")) {
- lastToken.raw += "\n" + token.raw;
- lastToken.text += "\n" + token.text;
- this.inlineQueue[this.inlineQueue.length - 1].src = lastToken.text;
- } else {
- tokens.push(token);
- }
- continue;
- }
- if (token = this.tokenizer.fences(src)) {
- src = src.substring(token.raw.length);
- tokens.push(token);
- continue;
- }
- if (token = this.tokenizer.heading(src)) {
- src = src.substring(token.raw.length);
- tokens.push(token);
- continue;
- }
- if (token = this.tokenizer.hr(src)) {
- src = src.substring(token.raw.length);
- tokens.push(token);
- continue;
- }
- if (token = this.tokenizer.blockquote(src)) {
- src = src.substring(token.raw.length);
- tokens.push(token);
- continue;
- }
- if (token = this.tokenizer.list(src)) {
- src = src.substring(token.raw.length);
- tokens.push(token);
- continue;
- }
- if (token = this.tokenizer.html(src)) {
- src = src.substring(token.raw.length);
- tokens.push(token);
- continue;
- }
- if (token = this.tokenizer.def(src)) {
- src = src.substring(token.raw.length);
- lastToken = tokens[tokens.length - 1];
- if (lastToken && (lastToken.type === "paragraph" || lastToken.type === "text")) {
- lastToken.raw += "\n" + token.raw;
- lastToken.text += "\n" + token.raw;
- this.inlineQueue[this.inlineQueue.length - 1].src = lastToken.text;
- } else if (!this.tokens.links[token.tag]) {
- this.tokens.links[token.tag] = {
- href: token.href,
- title: token.title
- };
- }
- continue;
- }
- if (token = this.tokenizer.table(src)) {
- src = src.substring(token.raw.length);
- tokens.push(token);
- continue;
- }
- if (token = this.tokenizer.lheading(src)) {
- src = src.substring(token.raw.length);
- tokens.push(token);
- continue;
- }
- cutSrc = src;
- if (this.options.extensions && this.options.extensions.startBlock) {
- let startIndex = Infinity;
- const tempSrc = src.slice(1);
- let tempStart;
- this.options.extensions.startBlock.forEach(function(getStartIndex) {
- tempStart = getStartIndex.call({ lexer: this }, tempSrc);
- if (typeof tempStart === "number" && tempStart >= 0) {
- startIndex = Math.min(startIndex, tempStart);
- }
- });
- if (startIndex < Infinity && startIndex >= 0) {
- cutSrc = src.substring(0, startIndex + 1);
- }
- }
- if (this.state.top && (token = this.tokenizer.paragraph(cutSrc))) {
- lastToken = tokens[tokens.length - 1];
- if (lastParagraphClipped && lastToken.type === "paragraph") {
- lastToken.raw += "\n" + token.raw;
- lastToken.text += "\n" + token.text;
- this.inlineQueue.pop();
- this.inlineQueue[this.inlineQueue.length - 1].src = lastToken.text;
- } else {
- tokens.push(token);
- }
- lastParagraphClipped = cutSrc.length !== src.length;
- src = src.substring(token.raw.length);
- continue;
- }
- if (token = this.tokenizer.text(src)) {
- src = src.substring(token.raw.length);
- lastToken = tokens[tokens.length - 1];
- if (lastToken && lastToken.type === "text") {
- lastToken.raw += "\n" + token.raw;
- lastToken.text += "\n" + token.text;
- this.inlineQueue.pop();
- this.inlineQueue[this.inlineQueue.length - 1].src = lastToken.text;
- } else {
- tokens.push(token);
- }
- continue;
- }
- if (src) {
- const errMsg = "Infinite loop on byte: " + src.charCodeAt(0);
- if (this.options.silent) {
- console.error(errMsg);
- break;
- } else {
- throw new Error(errMsg);
- }
- }
- }
- this.state.top = true;
- return tokens;
- }
- inline(src, tokens) {
- this.inlineQueue.push({ src, tokens });
- }
- inlineTokens(src, tokens = []) {
- let token, lastToken, cutSrc;
- let maskedSrc = src;
- let match;
- let keepPrevChar, prevChar;
- if (this.tokens.links) {
- const links = Object.keys(this.tokens.links);
- if (links.length > 0) {
- while ((match = this.tokenizer.rules.inline.reflinkSearch.exec(maskedSrc)) != null) {
- if (links.includes(match[0].slice(match[0].lastIndexOf("[") + 1, -1))) {
- maskedSrc = maskedSrc.slice(0, match.index) + "[" + repeatString("a", match[0].length - 2) + "]" + maskedSrc.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex);
- }
- }
- }
- }
- while ((match = this.tokenizer.rules.inline.blockSkip.exec(maskedSrc)) != null) {
- maskedSrc = maskedSrc.slice(0, match.index) + "[" + repeatString("a", match[0].length - 2) + "]" + maskedSrc.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);
- }
- while ((match = this.tokenizer.rules.inline.escapedEmSt.exec(maskedSrc)) != null) {
- maskedSrc = maskedSrc.slice(0, match.index) + "++" + maskedSrc.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);
- }
- while (src) {
- if (!keepPrevChar) {
- prevChar = "";
- }
- keepPrevChar = false;
- if (this.options.extensions && this.options.extensions.inline && this.options.extensions.inline.some((extTokenizer) => {
- if (token = extTokenizer.call({ lexer: this }, src, tokens)) {
- src = src.substring(token.raw.length);
- tokens.push(token);
- return true;
- }
- return false;
- })) {
- continue;
- }
- if (token = this.tokenizer.escape(src)) {
- src = src.substring(token.raw.length);
- tokens.push(token);
- continue;
- }
- if (token = this.tokenizer.tag(src)) {
- src = src.substring(token.raw.length);
- lastToken = tokens[tokens.length - 1];
- if (lastToken && token.type === "text" && lastToken.type === "text") {
- lastToken.raw += token.raw;
- lastToken.text += token.text;
- } else {
- tokens.push(token);
- }
- continue;
- }
- if (token = this.tokenizer.link(src)) {
- src = src.substring(token.raw.length);
- tokens.push(token);
- continue;
- }
- if (token = this.tokenizer.reflink(src, this.tokens.links)) {
- src = src.substring(token.raw.length);
- lastToken = tokens[tokens.length - 1];
- if (lastToken && token.type === "text" && lastToken.type === "text") {
- lastToken.raw += token.raw;
- lastToken.text += token.text;
- } else {
- tokens.push(token);
- }
- continue;
- }
- if (token = this.tokenizer.emStrong(src, maskedSrc, prevChar)) {
- src = src.substring(token.raw.length);
- tokens.push(token);
- continue;
- }
- if (token = this.tokenizer.codespan(src)) {
- src = src.substring(token.raw.length);
- tokens.push(token);
- continue;
- }
- if (token = this.tokenizer.br(src)) {
- src = src.substring(token.raw.length);
- tokens.push(token);
- continue;
- }
- if (token = this.tokenizer.del(src)) {
- src = src.substring(token.raw.length);
- tokens.push(token);
- continue;
- }
- if (token = this.tokenizer.autolink(src, mangle)) {
- src = src.substring(token.raw.length);
- tokens.push(token);
- continue;
- }
- if (!this.state.inLink && (token = this.tokenizer.url(src, mangle))) {
- src = src.substring(token.raw.length);
- tokens.push(token);
- continue;
- }
- cutSrc = src;
- if (this.options.extensions && this.options.extensions.startInline) {
- let startIndex = Infinity;
- const tempSrc = src.slice(1);
- let tempStart;
- this.options.extensions.startInline.forEach(function(getStartIndex) {
- tempStart = getStartIndex.call({ lexer: this }, tempSrc);
- if (typeof tempStart === "number" && tempStart >= 0) {
- startIndex = Math.min(startIndex, tempStart);
- }
- });
- if (startIndex < Infinity && startIndex >= 0) {
- cutSrc = src.substring(0, startIndex + 1);
- }
- }
- if (token = this.tokenizer.inlineText(cutSrc, smartypants)) {
- src = src.substring(token.raw.length);
- if (token.raw.slice(-1) !== "_") {
- prevChar = token.raw.slice(-1);
- }
- keepPrevChar = true;
- lastToken = tokens[tokens.length - 1];
- if (lastToken && lastToken.type === "text") {
- lastToken.raw += token.raw;
- lastToken.text += token.text;
- } else {
- tokens.push(token);
- }
- continue;
- }
- if (src) {
- const errMsg = "Infinite loop on byte: " + src.charCodeAt(0);
- if (this.options.silent) {
- console.error(errMsg);
- break;
- } else {
- throw new Error(errMsg);
- }
- }
- }
- return tokens;
- }
-};
-var Renderer = class {
- constructor(options2) {
- this.options = options2 || defaults;
- }
- code(code, infostring, escaped) {
- const lang = (infostring || "").match(/\S*/)[0];
- if (this.options.highlight) {
- const out = this.options.highlight(code, lang);
- if (out != null && out !== code) {
- escaped = true;
- code = out;
- }
- }
- code = code.replace(/\n$/, "") + "\n";
- if (!lang) {
- return "" + (escaped ? code : escape(code, true)) + "
\n";
- }
- return '' + (escaped ? code : escape(code, true)) + "
\n";
- }
- blockquote(quote) {
- return `
-${quote}
-`;
- }
- html(html) {
- return html;
- }
- heading(text, level, raw, slugger) {
- if (this.options.headerIds) {
- const id = this.options.headerPrefix + slugger.slug(raw);
- return `${text}
-`;
- }
- return `${text}
-`;
- }
- hr() {
- return this.options.xhtml ? "
\n" : "
\n";
- }
- list(body, ordered, start) {
- const type = ordered ? "ol" : "ul", startatt = ordered && start !== 1 ? ' start="' + start + '"' : "";
- return "<" + type + startatt + ">\n" + body + "" + type + ">\n";
- }
- listitem(text) {
- return `${text}
-`;
- }
- checkbox(checked) {
- return " ";
- }
- paragraph(text) {
- return `${text}
-`;
- }
- table(header, body) {
- if (body)
- body = `${body}`;
- return "
\n\n" + header + "\n" + body + "
\n";
- }
- tablerow(content) {
- return `
-${content}
-`;
- }
- tablecell(content, flags) {
- const type = flags.header ? "th" : "td";
- const tag = flags.align ? `<${type} align="${flags.align}">` : `<${type}>`;
- return tag + content + `${type}>
-`;
- }
- strong(text) {
- return `${text}`;
- }
- em(text) {
- return `${text}`;
- }
- codespan(text) {
- return `${text}
`;
- }
- br() {
- return this.options.xhtml ? "
" : "
";
- }
- del(text) {
- return `${text}`;
- }
- link(href, title, text) {
- href = cleanUrl(this.options.sanitize, this.options.baseUrl, href);
- if (href === null) {
- return text;
- }
- let out = '" + text + "";
- return out;
- }
- image(href, title, text) {
- href = cleanUrl(this.options.sanitize, this.options.baseUrl, href);
- if (href === null) {
- return text;
- }
- let out = `" : ">";
- return out;
- }
- text(text) {
- return text;
- }
-};
-var TextRenderer = class {
- strong(text) {
- return text;
- }
- em(text) {
- return text;
- }
- codespan(text) {
- return text;
- }
- del(text) {
- return text;
- }
- html(text) {
- return text;
- }
- text(text) {
- return text;
- }
- link(href, title, text) {
- return "" + text;
- }
- image(href, title, text) {
- return "" + text;
- }
- br() {
- return "";
- }
-};
-var Slugger = class {
- constructor() {
- this.seen = {};
- }
- serialize(value) {
- return value.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig, "").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g, "").replace(/\s/g, "-");
- }
- getNextSafeSlug(originalSlug, isDryRun) {
- let slug = originalSlug;
- let occurenceAccumulator = 0;
- if (this.seen.hasOwnProperty(slug)) {
- occurenceAccumulator = this.seen[originalSlug];
- do {
- occurenceAccumulator++;
- slug = originalSlug + "-" + occurenceAccumulator;
- } while (this.seen.hasOwnProperty(slug));
- }
- if (!isDryRun) {
- this.seen[originalSlug] = occurenceAccumulator;
- this.seen[slug] = 0;
- }
- return slug;
- }
- slug(value, options2 = {}) {
- const slug = this.serialize(value);
- return this.getNextSafeSlug(slug, options2.dryrun);
- }
-};
-var Parser = class {
- constructor(options2) {
- this.options = options2 || defaults;
- this.options.renderer = this.options.renderer || new Renderer();
- this.renderer = this.options.renderer;
- this.renderer.options = this.options;
- this.textRenderer = new TextRenderer();
- this.slugger = new Slugger();
- }
- static parse(tokens, options2) {
- const parser2 = new Parser(options2);
- return parser2.parse(tokens);
- }
- static parseInline(tokens, options2) {
- const parser2 = new Parser(options2);
- return parser2.parseInline(tokens);
- }
- parse(tokens, top = true) {
- let out = "", i, j, k, l2, l3, row, cell, header, body, token, ordered, start, loose, itemBody, item, checked, task, checkbox, ret;
- const l = tokens.length;
- for (i = 0; i < l; i++) {
- token = tokens[i];
- if (this.options.extensions && this.options.extensions.renderers && this.options.extensions.renderers[token.type]) {
- ret = this.options.extensions.renderers[token.type].call({ parser: this }, token);
- if (ret !== false || !["space", "hr", "heading", "code", "table", "blockquote", "list", "html", "paragraph", "text"].includes(token.type)) {
- out += ret || "";
- continue;
- }
- }
- switch (token.type) {
- case "space": {
- continue;
- }
- case "hr": {
- out += this.renderer.hr();
- continue;
- }
- case "heading": {
- out += this.renderer.heading(this.parseInline(token.tokens), token.depth, unescape(this.parseInline(token.tokens, this.textRenderer)), this.slugger);
- continue;
- }
- case "code": {
- out += this.renderer.code(token.text, token.lang, token.escaped);
- continue;
- }
- case "table": {
- header = "";
- cell = "";
- l2 = token.header.length;
- for (j = 0; j < l2; j++) {
- cell += this.renderer.tablecell(this.parseInline(token.header[j].tokens), { header: true, align: token.align[j] });
- }
- header += this.renderer.tablerow(cell);
- body = "";
- l2 = token.rows.length;
- for (j = 0; j < l2; j++) {
- row = token.rows[j];
- cell = "";
- l3 = row.length;
- for (k = 0; k < l3; k++) {
- cell += this.renderer.tablecell(this.parseInline(row[k].tokens), { header: false, align: token.align[k] });
- }
- body += this.renderer.tablerow(cell);
- }
- out += this.renderer.table(header, body);
- continue;
- }
- case "blockquote": {
- body = this.parse(token.tokens);
- out += this.renderer.blockquote(body);
- continue;
- }
- case "list": {
- ordered = token.ordered;
- start = token.start;
- loose = token.loose;
- l2 = token.items.length;
- body = "";
- for (j = 0; j < l2; j++) {
- item = token.items[j];
- checked = item.checked;
- task = item.task;
- itemBody = "";
- if (item.task) {
- checkbox = this.renderer.checkbox(checked);
- if (loose) {
- if (item.tokens.length > 0 && item.tokens[0].type === "paragraph") {
- item.tokens[0].text = checkbox + " " + item.tokens[0].text;
- if (item.tokens[0].tokens && item.tokens[0].tokens.length > 0 && item.tokens[0].tokens[0].type === "text") {
- item.tokens[0].tokens[0].text = checkbox + " " + item.tokens[0].tokens[0].text;
- }
- } else {
- item.tokens.unshift({
- type: "text",
- text: checkbox
- });
- }
- } else {
- itemBody += checkbox;
- }
- }
- itemBody += this.parse(item.tokens, loose);
- body += this.renderer.listitem(itemBody, task, checked);
- }
- out += this.renderer.list(body, ordered, start);
- continue;
- }
- case "html": {
- out += this.renderer.html(token.text);
- continue;
- }
- case "paragraph": {
- out += this.renderer.paragraph(this.parseInline(token.tokens));
- continue;
- }
- case "text": {
- body = token.tokens ? this.parseInline(token.tokens) : token.text;
- while (i + 1 < l && tokens[i + 1].type === "text") {
- token = tokens[++i];
- body += "\n" + (token.tokens ? this.parseInline(token.tokens) : token.text);
- }
- out += top ? this.renderer.paragraph(body) : body;
- continue;
- }
- default: {
- const errMsg = 'Token with "' + token.type + '" type was not found.';
- if (this.options.silent) {
- console.error(errMsg);
- return;
- } else {
- throw new Error(errMsg);
- }
- }
- }
- }
- return out;
- }
- parseInline(tokens, renderer) {
- renderer = renderer || this.renderer;
- let out = "", i, token, ret;
- const l = tokens.length;
- for (i = 0; i < l; i++) {
- token = tokens[i];
- if (this.options.extensions && this.options.extensions.renderers && this.options.extensions.renderers[token.type]) {
- ret = this.options.extensions.renderers[token.type].call({ parser: this }, token);
- if (ret !== false || !["escape", "html", "link", "image", "strong", "em", "codespan", "br", "del", "text"].includes(token.type)) {
- out += ret || "";
- continue;
- }
- }
- switch (token.type) {
- case "escape": {
- out += renderer.text(token.text);
- break;
- }
- case "html": {
- out += renderer.html(token.text);
- break;
- }
- case "link": {
- out += renderer.link(token.href, token.title, this.parseInline(token.tokens, renderer));
- break;
- }
- case "image": {
- out += renderer.image(token.href, token.title, token.text);
- break;
- }
- case "strong": {
- out += renderer.strong(this.parseInline(token.tokens, renderer));
- break;
- }
- case "em": {
- out += renderer.em(this.parseInline(token.tokens, renderer));
- break;
- }
- case "codespan": {
- out += renderer.codespan(token.text);
- break;
- }
- case "br": {
- out += renderer.br();
- break;
- }
- case "del": {
- out += renderer.del(this.parseInline(token.tokens, renderer));
- break;
- }
- case "text": {
- out += renderer.text(token.text);
- break;
- }
- default: {
- const errMsg = 'Token with "' + token.type + '" type was not found.';
- if (this.options.silent) {
- console.error(errMsg);
- return;
- } else {
- throw new Error(errMsg);
- }
- }
- }
- }
- return out;
- }
-};
-function marked(src, opt, callback) {
- if (typeof src === "undefined" || src === null) {
- throw new Error("marked(): input parameter is undefined or null");
- }
- if (typeof src !== "string") {
- throw new Error("marked(): input parameter is of type " + Object.prototype.toString.call(src) + ", string expected");
- }
- if (typeof opt === "function") {
- callback = opt;
- opt = null;
- }
- opt = merge({}, marked.defaults, opt || {});
- checkSanitizeDeprecation(opt);
- if (callback) {
- const highlight = opt.highlight;
- let tokens;
- try {
- tokens = Lexer.lex(src, opt);
- } catch (e) {
- return callback(e);
- }
- const done = function(err) {
- let out;
- if (!err) {
- try {
- if (opt.walkTokens) {
- marked.walkTokens(tokens, opt.walkTokens);
- }
- out = Parser.parse(tokens, opt);
- } catch (e) {
- err = e;
- }
- }
- opt.highlight = highlight;
- return err ? callback(err) : callback(null, out);
- };
- if (!highlight || highlight.length < 3) {
- return done();
- }
- delete opt.highlight;
- if (!tokens.length)
- return done();
- let pending = 0;
- marked.walkTokens(tokens, function(token) {
- if (token.type === "code") {
- pending++;
- setTimeout(() => {
- highlight(token.text, token.lang, function(err, code) {
- if (err) {
- return done(err);
- }
- if (code != null && code !== token.text) {
- token.text = code;
- token.escaped = true;
- }
- pending--;
- if (pending === 0) {
- done();
- }
- });
- }, 0);
- }
- });
- if (pending === 0) {
- done();
- }
- return;
- }
- try {
- const tokens = Lexer.lex(src, opt);
- if (opt.walkTokens) {
- marked.walkTokens(tokens, opt.walkTokens);
- }
- return Parser.parse(tokens, opt);
- } catch (e) {
- e.message += "\nPlease report this to https://github.com/markedjs/marked.";
- if (opt.silent) {
- return "An error occurred:
" + escape(e.message + "", true) + "
";
- }
- throw e;
- }
-}
-marked.options = marked.setOptions = function(opt) {
- merge(marked.defaults, opt);
- changeDefaults(marked.defaults);
- return marked;
-};
-marked.getDefaults = getDefaults;
-marked.defaults = defaults;
-marked.use = function(...args) {
- const opts = merge({}, ...args);
- const extensions = marked.defaults.extensions || { renderers: {}, childTokens: {} };
- let hasExtensions;
- args.forEach((pack) => {
- if (pack.extensions) {
- hasExtensions = true;
- pack.extensions.forEach((ext) => {
- if (!ext.name) {
- throw new Error("extension name required");
- }
- if (ext.renderer) {
- const prevRenderer = extensions.renderers ? extensions.renderers[ext.name] : null;
- if (prevRenderer) {
- extensions.renderers[ext.name] = function(...args2) {
- let ret = ext.renderer.apply(this, args2);
- if (ret === false) {
- ret = prevRenderer.apply(this, args2);
- }
- return ret;
- };
- } else {
- extensions.renderers[ext.name] = ext.renderer;
- }
- }
- if (ext.tokenizer) {
- if (!ext.level || ext.level !== "block" && ext.level !== "inline") {
- throw new Error("extension level must be 'block' or 'inline'");
- }
- if (extensions[ext.level]) {
- extensions[ext.level].unshift(ext.tokenizer);
- } else {
- extensions[ext.level] = [ext.tokenizer];
- }
- if (ext.start) {
- if (ext.level === "block") {
- if (extensions.startBlock) {
- extensions.startBlock.push(ext.start);
- } else {
- extensions.startBlock = [ext.start];
- }
- } else if (ext.level === "inline") {
- if (extensions.startInline) {
- extensions.startInline.push(ext.start);
- } else {
- extensions.startInline = [ext.start];
- }
- }
- }
- }
- if (ext.childTokens) {
- extensions.childTokens[ext.name] = ext.childTokens;
- }
- });
- }
- if (pack.renderer) {
- const renderer = marked.defaults.renderer || new Renderer();
- for (const prop in pack.renderer) {
- const prevRenderer = renderer[prop];
- renderer[prop] = (...args2) => {
- let ret = pack.renderer[prop].apply(renderer, args2);
- if (ret === false) {
- ret = prevRenderer.apply(renderer, args2);
- }
- return ret;
- };
- }
- opts.renderer = renderer;
- }
- if (pack.tokenizer) {
- const tokenizer = marked.defaults.tokenizer || new Tokenizer();
- for (const prop in pack.tokenizer) {
- const prevTokenizer = tokenizer[prop];
- tokenizer[prop] = (...args2) => {
- let ret = pack.tokenizer[prop].apply(tokenizer, args2);
- if (ret === false) {
- ret = prevTokenizer.apply(tokenizer, args2);
- }
- return ret;
- };
- }
- opts.tokenizer = tokenizer;
- }
- if (pack.walkTokens) {
- const walkTokens2 = marked.defaults.walkTokens;
- opts.walkTokens = function(token) {
- pack.walkTokens.call(this, token);
- if (walkTokens2) {
- walkTokens2.call(this, token);
- }
- };
- }
- if (hasExtensions) {
- opts.extensions = extensions;
- }
- marked.setOptions(opts);
- });
-};
-marked.walkTokens = function(tokens, callback) {
- for (const token of tokens) {
- callback.call(marked, token);
- switch (token.type) {
- case "table": {
- for (const cell of token.header) {
- marked.walkTokens(cell.tokens, callback);
- }
- for (const row of token.rows) {
- for (const cell of row) {
- marked.walkTokens(cell.tokens, callback);
- }
- }
- break;
- }
- case "list": {
- marked.walkTokens(token.items, callback);
- break;
- }
- default: {
- if (marked.defaults.extensions && marked.defaults.extensions.childTokens && marked.defaults.extensions.childTokens[token.type]) {
- marked.defaults.extensions.childTokens[token.type].forEach(function(childTokens) {
- marked.walkTokens(token[childTokens], callback);
- });
- } else if (token.tokens) {
- marked.walkTokens(token.tokens, callback);
- }
- }
- }
- }
-};
-marked.parseInline = function(src, opt) {
- if (typeof src === "undefined" || src === null) {
- throw new Error("marked.parseInline(): input parameter is undefined or null");
- }
- if (typeof src !== "string") {
- throw new Error("marked.parseInline(): input parameter is of type " + Object.prototype.toString.call(src) + ", string expected");
- }
- opt = merge({}, marked.defaults, opt || {});
- checkSanitizeDeprecation(opt);
- try {
- const tokens = Lexer.lexInline(src, opt);
- if (opt.walkTokens) {
- marked.walkTokens(tokens, opt.walkTokens);
- }
- return Parser.parseInline(tokens, opt);
- } catch (e) {
- e.message += "\nPlease report this to https://github.com/markedjs/marked.";
- if (opt.silent) {
- return "An error occurred:
" + escape(e.message + "", true) + "
";
- }
- throw e;
- }
-};
-marked.Parser = Parser;
-marked.parser = Parser.parse;
-marked.Renderer = Renderer;
-marked.TextRenderer = TextRenderer;
-marked.Lexer = Lexer;
-marked.lexer = Lexer.lex;
-marked.Tokenizer = Tokenizer;
-marked.Slugger = Slugger;
-marked.parse = marked;
-var options = marked.options;
-var setOptions = marked.setOptions;
-var use = marked.use;
-var walkTokens = marked.walkTokens;
-var parseInline = marked.parseInline;
-var parser = Parser.parse;
-var lexer = Lexer.lex;
-
-// main.ts
-var import_md2bbc = __toModule(require_md2bbc2());
-var import_obsidian = __toModule(require("obsidian"));
-var BBCode = class extends import_obsidian.Plugin {
- onload() {
- return __async(this, null, function* () {
- this.addCommand({
- id: "copy-to-bbcode",
- name: "Convert to BBCode & Copy to Clipboard",
- editorCallback: (editor) => {
- const value = editor.getValue();
- const tagless = value.replace(/\[\[((.*?)\|)*?([^|]*?)\]\]/g, "$3");
- const bbcode = marked(tagless, {
- renderer: new import_md2bbc.default()
- });
- navigator.clipboard.writeText(bbcode);
- }
- });
- });
- }
-};
diff --git a/.obsidian/plugins/obsidian-bbcode/manifest.json b/.obsidian/plugins/obsidian-bbcode/manifest.json
deleted file mode 100644
index 0f73c7a6..00000000
--- a/.obsidian/plugins/obsidian-bbcode/manifest.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "id": "obsidian-bbcode",
- "name": "BBCode Convertor",
- "version": "1.0.0",
- "minAppVersion": "0.12.0",
- "description": "Convert Markdown files to BBCode",
- "author": "Alex Lockhart",
- "authorUrl": "https://github.com/salockhart/obsidian-bbcode",
- "isDesktopOnly": false
-}
diff --git a/.obsidian/plugins/obsidian-bbcode/styles.css b/.obsidian/plugins/obsidian-bbcode/styles.css
deleted file mode 100644
index 85373076..00000000
--- a/.obsidian/plugins/obsidian-bbcode/styles.css
+++ /dev/null
@@ -1 +0,0 @@
-Not Found
\ No newline at end of file
diff --git a/.obsidian/plugins/obsidian-commits/data.json b/.obsidian/plugins/obsidian-commits/data.json
index fa3bc7f1..016d71f9 100644
--- a/.obsidian/plugins/obsidian-commits/data.json
+++ b/.obsidian/plugins/obsidian-commits/data.json
@@ -1925,7 +1925,7 @@
"links": 1
},
"01.02 Home/Household.md": {
- "size": 7288,
+ "size": 1552,
"tags": 3,
"links": 2
},
@@ -2102,7 +2102,7 @@
"00.06 Professional/Les 17 erreurs de management à ne pas commettre.md": {
"size": 8730,
"tags": 0,
- "links": 2
+ "links": 1
},
"00.03 News/Javanka in Exile.md": {
"size": 23938,
@@ -2127,12 +2127,12 @@
"01.01 Life Orga/Désert rural. La grande ruée vers les maisons italiennes à 1 euro.md": {
"size": 3343,
"tags": 2,
- "links": 1
+ "links": 2
},
"01.01 Life Orga/En Bretagne, les responsables politiques redoutent l’émergence d’une « Breizh Riviera ».md": {
"size": 5112,
"tags": 2,
- "links": 1
+ "links": 2
},
"01.01 Life Orga/@@Life Organisation.md": {
"size": 4622,
@@ -2167,7 +2167,7 @@
"01.01 Life Orga/Quand tu arrives ici, tu te dis que rien n’est cher les Parisiens s’entichent de Marseille.md": {
"size": 5400,
"tags": 2,
- "links": 1
+ "links": 2
},
"00.05 Media/3 youths in Medellin.md": {
"size": 354,
@@ -2207,7 +2207,7 @@
"00.06 Professional/The Company-Building Cornerstones Every Founder Needs to Focus On — Advice from HubSpot.md": {
"size": 30484,
"tags": 0,
- "links": 1
+ "links": 2
},
"00.03 News/My transformative first trip to Japan · Part 4.md": {
"size": 18383,
@@ -2237,7 +2237,7 @@
"00.06 Professional/Sameer Huda - gunnercooke llp.md": {
"size": 3758,
"tags": 0,
- "links": 1
+ "links": 2
},
"00.06 Professional/A Black woman's guide to venture-capital fundraising How to pitch investors, build a support network, and raise millions..md": {
"size": 9329,
@@ -2317,7 +2317,7 @@
"00.04 IT/Obsidian website publish - comments.md": {
"size": 296,
"tags": 0,
- "links": 2
+ "links": 1
},
"00.04 IT/Create multiple websites from one Obsidian vault.md": {
"size": 13712,
@@ -2537,7 +2537,7 @@
"00.05 Media/Gaming Wall Street.md": {
"size": 609,
"tags": 0,
- "links": 1
+ "links": 2
},
"00.03 News/The Science of How Alive You Really Are Alan Turing, Trees, and the Wonder of Life.md": {
"size": 10546,
@@ -3057,7 +3057,7 @@
"00.06 Professional/Lynceus Partners arrivée de Melchior de Villeneuve en tant que Responsable du Développement.md": {
"size": 2726,
"tags": 0,
- "links": 1
+ "links": 2
},
"00.03 News/Tech and War.md": {
"size": 25953,
@@ -3197,7 +3197,7 @@
"00.01 Admin/Calendars/2022-03-05.md": {
"size": 1092,
"tags": 0,
- "links": 4
+ "links": 6
},
"00.01 Admin/Calendars/2022-03-06.md": {
"size": 1020,
@@ -3310,9 +3310,9 @@
"links": 4
},
"00.01 Admin/Calendars/2022-02-28.md": {
- "size": 1028,
+ "size": 1256,
"tags": 0,
- "links": 4
+ "links": 7
},
"00.01 Admin/Calendars/delete.md": {
"size": 125,
@@ -3617,7 +3617,7 @@
"00.06 Professional/The Importance of Leading With Empathy (And How To Do It).md": {
"size": 10772,
"tags": 0,
- "links": 1
+ "links": 2
},
"00.01 Admin/Calendars/2022-04-14.md": {
"size": 1124,
@@ -4167,7 +4167,7 @@
"00.05 Media/The Mafia, The CIA and George Bush.md": {
"size": 319,
"tags": 0,
- "links": 1
+ "links": 2
},
"00.01 Admin/Calendars/2022-06-06.md": {
"size": 1016,
@@ -4297,7 +4297,7 @@
"03.02 Travels/@@Travels.md": {
"size": 1653,
"tags": 2,
- "links": 9
+ "links": 11
},
"03.02 Travels/@France.md": {
"size": 1177,
@@ -4695,9 +4695,9 @@
"links": 4
},
"00.01 Admin/Calendars/2022-08-06.md": {
- "size": 1108,
+ "size": 1234,
"tags": 0,
- "links": 5
+ "links": 6
},
"00.01 Admin/Calendars/2022-08-07.md": {
"size": 1108,
@@ -4792,7 +4792,7 @@
"00.01 Admin/Calendars/2022-08-13.md": {
"size": 1195,
"tags": 0,
- "links": 4
+ "links": 6
},
"00.01 Admin/Calendars/2022-08-14.md": {
"size": 1201,
@@ -5312,7 +5312,7 @@
"00.03 News/The century of climate migration why we need to plan for the great upheaval.md": {
"size": 25154,
"tags": 3,
- "links": 1
+ "links": 2
},
"00.03 News/Donald Trump and the Sweepstakes Scammers.md": {
"size": 13723,
@@ -5340,9 +5340,9 @@
"links": 2
},
"00.01 Admin/Calendars/2022-08-23.md": {
- "size": 1130,
+ "size": 1269,
"tags": 0,
- "links": 6
+ "links": 7
},
"03.03 Food & Wine/Pan-seared Seabream with vine leaf risotto.md": {
"size": 3352,
@@ -5358,32 +5358,72 @@
"size": 140,
"tags": 0,
"links": 1
+ },
+ "02.03 Zürich/Luca2.md": {
+ "size": 1310,
+ "tags": 0,
+ "links": 2
+ },
+ "00.01 Admin/Calendars/2022-08-24.md": {
+ "size": 1130,
+ "tags": 0,
+ "links": 7
+ },
+ "00.06 Professional/@Professional.md": {
+ "size": 1231,
+ "tags": 0,
+ "links": 1
+ },
+ "03.02 Travels/@Switzerland.md": {
+ "size": 1197,
+ "tags": 1,
+ "links": 1
+ },
+ "03.02 Travels/Geneva.md": {
+ "size": 1194,
+ "tags": 3,
+ "links": 1
+ },
+ "03.02 Travels/Skiing in Switzerland.md": {
+ "size": 1452,
+ "tags": 3,
+ "links": 1
+ },
+ "03.02 Travels/Mountain hikes in Switzerland.md": {
+ "size": 2448,
+ "tags": 3,
+ "links": 1
+ },
+ "00.01 Admin/Calendars/2022-08-25.md": {
+ "size": 1327,
+ "tags": 0,
+ "links": 9
}
},
"commitTypes": {
"/": {
- "Refactor": 709,
- "Create": 757,
- "Link": 1579,
- "Expand": 694
+ "Refactor": 724,
+ "Create": 769,
+ "Link": 1614,
+ "Expand": 708
}
},
"dailyCommits": {
"/": {
"0": 61,
- "1": 21,
+ "1": 22,
"2": 3,
"3": 9,
"4": 12,
"5": 6,
- "6": 31,
- "7": 227,
- "8": 380,
- "9": 337,
- "10": 227,
+ "6": 33,
+ "7": 243,
+ "8": 388,
+ "9": 366,
+ "10": 233,
"11": 192,
- "12": 148,
- "13": 261,
+ "12": 149,
+ "13": 263,
"14": 204,
"15": 219,
"16": 152,
@@ -5391,17 +5431,17 @@
"18": 362,
"19": 188,
"20": 138,
- "21": 100,
- "22": 240,
+ "21": 108,
+ "22": 243,
"23": 53
}
},
"weeklyCommits": {
"/": {
"Mon": 591,
- "Tue": 473,
- "Wed": 445,
- "Thu": 360,
+ "Tue": 483,
+ "Wed": 504,
+ "Thu": 367,
"Fri": 326,
"Sat": 0,
"Sun": 1544
@@ -5410,6 +5450,20 @@
"recentCommits": {
"/": {
"Expanded": [
+ " 2022-08-25 ",
+ " 2022-08-06 ",
+ " 2022-02-28 ",
+ " Mountain hikes in Switzerland ",
+ " Mountain hikes in Switzerland ",
+ " Skiing in Switzerland ",
+ " Mountain hikes in Switzerland ",
+ " Geneva ",
+ " Skiing in Switzerland ",
+ " Geneva ",
+ " @Switzerland ",
+ " @Professional ",
+ " 2022-08-23 ",
+ " Luca2 ",
" Template Place ",
" Arles ",
" Marseille ",
@@ -5446,23 +5500,21 @@
" Server Tools ",
" Romain Gary ",
" Template Wiki ",
- " Cinematheque ",
- " Template TVShow ",
- " Template Movie ",
- " Template TVShow ",
- " Template Movie ",
- " Cinematheque ",
- " Cinematheque ",
- " Cinematheque ",
- " Cinematheque ",
- " Household ",
- " 2022-03-18 ",
- " 2022-04-16 ",
- " 2022-03-16 ",
- " 2022-07-29 ",
- " Test sheet "
+ " Cinematheque "
],
"Created": [
+ " 2022-08-25 ",
+ " Untitled ",
+ " Untitled ",
+ " Untitled ",
+ " Untitled ",
+ " ReadItLater ",
+ " ReadItLater ",
+ " ReadItLater ",
+ " ReadItLater ",
+ " Untitled ",
+ " 2022-08-24 ",
+ " Untitled ",
" 2022-09-13 Diner Lorena ",
" 2023-02-11 Mariage Eloi ",
" Untitled ",
@@ -5501,21 +5553,17 @@
" Dexter (2006–2013) ",
" Line of Duty (2012–2021) ",
" House of Cards (2013–2018) ",
- " Mad Men (2007–2015) ",
- " The Simpsons (1989–) ",
- " Peaky Blinders (2013–2022) ",
- " Succession (2018–) ",
- " Narcos (2015–2017) ",
- " The Office (2005–2013) ",
- " Californication (2007–2014) ",
- " Spiral (2005–2020) ",
- " Engrenages (2014–) ",
- " The Big Bang Theory (2007–2019) ",
- " My Name Is Earl (2005–2009) ",
- " The Wire (2002–2008) ",
- " Breaking Bad (2008–2013) "
+ " Mad Men (2007–2015) "
],
"Renamed": [
+ " Mountain hikes in Switzerland ",
+ " Skiing in Switzerland ",
+ " Geneva ",
+ " @Switzerland ",
+ " @Switzerland ",
+ " @Professional ",
+ " @Professional ",
+ " Luca2 ",
" Pan-seared Seabream with vine leaf risotto ",
" The messages that survived civilisation's collapse ",
" Batman Forever (1995) ",
@@ -5558,17 +5606,14 @@
" While Britain burns, the Tories are … fiddling with themselves again Marina Hyde ",
" Sam Taggart’s Hard Sell ",
" The Most Surveilled Place in America ",
- " Seven years of sex abuse How Mormon officials let it happen ",
- " Moral Panics Come and Go. Sex Bracelet Hysteria Is Forever. ",
- " Librarian finds love notes, doodles in books and shares them with a grateful public ",
- " Remembering Bill Russell The Greatest Winner in Sports ",
- " Disaster at 18,200 feet ",
- " How PM’s former aide had to ‘nanny him’ through lockdown ",
- " How PM’s former aide had to ‘nanny him’ through lockdown ",
- " The Age of the Superyacht ",
- " Meet the Lobbyist Next Door "
+ " Seven years of sex abuse How Mormon officials let it happen "
],
"Tagged": [
+ " Mountain hikes in Switzerland ",
+ " Skiing in Switzerland ",
+ " Geneva ",
+ " Skiing in Switzerland ",
+ " @Switzerland ",
" Pan-seared Seabream with vine leaf risotto ",
" Pan-seared Seabream with vine leaf risotto ",
" The messages that survived civilisation's collapse ",
@@ -5614,12 +5659,7 @@
" True Grit (1969) ",
" Talk to Her (2002) ",
" Rio Bravo (1959) ",
- " Stagecoach (1939) ",
- " The Harder They Come (1972) ",
- " Natural Born Killers (1994) ",
- " Once Upon a Time in the West (1968) ",
- " Red River (1948) ",
- " For a Few Dollars More (1965) "
+ " Stagecoach (1939) "
],
"Refactored": [
" @Main Dashboard ",
@@ -5671,9 +5711,14 @@
" Template Movie ",
" Equity Tasks ",
" Crypto Tasks ",
- " VC Tasks "
+ " VC Tasks ",
+ " Household "
],
"Deleted": [
+ " ReadItLater ",
+ " ReadItLater ",
+ " ReadItLater ",
+ " ReadItLater ",
" Romain Gary ",
" Engrenages (2014–) ",
" Che bella è la vita (1997) ",
@@ -5720,13 +5765,39 @@
" How to Install and Configure Prometheus Alert Manager on Ubuntu 20.04 LTS ",
" How to Install Prometheus on Ubuntu 20.04 ",
" 2022-06-30 Test task ",
- " InstallEnable Secure NGINX with Custom Fail2ban Filters - LinuxCapable ",
- " How To Protect an Apache Server with Fail2Ban on Ubuntu 20.04 ",
- " 2022-03-14 Test event ",
- " JPEG ",
- " JPEG "
+ " InstallEnable Secure NGINX with Custom Fail2ban Filters - LinuxCapable "
],
"Linked": [
+ " 2022-08-25 ",
+ " 2022-08-25 ",
+ " 2022-08-25 ",
+ " 2022-08-25 ",
+ " 2022-08-24 ",
+ " 2022-08-24 ",
+ " 2022-08-13 ",
+ " 2022-03-05 ",
+ " 2022-08-06 ",
+ " 2022-02-28 ",
+ " Mountain hikes in Switzerland ",
+ " Skiing in Switzerland ",
+ " Geneva ",
+ " @@Travels ",
+ " @@Travels ",
+ " @Switzerland ",
+ " The century of climate migration why we need to plan for the great upheaval ",
+ " Gaming Wall Street ",
+ " The Mafia, The CIA and George Bush ",
+ " The Company-Building Cornerstones Every Founder Needs to Focus On — Advice from HubSpot ",
+ " The Importance of Leading With Empathy (And How To Do It) ",
+ " Sameer Huda - gunnercooke llp ",
+ " Lynceus Partners arrivée de Melchior de Villeneuve en tant que Responsable du Développement ",
+ " @Professional ",
+ " 2022-08-24 ",
+ " 2022-08-23 ",
+ " Luca2 ",
+ " En Bretagne, les responsables politiques redoutent l’émergence d’une « Breizh Riviera » ",
+ " Désert rural. La grande ruée vers les maisons italiennes à 1 euro ",
+ " Quand tu arrives ici, tu te dis que rien n’est cher les Parisiens s’entichent de Marseille ",
" 2022-08-23 ",
" 2023-02-11 Mariage Eloi ",
" 2022-09-13 Diner Lorena ",
@@ -5747,37 +5818,7 @@
" The messages that survived civilisation's collapse ",
" 2022-08-22 ",
" Batman Forever (1995) ",
- " “Game of Thrones” v “Lord of the Rings” a tale of old v new Hollywood ",
- " Donald Trump and the Sweepstakes Scammers ",
- " 2022-08-22 ",
- " Welcome to Philip K. Dick’s dystopia ",
- " A Dad Took Photos of His Naked Toddler for the Doctor. Google Flagged Him as a Criminal. ",
- " 2022-08-20 ",
- " 2022-08-21 ",
- " “Game of Thrones” v “Lord of the Rings” a tale of old v new Hollywood ",
- " The century of climate migration why we need to plan for the great upheaval ",
- " Donald Trump and the Sweepstakes Scammers ",
- " A Dad Took Photos of His Naked Toddler for the Doctor. Google Flagged Him as a Criminal. ",
- " “Republicans Buy Sneakers Too” ",
- " U.S. Ship Sunk by Germans in 1917 Is Found Off English Coast ",
- " The architect who became the king of bank robberies ",
- " 2022-08-21 ",
- " 2022-08-21 ",
- " Derborence ",
- " 2022-08-20 ",
- " La promesse de l'aube ",
- " “Republicans Buy Sneakers Too” ",
- " U.S. Ship Sunk by Germans in 1917 Is Found Off English Coast ",
- " Welcome to Philip K. Dick’s dystopia ",
- " The architect who became the king of bank robberies ",
- " Polo Park Zürich ",
- " Polo Park Zürich ",
- " Rosi ",
- " Le Mezzerie ",
- " 2022-08-20 ",
- " 2022-08-19 ",
- " Django (1966) ",
- " Bebek "
+ " “Game of Thrones” v “Lord of the Rings” a tale of old v new Hollywood "
],
"Removed Tags from": [
" Le Miel de Paris ",
@@ -5807,7 +5848,9 @@
" 2022-03-18 ",
" 2022-03-13 ",
" VPS Console Dialogue ",
- " Storage and Syncing "
+ " Storage and Syncing ",
+ " Les 17 erreurs de management à ne pas commettre ",
+ " Obsidian website publish - comments "
]
}
},
diff --git a/.obsidian/plugins/obsidian-pocket/data.json b/.obsidian/plugins/obsidian-pocket/data.json
deleted file mode 100644
index b56e81da..00000000
--- a/.obsidian/plugins/obsidian-pocket/data.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "item-note-template": "00.01 Admin/Templates/Template Pocket Source",
- "item-notes-folder": "00.02 Inbox",
- "multi-word-tag-converter": "camel-case"
-}
\ No newline at end of file
diff --git a/.obsidian/plugins/obsidian-pocket/main.js b/.obsidian/plugins/obsidian-pocket/main.js
deleted file mode 100644
index 2379fef8..00000000
--- a/.obsidian/plugins/obsidian-pocket/main.js
+++ /dev/null
@@ -1,33050 +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');
-
-(function() {
- const env = {"BUILD":"prod"};
- try {
- if (process) {
- process.env = Object.assign({}, process.env);
- Object.assign(process.env, env);
- return;
- }
- } catch (e) {} // avoid ReferenceError: process is not defined
- globalThis.process = { env:env };
-})();
-
-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 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;
-}
-
-var loglevel = createCommonjsModule(function (module) {
-(function (root, definition) {
- if (module.exports) {
- module.exports = definition();
- } else {
- root.log = definition();
- }
-}(commonjsGlobal, function () {
-
- // Slightly dubious tricks to cut down minimized file size
- var noop = function() {};
- var undefinedType = "undefined";
- var isIE = (typeof window !== undefinedType) && (typeof window.navigator !== undefinedType) && (
- /Trident\/|MSIE /.test(window.navigator.userAgent)
- );
-
- var logMethods = [
- "trace",
- "debug",
- "info",
- "warn",
- "error"
- ];
-
- // Cross-browser bind equivalent that works at least back to IE6
- function bindMethod(obj, methodName) {
- var method = obj[methodName];
- if (typeof method.bind === 'function') {
- return method.bind(obj);
- } else {
- try {
- return Function.prototype.bind.call(method, obj);
- } catch (e) {
- // Missing bind shim or IE8 + Modernizr, fallback to wrapping
- return function() {
- return Function.prototype.apply.apply(method, [obj, arguments]);
- };
- }
- }
- }
-
- // Trace() doesn't print the message in IE, so for that case we need to wrap it
- function traceForIE() {
- if (console.log) {
- if (console.log.apply) {
- console.log.apply(console, arguments);
- } else {
- // In old IE, native console methods themselves don't have apply().
- Function.prototype.apply.apply(console.log, [console, arguments]);
- }
- }
- if (console.trace) console.trace();
- }
-
- // Build the best logging method possible for this env
- // Wherever possible we want to bind, not wrap, to preserve stack traces
- function realMethod(methodName) {
- if (methodName === 'debug') {
- methodName = 'log';
- }
-
- if (typeof console === undefinedType) {
- return false; // No method possible, for now - fixed later by enableLoggingWhenConsoleArrives
- } else if (methodName === 'trace' && isIE) {
- return traceForIE;
- } else if (console[methodName] !== undefined) {
- return bindMethod(console, methodName);
- } else if (console.log !== undefined) {
- return bindMethod(console, 'log');
- } else {
- return noop;
- }
- }
-
- // These private functions always need `this` to be set properly
-
- function replaceLoggingMethods(level, loggerName) {
- /*jshint validthis:true */
- for (var i = 0; i < logMethods.length; i++) {
- var methodName = logMethods[i];
- this[methodName] = (i < level) ?
- noop :
- this.methodFactory(methodName, level, loggerName);
- }
-
- // Define log.log as an alias for log.debug
- this.log = this.debug;
- }
-
- // In old IE versions, the console isn't present until you first open it.
- // We build realMethod() replacements here that regenerate logging methods
- function enableLoggingWhenConsoleArrives(methodName, level, loggerName) {
- return function () {
- if (typeof console !== undefinedType) {
- replaceLoggingMethods.call(this, level, loggerName);
- this[methodName].apply(this, arguments);
- }
- };
- }
-
- // By default, we use closely bound real methods wherever possible, and
- // otherwise we wait for a console to appear, and then try again.
- function defaultMethodFactory(methodName, level, loggerName) {
- /*jshint validthis:true */
- return realMethod(methodName) ||
- enableLoggingWhenConsoleArrives.apply(this, arguments);
- }
-
- function Logger(name, defaultLevel, factory) {
- var self = this;
- var currentLevel;
-
- var storageKey = "loglevel";
- if (typeof name === "string") {
- storageKey += ":" + name;
- } else if (typeof name === "symbol") {
- storageKey = undefined;
- }
-
- function persistLevelIfPossible(levelNum) {
- var levelName = (logMethods[levelNum] || 'silent').toUpperCase();
-
- if (typeof window === undefinedType || !storageKey) return;
-
- // Use localStorage if available
- try {
- window.localStorage[storageKey] = levelName;
- return;
- } catch (ignore) {}
-
- // Use session cookie as fallback
- try {
- window.document.cookie =
- encodeURIComponent(storageKey) + "=" + levelName + ";";
- } catch (ignore) {}
- }
-
- function getPersistedLevel() {
- var storedLevel;
-
- if (typeof window === undefinedType || !storageKey) return;
-
- try {
- storedLevel = window.localStorage[storageKey];
- } catch (ignore) {}
-
- // Fallback to cookies if local storage gives us nothing
- if (typeof storedLevel === undefinedType) {
- try {
- var cookie = window.document.cookie;
- var location = cookie.indexOf(
- encodeURIComponent(storageKey) + "=");
- if (location !== -1) {
- storedLevel = /^([^;]+)/.exec(cookie.slice(location))[1];
- }
- } catch (ignore) {}
- }
-
- // If the stored level is not valid, treat it as if nothing was stored.
- if (self.levels[storedLevel] === undefined) {
- storedLevel = undefined;
- }
-
- return storedLevel;
- }
-
- /*
- *
- * Public logger API - see https://github.com/pimterry/loglevel for details
- *
- */
-
- self.name = name;
-
- self.levels = { "TRACE": 0, "DEBUG": 1, "INFO": 2, "WARN": 3,
- "ERROR": 4, "SILENT": 5};
-
- self.methodFactory = factory || defaultMethodFactory;
-
- self.getLevel = function () {
- return currentLevel;
- };
-
- self.setLevel = function (level, persist) {
- if (typeof level === "string" && self.levels[level.toUpperCase()] !== undefined) {
- level = self.levels[level.toUpperCase()];
- }
- if (typeof level === "number" && level >= 0 && level <= self.levels.SILENT) {
- currentLevel = level;
- if (persist !== false) { // defaults to true
- persistLevelIfPossible(level);
- }
- replaceLoggingMethods.call(self, level, name);
- if (typeof console === undefinedType && level < self.levels.SILENT) {
- return "No console available for logging";
- }
- } else {
- throw "log.setLevel() called with invalid level: " + level;
- }
- };
-
- self.setDefaultLevel = function (level) {
- if (!getPersistedLevel()) {
- self.setLevel(level, false);
- }
- };
-
- self.enableAll = function(persist) {
- self.setLevel(self.levels.TRACE, persist);
- };
-
- self.disableAll = function(persist) {
- self.setLevel(self.levels.SILENT, persist);
- };
-
- // Initialize with the right level
- var initialLevel = getPersistedLevel();
- if (initialLevel == null) {
- initialLevel = defaultLevel == null ? "WARN" : defaultLevel;
- }
- self.setLevel(initialLevel, false);
- }
-
- /*
- *
- * Top-level API
- *
- */
-
- var defaultLogger = new Logger();
-
- var _loggersByName = {};
- defaultLogger.getLogger = function getLogger(name) {
- if ((typeof name !== "symbol" && typeof name !== "string") || name === "") {
- throw new TypeError("You must supply a name when creating a logger.");
- }
-
- var logger = _loggersByName[name];
- if (!logger) {
- logger = _loggersByName[name] = new Logger(
- name, defaultLogger.getLevel(), defaultLogger.methodFactory);
- }
- return logger;
- };
-
- // Grab the current global log variable in case of overwrite
- var _log = (typeof window !== undefinedType) ? window.log : undefined;
- defaultLogger.noConflict = function() {
- if (typeof window !== undefinedType &&
- window.log === defaultLogger) {
- window.log = _log;
- }
-
- return defaultLogger;
- };
-
- defaultLogger.getLoggers = function getLoggers() {
- return _loggersByName;
- };
-
- // ES6 default export, for compatibility
- defaultLogger['default'] = defaultLogger;
-
- return defaultLogger;
-}));
-});
-
-/* eslint-disable no-unused-vars */
-var getOwnPropertySymbols = Object.getOwnPropertySymbols;
-var hasOwnProperty = 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.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;
-};
-
-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;
-}
-});
-
-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;
-}
-});
-
-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="";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