1
0
mirror of https://github.com/upscayl/upscayl.git synced 2024-12-12 15:51:06 +01:00
upscayl/renderer/.next/static/chunks/main.js
2022-08-02 23:51:58 +05:30

1188 lines
4.3 MiB
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
* ATTENTION: An "eval-source-map" devtool has been used.
* This devtool is neither made for production nor for readable output files.
* It uses "eval()" calls to create a separate source file with attached SourceMaps in the browser devtools.
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
* or disable the default devtool with "devtool: false".
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
*/
(self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([["main"],{
/***/ "../node_modules/@swc/helpers/lib/_array_like_to_array.js":
/*!****************************************************************!*\
!*** ../node_modules/@swc/helpers/lib/_array_like_to_array.js ***!
\****************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _arrayLikeToArray;\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];\n return arr2;\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL0Bzd2MvaGVscGVycy9saWIvX2FycmF5X2xpa2VfdG9fYXJyYXkuanMuanMiLCJtYXBwaW5ncyI6IkFBQWE7QUFDYiw4Q0FBNkM7QUFDN0M7QUFDQSxDQUFDLEVBQUM7QUFDRixrQkFBZTtBQUNmO0FBQ0E7QUFDQSwwQ0FBMEMsU0FBUztBQUNuRDtBQUNBIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vX05fRS8uLi9ub2RlX21vZHVsZXMvQHN3Yy9oZWxwZXJzL2xpYi9fYXJyYXlfbGlrZV90b19hcnJheS5qcz84ZTBmIl0sInNvdXJjZXNDb250ZW50IjpbIlwidXNlIHN0cmljdFwiO1xuT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsIFwiX19lc01vZHVsZVwiLCB7XG4gICAgdmFsdWU6IHRydWVcbn0pO1xuZXhwb3J0cy5kZWZhdWx0ID0gX2FycmF5TGlrZVRvQXJyYXk7XG5mdW5jdGlvbiBfYXJyYXlMaWtlVG9BcnJheShhcnIsIGxlbikge1xuICAgIGlmIChsZW4gPT0gbnVsbCB8fCBsZW4gPiBhcnIubGVuZ3RoKSBsZW4gPSBhcnIubGVuZ3RoO1xuICAgIGZvcih2YXIgaSA9IDAsIGFycjIgPSBuZXcgQXJyYXkobGVuKTsgaSA8IGxlbjsgaSsrKWFycjJbaV0gPSBhcnJbaV07XG4gICAgcmV0dXJuIGFycjI7XG59XG4iXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///../node_modules/@swc/helpers/lib/_array_like_to_array.js\n"));
/***/ }),
/***/ "../node_modules/@swc/helpers/lib/_array_with_holes.js":
/*!*************************************************************!*\
!*** ../node_modules/@swc/helpers/lib/_array_with_holes.js ***!
\*************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _arrayWithHoles;\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL0Bzd2MvaGVscGVycy9saWIvX2FycmF5X3dpdGhfaG9sZXMuanMuanMiLCJtYXBwaW5ncyI6IkFBQWE7QUFDYiw4Q0FBNkM7QUFDN0M7QUFDQSxDQUFDLEVBQUM7QUFDRixrQkFBZTtBQUNmO0FBQ0E7QUFDQSIsInNvdXJjZXMiOlsid2VicGFjazovL19OX0UvLi4vbm9kZV9tb2R1bGVzL0Bzd2MvaGVscGVycy9saWIvX2FycmF5X3dpdGhfaG9sZXMuanM/ZGRiYiJdLCJzb3VyY2VzQ29udGVudCI6WyJcInVzZSBzdHJpY3RcIjtcbk9iamVjdC5kZWZpbmVQcm9wZXJ0eShleHBvcnRzLCBcIl9fZXNNb2R1bGVcIiwge1xuICAgIHZhbHVlOiB0cnVlXG59KTtcbmV4cG9ydHMuZGVmYXVsdCA9IF9hcnJheVdpdGhIb2xlcztcbmZ1bmN0aW9uIF9hcnJheVdpdGhIb2xlcyhhcnIpIHtcbiAgICBpZiAoQXJyYXkuaXNBcnJheShhcnIpKSByZXR1cm4gYXJyO1xufVxuIl0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///../node_modules/@swc/helpers/lib/_array_with_holes.js\n"));
/***/ }),
/***/ "../node_modules/@swc/helpers/lib/_array_without_holes.js":
/*!****************************************************************!*\
!*** ../node_modules/@swc/helpers/lib/_array_without_holes.js ***!
\****************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _arrayWithoutHoles;\nvar _arrayLikeToArrayMjs = _interopRequireDefault(__webpack_require__(/*! ./_array_like_to_array.js */ \"../node_modules/@swc/helpers/lib/_array_like_to_array.js\"));\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return (0, _arrayLikeToArrayMjs).default(arr);\n}\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\n//# sourceURL=[module]\n//# sourceMappingURL=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cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///../node_modules/@swc/helpers/lib/_array_without_holes.js\n"));
/***/ }),
/***/ "../node_modules/@swc/helpers/lib/_assert_this_initialized.js":
/*!********************************************************************!*\
!*** ../node_modules/@swc/helpers/lib/_assert_this_initialized.js ***!
\********************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _assertThisInitialized;\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n return self;\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL0Bzd2MvaGVscGVycy9saWIvX2Fzc2VydF90aGlzX2luaXRpYWxpemVkLmpzLmpzIiwibWFwcGluZ3MiOiJBQUFhO0FBQ2IsOENBQTZDO0FBQzdDO0FBQ0EsQ0FBQyxFQUFDO0FBQ0Ysa0JBQWU7QUFDZjtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9fTl9FLy4uL25vZGVfbW9kdWxlcy9Ac3djL2hlbHBlcnMvbGliL19hc3NlcnRfdGhpc19pbml0aWFsaXplZC5qcz8xNGM0Il0sInNvdXJjZXNDb250ZW50IjpbIlwidXNlIHN0cmljdFwiO1xuT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsIFwiX19lc01vZHVsZVwiLCB7XG4gICAgdmFsdWU6IHRydWVcbn0pO1xuZXhwb3J0cy5kZWZhdWx0ID0gX2Fzc2VydFRoaXNJbml0aWFsaXplZDtcbmZ1bmN0aW9uIF9hc3NlcnRUaGlzSW5pdGlhbGl6ZWQoc2VsZikge1xuICAgIGlmIChzZWxmID09PSB2b2lkIDApIHtcbiAgICAgICAgdGhyb3cgbmV3IFJlZmVyZW5jZUVycm9yKFwidGhpcyBoYXNuJ3QgYmVlbiBpbml0aWFsaXNlZCAtIHN1cGVyKCkgaGFzbid0IGJlZW4gY2FsbGVkXCIpO1xuICAgIH1cbiAgICByZXR1cm4gc2VsZjtcbn1cbiJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///../node_modules/@swc/helpers/lib/_assert_this_initialized.js\n"));
/***/ }),
/***/ "../node_modules/@swc/helpers/lib/_class_call_check.js":
/*!*************************************************************!*\
!*** ../node_modules/@swc/helpers/lib/_class_call_check.js ***!
\*************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _classCallCheck;\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL0Bzd2MvaGVscGVycy9saWIvX2NsYXNzX2NhbGxfY2hlY2suanMuanMiLCJtYXBwaW5ncyI6IkFBQWE7QUFDYiw4Q0FBNkM7QUFDN0M7QUFDQSxDQUFDLEVBQUM7QUFDRixrQkFBZTtBQUNmO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9fTl9FLy4uL25vZGVfbW9kdWxlcy9Ac3djL2hlbHBlcnMvbGliL19jbGFzc19jYWxsX2NoZWNrLmpzPzhmZDIiXSwic291cmNlc0NvbnRlbnQiOlsiXCJ1c2Ugc3RyaWN0XCI7XG5PYmplY3QuZGVmaW5lUHJvcGVydHkoZXhwb3J0cywgXCJfX2VzTW9kdWxlXCIsIHtcbiAgICB2YWx1ZTogdHJ1ZVxufSk7XG5leHBvcnRzLmRlZmF1bHQgPSBfY2xhc3NDYWxsQ2hlY2s7XG5mdW5jdGlvbiBfY2xhc3NDYWxsQ2hlY2soaW5zdGFuY2UsIENvbnN0cnVjdG9yKSB7XG4gICAgaWYgKCEoaW5zdGFuY2UgaW5zdGFuY2VvZiBDb25zdHJ1Y3RvcikpIHtcbiAgICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcihcIkNhbm5vdCBjYWxsIGEgY2xhc3MgYXMgYSBmdW5jdGlvblwiKTtcbiAgICB9XG59XG4iXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///../node_modules/@swc/helpers/lib/_class_call_check.js\n"));
/***/ }),
/***/ "../node_modules/@swc/helpers/lib/_construct.js":
/*!******************************************************!*\
!*** ../node_modules/@swc/helpers/lib/_construct.js ***!
\******************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _construct;\nvar _setPrototypeOfMjs = _interopRequireDefault(__webpack_require__(/*! ./_set_prototype_of.js */ \"../node_modules/@swc/helpers/lib/_set_prototype_of.js\"));\nfunction _construct(Parent, args, Class) {\n return construct.apply(null, arguments);\n}\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\nfunction isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function() {}));\n return true;\n } catch (e) {\n return false;\n }\n}\nfunction construct(Parent1, args1, Class1) {\n if (isNativeReflectConstruct()) {\n construct = Reflect.construct;\n } else {\n construct = function construct(Parent, args, Class) {\n var a = [\n null\n ];\n a.push.apply(a, args);\n var Constructor = Function.bind.apply(Parent, a);\n var instance = new Constructor();\n if (Class) (0, _setPrototypeOfMjs).default(instance, Class.prototype);\n return instance;\n };\n }\n return construct.apply(null, arguments);\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL0Bzd2MvaGVscGVycy9saWIvX2NvbnN0cnVjdC5qcy5qcyIsIm1hcHBpbmdzIjoiQUFBYTtBQUNiLDhDQUE2QztBQUM3QztBQUNBLENBQUMsRUFBQztBQUNGLGtCQUFlO0FBQ2YsZ0RBQWdELG1CQUFPLENBQUMscUZBQXdCO0FBQ2hGO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsOEVBQThFO0FBQzlFO0FBQ0EsTUFBTTtBQUNOO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLE1BQU07QUFDTjtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZXMiOlsid2VicGFjazovL19OX0UvLi4vbm9kZV9tb2R1bGVzL0Bzd2MvaGVscGVycy9saWIvX2NvbnN0cnVjdC5qcz81MDBmIl0sInNvdXJjZXNDb250ZW50IjpbIlwidXNlIHN0cmljdFwiO1xuT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsIFwiX19lc01vZHVsZVwiLCB7XG4gICAgdmFsdWU6IHRydWVcbn0pO1xuZXhwb3J0cy5kZWZhdWx0ID0gX2NvbnN0cnVjdDtcbnZhciBfc2V0UHJvdG90eXBlT2ZNanMgPSBfaW50ZXJvcFJlcXVpcmVEZWZhdWx0KHJlcXVpcmUoXCIuL19zZXRfcHJvdG90eXBlX29mLmpzXCIpKTtcbmZ1bmN0aW9uIF9jb25zdHJ1Y3QoUGFyZW50LCBhcmdzLCBDbGFzcykge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LnB1c2guYXBwbHkoYSwgYXJncyk7XG4gICAgICAgICAgICB2YXIgQ29uc3RydWN0b3IgPSBGdW5jdGlvbi5iaW5kLmFwcGx5KFBhcmVudCwgYSk7XG4gICAgICAgICAgICB2YXIgaW5zdGFuY2UgPSBuZXcgQ29uc3RydWN0b3IoKTtcbiAgICAgICAgICAgIGlmIChDbGFzcykgKDAsIF9zZXRQcm90b3R5cGVPZk1qcykuZGVmYXVsdChpbnN0YW5jZSwgQ2xhc3MucHJvdG90eXBlKTtcbiAgICAgICAgICAgIHJldHVybiBpbnN0YW5jZTtcbiAgICAgICAgfTtcbiAgICB9XG4gICAgcmV0dXJuIGNvbnN0cnVjdC5hcHBseShudWxsLCBhcmd1bWVudHMpO1xufVxuIl0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///../node_modules/@swc/helpers/lib/_construct.js\n"));
/***/ }),
/***/ "../node_modules/@swc/helpers/lib/_create_class.js":
/*!*********************************************************!*\
!*** ../node_modules/@swc/helpers/lib/_create_class.js ***!
\*********************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _createClass;\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\nfunction _defineProperties(target, props) {\n for(var i = 0; i < props.length; i++){\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL0Bzd2MvaGVscGVycy9saWIvX2NyZWF0ZV9jbGFzcy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ICAgICBkZXNjcmlwdG9yLmNvbmZpZ3VyYWJsZSA9IHRydWU7XG4gICAgICAgIGlmIChcInZhbHVlXCIgaW4gZGVzY3JpcHRvcikgZGVzY3JpcHRvci53cml0YWJsZSA9IHRydWU7XG4gICAgICAgIE9iamVjdC5kZWZpbmVQcm9wZXJ0eSh0YXJnZXQsIGRlc2NyaXB0b3Iua2V5LCBkZXNjcmlwdG9yKTtcbiAgICB9XG59XG4iXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///../node_modules/@swc/helpers/lib/_create_class.js\n"));
/***/ }),
/***/ "../node_modules/@swc/helpers/lib/_create_super.js":
/*!*********************************************************!*\
!*** ../node_modules/@swc/helpers/lib/_create_super.js ***!
\*********************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _createSuper;\nvar _isNativeReflectConstructMjs = _interopRequireDefault(__webpack_require__(/*! ./_is_native_reflect_construct.js */ \"../node_modules/@swc/helpers/lib/_is_native_reflect_construct.js\"));\nvar _getPrototypeOfMjs = _interopRequireDefault(__webpack_require__(/*! ./_get_prototype_of.js */ \"../node_modules/@swc/helpers/lib/_get_prototype_of.js\"));\nvar _possibleConstructorReturnMjs = _interopRequireDefault(__webpack_require__(/*! ./_possible_constructor_return.js */ \"../node_modules/@swc/helpers/lib/_possible_constructor_return.js\"));\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = (0, _isNativeReflectConstructMjs).default();\n return function _createSuperInternal() {\n var Super = (0, _getPrototypeOfMjs).default(Derived), result;\n if (hasNativeReflectConstruct) {\n var NewTarget = (0, _getPrototypeOfMjs).default(this).constructor;\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n return (0, _possibleConstructorReturnMjs).default(this, result);\n };\n}\nfunction _interopRequireDefault(obj) {\n return obj && obj.__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xuICAgIH07XG59XG4iXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///../node_modules/@swc/helpers/lib/_create_super.js\n"));
/***/ }),
/***/ "../node_modules/@swc/helpers/lib/_get_prototype_of.js":
/*!*************************************************************!*\
!*** ../node_modules/@swc/helpers/lib/_get_prototype_of.js ***!
\*************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _getPrototypeOf;\nfunction _getPrototypeOf(o) {\n return getPrototypeOf(o);\n}\nfunction getPrototypeOf(o1) {\n getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return getPrototypeOf(o1);\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL0Bzd2MvaGVscGVycy9saWIvX2dldF9wcm90b3R5cGVfb2YuanMuanMiLCJtYXBwaW5ncyI6IkFBQWE7QUFDYiw4Q0FBNkM7QUFDN0M7QUFDQSxDQUFDLEVBQUM7QUFDRixrQkFBZTtBQUNmO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZXMiOlsid2VicGFjazovL19OX0UvLi4vbm9kZV9tb2R1bGVzL0Bzd2MvaGVscGVycy9saWIvX2dldF9wcm90b3R5cGVfb2YuanM/MTZiMiJdLCJzb3VyY2VzQ29udGVudCI6WyJcInVzZSBzdHJpY3RcIjtcbk9iamVjdC5kZWZpbmVQcm9wZXJ0eShleHBvcnRzLCBcIl9fZXNNb2R1bGVcIiwge1xuICAgIHZhbHVlOiB0cnVlXG59KTtcbmV4cG9ydHMuZGVmYXVsdCA9IF9nZXRQcm90b3R5cGVPZjtcbmZ1bmN0aW9uIF9nZXRQcm90b3R5cGVPZihvKSB7XG4gICAgcmV0dXJuIGdldFByb3RvdHlwZU9mKG8pO1xufVxuZnVuY3Rpb24gZ2V0UHJvdG90eXBlT2YobzEpIHtcbiAgICBnZXRQcm90b3R5cGVPZiA9IE9iamVjdC5zZXRQcm90b3R5cGVPZiA/IE9iamVjdC5nZXRQcm90b3R5cGVPZiA6IGZ1bmN0aW9uIGdldFByb3RvdHlwZU9mKG8pIHtcbiAgICAgICAgcmV0dXJuIG8uX19wcm90b19fIHx8IE9iamVjdC5nZXRQcm90b3R5cGVPZihvKTtcbiAgICB9O1xuICAgIHJldHVybiBnZXRQcm90b3R5cGVPZihvMSk7XG59XG4iXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///../node_modules/@swc/helpers/lib/_get_prototype_of.js\n"));
/***/ }),
/***/ "../node_modules/@swc/helpers/lib/_inherits.js":
/*!*****************************************************!*\
!*** ../node_modules/@swc/helpers/lib/_inherits.js ***!
\*****************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _inherits;\nvar _setPrototypeOfMjs = _interopRequireDefault(__webpack_require__(/*! ./_set_prototype_of.js */ \"../node_modules/@swc/helpers/lib/_set_prototype_of.js\"));\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) (0, _setPrototypeOfMjs).default(subClass, superClass);\n}\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoi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bGFzcyAmJiBzdXBlckNsYXNzLnByb3RvdHlwZSwge1xuICAgICAgICBjb25zdHJ1Y3Rvcjoge1xuICAgICAgICAgICAgdmFsdWU6IHN1YkNsYXNzLFxuICAgICAgICAgICAgd3JpdGFibGU6IHRydWUsXG4gICAgICAgICAgICBjb25maWd1cmFibGU6IHRydWVcbiAgICAgICAgfVxuICAgIH0pO1xuICAgIGlmIChzdXBlckNsYXNzKSAoMCwgX3NldFByb3RvdHlwZU9mTWpzKS5kZWZhdWx0KHN1YkNsYXNzLCBzdXBlckNsYXNzKTtcbn1cbmZ1bmN0aW9uIF9pbnRlcm9wUmVxdWlyZURlZmF1bHQob2JqKSB7XG4gICAgcmV0dXJuIG9iaiAmJiBvYmouX19lc01vZHVsZSA/IG9iaiA6IHtcbiAgICAgICAgZGVmYXVsdDogb2JqXG4gICAgfTtcbn1cbiJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///../node_modules/@swc/helpers/lib/_inherits.js\n"));
/***/ }),
/***/ "../node_modules/@swc/helpers/lib/_instanceof.js":
/*!*******************************************************!*\
!*** ../node_modules/@swc/helpers/lib/_instanceof.js ***!
\*******************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _instanceof;\nfunction _instanceof(left, right) {\n if (right != null && typeof Symbol !== \"undefined\" && right[Symbol.hasInstance]) {\n return !!right[Symbol.hasInstance](left);\n } else {\n return left instanceof right;\n }\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL0Bzd2MvaGVscGVycy9saWIvX2luc3RhbmNlb2YuanMuanMiLCJtYXBwaW5ncyI6IkFBQWE7QUFDYiw4Q0FBNkM7QUFDN0M7QUFDQSxDQUFDLEVBQUM7QUFDRixrQkFBZTtBQUNmO0FBQ0E7QUFDQTtBQUNBLE1BQU07QUFDTjtBQUNBO0FBQ0EiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9fTl9FLy4uL25vZGVfbW9kdWxlcy9Ac3djL2hlbHBlcnMvbGliL19pbnN0YW5jZW9mLmpzPzA4YTUiXSwic291cmNlc0NvbnRlbnQiOlsiXCJ1c2Ugc3RyaWN0XCI7XG5PYmplY3QuZGVmaW5lUHJvcGVydHkoZXhwb3J0cywgXCJfX2VzTW9kdWxlXCIsIHtcbiAgICB2YWx1ZTogdHJ1ZVxufSk7XG5leHBvcnRzLmRlZmF1bHQgPSBfaW5zdGFuY2VvZjtcbmZ1bmN0aW9uIF9pbnN0YW5jZW9mKGxlZnQsIHJpZ2h0KSB7XG4gICAgaWYgKHJpZ2h0ICE9IG51bGwgJiYgdHlwZW9mIFN5bWJvbCAhPT0gXCJ1bmRlZmluZWRcIiAmJiByaWdodFtTeW1ib2wuaGFzSW5zdGFuY2VdKSB7XG4gICAgICAgIHJldHVybiAhIXJpZ2h0W1N5bWJvbC5oYXNJbnN0YW5jZV0obGVmdCk7XG4gICAgfSBlbHNlIHtcbiAgICAgICAgcmV0dXJuIGxlZnQgaW5zdGFuY2VvZiByaWdodDtcbiAgICB9XG59XG4iXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///../node_modules/@swc/helpers/lib/_instanceof.js\n"));
/***/ }),
/***/ "../node_modules/@swc/helpers/lib/_interop_require_default.js":
/*!********************************************************************!*\
!*** ../node_modules/@swc/helpers/lib/_interop_require_default.js ***!
\********************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _interopRequireDefault;\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL0Bzd2MvaGVscGVycy9saWIvX2ludGVyb3BfcmVxdWlyZV9kZWZhdWx0LmpzLmpzIiwibWFwcGluZ3MiOiJBQUFhO0FBQ2IsOENBQTZDO0FBQzdDO0FBQ0EsQ0FBQyxFQUFDO0FBQ0Ysa0JBQWU7QUFDZjtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vX05fRS8uLi9ub2RlX21vZHVsZXMvQHN3Yy9oZWxwZXJzL2xpYi9faW50ZXJvcF9yZXF1aXJlX2RlZmF1bHQuanM/MzIyYyJdLCJzb3VyY2VzQ29udGVudCI6WyJcInVzZSBzdHJpY3RcIjtcbk9iamVjdC5kZWZpbmVQcm9wZXJ0eShleHBvcnRzLCBcIl9fZXNNb2R1bGVcIiwge1xuICAgIHZhbHVlOiB0cnVlXG59KTtcbmV4cG9ydHMuZGVmYXVsdCA9IF9pbnRlcm9wUmVxdWlyZURlZmF1bHQ7XG5mdW5jdGlvbiBfaW50ZXJvcFJlcXVpcmVEZWZhdWx0KG9iaikge1xuICAgIHJldHVybiBvYmogJiYgb2JqLl9fZXNNb2R1bGUgPyBvYmogOiB7XG4gICAgICAgIGRlZmF1bHQ6IG9ialxuICAgIH07XG59XG4iXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///../node_modules/@swc/helpers/lib/_interop_require_default.js\n"));
/***/ }),
/***/ "../node_modules/@swc/helpers/lib/_interop_require_wildcard.js":
/*!*********************************************************************!*\
!*** ../node_modules/@swc/helpers/lib/_interop_require_wildcard.js ***!
\*********************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _interopRequireWildcard;\nfunction _interopRequireWildcard(obj) {\n if (obj && obj.__esModule) {\n return obj;\n }\n if (obj === null || typeof obj !== \"object\" && typeof obj !== \"function\") {\n return {\n default: obj\n };\n }\n var cache = _getRequireWildcardCache();\n if (cache && cache.has(obj)) {\n return cache.get(obj);\n }\n var newObj = {};\n var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;\n for(var key in obj){\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;\n if (desc && (desc.get || desc.set)) {\n Object.defineProperty(newObj, key, desc);\n } else {\n newObj[key] = obj[key];\n }\n }\n }\n newObj.default = obj;\n if (cache) {\n cache.set(obj, newObj);\n }\n return newObj;\n}\nfunction _getRequireWildcardCache() {\n if (typeof WeakMap !== \"function\") return null;\n var cache = new WeakMap();\n _getRequireWildcardCache = function() {\n return cache;\n };\n return cache;\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL0Bzd2MvaGVscGVycy9saWIvX2ludGVyb3BfcmVxdWlyZV93aWxkY2FyZC5qcy5qcyIsIm1hcHBpbmdzIjoiQUFBYTtBQUNiLDhDQUE2QztBQUM3QztBQUNBLENBQUMsRUFBQztBQUNGLGtCQUFlO0FBQ2Y7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLGNBQWM7QUFDZDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9fTl9FLy4uL25vZ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aXB0b3IgPyBPYmplY3QuZ2V0T3duUHJvcGVydHlEZXNjcmlwdG9yKG9iaiwga2V5KSA6IG51bGw7XG4gICAgICAgICAgICBpZiAoZGVzYyAmJiAoZGVzYy5nZXQgfHwgZGVzYy5zZXQpKSB7XG4gICAgICAgICAgICAgICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KG5ld09iaiwga2V5LCBkZXNjKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgbmV3T2JqW2tleV0gPSBvYmpba2V5XTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cbiAgICBuZXdPYmouZGVmYXVsdCA9IG9iajtcbiAgICBpZiAoY2FjaGUpIHtcbiAgICAgICAgY2FjaGUuc2V0KG9iaiwgbmV3T2JqKTtcbiAgICB9XG4gICAgcmV0dXJuIG5ld09iajtcbn1cbmZ1bmN0aW9uIF9nZXRSZXF1aXJlV2lsZGNhcmRDYWNoZSgpIHtcbiAgICBpZiAodHlwZW9mIFdlYWtNYXAgIT09IFwiZnVuY3Rpb25cIikgcmV0dXJuIG51bGw7XG4gICAgdmFyIGNhY2hlID0gbmV3IFdlYWtNYXAoKTtcbiAgICBfZ2V0UmVxdWlyZVdpbGRjYXJkQ2FjaGUgPSBmdW5jdGlvbigpIHtcbiAgICAgICAgcmV0dXJuIGNhY2hlO1xuICAgIH07XG4gICAgcmV0dXJuIGNhY2hlO1xufVxuIl0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///../node_modules/@swc/helpers/lib/_interop_require_wildcard.js\n"));
/***/ }),
/***/ "../node_modules/@swc/helpers/lib/_is_native_function.js":
/*!***************************************************************!*\
!*** ../node_modules/@swc/helpers/lib/_is_native_function.js ***!
\***************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _isNativeFunction;\nfunction _isNativeFunction(fn) {\n return Function.toString.call(fn).indexOf(\"[native code]\") !== -1;\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL0Bzd2MvaGVscGVycy9saWIvX2lzX25hdGl2ZV9mdW5jdGlvbi5qcy5qcyIsIm1hcHBpbmdzIjoiQUFBYTtBQUNiLDhDQUE2QztBQUM3QztBQUNBLENBQUMsRUFBQztBQUNGLGtCQUFlO0FBQ2Y7QUFDQTtBQUNBIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vX05fRS8uLi9ub2RlX21vZHVsZXMvQHN3Yy9oZWxwZXJzL2xpYi9faXNfbmF0aXZlX2Z1bmN0aW9uLmpzPzhjZDQiXSwic291cmNlc0NvbnRlbnQiOlsiXCJ1c2Ugc3RyaWN0XCI7XG5PYmplY3QuZGVmaW5lUHJvcGVydHkoZXhwb3J0cywgXCJfX2VzTW9kdWxlXCIsIHtcbiAgICB2YWx1ZTogdHJ1ZVxufSk7XG5leHBvcnRzLmRlZmF1bHQgPSBfaXNOYXRpdmVGdW5jdGlvbjtcbmZ1bmN0aW9uIF9pc05hdGl2ZUZ1bmN0aW9uKGZuKSB7XG4gICAgcmV0dXJuIEZ1bmN0aW9uLnRvU3RyaW5nLmNhbGwoZm4pLmluZGV4T2YoXCJbbmF0aXZlIGNvZGVdXCIpICE9PSAtMTtcbn1cbiJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///../node_modules/@swc/helpers/lib/_is_native_function.js\n"));
/***/ }),
/***/ "../node_modules/@swc/helpers/lib/_is_native_reflect_construct.js":
/*!************************************************************************!*\
!*** ../node_modules/@swc/helpers/lib/_is_native_reflect_construct.js ***!
\************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _isNativeReflectConstruct;\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n try {\n Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL0Bzd2MvaGVscGVycy9saWIvX2lzX25hdGl2ZV9yZWZsZWN0X2NvbnN0cnVjdC5qcy5qcyIsIm1hcHBpbmdzIjoiQUFBYTtBQUNiLDhDQUE2QztBQUM3QztBQUNBLENBQUMsRUFBQztBQUNGLGtCQUFlO0FBQ2Y7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLG1GQUFtRjtBQUNuRjtBQUNBLE1BQU07QUFDTjtBQUNBO0FBQ0EiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9fTl9FLy4uL25vZGVfbW9kdWxlcy9Ac3djL2hlbHBlcnMvbGliL19pc19uYXRpdmVfcmVmbGVjdF9jb25zdHJ1Y3QuanM/ZjM4YyJdLCJzb3VyY2VzQ29udGVudCI6WyJcInVzZSBzdHJpY3RcIjtcbk9iamVjdC5kZWZpbmVQcm9wZXJ0eShleHBvcnRzLCBcIl9fZXNNb2R1bGVcIiwge1xuICAgIHZhbHVlOiB0cnVlXG59KTtcbmV4cG9ydHMuZGVmYXVsdCA9IF9pc05hdGl2ZVJlZmxlY3RDb25zdHJ1Y3Q7XG5mdW5jdGlvbiBfaXNOYXRpdmVSZWZsZWN0Q29uc3RydWN0KCkge1xuICAgIGlmICh0eXBlb2YgUmVmbGVjdCA9PT0gXCJ1bmRlZmluZWRcIiB8fCAhUmVmbGVjdC5jb25zdHJ1Y3QpIHJldHVybiBmYWxzZTtcbiAgICBpZiAoUmVmbGVjdC5jb25zdHJ1Y3Quc2hhbSkgcmV0dXJuIGZhbHNlO1xuICAgIGlmICh0eXBlb2YgUHJveHkgPT09IFwiZnVuY3Rpb25cIikgcmV0dXJuIHRydWU7XG4gICAgdHJ5IHtcbiAgICAgICAgQm9vbGVhbi5wcm90b3R5cGUudmFsdWVPZi5jYWxsKFJlZmxlY3QuY29uc3RydWN0KEJvb2xlYW4sIFtdLCBmdW5jdGlvbigpIHt9KSk7XG4gICAgICAgIHJldHVybiB0cnVlO1xuICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgIH1cbn1cbiJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///../node_modules/@swc/helpers/lib/_is_native_reflect_construct.js\n"));
/***/ }),
/***/ "../node_modules/@swc/helpers/lib/_iterable_to_array.js":
/*!**************************************************************!*\
!*** ../node_modules/@swc/helpers/lib/_iterable_to_array.js ***!
\**************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _iterableToArray;\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL0Bzd2MvaGVscGVycy9saWIvX2l0ZXJhYmxlX3RvX2FycmF5LmpzLmpzIiwibWFwcGluZ3MiOiJBQUFhO0FBQ2IsOENBQTZDO0FBQzdDO0FBQ0EsQ0FBQyxFQUFDO0FBQ0Ysa0JBQWU7QUFDZjtBQUNBO0FBQ0EiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9fTl9FLy4uL25vZGVfbW9kdWxlcy9Ac3djL2hlbHBlcnMvbGliL19pdGVyYWJsZV90b19hcnJheS5qcz9hNDkzIl0sInNvdXJjZXNDb250ZW50IjpbIlwidXNlIHN0cmljdFwiO1xuT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsIFwiX19lc01vZHVsZVwiLCB7XG4gICAgdmFsdWU6IHRydWVcbn0pO1xuZXhwb3J0cy5kZWZhdWx0ID0gX2l0ZXJhYmxlVG9BcnJheTtcbmZ1bmN0aW9uIF9pdGVyYWJsZVRvQXJyYXkoaXRlcikge1xuICAgIGlmICh0eXBlb2YgU3ltYm9sICE9PSBcInVuZGVmaW5lZFwiICYmIGl0ZXJbU3ltYm9sLml0ZXJhdG9yXSAhPSBudWxsIHx8IGl0ZXJbXCJAQGl0ZXJhdG9yXCJdICE9IG51bGwpIHJldHVybiBBcnJheS5mcm9tKGl0ZXIpO1xufVxuIl0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///../node_modules/@swc/helpers/lib/_iterable_to_array.js\n"));
/***/ }),
/***/ "../node_modules/@swc/helpers/lib/_non_iterable_rest.js":
/*!**************************************************************!*\
!*** ../node_modules/@swc/helpers/lib/_non_iterable_rest.js ***!
\**************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _nonIterableRest;\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL0Bzd2MvaGVscGVycy9saWIvX25vbl9pdGVyYWJsZV9yZXN0LmpzLmpzIiwibWFwcGluZ3MiOiJBQUFhO0FBQ2IsOENBQTZDO0FBQzdDO0FBQ0EsQ0FBQyxFQUFDO0FBQ0Ysa0JBQWU7QUFDZjtBQUNBO0FBQ0EiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9fTl9FLy4uL25vZGVfbW9kdWxlcy9Ac3djL2hlbHBlcnMvbGliL19ub25faXRlcmFibGVfcmVzdC5qcz80ZDc3Il0sInNvdXJjZXNDb250ZW50IjpbIlwidXNlIHN0cmljdFwiO1xuT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsIFwiX19lc01vZHVsZVwiLCB7XG4gICAgdmFsdWU6IHRydWVcbn0pO1xuZXhwb3J0cy5kZWZhdWx0ID0gX25vbkl0ZXJhYmxlUmVzdDtcbmZ1bmN0aW9uIF9ub25JdGVyYWJsZVJlc3QoKSB7XG4gICAgdGhyb3cgbmV3IFR5cGVFcnJvcihcIkludmFsaWQgYXR0ZW1wdCB0byBkZXN0cnVjdHVyZSBub24taXRlcmFibGUgaW5zdGFuY2UuXFxcXG5JbiBvcmRlciB0byBiZSBpdGVyYWJsZSwgbm9uLWFycmF5IG9iamVjdHMgbXVzdCBoYXZlIGEgW1N5bWJvbC5pdGVyYXRvcl0oKSBtZXRob2QuXCIpO1xufVxuIl0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///../node_modules/@swc/helpers/lib/_non_iterable_rest.js\n"));
/***/ }),
/***/ "../node_modules/@swc/helpers/lib/_non_iterable_spread.js":
/*!****************************************************************!*\
!*** ../node_modules/@swc/helpers/lib/_non_iterable_spread.js ***!
\****************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _nonIterableSpread;\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL0Bzd2MvaGVscGVycy9saWIvX25vbl9pdGVyYWJsZV9zcHJlYWQuanMuanMiLCJtYXBwaW5ncyI6IkFBQWE7QUFDYiw4Q0FBNkM7QUFDN0M7QUFDQSxDQUFDLEVBQUM7QUFDRixrQkFBZTtBQUNmO0FBQ0E7QUFDQSIsInNvdXJjZXMiOlsid2VicGFjazovL19OX0UvLi4vbm9kZV9tb2R1bGVzL0Bzd2MvaGVscGVycy9saWIvX25vbl9pdGVyYWJsZV9zcHJlYWQuanM/MjRkZCJdLCJzb3VyY2VzQ29udGVudCI6WyJcInVzZSBzdHJpY3RcIjtcbk9iamVjdC5kZWZpbmVQcm9wZXJ0eShleHBvcnRzLCBcIl9fZXNNb2R1bGVcIiwge1xuICAgIHZhbHVlOiB0cnVlXG59KTtcbmV4cG9ydHMuZGVmYXVsdCA9IF9ub25JdGVyYWJsZVNwcmVhZDtcbmZ1bmN0aW9uIF9ub25JdGVyYWJsZVNwcmVhZCgpIHtcbiAgICB0aHJvdyBuZXcgVHlwZUVycm9yKFwiSW52YWxpZCBhdHRlbXB0IHRvIHNwcmVhZCBub24taXRlcmFibGUgaW5zdGFuY2UuXFxcXG5JbiBvcmRlciB0byBiZSBpdGVyYWJsZSwgbm9uLWFycmF5IG9iamVjdHMgbXVzdCBoYXZlIGEgW1N5bWJvbC5pdGVyYXRvcl0oKSBtZXRob2QuXCIpO1xufVxuIl0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///../node_modules/@swc/helpers/lib/_non_iterable_spread.js\n"));
/***/ }),
/***/ "../node_modules/@swc/helpers/lib/_possible_constructor_return.js":
/*!************************************************************************!*\
!*** ../node_modules/@swc/helpers/lib/_possible_constructor_return.js ***!
\************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _possibleConstructorReturn;\nvar _assertThisInitializedMjs = _interopRequireDefault(__webpack_require__(/*! ./_assert_this_initialized.js */ \"../node_modules/@swc/helpers/lib/_assert_this_initialized.js\"));\nvar _typeOfMjs = _interopRequireDefault(__webpack_require__(/*! ./_type_of.js */ \"../node_modules/@swc/helpers/lib/_type_of.js\"));\nfunction _possibleConstructorReturn(self, call) {\n if (call && ((0, _typeOfMjs).default(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n return (0, _assertThisInitializedMjs).default(self);\n}\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL0Bzd2MvaGVscGVycy9saWIvX3Bvc3NpYmxlX2NvbnN0cnVjdG9yX3JldHVybi5qcy5qcyIsIm1hcHBpbmdzIjoiQUFBYTtBQUNiLDhDQUE2QztBQUM3QztBQUNBLENBQUMsRUFBQztBQUNGLGtCQUFlO0FBQ2YsdURBQXVELG1CQUFPLENBQUMsbUdBQStCO0FBQzlGLHdDQUF3QyxtQkFBTyxDQUFDLG1FQUFlO0FBQy9EO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9fTl9FLy4uL25vZGVfbW9kdWxlcy9Ac3djL2hlbHBlcnMvbGliL19wb3NzaWJsZV9jb25zdHJ1Y3Rvcl9yZXR1cm4uanM/ZjQwZCJdLCJzb3VyY2VzQ29udGVudCI6WyJcInVzZSBzdHJpY3RcIjtcbk9iamVjdC5kZWZpbmVQcm9wZXJ0eShleHBvcnRzLCBcIl9fZXNNb2R1bGVcIiwge1xuICAgIHZhbHVlOiB0cnVlXG59KTtcbmV4cG9ydHMuZGVmYXVsdCA9IF9wb3NzaWJsZUNvbnN0cnVjdG9yUmV0dXJuO1xudmFyIF9hc3NlcnRUaGlzSW5pdGlhbGl6ZWRNanMgPSBfaW50ZXJvcFJlcXVpcmVEZWZhdWx0KHJlcXVpcmUoXCIuL19hc3NlcnRfdGhpc19pbml0aWFsaXplZC5qc1wiKSk7XG52YXIgX3R5cGVPZk1qcyA9IF9pbnRlcm9wUmVxdWlyZURlZmF1bHQocmVxdWlyZShcIi4vX3R5cGVfb2YuanNcIikpO1xuZnVuY3Rpb24gX3Bvc3NpYmxlQ29uc3RydWN0b3JSZXR1cm4oc2VsZiwgY2FsbCkge1xuICAgIGlmIChjYWxsICYmICgoMCwgX3R5cGVPZk1qcykuZGVmYXVsdChjYWxsKSA9PT0gXCJvYmplY3RcIiB8fCB0eXBlb2YgY2FsbCA9PT0gXCJmdW5jdGlvblwiKSkge1xuICAgICAgICByZXR1cm4gY2FsbDtcbiAgICB9XG4gICAgcmV0dXJuICgwLCBfYXNzZXJ0VGhpc0luaXRpYWxpemVkTWpzKS5kZWZhdWx0KHNlbGYpO1xufVxuZnVuY3Rpb24gX2ludGVyb3BSZXF1aXJlRGVmYXVsdChvYmopIHtcbiAgICByZXR1cm4gb2JqICYmIG9iai5fX2VzTW9kdWxlID8gb2JqIDoge1xuICAgICAgICBkZWZhdWx0OiBvYmpcbiAgICB9O1xufVxuIl0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///../node_modules/@swc/helpers/lib/_possible_constructor_return.js\n"));
/***/ }),
/***/ "../node_modules/@swc/helpers/lib/_set_prototype_of.js":
/*!*************************************************************!*\
!*** ../node_modules/@swc/helpers/lib/_set_prototype_of.js ***!
\*************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _setPrototypeOf;\nfunction _setPrototypeOf(o, p) {\n return setPrototypeOf(o, p);\n}\nfunction setPrototypeOf(o1, p1) {\n setPrototypeOf = Object.setPrototypeOf || function setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return setPrototypeOf(o1, p1);\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL0Bzd2MvaGVscGVycy9saWIvX3NldF9wcm90b3R5cGVfb2YuanMuanMiLCJtYXBwaW5ncyI6IkFBQWE7QUFDYiw4Q0FBNkM7QUFDN0M7QUFDQSxDQUFDLEVBQUM7QUFDRixrQkFBZTtBQUNmO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vX05fRS8uLi9ub2RlX21vZHVsZXMvQHN3Yy9oZWxwZXJzL2xpYi9fc2V0X3Byb3RvdHlwZV9vZi5qcz9kNWJjIl0sInNvdXJjZXNDb250ZW50IjpbIlwidXNlIHN0cmljdFwiO1xuT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsIFwiX19lc01vZHVsZVwiLCB7XG4gICAgdmFsdWU6IHRydWVcbn0pO1xuZXhwb3J0cy5kZWZhdWx0ID0gX3NldFByb3RvdHlwZU9mO1xuZnVuY3Rpb24gX3NldFByb3RvdHlwZU9mKG8sIHApIHtcbiAgICByZXR1cm4gc2V0UHJvdG90eXBlT2YobywgcCk7XG59XG5mdW5jdGlvbiBzZXRQcm90b3R5cGVPZihvMSwgcDEpIHtcbiAgICBzZXRQcm90b3R5cGVPZiA9IE9iamVjdC5zZXRQcm90b3R5cGVPZiB8fCBmdW5jdGlvbiBzZXRQcm90b3R5cGVPZihvLCBwKSB7XG4gICAgICAgIG8uX19wcm90b19fID0gcDtcbiAgICAgICAgcmV0dXJuIG87XG4gICAgfTtcbiAgICByZXR1cm4gc2V0UHJvdG90eXBlT2YobzEsIHAxKTtcbn1cbiJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///../node_modules/@swc/helpers/lib/_set_prototype_of.js\n"));
/***/ }),
/***/ "../node_modules/@swc/helpers/lib/_sliced_to_array.js":
/*!************************************************************!*\
!*** ../node_modules/@swc/helpers/lib/_sliced_to_array.js ***!
\************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _slicedToArray;\nvar _arrayWithHolesMjs = _interopRequireDefault(__webpack_require__(/*! ./_array_with_holes.js */ \"../node_modules/@swc/helpers/lib/_array_with_holes.js\"));\nvar _iterableToArrayMjs = _interopRequireDefault(__webpack_require__(/*! ./_iterable_to_array.js */ \"../node_modules/@swc/helpers/lib/_iterable_to_array.js\"));\nvar _nonIterableRestMjs = _interopRequireDefault(__webpack_require__(/*! ./_non_iterable_rest.js */ \"../node_modules/@swc/helpers/lib/_non_iterable_rest.js\"));\nvar _unsupportedIterableToArrayMjs = _interopRequireDefault(__webpack_require__(/*! ./_unsupported_iterable_to_array.js */ \"../node_modules/@swc/helpers/lib/_unsupported_iterable_to_array.js\"));\nfunction _slicedToArray(arr, i) {\n return (0, _arrayWithHolesMjs).default(arr) || (0, _iterableToArrayMjs).default(arr, i) || (0, _unsupportedIterableToArrayMjs).default(arr, i) || (0, _nonIterableRestMjs).default();\n}\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL0Bzd2MvaGVscGVycy9saWIvX3NsaWNlZF90b19hcnJheS5qcy5qcyIsIm1hcHBpbmdzIjoiQUFBYTtBQUNiLDhDQUE2QztBQUM3QztBQUNB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vbiBfc2xpY2VkVG9BcnJheShhcnIsIGkpIHtcbiAgICByZXR1cm4gKDAsIF9hcnJheVdpdGhIb2xlc01qcykuZGVmYXVsdChhcnIpIHx8ICgwLCBfaXRlcmFibGVUb0FycmF5TWpzKS5kZWZhdWx0KGFyciwgaSkgfHwgKDAsIF91bnN1cHBvcnRlZEl0ZXJhYmxlVG9BcnJheU1qcykuZGVmYXVsdChhcnIsIGkpIHx8ICgwLCBfbm9uSXRlcmFibGVSZXN0TWpzKS5kZWZhdWx0KCk7XG59XG5mdW5jdGlvbiBfaW50ZXJvcFJlcXVpcmVEZWZhdWx0KG9iaikge1xuICAgIHJldHVybiBvYmogJiYgb2JqLl9fZXNNb2R1bGUgPyBvYmogOiB7XG4gICAgICAgIGRlZmF1bHQ6IG9ialxuICAgIH07XG59XG4iXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///../node_modules/@swc/helpers/lib/_sliced_to_array.js\n"));
/***/ }),
/***/ "../node_modules/@swc/helpers/lib/_to_consumable_array.js":
/*!****************************************************************!*\
!*** ../node_modules/@swc/helpers/lib/_to_consumable_array.js ***!
\****************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _toConsumableArray;\nvar _arrayWithoutHolesMjs = _interopRequireDefault(__webpack_require__(/*! ./_array_without_holes.js */ \"../node_modules/@swc/helpers/lib/_array_without_holes.js\"));\nvar _iterableToArrayMjs = _interopRequireDefault(__webpack_require__(/*! ./_iterable_to_array.js */ \"../node_modules/@swc/helpers/lib/_iterable_to_array.js\"));\nvar _nonIterableSpreadMjs = _interopRequireDefault(__webpack_require__(/*! ./_non_iterable_spread.js */ \"../node_modules/@swc/helpers/lib/_non_iterable_spread.js\"));\nvar _unsupportedIterableToArrayMjs = _interopRequireDefault(__webpack_require__(/*! ./_unsupported_iterable_to_array.js */ \"../node_modules/@swc/helpers/lib/_unsupported_iterable_to_array.js\"));\nfunction _toConsumableArray(arr) {\n return (0, _arrayWithoutHolesMjs).default(arr) || (0, _iterableToArrayMjs).default(arr) || (0, _unsupportedIterableToArrayMjs).default(arr) || (0, _nonIterableSpreadMjs).default();\n}\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL0Bzd2MvaGVscGVycy9saWIvX3RvX2NvbnN1bWFibGVfYXJyYXkuanMuanMiLCJtYXBwaW5ncyI6IkFBQWE7QUFDYiw4Q0FBNkM7QUFDN0M7QUFDQSxDQUFDLEVBQUM7QUFDRixrQkFBZTtBQUNmLG1EQUFtRCxtQkFBTyxDQUFDLDJGQUEyQjtBQUN0RixpREFBaUQsbUJBQU8sQ0FBQyx1RkFBeUI7QUFDbEYsbURBQW1ELG1CQUFPLENBQUMsMkZBQTJCO0FBQ3RGLDREQUE0RCxtQkFBTyxDQUFDLCtHQUFxQztBQUN6RztBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vX05fRS8uLi9ub2RlX21vZHVsZXMvQHN3Yy9oZWxwZXJzL2xpYi9fdG9fY29uc3VtYWJsZV9hcnJheS5qcz8wNzFkIl0sInNvdXJjZXNDb250ZW50IjpbIlwidXNlIHN0cmljdFwiO1xuT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsIFwiX19lc01vZHVsZVwiLCB7XG4gICAgdmFsdWU6IHRydWVcbn0pO1xuZXhwb3J0cy5kZWZhdWx0ID0gX3RvQ29uc3VtYWJsZUFycmF5O1xudmFyIF9hcnJheVdpdGhvdXRIb2xlc01qcyA9IF9pbnRlcm9wUmVxdWlyZURlZmF1bHQocmVxdWlyZShcIi4vX2FycmF5X3dpdGhvdXRfaG9sZXMuanNcIikpO1xudmFyIF9pdGVyYWJsZVRvQXJyYXlNanMgPSBfaW50ZXJvcFJlcXVpcmVEZWZhdWx0KHJlcXVpcmUoXCIuL19pdGVyYWJsZV90b19hcnJheS5qc1wiKSk7XG52YXIgX25vbkl0ZXJhYmxlU3ByZWFkTWpzID0gX2ludGVyb3BSZXF1aXJlRGVmYXVsdChyZXF1aXJlKFwiLi9fbm9uX2l0ZXJhYmxlX3NwcmVhZC5qc1wiKSk7XG52YXIgX3Vuc3VwcG9ydGVkSXRlcmFibGVUb0FycmF5TWpzID0gX2ludGVyb3BSZXF1aXJlRGVmYXVsdChyZXF1aXJlKFwiLi9fdW5zdXBwb3J0ZWRfaXRlcmFibGVfdG9fYXJyYXkuanNcIikpO1xuZnVuY3Rpb24gX3RvQ29uc3VtYWJsZUFycmF5KGFycikge1xuICAgIHJldHVybiAoMCwgX2FycmF5V2l0aG91dEhvbGVzTWpzKS5kZWZhdWx0KGFycikgfHwgKDAsIF9pdGVyYWJsZVRvQXJyYXlNanMpLmRlZmF1bHQoYXJyKSB8fCAoMCwgX3Vuc3VwcG9ydGVkSXRlcmFibGVUb0FycmF5TWpzKS5kZWZhdWx0KGFycikgfHwgKDAsIF9ub25JdGVyYWJsZVNwcmVhZE1qcykuZGVmYXVsdCgpO1xufVxuZnVuY3Rpb24gX2ludGVyb3BSZXF1aXJlRGVmYXVsdChvYmopIHtcbiAgICByZXR1cm4gb2JqICYmIG9iai5fX2VzTW9kdWxlID8gb2JqIDoge1xuICAgICAgICBkZWZhdWx0OiBvYmpcbiAgICB9O1xufVxuIl0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///../node_modules/@swc/helpers/lib/_to_consumable_array.js\n"));
/***/ }),
/***/ "../node_modules/@swc/helpers/lib/_type_of.js":
/*!****************************************************!*\
!*** ../node_modules/@swc/helpers/lib/_type_of.js ***!
\****************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _typeof;\nfunction _typeof(obj) {\n \"@swc/helpers - typeof\";\n return obj && obj.constructor === Symbol ? \"symbol\" : typeof obj;\n}\n;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL0Bzd2MvaGVscGVycy9saWIvX3R5cGVfb2YuanMuanMiLCJtYXBwaW5ncyI6IkFBQWE7QUFDYiw4Q0FBNkM7QUFDN0M7QUFDQSxDQUFDLEVBQUM7QUFDRixrQkFBZTtBQUNmO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9fTl9FLy4uL25vZGVfbW9kdWxlcy9Ac3djL2hlbHBlcnMvbGliL190eXBlX29mLmpzPzJlOWMiXSwic291cmNlc0NvbnRlbnQiOlsiXCJ1c2Ugc3RyaWN0XCI7XG5PYmplY3QuZGVmaW5lUHJvcGVydHkoZXhwb3J0cywgXCJfX2VzTW9kdWxlXCIsIHtcbiAgICB2YWx1ZTogdHJ1ZVxufSk7XG5leHBvcnRzLmRlZmF1bHQgPSBfdHlwZW9mO1xuZnVuY3Rpb24gX3R5cGVvZihvYmopIHtcbiAgICBcIkBzd2MvaGVscGVycyAtIHR5cGVvZlwiO1xuICAgIHJldHVybiBvYmogJiYgb2JqLmNvbnN0cnVjdG9yID09PSBTeW1ib2wgPyBcInN5bWJvbFwiIDogdHlwZW9mIG9iajtcbn1cbjtcbiJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///../node_modules/@swc/helpers/lib/_type_of.js\n"));
/***/ }),
/***/ "../node_modules/@swc/helpers/lib/_unsupported_iterable_to_array.js":
/*!**************************************************************************!*\
!*** ../node_modules/@swc/helpers/lib/_unsupported_iterable_to_array.js ***!
\**************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _unsupportedIterableToArray;\nvar _arrayLikeToArrayMjs = _interopRequireDefault(__webpack_require__(/*! ./_array_like_to_array.js */ \"../node_modules/@swc/helpers/lib/_array_like_to_array.js\"));\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return (0, _arrayLikeToArrayMjs).default(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(n);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return (0, _arrayLikeToArrayMjs).default(o, minLen);\n}\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL0Bzd2MvaGVscGVycy9saWIvX3Vuc3VwcG9ydGVkX2l0ZXJhYmxlX3RvX2FycmF5LmpzLmpzIiwibWFwcGluZ3MiOiJBQUFhO0FBQ2IsOENBQTZDO0FBQzdDO0FBQ0EsQ0FBQyxFQUFDO0FBQ0Ysa0JBQWU7QUFDZixrREFBa0QsbUJBQU8sQ0FBQywyRkFBMkI7QUFDckY7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9fTl9FLy4uL25vZGVfbW9kdWxlcy9Ac3djL2hlbHBlcnMvbGliL191bnN1cHBvcnRlZF9pdGVyYWJsZV90b19hcnJheS5qcz8wOGRlI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AgICAgICAgZGVmYXVsdDogb2JqXG4gICAgfTtcbn1cbiJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///../node_modules/@swc/helpers/lib/_unsupported_iterable_to_array.js\n"));
/***/ }),
/***/ "../node_modules/@swc/helpers/lib/_wrap_native_super.js":
/*!**************************************************************!*\
!*** ../node_modules/@swc/helpers/lib/_wrap_native_super.js ***!
\**************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _wrapNativeSuper;\nvar _constructMjs = _interopRequireDefault(__webpack_require__(/*! ./_construct.js */ \"../node_modules/@swc/helpers/lib/_construct.js\"));\nvar _isNativeFunctionMjs = _interopRequireDefault(__webpack_require__(/*! ./_is_native_function.js */ \"../node_modules/@swc/helpers/lib/_is_native_function.js\"));\nvar _getPrototypeOfMjs = _interopRequireDefault(__webpack_require__(/*! ./_get_prototype_of.js */ \"../node_modules/@swc/helpers/lib/_get_prototype_of.js\"));\nvar _setPrototypeOfMjs = _interopRequireDefault(__webpack_require__(/*! ./_set_prototype_of.js */ \"../node_modules/@swc/helpers/lib/_set_prototype_of.js\"));\nfunction _wrapNativeSuper(Class) {\n return wrapNativeSuper(Class);\n}\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\nfunction wrapNativeSuper(Class1) {\n var _cache = typeof Map === \"function\" ? new Map() : undefined;\n wrapNativeSuper = function wrapNativeSuper(Class) {\n if (Class === null || !(0, _isNativeFunctionMjs).default(Class)) return Class;\n if (typeof Class !== \"function\") {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n if (typeof _cache !== \"undefined\") {\n if (_cache.has(Class)) return _cache.get(Class);\n _cache.set(Class, Wrapper);\n }\n function Wrapper() {\n return (0, _constructMjs).default(Class, arguments, (0, _getPrototypeOfMjs).default(this).constructor);\n }\n Wrapper.prototype = Object.create(Class.prototype, {\n constructor: {\n value: Wrapper,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n return (0, _setPrototypeOfMjs).default(Wrapper, Class);\n };\n return wrapNativeSuper(Class1);\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL0Bzd2MvaGVscGVycy9saWIvX3dyYXBfbmF0aXZlX3N1cGVyLmpzLmpzIiwibWFwcGluZ3MiOiJBQUFhO0FBQ2IsOENBQTZDO0FBQzdDO0FBQ0EsQ0FBQyxFQUFDO0FBQ0Ysa0JBQWU7QUFDZiwyQ0FBMkMsbUJBQU8sQ0FBQyx1RUFBaUI7QUFDcEUsa0RBQWtELG1CQUFPLENBQUMseUZBQTBCO0FBQ3BGLGdEQUFnRCxtQkFBTyxDQUFDLHFGQUF3QjtBQUNoRixnREFBZ0QsbUJBQU8sQ0FBQyxxRkFBd0I7QUFDaEY7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLFNBQVM7QUFDVDtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZXMiOlsid2VicGFjazovL19OX0UvLi4vbm9kZV9tb2R1bGVzL0Bzd2MvaGVscGVycy9saWIvX3dyYXBfbmF0aXZlX3N1cGVyLmpzPzNiNDgiXSwic291cmNlc0NvbnRlbnQiOlsiXCJ1c2Ugc3RyaWN0XCI7XG5PYmplY3QuZGVmaW5lUHJvcGVydHkoZXhwb3J0cywgXCJfX2VzTW9kdWxlXCIsIHtcbiAgICB2YWx1ZTogdHJ1ZVxufSk7XG5leHBvcnR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DbGFzczEpO1xufVxuIl0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///../node_modules/@swc/helpers/lib/_wrap_native_super.js\n"));
/***/ }),
/***/ "../node_modules/next/dist/build/polyfills/object-assign.js":
/*!******************************************************************!*\
!*** ../node_modules/next/dist/build/polyfills/object-assign.js ***!
\******************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nvar assign = Object.assign.bind(Object);\nmodule.exports = assign;\nmodule.exports[\"default\"] = module.exports;\n\n//# sourceMappingURL=object-assign.js.map//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9idWlsZC9wb2x5ZmlsbHMvb2JqZWN0LWFzc2lnbi5qcy5qcyIsIm1hcHBpbmdzIjoiQUFBYTtBQUNiO0FBQ0E7QUFDQSx5QkFBc0I7O0FBRXRCIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vX05fRS8uLi9ub2RlX21vZHVsZXMvbmV4dC9kaXN0L2J1aWxkL3BvbHlmaWxscy9vYmplY3QtYXNzaWduLmpzP2Q4NGEiXSwic291cmNlc0NvbnRlbnQiOlsiXCJ1c2Ugc3RyaWN0XCI7XG52YXIgYXNzaWduID0gT2JqZWN0LmFzc2lnbi5iaW5kKE9iamVjdCk7XG5tb2R1bGUuZXhwb3J0cyA9IGFzc2lnbjtcbm1vZHVsZS5leHBvcnRzLmRlZmF1bHQgPSBtb2R1bGUuZXhwb3J0cztcblxuLy8jIHNvdXJjZU1hcHBpbmdVUkw9b2JqZWN0LWFzc2lnbi5qcy5tYXAiXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///../node_modules/next/dist/build/polyfills/object-assign.js\n"));
/***/ }),
/***/ "../node_modules/next/dist/build/polyfills/polyfill-module.js":
/*!********************************************************************!*\
!*** ../node_modules/next/dist/build/polyfills/polyfill-module.js ***!
\********************************************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
eval(__webpack_require__.ts("\"trimStart\"in String.prototype||(String.prototype.trimStart=String.prototype.trimLeft),\"trimEnd\"in String.prototype||(String.prototype.trimEnd=String.prototype.trimRight),\"description\"in Symbol.prototype||Object.defineProperty(Symbol.prototype,\"description\",{configurable:!0,get:function(){var t=/\\((.*)\\)/.exec(this.toString());return t?t[1]:void 0}}),Array.prototype.flat||(Array.prototype.flat=function(t,r){return r=this.concat.apply([],this),t>1&&r.some(Array.isArray)?r.flat(t-1):r},Array.prototype.flatMap=function(t,r){return this.map(t,r).flat()}),Promise.prototype.finally||(Promise.prototype.finally=function(t){if(\"function\"!=typeof t)return this.then(t,t);var r=this.constructor||Promise;return this.then(function(o){return r.resolve(t()).then(function(){return o})},function(o){return r.resolve(t()).then(function(){throw o})})});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9idWlsZC9wb2x5ZmlsbHMvcG9seWZpbGwtbW9kdWxlLmpzLmpzIiwibWFwcGluZ3MiOiJBQUFBLG1RQUFtUSwrQkFBK0IsdUNBQXVDLHNCQUFzQiw0REFBNEQsNkVBQTZFLHVDQUF1Qyw0QkFBNEIsb0VBQW9FLDhDQUE4QyxnQ0FBZ0MsNkJBQTZCLHNDQUFzQyxTQUFTLEVBQUUsYUFBYSxzQ0FBc0MsUUFBUSxFQUFFLEVBQUUiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9fTl9FLy4uL25vZGVfbW9kdWxlcy9uZXh0L2Rpc3QvYnVpbGQvcG9seWZpbGxzL3BvbHlmaWxsLW1vZHVsZS5qcz80MzA3Il0sInNvdXJjZXNDb250ZW50IjpbIlwidHJpbVN0YXJ0XCJpbiBTdHJpbmcucHJv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hyb3cgb30pfSl9KTtcbiJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///../node_modules/next/dist/build/polyfills/polyfill-module.js\n"));
/***/ }),
/***/ "../node_modules/next/dist/compiled/@next/react-dev-overlay/dist/client.js":
/*!*********************************************************************************!*\
!*** ../node_modules/next/dist/compiled/@next/react-dev-overlay/dist/client.js ***!
\*********************************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
eval(__webpack_require__.ts("var __dirname = \"/\";\n(function(){var e={152:function(e){\"use strict\";var n=function(){function defineProperties(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||false;r.configurable=true;if(\"value\"in r)r.writable=true;Object.defineProperty(e,r.key,r)}}return function(e,n,t){if(n)defineProperties(e.prototype,n);if(t)defineProperties(e,t);return e}}();function _classCallCheck(e,n){if(!(e instanceof n)){throw new TypeError(\"Cannot call a class as a function\")}}var t=[[{color:\"0, 0, 0\",class:\"ansi-black\"},{color:\"187, 0, 0\",class:\"ansi-red\"},{color:\"0, 187, 0\",class:\"ansi-green\"},{color:\"187, 187, 0\",class:\"ansi-yellow\"},{color:\"0, 0, 187\",class:\"ansi-blue\"},{color:\"187, 0, 187\",class:\"ansi-magenta\"},{color:\"0, 187, 187\",class:\"ansi-cyan\"},{color:\"255,255,255\",class:\"ansi-white\"}],[{color:\"85, 85, 85\",class:\"ansi-bright-black\"},{color:\"255, 85, 85\",class:\"ansi-bright-red\"},{color:\"0, 255, 0\",class:\"ansi-bright-green\"},{color:\"255, 255, 85\",class:\"ansi-bright-yellow\"},{color:\"85, 85, 255\",class:\"ansi-bright-blue\"},{color:\"255, 85, 255\",class:\"ansi-bright-magenta\"},{color:\"85, 255, 255\",class:\"ansi-bright-cyan\"},{color:\"255, 255, 255\",class:\"ansi-bright-white\"}]];var r=function(){n(Anser,null,[{key:\"escapeForHtml\",value:function escapeForHtml(e){return(new Anser).escapeForHtml(e)}},{key:\"linkify\",value:function linkify(e){return(new Anser).linkify(e)}},{key:\"ansiToHtml\",value:function ansiToHtml(e,n){return(new Anser).ansiToHtml(e,n)}},{key:\"ansiToJson\",value:function ansiToJson(e,n){return(new Anser).ansiToJson(e,n)}},{key:\"ansiToText\",value:function ansiToText(e){return(new Anser).ansiToText(e)}}]);function Anser(){_classCallCheck(this,Anser);this.fg=this.bg=this.fg_truecolor=this.bg_truecolor=null;this.bright=0}n(Anser,[{key:\"setupPalette\",value:function setupPalette(){this.PALETTE_COLORS=[];for(var e=0;e<2;++e){for(var n=0;n<8;++n){this.PALETTE_COLORS.push(t[e][n].color)}}var r=[0,95,135,175,215,255];var a=function format(e,n,t){return r[e]+\", \"+r[n]+\", \"+r[t]};var i=void 0,o=void 0,l=void 0;for(var s=0;s<6;++s){for(var u=0;u<6;++u){for(var c=0;c<6;++c){this.PALETTE_COLORS.push(a(s,u,c))}}}var f=8;for(var d=0;d<24;++d,f+=10){this.PALETTE_COLORS.push(a(f,f,f))}}},{key:\"escapeForHtml\",value:function escapeForHtml(e){return e.replace(/[&<>]/gm,(function(e){return e==\"&\"?\"&amp;\":e==\"<\"?\"&lt;\":e==\">\"?\"&gt;\":\"\"}))}},{key:\"linkify\",value:function linkify(e){return e.replace(/(https?:\\/\\/[^\\s]+)/gm,(function(e){return'<a href=\"'+e+'\">'+e+\"</a>\"}))}},{key:\"ansiToHtml\",value:function ansiToHtml(e,n){return this.process(e,n,true)}},{key:\"ansiToJson\",value:function ansiToJson(e,n){n=n||{};n.json=true;n.clearLine=false;return this.process(e,n,true)}},{key:\"ansiToText\",value:function ansiToText(e){return this.process(e,{},false)}},{key:\"process\",value:function process(e,n,t){var r=this;var a=this;var i=e.split(/\\033\\[/);var o=i.shift();if(n===undefined||n===null){n={}}n.clearLine=/\\r/.test(e);var l=i.map((function(e){return r.processChunk(e,n,t)}));if(n&&n.json){var s=a.processChunkJson(\"\");s.content=o;s.clearLine=n.clearLine;l.unshift(s);if(n.remove_empty){l=l.filter((function(e){return!e.isEmpty()}))}return l}else{l.unshift(o)}return l.join(\"\")}},{key:\"processChunkJson\",value:function processChunkJson(e,n,r){n=typeof n==\"undefined\"?{}:n;var a=n.use_classes=typeof n.use_classes!=\"undefined\"&&n.use_classes;var i=n.key=a?\"class\":\"color\";var o={content:e,fg:null,bg:null,fg_truecolor:null,bg_truecolor:null,clearLine:n.clearLine,decoration:null,was_processed:false,isEmpty:function isEmpty(){return!o.content}};var l=e.match(/^([!\\x3c-\\x3f]*)([\\d;]*)([\\x20-\\x2c]*[\\x40-\\x7e])([\\s\\S]*)/m);if(!l)return o;var s=o.content=l[4];var u=l[2].split(\";\");if(l[1]!==\"\"||l[3]!==\"m\"){return o}if(!r){return o}var c=this;c.decoration=null;while(u.length>0){var f=u.shift();var d=parseInt(f);if(isNaN(d)||d===0){c.fg=c.bg=c.decoration=null}else if(d===1){c.decoration=\"bold\"}else if(d===2){c.decoration=\"dim\"}else if(d==3){c.decoration=\"italic\"}else if(d==4){c.decoration=\"underline\"}else if(d==5){c.decoration=\"blink\"}else if(d===7){c.decoration=\"reverse\"}else if(d===8){c.decoration=\"hidden\"}else if(d===9){c.decoration=\"strikethrough\"}else if(d==39){c.fg=null}else if(d==49){c.bg=null}else if(d>=30&&d<38){c.fg=t[0][d%10][i]}else if(d>=90&&d<98){c.fg=t[1][d%10][i]}else if(d>=40&&d<48){c.bg=t[0][d%10][i]}else if(d>=100&&d<108){c.bg=t[1][d%10][i]}else if(d===38||d===48){var p=d===38;if(u.length>=1){var b=u.shift();if(b===\"5\"&&u.length>=1){var v=parseInt(u.shift());if(v>=0&&v<=255){if(!a){if(!this.PALETTE_COLORS){c.setupPalette()}if(p){c.fg=this.PALETTE_COLORS[v]}else{c.bg=this.PALETTE_COLORS[v]}}else{var m=v>=16?\"ansi-palette-\"+v:t[v>7?1:0][v%8][\"class\"];if(p){c.fg=m}else{c.bg=m}}}}else if(b===\"2\"&&u.length>=3){var g=parseInt(u.shift());var h=parseInt(u.shift());var y=parseInt(u.shift());if(g>=0&&g<=255&&h>=0&&h<=255&&y>=0&&y<=255){var x=g+\", \"+h+\", \"+y;if(!a){if(p){c.fg=x}else{c.bg=x}}else{if(p){c.fg=\"ansi-truecolor\";c.fg_truecolor=x}else{c.bg=\"ansi-truecolor\";c.bg_truecolor=x}}}}}}}if(c.fg===null&&c.bg===null&&c.decoration===null){return o}else{var w=[];var _=[];var E={};o.fg=c.fg;o.bg=c.bg;o.fg_truecolor=c.fg_truecolor;o.bg_truecolor=c.bg_truecolor;o.decoration=c.decoration;o.was_processed=true;return o}}},{key:\"processChunk\",value:function processChunk(e,n,t){var r=this;var a=this;n=n||{};var i=this.processChunkJson(e,n,t);if(n.json){return i}if(i.isEmpty()){return\"\"}if(!i.was_processed){return i.content}var o=n.use_classes;var l=[];var s=[];var u={};var c=function render_data(e){var n=[];var t=void 0;for(t in e){if(e.hasOwnProperty(t)){n.push(\"data-\"+t+'=\"'+r.escapeForHtml(e[t])+'\"')}}return n.length>0?\" \"+n.join(\" \"):\"\"};if(i.fg){if(o){s.push(i.fg+\"-fg\");if(i.fg_truecolor!==null){u[\"ansi-truecolor-fg\"]=i.fg_truecolor;i.fg_truecolor=null}}else{l.push(\"color:rgb(\"+i.fg+\")\")}}if(i.bg){if(o){s.push(i.bg+\"-bg\");if(i.bg_truecolor!==null){u[\"ansi-truecolor-bg\"]=i.bg_truecolor;i.bg_truecolor=null}}else{l.push(\"background-color:rgb(\"+i.bg+\")\")}}if(i.decoration){if(o){s.push(\"ansi-\"+i.decoration)}else if(i.decoration===\"bold\"){l.push(\"font-weight:bold\")}else if(i.decoration===\"dim\"){l.push(\"opacity:0.5\")}else if(i.decoration===\"italic\"){l.push(\"font-style:italic\")}else if(i.decoration===\"reverse\"){l.push(\"filter:invert(100%)\")}else if(i.decoration===\"hidden\"){l.push(\"visibility:hidden\")}else if(i.decoration===\"strikethrough\"){l.push(\"text-decoration:line-through\")}else{l.push(\"text-decoration:\"+i.decoration)}}if(o){return'<span class=\"'+s.join(\" \")+'\"'+c(u)+\">\"+i.content+\"</span>\"}else{return'<span style=\"'+l.join(\";\")+'\"'+c(u)+\">\"+i.content+\"</span>\"}}}]);return Anser}();e.exports=r},848:function(e){(function(n,t){if(true){e.exports=t(n)}else{}})(typeof __webpack_require__.g!=\"undefined\"?__webpack_require__.g:this,(function(e){if(e.CSS&&e.CSS.escape){return e.CSS.escape}var cssEscape=function(e){if(arguments.length==0){throw new TypeError(\"`CSS.escape` requires an argument.\")}var n=String(e);var t=n.length;var r=-1;var a;var i=\"\";var o=n.charCodeAt(0);while(++r<t){a=n.charCodeAt(r);if(a==0){i+=\"<22>\";continue}if(a>=1&&a<=31||a==127||r==0&&a>=48&&a<=57||r==1&&a>=48&&a<=57&&o==45){i+=\"\\\\\"+a.toString(16)+\" \";continue}if(r==0&&t==1&&a==45){i+=\"\\\\\"+n.charAt(r);continue}if(a>=128||a==45||a==95||a>=48&&a<=57||a>=65&&a<=90||a>=97&&a<=122){i+=n.charAt(r);continue}i+=\"\\\\\"+n.charAt(r)}return i};if(!e.CSS){e.CSS={}}e.CSS.escape=cssEscape;return cssEscape}))},962:function(e,n,t){e=t.nmd(e);\n/*!\n * Platform.js v1.3.6\n * Copyright 2014-2020 Benjamin Tan\n * Copyright 2011-2013 John-David Dalton\n * Available under MIT license\n */(function(){\"use strict\";var t={function:true,object:true};var r=t[typeof window]&&window||this;var a=r;var i=t[typeof n]&&n;var o=t[\"object\"]&&e&&!e.nodeType&&e;var l=i&&o&&typeof __webpack_require__.g==\"object\"&&__webpack_require__.g;if(l&&(l.global===l||l.window===l||l.self===l)){r=l}var s=Math.pow(2,53)-1;var u=/\\bOpera/;var c=this;var f=Object.prototype;var d=f.hasOwnProperty;var p=f.toString;function capitalize(e){e=String(e);return e.charAt(0).toUpperCase()+e.slice(1)}function cleanupOS(e,n,t){var r={\"10.0\":\"10\",6.4:\"10 Technical Preview\",6.3:\"8.1\",6.2:\"8\",6.1:\"Server 2008 R2 / 7\",\"6.0\":\"Server 2008 / Vista\",5.2:\"Server 2003 / XP 64-bit\",5.1:\"XP\",5.01:\"2000 SP1\",\"5.0\":\"2000\",\"4.0\":\"NT\",\"4.90\":\"ME\"};if(n&&t&&/^Win/i.test(e)&&!/^Windows Phone /i.test(e)&&(r=r[/[\\d.]+$/.exec(e)])){e=\"Windows \"+r}e=String(e);if(n&&t){e=e.replace(RegExp(n,\"i\"),t)}e=format(e.replace(/ ce$/i,\" CE\").replace(/\\bhpw/i,\"web\").replace(/\\bMacintosh\\b/,\"Mac OS\").replace(/_PowerPC\\b/i,\" OS\").replace(/\\b(OS X) [^ \\d]+/i,\"$1\").replace(/\\bMac (OS X)\\b/,\"$1\").replace(/\\/(\\d)/,\" $1\").replace(/_/g,\".\").replace(/(?: BePC|[ .]*fc[ \\d.]+)$/i,\"\").replace(/\\bx86\\.64\\b/gi,\"x86_64\").replace(/\\b(Windows Phone) OS\\b/,\"$1\").replace(/\\b(Chrome OS \\w+) [\\d.]+\\b/,\"$1\").split(\" on \")[0]);return e}function each(e,n){var t=-1,r=e?e.length:0;if(typeof r==\"number\"&&r>-1&&r<=s){while(++t<r){n(e[t],t,e)}}else{forOwn(e,n)}}function format(e){e=trim(e);return/^(?:webOS|i(?:OS|P))/.test(e)?e:capitalize(e)}function forOwn(e,n){for(var t in e){if(d.call(e,t)){n(e[t],t,e)}}}function getClassOf(e){return e==null?capitalize(e):p.call(e).slice(8,-1)}function isHostType(e,n){var t=e!=null?typeof e[n]:\"number\";return!/^(?:boolean|number|string|undefined)$/.test(t)&&(t==\"object\"?!!e[n]:true)}function qualify(e){return String(e).replace(/([ -])(?!$)/g,\"$1?\")}function reduce(e,n){var t=null;each(e,(function(r,a){t=n(t,r,a,e)}));return t}function trim(e){return String(e).replace(/^ +| +$/g,\"\")}function parse(e){var n=r;var t=e&&typeof e==\"object\"&&getClassOf(e)!=\"String\";if(t){n=e;e=null}var i=n.navigator||{};var o=i.userAgent||\"\";e||(e=o);var l=t||c==a;var s=t?!!i.likeChrome:/\\bChrome\\b/.test(e)&&!/internal|\\n/i.test(p.toString());var f=\"Object\",d=t?f:\"ScriptBridgingProxyObject\",b=t?f:\"Environment\",v=t&&n.java?\"JavaPackage\":getClassOf(n.java),m=t?f:\"RuntimeObject\";var g=/\\bJava/.test(v)&&n.java;var h=g&&getClassOf(n.environment)==b;var y=g?\"a\":\"α\";var x=g?\"b\":\"β\";var w=n.document||{};var _=n.operamini||n.opera;var E=u.test(E=t&&_?_[\"[[Class]]\"]:getClassOf(_))?E:_=null;var O;var S=e;var j=[];var k=null;var T=e==o;var C=T&&_&&typeof _.version==\"function\"&&_.version();var M;var P=getLayout([{label:\"EdgeHTML\",pattern:\"Edge\"},\"Trident\",{label:\"WebKit\",pattern:\"AppleWebKit\"},\"iCab\",\"Presto\",\"NetFront\",\"Tasman\",\"KHTML\",\"Gecko\"]);var A=getName([\"Adobe AIR\",\"Arora\",\"Avant Browser\",\"Breach\",\"Camino\",\"Electron\",\"Epiphany\",\"Fennec\",\"Flock\",\"Galeon\",\"GreenBrowser\",\"iCab\",\"Iceweasel\",\"K-Meleon\",\"Konqueror\",\"Lunascape\",\"Maxthon\",{label:\"Microsoft Edge\",pattern:\"(?:Edge|Edg|EdgA|EdgiOS)\"},\"Midori\",\"Nook Browser\",\"PaleMoon\",\"PhantomJS\",\"Raven\",\"Rekonq\",\"RockMelt\",{label:\"Samsung Internet\",pattern:\"SamsungBrowser\"},\"SeaMonkey\",{label:\"Silk\",pattern:\"(?:Cloud9|Silk-Accelerated)\"},\"Sleipnir\",\"SlimBrowser\",{label:\"SRWare Iron\",pattern:\"Iron\"},\"Sunrise\",\"Swiftfox\",\"Vivaldi\",\"Waterfox\",\"WebPositive\",{label:\"Yandex Browser\",pattern:\"YaBrowser\"},{label:\"UC Browser\",pattern:\"UCBrowser\"},\"Opera Mini\",{label:\"Opera Mini\",pattern:\"OPiOS\"},\"Opera\",{label:\"Opera\",pattern:\"OPR\"},\"Chromium\",\"Chrome\",{label:\"Chrome\",pattern:\"(?:HeadlessChrome)\"},{label:\"Chrome Mobile\",pattern:\"(?:CriOS|CrMo)\"},{label:\"Firefox\",pattern:\"(?:Firefox|Minefield)\"},{label:\"Firefox for iOS\",pattern:\"FxiOS\"},{label:\"IE\",pattern:\"IEMobile\"},{label:\"IE\",pattern:\"MSIE\"},\"Safari\"]);var D=getProduct([{label:\"BlackBerry\",pattern:\"BB10\"},\"BlackBerry\",{label:\"Galaxy S\",pattern:\"GT-I9000\"},{label:\"Galaxy S2\",pattern:\"GT-I9100\"},{label:\"Galaxy S3\",pattern:\"GT-I9300\"},{label:\"Galaxy S4\",pattern:\"GT-I9500\"},{label:\"Galaxy S5\",pattern:\"SM-G900\"},{label:\"Galaxy S6\",pattern:\"SM-G920\"},{label:\"Galaxy S6 Edge\",pattern:\"SM-G925\"},{label:\"Galaxy S7\",pattern:\"SM-G930\"},{label:\"Galaxy S7 Edge\",pattern:\"SM-G935\"},\"Google TV\",\"Lumia\",\"iPad\",\"iPod\",\"iPhone\",\"Kindle\",{label:\"Kindle Fire\",pattern:\"(?:Cloud9|Silk-Accelerated)\"},\"Nexus\",\"Nook\",\"PlayBook\",\"PlayStation Vita\",\"PlayStation\",\"TouchPad\",\"Transformer\",{label:\"Wii U\",pattern:\"WiiU\"},\"Wii\",\"Xbox One\",{label:\"Xbox 360\",pattern:\"Xbox\"},\"Xoom\"]);var N=getManufacturer({Apple:{iPad:1,iPhone:1,iPod:1},Alcatel:{},Archos:{},Amazon:{Kindle:1,\"Kindle Fire\":1},Asus:{Transformer:1},\"Barnes & Noble\":{Nook:1},BlackBerry:{PlayBook:1},Google:{\"Google TV\":1,Nexus:1},HP:{TouchPad:1},HTC:{},Huawei:{},Lenovo:{},LG:{},Microsoft:{Xbox:1,\"Xbox One\":1},Motorola:{Xoom:1},Nintendo:{\"Wii U\":1,Wii:1},Nokia:{Lumia:1},Oppo:{},Samsung:{\"Galaxy S\":1,\"Galaxy S2\":1,\"Galaxy S3\":1,\"Galaxy S4\":1},Sony:{PlayStation:1,\"PlayStation Vita\":1},Xiaomi:{Mi:1,Redmi:1}});var z=getOS([\"Windows Phone\",\"KaiOS\",\"Android\",\"CentOS\",{label:\"Chrome OS\",pattern:\"CrOS\"},\"Debian\",{label:\"DragonFly BSD\",pattern:\"DragonFly\"},\"Fedora\",\"FreeBSD\",\"Gentoo\",\"Haiku\",\"Kubuntu\",\"Linux Mint\",\"OpenBSD\",\"Red Hat\",\"SuSE\",\"Ubuntu\",\"Xubuntu\",\"Cygwin\",\"Symbian OS\",\"hpwOS\",\"webOS \",\"webOS\",\"Tablet OS\",\"Tizen\",\"Linux\",\"Mac OS X\",\"Macintosh\",\"Mac\",\"Windows 98;\",\"Windows \"]);function getLayout(n){return reduce(n,(function(n,t){return n||RegExp(\"\\\\b\"+(t.pattern||qualify(t))+\"\\\\b\",\"i\").exec(e)&&(t.label||t)}))}function getManufacturer(n){return reduce(n,(function(n,t,r){return n||(t[D]||t[/^[a-z]+(?: +[a-z]+\\b)*/i.exec(D)]||RegExp(\"\\\\b\"+qualify(r)+\"(?:\\\\b|\\\\w*\\\\d)\",\"i\").exec(e))&&r}))}function getName(n){return reduce(n,(function(n,t){return n||RegExp(\"\\\\b\"+(t.pattern||qualify(t))+\"\\\\b\",\"i\").exec(e)&&(t.label||t)}))}function getOS(n){return reduce(n,(function(n,t){var r=t.pattern||qualify(t);if(!n&&(n=RegExp(\"\\\\b\"+r+\"(?:/[\\\\d.]+|[ \\\\w.]*)\",\"i\").exec(e))){n=cleanupOS(n,r,t.label||t)}return n}))}function getProduct(n){return reduce(n,(function(n,t){var r=t.pattern||qualify(t);if(!n&&(n=RegExp(\"\\\\b\"+r+\" *\\\\d+[.\\\\w_]*\",\"i\").exec(e)||RegExp(\"\\\\b\"+r+\" *\\\\w+-[\\\\w]*\",\"i\").exec(e)||RegExp(\"\\\\b\"+r+\"(?:; *(?:[a-z]+[_-])?[a-z]+\\\\d+|[^ ();-]*)\",\"i\").exec(e))){if((n=String(t.label&&!RegExp(r,\"i\").test(t.label)?t.label:n).split(\"/\"))[1]&&!/[\\d.]+/.test(n[0])){n[0]+=\" \"+n[1]}t=t.label||t;n=format(n[0].replace(RegExp(r,\"i\"),t).replace(RegExp(\"; *(?:\"+t+\"[_-])?\",\"i\"),\" \").replace(RegExp(\"(\"+t+\")[-_.]?(\\\\w)\",\"i\"),\"$1 $2\"))}return n}))}function getVersion(n){return reduce(n,(function(n,t){return n||(RegExp(t+\"(?:-[\\\\d.]+/|(?: for [\\\\w-]+)?[ /-])([\\\\d.]+[^ ();/_-]*)\",\"i\").exec(e)||0)[1]||null}))}function toStringPlatform(){return this.description||\"\"}P&&(P=[P]);if(/\\bAndroid\\b/.test(z)&&!D&&(O=/\\bAndroid[^;]*;(.*?)(?:Build|\\) AppleWebKit)\\b/i.exec(e))){D=trim(O[1]).replace(/^[a-z]{2}-[a-z]{2};\\s*/i,\"\")||null}if(N&&!D){D=getProduct([N])}else if(N&&D){D=D.replace(RegExp(\"^(\"+qualify(N)+\")[-_.\\\\s]\",\"i\"),N+\" \").replace(RegExp(\"^(\"+qualify(N)+\")[-_.]?(\\\\w)\",\"i\"),N+\" $2\")}if(O=/\\bGoogle TV\\b/.exec(D)){D=O[0]}if(/\\bSimulator\\b/i.test(e)){D=(D?D+\" \":\"\")+\"Simulator\"}if(A==\"Opera Mini\"&&/\\bOPiOS\\b/.test(e)){j.push(\"running in Turbo/Uncompressed mode\")}if(A==\"IE\"&&/\\blike iPhone OS\\b/.test(e)){O=parse(e.replace(/like iPhone OS/,\"\"));N=O.manufacturer;D=O.product}else if(/^iP/.test(D)){A||(A=\"Safari\");z=\"iOS\"+((O=/ OS ([\\d_]+)/i.exec(e))?\" \"+O[1].replace(/_/g,\".\"):\"\")}else if(A==\"Konqueror\"&&/^Linux\\b/i.test(z)){z=\"Kubuntu\"}else if(N&&N!=\"Google\"&&(/Chrome/.test(A)&&!/\\bMobile Safari\\b/i.test(e)||/\\bVita\\b/.test(D))||/\\bAndroid\\b/.test(z)&&/^Chrome/.test(A)&&/\\bVersion\\//i.test(e)){A=\"Android Browser\";z=/\\bAndroid\\b/.test(z)?z:\"Android\"}else if(A==\"Silk\"){if(!/\\bMobi/i.test(e)){z=\"Android\";j.unshift(\"desktop mode\")}if(/Accelerated *= *true/i.test(e)){j.unshift(\"accelerated\")}}else if(A==\"UC Browser\"&&/\\bUCWEB\\b/.test(e)){j.push(\"speed mode\")}else if(A==\"PaleMoon\"&&(O=/\\bFirefox\\/([\\d.]+)\\b/.exec(e))){j.push(\"identifying as Firefox \"+O[1])}else if(A==\"Firefox\"&&(O=/\\b(Mobile|Tablet|TV)\\b/i.exec(e))){z||(z=\"Firefox OS\");D||(D=O[1])}else if(!A||(O=!/\\bMinefield\\b/i.test(e)&&/\\b(?:Firefox|Safari)\\b/.exec(A))){if(A&&!D&&/[\\/,]|^[^(]+?\\)/.test(e.slice(e.indexOf(O+\"/\")+8))){A=null}if((O=D||N||z)&&(D||N||/\\b(?:Android|Symbian OS|Tablet OS|webOS)\\b/.test(z))){A=/[a-z]+(?: Hat)?/i.exec(/\\bAndroid\\b/.test(z)?z:O)+\" Browser\"}}else if(A==\"Electron\"&&(O=(/\\bChrome\\/([\\d.]+)\\b/.exec(e)||0)[1])){j.push(\"Chromium \"+O)}if(!C){C=getVersion([\"(?:Cloud9|CriOS|CrMo|Edge|Edg|EdgA|EdgiOS|FxiOS|HeadlessChrome|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\\\d.]+$)|UCBrowser|YaBrowser)\",\"Version\",qualify(A),\"(?:Firefox|Minefield|NetFront)\"])}if(O=P==\"iCab\"&&parseFloat(C)>3&&\"WebKit\"||/\\bOpera\\b/.test(A)&&(/\\bOPR\\b/.test(e)?\"Blink\":\"Presto\")||/\\b(?:Midori|Nook|Safari)\\b/i.test(e)&&!/^(?:Trident|EdgeHTML)$/.test(P)&&\"WebKit\"||!P&&/\\bMSIE\\b/i.test(e)&&(z==\"Mac OS\"?\"Tasman\":\"Trident\")||P==\"WebKit\"&&/\\bPlayStation\\b(?! Vita\\b)/i.test(A)&&\"NetFront\"){P=[O]}if(A==\"IE\"&&(O=(/; *(?:XBLWP|ZuneWP)(\\d+)/i.exec(e)||0)[1])){A+=\" Mobile\";z=\"Windows Phone \"+(/\\+$/.test(O)?O:O+\".x\");j.unshift(\"desktop mode\")}else if(/\\bWPDesktop\\b/i.test(e)){A=\"IE Mobile\";z=\"Windows Phone 8.x\";j.unshift(\"desktop mode\");C||(C=(/\\brv:([\\d.]+)/.exec(e)||0)[1])}else if(A!=\"IE\"&&P==\"Trident\"&&(O=/\\brv:([\\d.]+)/.exec(e))){if(A){j.push(\"identifying as \"+A+(C?\" \"+C:\"\"))}A=\"IE\";C=O[1]}if(T){if(isHostType(n,\"global\")){if(g){O=g.lang.System;S=O.getProperty(\"os.arch\");z=z||O.getProperty(\"os.name\")+\" \"+O.getProperty(\"os.version\")}if(h){try{C=n.require(\"ringo/engine\").version.join(\".\");A=\"RingoJS\"}catch(e){if((O=n.system)&&O.global.system==n.system){A=\"Narwhal\";z||(z=O[0].os||null)}}if(!A){A=\"Rhino\"}}else if(typeof n.process==\"object\"&&!n.process.browser&&(O=n.process)){if(typeof O.versions==\"object\"){if(typeof O.versions.electron==\"string\"){j.push(\"Node \"+O.versions.node);A=\"Electron\";C=O.versions.electron}else if(typeof O.versions.nw==\"string\"){j.push(\"Chromium \"+C,\"Node \"+O.versions.node);A=\"NW.js\";C=O.versions.nw}}if(!A){A=\"Node.js\";S=O.arch;z=O.platform;C=/[\\d.]+/.exec(O.version);C=C?C[0]:null}}}else if(getClassOf(O=n.runtime)==d){A=\"Adobe AIR\";z=O.flash.system.Capabilities.os}else if(getClassOf(O=n.phantom)==m){A=\"PhantomJS\";C=(O=O.version||null)&&O.major+\".\"+O.minor+\".\"+O.patch}else if(typeof w.documentMode==\"number\"&&(O=/\\bTrident\\/(\\d+)/i.exec(e))){C=[C,w.documentMode];if((O=+O[1]+4)!=C[1]){j.push(\"IE \"+C[1]+\" mode\");P&&(P[1]=\"\");C[1]=O}C=A==\"IE\"?String(C[1].toFixed(1)):C[0]}else if(typeof w.documentMode==\"number\"&&/^(?:Chrome|Firefox)\\b/.test(A)){j.push(\"masking as \"+A+\" \"+C);A=\"IE\";C=\"11.0\";P=[\"Trident\"];z=\"Windows\"}z=z&&format(z)}if(C&&(O=/(?:[ab]|dp|pre|[ab]\\d+pre)(?:\\d+\\+?)?$/i.exec(C)||/(?:alpha|beta)(?: ?\\d)?/i.exec(e+\";\"+(T&&i.appMinorVersion))||/\\bMinefield\\b/i.test(e)&&\"a\")){k=/b/i.test(O)?\"beta\":\"alpha\";C=C.replace(RegExp(O+\"\\\\+?$\"),\"\")+(k==\"beta\"?x:y)+(/\\d+\\+?/.exec(O)||\"\")}if(A==\"Fennec\"||A==\"Firefox\"&&/\\b(?:Android|Firefox OS|KaiOS)\\b/.test(z)){A=\"Firefox Mobile\"}else if(A==\"Maxthon\"&&C){C=C.replace(/\\.[\\d.]+/,\".x\")}else if(/\\bXbox\\b/i.test(D)){if(D==\"Xbox 360\"){z=null}if(D==\"Xbox 360\"&&/\\bIEMobile\\b/.test(e)){j.unshift(\"mobile mode\")}}else if((/^(?:Chrome|IE|Opera)$/.test(A)||A&&!D&&!/Browser|Mobi/.test(A))&&(z==\"Windows CE\"||/Mobi/i.test(e))){A+=\" Mobile\"}else if(A==\"IE\"&&T){try{if(n.external===null){j.unshift(\"platform preview\")}}catch(e){j.unshift(\"embedded\")}}else if((/\\bBlackBerry\\b/.test(D)||/\\bBB10\\b/.test(e))&&(O=(RegExp(D.replace(/ +/g,\" *\")+\"/([.\\\\d]+)\",\"i\").exec(e)||0)[1]||C)){O=[O,/BB10/.test(e)];z=(O[1]?(D=null,N=\"BlackBerry\"):\"Device Software\")+\" \"+O[0];C=null}else if(this!=forOwn&&D!=\"Wii\"&&(T&&_||/Opera/.test(A)&&/\\b(?:MSIE|Firefox)\\b/i.test(e)||A==\"Firefox\"&&/\\bOS X (?:\\d+\\.){2,}/.test(z)||A==\"IE\"&&(z&&!/^Win/.test(z)&&C>5.5||/\\bWindows XP\\b/.test(z)&&C>8||C==8&&!/\\bTrident\\b/.test(e)))&&!u.test(O=parse.call(forOwn,e.replace(u,\"\")+\";\"))&&O.name){O=\"ing as \"+O.name+((O=O.version)?\" \"+O:\"\");if(u.test(A)){if(/\\bIE\\b/.test(O)&&z==\"Mac OS\"){z=null}O=\"identify\"+O}else{O=\"mask\"+O;if(E){A=format(E.replace(/([a-z])([A-Z])/g,\"$1 $2\"))}else{A=\"Opera\"}if(/\\bIE\\b/.test(O)){z=null}if(!T){C=null}}P=[\"Presto\"];j.push(O)}if(O=(/\\bAppleWebKit\\/([\\d.]+\\+?)/i.exec(e)||0)[1]){O=[parseFloat(O.replace(/\\.(\\d)$/,\".0$1\")),O];if(A==\"Safari\"&&O[1].slice(-1)==\"+\"){A=\"WebKit Nightly\";k=\"alpha\";C=O[1].slice(0,-1)}else if(C==O[1]||C==(O[2]=(/\\bSafari\\/([\\d.]+\\+?)/i.exec(e)||0)[1])){C=null}O[1]=(/\\b(?:Headless)?Chrome\\/([\\d.]+)/i.exec(e)||0)[1];if(O[0]==537.36&&O[2]==537.36&&parseFloat(O[1])>=28&&P==\"WebKit\"){P=[\"Blink\"]}if(!T||!s&&!O[1]){P&&(P[1]=\"like Safari\");O=(O=O[0],O<400?1:O<500?2:O<526?3:O<533?4:O<534?\"4+\":O<535?5:O<537?6:O<538?7:O<601?8:O<602?9:O<604?10:O<606?11:O<608?12:\"12\")}else{P&&(P[1]=\"like Chrome\");O=O[1]||(O=O[0],O<530?1:O<532?2:O<532.05?3:O<533?4:O<534.03?5:O<534.07?6:O<534.1?7:O<534.13?8:O<534.16?9:O<534.24?10:O<534.3?11:O<535.01?12:O<535.02?\"13+\":O<535.07?15:O<535.11?16:O<535.19?17:O<536.05?18:O<536.1?19:O<537.01?20:O<537.11?\"21+\":O<537.13?23:O<537.18?24:O<537.24?25:O<537.36?26:P!=\"Blink\"?\"27\":\"28\")}P&&(P[1]+=\" \"+(O+=typeof O==\"number\"?\".x\":/[.+]/.test(O)?\"\":\"+\"));if(A==\"Safari\"&&(!C||parseInt(C)>45)){C=O}else if(A==\"Chrome\"&&/\\bHeadlessChrome/i.test(e)){j.unshift(\"headless\")}}if(A==\"Opera\"&&(O=/\\bzbov|zvav$/.exec(z))){A+=\" \";j.unshift(\"desktop mode\");if(O==\"zvav\"){A+=\"Mini\";C=null}else{A+=\"Mobile\"}z=z.replace(RegExp(\" *\"+O+\"$\"),\"\")}else if(A==\"Safari\"&&/\\bChrome\\b/.exec(P&&P[1])){j.unshift(\"desktop mode\");A=\"Chrome Mobile\";C=null;if(/\\bOS X\\b/.test(z)){N=\"Apple\";z=\"iOS 4.3+\"}else{z=null}}else if(/\\bSRWare Iron\\b/.test(A)&&!C){C=getVersion(\"Chrome\")}if(C&&C.indexOf(O=/[\\d.]+$/.exec(z))==0&&e.indexOf(\"/\"+O+\"-\")>-1){z=trim(z.replace(O,\"\"))}if(z&&z.indexOf(A)!=-1&&!RegExp(A+\" OS\").test(z)){z=z.replace(RegExp(\" *\"+qualify(A)+\" *\"),\"\")}if(P&&!/\\b(?:Avant|Nook)\\b/.test(A)&&(/Browser|Lunascape|Maxthon/.test(A)||A!=\"Safari\"&&/^iOS/.test(z)&&/\\bSafari\\b/.test(P[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|SRWare Iron|Vivaldi|Web)/.test(A)&&P[1])){(O=P[P.length-1])&&j.push(O)}if(j.length){j=[\"(\"+j.join(\"; \")+\")\"]}if(N&&D&&D.indexOf(N)<0){j.push(\"on \"+N)}if(D){j.push((/^on /.test(j[j.length-1])?\"\":\"on \")+D)}if(z){O=/ ([\\d.+]+)$/.exec(z);M=O&&z.charAt(z.length-O[0].length-1)==\"/\";z={architecture:32,family:O&&!M?z.replace(O[0],\"\"):z,version:O?O[1]:null,toString:function(){var e=this.version;return this.family+(e&&!M?\" \"+e:\"\")+(this.architecture==64?\" 64-bit\":\"\")}}}if((O=/\\b(?:AMD|IA|Win|WOW|x86_|x)64\\b/i.exec(S))&&!/\\bi686\\b/i.test(S)){if(z){z.architecture=64;z.family=z.family.replace(RegExp(\" *\"+O),\"\")}if(A&&(/\\bWOW64\\b/i.test(e)||T&&/\\w(?:86|32)$/.test(i.cpuClass||i.platform)&&!/\\bWin64; x64\\b/i.test(e))){j.unshift(\"32-bit\")}}else if(z&&/^OS X/.test(z.family)&&A==\"Chrome\"&&parseFloat(C)>=39){z.architecture=64}e||(e=null);var I={};I.description=e;I.layout=P&&P[0];I.manufacturer=N;I.name=A;I.prerelease=k;I.product=D;I.ua=e;I.version=A&&C;I.os=z||{architecture:null,family:null,version:null,toString:function(){return\"null\"}};I.parse=parse;I.toString=toStringPlatform;if(I.version){j.unshift(C)}if(I.name){j.unshift(A)}if(z&&A&&!(z==String(z).split(\" \")[0]&&(z==A.split(\" \")[0]||D))){j.push(D?\"(\"+z+\")\":\"on \"+z)}if(j.length){I.description=j.join(\" \")}return I}var b=parse();if(i&&o){forOwn(b,(function(e,n){i[n]=e}))}else{r.platform=b}}).call(this)},116:function(e,n){\"use strict\";Object.defineProperty(n,\"__esModule\",{value:true});var t=\"<unknown>\";function parse(e){var n=e.split(\"\\n\");return n.reduce((function(e,n){var t=parseChrome(n)||parseWinjs(n)||parseGecko(n)||parseNode(n)||parseJSC(n);if(t){e.push(t)}return e}),[])}var r=/^\\s*at (.*?) ?\\(((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|\\/|[a-z]:\\\\|\\\\\\\\).*?)(?::(\\d+))?(?::(\\d+))?\\)?\\s*$/i;var a=/\\((\\S*)(?::(\\d+))(?::(\\d+))\\)/;function parseChrome(e){var n=r.exec(e);if(!n){return null}var i=n[2]&&n[2].indexOf(\"native\")===0;var o=n[2]&&n[2].indexOf(\"eval\")===0;var l=a.exec(n[2]);if(o&&l!=null){n[2]=l[1];n[3]=l[2];n[4]=l[3]}return{file:!i?n[2]:null,methodName:n[1]||t,arguments:i?[n[2]]:[],lineNumber:n[3]?+n[3]:null,column:n[4]?+n[4]:null}}var i=/^\\s*at (?:((?:\\[object object\\])?.+) )?\\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\\d+)(?::(\\d+))?\\)?\\s*$/i;function parseWinjs(e){var n=i.exec(e);if(!n){return null}return{file:n[2],methodName:n[1]||t,arguments:[],lineNumber:+n[3],column:n[4]?+n[4]:null}}var o=/^\\s*(.*?)(?:\\((.*?)\\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\\[native).*?|[^@]*bundle)(?::(\\d+))?(?::(\\d+))?\\s*$/i;var l=/(\\S+) line (\\d+)(?: > eval line \\d+)* > eval/i;function parseGecko(e){var n=o.exec(e);if(!n){return null}var r=n[3]&&n[3].indexOf(\" > eval\")>-1;var a=l.exec(n[3]);if(r&&a!=null){n[3]=a[1];n[4]=a[2];n[5]=null}return{file:n[3],methodName:n[1]||t,arguments:n[2]?n[2].split(\",\"):[],lineNumber:n[4]?+n[4]:null,column:n[5]?+n[5]:null}}var s=/^\\s*(?:([^@]*)(?:\\((.*?)\\))?@)?(\\S.*?):(\\d+)(?::(\\d+))?\\s*$/i;function parseJSC(e){var n=s.exec(e);if(!n){return null}return{file:n[3],methodName:n[1]||t,arguments:[],lineNumber:+n[4],column:n[5]?+n[5]:null}}var u=/^\\s*at (?:((?:\\[object object\\])?[^\\\\/]+(?: \\[as \\S+\\])?) )?\\(?(.*?):(\\d+)(?::(\\d+))?\\)?\\s*$/i;function parseNode(e){var n=u.exec(e);if(!n){return null}return{file:n[2],methodName:n[1]||t,arguments:[],lineNumber:+n[3],column:n[4]?+n[4]:null}}n.parse=parse},388:function(e,n,t){\"use strict\";var r=this&&this.__createBinding||(Object.create?function(e,n,t,r){if(r===undefined)r=t;var a=Object.getOwnPropertyDescriptor(n,t);if(!a||(\"get\"in a?!n.__esModule:a.writable||a.configurable)){a={enumerable:true,get:function(){return n[t]}}}Object.defineProperty(e,r,a)}:function(e,n,t,r){if(r===undefined)r=t;e[r]=n[t]});var a=this&&this.__setModuleDefault||(Object.create?function(e,n){Object.defineProperty(e,\"default\",{enumerable:true,value:n})}:function(e,n){e[\"default\"]=n});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var t in e)if(t!==\"default\"&&Object.prototype.hasOwnProperty.call(e,t))r(n,e,t);a(n,e);return n};n.__esModule=true;n.onRefresh=n.unregister=n.register=n.onBuildError=n.onBuildOk=n.ReactDevOverlay=n.getServerError=n.getErrorByType=void 0;var o=i(t(857));var l=t(51);var s=false;var u=undefined;function onUnhandledError(e){var n=e===null||e===void 0?void 0:e.error;if(!n||!(n instanceof Error)||typeof n.stack!==\"string\"){return}if(n.message.match(/(hydration|content does not match|did not match)/i)){n.message+=\"\\n\\nSee more info here: https://nextjs.org/docs/messages/react-hydration-error\"}var t=n;o.emit({type:o.TYPE_UNHANDLED_ERROR,reason:n,frames:(0,l.parseStack)(t.stack)})}function onUnhandledRejection(e){var n=e===null||e===void 0?void 0:e.reason;if(!n||!(n instanceof Error)||typeof n.stack!==\"string\"){return}var t=n;o.emit({type:o.TYPE_UNHANDLED_REJECTION,reason:n,frames:(0,l.parseStack)(t.stack)})}function register(){if(s){return}s=true;try{var e=Error.stackTraceLimit;Error.stackTraceLimit=50;u=e}catch(e){}window.addEventListener(\"error\",onUnhandledError);window.addEventListener(\"unhandledrejection\",onUnhandledRejection)}n.register=register;function unregister(){if(!s){return}s=false;if(u!==undefined){try{Error.stackTraceLimit=u}catch(e){}u=undefined}window.removeEventListener(\"error\",onUnhandledError);window.removeEventListener(\"unhandledrejection\",onUnhandledRejection)}n.unregister=unregister;function onBuildOk(){o.emit({type:o.TYPE_BUILD_OK})}n.onBuildOk=onBuildOk;function onBuildError(e){o.emit({type:o.TYPE_BUILD_ERROR,message:e})}n.onBuildError=onBuildError;function onRefresh(){o.emit({type:o.TYPE_REFRESH})}n.onRefresh=onRefresh;var c=t(88);r(n,c,\"getErrorByType\");var f=t(566);r(n,f,\"getServerError\");var d=t(282);r(n,d,\"default\",\"ReactDevOverlay\")},446:function(e,n,t){\"use strict\";var r=this&&this.__extends||function(){var extendStatics=function(e,n){extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)if(Object.prototype.hasOwnProperty.call(n,t))e[t]=n[t]};return extendStatics(e,n)};return function(e,n){if(typeof n!==\"function\"&&n!==null)throw new TypeError(\"Class extends value \"+String(n)+\" is not a constructor or null\");extendStatics(e,n);function __(){this.constructor=e}e.prototype=n===null?Object.create(n):(__.prototype=n.prototype,new __)}}();var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};n.__esModule=true;n.ErrorBoundary=void 0;var i=a(t(522));var o=function(e){r(ErrorBoundary,e);function ErrorBoundary(){var n=e!==null&&e.apply(this,arguments)||this;n.state={error:null};return n}ErrorBoundary.getDerivedStateFromError=function(e){return{error:e}};ErrorBoundary.prototype.componentDidCatch=function(e,n){this.props.onError(e,(n===null||n===void 0?void 0:n.componentStack)||null);if(!this.props.globalOverlay){this.setState({error:e})}};ErrorBoundary.prototype.render=function(){return this.state.error||this.props.globalOverlay&&this.props.isMounted?this.props.globalOverlay?i[\"default\"].createElement(\"html\",null,i[\"default\"].createElement(\"head\",null),i[\"default\"].createElement(\"body\",null)):null:this.props.children};return ErrorBoundary}(i[\"default\"].PureComponent);n.ErrorBoundary=o},282:function(e,n,t){\"use strict\";var r=this&&this.__assign||function(){r=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++){n=arguments[t];for(var a in n)if(Object.prototype.hasOwnProperty.call(n,a))e[a]=n[a]}return e};return r.apply(this,arguments)};var a=this&&this.__createBinding||(Object.create?function(e,n,t,r){if(r===undefined)r=t;var a=Object.getOwnPropertyDescriptor(n,t);if(!a||(\"get\"in a?!n.__esModule:a.writable||a.configurable)){a={enumerable:true,get:function(){return n[t]}}}Object.defineProperty(e,r,a)}:function(e,n,t,r){if(r===undefined)r=t;e[r]=n[t]});var i=this&&this.__setModuleDefault||(Object.create?function(e,n){Object.defineProperty(e,\"default\",{enumerable:true,value:n})}:function(e,n){e[\"default\"]=n});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var t in e)if(t!==\"default\"&&Object.prototype.hasOwnProperty.call(e,t))a(n,e,t);i(n,e);return n};var l=this&&this.__read||function(e,n){var t=typeof Symbol===\"function\"&&e[Symbol.iterator];if(!t)return e;var r=t.call(e),a,i=[],o;try{while((n===void 0||n-- >0)&&!(a=r.next()).done)i.push(a.value)}catch(e){o={error:e}}finally{try{if(a&&!a.done&&(t=r[\"return\"]))t.call(r)}finally{if(o)throw o.error}}return i};var s=this&&this.__spreadArray||function(e,n,t){if(t||arguments.length===2)for(var r=0,a=n.length,i;r<a;r++){if(i||!(r in n)){if(!i)i=Array.prototype.slice.call(n,0,r);i[r]=n[r]}}return e.concat(i||Array.prototype.slice.call(n))};n.__esModule=true;var u=o(t(522));var c=o(t(857));var f=t(77);var d=t(561);var p=t(546);var b=t(446);var v=t(106);var m=t(693);var g=t(775);function reducer(e,n){switch(n.type){case c.TYPE_BUILD_OK:{return r(r({},e),{buildError:null})}case c.TYPE_BUILD_ERROR:{return r(r({},e),{buildError:n.message})}case c.TYPE_REFRESH:{return r(r({},e),{buildError:null,errors:[]})}case c.TYPE_UNHANDLED_ERROR:case c.TYPE_UNHANDLED_REJECTION:{return r(r({},e),{nextId:e.nextId+1,errors:s(s([],l(e.errors.filter((function(e){return e.event.reason!==n.reason}))),false),[{id:e.nextId,event:n}],false)})}default:{var t=n;return e}}}var h=function ReactDevOverlay(e){var n=e.children,t=e.preventDisplay,r=e.globalOverlay;var a=l(u.useReducer(reducer,{nextId:1,buildError:null,errors:[]}),2),i=a[0],o=a[1];u.useEffect((function(){c.on(o);return function(){c.off(o)}}),[o]);var s=u.useCallback((function(e,n){}),[]);var h=i.buildError!=null;var y=Boolean(i.errors.length);var x=h||y;return u.createElement(u.Fragment,null,u.createElement(b.ErrorBoundary,{globalOverlay:r,isMounted:x,onError:s},n!==null&&n!==void 0?n:null),x?u.createElement(f.ShadowPortal,{globalOverlay:r},u.createElement(g.CssReset,null),u.createElement(v.Base,null),u.createElement(m.ComponentStyles,null),shouldPreventDisplay(h?\"build\":y?\"runtime\":null,t)?null:h?u.createElement(d.BuildError,{message:i.buildError}):y?u.createElement(p.Errors,{errors:i.errors}):undefined):undefined)};var shouldPreventDisplay=function(e,n){if(!n||!e){return false}return n.includes(e)};n[\"default\"]=h},857:function(e,n){\"use strict\";var t=this&&this.__assign||function(){t=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++){n=arguments[t];for(var a in n)if(Object.prototype.hasOwnProperty.call(n,a))e[a]=n[a]}return e};return t.apply(this,arguments)};n.__esModule=true;n.off=n.on=n.emit=n.TYPE_UNHANDLED_REJECTION=n.TYPE_UNHANDLED_ERROR=n.TYPE_REFRESH=n.TYPE_BUILD_ERROR=n.TYPE_BUILD_OK=void 0;n.TYPE_BUILD_OK=\"build-ok\";n.TYPE_BUILD_ERROR=\"build-error\";n.TYPE_REFRESH=\"fast-refresh\";n.TYPE_UNHANDLED_ERROR=\"unhandled-error\";n.TYPE_UNHANDLED_REJECTION=\"unhandled-rejection\";var r=new Set;var a=[];function drain(){setTimeout((function(){var _loop_1=function(){var e=a.shift();r.forEach((function(n){return n(e)}))};while(Boolean(a.length)&&Boolean(r.size)){_loop_1()}}),1)}function emit(e){a.push(Object.freeze(t({},e)));drain()}n.emit=emit;function on(e){if(r.has(e)){return false}r.add(e);drain();return true}n.on=on;function off(e){if(r.has(e)){r[\"delete\"](e);return true}return false}n.off=off},154:function(e,n,t){\"use strict\";var r=this&&this.__assign||function(){r=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++){n=arguments[t];for(var a in n)if(Object.prototype.hasOwnProperty.call(n,a))e[a]=n[a]}return e};return r.apply(this,arguments)};var a=this&&this.__createBinding||(Object.create?function(e,n,t,r){if(r===undefined)r=t;var a=Object.getOwnPropertyDescriptor(n,t);if(!a||(\"get\"in a?!n.__esModule:a.writable||a.configurable)){a={enumerable:true,get:function(){return n[t]}}}Object.defineProperty(e,r,a)}:function(e,n,t,r){if(r===undefined)r=t;e[r]=n[t]});var i=this&&this.__setModuleDefault||(Object.create?function(e,n){Object.defineProperty(e,\"default\",{enumerable:true,value:n})}:function(e,n){e[\"default\"]=n});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var t in e)if(t!==\"default\"&&Object.prototype.hasOwnProperty.call(e,t))a(n,e,t);i(n,e);return n};var l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};n.__esModule=true;n.CodeFrame=void 0;var s=l(t(152));var u=o(t(522));var c=l(t(518));var f=t(205);var d=function CodeFrame(e){var n=e.stackFrame,t=e.codeFrame;var a=u.useMemo((function(){var e=t.split(/\\r?\\n/g);var n=e.map((function(e){return/^>? +\\d+ +\\| ( *)/.exec((0,c[\"default\"])(e))})).filter(Boolean).map((function(e){return e.pop()})).reduce((function(e,n){return isNaN(e)?n.length:Math.min(e,n.length)}),NaN);if(n>1){var r=\" \".repeat(n);return e.map((function(e,n){return~(n=e.indexOf(\"|\"))?e.substring(0,n)+e.substring(n).replace(r,\"\"):e})).join(\"\\n\")}return e.join(\"\\n\")}),[t]);var i=u.useMemo((function(){return s[\"default\"].ansiToJson(a,{json:true,use_classes:true,remove_empty:true})}),[a]);var o=u.useCallback((function(){var e;var t=new URLSearchParams;for(var r in n){t.append(r,((e=n[r])!==null&&e!==void 0?e:\"\").toString())}self.fetch(\"\".concat( false||\"\",\"/__nextjs_launch-editor?\").concat(t.toString())).then((function(){}),(function(){console.error(\"There was an issue opening this code in your editor.\")}))}),[n]);return u.createElement(\"div\",{\"data-nextjs-codeframe\":true},u.createElement(\"div\",null,u.createElement(\"p\",{role:\"link\",onClick:o,tabIndex:1,title:\"Click to open in your editor\"},u.createElement(\"span\",null,(0,f.getFrameSource)(n),\" @ \",n.methodName),u.createElement(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 24 24\",fill:\"none\",stroke:\"currentColor\",strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\"},u.createElement(\"path\",{d:\"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6\"}),u.createElement(\"polyline\",{points:\"15 3 21 3 21 9\"}),u.createElement(\"line\",{x1:\"10\",y1:\"14\",x2:\"21\",y2:\"3\"})))),u.createElement(\"pre\",null,i.map((function(e,n){return u.createElement(\"span\",{key:\"frame-\".concat(n),style:r({color:e.fg?\"var(--color-\".concat(e.fg,\")\"):undefined},e.decoration===\"bold\"?{fontWeight:800}:e.decoration===\"italic\"?{fontStyle:\"italic\"}:undefined)},e.content)}))))};n.CodeFrame=d},30:function(e,n,t){\"use strict\";var r=this&&this.__createBinding||(Object.create?function(e,n,t,r){if(r===undefined)r=t;var a=Object.getOwnPropertyDescriptor(n,t);if(!a||(\"get\"in a?!n.__esModule:a.writable||a.configurable)){a={enumerable:true,get:function(){return n[t]}}}Object.defineProperty(e,r,a)}:function(e,n,t,r){if(r===undefined)r=t;e[r]=n[t]});n.__esModule=true;n.CodeFrame=void 0;var a=t(154);r(n,a,\"CodeFrame\")},265:function(e,n,t){\"use strict\";var r=this&&this.__makeTemplateObject||function(e,n){if(Object.defineProperty){Object.defineProperty(e,\"raw\",{value:n})}else{e.raw=n}return e};n.__esModule=true;n.styles=void 0;var a=t(464);var i=(0,a.noop)(o||(o=r([\"\\n [data-nextjs-codeframe] {\\n overflow: auto;\\n border-radius: var(--size-gap-half);\\n background-color: var(--color-ansi-bg);\\n color: var(--color-ansi-fg);\\n }\\n [data-nextjs-codeframe]::selection,\\n [data-nextjs-codeframe] *::selection {\\n background-color: var(--color-ansi-selection);\\n }\\n [data-nextjs-codeframe] * {\\n color: inherit;\\n background-color: transparent;\\n font-family: var(--font-stack-monospace);\\n }\\n\\n [data-nextjs-codeframe] > * {\\n margin: 0;\\n padding: calc(var(--size-gap) + var(--size-gap-half))\\n calc(var(--size-gap-double) + var(--size-gap-half));\\n }\\n [data-nextjs-codeframe] > div {\\n display: inline-block;\\n width: auto;\\n min-width: 100%;\\n border-bottom: 1px solid var(--color-ansi-bright-black);\\n }\\n [data-nextjs-codeframe] > div > p {\\n display: flex;\\n align-items: center;\\n justify-content: space-between;\\n cursor: pointer;\\n margin: 0;\\n }\\n [data-nextjs-codeframe] > div > p:hover {\\n text-decoration: underline dotted;\\n }\\n [data-nextjs-codeframe] div > p > svg {\\n width: auto;\\n height: 1em;\\n margin-left: 8px;\\n }\\n [data-nextjs-codeframe] div > pre {\\n overflow: hidden;\\n display: inline-block;\\n }\\n\"],[\"\\n [data-nextjs-codeframe] {\\n overflow: auto;\\n border-radius: var(--size-gap-half);\\n background-color: var(--color-ansi-bg);\\n color: var(--color-ansi-fg);\\n }\\n [data-nextjs-codeframe]::selection,\\n [data-nextjs-codeframe] *::selection {\\n background-color: var(--color-ansi-selection);\\n }\\n [data-nextjs-codeframe] * {\\n color: inherit;\\n background-color: transparent;\\n font-family: var(--font-stack-monospace);\\n }\\n\\n [data-nextjs-codeframe] > * {\\n margin: 0;\\n padding: calc(var(--size-gap) + var(--size-gap-half))\\n calc(var(--size-gap-double) + var(--size-gap-half));\\n }\\n [data-nextjs-codeframe] > div {\\n display: inline-block;\\n width: auto;\\n min-width: 100%;\\n border-bottom: 1px solid var(--color-ansi-bright-black);\\n }\\n [data-nextjs-codeframe] > div > p {\\n display: flex;\\n align-items: center;\\n justify-content: space-between;\\n cursor: pointer;\\n margin: 0;\\n }\\n [data-nextjs-codeframe] > div > p:hover {\\n text-decoration: underline dotted;\\n }\\n [data-nextjs-codeframe] div > p > svg {\\n width: auto;\\n height: 1em;\\n margin-left: 8px;\\n }\\n [data-nextjs-codeframe] div > pre {\\n overflow: hidden;\\n display: inline-block;\\n }\\n\"])));n.styles=i;var o},438:function(e,n,t){\"use strict\";var r=this&&this.__createBinding||(Object.create?function(e,n,t,r){if(r===undefined)r=t;var a=Object.getOwnPropertyDescriptor(n,t);if(!a||(\"get\"in a?!n.__esModule:a.writable||a.configurable)){a={enumerable:true,get:function(){return n[t]}}}Object.defineProperty(e,r,a)}:function(e,n,t,r){if(r===undefined)r=t;e[r]=n[t]});var a=this&&this.__setModuleDefault||(Object.create?function(e,n){Object.defineProperty(e,\"default\",{enumerable:true,value:n})}:function(e,n){e[\"default\"]=n});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var t in e)if(t!==\"default\"&&Object.prototype.hasOwnProperty.call(e,t))r(n,e,t);a(n,e);return n};var o=this&&this.__rest||function(e,n){var t={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&n.indexOf(r)<0)t[r]=e[r];if(e!=null&&typeof Object.getOwnPropertySymbols===\"function\")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++){if(n.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a]))t[r[a]]=e[r[a]]}return t};var l=this&&this.__read||function(e,n){var t=typeof Symbol===\"function\"&&e[Symbol.iterator];if(!t)return e;var r=t.call(e),a,i=[],o;try{while((n===void 0||n-- >0)&&!(a=r.next()).done)i.push(a.value)}catch(e){o={error:e}}finally{try{if(a&&!a.done&&(t=r[\"return\"]))t.call(r)}finally{if(o)throw o.error}}return i};n.__esModule=true;n.Dialog=void 0;var s=i(t(522));var u=t(196);var c=function Dialog(e){var n=e.children,t=e.type,r=e.onClose,a=o(e,[\"children\",\"type\",\"onClose\"]);var i=l(s.useState(null),2),c=i[0],f=i[1];var d=s.useCallback((function(e){f(e)}),[]);(0,u.useOnClickOutside)(c,r);s.useEffect((function(){if(c==null){return}var e=c.getRootNode();if(!(e instanceof ShadowRoot)){return}var n=e;function handler(e){var t=n.activeElement;if(e.key===\"Enter\"&&t instanceof HTMLElement&&t.getAttribute(\"role\")===\"link\"){e.preventDefault();e.stopPropagation();t.click()}}n.addEventListener(\"keydown\",handler);return function(){return n.removeEventListener(\"keydown\",handler)}}),[c]);return s.createElement(\"div\",{ref:d,\"data-nextjs-dialog\":true,tabIndex:-1,role:\"dialog\",\"aria-labelledby\":a[\"aria-labelledby\"],\"aria-describedby\":a[\"aria-describedby\"],\"aria-modal\":\"true\"},s.createElement(\"div\",{\"data-nextjs-dialog-banner\":true,className:\"banner-\".concat(t)}),n)};n.Dialog=c},593:function(e,n,t){\"use strict\";var r=this&&this.__createBinding||(Object.create?function(e,n,t,r){if(r===undefined)r=t;var a=Object.getOwnPropertyDescriptor(n,t);if(!a||(\"get\"in a?!n.__esModule:a.writable||a.configurable)){a={enumerable:true,get:function(){return n[t]}}}Object.defineProperty(e,r,a)}:function(e,n,t,r){if(r===undefined)r=t;e[r]=n[t]});var a=this&&this.__setModuleDefault||(Object.create?function(e,n){Object.defineProperty(e,\"default\",{enumerable:true,value:n})}:function(e,n){e[\"default\"]=n});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var t in e)if(t!==\"default\"&&Object.prototype.hasOwnProperty.call(e,t))r(n,e,t);a(n,e);return n};n.__esModule=true;n.DialogBody=void 0;var o=i(t(522));var l=function DialogBody(e){var n=e.children,t=e.className;return o.createElement(\"div\",{\"data-nextjs-dialog-body\":true,className:t},n)};n.DialogBody=l},725:function(e,n,t){\"use strict\";var r=this&&this.__createBinding||(Object.create?function(e,n,t,r){if(r===undefined)r=t;var a=Object.getOwnPropertyDescriptor(n,t);if(!a||(\"get\"in a?!n.__esModule:a.writable||a.configurable)){a={enumerable:true,get:function(){return n[t]}}}Object.defineProperty(e,r,a)}:function(e,n,t,r){if(r===undefined)r=t;e[r]=n[t]});var a=this&&this.__setModuleDefault||(Object.create?function(e,n){Object.defineProperty(e,\"default\",{enumerable:true,value:n})}:function(e,n){e[\"default\"]=n});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var t in e)if(t!==\"default\"&&Object.prototype.hasOwnProperty.call(e,t))r(n,e,t);a(n,e);return n};n.__esModule=true;n.DialogContent=void 0;var o=i(t(522));var l=function DialogContent(e){var n=e.children,t=e.className;return o.createElement(\"div\",{\"data-nextjs-dialog-content\":true,className:t},n)};n.DialogContent=l},289:function(e,n,t){\"use strict\";var r=this&&this.__createBinding||(Object.create?function(e,n,t,r){if(r===undefined)r=t;var a=Object.getOwnPropertyDescriptor(n,t);if(!a||(\"get\"in a?!n.__esModule:a.writable||a.configurable)){a={enumerable:true,get:function(){return n[t]}}}Object.defineProperty(e,r,a)}:function(e,n,t,r){if(r===undefined)r=t;e[r]=n[t]});var a=this&&this.__setModuleDefault||(Object.create?function(e,n){Object.defineProperty(e,\"default\",{enumerable:true,value:n})}:function(e,n){e[\"default\"]=n});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var t in e)if(t!==\"default\"&&Object.prototype.hasOwnProperty.call(e,t))r(n,e,t);a(n,e);return n};n.__esModule=true;n.DialogHeader=void 0;var o=i(t(522));var l=function DialogHeader(e){var n=e.children,t=e.className;return o.createElement(\"div\",{\"data-nextjs-dialog-header\":true,className:t},n)};n.DialogHeader=l},931:function(e,n,t){\"use strict\";var r=this&&this.__createBinding||(Object.create?function(e,n,t,r){if(r===undefined)r=t;var a=Object.getOwnPropertyDescriptor(n,t);if(!a||(\"get\"in a?!n.__esModule:a.writable||a.configurable)){a={enumerable:true,get:function(){return n[t]}}}Object.defineProperty(e,r,a)}:function(e,n,t,r){if(r===undefined)r=t;e[r]=n[t]});n.__esModule=true;n.styles=n.DialogHeader=n.DialogContent=n.DialogBody=n.Dialog=void 0;var a=t(438);r(n,a,\"Dialog\");var i=t(593);r(n,i,\"DialogBody\");var o=t(725);r(n,o,\"DialogContent\");var l=t(289);r(n,l,\"DialogHeader\");var s=t(663);r(n,s,\"styles\")},663:function(e,n,t){\"use strict\";var r=this&&this.__makeTemplateObject||function(e,n){if(Object.defineProperty){Object.defineProperty(e,\"raw\",{value:n})}else{e.raw=n}return e};n.__esModule=true;n.styles=void 0;var a=t(464);var i=(0,a.noop)(o||(o=r([\"\\n [data-nextjs-dialog] {\\n display: flex;\\n flex-direction: column;\\n width: 100%;\\n margin-right: auto;\\n margin-left: auto;\\n outline: none;\\n background: white;\\n border-radius: var(--size-gap);\\n box-shadow: 0 var(--size-gap-half) var(--size-gap-double)\\n rgba(0, 0, 0, 0.25);\\n max-height: calc(100% - 56px);\\n overflow-y: hidden;\\n }\\n\\n @media (max-height: 812px) {\\n [data-nextjs-dialog-overlay] {\\n max-height: calc(100% - 15px);\\n }\\n }\\n\\n @media (min-width: 576px) {\\n [data-nextjs-dialog] {\\n max-width: 540px;\\n box-shadow: 0 var(--size-gap) var(--size-gap-quad) rgba(0, 0, 0, 0.25);\\n }\\n }\\n\\n @media (min-width: 768px) {\\n [data-nextjs-dialog] {\\n max-width: 720px;\\n }\\n }\\n\\n @media (min-width: 992px) {\\n [data-nextjs-dialog] {\\n max-width: 960px;\\n }\\n }\\n\\n [data-nextjs-dialog-banner] {\\n position: relative;\\n }\\n [data-nextjs-dialog-banner].banner-warning {\\n border-color: var(--color-ansi-yellow);\\n }\\n [data-nextjs-dialog-banner].banner-error {\\n border-color: var(--color-ansi-red);\\n }\\n\\n [data-nextjs-dialog-banner]::after {\\n z-index: 2;\\n content: '';\\n position: absolute;\\n top: 0;\\n right: 0;\\n width: 100%;\\n /* banner width: */\\n border-top-width: var(--size-gap-half);\\n border-bottom-width: 0;\\n border-top-style: solid;\\n border-bottom-style: solid;\\n border-top-color: inherit;\\n border-bottom-color: transparent;\\n }\\n\\n [data-nextjs-dialog-content] {\\n overflow-y: auto;\\n border: none;\\n margin: 0;\\n /* calc(padding + banner width offset) */\\n padding: calc(var(--size-gap-double) + var(--size-gap-half))\\n var(--size-gap-double);\\n height: 100%;\\n display: flex;\\n flex-direction: column;\\n }\\n [data-nextjs-dialog-content] > [data-nextjs-dialog-header] {\\n flex-shrink: 0;\\n margin-bottom: var(--size-gap-double);\\n }\\n [data-nextjs-dialog-content] > [data-nextjs-dialog-body] {\\n position: relative;\\n flex: 1 1 auto;\\n }\\n\"],[\"\\n [data-nextjs-dialog] {\\n display: flex;\\n flex-direction: column;\\n width: 100%;\\n margin-right: auto;\\n margin-left: auto;\\n outline: none;\\n background: white;\\n border-radius: var(--size-gap);\\n box-shadow: 0 var(--size-gap-half) var(--size-gap-double)\\n rgba(0, 0, 0, 0.25);\\n max-height: calc(100% - 56px);\\n overflow-y: hidden;\\n }\\n\\n @media (max-height: 812px) {\\n [data-nextjs-dialog-overlay] {\\n max-height: calc(100% - 15px);\\n }\\n }\\n\\n @media (min-width: 576px) {\\n [data-nextjs-dialog] {\\n max-width: 540px;\\n box-shadow: 0 var(--size-gap) var(--size-gap-quad) rgba(0, 0, 0, 0.25);\\n }\\n }\\n\\n @media (min-width: 768px) {\\n [data-nextjs-dialog] {\\n max-width: 720px;\\n }\\n }\\n\\n @media (min-width: 992px) {\\n [data-nextjs-dialog] {\\n max-width: 960px;\\n }\\n }\\n\\n [data-nextjs-dialog-banner] {\\n position: relative;\\n }\\n [data-nextjs-dialog-banner].banner-warning {\\n border-color: var(--color-ansi-yellow);\\n }\\n [data-nextjs-dialog-banner].banner-error {\\n border-color: var(--color-ansi-red);\\n }\\n\\n [data-nextjs-dialog-banner]::after {\\n z-index: 2;\\n content: '';\\n position: absolute;\\n top: 0;\\n right: 0;\\n width: 100%;\\n /* banner width: */\\n border-top-width: var(--size-gap-half);\\n border-bottom-width: 0;\\n border-top-style: solid;\\n border-bottom-style: solid;\\n border-top-color: inherit;\\n border-bottom-color: transparent;\\n }\\n\\n [data-nextjs-dialog-content] {\\n overflow-y: auto;\\n border: none;\\n margin: 0;\\n /* calc(padding + banner width offset) */\\n padding: calc(var(--size-gap-double) + var(--size-gap-half))\\n var(--size-gap-double);\\n height: 100%;\\n display: flex;\\n flex-direction: column;\\n }\\n [data-nextjs-dialog-content] > [data-nextjs-dialog-header] {\\n flex-shrink: 0;\\n margin-bottom: var(--size-gap-double);\\n }\\n [data-nextjs-dialog-content] > [data-nextjs-dialog-body] {\\n position: relative;\\n flex: 1 1 auto;\\n }\\n\"])));n.styles=i;var o},652:function(e,n,t){\"use strict\";var r=this&&this.__createBinding||(Object.create?function(e,n,t,r){if(r===undefined)r=t;var a=Object.getOwnPropertyDescriptor(n,t);if(!a||(\"get\"in a?!n.__esModule:a.writable||a.configurable)){a={enumerable:true,get:function(){return n[t]}}}Object.defineProperty(e,r,a)}:function(e,n,t,r){if(r===undefined)r=t;e[r]=n[t]});var a=this&&this.__setModuleDefault||(Object.create?function(e,n){Object.defineProperty(e,\"default\",{enumerable:true,value:n})}:function(e,n){e[\"default\"]=n});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var t in e)if(t!==\"default\"&&Object.prototype.hasOwnProperty.call(e,t))r(n,e,t);a(n,e);return n};var o=this&&this.__read||function(e,n){var t=typeof Symbol===\"function\"&&e[Symbol.iterator];if(!t)return e;var r=t.call(e),a,i=[],o;try{while((n===void 0||n-- >0)&&!(a=r.next()).done)i.push(a.value)}catch(e){o={error:e}}finally{try{if(a&&!a.done&&(t=r[\"return\"]))t.call(r)}finally{if(o)throw o.error}}return i};n.__esModule=true;n.LeftRightDialogHeader=void 0;var l=i(t(522));var s=t(514);var u=function LeftRightDialogHeader(e){var n=e.children,t=e.className,r=e.previous,a=e.next,i=e.close;var u=l.useRef(null);var c=l.useRef(null);var f=l.useRef(null);var d=o(l.useState(null),2),p=d[0],b=d[1];var v=l.useCallback((function(e){b(e)}),[]);l.useEffect((function(){if(p==null){return}var e=p.getRootNode();var n=self.document;function handler(n){if(n.key===\"ArrowLeft\"){n.stopPropagation();if(u.current){u.current.focus()}r&&r()}else if(n.key===\"ArrowRight\"){n.stopPropagation();if(c.current){c.current.focus()}a&&a()}else if(n.key===\"Escape\"){n.stopPropagation();if(e instanceof ShadowRoot){var t=e.activeElement;if(t&&t!==f.current&&t instanceof HTMLElement){t.blur();return}}if(i){i()}}}e.addEventListener(\"keydown\",handler);if(e!==n){n.addEventListener(\"keydown\",handler)}return function(){e.removeEventListener(\"keydown\",handler);if(e!==n){n.removeEventListener(\"keydown\",handler)}}}),[i,p,a,r]);l.useEffect((function(){if(p==null){return}var e=p.getRootNode();if(e instanceof ShadowRoot){var n=e.activeElement;if(r==null){if(u.current&&n===u.current){u.current.blur()}}else if(a==null){if(c.current&&n===c.current){c.current.blur()}}}}),[p,a,r]);return l.createElement(\"div\",{\"data-nextjs-dialog-left-right\":true,className:t},l.createElement(\"nav\",{ref:v},l.createElement(\"button\",{ref:u,type:\"button\",disabled:r==null?true:undefined,\"aria-disabled\":r==null?true:undefined,onClick:r!==null&&r!==void 0?r:undefined},l.createElement(\"svg\",{viewBox:\"0 0 14 14\",fill:\"none\",xmlns:\"http://www.w3.org/2000/svg\"},l.createElement(\"path\",{d:\"M6.99996 1.16666L1.16663 6.99999L6.99996 12.8333M12.8333 6.99999H1.99996H12.8333Z\",stroke:\"currentColor\",strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\"}))),l.createElement(\"button\",{ref:c,type:\"button\",disabled:a==null?true:undefined,\"aria-disabled\":a==null?true:undefined,onClick:a!==null&&a!==void 0?a:undefined},l.createElement(\"svg\",{viewBox:\"0 0 14 14\",fill:\"none\",xmlns:\"http://www.w3.org/2000/svg\"},l.createElement(\"path\",{d:\"M6.99996 1.16666L12.8333 6.99999L6.99996 12.8333M1.16663 6.99999H12H1.16663Z\",stroke:\"currentColor\",strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\"}))),\" \",n),i?l.createElement(\"button\",{\"data-nextjs-errors-dialog-left-right-close-button\":true,ref:f,type:\"button\",onClick:i,\"aria-label\":\"Close\"},l.createElement(\"span\",{\"aria-hidden\":\"true\"},l.createElement(s.CloseIcon,null))):null)};n.LeftRightDialogHeader=u},16:function(e,n,t){\"use strict\";var r=this&&this.__createBinding||(Object.create?function(e,n,t,r){if(r===undefined)r=t;var a=Object.getOwnPropertyDescriptor(n,t);if(!a||(\"get\"in a?!n.__esModule:a.writable||a.configurable)){a={enumerable:true,get:function(){return n[t]}}}Object.defineProperty(e,r,a)}:function(e,n,t,r){if(r===undefined)r=t;e[r]=n[t]});n.__esModule=true;n.styles=n.LeftRightDialogHeader=void 0;var a=t(652);r(n,a,\"LeftRightDialogHeader\");var i=t(769);r(n,i,\"styles\")},769:function(e,n,t){\"use strict\";var r=this&&this.__makeTemplateObject||function(e,n){if(Object.defineProperty){Object.defineProperty(e,\"raw\",{value:n})}else{e.raw=n}return e};n.__esModule=true;n.styles=void 0;var a=t(464);var i=(0,a.noop)(o||(o=r([\"\\n [data-nextjs-dialog-left-right] {\\n display: flex;\\n flex-direction: row;\\n align-content: center;\\n align-items: center;\\n justify-content: space-between;\\n }\\n [data-nextjs-dialog-left-right] > nav > button {\\n display: inline-flex;\\n align-items: center;\\n justify-content: center;\\n\\n width: calc(var(--size-gap-double) + var(--size-gap));\\n height: calc(var(--size-gap-double) + var(--size-gap));\\n font-size: 0;\\n border: none;\\n background-color: rgba(255, 85, 85, 0.1);\\n color: var(--color-ansi-red);\\n cursor: pointer;\\n transition: background-color 0.25s ease;\\n }\\n [data-nextjs-dialog-left-right] > nav > button > svg {\\n width: auto;\\n height: calc(var(--size-gap) + var(--size-gap-half));\\n }\\n [data-nextjs-dialog-left-right] > nav > button:hover {\\n background-color: rgba(255, 85, 85, 0.2);\\n }\\n [data-nextjs-dialog-left-right] > nav > button:disabled {\\n background-color: rgba(255, 85, 85, 0.1);\\n color: rgba(255, 85, 85, 0.4);\\n cursor: not-allowed;\\n }\\n\\n [data-nextjs-dialog-left-right] > nav > button:first-of-type {\\n border-radius: var(--size-gap-half) 0 0 var(--size-gap-half);\\n margin-right: 1px;\\n }\\n [data-nextjs-dialog-left-right] > nav > button:last-of-type {\\n border-radius: 0 var(--size-gap-half) var(--size-gap-half) 0;\\n }\\n\\n [data-nextjs-dialog-left-right] > button:last-of-type {\\n border: 0;\\n padding: 0;\\n\\n background-color: transparent;\\n appearance: none;\\n\\n opacity: 0.4;\\n transition: opacity 0.25s ease;\\n }\\n [data-nextjs-dialog-left-right] > button:last-of-type:hover {\\n opacity: 0.7;\\n }\\n\"],[\"\\n [data-nextjs-dialog-left-right] {\\n display: flex;\\n flex-direction: row;\\n align-content: center;\\n align-items: center;\\n justify-content: space-between;\\n }\\n [data-nextjs-dialog-left-right] > nav > button {\\n display: inline-flex;\\n align-items: center;\\n justify-content: center;\\n\\n width: calc(var(--size-gap-double) + var(--size-gap));\\n height: calc(var(--size-gap-double) + var(--size-gap));\\n font-size: 0;\\n border: none;\\n background-color: rgba(255, 85, 85, 0.1);\\n color: var(--color-ansi-red);\\n cursor: pointer;\\n transition: background-color 0.25s ease;\\n }\\n [data-nextjs-dialog-left-right] > nav > button > svg {\\n width: auto;\\n height: calc(var(--size-gap) + var(--size-gap-half));\\n }\\n [data-nextjs-dialog-left-right] > nav > button:hover {\\n background-color: rgba(255, 85, 85, 0.2);\\n }\\n [data-nextjs-dialog-left-right] > nav > button:disabled {\\n background-color: rgba(255, 85, 85, 0.1);\\n color: rgba(255, 85, 85, 0.4);\\n cursor: not-allowed;\\n }\\n\\n [data-nextjs-dialog-left-right] > nav > button:first-of-type {\\n border-radius: var(--size-gap-half) 0 0 var(--size-gap-half);\\n margin-right: 1px;\\n }\\n [data-nextjs-dialog-left-right] > nav > button:last-of-type {\\n border-radius: 0 var(--size-gap-half) var(--size-gap-half) 0;\\n }\\n\\n [data-nextjs-dialog-left-right] > button:last-of-type {\\n border: 0;\\n padding: 0;\\n\\n background-color: transparent;\\n appearance: none;\\n\\n opacity: 0.4;\\n transition: opacity 0.25s ease;\\n }\\n [data-nextjs-dialog-left-right] > button:last-of-type:hover {\\n opacity: 0.7;\\n }\\n\"])));n.styles=i;var o},918:function(e,n,t){\"use strict\";var r=this&&this.__createBinding||(Object.create?function(e,n,t,r){if(r===undefined)r=t;var a=Object.getOwnPropertyDescriptor(n,t);if(!a||(\"get\"in a?!n.__esModule:a.writable||a.configurable)){a={enumerable:true,get:function(){return n[t]}}}Object.defineProperty(e,r,a)}:function(e,n,t,r){if(r===undefined)r=t;e[r]=n[t]});var a=this&&this.__setModuleDefault||(Object.create?function(e,n){Object.defineProperty(e,\"default\",{enumerable:true,value:n})}:function(e,n){e[\"default\"]=n});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var t in e)if(t!==\"default\"&&Object.prototype.hasOwnProperty.call(e,t))r(n,e,t);a(n,e);return n};var o=this&&this.__read||function(e,n){var t=typeof Symbol===\"function\"&&e[Symbol.iterator];if(!t)return e;var r=t.call(e),a,i=[],o;try{while((n===void 0||n-- >0)&&!(a=r.next()).done)i.push(a.value)}catch(e){o={error:e}}finally{try{if(a&&!a.done&&(t=r[\"return\"]))t.call(r)}finally{if(o)throw o.error}}return i};var l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};n.__esModule=true;n.Overlay=void 0;var s=l(t(890));var u=i(t(522));var c=t(644);var f=function Overlay(e){var n=e.className,t=e.children,r=e.fixed;u.useEffect((function(){(0,c.lock)();return function(){(0,c.unlock)()}}),[]);var a=o(u.useState(null),2),i=a[0],l=a[1];var f=u.useCallback((function(e){l(e)}),[]);u.useEffect((function(){if(i==null){return}var e=(0,s[\"default\"])({context:i});return function(){e.disengage()}}),[i]);return u.createElement(\"div\",{\"data-nextjs-dialog-overlay\":true,className:n,ref:f},u.createElement(\"div\",{\"data-nextjs-dialog-backdrop\":true,\"data-nextjs-dialog-backdrop-fixed\":r?true:undefined}),t)};n.Overlay=f},644:function(e,n){\"use strict\";n.__esModule=true;n.unlock=n.lock=void 0;var t;var r;var a=0;function lock(){setTimeout((function(){if(a++>0){return}var e=window.innerWidth-document.documentElement.clientWidth;if(e>0){t=document.body.style.paddingRight;document.body.style.paddingRight=\"\".concat(e,\"px\")}r=document.body.style.overflow;document.body.style.overflow=\"hidden\"}))}n.lock=lock;function unlock(){setTimeout((function(){if(a===0||--a!==0){return}if(t!==undefined){document.body.style.paddingRight=t;t=undefined}if(r!==undefined){document.body.style.overflow=r;r=undefined}}))}n.unlock=unlock},881:function(e,n,t){\"use strict\";var r=this&&this.__createBinding||(Object.create?function(e,n,t,r){if(r===undefined)r=t;var a=Object.getOwnPropertyDescriptor(n,t);if(!a||(\"get\"in a?!n.__esModule:a.writable||a.configurable)){a={enumerable:true,get:function(){return n[t]}}}Object.defineProperty(e,r,a)}:function(e,n,t,r){if(r===undefined)r=t;e[r]=n[t]});n.__esModule=true;n.Overlay=void 0;var a=t(918);r(n,a,\"Overlay\")},890:function(e,n,t){\"use strict\";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};n.__esModule=true;var a=r(t(962));var i=r(t(848));function nodeArray(e){if(!e){return[]}if(Array.isArray(e)){return e}if(e.nodeType!==undefined){return[e]}if(typeof e===\"string\"){e=document.querySelectorAll(e)}if(e.length!==undefined){return[].slice.call(e,0)}throw new TypeError(\"unexpected input \"+String(e))}function contextToElement(e){var n=e.context,t=e.label,r=t===undefined?\"context-to-element\":t,a=e.resolveDocument,i=e.defaultToDocument;var o=nodeArray(n)[0];if(a&&o&&o.nodeType===Node.DOCUMENT_NODE){o=o.documentElement}if(!o&&i){return document.documentElement}if(!o){throw new TypeError(r+\" requires valid options.context\")}if(o.nodeType!==Node.ELEMENT_NODE&&o.nodeType!==Node.DOCUMENT_FRAGMENT_NODE){throw new TypeError(r+\" requires options.context to be an Element\")}return o}function getShadowHost(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},n=e.context;var t=contextToElement({label:\"get/shadow-host\",context:n});var r=null;while(t){r=t;t=t.parentNode}if(r.nodeType===r.DOCUMENT_FRAGMENT_NODE&&r.host){return r.host}return null}function getDocument(e){if(!e){return document}if(e.nodeType===Node.DOCUMENT_NODE){return e}return e.ownerDocument||document}function isActiveElement(e){var n=contextToElement({label:\"is/active-element\",resolveDocument:true,context:e});var t=getDocument(n);if(t.activeElement===n){return true}var r=getShadowHost({context:n});if(r&&r.shadowRoot.activeElement===n){return true}return false}function getParents(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},n=e.context;var t=[];var r=contextToElement({label:\"get/parents\",context:n});while(r){t.push(r);r=r.parentNode;if(r&&r.nodeType!==Node.ELEMENT_NODE){r=null}}return t}var o=[\"matches\",\"webkitMatchesSelector\",\"mozMatchesSelector\",\"msMatchesSelector\"];var l=null;function findMethodName(e){o.some((function(n){if(!e[n]){return false}l=n;return true}))}function elementMatches(e,n){if(!l){findMethodName(e)}return e[l](n)}var s=JSON.parse(JSON.stringify(a[\"default\"]));var u=s.os.family||\"\";var c=u===\"Android\";var f=u.slice(0,7)===\"Windows\";var d=u===\"OS X\";var p=u===\"iOS\";var b=s.layout===\"Blink\";var v=s.layout===\"Gecko\";var m=s.layout===\"Trident\";var g=s.layout===\"EdgeHTML\";var h=s.layout===\"WebKit\";var y=parseFloat(s.version);var x=Math.floor(y);s.majorVersion=x;s.is={ANDROID:c,WINDOWS:f,OSX:d,IOS:p,BLINK:b,GECKO:v,TRIDENT:m,EDGE:g,WEBKIT:h,IE9:m&&x===9,IE10:m&&x===10,IE11:m&&x===11};function before(){var e={activeElement:document.activeElement,windowScrollTop:window.scrollTop,windowScrollLeft:window.scrollLeft,bodyScrollTop:document.body.scrollTop,bodyScrollLeft:document.body.scrollLeft};var n=document.createElement(\"iframe\");n.setAttribute(\"style\",\"position:absolute; position:fixed; top:0; left:-2px; width:1px; height:1px; overflow:hidden;\");n.setAttribute(\"aria-live\",\"off\");n.setAttribute(\"aria-busy\",\"true\");n.setAttribute(\"aria-hidden\",\"true\");document.body.appendChild(n);var t=n.contentWindow;var r=t.document;r.open();r.close();var a=r.createElement(\"div\");r.body.appendChild(a);e.iframe=n;e.wrapper=a;e.window=t;e.document=r;return e}function test(e,n){e.wrapper.innerHTML=\"\";var t=typeof n.element===\"string\"?e.document.createElement(n.element):n.element(e.wrapper,e.document);var r=n.mutate&&n.mutate(t,e.wrapper,e.document);if(!r&&r!==false){r=t}!t.parentNode&&e.wrapper.appendChild(t);r&&r.focus&&r.focus();return n.validate?n.validate(t,r,e.document):e.document.activeElement===r}function after(e){if(e.activeElement===document.body){document.activeElement&&document.activeElement.blur&&document.activeElement.blur();if(s.is.IE10){document.body.focus()}}else{e.activeElement&&e.activeElement.focus&&e.activeElement.focus()}document.body.removeChild(e.iframe);window.scrollTop=e.windowScrollTop;window.scrollLeft=e.windowScrollLeft;document.body.scrollTop=e.bodyScrollTop;document.body.scrollLeft=e.bodyScrollLeft}function detectFocus(e){var n=before();var t={};Object.keys(e).map((function(r){t[r]=test(n,e[r])}));after(n);return t}var w=\"1.4.1\";function readLocalStorage(e){var n=void 0;try{n=window.localStorage&&window.localStorage.getItem(e);n=n?JSON.parse(n):{}}catch(e){n={}}return n}function writeLocalStorage(e,n){if(!document.hasFocus()){try{window.localStorage&&window.localStorage.removeItem(e)}catch(e){}return}try{window.localStorage&&window.localStorage.setItem(e,JSON.stringify(n))}catch(e){}}var _=typeof window!==\"undefined\"&&window.navigator.userAgent||\"\";var E=\"ally-supports-cache\";var O=readLocalStorage(E);if(O.userAgent!==_||O.version!==w){O={}}O.userAgent=_;O.version=w;var S={get:function get(){return O},set:function set(e){Object.keys(e).forEach((function(n){O[n]=e[n]}));O.time=(new Date).toISOString();writeLocalStorage(E,O)}};function cssShadowPiercingDeepCombinator(){var e=void 0;try{document.querySelector(\"html >>> :first-child\");e=\">>>\"}catch(n){try{document.querySelector(\"html /deep/ :first-child\");e=\"/deep/\"}catch(n){e=\"\"}}return e}var j=\"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\";var k={element:\"div\",mutate:function mutate(e){e.innerHTML='<map name=\"image-map-tabindex-test\">'+'<area shape=\"rect\" coords=\"63,19,144,45\"></map>'+'<img usemap=\"#image-map-tabindex-test\" tabindex=\"-1\" alt=\"\" src=\"'+j+'\">';return e.querySelector(\"area\")}};var T={element:\"div\",mutate:function mutate(e){e.innerHTML='<map name=\"image-map-tabindex-test\">'+'<area href=\"#void\" tabindex=\"-1\" shape=\"rect\" coords=\"63,19,144,45\"></map>'+'<img usemap=\"#image-map-tabindex-test\" alt=\"\" src=\"'+j+'\">';return false},validate:function validate(e,n,t){if(s.is.GECKO){return true}var r=e.querySelector(\"area\");r.focus();return t.activeElement===r}};var C={element:\"div\",mutate:function mutate(e){e.innerHTML='<map name=\"image-map-area-href-test\">'+'<area shape=\"rect\" coords=\"63,19,144,45\"></map>'+'<img usemap=\"#image-map-area-href-test\" alt=\"\" src=\"'+j+'\">';return e.querySelector(\"area\")},validate:function validate(e,n,t){if(s.is.GECKO){return true}return t.activeElement===n}};var M={name:\"can-focus-audio-without-controls\",element:\"audio\",mutate:function mutate(e){try{e.setAttribute(\"src\",j)}catch(e){}}};var P=\"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ\";var A={element:\"div\",mutate:function mutate(e){e.innerHTML='<map name=\"broken-image-map-test\"><area href=\"#void\" shape=\"rect\" coords=\"63,19,144,45\"></map>'+'<img usemap=\"#broken-image-map-test\" alt=\"\" src=\"'+P+'\">';return e.querySelector(\"area\")}};var D={element:\"div\",mutate:function mutate(e){e.setAttribute(\"tabindex\",\"-1\");e.setAttribute(\"style\",\"display: -webkit-flex; display: -ms-flexbox; display: flex;\");e.innerHTML='<span style=\"display: block;\">hello</span>';return e.querySelector(\"span\")}};var N={element:\"fieldset\",mutate:function mutate(e){e.setAttribute(\"tabindex\",0);e.setAttribute(\"disabled\",\"disabled\")}};var z={element:\"fieldset\",mutate:function mutate(e){e.innerHTML=\"<legend>legend</legend><p>content</p>\"}};var I={element:\"span\",mutate:function mutate(e){e.setAttribute(\"style\",\"display: -webkit-flex; display: -ms-flexbox; display: flex;\");e.innerHTML='<span style=\"display: block;\">hello</span>'}};var R={element:\"form\",mutate:function mutate(e){e.setAttribute(\"tabindex\",0);e.setAttribute(\"disabled\",\"disabled\")}};var F={element:\"a\",mutate:function mutate(e){e.href=\"#void\";e.innerHTML='<img ismap src=\"'+j+'\" alt=\"\">';return e.querySelector(\"img\")}};var L={element:\"div\",mutate:function mutate(e){e.innerHTML='<map name=\"image-map-tabindex-test\"><area href=\"#void\" shape=\"rect\" coords=\"63,19,144,45\"></map>'+'<img usemap=\"#image-map-tabindex-test\" tabindex=\"-1\" alt=\"\" '+'src=\"'+j+'\">';return e.querySelector(\"img\")}};var B={element:function element(e,n){var t=n.createElement(\"iframe\");e.appendChild(t);var r=t.contentWindow.document;r.open();r.close();return t},mutate:function mutate(e){e.style.visibility=\"hidden\";var n=e.contentWindow.document;var t=n.createElement(\"input\");n.body.appendChild(t);return t},validate:function validate(e){var n=e.contentWindow.document;var t=n.querySelector(\"input\");return n.activeElement===t}};var H=!s.is.WEBKIT;function focusInZeroDimensionObject(){return H}var W={element:\"div\",mutate:function mutate(e){e.setAttribute(\"tabindex\",\"invalid-value\")}};var q={element:\"label\",mutate:function mutate(e){e.setAttribute(\"tabindex\",\"-1\")},validate:function validate(e,n,t){var r=e.offsetHeight;e.focus();return t.activeElement===e}};var G=\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtb\"+\"G5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBpZD0ic3ZnIj48dGV4dCB4PSIxMCIgeT0iMjAiIGlkPSJ\"+\"zdmctbGluay10ZXh0Ij50ZXh0PC90ZXh0Pjwvc3ZnPg==\";var U={element:\"object\",mutate:function mutate(e){e.setAttribute(\"type\",\"image/svg+xml\");e.setAttribute(\"data\",G);e.setAttribute(\"width\",\"200\");e.setAttribute(\"height\",\"50\");e.style.visibility=\"hidden\"}};var V={name:\"can-focus-object-svg\",element:\"object\",mutate:function mutate(e){e.setAttribute(\"type\",\"image/svg+xml\");e.setAttribute(\"data\",G);e.setAttribute(\"width\",\"200\");e.setAttribute(\"height\",\"50\")},validate:function validate(e,n,t){if(s.is.GECKO){return true}return t.activeElement===e}};var K=!s.is.IE9;function focusObjectSwf(){return K}var Z={element:\"div\",mutate:function mutate(e){e.innerHTML='<map name=\"focus-redirect-img-usemap\"><area href=\"#void\" shape=\"rect\" coords=\"63,19,144,45\"></map>'+'<img usemap=\"#focus-redirect-img-usemap\" alt=\"\" '+'src=\"'+j+'\">';return e.querySelector(\"img\")},validate:function validate(e,n,t){var r=e.querySelector(\"area\");return t.activeElement===r}};var $={element:\"fieldset\",mutate:function mutate(e){e.innerHTML='<legend>legend</legend><input tabindex=\"-1\"><input tabindex=\"0\">';return false},validate:function validate(e,n,t){var r=e.querySelector('input[tabindex=\"-1\"]');var a=e.querySelector('input[tabindex=\"0\"]');e.focus();e.querySelector(\"legend\").focus();return t.activeElement===r&&\"focusable\"||t.activeElement===a&&\"tabbable\"||\"\"}};var X={element:\"div\",mutate:function mutate(e){e.setAttribute(\"style\",\"width: 100px; height: 50px; overflow: auto;\");e.innerHTML='<div style=\"width: 500px; height: 40px;\">scrollable content</div>';return e.querySelector(\"div\")}};var J={element:\"div\",mutate:function mutate(e){e.setAttribute(\"style\",\"width: 100px; height: 50px;\");e.innerHTML='<div style=\"width: 500px; height: 40px;\">scrollable content</div>'}};var Y={element:\"div\",mutate:function mutate(e){e.setAttribute(\"style\",\"width: 100px; height: 50px; overflow: auto;\");e.innerHTML='<div style=\"width: 500px; height: 40px;\">scrollable content</div>'}};var Q={element:\"details\",mutate:function mutate(e){e.innerHTML=\"<summary>foo</summary><p>content</p>\";return e.firstElementChild}};function makeFocusableForeignObject(){var e=document.createElementNS(\"http://www.w3.org/2000/svg\",\"foreignObject\");e.width.baseVal.value=30;e.height.baseVal.value=30;e.appendChild(document.createElement(\"input\"));e.lastChild.type=\"text\";return e}function focusSvgForeignObjectHack(e){var n=e.ownerSVGElement||e.nodeName.toLowerCase()===\"svg\";if(!n){return false}var t=makeFocusableForeignObject();e.appendChild(t);var r=t.querySelector(\"input\");r.focus();r.disabled=true;e.removeChild(t);return true}function generate(e){return'<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">'+e+\"</svg>\"}function focus(e){if(e.focus){return}try{HTMLElement.prototype.focus.call(e)}catch(n){focusSvgForeignObjectHack(e)}}function validate(e,n,t){focus(n);return t.activeElement===n}var ee={element:\"div\",mutate:function mutate(e){e.innerHTML=generate('<text focusable=\"true\">a</text>');return e.querySelector(\"text\")},validate:validate};var ne={element:\"div\",mutate:function mutate(e){e.innerHTML=generate('<text tabindex=\"0\">a</text>');return e.querySelector(\"text\")},validate:validate};var te={element:\"div\",mutate:function mutate(e){e.innerHTML=generate('<text tabindex=\"-1\">a</text>');return e.querySelector(\"text\")},validate:validate};var re={element:\"div\",mutate:function mutate(e){e.innerHTML=generate(['<g id=\"ally-test-target\"><a xlink:href=\"#void\"><text>link</text></a></g>','<use xlink:href=\"#ally-test-target\" x=\"0\" y=\"0\" tabindex=\"-1\" />'].join(\"\"));return e.querySelector(\"use\")},validate:validate};var ae={element:\"div\",mutate:function mutate(e){e.innerHTML=generate('<foreignObject tabindex=\"-1\"><input type=\"text\" /></foreignObject>');return e.querySelector(\"foreignObject\")||e.getElementsByTagName(\"foreignObject\")[0]},validate:validate};var ie=Boolean(s.is.GECKO&&typeof SVGElement!==\"undefined\"&&SVGElement.prototype.focus);function focusSvgInIframe(){return ie}var oe={element:\"div\",mutate:function mutate(e){e.innerHTML=generate(\"\");return e.firstChild},validate:validate};var le={element:\"div\",mutate:function mutate(e){e.setAttribute(\"tabindex\",\"3x\")}};var se={element:\"table\",mutate:function mutate(e,n,t){var r=t.createDocumentFragment();r.innerHTML=\"<tr><td>cell</td></tr>\";e.appendChild(r)}};var ue={element:\"video\",mutate:function mutate(e){try{e.setAttribute(\"src\",j)}catch(e){}}};var ce=s.is.GECKO||s.is.TRIDENT||s.is.EDGE;function tabsequenceAreaAtImgPosition(){return ce}var fe={cssShadowPiercingDeepCombinator:cssShadowPiercingDeepCombinator,focusInZeroDimensionObject:focusInZeroDimensionObject,focusObjectSwf:focusObjectSwf,focusSvgInIframe:focusSvgInIframe,tabsequenceAreaAtImgPosition:tabsequenceAreaAtImgPosition};var de={focusAreaImgTabindex:k,focusAreaTabindex:T,focusAreaWithoutHref:C,focusAudioWithoutControls:M,focusBrokenImageMap:A,focusChildrenOfFocusableFlexbox:D,focusFieldsetDisabled:N,focusFieldset:z,focusFlexboxContainer:I,focusFormDisabled:R,focusImgIsmap:F,focusImgUsemapTabindex:L,focusInHiddenIframe:B,focusInvalidTabindex:W,focusLabelTabindex:q,focusObjectSvg:V,focusObjectSvgHidden:U,focusRedirectImgUsemap:Z,focusRedirectLegend:$,focusScrollBody:X,focusScrollContainerWithoutOverflow:J,focusScrollContainer:Y,focusSummary:Q,focusSvgFocusableAttribute:ee,focusSvgTabindexAttribute:ne,focusSvgNegativeTabindexAttribute:te,focusSvgUseTabindex:re,focusSvgForeignobjectTabindex:ae,focusSvg:oe,focusTabindexTrailingCharacters:le,focusTable:se,focusVideoWithoutControls:ue};function executeTests(){var e=detectFocus(de);Object.keys(fe).forEach((function(n){e[n]=fe[n]()}));return e}var pe=null;function _supports(){if(pe){return pe}pe=S.get();if(!pe.time){S.set(executeTests());pe=S.get()}return pe}var be=void 0;var ve=/^\\s*(-|\\+)?[0-9]+\\s*$/;var me=/^\\s*(-|\\+)?[0-9]+.*$/;function isValidTabindex(e){if(!be){be=_supports()}var n=be.focusTabindexTrailingCharacters?me:ve;var t=contextToElement({label:\"is/valid-tabindex\",resolveDocument:true,context:e});var r=t.hasAttribute(\"tabindex\");var a=t.hasAttribute(\"tabIndex\");if(!r&&!a){return false}var i=t.ownerSVGElement||t.nodeName.toLowerCase()===\"svg\";if(i&&!be.focusSvgTabindexAttribute){return false}if(be.focusInvalidTabindex){return true}var o=t.getAttribute(r?\"tabindex\":\"tabIndex\");if(o===\"-32768\"){return false}return Boolean(o&&n.test(o))}function tabindexValue(e){if(!isValidTabindex(e)){return null}var n=e.hasAttribute(\"tabindex\");var t=n?\"tabindex\":\"tabIndex\";var r=parseInt(e.getAttribute(t),10);return isNaN(r)?-1:r}function isUserModifyWritable(e){var n=e.webkitUserModify||\"\";return Boolean(n&&n.indexOf(\"write\")!==-1)}function hasCssOverflowScroll(e){return[e.getPropertyValue(\"overflow\"),e.getPropertyValue(\"overflow-x\"),e.getPropertyValue(\"overflow-y\")].some((function(e){return e===\"auto\"||e===\"scroll\"}))}function hasCssDisplayFlex(e){return e.display.indexOf(\"flex\")>-1}function isScrollableContainer(e,n,t,r){if(n!==\"div\"&&n!==\"span\"){return false}if(t&&t!==\"div\"&&t!==\"span\"&&!hasCssOverflowScroll(r)){return false}return e.offsetHeight<e.scrollHeight||e.offsetWidth<e.scrollWidth}var ge=void 0;function isFocusRelevantRules(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},n=e.context,t=e.except,r=t===undefined?{flexbox:false,scrollable:false,shadow:false}:t;if(!ge){ge=_supports()}var a=contextToElement({label:\"is/focus-relevant\",resolveDocument:true,context:n});if(!r.shadow&&a.shadowRoot){return true}var i=a.nodeName.toLowerCase();if(i===\"input\"&&a.type===\"hidden\"){return false}if(i===\"input\"||i===\"select\"||i===\"button\"||i===\"textarea\"){return true}if(i===\"legend\"&&ge.focusRedirectLegend){return true}if(i===\"label\"){return true}if(i===\"area\"){return true}if(i===\"a\"&&a.hasAttribute(\"href\")){return true}if(i===\"object\"&&a.hasAttribute(\"usemap\")){return false}if(i===\"object\"){var o=a.getAttribute(\"type\");if(!ge.focusObjectSvg&&o===\"image/svg+xml\"){return false}else if(!ge.focusObjectSwf&&o===\"application/x-shockwave-flash\"){return false}}if(i===\"iframe\"||i===\"object\"){return true}if(i===\"embed\"||i===\"keygen\"){return true}if(a.hasAttribute(\"contenteditable\")){return true}if(i===\"audio\"&&(ge.focusAudioWithoutControls||a.hasAttribute(\"controls\"))){return true}if(i===\"video\"&&(ge.focusVideoWithoutControls||a.hasAttribute(\"controls\"))){return true}if(ge.focusSummary&&i===\"summary\"){return true}var l=isValidTabindex(a);if(i===\"img\"&&a.hasAttribute(\"usemap\")){return l&&ge.focusImgUsemapTabindex||ge.focusRedirectImgUsemap}if(ge.focusTable&&(i===\"table\"||i===\"td\")){return true}if(ge.focusFieldset&&i===\"fieldset\"){return true}var s=i===\"svg\";var u=a.ownerSVGElement;var c=a.getAttribute(\"focusable\");var f=tabindexValue(a);if(i===\"use\"&&f!==null&&!ge.focusSvgUseTabindex){return false}if(i===\"foreignobject\"){return f!==null&&ge.focusSvgForeignobjectTabindex}if(elementMatches(a,\"svg a\")&&a.hasAttribute(\"xlink:href\")){return true}if((s||u)&&a.focus&&!ge.focusSvgNegativeTabindexAttribute&&f<0){return false}if(s){return l||ge.focusSvg||ge.focusSvgInIframe||Boolean(ge.focusSvgFocusableAttribute&&c&&c===\"true\")}if(u){if(ge.focusSvgTabindexAttribute&&l){return true}if(ge.focusSvgFocusableAttribute){return c===\"true\"}}if(l){return true}var d=window.getComputedStyle(a,null);if(isUserModifyWritable(d)){return true}if(ge.focusImgIsmap&&i===\"img\"&&a.hasAttribute(\"ismap\")){var p=getParents({context:a}).some((function(e){return e.nodeName.toLowerCase()===\"a\"&&e.hasAttribute(\"href\")}));if(p){return true}}if(!r.scrollable&&ge.focusScrollContainer){if(ge.focusScrollContainerWithoutOverflow){if(isScrollableContainer(a,i)){return true}}else if(hasCssOverflowScroll(d)){return true}}if(!r.flexbox&&ge.focusFlexboxContainer&&hasCssDisplayFlex(d)){return true}var b=a.parentElement;if(!r.scrollable&&b){var v=b.nodeName.toLowerCase();var m=window.getComputedStyle(b,null);if(ge.focusScrollBody&&isScrollableContainer(b,i,v,m)){return true}if(ge.focusChildrenOfFocusableFlexbox){if(hasCssDisplayFlex(m)){return true}}}return false}isFocusRelevantRules.except=function(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var n=function isFocusRelevant(n){return isFocusRelevantRules({context:n,except:e})};n.rules=isFocusRelevantRules;return n};var he=isFocusRelevantRules.except({});function findIndex(e,n){if(e.findIndex){return e.findIndex(n)}var t=e.length;if(t===0){return-1}for(var r=0;r<t;r++){if(n(e[r],r,e)){return r}}return-1}function getContentDocument(e){try{return e.contentDocument||e.contentWindow&&e.contentWindow.document||e.getSVGDocument&&e.getSVGDocument()||null}catch(e){return null}}function getWindow(e){var n=getDocument(e);return n.defaultView||window}var ye=void 0;function selectInShadows(e){if(typeof ye!==\"string\"){var n=cssShadowPiercingDeepCombinator();if(n){ye=\", html \"+n+\" \"}}if(!ye){return e}return e+ye+e.replace(/\\s*,\\s*/g,\",\").split(\",\").join(ye)}var xe=void 0;function findDocumentHostElement(e){if(!xe){xe=selectInShadows(\"object, iframe\")}if(e._frameElement!==undefined){return e._frameElement}e._frameElement=null;var n=e.parent.document.querySelectorAll(xe);[].some.call(n,(function(n){var t=getContentDocument(n);if(t!==e.document){return false}e._frameElement=n;return true}));return e._frameElement}function getFrameElement(e){var n=getWindow(e);if(!n.parent||n.parent===n){return null}try{return n.frameElement||findDocumentHostElement(n)}catch(e){return null}}var we=/^(area)$/;function computedStyle(e,n){return window.getComputedStyle(e,null).getPropertyValue(n)}function notDisplayed(e){return e.some((function(e){return computedStyle(e,\"display\")===\"none\"}))}function notVisible(e){var n=findIndex(e,(function(e){var n=computedStyle(e,\"visibility\");return n===\"hidden\"||n===\"collapse\"}));if(n===-1){return false}var t=findIndex(e,(function(e){return computedStyle(e,\"visibility\")===\"visible\"}));if(t===-1){return true}if(n<t){return true}return false}function collapsedParent(e){var n=1;if(e[0].nodeName.toLowerCase()===\"summary\"){n=2}return e.slice(n).some((function(e){return e.nodeName.toLowerCase()===\"details\"&&e.open===false}))}function isVisibleRules(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},n=e.context,t=e.except,r=t===undefined?{notRendered:false,cssDisplay:false,cssVisibility:false,detailsElement:false,browsingContext:false}:t;var a=contextToElement({label:\"is/visible\",resolveDocument:true,context:n});var i=a.nodeName.toLowerCase();if(!r.notRendered&&we.test(i)){return true}var o=getParents({context:a});var l=i===\"audio\"&&!a.hasAttribute(\"controls\");if(!r.cssDisplay&&notDisplayed(l?o.slice(1):o)){return false}if(!r.cssVisibility&&notVisible(o)){return false}if(!r.detailsElement&&collapsedParent(o)){return false}if(!r.browsingContext){var s=getFrameElement(a);var u=isVisibleRules.except(r);if(s&&!u(s)){return false}}return true}isVisibleRules.except=function(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var n=function isVisible(n){return isVisibleRules({context:n,except:e})};n.rules=isVisibleRules;return n};var _e=isVisibleRules.except({});function getMapByName(e,n){var t=n.querySelector('map[name=\"'+(0,i[\"default\"])(e)+'\"]');return t||null}function getImageOfArea(e){var n=e.parentElement;if(!n.name||n.nodeName.toLowerCase()!==\"map\"){return null}var t=getDocument(e);return t.querySelector('img[usemap=\"#'+(0,i[\"default\"])(n.name)+'\"]')||null}var Ee=void 0;function isValidArea(e){if(!Ee){Ee=_supports()}var n=contextToElement({label:\"is/valid-area\",context:e});var t=n.nodeName.toLowerCase();if(t!==\"area\"){return false}var r=n.hasAttribute(\"tabindex\");if(!Ee.focusAreaTabindex&&r){return false}var a=getImageOfArea(n);if(!a||!_e(a)){return false}if(!Ee.focusBrokenImageMap&&(!a.complete||!a.naturalHeight||a.offsetWidth<=0||a.offsetHeight<=0)){return false}if(!Ee.focusAreaWithoutHref&&!n.href){return Ee.focusAreaTabindex&&r||Ee.focusAreaImgTabindex&&a.hasAttribute(\"tabindex\")}var i=getParents({context:a}).slice(1).some((function(e){var n=e.nodeName.toLowerCase();return n===\"button\"||n===\"a\"}));if(i){return false}return true}var Oe=void 0;var Se=void 0;var je={input:true,select:true,textarea:true,button:true,fieldset:true,form:true};function isNativeDisabledSupported(e){if(!Oe){Oe=_supports();if(Oe.focusFieldsetDisabled){delete je.fieldset}if(Oe.focusFormDisabled){delete je.form}Se=new RegExp(\"^(\"+Object.keys(je).join(\"|\")+\")$\")}var n=contextToElement({label:\"is/native-disabled-supported\",context:e});var t=n.nodeName.toLowerCase();return Boolean(Se.test(t))}var ke=void 0;function isDisabledFieldset(e){var n=e.nodeName.toLowerCase();return n===\"fieldset\"&&e.disabled}function isDisabledForm(e){var n=e.nodeName.toLowerCase();return n===\"form\"&&e.disabled}function isDisabled(e){if(!ke){ke=_supports()}var n=contextToElement({label:\"is/disabled\",context:e});if(n.hasAttribute(\"data-ally-disabled\")){return true}if(!isNativeDisabledSupported(n)){return false}if(n.disabled){return true}var t=getParents({context:n});if(t.some(isDisabledFieldset)){return true}if(!ke.focusFormDisabled&&t.some(isDisabledForm)){return true}return false}function isOnlyTabbableRules(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},n=e.context,t=e.except,r=t===undefined?{onlyFocusableBrowsingContext:false,visible:false}:t;var a=contextToElement({label:\"is/only-tabbable\",resolveDocument:true,context:n});if(!r.visible&&!_e(a)){return false}if(!r.onlyFocusableBrowsingContext&&(s.is.GECKO||s.is.TRIDENT||s.is.EDGE)){var i=getFrameElement(a);if(i){if(tabindexValue(i)<0){return false}}}var o=a.nodeName.toLowerCase();var l=tabindexValue(a);if(o===\"label\"&&s.is.GECKO){return l!==null&&l>=0}if(s.is.GECKO&&a.ownerSVGElement&&!a.focus){if(o===\"a\"&&a.hasAttribute(\"xlink:href\")){if(s.is.GECKO){return true}}}return false}isOnlyTabbableRules.except=function(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var n=function isOnlyTabbable(n){return isOnlyTabbableRules({context:n,except:e})};n.rules=isOnlyTabbableRules;return n};var Te=isOnlyTabbableRules.except({});var Ce=void 0;function isOnlyFocusRelevant(e){var n=e.nodeName.toLowerCase();if(n===\"embed\"||n===\"keygen\"){return true}var t=tabindexValue(e);if(e.shadowRoot&&t===null){return true}if(n===\"label\"){return!Ce.focusLabelTabindex||t===null}if(n===\"legend\"){return t===null}if(Ce.focusSvgFocusableAttribute&&(e.ownerSVGElement||n===\"svg\")){var r=e.getAttribute(\"focusable\");return r&&r===\"false\"}if(n===\"img\"&&e.hasAttribute(\"usemap\")){return t===null||!Ce.focusImgUsemapTabindex}if(n===\"area\"){return!isValidArea(e)}return false}function isFocusableRules(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},n=e.context,t=e.except,r=t===undefined?{disabled:false,visible:false,onlyTabbable:false}:t;if(!Ce){Ce=_supports()}var a=Te.rules.except({onlyFocusableBrowsingContext:true,visible:r.visible});var i=contextToElement({label:\"is/focusable\",resolveDocument:true,context:n});var o=he.rules({context:i,except:r});if(!o||isOnlyFocusRelevant(i)){return false}if(!r.disabled&&isDisabled(i)){return false}if(!r.onlyTabbable&&a(i)){return false}if(!r.visible){var l={context:i,except:{}};if(Ce.focusInHiddenIframe){l.except.browsingContext=true}if(Ce.focusObjectSvgHidden){var s=i.nodeName.toLowerCase();if(s===\"object\"){l.except.cssVisibility=true}}if(!_e.rules(l)){return false}}var u=getFrameElement(i);if(u){var c=u.nodeName.toLowerCase();if(c===\"object\"&&!Ce.focusInZeroDimensionObject){if(!u.offsetWidth||!u.offsetHeight){return false}}}var f=i.nodeName.toLowerCase();if(f===\"svg\"&&Ce.focusSvgInIframe&&!u&&i.getAttribute(\"tabindex\")===null){return false}return true}isFocusableRules.except=function(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var n=function isFocusable(n){return isFocusableRules({context:n,except:e})};n.rules=isFocusableRules;return n};var Me=isFocusableRules.except({});function createFilter(e){var n=function filter(n){if(n.shadowRoot){return NodeFilter.FILTER_ACCEPT}if(e(n)){return NodeFilter.FILTER_ACCEPT}return NodeFilter.FILTER_SKIP};n.acceptNode=n;return n}var Pe=createFilter(he);function queryFocusableStrict(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},n=e.context,t=e.includeContext,r=e.includeOnlyTabbable,a=e.strategy;if(!n){n=document.documentElement}var i=Me.rules.except({onlyTabbable:r});var o=getDocument(n);var l=o.createTreeWalker(n,NodeFilter.SHOW_ELEMENT,a===\"all\"?Pe:createFilter(i),false);var s=[];while(l.nextNode()){if(l.currentNode.shadowRoot){if(i(l.currentNode)){s.push(l.currentNode)}s=s.concat(queryFocusableStrict({context:l.currentNode.shadowRoot,includeOnlyTabbable:r,strategy:a}))}else{s.push(l.currentNode)}}if(t){if(a===\"all\"){if(he(n)){s.unshift(n)}}else if(i(n)){s.unshift(n)}}return s}var Ae=void 0;var De=void 0;function selector$2(){if(!Ae){Ae=_supports()}if(typeof De===\"string\"){return De}De=\"\"+(Ae.focusTable?\"table, td,\":\"\")+(Ae.focusFieldset?\"fieldset,\":\"\")+\"svg a,\"+\"a[href],\"+\"area[href],\"+\"input, select, textarea, button,\"+\"iframe, object, embed,\"+\"keygen,\"+(Ae.focusAudioWithoutControls?\"audio,\":\"audio[controls],\")+(Ae.focusVideoWithoutControls?\"video,\":\"video[controls],\")+(Ae.focusSummary?\"summary,\":\"\")+\"[tabindex],\"+\"[contenteditable]\";De=selectInShadows(De);return De}function queryFocusableQuick(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},n=e.context,t=e.includeContext,r=e.includeOnlyTabbable;var a=selector$2();var i=n.querySelectorAll(a);var o=Me.rules.except({onlyTabbable:r});var l=[].filter.call(i,o);if(t&&o(n)){l.unshift(n)}return l}function queryFocusable(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},n=e.context,t=e.includeContext,r=e.includeOnlyTabbable,a=e.strategy,i=a===undefined?\"quick\":a;var o=contextToElement({label:\"query/focusable\",resolveDocument:true,defaultToDocument:true,context:n});var l={context:o,includeContext:t,includeOnlyTabbable:r,strategy:i};if(i===\"quick\"){return queryFocusableQuick(l)}else if(i===\"strict\"||i===\"all\"){return queryFocusableStrict(l)}throw new TypeError('query/focusable requires option.strategy to be one of [\"quick\", \"strict\", \"all\"]')}var Ne=void 0;var ze=/^(fieldset|table|td|body)$/;function isTabbableRules(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},n=e.context,t=e.except,r=t===undefined?{flexbox:false,scrollable:false,shadow:false,visible:false,onlyTabbable:false}:t;if(!Ne){Ne=_supports()}var a=contextToElement({label:\"is/tabbable\",resolveDocument:true,context:n});if(s.is.BLINK&&s.is.ANDROID&&s.majorVersion>42){return false}var i=getFrameElement(a);if(i){if(s.is.WEBKIT&&s.is.IOS){return false}if(tabindexValue(i)<0){return false}if(!r.visible&&(s.is.BLINK||s.is.WEBKIT)&&!_e(i)){return false}var o=i.nodeName.toLowerCase();if(o===\"object\"){var l=s.name===\"Chrome\"&&s.majorVersion>=54||s.name===\"Opera\"&&s.majorVersion>=41;if(s.is.WEBKIT||s.is.BLINK&&!l){return false}}}var u=a.nodeName.toLowerCase();var c=tabindexValue(a);var f=c===null?null:c>=0;if(s.is.EDGE&&s.majorVersion>=14&&i&&a.ownerSVGElement&&c<0){return true}var d=f!==false;var p=c!==null&&c>=0;if(a.hasAttribute(\"contenteditable\")){return d}if(ze.test(u)&&f!==true){return false}if(s.is.WEBKIT&&s.is.IOS){var b=u===\"input\"&&a.type===\"text\"||a.type===\"password\"||u===\"select\"||u===\"textarea\"||a.hasAttribute(\"contenteditable\");if(!b){var v=window.getComputedStyle(a,null);b=isUserModifyWritable(v)}if(!b){return false}}if(u===\"use\"&&c!==null){if(s.is.BLINK||s.is.WEBKIT&&s.majorVersion===9){return true}}if(elementMatches(a,\"svg a\")&&a.hasAttribute(\"xlink:href\")){if(d){return true}if(a.focus&&!Ne.focusSvgNegativeTabindexAttribute){return true}}if(u===\"svg\"&&Ne.focusSvgInIframe&&d){return true}if(s.is.TRIDENT||s.is.EDGE){if(u===\"svg\"){if(Ne.focusSvg){return true}return a.hasAttribute(\"focusable\")||p}if(a.ownerSVGElement){if(Ne.focusSvgTabindexAttribute&&p){return true}return a.hasAttribute(\"focusable\")}}if(a.tabIndex===undefined){return Boolean(r.onlyTabbable)}if(u===\"audio\"){if(!a.hasAttribute(\"controls\")){return false}else if(s.is.BLINK){return true}}if(u===\"video\"){if(!a.hasAttribute(\"controls\")){if(s.is.TRIDENT||s.is.EDGE){return false}}else if(s.is.BLINK||s.is.GECKO){return true}}if(u===\"object\"){if(s.is.BLINK||s.is.WEBKIT){return false}}if(u===\"iframe\"){return false}if(!r.scrollable&&s.is.GECKO){var m=window.getComputedStyle(a,null);if(hasCssOverflowScroll(m)){return d}}if(s.is.TRIDENT||s.is.EDGE){if(u===\"area\"){var g=getImageOfArea(a);if(g&&tabindexValue(g)<0){return false}}var h=window.getComputedStyle(a,null);if(isUserModifyWritable(h)){return a.tabIndex>=0}if(!r.flexbox&&hasCssDisplayFlex(h)){if(c!==null){return p}return Ie(a)&&Re(a)}if(isScrollableContainer(a,u)){return false}var y=a.parentElement;if(y){var x=y.nodeName.toLowerCase();var w=window.getComputedStyle(y,null);if(isScrollableContainer(y,u,x,w)){return false}if(hasCssDisplayFlex(w)){return p}}}return a.tabIndex>=0}isTabbableRules.except=function(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var n=function isTabbable(n){return isTabbableRules({context:n,except:e})};n.rules=isTabbableRules;return n};var Ie=he.rules.except({flexbox:true});var Re=isTabbableRules.except({flexbox:true});var Fe=isTabbableRules.except({});function queryTabbable(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},n=e.context,t=e.includeContext,r=e.includeOnlyTabbable,a=e.strategy;var i=Fe.rules.except({onlyTabbable:r});return queryFocusable({context:n,includeContext:t,includeOnlyTabbable:r,strategy:a}).filter(i)}function compareDomPosition(e,n){return e.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1}function sortDomOrder(e){return e.sort(compareDomPosition)}function getFirstSuccessorOffset(e,n){return findIndex(e,(function(e){return n.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING}))}function findInsertionOffsets(e,n,t){var r=[];n.forEach((function(n){var a=true;var i=e.indexOf(n);if(i===-1){i=getFirstSuccessorOffset(e,n);a=false}if(i===-1){i=e.length}var o=nodeArray(t?t(n):n);if(!o.length){return}r.push({offset:i,replace:a,elements:o})}));return r}function insertElementsAtOffsets(e,n){var t=0;n.sort((function(e,n){return e.offset-n.offset}));n.forEach((function(n){var r=n.replace?1:0;var a=[n.offset+t,r].concat(n.elements);e.splice.apply(e,a);t+=n.elements.length-r}))}function mergeInDomOrder(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},n=e.list,t=e.elements,r=e.resolveElement;var a=n.slice(0);var i=nodeArray(t).slice(0);sortDomOrder(i);var o=findInsertionOffsets(a,i,r);insertElementsAtOffsets(a,o);return a}var Le=function(){function defineProperties(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||false;r.configurable=true;if(\"value\"in r)r.writable=true;Object.defineProperty(e,r.key,r)}}return function(e,n,t){if(n)defineProperties(e.prototype,n);if(t)defineProperties(e,t);return e}}();function _classCallCheck(e,n){if(!(e instanceof n)){throw new TypeError(\"Cannot call a class as a function\")}}var Be=function(){function Maps(e){_classCallCheck(this,Maps);this._document=getDocument(e);this.maps={}}Le(Maps,[{key:\"getAreasFor\",value:function getAreasFor(e){if(!this.maps[e]){this.addMapByName(e)}return this.maps[e]}},{key:\"addMapByName\",value:function addMapByName(e){var n=getMapByName(e,this._document);if(!n){return}this.maps[n.name]=queryTabbable({context:n})}},{key:\"extractAreasFromList\",value:function extractAreasFromList(e){return e.filter((function(e){var n=e.nodeName.toLowerCase();if(n!==\"area\"){return true}var t=e.parentNode;if(!this.maps[t.name]){this.maps[t.name]=[]}this.maps[t.name].push(e);return false}),this)}}]);return Maps}();function sortArea(e,n){var t=n.querySelectorAll(\"img[usemap]\");var r=new Be(n);var a=r.extractAreasFromList(e);if(!t.length){return a}return mergeInDomOrder({list:a,elements:t,resolveElement:function resolveElement(e){var n=e.getAttribute(\"usemap\").slice(1);return r.getAreasFor(n)}})}var He=function(){function defineProperties(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||false;r.configurable=true;if(\"value\"in r)r.writable=true;Object.defineProperty(e,r.key,r)}}return function(e,n,t){if(n)defineProperties(e.prototype,n);if(t)defineProperties(e,t);return e}}();function _classCallCheck$1(e,n){if(!(e instanceof n)){throw new TypeError(\"Cannot call a class as a function\")}}var We=function(){function Shadows(e,n){_classCallCheck$1(this,Shadows);this.context=e;this.sortElements=n;this.hostCounter=1;this.inHost={};this.inDocument=[];this.hosts={};this.elements={}}He(Shadows,[{key:\"_registerHost\",value:function _registerHost(e){if(e._sortingId){return}e._sortingId=\"shadow-\"+this.hostCounter++;this.hosts[e._sortingId]=e;var n=getShadowHost({context:e});if(n){this._registerHost(n);this._registerHostParent(e,n)}else{this.inDocument.push(e)}}},{key:\"_registerHostParent\",value:function _registerHostParent(e,n){if(!this.inHost[n._sortingId]){this.inHost[n._sortingId]=[]}this.inHost[n._sortingId].push(e)}},{key:\"_registerElement\",value:function _registerElement(e,n){if(!this.elements[n._sortingId]){this.elements[n._sortingId]=[]}this.elements[n._sortingId].push(e)}},{key:\"extractElements\",value:function extractElements(e){return e.filter((function(e){var n=getShadowHost({context:e});if(!n){return true}this._registerHost(n);this._registerElement(e,n);return false}),this)}},{key:\"sort\",value:function sort(e){var n=this._injectHosts(e);n=this._replaceHosts(n);this._cleanup();return n}},{key:\"_injectHosts\",value:function _injectHosts(e){Object.keys(this.hosts).forEach((function(e){var n=this.elements[e];var t=this.inHost[e];var r=this.hosts[e].shadowRoot;this.elements[e]=this._merge(n,t,r)}),this);return this._merge(e,this.inDocument,this.context)}},{key:\"_merge\",value:function _merge(e,n,t){var r=mergeInDomOrder({list:e,elements:n});return this.sortElements(r,t)}},{key:\"_replaceHosts\",value:function _replaceHosts(e){return mergeInDomOrder({list:e,elements:this.inDocument,resolveElement:this._resolveHostElement.bind(this)})}},{key:\"_resolveHostElement\",value:function _resolveHostElement(e){var n=mergeInDomOrder({list:this.elements[e._sortingId],elements:this.inHost[e._sortingId],resolveElement:this._resolveHostElement.bind(this)});var t=tabindexValue(e);if(t!==null&&t>-1){return[e].concat(n)}return n}},{key:\"_cleanup\",value:function _cleanup(){Object.keys(this.hosts).forEach((function(e){delete this.hosts[e]._sortingId}),this)}}]);return Shadows}();function sortShadowed(e,n,t){var r=new We(n,t);var a=r.extractElements(e);if(a.length===e.length){return t(e)}return r.sort(a)}function sortTabindex(e){var n={};var t=[];var r=e.filter((function(e){var r=e.tabIndex;if(r===undefined){r=tabindexValue(e)}if(r<=0||r===null||r===undefined){return true}if(!n[r]){n[r]=[];t.push(r)}n[r].push(e);return false}));var a=t.sort().map((function(e){return n[e]})).reduceRight((function(e,n){return n.concat(e)}),r);return a}var qe=void 0;function moveContextToBeginning(e,n){var t=e.indexOf(n);if(t>0){var r=e.splice(t,1);return r.concat(e)}return e}function sortElements(e,n){if(qe.tabsequenceAreaAtImgPosition){e=sortArea(e,n)}e=sortTabindex(e);return e}function queryTabsequence(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},n=e.context,t=e.includeContext,r=e.includeOnlyTabbable,a=e.strategy;if(!qe){qe=_supports()}var i=nodeArray(n)[0]||document.documentElement;var o=queryTabbable({context:i,includeContext:t,includeOnlyTabbable:r,strategy:a});if(document.body.createShadowRoot&&s.is.BLINK){o=sortShadowed(o,i,sortElements)}else{o=sortElements(o,i)}if(t){o=moveContextToBeginning(o,i)}return o}var Ge={tab:9,left:37,up:38,right:39,down:40,pageUp:33,\"page-up\":33,pageDown:34,\"page-down\":34,end:35,home:36,enter:13,escape:27,space:32,shift:16,capsLock:20,\"caps-lock\":20,ctrl:17,alt:18,meta:91,pause:19,insert:45,delete:46,backspace:8,_alias:{91:[92,93,224]}};for(var Ue=1;Ue<26;Ue++){Ge[\"f\"+Ue]=Ue+111}for(var Ve=0;Ve<10;Ve++){var Ke=Ve+48;var Ze=Ve+96;Ge[Ve]=Ke;Ge[\"num-\"+Ve]=Ze;Ge._alias[Ke]=[Ze]}for(var $e=0;$e<26;$e++){var Xe=$e+65;var Je=String.fromCharCode(Xe).toLowerCase();Ge[Je]=Xe}var Ye={alt:\"altKey\",ctrl:\"ctrlKey\",meta:\"metaKey\",shift:\"shiftKey\"};var Qe=Object.keys(Ye).map((function(e){return Ye[e]}));function createExpectedModifiers(e){var n=e?null:false;return{altKey:n,ctrlKey:n,metaKey:n,shiftKey:n}}function resolveModifiers(e){var n=e.indexOf(\"*\")!==-1;var t=createExpectedModifiers(n);e.forEach((function(e){if(e===\"*\"){return}var n=true;var r=e.slice(0,1);if(r===\"?\"){n=null}else if(r===\"!\"){n=false}if(n!==true){e=e.slice(1)}var a=Ye[e];if(!a){throw new TypeError('Unknown modifier \"'+e+'\"')}t[a]=n}));return t}function resolveKey(e){var n=Ge[e]||parseInt(e,10);if(!n||typeof n!==\"number\"||isNaN(n)){throw new TypeError('Unknown key \"'+e+'\"')}return[n].concat(Ge._alias[n]||[])}function matchModifiers(e,n){return!Qe.some((function(t){return typeof e[t]===\"boolean\"&&Boolean(n[t])!==e[t]}))}function keyBinding(e){return e.split(/\\s+/).map((function(e){var n=e.split(\"+\");var t=resolveModifiers(n.slice(0,-1));var r=resolveKey(n.slice(-1));return{keyCodes:r,modifiers:t,matchModifiers:matchModifiers.bind(null,t)}}))}function getParentComparator(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},n=e.parent,t=e.element,r=e.includeSelf;if(n){return function isChildOf(e){return Boolean(r&&e===n||n.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)}}else if(t){return function isParentOf(e){return Boolean(r&&t===e||e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)}}throw new TypeError(\"util/compare-position#getParentComparator required either options.parent or options.element\")}function whenKey(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var n={};var t=nodeArray(e.context)[0]||document.documentElement;delete e.context;var r=nodeArray(e.filter);delete e.filter;var a=Object.keys(e);if(!a.length){throw new TypeError(\"when/key requires at least one option key\")}var i=function registerBinding(e){e.keyCodes.forEach((function(t){if(!n[t]){n[t]=[]}n[t].push(e)}))};a.forEach((function(n){if(typeof e[n]!==\"function\"){throw new TypeError('when/key requires option[\"'+n+'\"] to be a function')}var t=function addCallback(t){t.callback=e[n];return t};keyBinding(n).map(t).forEach(i)}));var o=function handleKeyDown(e){if(e.defaultPrevented){return}if(r.length){var a=getParentComparator({element:e.target,includeSelf:true});if(r.some(a)){return}}var i=e.keyCode||e.which;if(!n[i]){return}n[i].forEach((function(n){if(!n.matchModifiers(e)){return}n.callback.call(t,e,l)}))};t.addEventListener(\"keydown\",o,false);var l=function disengage(){t.removeEventListener(\"keydown\",o,false)};return{disengage:l}}function default_1(e){var n=e===void 0?{}:e,t=n.context;if(!t){t=document.documentElement}queryTabsequence();return whenKey({\"?alt+?shift+tab\":function altShiftTab(e){e.preventDefault();var n=queryTabsequence({context:t});var r=e.shiftKey;var a=n[0];var i=n[n.length-1];var o=r?a:i;var l=r?i:a;if(isActiveElement(o)){l.focus();return}var s=void 0;var u=n.some((function(e,n){if(!isActiveElement(e)){return false}s=n;return true}));if(!u){a.focus();return}var c=r?-1:1;n[s+c].focus()}})}n[\"default\"]=default_1},541:function(e,n,t){\"use strict\";var r=this&&this.__makeTemplateObject||function(e,n){if(Object.defineProperty){Object.defineProperty(e,\"raw\",{value:n})}else{e.raw=n}return e};n.__esModule=true;n.styles=void 0;var a=t(464);var i=(0,a.noop)(o||(o=r([\"\\n [data-nextjs-dialog-overlay] {\\n position: fixed;\\n top: 0;\\n right: 0;\\n bottom: 0;\\n left: 0;\\n overflow: auto;\\n z-index: 9000;\\n\\n display: flex;\\n align-content: center;\\n align-items: center;\\n flex-direction: column;\\n padding: 10vh 15px 0;\\n }\\n\\n @media (max-height: 812px) {\\n [data-nextjs-dialog-overlay] {\\n padding: 15px 15px 0;\\n }\\n }\\n\\n [data-nextjs-dialog-backdrop] {\\n position: fixed;\\n top: 0;\\n right: 0;\\n bottom: 0;\\n left: 0;\\n background-color: rgba(17, 17, 17, 0.2);\\n pointer-events: all;\\n z-index: -1;\\n }\\n\\n [data-nextjs-dialog-backdrop-fixed] {\\n cursor: not-allowed;\\n -webkit-backdrop-filter: blur(8px);\\n backdrop-filter: blur(8px);\\n }\\n\"],[\"\\n [data-nextjs-dialog-overlay] {\\n position: fixed;\\n top: 0;\\n right: 0;\\n bottom: 0;\\n left: 0;\\n overflow: auto;\\n z-index: 9000;\\n\\n display: flex;\\n align-content: center;\\n align-items: center;\\n flex-direction: column;\\n padding: 10vh 15px 0;\\n }\\n\\n @media (max-height: 812px) {\\n [data-nextjs-dialog-overlay] {\\n padding: 15px 15px 0;\\n }\\n }\\n\\n [data-nextjs-dialog-backdrop] {\\n position: fixed;\\n top: 0;\\n right: 0;\\n bottom: 0;\\n left: 0;\\n background-color: rgba(17, 17, 17, 0.2);\\n pointer-events: all;\\n z-index: -1;\\n }\\n\\n [data-nextjs-dialog-backdrop-fixed] {\\n cursor: not-allowed;\\n -webkit-backdrop-filter: blur(8px);\\n backdrop-filter: blur(8px);\\n }\\n\"])));n.styles=i;var o},77:function(e,n,t){\"use strict\";var r=this&&this.__createBinding||(Object.create?function(e,n,t,r){if(r===undefined)r=t;var a=Object.getOwnPropertyDescriptor(n,t);if(!a||(\"get\"in a?!n.__esModule:a.writable||a.configurable)){a={enumerable:true,get:function(){return n[t]}}}Object.defineProperty(e,r,a)}:function(e,n,t,r){if(r===undefined)r=t;e[r]=n[t]});var a=this&&this.__setModuleDefault||(Object.create?function(e,n){Object.defineProperty(e,\"default\",{enumerable:true,value:n})}:function(e,n){e[\"default\"]=n});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var t in e)if(t!==\"default\"&&Object.prototype.hasOwnProperty.call(e,t))r(n,e,t);a(n,e);return n};var o=this&&this.__read||function(e,n){var t=typeof Symbol===\"function\"&&e[Symbol.iterator];if(!t)return e;var r=t.call(e),a,i=[],o;try{while((n===void 0||n-- >0)&&!(a=r.next()).done)i.push(a.value)}catch(e){o={error:e}}finally{try{if(a&&!a.done&&(t=r[\"return\"]))t.call(r)}finally{if(o)throw o.error}}return i};n.__esModule=true;n.ShadowPortal=void 0;var l=i(t(522));var s=t(255);var u=function Portal(e){var n=e.children,t=e.globalOverlay;var r=l.useRef(null);var a=l.useRef(null);var i=l.useRef(null);var u=o(l.useState(),2),c=u[1];l.useLayoutEffect((function(){var e=t?document:r.current.ownerDocument;a.current=e.createElement(\"nextjs-portal\");i.current=a.current.attachShadow({mode:\"open\"});e.body.appendChild(a.current);c({});return function(){if(a.current&&a.current.ownerDocument){a.current.ownerDocument.body.removeChild(a.current)}}}),[t]);return i.current?(0,s.createPortal)(n,i.current):t?null:l.createElement(\"span\",{ref:r})};n.ShadowPortal=u},506:function(e,n,t){\"use strict\";var r=this&&this.__assign||function(){r=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++){n=arguments[t];for(var a in n)if(Object.prototype.hasOwnProperty.call(n,a))e[a]=n[a]}return e};return r.apply(this,arguments)};var a=this&&this.__createBinding||(Object.create?function(e,n,t,r){if(r===undefined)r=t;var a=Object.getOwnPropertyDescriptor(n,t);if(!a||(\"get\"in a?!n.__esModule:a.writable||a.configurable)){a={enumerable:true,get:function(){return n[t]}}}Object.defineProperty(e,r,a)}:function(e,n,t,r){if(r===undefined)r=t;e[r]=n[t]});var i=this&&this.__setModuleDefault||(Object.create?function(e,n){Object.defineProperty(e,\"default\",{enumerable:true,value:n})}:function(e,n){e[\"default\"]=n});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var t in e)if(t!==\"default\"&&Object.prototype.hasOwnProperty.call(e,t))a(n,e,t);i(n,e);return n};var l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};n.__esModule=true;n.Terminal=void 0;var s=l(t(152));var u=o(t(522));var c=function Terminal(e){var n=e.content;var t=u.useMemo((function(){return s[\"default\"].ansiToJson(n,{json:true,use_classes:true,remove_empty:true})}),[n]);return u.createElement(\"div\",{\"data-nextjs-terminal\":true},u.createElement(\"pre\",null,t.map((function(e,n){return u.createElement(\"span\",{key:\"terminal-entry-\".concat(n),style:r({color:e.fg?\"var(--color-\".concat(e.fg,\")\"):undefined},e.decoration===\"bold\"?{fontWeight:800}:e.decoration===\"italic\"?{fontStyle:\"italic\"}:undefined)},e.content)}))))};n.Terminal=c},966:function(e,n,t){\"use strict\";var r=this&&this.__createBinding||(Object.create?function(e,n,t,r){if(r===undefined)r=t;var a=Object.getOwnPropertyDescriptor(n,t);if(!a||(\"get\"in a?!n.__esModule:a.writable||a.configurable)){a={enumerable:true,get:function(){return n[t]}}}Object.defineProperty(e,r,a)}:function(e,n,t,r){if(r===undefined)r=t;e[r]=n[t]});n.__esModule=true;n.Terminal=void 0;var a=t(506);r(n,a,\"Terminal\")},12:function(e,n,t){\"use strict\";var r=this&&this.__makeTemplateObject||function(e,n){if(Object.defineProperty){Object.defineProperty(e,\"raw\",{value:n})}else{e.raw=n}return e};n.__esModule=true;n.styles=void 0;var a=t(464);var i=(0,a.noop)(o||(o=r([\"\\n [data-nextjs-terminal] {\\n border-radius: var(--size-gap-half);\\n background-color: var(--color-ansi-bg);\\n color: var(--color-ansi-fg);\\n }\\n [data-nextjs-terminal]::selection,\\n [data-nextjs-terminal] *::selection {\\n background-color: var(--color-ansi-selection);\\n }\\n [data-nextjs-terminal] * {\\n color: inherit;\\n background-color: transparent;\\n font-family: var(--font-stack-monospace);\\n }\\n [data-nextjs-terminal] > * {\\n margin: 0;\\n padding: calc(var(--size-gap) + var(--size-gap-half))\\n calc(var(--size-gap-double) + var(--size-gap-half));\\n }\\n\\n [data-nextjs-terminal] pre {\\n white-space: pre-wrap;\\n word-break: break-word;\\n }\\n\"],[\"\\n [data-nextjs-terminal] {\\n border-radius: var(--size-gap-half);\\n background-color: var(--color-ansi-bg);\\n color: var(--color-ansi-fg);\\n }\\n [data-nextjs-terminal]::selection,\\n [data-nextjs-terminal] *::selection {\\n background-color: var(--color-ansi-selection);\\n }\\n [data-nextjs-terminal] * {\\n color: inherit;\\n background-color: transparent;\\n font-family: var(--font-stack-monospace);\\n }\\n [data-nextjs-terminal] > * {\\n margin: 0;\\n padding: calc(var(--size-gap) + var(--size-gap-half))\\n calc(var(--size-gap-double) + var(--size-gap-half));\\n }\\n\\n [data-nextjs-terminal] pre {\\n white-space: pre-wrap;\\n word-break: break-word;\\n }\\n\"])));n.styles=i;var o},172:function(e,n,t){\"use strict\";var r=this&&this.__createBinding||(Object.create?function(e,n,t,r){if(r===undefined)r=t;var a=Object.getOwnPropertyDescriptor(n,t);if(!a||(\"get\"in a?!n.__esModule:a.writable||a.configurable)){a={enumerable:true,get:function(){return n[t]}}}Object.defineProperty(e,r,a)}:function(e,n,t,r){if(r===undefined)r=t;e[r]=n[t]});var a=this&&this.__setModuleDefault||(Object.create?function(e,n){Object.defineProperty(e,\"default\",{enumerable:true,value:n})}:function(e,n){e[\"default\"]=n});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var t in e)if(t!==\"default\"&&Object.prototype.hasOwnProperty.call(e,t))r(n,e,t);a(n,e);return n};n.__esModule=true;n.Toast=void 0;var o=i(t(522));var l=function Toast(e){var n=e.onClick,t=e.children,r=e.className;return o.createElement(\"div\",{\"data-nextjs-toast\":true,onClick:n,className:r},o.createElement(\"div\",{\"data-nextjs-toast-wrapper\":true},t))};n.Toast=l},777:function(e,n,t){\"use strict\";var r=this&&this.__createBinding||(Object.create?function(e,n,t,r){if(r===undefined)r=t;var a=Object.getOwnPropertyDescriptor(n,t);if(!a||(\"get\"in a?!n.__esModule:a.writable||a.configurable)){a={enumerable:true,get:function(){return n[t]}}}Object.defineProperty(e,r,a)}:function(e,n,t,r){if(r===undefined)r=t;e[r]=n[t]});n.__esModule=true;n.Toast=n.styles=void 0;var a=t(48);r(n,a,\"styles\");var i=t(172);r(n,i,\"Toast\")},48:function(e,n,t){\"use strict\";var r=this&&this.__makeTemplateObject||function(e,n){if(Object.defineProperty){Object.defineProperty(e,\"raw\",{value:n})}else{e.raw=n}return e};n.__esModule=true;n.styles=void 0;var a=t(464);var i=(0,a.noop)(o||(o=r([\"\\n [data-nextjs-toast] {\\n position: fixed;\\n bottom: var(--size-gap-double);\\n left: var(--size-gap-double);\\n max-width: 420px;\\n z-index: 9000;\\n }\\n\\n @media (max-width: 440px) {\\n [data-nextjs-toast] {\\n max-width: 90vw;\\n left: 5vw;\\n }\\n }\\n\\n [data-nextjs-toast-wrapper] {\\n padding: 16px;\\n border-radius: var(--size-gap-half);\\n font-weight: 500;\\n color: var(--color-ansi-bright-white);\\n background-color: var(--color-ansi-red);\\n box-shadow: 0px var(--size-gap-double) var(--size-gap-quad)\\n rgba(0, 0, 0, 0.25);\\n }\\n\"],[\"\\n [data-nextjs-toast] {\\n position: fixed;\\n bottom: var(--size-gap-double);\\n left: var(--size-gap-double);\\n max-width: 420px;\\n z-index: 9000;\\n }\\n\\n @media (max-width: 440px) {\\n [data-nextjs-toast] {\\n max-width: 90vw;\\n left: 5vw;\\n }\\n }\\n\\n [data-nextjs-toast-wrapper] {\\n padding: 16px;\\n border-radius: var(--size-gap-half);\\n font-weight: 500;\\n color: var(--color-ansi-bright-white);\\n background-color: var(--color-ansi-red);\\n box-shadow: 0px var(--size-gap-double) var(--size-gap-quad)\\n rgba(0, 0, 0, 0.25);\\n }\\n\"])));n.styles=i;var o},561:function(e,n,t){\"use strict\";var r=this&&this.__makeTemplateObject||function(e,n){if(Object.defineProperty){Object.defineProperty(e,\"raw\",{value:n})}else{e.raw=n}return e};var a=this&&this.__createBinding||(Object.create?function(e,n,t,r){if(r===undefined)r=t;var a=Object.getOwnPropertyDescriptor(n,t);if(!a||(\"get\"in a?!n.__esModule:a.writable||a.configurable)){a={enumerable:true,get:function(){return n[t]}}}Object.defineProperty(e,r,a)}:function(e,n,t,r){if(r===undefined)r=t;e[r]=n[t]});var i=this&&this.__setModuleDefault||(Object.create?function(e,n){Object.defineProperty(e,\"default\",{enumerable:true,value:n})}:function(e,n){e[\"default\"]=n});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var t in e)if(t!==\"default\"&&Object.prototype.hasOwnProperty.call(e,t))a(n,e,t);i(n,e);return n};n.__esModule=true;n.styles=n.BuildError=void 0;var l=o(t(522));var s=t(931);var u=t(881);var c=t(966);var f=t(464);var d=function BuildError(e){var n=e.message;var t=l.useCallback((function(){}),[]);return l.createElement(u.Overlay,{fixed:true},l.createElement(s.Dialog,{type:\"error\",\"aria-labelledby\":\"nextjs__container_build_error_label\",\"aria-describedby\":\"nextjs__container_build_error_desc\",onClose:t},l.createElement(s.DialogContent,null,l.createElement(s.DialogHeader,{className:\"nextjs-container-build-error-header\"},l.createElement(\"h4\",{id:\"nextjs__container_build_error_label\"},\"Failed to compile\")),l.createElement(s.DialogBody,{className:\"nextjs-container-build-error-body\"},l.createElement(c.Terminal,{content:n}),l.createElement(\"footer\",null,l.createElement(\"p\",{id:\"nextjs__container_build_error_desc\"},l.createElement(\"small\",null,\"This error occurred during the build process and can only be dismissed by fixing the error.\")))))))};n.BuildError=d;n.styles=(0,f.noop)(p||(p=r([\"\\n .nextjs-container-build-error-header > h4 {\\n line-height: 1.5;\\n margin: 0;\\n padding: 0;\\n }\\n\\n .nextjs-container-build-error-body footer {\\n margin-top: var(--size-gap);\\n }\\n .nextjs-container-build-error-body footer p {\\n margin: 0;\\n }\\n\\n .nextjs-container-build-error-body small {\\n color: #757575;\\n }\\n\"],[\"\\n .nextjs-container-build-error-header > h4 {\\n line-height: 1.5;\\n margin: 0;\\n padding: 0;\\n }\\n\\n .nextjs-container-build-error-body footer {\\n margin-top: var(--size-gap);\\n }\\n .nextjs-container-build-error-body footer p {\\n margin: 0;\\n }\\n\\n .nextjs-container-build-error-body small {\\n color: #757575;\\n }\\n\"])));var p},546:function(e,n,t){\"use strict\";var r=this&&this.__makeTemplateObject||function(e,n){if(Object.defineProperty){Object.defineProperty(e,\"raw\",{value:n})}else{e.raw=n}return e};var a=this&&this.__assign||function(){a=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++){n=arguments[t];for(var a in n)if(Object.prototype.hasOwnProperty.call(n,a))e[a]=n[a]}return e};return a.apply(this,arguments)};var i=this&&this.__createBinding||(Object.create?function(e,n,t,r){if(r===undefined)r=t;var a=Object.getOwnPropertyDescriptor(n,t);if(!a||(\"get\"in a?!n.__esModule:a.writable||a.configurable)){a={enumerable:true,get:function(){return n[t]}}}Object.defineProperty(e,r,a)}:function(e,n,t,r){if(r===undefined)r=t;e[r]=n[t]});var o=this&&this.__setModuleDefault||(Object.create?function(e,n){Object.defineProperty(e,\"default\",{enumerable:true,value:n})}:function(e,n){e[\"default\"]=n});var l=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var t in e)if(t!==\"default\"&&Object.prototype.hasOwnProperty.call(e,t))i(n,e,t);o(n,e);return n};var s=this&&this.__read||function(e,n){var t=typeof Symbol===\"function\"&&e[Symbol.iterator];if(!t)return e;var r=t.call(e),a,i=[],o;try{while((n===void 0||n-- >0)&&!(a=r.next()).done)i.push(a.value)}catch(e){o={error:e}}finally{try{if(a&&!a.done&&(t=r[\"return\"]))t.call(r)}finally{if(o)throw o.error}}return i};n.__esModule=true;n.styles=n.Errors=void 0;var u=l(t(522));var c=t(857);var f=t(931);var d=t(16);var p=t(881);var b=t(777);var v=t(88);var m=t(566);var g=t(464);var h=t(514);var y=t(972);function getErrorSignature(e){var n=e.event;switch(n.type){case c.TYPE_UNHANDLED_ERROR:case c.TYPE_UNHANDLED_REJECTION:{return\"\".concat(n.reason.name,\"::\").concat(n.reason.message,\"::\").concat(n.reason.stack)}default:{}}var t=n;return\"\"}var x=function HotlinkedText(e){var n=e.text;var t=/https?:\\/\\/[^\\s/$.?#].[^\\s\"]*/i;return u.createElement(u.Fragment,null,t.test(n)?n.split(\" \").map((function(e,n,r){if(t.test(e)){return u.createElement(u.Fragment,{key:\"link-\".concat(n)},u.createElement(\"a\",{href:e},e),n===r.length-1?\"\":\" \")}return n===r.length-1?u.createElement(u.Fragment,{key:\"text-\".concat(n)},e):u.createElement(u.Fragment,{key:\"text-\".concat(n)},e,\" \")})):n)};var w=function Errors(e){var n=e.errors;var t=s(u.useState({}),2),r=t[0],i=t[1];var o=s(u.useMemo((function(){var e=[];var t=null;for(var a=0;a<n.length;++a){var i=n[a];var o=i.id;if(o in r){e.push(r[o]);continue}if(a>0){var l=n[a-1];if(getErrorSignature(l)===getErrorSignature(i)){continue}}t=i;break}return[e,t]}),[n,r]),2),l=o[0],c=o[1];var g=u.useMemo((function(){return l.length<1&&Boolean(n.length)}),[n.length,l.length]);u.useEffect((function(){if(c==null){return}var e=true;(0,v.getErrorByType)(c).then((function(n){if(e){i((function(e){var t;return a(a({},e),(t={},t[n.id]=n,t))}))}}),(function(){}));return function(){e=false}}),[c]);var w=s(u.useState(\"fullscreen\"),2),_=w[0],E=w[1];var O=s(u.useState(0),2),S=O[0],j=O[1];var k=u.useCallback((function(e){e===null||e===void 0?void 0:e.preventDefault();j((function(e){return Math.max(0,e-1)}))}),[]);var T=u.useCallback((function(e){e===null||e===void 0?void 0:e.preventDefault();j((function(e){return Math.max(0,Math.min(l.length-1,e+1))}))}),[l.length]);var C=u.useMemo((function(){var e;return(e=l[S])!==null&&e!==void 0?e:null}),[S,l]);u.useEffect((function(){if(n.length<1){i({});E(\"hidden\");j(0)}}),[n.length]);var M=u.useCallback((function(e){e===null||e===void 0?void 0:e.preventDefault();E(\"minimized\")}),[]);var P=u.useCallback((function(e){e===null||e===void 0?void 0:e.preventDefault();E(\"hidden\")}),[]);var A=u.useCallback((function(e){e===null||e===void 0?void 0:e.preventDefault();E(\"fullscreen\")}),[]);if(n.length<1||C==null){return null}if(g){return u.createElement(p.Overlay,null)}if(_===\"hidden\"){return null}if(_===\"minimized\"){return u.createElement(b.Toast,{className:\"nextjs-toast-errors-parent\",onClick:A},u.createElement(\"div\",{className:\"nextjs-toast-errors\"},u.createElement(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",width:\"24\",height:\"24\",viewBox:\"0 0 24 24\",fill:\"none\",stroke:\"currentColor\",strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\"},u.createElement(\"circle\",{cx:\"12\",cy:\"12\",r:\"10\"}),u.createElement(\"line\",{x1:\"12\",y1:\"8\",x2:\"12\",y2:\"12\"}),u.createElement(\"line\",{x1:\"12\",y1:\"16\",x2:\"12.01\",y2:\"16\"})),u.createElement(\"span\",null,l.length,\" error\",l.length>1?\"s\":\"\"),u.createElement(\"button\",{\"data-nextjs-toast-errors-hide-button\":true,className:\"nextjs-toast-errors-hide-button\",type:\"button\",onClick:function(e){e.stopPropagation();P()},\"aria-label\":\"Hide Errors\"},u.createElement(h.CloseIcon,null))))}var D=[\"server\",\"edge-server\"].includes((0,m.getErrorSource)(C.error)||\"\");return u.createElement(p.Overlay,null,u.createElement(f.Dialog,{type:\"error\",\"aria-labelledby\":\"nextjs__container_errors_label\",\"aria-describedby\":\"nextjs__container_errors_desc\",onClose:D?undefined:M},u.createElement(f.DialogContent,null,u.createElement(f.DialogHeader,{className:\"nextjs-container-errors-header\"},u.createElement(d.LeftRightDialogHeader,{previous:S>0?k:null,next:S<l.length-1?T:null,close:D?undefined:M},u.createElement(\"small\",null,u.createElement(\"span\",null,S+1),\" of\",\" \",u.createElement(\"span\",null,l.length),\" unhandled error\",l.length<2?\"\":\"s\")),u.createElement(\"h1\",{id:\"nextjs__container_errors_label\"},D?\"Server Error\":\"Unhandled Runtime Error\"),u.createElement(\"p\",{id:\"nextjs__container_errors_desc\"},C.error.name,\":\",\" \",u.createElement(x,{text:C.error.message})),D?u.createElement(\"div\",null,u.createElement(\"small\",null,\"This error happened while generating the page. Any console logs will be displayed in the terminal window.\")):undefined),u.createElement(f.DialogBody,{className:\"nextjs-container-errors-body\"},u.createElement(y.RuntimeError,{key:C.id.toString(),error:C})))))};n.Errors=w;n.styles=(0,g.noop)(_||(_=r([\"\\n .nextjs-container-errors-header > h1 {\\n font-size: var(--size-font-big);\\n line-height: var(--size-font-bigger);\\n font-weight: bold;\\n margin: 0;\\n margin-top: calc(var(--size-gap-double) + var(--size-gap-half));\\n }\\n .nextjs-container-errors-header small {\\n font-size: var(--size-font-small);\\n color: var(--color-accents-1);\\n margin-left: var(--size-gap-double);\\n }\\n .nextjs-container-errors-header small > span {\\n font-family: var(--font-stack-monospace);\\n }\\n .nextjs-container-errors-header > p {\\n font-family: var(--font-stack-monospace);\\n font-size: var(--size-font-small);\\n line-height: var(--size-font-big);\\n font-weight: bold;\\n margin: 0;\\n margin-top: var(--size-gap-half);\\n color: var(--color-ansi-red);\\n white-space: pre-wrap;\\n }\\n .nextjs-container-errors-header > div > small {\\n margin: 0;\\n margin-top: var(--size-gap-half);\\n }\\n .nextjs-container-errors-header > p > a {\\n color: var(--color-ansi-red);\\n }\\n\\n .nextjs-container-errors-body > h5:not(:first-child) {\\n margin-top: calc(var(--size-gap-double) + var(--size-gap));\\n }\\n .nextjs-container-errors-body > h5 {\\n margin-bottom: var(--size-gap);\\n }\\n\\n .nextjs-toast-errors-parent {\\n cursor: pointer;\\n transition: transform 0.2s ease;\\n }\\n .nextjs-toast-errors-parent:hover {\\n transform: scale(1.1);\\n }\\n .nextjs-toast-errors {\\n display: flex;\\n align-items: center;\\n justify-content: flex-start;\\n }\\n .nextjs-toast-errors > svg {\\n margin-right: var(--size-gap);\\n }\\n .nextjs-toast-errors-hide-button {\\n margin-left: var(--size-gap-triple);\\n border: none;\\n background: none;\\n color: var(--color-ansi-bright-white);\\n padding: 0;\\n transition: opacity 0.25s ease;\\n opacity: 0.7;\\n }\\n .nextjs-toast-errors-hide-button:hover {\\n opacity: 1;\\n }\\n\"],[\"\\n .nextjs-container-errors-header > h1 {\\n font-size: var(--size-font-big);\\n line-height: var(--size-font-bigger);\\n font-weight: bold;\\n margin: 0;\\n margin-top: calc(var(--size-gap-double) + var(--size-gap-half));\\n }\\n .nextjs-container-errors-header small {\\n font-size: var(--size-font-small);\\n color: var(--color-accents-1);\\n margin-left: var(--size-gap-double);\\n }\\n .nextjs-container-errors-header small > span {\\n font-family: var(--font-stack-monospace);\\n }\\n .nextjs-container-errors-header > p {\\n font-family: var(--font-stack-monospace);\\n font-size: var(--size-font-small);\\n line-height: var(--size-font-big);\\n font-weight: bold;\\n margin: 0;\\n margin-top: var(--size-gap-half);\\n color: var(--color-ansi-red);\\n white-space: pre-wrap;\\n }\\n .nextjs-container-errors-header > div > small {\\n margin: 0;\\n margin-top: var(--size-gap-half);\\n }\\n .nextjs-container-errors-header > p > a {\\n color: var(--color-ansi-red);\\n }\\n\\n .nextjs-container-errors-body > h5:not(:first-child) {\\n margin-top: calc(var(--size-gap-double) + var(--size-gap));\\n }\\n .nextjs-container-errors-body > h5 {\\n margin-bottom: var(--size-gap);\\n }\\n\\n .nextjs-toast-errors-parent {\\n cursor: pointer;\\n transition: transform 0.2s ease;\\n }\\n .nextjs-toast-errors-parent:hover {\\n transform: scale(1.1);\\n }\\n .nextjs-toast-errors {\\n display: flex;\\n align-items: center;\\n justify-content: flex-start;\\n }\\n .nextjs-toast-errors > svg {\\n margin-right: var(--size-gap);\\n }\\n .nextjs-toast-errors-hide-button {\\n margin-left: var(--size-gap-triple);\\n border: none;\\n background: none;\\n color: var(--color-ansi-bright-white);\\n padding: 0;\\n transition: opacity 0.25s ease;\\n opacity: 0.7;\\n }\\n .nextjs-toast-errors-hide-button:hover {\\n opacity: 1;\\n }\\n\"])));var _},972:function(e,n,t){\"use strict\";var r=this&&this.__makeTemplateObject||function(e,n){if(Object.defineProperty){Object.defineProperty(e,\"raw\",{value:n})}else{e.raw=n}return e};var a=this&&this.__createBinding||(Object.create?function(e,n,t,r){if(r===undefined)r=t;var a=Object.getOwnPropertyDescriptor(n,t);if(!a||(\"get\"in a?!n.__esModule:a.writable||a.configurable)){a={enumerable:true,get:function(){return n[t]}}}Object.defineProperty(e,r,a)}:function(e,n,t,r){if(r===undefined)r=t;e[r]=n[t]});var i=this&&this.__setModuleDefault||(Object.create?function(e,n){Object.defineProperty(e,\"default\",{enumerable:true,value:n})}:function(e,n){e[\"default\"]=n});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var t in e)if(t!==\"default\"&&Object.prototype.hasOwnProperty.call(e,t))a(n,e,t);i(n,e);return n};var l=this&&this.__read||function(e,n){var t=typeof Symbol===\"function\"&&e[Symbol.iterator];if(!t)return e;var r=t.call(e),a,i=[],o;try{while((n===void 0||n-- >0)&&!(a=r.next()).done)i.push(a.value)}catch(e){o={error:e}}finally{try{if(a&&!a.done&&(t=r[\"return\"]))t.call(r)}finally{if(o)throw o.error}}return i};n.__esModule=true;n.RuntimeError=n.styles=void 0;var s=o(t(522));var u=t(30);var c=t(464);var f=t(205);var d=function CallStackFrame(e){var n;var t=e.frame;var r=(n=t.originalStackFrame)!==null&&n!==void 0?n:t.sourceStackFrame;var a=Boolean(t.originalCodeFrame);var i=s.useCallback((function(){var e;if(!a)return;var n=new URLSearchParams;for(var t in r){n.append(t,((e=r[t])!==null&&e!==void 0?e:\"\").toString())}self.fetch(\"\".concat( false||\"\",\"/__nextjs_launch-editor?\").concat(n.toString())).then((function(){}),(function(){console.error(\"There was an issue opening this code in your editor.\")}))}),[a,r]);return s.createElement(\"div\",{\"data-nextjs-call-stack-frame\":true},s.createElement(\"h6\",{\"data-nextjs-frame-expanded\":Boolean(t.expanded)},r.methodName),s.createElement(\"div\",{\"data-has-source\":a?\"true\":undefined,tabIndex:a?10:undefined,role:a?\"link\":undefined,onClick:i,title:a?\"Click to open in your editor\":undefined},s.createElement(\"span\",null,(0,f.getFrameSource)(r)),s.createElement(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 24 24\",fill:\"none\",stroke:\"currentColor\",strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\"},s.createElement(\"path\",{d:\"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6\"}),s.createElement(\"polyline\",{points:\"15 3 21 3 21 9\"}),s.createElement(\"line\",{x1:\"10\",y1:\"14\",x2:\"21\",y2:\"3\"}))))};var p=function RuntimeError(e){var n=e.error;var t=s.useMemo((function(){return n.frames.findIndex((function(e){return e.expanded&&Boolean(e.originalCodeFrame)&&Boolean(e.originalStackFrame)}))}),[n.frames]);var r=s.useMemo((function(){var e;return(e=n.frames[t])!==null&&e!==void 0?e:null}),[n.frames,t]);var a=s.useMemo((function(){return t<0?[]:n.frames.slice(0,t)}),[n.frames,t]);var i=l(s.useState(r==null),2),o=i[0],c=i[1];var f=s.useCallback((function(){c((function(e){return!e}))}),[]);var p=s.useMemo((function(){return a.filter((function(e){return e.expanded||o}))}),[o,a]);var b=s.useMemo((function(){return n.frames.slice(t+1)}),[n.frames,t]);var v=s.useMemo((function(){return b.filter((function(e){return e.expanded||o}))}),[o,b]);var m=s.useMemo((function(){return b.length!==v.length||o&&r!=null}),[o,b.length,r,v.length]);return s.createElement(s.Fragment,null,r?s.createElement(s.Fragment,null,s.createElement(\"h5\",null,\"Source\"),p.map((function(e,n){return s.createElement(d,{key:\"leading-frame-\".concat(n,\"-\").concat(o),frame:e})})),s.createElement(u.CodeFrame,{stackFrame:r.originalStackFrame,codeFrame:r.originalCodeFrame})):undefined,v.length?s.createElement(s.Fragment,null,s.createElement(\"h5\",null,\"Call Stack\"),v.map((function(e,n){return s.createElement(d,{key:\"call-stack-\".concat(n,\"-\").concat(o),frame:e})}))):undefined,m?s.createElement(s.Fragment,null,s.createElement(\"button\",{tabIndex:10,\"data-nextjs-data-runtime-error-collapsed-action\":true,type:\"button\",onClick:f},o?\"Hide\":\"Show\",\" collapsed frames\")):undefined)};n.RuntimeError=p;n.styles=(0,c.noop)(b||(b=r([\"\\n button[data-nextjs-data-runtime-error-collapsed-action] {\\n background: none;\\n border: none;\\n padding: 0;\\n font-size: var(--size-font-small);\\n line-height: var(--size-font-bigger);\\n color: var(--color-accents-3);\\n }\\n\\n [data-nextjs-call-stack-frame]:not(:last-child) {\\n margin-bottom: var(--size-gap-double);\\n }\\n\\n [data-nextjs-call-stack-frame] > h6 {\\n margin-top: 0;\\n margin-bottom: var(--size-gap);\\n font-family: var(--font-stack-monospace);\\n color: #222;\\n }\\n [data-nextjs-call-stack-frame] > h6[data-nextjs-frame-expanded='false'] {\\n color: #666;\\n }\\n [data-nextjs-call-stack-frame] > div {\\n display: flex;\\n align-items: center;\\n padding-left: calc(var(--size-gap) + var(--size-gap-half));\\n font-size: var(--size-font-small);\\n color: #999;\\n }\\n [data-nextjs-call-stack-frame] > div > svg {\\n width: auto;\\n height: var(--size-font-small);\\n margin-left: var(--size-gap);\\n\\n display: none;\\n }\\n\\n [data-nextjs-call-stack-frame] > div[data-has-source] {\\n cursor: pointer;\\n }\\n [data-nextjs-call-stack-frame] > div[data-has-source]:hover {\\n text-decoration: underline dotted;\\n }\\n [data-nextjs-call-stack-frame] > div[data-has-source] > svg {\\n display: unset;\\n }\\n\"],[\"\\n button[data-nextjs-data-runtime-error-collapsed-action] {\\n background: none;\\n border: none;\\n padding: 0;\\n font-size: var(--size-font-small);\\n line-height: var(--size-font-bigger);\\n color: var(--color-accents-3);\\n }\\n\\n [data-nextjs-call-stack-frame]:not(:last-child) {\\n margin-bottom: var(--size-gap-double);\\n }\\n\\n [data-nextjs-call-stack-frame] > h6 {\\n margin-top: 0;\\n margin-bottom: var(--size-gap);\\n font-family: var(--font-stack-monospace);\\n color: #222;\\n }\\n [data-nextjs-call-stack-frame] > h6[data-nextjs-frame-expanded='false'] {\\n color: #666;\\n }\\n [data-nextjs-call-stack-frame] > div {\\n display: flex;\\n align-items: center;\\n padding-left: calc(var(--size-gap) + var(--size-gap-half));\\n font-size: var(--size-font-small);\\n color: #999;\\n }\\n [data-nextjs-call-stack-frame] > div > svg {\\n width: auto;\\n height: var(--size-font-small);\\n margin-left: var(--size-gap);\\n\\n display: none;\\n }\\n\\n [data-nextjs-call-stack-frame] > div[data-has-source] {\\n cursor: pointer;\\n }\\n [data-nextjs-call-stack-frame] > div[data-has-source]:hover {\\n text-decoration: underline dotted;\\n }\\n [data-nextjs-call-stack-frame] > div[data-has-source] > svg {\\n display: unset;\\n }\\n\"])));var b},88:function(e,n,t){\"use strict\";var r=this&&this.__awaiter||function(e,n,t,r){function adopt(e){return e instanceof t?e:new t((function(n){n(e)}))}return new(t||(t=Promise))((function(t,a){function fulfilled(e){try{step(r.next(e))}catch(e){a(e)}}function rejected(e){try{step(r[\"throw\"](e))}catch(e){a(e)}}function step(e){e.done?t(e.value):adopt(e.value).then(fulfilled,rejected)}step((r=r.apply(e,n||[])).next())}))};var a=this&&this.__generator||function(e,n){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,a,i,o;return o={next:verb(0),throw:verb(1),return:verb(2)},typeof Symbol===\"function\"&&(o[Symbol.iterator]=function(){return this}),o;function verb(e){return function(n){return step([e,n])}}function step(o){if(r)throw new TypeError(\"Generator is already executing.\");while(t)try{if(r=1,a&&(i=o[0]&2?a[\"return\"]:o[0]?a[\"throw\"]||((i=a[\"return\"])&&i.call(a),0):a.next)&&!(i=i.call(a,o[1])).done)return i;if(a=0,i)o=[o[0]&2,i.value];switch(o[0]){case 0:case 1:i=o;break;case 4:t.label++;return{value:o[1],done:false};case 5:t.label++;a=o[1];o=[0];continue;case 7:o=t.ops.pop();t.trys.pop();continue;default:if(!(i=t.trys,i=i.length>0&&i[i.length-1])&&(o[0]===6||o[0]===2)){t=0;continue}if(o[0]===3&&(!i||o[1]>i[0]&&o[1]<i[3])){t.label=o[1];break}if(o[0]===6&&t.label<i[1]){t.label=i[1];i=o;break}if(i&&t.label<i[2]){t.label=i[2];t.ops.push(o);break}if(i[2])t.ops.pop();t.trys.pop();continue}o=n.call(e,t)}catch(e){o=[6,e];a=0}finally{r=i=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};n.__esModule=true;n.getErrorByType=void 0;var i=t(857);var o=t(566);var l=t(205);function getErrorByType(e){return r(this,void 0,void 0,(function(){var n,t,r,s;var u;return a(this,(function(a){switch(a.label){case 0:n=e.id,t=e.event;r=t.type;switch(r){case i.TYPE_UNHANDLED_ERROR:return[3,1];case i.TYPE_UNHANDLED_REJECTION:return[3,1]}return[3,3];case 1:u={id:n,runtime:true,error:t.reason};return[4,(0,l.getOriginalStackFrames)(t.frames,(0,o.getErrorSource)(t.reason),t.reason.toString())];case 2:return[2,(u.frames=a.sent(),u)];case 3:{return[3,4]}a.label=4;case 4:s=t;throw new Error(\"type system invariant violation\")}}))}))}n.getErrorByType=getErrorByType},566:function(e,n,t){\"use strict\";var r=this&&this.__assign||function(){r=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++){n=arguments[t];for(var a in n)if(Object.prototype.hasOwnProperty.call(n,a))e[a]=n[a]}return e};return r.apply(this,arguments)};n.__esModule=true;n.decorateServerError=n.getServerError=n.getErrorSource=n.getFilesystemFrame=void 0;var a=t(116);function getFilesystemFrame(e){var n=r({},e);if(typeof n.file===\"string\"){if(n.file.startsWith(\"/\")||/^[a-z]:\\\\/i.test(n.file)||n.file.startsWith(\"\\\\\\\\\")){n.file=\"file://\".concat(n.file)}}return n}n.getFilesystemFrame=getFilesystemFrame;var i=Symbol(\"NextjsError\");function getErrorSource(e){return e[i]||null}n.getErrorSource=getErrorSource;function getServerError(e,n){var t;try{throw new Error(e.message)}catch(e){t=e}t.name=e.name;try{t.stack=\"\".concat(t.toString(),\"\\n\").concat((0,a.parse)(e.stack).map(getFilesystemFrame).map((function(e){var n=\" at \".concat(e.methodName);if(e.file){var t=e.file;if(e.lineNumber){t+=\":\".concat(e.lineNumber);if(e.column){t+=\":\".concat(e.column)}}n+=\" (\".concat(t,\")\")}return n})).join(\"\\n\"))}catch(n){t.stack=e.stack}decorateServerError(t,n);return t}n.getServerError=getServerError;function decorateServerError(e,n){Object.defineProperty(e,i,{writable:false,enumerable:false,configurable:false,value:n})}n.decorateServerError=decorateServerError},464:function(e,n){\"use strict\";n.__esModule=true;n.noop=void 0;function noop(e){var n=[];for(var t=1;t<arguments.length;t++){n[t-1]=arguments[t]}var r=e.length-1;return e.slice(0,r).reduce((function(e,t,r){return e+t+n[r]}),\"\")+e[r]}n.noop=noop},51:function(e,n,t){\"use strict\";n.__esModule=true;n.parseStack=void 0;var r=t(116);var a=/\\/_next(\\/static\\/.+)/g;function parseStack(e){var n=(0,r.parse)(e);return n.map((function(e){var n,t;try{var r=new URL(e.file);var i=a.exec(r.pathname);if(i){var o=(t=(n=\"C:\\\\Users\\\\ghosh\\\\OneDrive\\\\Documents\\\\progams\\\\upscayl\\\\renderer\\\\.next\")===null||n===void 0?void 0:n.replace(/\\\\/g,\"/\"))===null||t===void 0?void 0:t.replace(/\\/$/,\"\");if(o){e.file=\"file://\"+o.concat(i.pop())}}}catch(e){}return e}))}n.parseStack=parseStack},205:function(e,n){\"use strict\";var t=this&&this.__awaiter||function(e,n,t,r){function adopt(e){return e instanceof t?e:new t((function(n){n(e)}))}return new(t||(t=Promise))((function(t,a){function fulfilled(e){try{step(r.next(e))}catch(e){a(e)}}function rejected(e){try{step(r[\"throw\"](e))}catch(e){a(e)}}function step(e){e.done?t(e.value):adopt(e.value).then(fulfilled,rejected)}step((r=r.apply(e,n||[])).next())}))};var r=this&&this.__generator||function(e,n){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,a,i,o;return o={next:verb(0),throw:verb(1),return:verb(2)},typeof Symbol===\"function\"&&(o[Symbol.iterator]=function(){return this}),o;function verb(e){return function(n){return step([e,n])}}function step(o){if(r)throw new TypeError(\"Generator is already executing.\");while(t)try{if(r=1,a&&(i=o[0]&2?a[\"return\"]:o[0]?a[\"throw\"]||((i=a[\"return\"])&&i.call(a),0):a.next)&&!(i=i.call(a,o[1])).done)return i;if(a=0,i)o=[o[0]&2,i.value];switch(o[0]){case 0:case 1:i=o;break;case 4:t.label++;return{value:o[1],done:false};case 5:t.label++;a=o[1];o=[0];continue;case 7:o=t.ops.pop();t.trys.pop();continue;default:if(!(i=t.trys,i=i.length>0&&i[i.length-1])&&(o[0]===6||o[0]===2)){t=0;continue}if(o[0]===3&&(!i||o[1]>i[0]&&o[1]<i[3])){t.label=o[1];break}if(o[0]===6&&t.label<i[1]){t.label=i[1];i=o;break}if(i&&t.label<i[2]){t.label=i[2];t.ops.push(o);break}if(i[2])t.ops.pop();t.trys.pop();continue}o=n.call(e,t)}catch(e){o=[6,e];a=0}finally{r=i=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};n.__esModule=true;n.getFrameSource=n.getOriginalStackFrame=n.getOriginalStackFrames=void 0;function getOriginalStackFrames(e,n,t){return Promise.all(e.map((function(e){return getOriginalStackFrame(e,n,t)})))}n.getOriginalStackFrames=getOriginalStackFrames;function getOriginalStackFrame(e,n,a){var i,o;function _getOriginalStackFrame(){var i,o,l,s,u;return t(this,void 0,void 0,(function(){var t,c,f,d,p,b,v,m,g;return r(this,(function(r){switch(r.label){case 0:t=new URLSearchParams;t.append(\"isServer\",String(n===\"server\"));t.append(\"isEdgeServer\",String(n===\"edge-server\"));t.append(\"errorMessage\",a);for(c in e){t.append(c,((i=e[c])!==null&&i!==void 0?i:\"\").toString())}f=new AbortController;d=setTimeout((function(){return f.abort()}),3e3);return[4,self.fetch(\"\".concat( false||\"\",\"/__nextjs_original-stack-frame?\").concat(t.toString()),{signal:f.signal})[\"finally\"]((function(){clearTimeout(d)}))];case 1:p=r.sent();if(!(!p.ok||p.status===204))return[3,3];v=(b=Promise).reject;m=Error.bind;return[4,p.text()];case 2:return[2,v.apply(b,[new(m.apply(Error,[void 0,r.sent()]))])];case 3:return[4,p.json()];case 4:g=r.sent();return[2,{error:false,reason:null,external:false,expanded:!Boolean((u=((o=e.file)===null||o===void 0?void 0:o.includes(\"node_modules\"))||((s=(l=g.originalStackFrame)===null||l===void 0?void 0:l.file)===null||s===void 0?void 0:s.includes(\"node_modules\")))!==null&&u!==void 0?u:true),sourceStackFrame:e,originalStackFrame:g.originalStackFrame,originalCodeFrame:g.originalCodeFrame||null}]}}))}))}if(!(((i=e.file)===null||i===void 0?void 0:i.startsWith(\"webpack-internal:\"))||((o=e.file)===null||o===void 0?void 0:o.startsWith(\"file:\")))){return Promise.resolve({error:false,reason:null,external:true,expanded:false,sourceStackFrame:e,originalStackFrame:null,originalCodeFrame:null})}return _getOriginalStackFrame()[\"catch\"]((function(n){var t,r;return{error:true,reason:(r=(t=n===null||n===void 0?void 0:n.message)!==null&&t!==void 0?t:n===null||n===void 0?void 0:n.toString())!==null&&r!==void 0?r:\"Unknown Error\",external:false,expanded:false,sourceStackFrame:e,originalStackFrame:null,originalCodeFrame:null}}))}n.getOriginalStackFrame=getOriginalStackFrame;function getFrameSource(e){var n;var t=\"\";try{var r=new URL(e.file);if(typeof globalThis!==\"undefined\"&&((n=globalThis.location)===null||n===void 0?void 0:n.origin)!==r.origin){if(r.origin===\"null\"){t+=r.protocol}else{t+=r.origin}}t+=r.pathname;t+=\" \"}catch(n){t+=(e.file||\"(unknown)\")+\" \"}if(e.lineNumber!=null){if(e.column!=null){t+=\"(\".concat(e.lineNumber,\":\").concat(e.column,\") \")}else{t+=\"(\".concat(e.lineNumber,\") \")}}return t.slice(0,-1)}n.getFrameSource=getFrameSource},196:function(e,n,t){\"use strict\";var r=this&&this.__createBinding||(Object.create?function(e,n,t,r){if(r===undefined)r=t;var a=Object.getOwnPropertyDescriptor(n,t);if(!a||(\"get\"in a?!n.__esModule:a.writable||a.configurable)){a={enumerable:true,get:function(){return n[t]}}}Object.defineProperty(e,r,a)}:function(e,n,t,r){if(r===undefined)r=t;e[r]=n[t]});var a=this&&this.__setModuleDefault||(Object.create?function(e,n){Object.defineProperty(e,\"default\",{enumerable:true,value:n})}:function(e,n){e[\"default\"]=n});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var t in e)if(t!==\"default\"&&Object.prototype.hasOwnProperty.call(e,t))r(n,e,t);a(n,e);return n};n.__esModule=true;n.useOnClickOutside=void 0;var o=i(t(522));function useOnClickOutside(e,n){o.useEffect((function(){if(e==null||n==null){return}var listener=function(t){if(!e||e.contains(t.target)){return}n(t)};var t=e.getRootNode();t.addEventListener(\"mousedown\",listener);t.addEventListener(\"touchstart\",listener);return function(){t.removeEventListener(\"mousedown\",listener);t.removeEventListener(\"touchstart\",listener)}}),[n,e])}n.useOnClickOutside=useOnClickOutside},514:function(e,n,t){\"use strict\";var r=this&&this.__createBinding||(Object.create?function(e,n,t,r){if(r===undefined)r=t;var a=Object.getOwnPropertyDescriptor(n,t);if(!a||(\"get\"in a?!n.__esModule:a.writable||a.configurable)){a={enumerable:true,get:function(){return n[t]}}}Object.defineProperty(e,r,a)}:function(e,n,t,r){if(r===undefined)r=t;e[r]=n[t]});var a=this&&this.__setModuleDefault||(Object.create?function(e,n){Object.defineProperty(e,\"default\",{enumerable:true,value:n})}:function(e,n){e[\"default\"]=n});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var t in e)if(t!==\"default\"&&Object.prototype.hasOwnProperty.call(e,t))r(n,e,t);a(n,e);return n};n.__esModule=true;n.CloseIcon=void 0;var o=i(t(522));var CloseIcon=function(){return o.createElement(\"svg\",{width:\"24\",height:\"24\",viewBox:\"0 0 24 24\",fill:\"none\",xmlns:\"http://www.w3.org/2000/svg\"},o.createElement(\"path\",{d:\"M18 6L6 18\",stroke:\"currentColor\",strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\"}),o.createElement(\"path\",{d:\"M6 6L18 18\",stroke:\"currentColor\",strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\"}))};n.CloseIcon=CloseIcon},106:function(e,n,t){\"use strict\";var r=this&&this.__makeTemplateObject||function(e,n){if(Object.defineProperty){Object.defineProperty(e,\"raw\",{value:n})}else{e.raw=n}return e};var a=this&&this.__createBinding||(Object.create?function(e,n,t,r){if(r===undefined)r=t;var a=Object.getOwnPropertyDescriptor(n,t);if(!a||(\"get\"in a?!n.__esModule:a.writable||a.configurable)){a={enumerable:true,get:function(){return n[t]}}}Object.defineProperty(e,r,a)}:function(e,n,t,r){if(r===undefined)r=t;e[r]=n[t]});var i=this&&this.__setModuleDefault||(Object.create?function(e,n){Object.defineProperty(e,\"default\",{enumerable:true,value:n})}:function(e,n){e[\"default\"]=n});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var t in e)if(t!==\"default\"&&Object.prototype.hasOwnProperty.call(e,t))a(n,e,t);i(n,e);return n};n.__esModule=true;n.Base=void 0;var l=o(t(522));var s=t(464);function Base(){return l.createElement(\"style\",null,(0,s.noop)(u||(u=r([\"\\n :host {\\n --size-gap-half: 4px;\\n --size-gap: 8px;\\n --size-gap-double: 16px;\\n --size-gap-triple: 24px;\\n --size-gap-quad: 32px;\\n\\n --size-font-small: 14px;\\n --size-font: 16px;\\n --size-font-big: 20px;\\n --size-font-bigger: 24px;\\n\\n --color-accents-1: #808080;\\n --color-accents-2: #222222;\\n --color-accents-3: #404040;\\n\\n --font-stack-monospace: 'SFMono-Regular', Consolas, 'Liberation Mono',\\n Menlo, Courier, monospace;\\n\\n --color-ansi-selection: rgba(95, 126, 151, 0.48);\\n --color-ansi-bg: #111111;\\n --color-ansi-fg: #cccccc;\\n\\n --color-ansi-white: #777777;\\n --color-ansi-black: #141414;\\n --color-ansi-blue: #00aaff;\\n --color-ansi-cyan: #88ddff;\\n --color-ansi-green: #98ec65;\\n --color-ansi-magenta: #aa88ff;\\n --color-ansi-red: #ff5555;\\n --color-ansi-yellow: #ffcc33;\\n --color-ansi-bright-white: #ffffff;\\n --color-ansi-bright-black: #777777;\\n --color-ansi-bright-blue: #33bbff;\\n --color-ansi-bright-cyan: #bbecff;\\n --color-ansi-bright-green: #b6f292;\\n --color-ansi-bright-magenta: #cebbff;\\n --color-ansi-bright-red: #ff8888;\\n --color-ansi-bright-yellow: #ffd966;\\n }\\n\\n .mono {\\n font-family: var(--font-stack-monospace);\\n }\\n\\n h1,\\n h2,\\n h3,\\n h4,\\n h5,\\n h6 {\\n margin-bottom: var(--size-gap);\\n font-weight: 500;\\n line-height: 1.5;\\n }\\n\\n h1 {\\n font-size: 40px;\\n }\\n h2 {\\n font-size: 32px;\\n }\\n h3 {\\n font-size: 28px;\\n }\\n h4 {\\n font-size: 24px;\\n }\\n h5 {\\n font-size: 20px;\\n }\\n h6 {\\n font-size: 16px;\\n }\\n \"],[\"\\n :host {\\n --size-gap-half: 4px;\\n --size-gap: 8px;\\n --size-gap-double: 16px;\\n --size-gap-triple: 24px;\\n --size-gap-quad: 32px;\\n\\n --size-font-small: 14px;\\n --size-font: 16px;\\n --size-font-big: 20px;\\n --size-font-bigger: 24px;\\n\\n --color-accents-1: #808080;\\n --color-accents-2: #222222;\\n --color-accents-3: #404040;\\n\\n --font-stack-monospace: 'SFMono-Regular', Consolas, 'Liberation Mono',\\n Menlo, Courier, monospace;\\n\\n --color-ansi-selection: rgba(95, 126, 151, 0.48);\\n --color-ansi-bg: #111111;\\n --color-ansi-fg: #cccccc;\\n\\n --color-ansi-white: #777777;\\n --color-ansi-black: #141414;\\n --color-ansi-blue: #00aaff;\\n --color-ansi-cyan: #88ddff;\\n --color-ansi-green: #98ec65;\\n --color-ansi-magenta: #aa88ff;\\n --color-ansi-red: #ff5555;\\n --color-ansi-yellow: #ffcc33;\\n --color-ansi-bright-white: #ffffff;\\n --color-ansi-bright-black: #777777;\\n --color-ansi-bright-blue: #33bbff;\\n --color-ansi-bright-cyan: #bbecff;\\n --color-ansi-bright-green: #b6f292;\\n --color-ansi-bright-magenta: #cebbff;\\n --color-ansi-bright-red: #ff8888;\\n --color-ansi-bright-yellow: #ffd966;\\n }\\n\\n .mono {\\n font-family: var(--font-stack-monospace);\\n }\\n\\n h1,\\n h2,\\n h3,\\n h4,\\n h5,\\n h6 {\\n margin-bottom: var(--size-gap);\\n font-weight: 500;\\n line-height: 1.5;\\n }\\n\\n h1 {\\n font-size: 40px;\\n }\\n h2 {\\n font-size: 32px;\\n }\\n h3 {\\n font-size: 28px;\\n }\\n h4 {\\n font-size: 24px;\\n }\\n h5 {\\n font-size: 20px;\\n }\\n h6 {\\n font-size: 16px;\\n }\\n \"]))))}n.Base=Base;var u},693:function(e,n,t){\"use strict\";var r=this&&this.__makeTemplateObject||function(e,n){if(Object.defineProperty){Object.defineProperty(e,\"raw\",{value:n})}else{e.raw=n}return e};var a=this&&this.__createBinding||(Object.create?function(e,n,t,r){if(r===undefined)r=t;var a=Object.getOwnPropertyDescriptor(n,t);if(!a||(\"get\"in a?!n.__esModule:a.writable||a.configurable)){a={enumerable:true,get:function(){return n[t]}}}Object.defineProperty(e,r,a)}:function(e,n,t,r){if(r===undefined)r=t;e[r]=n[t]});var i=this&&this.__setModuleDefault||(Object.create?function(e,n){Object.defineProperty(e,\"default\",{enumerable:true,value:n})}:function(e,n){e[\"default\"]=n});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var t in e)if(t!==\"default\"&&Object.prototype.hasOwnProperty.call(e,t))a(n,e,t);i(n,e);return n};n.__esModule=true;n.ComponentStyles=void 0;var l=o(t(522));var s=t(265);var u=t(931);var c=t(769);var f=t(541);var d=t(12);var p=t(777);var b=t(561);var v=t(546);var m=t(972);var g=t(464);function ComponentStyles(){return l.createElement(\"style\",null,(0,g.noop)(h||(h=r([\"\\n \",\"\\n \",\"\\n \",\"\\n \",\"\\n \",\"\\n \",\"\\n \\n \",\"\\n \",\"\\n \",\"\\n \"],[\"\\n \",\"\\n \",\"\\n \",\"\\n \",\"\\n \",\"\\n \",\"\\n \\n \",\"\\n \",\"\\n \",\"\\n \"])),f.styles,p.styles,u.styles,c.styles,s.styles,d.styles,b.styles,v.styles,m.styles))}n.ComponentStyles=ComponentStyles;var h},775:function(e,n,t){\"use strict\";var r=this&&this.__makeTemplateObject||function(e,n){if(Object.defineProperty){Object.defineProperty(e,\"raw\",{value:n})}else{e.raw=n}return e};var a=this&&this.__createBinding||(Object.create?function(e,n,t,r){if(r===undefined)r=t;var a=Object.getOwnPropertyDescriptor(n,t);if(!a||(\"get\"in a?!n.__esModule:a.writable||a.configurable)){a={enumerable:true,get:function(){return n[t]}}}Object.defineProperty(e,r,a)}:function(e,n,t,r){if(r===undefined)r=t;e[r]=n[t]});var i=this&&this.__setModuleDefault||(Object.create?function(e,n){Object.defineProperty(e,\"default\",{enumerable:true,value:n})}:function(e,n){e[\"default\"]=n});var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var t in e)if(t!==\"default\"&&Object.prototype.hasOwnProperty.call(e,t))a(n,e,t);i(n,e);return n};n.__esModule=true;n.CssReset=void 0;var l=o(t(522));var s=t(464);function CssReset(){return l.createElement(\"style\",null,(0,s.noop)(u||(u=r([\"\\n :host {\\n all: initial;\\n\\n /* the direction property is not reset by 'all' */\\n direction: ltr;\\n }\\n\\n /*!\\n * Bootstrap Reboot v4.4.1 (https://getbootstrap.com/)\\n * Copyright 2011-2019 The Bootstrap Authors\\n * Copyright 2011-2019 Twitter, Inc.\\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\\n * Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)\\n */\\n *,\\n *::before,\\n *::after {\\n box-sizing: border-box;\\n }\\n\\n :host {\\n font-family: sans-serif;\\n line-height: 1.15;\\n -webkit-text-size-adjust: 100%;\\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\\n }\\n\\n article,\\n aside,\\n figcaption,\\n figure,\\n footer,\\n header,\\n hgroup,\\n main,\\n nav,\\n section {\\n display: block;\\n }\\n\\n :host {\\n margin: 0;\\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,\\n 'Helvetica Neue', Arial, 'Noto Sans', sans-serif,\\n 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',\\n 'Noto Color Emoji';\\n font-size: 16px;\\n font-weight: 400;\\n line-height: 1.5;\\n color: #212529;\\n text-align: left;\\n background-color: #fff;\\n }\\n\\n [tabindex='-1']:focus:not(:focus-visible) {\\n outline: 0 !important;\\n }\\n\\n hr {\\n box-sizing: content-box;\\n height: 0;\\n overflow: visible;\\n }\\n\\n h1,\\n h2,\\n h3,\\n h4,\\n h5,\\n h6 {\\n margin-top: 0;\\n margin-bottom: 8px;\\n }\\n\\n p {\\n margin-top: 0;\\n margin-bottom: 16px;\\n }\\n\\n abbr[title],\\n abbr[data-original-title] {\\n text-decoration: underline;\\n -webkit-text-decoration: underline dotted;\\n text-decoration: underline dotted;\\n cursor: help;\\n border-bottom: 0;\\n -webkit-text-decoration-skip-ink: none;\\n text-decoration-skip-ink: none;\\n }\\n\\n address {\\n margin-bottom: 16px;\\n font-style: normal;\\n line-height: inherit;\\n }\\n\\n ol,\\n ul,\\n dl {\\n margin-top: 0;\\n margin-bottom: 16px;\\n }\\n\\n ol ol,\\n ul ul,\\n ol ul,\\n ul ol {\\n margin-bottom: 0;\\n }\\n\\n dt {\\n font-weight: 700;\\n }\\n\\n dd {\\n margin-bottom: 8px;\\n margin-left: 0;\\n }\\n\\n blockquote {\\n margin: 0 0 16px;\\n }\\n\\n b,\\n strong {\\n font-weight: bolder;\\n }\\n\\n small {\\n font-size: 80%;\\n }\\n\\n sub,\\n sup {\\n position: relative;\\n font-size: 75%;\\n line-height: 0;\\n vertical-align: baseline;\\n }\\n\\n sub {\\n bottom: -0.25em;\\n }\\n\\n sup {\\n top: -0.5em;\\n }\\n\\n a {\\n color: #007bff;\\n text-decoration: none;\\n background-color: transparent;\\n }\\n\\n a:hover {\\n color: #0056b3;\\n text-decoration: underline;\\n }\\n\\n a:not([href]) {\\n color: inherit;\\n text-decoration: none;\\n }\\n\\n a:not([href]):hover {\\n color: inherit;\\n text-decoration: none;\\n }\\n\\n pre,\\n code,\\n kbd,\\n samp {\\n font-family: SFMono-Regular, Menlo, Monaco, Consolas,\\n 'Liberation Mono', 'Courier New', monospace;\\n font-size: 1em;\\n }\\n\\n pre {\\n margin-top: 0;\\n margin-bottom: 16px;\\n overflow: auto;\\n }\\n\\n figure {\\n margin: 0 0 16px;\\n }\\n\\n img {\\n vertical-align: middle;\\n border-style: none;\\n }\\n\\n svg {\\n overflow: hidden;\\n vertical-align: middle;\\n }\\n\\n table {\\n border-collapse: collapse;\\n }\\n\\n caption {\\n padding-top: 12px;\\n padding-bottom: 12px;\\n color: #6c757d;\\n text-align: left;\\n caption-side: bottom;\\n }\\n\\n th {\\n text-align: inherit;\\n }\\n\\n label {\\n display: inline-block;\\n margin-bottom: 8px;\\n }\\n\\n button {\\n border-radius: 0;\\n }\\n\\n button:focus {\\n outline: 1px dotted;\\n outline: 5px auto -webkit-focus-ring-color;\\n }\\n\\n input,\\n button,\\n select,\\n optgroup,\\n textarea {\\n margin: 0;\\n font-family: inherit;\\n font-size: inherit;\\n line-height: inherit;\\n }\\n\\n button,\\n input {\\n overflow: visible;\\n }\\n\\n button,\\n select {\\n text-transform: none;\\n }\\n\\n select {\\n word-wrap: normal;\\n }\\n\\n button,\\n [type='button'],\\n [type='reset'],\\n [type='submit'] {\\n -webkit-appearance: button;\\n }\\n\\n button:not(:disabled),\\n [type='button']:not(:disabled),\\n [type='reset']:not(:disabled),\\n [type='submit']:not(:disabled) {\\n cursor: pointer;\\n }\\n\\n button::-moz-focus-inner,\\n [type='button']::-moz-focus-inner,\\n [type='reset']::-moz-focus-inner,\\n [type='submit']::-moz-focus-inner {\\n padding: 0;\\n border-style: none;\\n }\\n\\n input[type='radio'],\\n input[type='checkbox'] {\\n box-sizing: border-box;\\n padding: 0;\\n }\\n\\n input[type='date'],\\n input[type='time'],\\n input[type='datetime-local'],\\n input[type='month'] {\\n -webkit-appearance: listbox;\\n }\\n\\n textarea {\\n overflow: auto;\\n resize: vertical;\\n }\\n\\n fieldset {\\n min-width: 0;\\n padding: 0;\\n margin: 0;\\n border: 0;\\n }\\n\\n legend {\\n display: block;\\n width: 100%;\\n max-width: 100%;\\n padding: 0;\\n margin-bottom: 8px;\\n font-size: 24px;\\n line-height: inherit;\\n color: inherit;\\n white-space: normal;\\n }\\n\\n progress {\\n vertical-align: baseline;\\n }\\n\\n [type='number']::-webkit-inner-spin-button,\\n [type='number']::-webkit-outer-spin-button {\\n height: auto;\\n }\\n\\n [type='search'] {\\n outline-offset: -2px;\\n -webkit-appearance: none;\\n }\\n\\n [type='search']::-webkit-search-decoration {\\n -webkit-appearance: none;\\n }\\n\\n ::-webkit-file-upload-button {\\n font: inherit;\\n -webkit-appearance: button;\\n }\\n\\n output {\\n display: inline-block;\\n }\\n\\n summary {\\n display: list-item;\\n cursor: pointer;\\n }\\n\\n template {\\n display: none;\\n }\\n\\n [hidden] {\\n display: none !important;\\n }\\n \"],[\"\\n :host {\\n all: initial;\\n\\n /* the direction property is not reset by 'all' */\\n direction: ltr;\\n }\\n\\n /*!\\n * Bootstrap Reboot v4.4.1 (https://getbootstrap.com/)\\n * Copyright 2011-2019 The Bootstrap Authors\\n * Copyright 2011-2019 Twitter, Inc.\\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\\n * Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)\\n */\\n *,\\n *::before,\\n *::after {\\n box-sizing: border-box;\\n }\\n\\n :host {\\n font-family: sans-serif;\\n line-height: 1.15;\\n -webkit-text-size-adjust: 100%;\\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\\n }\\n\\n article,\\n aside,\\n figcaption,\\n figure,\\n footer,\\n header,\\n hgroup,\\n main,\\n nav,\\n section {\\n display: block;\\n }\\n\\n :host {\\n margin: 0;\\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,\\n 'Helvetica Neue', Arial, 'Noto Sans', sans-serif,\\n 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',\\n 'Noto Color Emoji';\\n font-size: 16px;\\n font-weight: 400;\\n line-height: 1.5;\\n color: #212529;\\n text-align: left;\\n background-color: #fff;\\n }\\n\\n [tabindex='-1']:focus:not(:focus-visible) {\\n outline: 0 !important;\\n }\\n\\n hr {\\n box-sizing: content-box;\\n height: 0;\\n overflow: visible;\\n }\\n\\n h1,\\n h2,\\n h3,\\n h4,\\n h5,\\n h6 {\\n margin-top: 0;\\n margin-bottom: 8px;\\n }\\n\\n p {\\n margin-top: 0;\\n margin-bottom: 16px;\\n }\\n\\n abbr[title],\\n abbr[data-original-title] {\\n text-decoration: underline;\\n -webkit-text-decoration: underline dotted;\\n text-decoration: underline dotted;\\n cursor: help;\\n border-bottom: 0;\\n -webkit-text-decoration-skip-ink: none;\\n text-decoration-skip-ink: none;\\n }\\n\\n address {\\n margin-bottom: 16px;\\n font-style: normal;\\n line-height: inherit;\\n }\\n\\n ol,\\n ul,\\n dl {\\n margin-top: 0;\\n margin-bottom: 16px;\\n }\\n\\n ol ol,\\n ul ul,\\n ol ul,\\n ul ol {\\n margin-bottom: 0;\\n }\\n\\n dt {\\n font-weight: 700;\\n }\\n\\n dd {\\n margin-bottom: 8px;\\n margin-left: 0;\\n }\\n\\n blockquote {\\n margin: 0 0 16px;\\n }\\n\\n b,\\n strong {\\n font-weight: bolder;\\n }\\n\\n small {\\n font-size: 80%;\\n }\\n\\n sub,\\n sup {\\n position: relative;\\n font-size: 75%;\\n line-height: 0;\\n vertical-align: baseline;\\n }\\n\\n sub {\\n bottom: -0.25em;\\n }\\n\\n sup {\\n top: -0.5em;\\n }\\n\\n a {\\n color: #007bff;\\n text-decoration: none;\\n background-color: transparent;\\n }\\n\\n a:hover {\\n color: #0056b3;\\n text-decoration: underline;\\n }\\n\\n a:not([href]) {\\n color: inherit;\\n text-decoration: none;\\n }\\n\\n a:not([href]):hover {\\n color: inherit;\\n text-decoration: none;\\n }\\n\\n pre,\\n code,\\n kbd,\\n samp {\\n font-family: SFMono-Regular, Menlo, Monaco, Consolas,\\n 'Liberation Mono', 'Courier New', monospace;\\n font-size: 1em;\\n }\\n\\n pre {\\n margin-top: 0;\\n margin-bottom: 16px;\\n overflow: auto;\\n }\\n\\n figure {\\n margin: 0 0 16px;\\n }\\n\\n img {\\n vertical-align: middle;\\n border-style: none;\\n }\\n\\n svg {\\n overflow: hidden;\\n vertical-align: middle;\\n }\\n\\n table {\\n border-collapse: collapse;\\n }\\n\\n caption {\\n padding-top: 12px;\\n padding-bottom: 12px;\\n color: #6c757d;\\n text-align: left;\\n caption-side: bottom;\\n }\\n\\n th {\\n text-align: inherit;\\n }\\n\\n label {\\n display: inline-block;\\n margin-bottom: 8px;\\n }\\n\\n button {\\n border-radius: 0;\\n }\\n\\n button:focus {\\n outline: 1px dotted;\\n outline: 5px auto -webkit-focus-ring-color;\\n }\\n\\n input,\\n button,\\n select,\\n optgroup,\\n textarea {\\n margin: 0;\\n font-family: inherit;\\n font-size: inherit;\\n line-height: inherit;\\n }\\n\\n button,\\n input {\\n overflow: visible;\\n }\\n\\n button,\\n select {\\n text-transform: none;\\n }\\n\\n select {\\n word-wrap: normal;\\n }\\n\\n button,\\n [type='button'],\\n [type='reset'],\\n [type='submit'] {\\n -webkit-appearance: button;\\n }\\n\\n button:not(:disabled),\\n [type='button']:not(:disabled),\\n [type='reset']:not(:disabled),\\n [type='submit']:not(:disabled) {\\n cursor: pointer;\\n }\\n\\n button::-moz-focus-inner,\\n [type='button']::-moz-focus-inner,\\n [type='reset']::-moz-focus-inner,\\n [type='submit']::-moz-focus-inner {\\n padding: 0;\\n border-style: none;\\n }\\n\\n input[type='radio'],\\n input[type='checkbox'] {\\n box-sizing: border-box;\\n padding: 0;\\n }\\n\\n input[type='date'],\\n input[type='time'],\\n input[type='datetime-local'],\\n input[type='month'] {\\n -webkit-appearance: listbox;\\n }\\n\\n textarea {\\n overflow: auto;\\n resize: vertical;\\n }\\n\\n fieldset {\\n min-width: 0;\\n padding: 0;\\n margin: 0;\\n border: 0;\\n }\\n\\n legend {\\n display: block;\\n width: 100%;\\n max-width: 100%;\\n padding: 0;\\n margin-bottom: 8px;\\n font-size: 24px;\\n line-height: inherit;\\n color: inherit;\\n white-space: normal;\\n }\\n\\n progress {\\n vertical-align: baseline;\\n }\\n\\n [type='number']::-webkit-inner-spin-button,\\n [type='number']::-webkit-outer-spin-button {\\n height: auto;\\n }\\n\\n [type='search'] {\\n outline-offset: -2px;\\n -webkit-appearance: none;\\n }\\n\\n [type='search']::-webkit-search-decoration {\\n -webkit-appearance: none;\\n }\\n\\n ::-webkit-file-upload-button {\\n font: inherit;\\n -webkit-appearance: button;\\n }\\n\\n output {\\n display: inline-block;\\n }\\n\\n summary {\\n display: list-item;\\n cursor: pointer;\\n }\\n\\n template {\\n display: none;\\n }\\n\\n [hidden] {\\n display: none !important;\\n }\\n \"]))))}n.CssReset=CssReset;var u},518:function(e){\"use strict\";e.exports=__webpack_require__(/*! next/dist/compiled/strip-ansi */ \"../node_modules/next/dist/compiled/strip-ansi/index.js\")},522:function(e){\"use strict\";e.exports=__webpack_require__(/*! react */ \"../node_modules/react/index.js\")},255:function(e){\"use strict\";e.exports=__webpack_require__(/*! react-dom */ \"../node_modules/react-dom/index.js\")}};var n={};function __nccwpck_require__(t){var r=n[t];if(r!==undefined){return r.exports}var a=n[t]={id:t,loaded:false,exports:{}};var i=true;try{e[t].call(a.exports,a,a.exports,__nccwpck_require__);i=false}finally{if(i)delete n[t]}a.loaded=true;return a.exports}!function(){__nccwpck_require__.nmd=function(e){e.paths=[];if(!e.children)e.children=[];return e}}();if(typeof __nccwpck_require__!==\"undefined\")__nccwpck_require__.ab=__dirname+\"/\";var t=__nccwpck_require__(388);module.exports=t})();//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jb21waWxlZC9AbmV4dC9yZWFjdC1kZXYtb3ZlcmxheS9kaXN0L2NsaWVudC5qcy5qcyIsIm1hcHBpbmdzIjoiO0FBQUEsWUFBWSxPQUFPLGdCQUFnQixhQUFhLGlCQUFpQiwrQkFBK0IsWUFBWSxXQUFXL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vbm8ge1xcbiAgICAgICAgICBmb250LWZhbWlseTogdmFyKC0tZm9udC1zdGFjay1tb25vc3BhY2UpO1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgaDEsXFxuICAgICAgICBoMixcXG4gICAgICAgIGgzLFxcbiAgICAgICAgaDQsXFxuICAgICAgICBoNSxcXG4gICAgICAgIGg2IHtcXG4gICAgICAgICAgbWFyZ2luLWJvdHRvbTogdmFyKC0tc2l6ZS1nYXApO1xcbiAgICAgICAgICBmb250LXdlaWdodDogNTAwO1xcbiAgICAgICAgICBsaW5lLWhlaWdodDogMS41O1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgaDEge1xcbiAgICAgICAgICBmb250LXNpemU6IDQwcHg7XFxuICAgICAgICB9XFxuICAgICAgICBoMiB7XFxuICAgICAgICAgIGZvbnQtc2l6ZTogMzJweDtcXG4gICAgICAgIH1cXG4gICAgICAgIGgzIHtcXG4gICAgICAgICAgZm9udC1zaXplOiAyOHB4O1xcbiAgICAgICAgfVxcbiAgICAgICAgaDQge1xcbiAgICAgICAgICBmb250LXNpemU6IDI0cHg7XFxuICAgICAgICB9XFxuICAgICAgICBoNSB7XFxuICAgICAgICAgIGZvbnQtc2l6ZTogMjBweDtcXG4gICAgICAgIH1cXG4gICAgICAgIGg2IHtcXG4gICAgICAgICAgZm9udC1zaXplOiAxNnB4O1xcbiAgICAgICAgfVxcbiAgICAgIFwiXSxbXCJcXG4gICAgICAgIDpob3N0IHtcXG4gICAgICAgICAgLS1zaXplLWdhcC1oYWxmOiA0cHg7XFxuICAgICAgICAgIC0tc2l6ZS1nYXA6IDhweDtcXG4gICAgICAgICAgLS1zaXplLWdhcC1kb3VibGU6IDE2cHg7XFxuICAgICAgICAgIC0tc2l6ZS1nYXAtdHJpcGxlOiAyNHB4O1xcbiAgICAgICAgICAtLXNpemUtZ2FwLXF1YWQ6IDMycHg7XFxuXFxuICAgICAgICAgIC0tc2l6ZS1mb250LXNtYWxsOiAxNHB4O1xcbiAgICAgIC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EVtb2ppJywgJ1NlZ29lIFVJIFN5bWJvbCcsXFxuICAgICAgICAgICAgJ05vdG8gQ29sb3IgRW1vamknO1xcbiAgICAgICAgICBmb250LXNpemU6IDE2cHg7XFxuICAgICAgICAgIGZvbnQtd2VpZ2h0OiA0MDA7XFxuICAgICAgICAgIGxpbmUtaGVpZ2h0OiAxLjU7XFxuICAgICAgICAgIGNvbG9yOiAjMjEyNTI5O1xcbiAgICAgICAgICB0ZXh0LWFsaWduOiBsZWZ0O1xcbiAgICAgICAgICBiYWNrZ3JvdW5kLWNvbG9yOiAjZmZmO1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgW3RhYmluZGV4PSctMSddOmZvY3VzOm5vdCg6Zm9jdXMtdmlzaWJsZSkge1xcbiAgICAgICAgICBvdXRsaW5lOiAwICFpbXBvcnRhbnQ7XFxuICAgICAgICB9XFxuXFxuICAgICAgICBociB7XFxuICAgICAgICAgIGJveC1zaXppbmc6IGNvbnRlbnQtYm94O1xcbiAgICAgICAgICBoZWlnaHQ6IDA7XFxuICAgICAgICAgIG92ZXJmbG93OiB2aXNpYmxlO1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgaDEsXFxuICAgICAgICBoMixcXG4gICAgICAgIGgzLFxcbiAgICAgICAgaDQsXFxuICAgICAgICBoNSxcXG4gICAgICAgIGg2IHtcXG4gICAgICAgICAgbWFyZ2luLXRvcDogMDtcXG4gICAgICAgICAgbWFyZ2luLWJvdHRvbTogOHB4O1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgcCB7XFxuICAgICAgICAgIG1hcmdpbi10b3A6IDA7XFxuICAgICAgICAgIG1hcmdpbi1ib3R0b206IDE2cHg7XFxuICAgICAgICB9XFxuXFxuICAgICAgICBhYmJyW3RpdGxlXSxcXG4gICAgICAgIGFiYnJbZGF0YS1vcmlnaW5hbC10aXRsZV0ge1xcbiAgICAgICAgICB0ZXh0LWRlY29yYXRpb246IHVuZGVybGluZTtcXG4gICAgICAgICAgLXdlYmtpdC10ZXh0LWRlY29yYXRpb246IHVuZGVybGluZSBkb3R0ZWQ7XFxuICAgICAgICAgIHRleHQtZGVjb3JhdGlvbjogdW5kZXJsaW5lIGRvdHRlZDtcXG4gICAgICAgICAgY3Vyc29yOiBoZWxwO1xcbiAgICAgICAgICBib3JkZXItYm90dG9tOiAwO1xcbiAgICAgICAgICAtd2Via2l0LXRleHQtZGVjb3JhdGlvbi1za2lwLWluazogbm9uZTtcXG4gICAgICAgICAgdGV4dC1kZWNvcmF0aW9uLXNraXAtaW5rOiBub25lO1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgYWRkcmVzcyB7XFxuICAgICAgICAgIG1hcmdpbi1ib3R0b206IDE2cHg7XFxuICAgICAgICAgIGZvbnQtc3R5bGU6IG5vcm1hbDtcXG4gICAgICAgICAgbGluZS1oZWlnaHQ6IGluaGVyaXQ7XFxuICAgICAgICB9XFxuXFxuICAgICAgICBvbCxcXG4gICAgICAgIHVsLFxcbiAgICAgICAgZGwge1xcbiAgICAgICAgICBtYXJnaW4tdG9wOiAwO1xcbiAgICAgICAgICBtYXJnaW4tYm90dG9tOiAxNnB4O1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgb2wgb2wsXFxuICAgICAgICB1bCB1bCxcXG4gICAgICAgIG9sIHVsLFxcbiAgICAgICAgdWwgb2wge1xcbiAgICAgICAgICBtYXJnaW4tYm90dG9tOiAwO1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgZHQge1xcbiAgICAgICAgICBmb250LXdlaWdodDogNzAwO1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgZGQge1xcbiAgICAgICAgICBtYXJnaW4tYm90dG9tOiA4cHg7XFxuICAgICAgICAgIG1hcmdpbi1sZWZ0OiAwO1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgYmxvY2txdW90ZSB7XFxuICAgICAgICAgIG1hcmdpbjogMCAwIDE2cHg7XFxuICAgICAgICB9XFxuXFxuICAgICAgICBiLFxcbiAgICAgICAgc3Ryb25nIHtcXG4gICAgICAgICAgZm9udC13ZWlnaHQ6IGJvbGRlcjtcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIHNtYWxsIHtcXG4gICAgICAgICAgZm9udC1zaXplOiA4MCU7XFxuICAgICAgICB9XFxuXFxuICAgICAgICBzdWIsXFxuICAgICAgICBzdXAge1xcbiAgICAgICAgICBwb3NpdGlvbjogcmVsYXRpdmU7XFxuICAgICAgICAgIGZvbnQtc2l6ZTogNzUlO1xcbiAgICAgICAgICBsaW5lLWhlaWdodDogMDtcXG4gICAgICAgICAgdmVydGljYWwtYWxpZ246IGJhc2VsaW5lO1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgc3ViIHtcXG4gICAgICAgICAgYm90dG9tOiAtMC4yNWVtO1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgc3VwIHtcXG4gICAgICAgICAgdG9wOiAtMC41ZW07XFxuICAgICAgICB9XFxuXFxuICAgICAgICBhIHtcXG4gICAgICAgICAgY29sb3I6ICMwMDdiZmY7XFxuICAgICAgICAgIHRleHQtZGVjb3JhdGlvbjogbm9uZTtcXG4gICAgICAgICAgYmFja2dyb3VuZC1jb2xvcjogdHJhbnNwYXJlbnQ7XFxuICAgICAgICB9XFxuXFxuICAgICAgICBhOmhvdmVyIHtcXG4gICAgICAgICAgY29sb3I6ICMwMDU2YjM7XFxuICAgICAgICAgIHRleHQtZGVjb3JhdGlvbjogdW5kZXJsaW5lO1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgYTpub3QoW2hyZWZdKSB7XFxuICAgICAgICAgIGNvbG9yOiBpbmhlcml0O1xcbiAgICAgICAgICB0ZXh0LWRlY29yYXRpb246IG5vbmU7XFxuICAgICAgICB9XFxuXFxuICAgICAgICBhOm5vdChbaHJlZl0pOmhvdmVyIHtcXG4gICAgICAgICAgY29sb3I6IGluaGVyaXQ7XFxuICAgICAgICAgIHRleHQtZGVjb3JhdGlvbjogbm9uZTtcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIHByZSxcXG4gICAgICAgIGNvZGUsXFxuICAgICAgICBrYmQsXFxuICAgICAgICBzYW1wIHtcXG4gICAgICAgICAgZm9udC1mYW1pbHk6IFNGTW9uby1SZWd1bGFyLCBNZW5sbywgTW9uYWNvLCBDb25zb2xhcyxcXG4gICAgICAgICAgICAnTGliZXJhdGlvbiBNb25vJywgJ0NvdXJpZXIgTmV3JywgbW9ub3NwYWNlO1xcbiAgICAgICAgICBmb250LXNpemU6IDFlbTtcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIHByZSB7XFxuICAgICAgICAgIG1hcmdpbi10b3A6IDA7XFxuICAgICAgICAgIG1hcmdpbi1ib3R0b206IDE2cHg7XFxuICAgICAgICAgIG92ZXJmbG93OiBhdXRvO1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgZmlndXJlIHtcXG4gICAgICAgICAgbWFyZ2luOiAwIDAgMTZweDtcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIGltZyB7XFxuICAgICAgICAgIHZlcnRpY2FsLWFsaWduOiBtaWRkbGU7XFxuICAgICAgICAgIGJvcmRlci1zdHlsZTogbm9uZTtcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIHN2ZyB7XFxuICAgICAgICAgIG92ZXJmbG93OiBoaWRkZW47XFxuICAgICAgICAgIHZlcnRpY2FsLWFsaWduOiBtaWRkbGU7XFxuICAgICAgICB9XFxuXFxuICAgICAgICB0YWJsZSB7XFxuICAgICAgICAgIGJvcmRlci1jb2xsYXBzZTogY29sbGFwc2U7XFxuICAgICAgICB9XFxuXFxuICAgICAgICBjYXB0aW9uIHtcXG4gICAgICAgICAgcGFkZGluZy10b3A6IDEycHg7XFxuICAgICAgICAgIHBhZGRpbmctYm90dG9tOiAxMnB4O1xcbiAgICAgICAgICBjb2xvcjogIzZjNzU3ZDtcXG4gICAgICAgICAgdGV4dC1hbGlnbjogbGVmdDtcXG4gICAgICAgICAgY2FwdGlvbi1zaWRlOiBib3R0b207XFxuICAgICAgICB9XFxuXFxuICAgICAgICB0aCB7XFxuICAgICAgICAgIHRleHQtYWxpZ246IGluaGVyaXQ7XFxuICAgICAgICB9XFxuXFxuICAgICAgICBsYWJlbCB7XFxuICAgICAgICAgIGRpc3BsYXk6IGlubGluZS1ibG9jaztcXG4gICAgICAgICAgbWFyZ2luLWJvdHRvbTogOHB4O1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgYnV0dG9uIHtcXG4gICAgICAgICAgYm9yZGVyLXJhZGl1czogMDtcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIGJ1dHRvbjpmb2N1cyB7XFxuICAgICAgICAgIG91dGxpbmU6IDFweCBkb3R0ZWQ7XFxuICAgICAgICAgIG91dGxpbmU6IDVweCBhdXRvIC13ZWJraXQtZm9jdXMtcmluZy1jb2xvcjtcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIGlucHV0LFxcbiAgICAgICAgYnV0dG9uLFxcbiAgICAgICAgc2VsZWN0LFxcbiAgICAgICAgb3B0Z3JvdXAsXFxuICAgICAgICB0ZXh0YXJlYSB7XFxuICAgICAgICAgIG1hcmdpbjogMDtcXG4gICAgICAgICAgZm9udC1mYW1pbHk6IGluaGVyaXQ7XFxuICAgICAgICAgIGZvbnQtc2l6ZTogaW5oZXJpdDtcXG4gICAgICAgICAgbGluZS1oZWlnaHQ6IGluaGVyaXQ7XFxuICAgICAgICB9XFxuXFxuICAgICAgICBidXR0b24sXFxuICAgICAgICBpbnB1dCB7XFxuICAgICAgICAgIG92ZXJmbG93OiB2aXNpYmxlO1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgYnV0dG9uLFxcbiAgICAgICAgc2VsZWN0IHtcXG4gICAgICAgICAgdGV4dC10cmFuc2Zvcm06IG5vbmU7XFxuICAgICAgICB9XFxuXFxuICAgICAgICBzZWxlY3Qge1xcbiAgICAgICAgICB3b3JkLXdyYXA6IG5vcm1hbDtcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIGJ1dHRvbixcXG4gICAgICAgIFt0eXBlPSdidXR0b24nXSxcXG4gICAgICAgIFt0eXBlPSdyZXNldCddLFxcbiAgICAgICAgW3R5cGU9J3N1Ym1pdCddIHtcXG4gICAgICAgICAgLXdlYmtpdC1hcHBlYXJhbmNlOiBidXR0b247XFxuICAgICAgICB9XFxuXFxuICAgICAgICBidXR0b246bm90KDpkaXNhYmxlZCksXFxuICAgICAgICBbdHlwZT0nYnV0dG9uJ106bm90KDpkaXNhYmxlZCksXFxuICAgICAgICBbdHlwZT0ncmVzZXQnXTpub3QoOmRpc2FibGVkKSxcXG4gICAgICAgIFt0eXBlPSdzdWJtaXQnXTpub3QoOmRpc2FibGVkKSB7XFxuICAgICAgICAgIGN1cnNvcjogcG9pbnRlcjtcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIGJ1dHRvbjo6LW1vei1mb2N1cy1pbm5lcixcXG4gICAgICAgIFt0eXBlPSdidXR0b24nXTo6LW1vei1mb2N1cy1pbm5lcixcXG4gICAgICAgIFt0eXBlPSdyZXNldCddOjotbW96LWZvY3VzLWlubmVyLFxcbiAgICAgICAgW3R5cGU9J3N1Ym1pdCddOjotbW96LWZvY3VzLWlubmVyIHtcXG4gICAgICAgICAgcGFkZGluZzogMDtcXG4gICAgICAgICAgYm9yZGVyLXN0eWxlOiBub25lO1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgaW5wdXRbdHlwZT0ncmFkaW8nXSxcXG4gICAgICAgIGlucHV0W3R5cGU9J2NoZWNrYm94J10ge1xcbiAgICAgICAgICBib3gtc2l6aW5nOiBib3JkZXItYm94O1xcbiAgICAgICAgICBwYWRkaW5nOiAwO1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgaW5wdXRbdHlwZT0nZGF0ZSddLFxcbiAgICAgICAgaW5wdXRbdHlwZT0ndGltZSddLFxcbiAgICAgICAgaW5wdXRbdHlwZT0nZGF0ZXRpbWUtbG9jYWwnXSxcXG4gICAgICAgIGlucHV0W3R5cGU9J21vbnRoJ10ge1xcbiAgICAgICAgICAtd2Via2l0LWFwcGVhcmFuY2U6IGxpc3Rib3g7XFxuICAgICAgICB9XFxuXFxuICAgICAgICB0ZXh0YXJlYSB7XFxuICAgICAgICAgIG92ZXJmbG93OiBhdXRvO1xcbiAgICAgICAgICByZXNpemU6IHZlcnRpY2FsO1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgZmllbGRzZXQge1xcbiAgICAgICAgICBtaW4td2lkdGg6IDA7XFxuICAgICAgICAgIHBhZGRpbmc6IDA7XFxuICAgICAgICAgIG1hcmdpbjogMDtcXG4gICAgICAgICAgYm9yZGVyOiAwO1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgbGVnZW5kIHtcXG4gICAgICAgICAgZGlzcGxheTogYmxvY2s7XFxuICAgICAgICAgIHdpZHRoOiAxMDAlO1xcbiAgICAgICAgICBtYXgtd2lkdGg6IDEwMCU7XFxuICAgICAgICAgIHBhZGRpbmc6IDA7XFxuICAgICAgICAgIG1hcmdpbi1ib3R0b206IDhweDtcXG4gICAgICAgICAgZm9udC1zaXplOiAyNHB4O1xcbiAgICAgICAgICBsaW5lLWhlaWdodDogaW5oZXJpdDtcXG4gICAgICAgICAgY29sb3I6IGluaGVyaXQ7XFxuICAgICAgICAgIHdoaXRlLXNwYWNlOiBub3JtYWw7XFxuICAgICAgICB9XFxuXFxuICAgICAgICBwcm9ncmVzcyB7XFxuICAgICAgICAgIHZlcnRpY2FsLWFsaWduOiBiYXNlbGluZTtcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIFt0eXBlPSdudW1iZXInXTo6LXdlYmtpdC1pbm5lci1zcGluLWJ1dHRvbixcXG4gICAgICAgIFt0eXBlPSdudW1iZXInXTo6LXdlYmtpdC1vdXRlci1zcGluLWJ1dHRvbiB7XFxuICAgICAgICAgIGhlaWdodDogYXV0bztcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIFt0eXBlPSdzZWFyY2gnXSB7XFxuICAgICAgICAgIG91dGxpbmUtb2Zmc2V0OiAtMnB4O1xcbiAgICAgICAgICAtd2Via2l0LWFwcGVhcmFuY2U6IG5vbmU7XFxuICAgICAgICB9XFxuXFxuICAgICAgICBbdHlwZT0nc2VhcmNoJ106Oi13ZWJraXQtc2VhcmNoLWRlY29yYXRpb24ge1xcbiAgICAgICAgICAtd2Via2l0LWFwcGVhcmFuY2U6IG5vbmU7XFxuICAgICAgICB9XFxuXFxuICAgICAgICA6Oi13ZWJraXQtZmlsZS11cGxvYWQtYnV0dG9uIHtcXG4gICAgICAgICAgZm9udDogaW5oZXJpdDtcXG4gICAgICAgICAgLXdlYmtpdC1hcHBlYXJhbmNlOiBidXR0b247XFxuICAgICAgICB9XFxuXFxuICAgICAgICBvdXRwdXQge1xcbiAgICAgICAgICBkaXNwbGF5OiBpbmxpbmUtYmxvY2s7XFxuICAgICAgICB9XFxuXFxuICAgICAgICBzdW1tYXJ5IHtcXG4gICAgICAgICAgZGlzcGxheTogbGlzdC1pdGVtO1xcbiAgICAgICAgICBjdXJzb3I6IHBvaW50ZXI7XFxuICAgICAgICB9XFxuXFxuICAgICAgICB0ZW1wbGF0ZSB7XFxuICAgICAgICAgIGRpc3BsYXk6IG5vbmU7XFxuICAgICAgICB9XFxuXFxuICAgICAgICBbaGlkZGVuXSB7XFxuICAgICAgICAgIGRpc3BsYXk6IG5vbmUgIWltcG9ydGFudDtcXG4gICAgICAgIH1cXG4gICAgICBcIl0sW1wiXFxuICAgICAgICA6aG9zdCB7XFxuICAgICAgICAgIGFsbDogaW5pdGlhbDtcXG5cXG4gICAgICAgICAgLyogdGhlIGRpcmVjdGlvbiBwcm9wZXJ0eSBpcyBub3QgcmVzZXQgYnkgJ2FsbCcgKi9cXG4gICAgICAgICAgZGlyZWN0aW9uOiBsdHI7XFxuICAgICAgICB9XFxuXFxuICAgICAgICAvKiFcXG4gICAgICAgICAqIEJvb3RzdHJhcCBSZWJvb3QgdjQuNC4xIChodHRwczovL2dldGJvb3RzdHJhcC5jb20vKVxcbiAgICAgICAgICogQ29weXJpZ2h0IDIwMTEtMjAxOSBUaGUgQm9vdHN0cmFwIEF1dGhvcnNcXG4gICAgICAgICAqIENvcHlyaWdodCAyMDExLTIwMTkgVHdpdHRlciwgSW5jLlxcbiAgICAgICAgICogTGljZW5zZWQgdW5kZXIgTUlUIChodHRwczovL2dpdGh1Yi5jb20vdHdicy9ib290c3RyYXAvYmxvYi9tYXN0ZXIvTElDRU5TRSlcXG4gICAgICAgICAqIEZvcmtlZCBmcm9tIE5vcm1hbGl6ZS5jc3MsIGxpY2Vuc2VkIE1JVCAoaHR0cHM6Ly9naXRodWIuY29tL25lY29sYXMvbm9ybWFsaXplLmNzcy9ibG9iL21hc3Rlci9MSUNFTlNFLm1kKVxcbiAgICAgICAgICovXFxuICAgICAgICAqLFxcbiAgICAgICAgKjo6YmVmb3JlLFxcbiAgICAgICAgKjo6YWZ0ZXIge1xcbiAgICAgICAgICBib3gtc2l6aW5nOiBib3JkZXItYm94O1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgOmhvc3Qge1xcbiAgICAgICAgICBmb250LWZhbWlseTogc2Fucy1zZXJpZjtcXG4gICAgICAgICAgbGluZS1oZWlnaHQ6IDEuMTU7XFxuICAgICAgICAgIC13ZWJraXQtdGV4dC1zaXplLWFkanVzdDogMTAwJTtcXG4gICAgICAgICAgLXdlYmtpdC10YXAtaGlnaGxpZ2h0LWNvbG9yOiByZ2JhKDAsIDAsIDAsIDApO1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgYXJ0aWNsZSxcXG4gICAgICAgIGFzaWRlLFxcbiAgICAgICAgZmlnY2FwdGlvbixcXG4gICAgICAgIGZpZ3VyZSxcXG4gICAgICAgIGZvb3RlcixcXG4gICAgICAgIGhlYWRlcixcXG4gICAgICAgIGhncm91cCxcXG4gICAgICAgIG1haW4sXFxuICAgICAgICBuYXYsXFxuICAgICAgICBzZWN0aW9uIHtcXG4gICAgICAgICAgZGlzcGxheTogYmxvY2s7XFxuICAgICAgICB9XFxuXFxuICAgICAgICA6aG9zdCB7XFxuICAgICAgICAgIG1hcmdpbjogMDtcXG4gICAgICAgICAgZm9udC1mYW1pbHk6IC1hcHBsZS1zeXN0ZW0sIEJsaW5rTWFjU3lzdGVtRm9udCwgJ1NlZ29lIFVJJywgUm9ib3RvLFxcbiAgICAgICAgICAgICdIZWx2ZXRpY2EgTmV1ZScsIEFyaWFsLCAnTm90byBTYW5zJywgc2Fucy1zZXJpZixcXG4gICAgICAgICAgICAnQXBwbGUgQ29sb3IgRW1vamknLCAnU2Vnb2UgVUkgRW1vamknLCAnU2Vnb2UgVUkgU3ltYm9sJyxcXG4gICAgICAgICAgICAnTm90byBDb2xvciBFbW9qaSc7XFxuICAgICAgICAgIGZvbnQtc2l6ZTogMTZweDtcXG4gICAgICAgICAgZm9udC13ZWlnaHQ6IDQwMDtcXG4gICAgICAgICAgbGluZS1oZWlnaHQ6IDEuNTtcXG4gICAgICAgICAgY29sb3I6ICMyMTI1Mjk7XFxuICAgICAgICAgIHRleHQtYWxpZ246IGxlZnQ7XFxuICAgICAgICAgIGJhY2tncm91bmQtY29sb3I6ICNmZmY7XFxuICAgICAgICB9XFxuXFxuICAgICAgICBbdGFiaW5kZXg9Jy0xJ106Zm9jdXM6bm90KDpmb2N1cy12aXNpYmxlKSB7XFxuICAgICAgICAgIG91dGxpbmU6IDAgIWltcG9ydGFudDtcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIGhyIHtcXG4gICAgICAgICAgYm94LXNpemluZzogY29udGVudC1ib3g7XFxuICAgICAgICAgIGhlaWdodDogMDtcXG4gICAgICAgICAgb3ZlcmZsb3c6IHZpc2libGU7XFxuICAgICAgICB9XFxuXFxuICAgICAgICBoMSxcXG4gICAgICAgIGgyLFxcbiAgICAgICAgaDMsXFxuICAgICAgICBoNCxcXG4gICAgICAgIGg1LFxcbiAgICAgICAgaDYge1xcbiAgICAgICAgICBtYXJnaW4tdG9wOiAwO1xcbiAgICAgICAgICBtYXJnaW4tYm90dG9tOiA4cHg7XFxuICAgICAgICB9XFxuXFxuICAgICAgICBwIHtcXG4gICAgICAgICAgbWFyZ2luLXRvcDogMDtcXG4gICAgICAgICAgbWFyZ2luLWJvdHRvbTogMTZweDtcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIGFiYnJbdGl0bGVdLFxcbiAgICAgICAgYWJicltkYXRhLW9yaWdpbmFsLXRpdGxlXSB7XFxuICAgICAgICAgIHRleHQtZGVjb3JhdGlvbjogdW5kZXJsaW5lO1xcbiAgICAgICAgICAtd2Via2l0LXRleHQtZGVjb3JhdGlvbjogdW5kZXJsaW5lIGRvdHRlZDtcXG4gICAgICAgICAgdGV4dC1kZWNvcmF0aW9uOiB1bmRlcmxpbmUgZG90dGVkO1xcbiAgICAgICAgICBjdXJzb3I6IGhlbHA7XFxuICAgICAgICAgIGJvcmRlci1ib3R0b206IDA7XFxuICAgICAgICAgIC13ZWJraXQtdGV4dC1kZWNvcmF0aW9uLXNraXAtaW5rOiBub25lO1xcbiAgICAgICAgICB0ZXh0LWRlY29yYXRpb24tc2tpcC1pbms6IG5vbmU7XFxuICAgICAgICB9XFxuXFxuICAgICAgICBhZGRyZXNzIHtcXG4gICAgICAgICAgbWFyZ2luLWJvdHRvbTogMTZweDtcXG4gICAgICAgICAgZm9udC1zdHlsZTogbm9ybWFsO1xcbiAgICAgICAgICBsaW5lLWhlaWdodDogaW5oZXJpdDtcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIG9sLFxcbiAgICAgICAgdWwsXFxuICAgICAgICBkbCB7XFxuICAgICAgICAgIG1hcmdpbi10b3A6IDA7XFxuICAgICAgICAgIG1hcmdpbi1ib3R0b206IDE2cHg7XFxuICAgICAgICB9XFxuXFxuICAgICAgICBvbCBvbCxcXG4gICAgICAgIHVsIHVsLFxcbiAgICAgICAgb2wgdWwsXFxuICAgICAgICB1bCBvbCB7XFxuICAgICAgICAgIG1hcmdpbi1ib3R0b206IDA7XFxuICAgICAgICB9XFxuXFxuICAgICAgICBkdCB7XFxuICAgICAgICAgIGZvbnQtd2VpZ2h0OiA3MDA7XFxuICAgICAgICB9XFxuXFxuICAgICAgICBkZCB7XFxuICAgICAgICAgIG1hcmdpbi1ib3R0b206IDhweDtcXG4gICAgICAgICAgbWFyZ2luLWxlZnQ6IDA7XFxuICAgICAgICB9XFxuXFxuICAgICAgICBibG9ja3F1b3RlIHtcXG4gICAgICAgICAgbWFyZ2luOiAwIDAgMTZweDtcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIGIsXFxuICAgICAgICBzdHJvbmcge1xcbiAgICAgICAgICBmb250LXdlaWdodDogYm9sZGVyO1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgc21hbGwge1xcbiAgICAgICAgICBmb250LXNpemU6IDgwJTtcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIHN1YixcXG4gICAgICAgIHN1cCB7XFxuICAgICAgICAgIHBvc2l0aW9uOiByZWxhdGl2ZTtcXG4gICAgICAgICAgZm9udC1zaXplOiA3NSU7XFxuICAgICAgICAgIGxpbmUtaGVpZ2h0OiAwO1xcbiAgICAgICAgICB2ZXJ0aWNhbC1hbGlnbjogYmFzZWxpbmU7XFxuICAgICAgICB9XFxuXFxuICAgICAgICBzdWIge1xcbiAgICAgICAgICBib3R0b206IC0wLjI1ZW07XFxuICAgICAgICB9XFxuXFxuICAgICAgICBzdXAge1xcbiAgICAgICAgICB0b3A6IC0wLjVlbTtcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIGEge1xcbiAgICAgICAgICBjb2xvcjogIzAwN2JmZjtcXG4gICAgICAgICAgdGV4dC1kZWNvcmF0aW9uOiBub25lO1xcbiAgICAgICAgICBiYWNrZ3JvdW5kLWNvbG9yOiB0cmFuc3BhcmVudDtcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIGE6aG92ZXIge1xcbiAgICAgICAgICBjb2xvcjogIzAwNTZiMztcXG4gICAgICAgICAgdGV4dC1kZWNvcmF0aW9uOiB1bmRlcmxpbmU7XFxuICAgICAgICB9XFxuXFxuICAgICAgICBhOm5vdChbaHJlZl0pIHtcXG4gICAgICAgICAgY29sb3I6IGluaGVyaXQ7XFxuICAgICAgICAgIHRleHQtZGVjb3JhdGlvbjogbm9uZTtcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIGE6bm90KFtocmVmXSk6aG92ZXIge1xcbiAgICAgICAgICBjb2xvcjogaW5oZXJpdDtcXG4gICAgICAgICAgdGV4dC1kZWNvcmF0aW9uOiBub25lO1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgcHJlLFxcbiAgICAgICAgY29kZSxcXG4gICAgICAgIGtiZCxcXG4gICAgICAgIHNhbXAge1xcbiAgICAgICAgICBmb250LWZhbWlseTogU0ZNb25vLVJlZ3VsYXIsIE1lbmxvLCBNb25hY28sIENvbnNvbGFzLFxcbiAgICAgICAgICAgICdMaWJlcmF0aW9uIE1vbm8nLCAnQ291cmllciBOZXcnLCBtb25vc3BhY2U7XFxuICAgICAgICAgIGZvbnQtc2l6ZTogMWVtO1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgcHJlIHtcXG4gICAgICAgICAgbWFyZ2luLXRvcDogMDtcXG4gICAgICAgICAgbWFyZ2luLWJvdHRvbTogMTZweDtcXG4gICAgICAgICAgb3ZlcmZsb3c6IGF1dG87XFxuICAgICAgICB9XFxuXFxuICAgICAgICBmaWd1cmUge1xcbiAgICAgICAgICBtYXJnaW46IDAgMCAxNnB4O1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgaW1nIHtcXG4gICAgICAgICAgdmVydGljYWwtYWxpZ246IG1pZGRsZTtcXG4gICAgICAgICAgYm9yZGVyLXN0eWxlOiBub25lO1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgc3ZnIHtcXG4gICAgICAgICAgb3ZlcmZsb3c6IGhpZGRlbjtcXG4gICAgICAgICAgdmVydGljYWwtYWxpZ246IG1pZGRsZTtcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIHRhYmxlIHtcXG4gICAgICAgICAgYm9yZGVyLWNvbGxhcHNlOiBjb2xsYXBzZTtcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIGNhcHRpb24ge1xcbiAgICAgICAgICBwYWRkaW5nLXRvcDogMTJweDtcXG4gICAgICAgICAgcGFkZGluZy1ib3R0b206IDEycHg7XFxuICAgICAgICAgIGNvbG9yOiAjNmM3NTdkO1xcbiAgICAgICAgICB0ZXh0LWFsaWduOiBsZWZ0O1xcbiAgICAgICAgICBjYXB0aW9uLXNpZGU6IGJvdHRvbTtcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIHRoIHtcXG4gICAgICAgICAgdGV4dC1hbGlnbjogaW5oZXJpdDtcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIGxhYmVsIHtcXG4gICAgICAgICAgZGlzcGxheTogaW5saW5lLWJsb2NrO1xcbiAgICAgICAgICBtYXJnaW4tYm90dG9tOiA4cHg7XFxuICAgICAgICB9XFxuXFxuICAgICAgICBidXR0b24ge1xcbiAgICAgICAgICBib3JkZXItcmFkaXVzOiAwO1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgYnV0dG9uOmZvY3VzIHtcXG4gICAgICAgICAgb3V0bGluZTogMXB4IGRvdHRlZDtcXG4gICAgICAgICAgb3V0bGluZTogNXB4IGF1dG8gLXdlYmtpdC1mb2N1cy1yaW5nLWNvbG9yO1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgaW5wdXQsXFxuICAgICAgICBidXR0b24sXFxuICAgICAgICBzZWxlY3QsXFxuICAgICAgICBvcHRncm91cCxcXG4gICAgICAgIHRleHRhcmVhIHtcXG4gICAgICAgICAgbWFyZ2luOiAwO1xcbiAgICAgICAgICBmb250LWZhbWlseTogaW5oZXJpdDtcXG4gICAgICAgICAgZm9udC1zaXplOiBpbmhlcml0O1xcbiAgICAgICAgICBsaW5lLWhlaWdodDogaW5oZXJpdDtcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIGJ1dHRvbixcXG4gICAgICAgIGlucHV0IHtcXG4gICAgICAgICAgb3ZlcmZsb3c6IHZpc2libGU7XFxuICAgICAgICB9XFxuXFxuICAgICAgICBidXR0b24sXFxuICAgICAgICBzZWxlY3Qge1xcbiAgICAgICAgICB0ZXh0LXRyYW5zZm9ybTogbm9uZTtcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIHNlbGVjdCB7XFxuICAgICAgICAgIHdvcmQtd3JhcDogbm9ybWFsO1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgYnV0dG9uLFxcbiAgICAgICAgW3R5cGU9J2J1dHRvbiddLFxcbiAgICAgICAgW3R5cGU9J3Jlc2V0J10sXFxuICAgICAgICBbdHlwZT0nc3VibWl0J10ge1xcbiAgICAgICAgICAtd2Via2l0LWFwcGVhcmFuY2U6IGJ1dHRvbjtcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIGJ1dHRvbjpub3QoOmRpc2FibGVkKSxcXG4gICAgICAgIFt0eXBlPSdidXR0b24nXTpub3QoOmRpc2FibGVkKSxcXG4gICAgICAgIFt0eXBlPSdyZXNldCddOm5vdCg6ZGlzYWJsZWQpLFxcbiAgICAgICAgW3R5cGU9J3N1Ym1pdCddOm5vdCg6ZGlzYWJsZWQpIHtcXG4gICAgICAgICAgY3Vyc29yOiBwb2ludGVyO1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgYnV0dG9uOjotbW96LWZvY3VzLWlubmVyLFxcbiAgICAgICAgW3R5cGU9J2J1dHRvbiddOjotbW96LWZvY3VzLWlubmVyLFxcbiAgICAgICAgW3R5cGU9J3Jlc2V0J106Oi1tb3otZm9jdXMtaW5uZXIsXFxuICAgICAgICBbdHlwZT0nc3VibWl0J106Oi1tb3otZm9jdXMtaW5uZXIge1xcbiAgICAgICAgICBwYWRkaW5nOiAwO1xcbiAgICAgICAgICBib3JkZXItc3R5bGU6IG5vbmU7XFxuICAgICAgICB9XFxuXFxuICAgICAgICBpbnB1dFt0eXBlPSdyYWRpbyddLFxcbiAgICAgICAgaW5wdXRbdHlwZT0nY2hlY2tib3gnXSB7XFxuICAgICAgICAgIGJveC1zaXppbmc6IGJvcmRlci1ib3g7XFxuICAgICAgICAgIHBhZGRpbmc6IDA7XFxuICAgICAgICB9XFxuXFxuICAgICAgICBpbnB1dFt0eXBlPSdkYXRlJ10sXFxuICAgICAgICBpbnB1dFt0eXBlPSd0aW1lJ10sXFxuICAgICAgICBpbnB1dFt0eXBlPSdkYXRldGltZS1sb2NhbCddLFxcbiAgICAgICAgaW5wdXRbdHlwZT0nbW9udGgnXSB7XFxuICAgICAgICAgIC13ZWJraXQtYXBwZWFyYW5jZTogbGlzdGJveDtcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIHRleHRhcmVhIHtcXG4gICAgICAgICAgb3ZlcmZsb3c6IGF1dG87XFxuICAgICAgICAgIHJlc2l6ZTogdmVydGljYWw7XFxuICAgICAgICB9XFxuXFxuICAgICAgICBmaWVsZHNldCB7XFxuICAgICAgICAgIG1pbi13aWR0aDogMDtcXG4gICAgICAgICAgcGFkZGluZzogMDtcXG4gICAgICAgICAgbWFyZ2luOiAwO1xcbiAgICAgICAgICBib3JkZXI6IDA7XFxuICAgICAgICB9XFxuXFxuICAgICAgICBsZWdlbmQge1xcbiAgICAgICAgICBkaXNwbGF5OiBibG9jaztcXG4gICAgICAgICAgd2lkdGg6IDEwMCU7XFxuICAgICAgICAgIG1heC13aWR0aDogMTAwJTtcXG4gICAgICAgICAgcGFkZGluZzogMDtcXG4gICAgICAgICAgbWFyZ2luLWJvdHRvbTogOHB4O1xcbiAgICAgICAgICBmb250LXNpemU6IDI0cHg7XFxuICAgICAgICAgIGxpbmUtaGVpZ2h0OiBpbmhlcml0O1xcbiAgICAgICAgICBjb2xvcjogaW5oZXJpdDtcXG4gICAgICAgICAgd2hpdGUtc3BhY2U6IG5vcm1hbDtcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIHByb2dyZXNzIHtcXG4gICAgICAgICAgdmVydGljYWwtYWxpZ246IGJhc2VsaW5lO1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgW3R5cGU9J251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mljdFwiO2UuZXhwb3J0cz1yZXF1aXJlKFwibmV4dC9kaXN0L2NvbXBpbGVkL3N0cmlwLWFuc2lcIil9LDUyMjpmdW5jdGlvbihlKXtcInVzZSBzdHJpY3RcIjtlLmV4cG9ydHM9cmVxdWlyZShcInJlYWN0XCIpfSwyNTU6ZnVuY3Rpb24oZSl7XCJ1c2Ugc3RyaWN0XCI7ZS5leHBvcnRzPXJlcXVpcmUoXCJyZWFjdC1kb21cIil9fTt2YXIgbj17fTtmdW5jdGlvbiBfX25jY3dwY2tfcmVxdWlyZV9fKHQpe3ZhciByPW5bdF07aWYociE9PXVuZGVmaW5lZCl7cmV0dXJuIHIuZXhwb3J0c312YXIgYT1uW3RdPXtpZDp0LGxvYWRlZDpmYWxzZSxleHBvcnRzOnt9fTt2YXIgaT10cnVlO3RyeXtlW3RdLmNhbGwoYS5leHBvcnRzLGEsYS5leHBvcnRzLF9fbmNjd3Bja19yZXF1aXJlX18pO2k9ZmFsc2V9ZmluYWxseXtpZihpKWRlbGV0ZSBuW3RdfWEubG9hZGVkPXRydWU7cmV0dXJuIGEuZXhwb3J0c30hZnVuY3Rpb24oKXtfX25jY3dwY2tfcmVxdWlyZV9fLm5tZD1mdW5jdGlvbihlKXtlLnBhdGhzPVtdO2lmKCFlLmNoaWxkcmVuKWUuY2hpbGRyZW49W107cmV0dXJuIGV9fSgpO2lmKHR5cGVvZiBfX25jY3dwY2tfcmVxdWlyZV9fIT09XCJ1bmRlZmluZWRcIilfX25jY3dwY2tfcmVxdWlyZV9fLmFiPV9fZGlybmFtZStcIi9cIjt2YXIgdD1fX25jY3dwY2tfcmVxdWlyZV9fKDM4OCk7bW9kdWxlLmV4cG9ydHM9dH0pKCk7Il0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///../node_modules/next/dist/compiled/@next/react-dev-overlay/dist/client.js\n"));
/***/ }),
/***/ "../node_modules/next/dist/client/add-base-path.js":
/*!*********************************************************!*\
!*** ../node_modules/next/dist/client/add-base-path.js ***!
\*********************************************************/
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.addBasePath = addBasePath;\nvar _addPathPrefix = __webpack_require__(/*! ../shared/lib/router/utils/add-path-prefix */ \"../node_modules/next/dist/shared/lib/router/utils/add-path-prefix.js\");\nvar _normalizeTrailingSlash = __webpack_require__(/*! ./normalize-trailing-slash */ \"../node_modules/next/dist/client/normalize-trailing-slash.js\");\nvar basePath = false || \"\";\nfunction addBasePath(path, required) {\n if (false) {}\n return (0, _normalizeTrailingSlash).normalizePathTrailingSlash((0, _addPathPrefix).addPathPrefix(path, basePath));\n}\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=add-base-path.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvYWRkLWJhc2UtcGF0aC5qcy5qcyIsIm1hcHBpbmdzIjoiQUFBYTtBQUNiQSw4Q0FBNkM7SUFDekNHLEtBQUssRUFBRSxJQUFJO0NBQ2QsRUFBQyxDQUFDO0FBQ0hELG1CQUFtQixHQUFHRSxXQUFXLENBQUM7QUFDbEMsSUFBSUMsY0FBYyxHQUFHQyxtQkFBTyxDQUFDLHdIQUE0QyxDQUFDO0FBQzFFLElBQUlDLHVCQUF1QixHQUFHRCxtQkFBTyxDQUFDLGdHQUE0QixDQUFDO0FBQ25FLElBQU1FLFFBQVEsR0FBR0MsTUFBa0MsSUFBSSxFQUFFO0FBQ3pELFNBQVNMLFdBQVcsQ0FBQ1EsSUFBSSxFQUFFQyxRQUFRLEVBQUU7SUFDakMsSUFBSUosS0FBMEMsRU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y5kZWZhdWx0O1xufVxuXG4vLyMgc291cmNlTWFwcGluZ1VSTD1hZGQtYmFzZS1wYXRoLmpzLm1hcCJdLCJuYW1lcyI6WyJPYmplY3QiLCJkZWZpbmVQcm9wZXJ0eSIsImV4cG9ydHMiLCJ2YWx1ZSIsImFkZEJhc2VQYXRoIiwiX2FkZFBhdGhQcmVmaXgiLCJyZXF1aXJlIiwiX25vcm1hbGl6ZVRyYWlsaW5nU2xhc2giLCJiYXNlUGF0aCIsInByb2Nlc3MiLCJlbnYiLCJfX05FWFRfUk9VVEVSX0JBU0VQQVRIIiwicGF0aCIsInJlcXVpcmVkIiwiX19ORVhUX01BTlVBTF9DTElFTlRfQkFTRV9QQVRIIiwibm9ybWFsaXplUGF0aFRyYWlsaW5nU2xhc2giLCJhZGRQYXRoUHJlZml4IiwiZGVmYXVsdCIsIl9fZXNNb2R1bGUiLCJhc3NpZ24iLCJtb2R1bGUiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///../node_modules/next/dist/client/add-base-path.js\n"));
/***/ }),
/***/ "../node_modules/next/dist/client/add-locale.js":
/*!******************************************************!*\
!*** ../node_modules/next/dist/client/add-locale.js ***!
\******************************************************/
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nvar _toConsumableArray = (__webpack_require__(/*! @swc/helpers/lib/_to_consumable_array.js */ \"../node_modules/@swc/helpers/lib/_to_consumable_array.js\")[\"default\"]);\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.addLocale = void 0;\nvar _normalizeTrailingSlash = __webpack_require__(/*! ./normalize-trailing-slash */ \"../node_modules/next/dist/client/normalize-trailing-slash.js\");\nvar addLocale = function(path) {\n for(var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++){\n args[_key - 1] = arguments[_key];\n }\n if (false) { var _instance; }\n return path;\n};\nexports.addLocale = addLocale;\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=add-locale.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvYWRkLWxvY2FsZS5qcy5qcyIsIm1hcHBpbmdzIjoiQUFBYTs7Ozs7QUFDYkEsOENBQTZDO0lBQ3pDRyxLQUFLLEVBQUUsSUFBSTtDQUNkLEVBQUMsQ0FBQztBQUNIRCxpQkFBaUIsR0FBRyxLQUFLLENBQUMsQ0FBQztBQUMzQixJQUFJRyx1QkFBdUIsR0FBR0MsbUJBQU8sQ0FBQyxnR0FBNEIsQ0FBQztBQUNuRSxJQUFNRixTQUFTLEdBQUcsU0FBQ0csSUFBSSxFQUFZO3FDQUFQQyxJQUFJO1FBQUpBLElBQUk7O0lBQzVCLElBQUlDLEtBQStCLEVBQUUsa0JBRXBDO0lBQ0QsT0FBT0YsSUFBSSxDQUFDO0NBQ2Y7QUFDREwsaUJBQWlCLEdBQUdFLFNBQVMsQ0FBQztBQUU5QixJQUFJLENBQUMsT0FBT0YsT0FBTyxDQUFDVyxPQUFPLEtBQUssVUFBVSxJQUFLLE9BQU9YLE9BQU8sQ0FBQ1csT0FBTyxLQUFLLFFBQVEsSUFBSVgsT0FBTyxDQUFDVyxPQUFPLEtBQUssSUFBSSxDQUFFLElBQUksT0FBT1gsT0FBTyxDQUFDVyxPQUFPLENBQUNDLFVBQVUsS0FBSyxXQUFXLEVBQUU7SUFDcktkLE1BQU0sQ0FBQ0MsY0FBYyxDQUFDQyxPQUFPLENBQUNXLE9BQU8sRUFBRSxZQUFZLEVBQUU7UUFBRVYsS0FBSyxFQUFFLElBQUk7S0FBRSxDQUFDLENBQUM7SUFDdEVILE1BQU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dWx0ICE9PSBudWxsKSkgJiYgdHlwZW9mIGV4cG9ydHMuZGVmYXVsdC5fX2VzTW9kdWxlID09PSAndW5kZWZpbmVkJykge1xuICBPYmplY3QuZGVmaW5lUHJvcGVydHkoZXhwb3J0cy5kZWZhdWx0LCAnX19lc01vZHVsZScsIHsgdmFsdWU6IHRydWUgfSk7XG4gIE9iamVjdC5hc3NpZ24oZXhwb3J0cy5kZWZhdWx0LCBleHBvcnRzKTtcbiAgbW9kdWxlLmV4cG9ydHMgPSBleHBvcnRzLmRlZmF1bHQ7XG59XG5cbi8vIyBzb3VyY2VNYXBwaW5nVVJMPWFkZC1sb2NhbGUuanMubWFwIl0sIm5hbWVzIjpbIk9iamVjdCIsImRlZmluZVByb3BlcnR5IiwiZXhwb3J0cyIsInZhbHVlIiwiYWRkTG9jYWxlIiwiX25vcm1hbGl6ZVRyYWlsaW5nU2xhc2giLCJyZXF1aXJlIiwicGF0aCIsImFyZ3MiLCJwcm9jZXNzIiwiZW52IiwiX19ORVhUX0kxOE5fU1VQUE9SVCIsIm5vcm1hbGl6ZVBhdGhUcmFpbGluZ1NsYXNoIiwiZGVmYXVsdCIsIl9fZXNNb2R1bGUiLCJhc3NpZ24iLCJtb2R1bGUiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///../node_modules/next/dist/client/add-locale.js\n"));
/***/ }),
/***/ "../node_modules/next/dist/client/detect-domain-locale.js":
/*!****************************************************************!*\
!*** ../node_modules/next/dist/client/detect-domain-locale.js ***!
\****************************************************************/
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nvar _toConsumableArray = (__webpack_require__(/*! @swc/helpers/lib/_to_consumable_array.js */ \"../node_modules/@swc/helpers/lib/_to_consumable_array.js\")[\"default\"]);\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.detectDomainLocale = void 0;\nvar detectDomainLocale = function() {\n for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){\n args[_key] = arguments[_key];\n }\n if (false) { var _instance; }\n};\nexports.detectDomainLocale = detectDomainLocale;\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=detect-domain-locale.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvZGV0ZWN0LWRvbWFpbi1sb2NhbGUuanMuanMiLCJtYXBwaW5ncyI6IkFBQWE7Ozs7O0FBQ2JBLDhDQUE2QztJQUN6Q0csS0FBSyxFQUFFLElBQUk7Q0FDZCxFQUFDLENBQUM7QUFDSEQsMEJBQTBCLEdBQUcsS0FBSyxDQUFDLENBQUM7QUFDcEMsSUFBTUUsa0JBQWtCLEdBQUcsV0FBVztxQ0FBUEMsSUFBSTtRQUFKQSxJQUFJOztJQUMvQixJQUFJQyxLQUErQixFQUFFLGtCQUVwQztDQUNKO0FBQ0RKLDBCQUEwQixHQUFHRSxrQkFBa0IsQ0FBQztBQUVoRCxJQUFJLENBQUMsT0FBT0YsT0FBTyxDQUFDUSxPQUFPLEtBQUssVUFBVSxJQUFLLE9BQU9SLE9BQU8sQ0FBQ1EsT0FBTyxLQUFLLFFBQVEsSUFBSVIsT0FBTyxDQUFDUSxPQUFPLEtBQUssSUFBSSxDQUFFLElBQUksT0FBT1IsT0FBTyxDQUFDUSxPQUFPLENBQUNDLFVBQVUsS0FBSyxXQUFXLEVBQUU7SUFDcktYLE1BQU0sQ0FBQ0MsY0FBYyxDQUFDQyxPQUFPLENBQUNRLE9BQU8sRUFBRSxZQUFZLEVBQUU7UUFBRVAsS0FBSyxFQUFFLElBQUk7S0FBRSxDQUFDLENBQUM7SUFDdEVILE1BQU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0cy5kZWZhdWx0LCAnX19lc01vZHVsZScsIHsgdmFsdWU6IHRydWUgfSk7XG4gIE9iamVjdC5hc3NpZ24oZXhwb3J0cy5kZWZhdWx0LCBleHBvcnRzKTtcbiAgbW9kdWxlLmV4cG9ydHMgPSBleHBvcnRzLmRlZmF1bHQ7XG59XG5cbi8vIyBzb3VyY2VNYXBwaW5nVVJMPWRldGVjdC1kb21haW4tbG9jYWxlLmpzLm1hcCJdLCJuYW1lcyI6WyJPYmplY3QiLCJkZWZpbmVQcm9wZXJ0eSIsImV4cG9ydHMiLCJ2YWx1ZSIsImRldGVjdERvbWFpbkxvY2FsZSIsImFyZ3MiLCJwcm9jZXNzIiwiZW52IiwiX19ORVhUX0kxOE5fU1VQUE9SVCIsInJlcXVpcmUiLCJkZWZhdWx0IiwiX19lc01vZHVsZSIsImFzc2lnbiIsIm1vZHVsZSJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///../node_modules/next/dist/client/detect-domain-locale.js\n"));
/***/ }),
/***/ "../node_modules/next/dist/client/dev/dev-build-watcher.js":
/*!*****************************************************************!*\
!*** ../node_modules/next/dist/client/dev/dev-build-watcher.js ***!
\*****************************************************************/
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nvar _slicedToArray = (__webpack_require__(/*! @swc/helpers/lib/_sliced_to_array.js */ \"../node_modules/@swc/helpers/lib/_sliced_to_array.js\")[\"default\"]);\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = initializeBuildWatcher;\nvar _websocket = __webpack_require__(/*! ./error-overlay/websocket */ \"../node_modules/next/dist/client/dev/error-overlay/websocket.js\");\nfunction initializeBuildWatcher(toggleCallback) {\n var position = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : \"bottom-right\";\n var handleMessage = function handleMessage(event) {\n var obj = typeof event === \"string\" ? {\n action: event\n } : JSON.parse(event.data);\n // eslint-disable-next-line default-case\n switch(obj.action){\n case \"building\":\n timeoutId && clearTimeout(timeoutId);\n isVisible = true;\n isBuilding = true;\n updateContainer();\n break;\n case \"built\":\n case \"sync\":\n isBuilding = false;\n // Wait for the fade out transition to complete\n timeoutId = setTimeout(function() {\n isVisible = false;\n updateContainer();\n }, 100);\n updateContainer();\n break;\n }\n };\n var updateContainer = function updateContainer() {\n if (isBuilding) {\n container.classList.add(\"\".concat(prefix, \"building\"));\n } else {\n container.classList.remove(\"\".concat(prefix, \"building\"));\n }\n if (isVisible) {\n container.classList.add(\"\".concat(prefix, \"visible\"));\n } else {\n container.classList.remove(\"\".concat(prefix, \"visible\"));\n }\n };\n var shadowHost = document.createElement(\"div\");\n var ref = _slicedToArray(position.split(\"-\"), 2), verticalProperty = ref[0], horizontalProperty = ref[1];\n shadowHost.id = \"__next-build-watcher\";\n // Make sure container is fixed and on a high zIndex so it shows\n shadowHost.style.position = \"fixed\";\n // Ensure container's position to be top or bottom (default)\n shadowHost.style[verticalProperty] = \"10px\";\n // Ensure container's position to be left or right (default)\n shadowHost.style[horizontalProperty] = \"20px\";\n shadowHost.style.width = 0;\n shadowHost.style.height = 0;\n shadowHost.style.zIndex = 99999;\n document.body.appendChild(shadowHost);\n var shadowRoot;\n var prefix = \"\";\n if (shadowHost.attachShadow) {\n shadowRoot = shadowHost.attachShadow({\n mode: \"open\"\n });\n } else {\n // If attachShadow is undefined then the browser does not support\n // the Shadow DOM, we need to prefix all the names so there\n // will be no conflicts\n shadowRoot = shadowHost;\n prefix = \"__next-build-watcher-\";\n }\n // Container\n var container = createContainer(prefix);\n shadowRoot.appendChild(container);\n // CSS\n var css = createCss(prefix, {\n horizontalProperty: horizontalProperty,\n verticalProperty: verticalProperty\n });\n shadowRoot.appendChild(css);\n // State\n var isVisible = false;\n var isBuilding = false;\n var timeoutId = null;\n // Handle events\n (0, _websocket).addMessageListener(function(event) {\n // This is the heartbeat event\n if (event.data === \"\\uD83D\\uDC93\") {\n return;\n }\n try {\n handleMessage(event);\n } catch (e) {}\n });\n toggleCallback(handleMessage);\n}\nfunction createContainer(prefix) {\n var container = document.createElement(\"div\");\n container.id = \"\".concat(prefix, \"container\");\n container.innerHTML = '\\n <div id=\"'.concat(prefix, 'icon-wrapper\">\\n <svg viewBox=\"0 0 226 200\">\\n <defs>\\n <linearGradient\\n x1=\"114.720775%\"\\n y1=\"181.283245%\"\\n x2=\"39.5399306%\"\\n y2=\"100%\"\\n id=\"').concat(prefix, 'linear-gradient\"\\n >\\n <stop stop-color=\"#000000\" offset=\"0%\" />\\n <stop stop-color=\"#FFFFFF\" offset=\"100%\" />\\n </linearGradient>\\n </defs>\\n <g id=\"').concat(prefix, 'icon-group\" fill=\"none\" stroke=\"url(#').concat(prefix, 'linear-gradient)\" stroke-width=\"18\">\\n <path d=\"M113,5.08219117 L4.28393801,197.5 L221.716062,197.5 L113,5.08219117 Z\" />\\n </g>\\n </svg>\\n </div>\\n ');\n return container;\n}\nfunction createCss(prefix, param) {\n var horizontalProperty = param.horizontalProperty, verticalProperty = param.verticalProperty;\n var css = document.createElement(\"style\");\n css.textContent = \"\\n #\".concat(prefix, \"container {\\n position: absolute;\\n \").concat(verticalProperty, \": 10px;\\n \").concat(horizontalProperty, \": 30px;\\n\\n border-radius: 3px;\\n background: #000;\\n color: #fff;\\n font: initial;\\n cursor: initial;\\n letter-spacing: initial;\\n text-shadow: initial;\\n text-transform: initial;\\n visibility: initial;\\n\\n padding: 7px 10px 8px 10px;\\n align-items: center;\\n box-shadow: 0 11px 40px 0 rgba(0, 0, 0, 0.25), 0 2px 10px 0 rgba(0, 0, 0, 0.12);\\n\\n display: none;\\n opacity: 0;\\n transition: opacity 0.1s ease, \").concat(verticalProperty, \" 0.1s ease;\\n animation: \").concat(prefix, \"fade-in 0.1s ease-in-out;\\n }\\n\\n #\").concat(prefix, \"container.\").concat(prefix, \"visible {\\n display: flex;\\n }\\n\\n #\").concat(prefix, \"container.\").concat(prefix, \"building {\\n \").concat(verticalProperty, \": 20px;\\n opacity: 1;\\n }\\n\\n #\").concat(prefix, \"icon-wrapper {\\n width: 16px;\\n height: 16px;\\n }\\n\\n #\").concat(prefix, \"icon-wrapper > svg {\\n width: 100%;\\n height: 100%;\\n }\\n\\n #\").concat(prefix, \"icon-group {\\n animation: \").concat(prefix, \"strokedash 1s ease-in-out both infinite;\\n }\\n\\n @keyframes \").concat(prefix, \"fade-in {\\n from {\\n \").concat(verticalProperty, \": 10px;\\n opacity: 0;\\n }\\n to {\\n \").concat(verticalProperty, \": 20px;\\n opacity: 1;\\n }\\n }\\n\\n @keyframes \").concat(prefix, \"strokedash {\\n 0% {\\n stroke-dasharray: 0 226;\\n }\\n 80%,\\n 100% {\\n stroke-dasharray: 659 226;\\n }\\n }\\n \");\n return css;\n}\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=dev-build-watcher.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvZGV2L2Rldi1idWlsZC13YXRjaGVyLmpzLmpzIiwibWFwcGluZ3MiOiJBQUFhOzs7OztBQUNiQSw4Q0FBNkM7SUFDekNHLEtBQUssRUFBRSxJQUFJO0NBQ2QsRUFBQyxDQUFDO0FBQ0hELGtCQUFlLEdBQUdHLHNCQUFzQixDQUFDO0FBQ3pDLElBQUlDLFVBQVUsR0FBR0MsbUJBQU8sQ0FBQyxrR0FBMkIsQ0FBQztBQUNyRCxTQUFTRixzQkFBc0IsQ0FBQ0csY0FBYyxFQUE2QjtRQUEzQkMsUUFBUSxHQUFSQSwrQ0FBeUIsa0JBQWQsY0FBYztRQWtENURDLGFBQWEsR0FBdEIsU0FBU0EsYUFBYSxDQUFDQyxLQUFLLE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T0gJ1xcdUQ4M0RcXHVEQzkzJykge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgICBoYW5kbGVNZXNzYWdlKGV2ZW50KTtcbiAgICAgICAgfSBjYXRjaCAoZSkge31cbiAgICB9KTtcbiAgICBmdW5jdGlvbiBoYW5kbGVNZXNzYWdlKGV2ZW50KSB7XG4gICAgICAgIGNvbnN0IG9iaiA9IHR5cGVvZiBldmVudCA9PT0gJ3N0cmluZycgPyB7XG4gICAgICAgICAgICBhY3Rpb246IGV2ZW50XG4gICAgICAgIH0gOiBKU09OLnBhcnNlKGV2ZW50LmRhdGEpO1xuICAgICAgICAvLyBlc2xpbnQtZGlzYWJsZS1uZXh0LWxpbmUgZGVmYXVsdC1jYXNlXG4gICAgICAgIHN3aXRjaChvYmouYWN0aW9uKXtcbiAgICAgICAgICAgIGNhc2UgJ2J1aWxkaW5nJzpcbiAgICAgICAgICAgICAgICB0aW1lb3V0SWQgJiYgY2xlYXJUaW1lb3V0KHRpbWVvdXRJZCk7XG4gICAgICAgICAgICAgICAgaXNWaXNpYmxlID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICBpc0J1aWxkaW5nID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICB1cGRhdGVDb250YWluZXIoKTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIGNhc2UgJ2J1aWx0JzpcbiAgICAgICAgICAgIGNhc2UgJ3N5bmMnOlxuICAgICAgICAgICAgICAgIGlzQnVpbGRpbmcgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICAvLyBXYWl0IGZvciB0aGUgZmFkZSBvdXQgdHJhbnNpdGlvbiB0byBjb21wbGV0ZVxuICAgICAgICAgICAgICAgIHRpbWVvdXRJZCA9IHNldFRpbWVvdXQoKCk9PntcbiAgICAgICAgICAgICAgICAgICAgaXNWaXNpYmxlID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgICAgIHVwZGF0ZUNvbnRhaW5lcigpO1xuICAgICAgICAgICAgICAgIH0sIDEwMCk7XG4gICAgICAgICAgICAgICAgdXBkYXRlQ29udGFpbmVyKCk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICB9XG4gICAgdG9nZ2xlQ2FsbGJhY2soaGFuZGxlTWVzc2FnZSk7XG4gICAgZnVuY3Rpb24gdXBkYXRlQ29udGFpbmVyKCkge1xuICAgICAgICBpZiAoaXNCdWlsZGluZykge1xuICAgICAgICAgICAgY29udGFpbmVyLmNsYXNzTGlzdC5hZGQoYCR7cHJlZml4fWJ1aWxkaW5nYCk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBjb250YWluZXIuY2xhc3NMaXN0LnJlbW92ZShgJHtwcmVmaXh9YnVpbGRpbmdgKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAoaXNWaXNpYmxlKSB7XG4gICAgICAgICAgICBjb250YWluZXIuY2xhc3NMaXN0LmFkZChgJHtwcmVmaXh9dmlzaWJsZWApO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgY29udGFpbmVyLmNsYXNzTGlzdC5yZW1vdmUoYCR7cHJlZml4fXZpc2libGVgKTtcbiAgICAgICAgfVxuICAgIH1cbn1cbmZ1bmN0aW9uIGNyZWF0ZUNvbnRhaW5lcihwcmVmaXgpIHtcbiAgICBjb25zdCBjb250YWluZXIgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdkaXYnKTtcbiAgICBjb250YWluZXIuaWQgPSBgJHtwcmVmaXh9Y29udGFpbmVyYDtcbiAgICBjb250YWluZXIuaW5uZXJIVE1MID0gYFxuICAgIDxkaXYgaWQ9XCIke3ByZWZpeH1pY29uLXdyYXBwZXJcIj5cbiAgICAgIDxzdmcgdmlld0JveD1cIjAgMCAyMjYgMjAwXCI+XG4gICAgICAgIDxkZWZzPlxuICAgICAgICAgIDxsaW5lYXJHcmFkaWVudFxuICAgICAgICAgIC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XNNb2R1bGUiLCJhc3NpZ24iLCJtb2R1bGUiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///../node_modules/next/dist/client/dev/dev-build-watcher.js\n"));
/***/ }),
/***/ "../node_modules/next/dist/client/dev/error-overlay/format-webpack-messages.js":
/*!*************************************************************************************!*\
!*** ../node_modules/next/dist/client/dev/error-overlay/format-webpack-messages.js ***!
\*************************************************************************************/
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nvar _slicedToArray = (__webpack_require__(/*! @swc/helpers/lib/_sliced_to_array.js */ \"../node_modules/@swc/helpers/lib/_sliced_to_array.js\")[\"default\"]);\nvar _toConsumableArray = (__webpack_require__(/*! @swc/helpers/lib/_to_consumable_array.js */ \"../node_modules/@swc/helpers/lib/_to_consumable_array.js\")[\"default\"]);\nvar _stripAnsi = _interopRequireDefault(__webpack_require__(/*! next/dist/compiled/strip-ansi */ \"../node_modules/next/dist/compiled/strip-ansi/index.js\"));\nfunction _extends() {\n _extends = Object.assign || function(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i];\n for(var key in source){\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\n// This file is based on https://github.com/facebook/create-react-app/blob/7b1a32be6ec9f99a6c9a3c66813f3ac09c4736b9/packages/react-dev-utils/formatWebpackMessages.js\n// It's been edited to remove chalk and CRA-specific logic\nvar friendlySyntaxErrorLabel = \"Syntax error:\";\nvar WEBPACK_BREAKING_CHANGE_POLYFILLS = \"\\n\\nBREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.\";\nfunction isLikelyASyntaxError(message) {\n return (0, _stripAnsi).default(message).indexOf(friendlySyntaxErrorLabel) !== -1;\n}\nvar hadMissingSassError = false;\n// Cleans up webpack error messages.\nfunction formatMessage(message, verbose) {\n // TODO: Replace this once webpack 5 is stable\n if (typeof message === \"object\" && message.message) {\n var filteredModuleTrace = message.moduleTrace && message.moduleTrace.filter(function(trace) {\n return !/next-(middleware|client-pages|edge-function|flight-(client|server))-loader\\.js/.test(trace.originName);\n });\n var body = message.message;\n var breakingChangeIndex = body.indexOf(WEBPACK_BREAKING_CHANGE_POLYFILLS);\n if (breakingChangeIndex >= 0) {\n body = body.slice(0, breakingChangeIndex);\n }\n message = (message.moduleName ? (0, _stripAnsi).default(message.moduleName) + \"\\n\" : \"\") + (message.file ? (0, _stripAnsi).default(message.file) + \"\\n\" : \"\") + body + (message.details && verbose ? \"\\n\" + message.details : \"\") + (filteredModuleTrace && filteredModuleTrace.length && verbose ? \"\\n\\nImport trace for requested module:\" + filteredModuleTrace.map(function(trace) {\n return \"\\n\".concat(trace.originName);\n }).join(\"\") : \"\") + (message.stack && verbose ? \"\\n\" + message.stack : \"\");\n }\n var lines = message.split(\"\\n\");\n // Strip Webpack-added headers off errors/warnings\n // https://github.com/webpack/webpack/blob/master/lib/ModuleError.js\n lines = lines.filter(function(line) {\n return !/Module [A-z ]+\\(from/.test(line);\n });\n // Transform parsing error into syntax error\n // TODO: move this to our ESLint formatter?\n lines = lines.map(function(line) {\n var parsingError = /Line (\\d+):(?:(\\d+):)?\\s*Parsing error: (.+)$/.exec(line);\n if (!parsingError) {\n return line;\n }\n var _parsingError = _slicedToArray(parsingError, 4), errorLine = _parsingError[1], errorColumn = _parsingError[2], errorMessage = _parsingError[3];\n return \"\".concat(friendlySyntaxErrorLabel, \" \").concat(errorMessage, \" (\").concat(errorLine, \":\").concat(errorColumn, \")\");\n });\n message = lines.join(\"\\n\");\n // Smoosh syntax errors (commonly found in CSS)\n message = message.replace(/SyntaxError\\s+\\((\\d+):(\\d+)\\)\\s*(.+?)\\n/g, \"\".concat(friendlySyntaxErrorLabel, \" $3 ($1:$2)\\n\"));\n // Clean up export errors\n message = message.replace(/^.*export '(.+?)' was not found in '(.+?)'.*$/gm, \"Attempted import error: '$1' is not exported from '$2'.\");\n message = message.replace(/^.*export 'default' \\(imported as '(.+?)'\\) was not found in '(.+?)'.*$/gm, \"Attempted import error: '$2' does not contain a default export (imported as '$1').\");\n message = message.replace(/^.*export '(.+?)' \\(imported as '(.+?)'\\) was not found in '(.+?)'.*$/gm, \"Attempted import error: '$1' is not exported from '$3' (imported as '$2').\");\n lines = message.split(\"\\n\");\n // Remove leading newline\n if (lines.length > 2 && lines[1].trim() === \"\") {\n lines.splice(1, 1);\n }\n // Cleans up verbose \"module not found\" messages for files and packages.\n if (lines[1] && lines[1].indexOf(\"Module not found: \") === 0) {\n lines = [\n lines[0],\n lines[1].replace(\"Error: \", \"\").replace(\"Module not found: Cannot find file:\", \"Cannot find file:\"), \n ].concat(_toConsumableArray(lines.slice(2)));\n }\n // Add helpful message for users trying to use Sass for the first time\n if (lines[1] && lines[1].match(/Cannot find module.+sass/)) {\n // ./file.module.scss (<<loader info>>) => ./file.module.scss\n var firstLine = lines[0].split(\"!\");\n lines[0] = firstLine[firstLine.length - 1];\n lines[1] = \"To use Next.js' built-in Sass support, you first need to install `sass`.\\n\";\n lines[1] += \"Run `npm i sass` or `yarn add sass` inside your workspace.\\n\";\n lines[1] += \"\\nLearn more: https://nextjs.org/docs/messages/install-sass\";\n // dispose of unhelpful stack trace\n lines = lines.slice(0, 2);\n hadMissingSassError = true;\n } else if (hadMissingSassError && message.match(/(sass-loader|resolve-url-loader: CSS error)/)) {\n // dispose of unhelpful stack trace following missing sass module\n lines = [];\n }\n if (!verbose) {\n message = lines.join(\"\\n\");\n // Internal stacks are generally useless so we strip them... with the\n // exception of stacks containing `webpack:` because they're normally\n // from user code generated by Webpack. For more information see\n // https://github.com/facebook/create-react-app/pull/1050\n message = message.replace(/^\\s*at\\s((?!webpack:).)*:\\d+:\\d+[\\s)]*(\\n|$)/gm, \"\") // at ... ...:x:y\n ;\n message = message.replace(/^\\s*at\\s<anonymous>(\\n|$)/gm, \"\") // at <anonymous>\n ;\n lines = message.split(\"\\n\");\n }\n // Remove duplicated newlines\n lines = lines.filter(function(line, index, arr) {\n return index === 0 || line.trim() !== \"\" || line.trim() !== arr[index - 1].trim();\n });\n // Reassemble the message\n message = lines.join(\"\\n\");\n return message.trim();\n}\nfunction formatWebpackMessages(json, verbose) {\n var formattedErrors = json.errors.map(function(message) {\n return formatMessage(message, verbose);\n });\n var formattedWarnings = json.warnings.map(function(message) {\n return formatMessage(message, verbose);\n });\n var result = _extends({}, json, {\n errors: formattedErrors,\n warnings: formattedWarnings\n });\n if (!verbose && result.errors.some(isLikelyASyntaxError)) {\n // If there are any syntax errors, show just them.\n result.errors = result.errors.filter(isLikelyASyntaxError);\n result.warnings = [];\n }\n return result;\n}\nmodule.exports = formatWebpackMessages;\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=format-webpack-messages.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvZGV2L2Vycm9yLW92ZXJsYXkvZm9ybWF0LXdlYnBhY2stbWVzc2FnZXMuanMuanMiLCJtYXBwaW5ncyI6IkFBQWE7Ozs7OztBQUNiLElBQUlBLFVBQVUsR0FBR0Msc0JBQXNCLENBQUNDLG1CQUFPLENBQUMsNkZBQStCLENBQUMsQ0FBQztBQUNqRixTQUFTQyxRQUFRLEdBQUc7SUFDaEJBLFFBQVEsR0FBR0MsTUFBTSxDQUFDQyxNQUFNLElBQUksU0FBU0MsTUFBTSxFQUFFO1FBQ3pDLElBQUksSUFBSUMsQ0FBQyxHQUFHLENBQUMsRUFBRUEsQ0FBQyxHQUFHQyxTQUFTLENBQUNDLE1BQU0sRU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CUkVBS0lOR19DSEFOR0VfUE9MWUZJTExTIiwiaXNMaWtlbHlBU3ludGF4RXJyb3IiLCJtZXNzYWdlIiwiaW5kZXhPZiIsImhhZE1pc3NpbmdTYXNzRXJyb3IiLCJmb3JtYXRNZXNzYWdlIiwidmVyYm9zZSIsImZpbHRlcmVkTW9kdWxlVHJhY2UiLCJtb2R1bGVUcmFjZSIsImZpbHRlciIsInRyYWNlIiwidGVzdCIsIm9yaWdpbk5hbWUiLCJib2R5IiwiYnJlYWtpbmdDaGFuZ2VJbmRleCIsInNsaWNlIiwibW9kdWxlTmFtZSIsImZpbGUiLCJkZXRhaWxzIiwibWFwIiwiam9pbiIsInN0YWNrIiwibGluZXMiLCJzcGxpdCIsImxpbmUiLCJwYXJzaW5nRXJyb3IiLCJleGVjIiwiZXJyb3JMaW5lIiwiZXJyb3JDb2x1bW4iLCJlcnJvck1lc3NhZ2UiLCJyZXBsYWNlIiwidHJpbSIsInNwbGljZSIsIm1hdGNoIiwiZmlyc3RMaW5lIiwiaW5kZXgiLCJhcnIiLCJmb3JtYXRXZWJwYWNrTWVzc2FnZXMiLCJqc29uIiwiZm9ybWF0dGVkRXJyb3JzIiwiZXJyb3JzIiwiZm9ybWF0dGVkV2FybmluZ3MiLCJ3YXJuaW5ncyIsInJlc3VsdCIsInNvbWUiLCJtb2R1bGUiLCJleHBvcnRzIiwiZGVmaW5lUHJvcGVydHkiLCJ2YWx1ZSJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///../node_modules/next/dist/client/dev/error-overlay/format-webpack-messages.js\n"));
/***/ }),
/***/ "../node_modules/next/dist/client/dev/error-overlay/hot-dev-client.js":
/*!****************************************************************************!*\
!*** ../node_modules/next/dist/client/dev/error-overlay/hot-dev-client.js ***!
\****************************************************************************/
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = connect;\nvar _client = __webpack_require__(/*! next/dist/compiled/@next/react-dev-overlay/dist/client */ \"../node_modules/next/dist/compiled/@next/react-dev-overlay/dist/client.js\");\nvar _stripAnsi = _interopRequireDefault(__webpack_require__(/*! next/dist/compiled/strip-ansi */ \"../node_modules/next/dist/compiled/strip-ansi/index.js\"));\nvar _websocket = __webpack_require__(/*! ./websocket */ \"../node_modules/next/dist/client/dev/error-overlay/websocket.js\");\nvar _formatWebpackMessages = _interopRequireDefault(__webpack_require__(/*! ./format-webpack-messages */ \"../node_modules/next/dist/client/dev/error-overlay/format-webpack-messages.js\"));\nfunction connect() {\n (0, _client).register();\n (0, _websocket).addMessageListener(function(event) {\n if (event.data.indexOf(\"action\") === -1) return;\n try {\n processMessage(event);\n } catch (ex) {\n console.warn(\"Invalid HMR message: \" + event.data + \"\\n\", ex);\n }\n });\n return {\n subscribeToHmrEvent: function subscribeToHmrEvent(handler) {\n customHmrEventHandler = handler;\n },\n onUnrecoverableError: function onUnrecoverableError() {\n hadRuntimeError = true;\n }\n };\n}\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\n// This alternative WebpackDevServer combines the functionality of:\n// https://github.com/webpack/webpack-dev-server/blob/webpack-1/client/index.js\n// https://github.com/webpack/webpack/blob/webpack-1/hot/dev-server.js\n// It only supports their simplest configuration (hot updates on same server).\n// It makes some opinionated choices on top, like adding a syntax error overlay\n// that looks similar to our console output. The error overlay is inspired by:\n// https://github.com/glenjamin/webpack-hot-middleware\nwindow.__nextDevClientId = Math.round(Math.random() * 100 + Date.now());\nvar hadRuntimeError = false;\nvar customHmrEventHandler;\n// Remember some state related to hot module replacement.\nvar isFirstCompilation = true;\nvar mostRecentCompilationHash = null;\nvar hasCompileErrors = false;\nfunction clearOutdatedErrors() {\n // Clean up outdated compile errors, if any.\n if (typeof console !== \"undefined\" && typeof console.clear === \"function\") {\n if (hasCompileErrors) {\n console.clear();\n }\n }\n}\n// Successful compilation.\nfunction handleSuccess() {\n clearOutdatedErrors();\n var isHotUpdate = !isFirstCompilation || window.__NEXT_DATA__.page !== \"/_error\" && isUpdateAvailable();\n isFirstCompilation = false;\n hasCompileErrors = false;\n // Attempt to apply hot updates or reload.\n if (isHotUpdate) {\n tryApplyUpdates(function onSuccessfulHotUpdate(hasUpdates) {\n // Only dismiss it when we're sure it's a hot update.\n // Otherwise it would flicker right before the reload.\n onFastRefresh(hasUpdates);\n });\n }\n}\n// Compilation with warnings (e.g. ESLint).\nfunction handleWarnings(warnings) {\n var printWarnings = function printWarnings() {\n // Print warnings to the console.\n var formatted = (0, _formatWebpackMessages).default({\n warnings: warnings,\n errors: []\n });\n if (typeof console !== \"undefined\" && typeof console.warn === \"function\") {\n for(var i = 0; i < formatted.warnings.length; i++){\n if (i === 5) {\n console.warn(\"There were more warnings in other files.\\n\" + \"You can find a complete log in the terminal.\");\n break;\n }\n console.warn((0, _stripAnsi).default(formatted.warnings[i]));\n }\n }\n };\n clearOutdatedErrors();\n var isHotUpdate = !isFirstCompilation;\n isFirstCompilation = false;\n hasCompileErrors = false;\n printWarnings();\n // Attempt to apply hot updates or reload.\n if (isHotUpdate) {\n tryApplyUpdates(function onSuccessfulHotUpdate(hasUpdates) {\n // Only dismiss it when we're sure it's a hot update.\n // Otherwise it would flicker right before the reload.\n onFastRefresh(hasUpdates);\n });\n }\n}\n// Compilation with errors (e.g. syntax error or missing modules).\nfunction handleErrors(errors) {\n clearOutdatedErrors();\n isFirstCompilation = false;\n hasCompileErrors = true;\n // \"Massage\" webpack messages.\n var formatted = (0, _formatWebpackMessages).default({\n errors: errors,\n warnings: []\n });\n // Only show the first error.\n (0, _client).onBuildError(formatted.errors[0]);\n // Also log them to the console.\n if (typeof console !== \"undefined\" && typeof console.error === \"function\") {\n for(var i = 0; i < formatted.errors.length; i++){\n console.error((0, _stripAnsi).default(formatted.errors[i]));\n }\n }\n // Do not attempt to reload now.\n // We will reload on next success instead.\n if (false) {}\n}\nvar startLatency = undefined;\nfunction onFastRefresh(hasUpdates) {\n (0, _client).onBuildOk();\n if (hasUpdates) {\n (0, _client).onRefresh();\n }\n if (startLatency) {\n var endLatency = Date.now();\n var latency = endLatency - startLatency;\n console.log(\"[Fast Refresh] done in \".concat(latency, \"ms\"));\n (0, _websocket).sendMessage(JSON.stringify({\n event: \"client-hmr-latency\",\n id: window.__nextDevClientId,\n startTime: startLatency,\n endTime: endLatency\n }));\n if (self.__NEXT_HMR_LATENCY_CB) {\n self.__NEXT_HMR_LATENCY_CB(latency);\n }\n }\n}\n// There is a newer version of the code available.\nfunction handleAvailableHash(hash) {\n // Update last known compilation hash.\n mostRecentCompilationHash = hash;\n}\n// Handle messages from the server.\nfunction processMessage(e) {\n var obj = JSON.parse(e.data);\n switch(obj.action){\n case \"building\":\n {\n startLatency = Date.now();\n console.log(\"[Fast Refresh] rebuilding\");\n break;\n }\n case \"built\":\n case \"sync\":\n {\n if (obj.hash) {\n handleAvailableHash(obj.hash);\n }\n var errors = obj.errors, warnings = obj.warnings;\n var hasErrors = Boolean(errors && errors.length);\n if (hasErrors) {\n (0, _websocket).sendMessage(JSON.stringify({\n event: \"client-error\",\n errorCount: errors.length,\n clientId: window.__nextDevClientId\n }));\n return handleErrors(errors);\n }\n var hasWarnings = Boolean(warnings && warnings.length);\n if (hasWarnings) {\n (0, _websocket).sendMessage(JSON.stringify({\n event: \"client-warning\",\n warningCount: warnings.length,\n clientId: window.__nextDevClientId\n }));\n return handleWarnings(warnings);\n }\n (0, _websocket).sendMessage(JSON.stringify({\n event: \"client-success\",\n clientId: window.__nextDevClientId\n }));\n return handleSuccess();\n }\n case \"serverComponentChanges\":\n {\n (0, _websocket).sendMessage(JSON.stringify({\n event: \"server-component-reload-page\",\n clientId: window.__nextDevClientId\n }));\n return window.location.reload();\n }\n default:\n {\n if (customHmrEventHandler) {\n customHmrEventHandler(obj);\n break;\n }\n break;\n }\n }\n}\n// Is there a newer version of this code available?\nfunction isUpdateAvailable() {\n /* globals __webpack_hash__ */ // __webpack_hash__ is the hash of the current compilation.\n // It's a global variable injected by Webpack.\n return mostRecentCompilationHash !== __webpack_require__.h();\n}\n// Webpack disallows updates in other states.\nfunction canApplyUpdates() {\n return module.hot.status() === \"idle\";\n}\nfunction afterApplyUpdates(fn) {\n if (canApplyUpdates()) {\n fn();\n } else {\n function handler(status) {\n if (status === \"idle\") {\n module.hot.removeStatusHandler(handler);\n fn();\n }\n }\n module.hot.addStatusHandler(handler);\n }\n}\n// Attempt to update code on the fly, fall back to a hard reload.\nfunction tryApplyUpdates(onHotUpdateSuccess) {\n var handleApplyUpdates = function handleApplyUpdates(err, updatedModules) {\n if (err || hadRuntimeError || !updatedModules) {\n if (err) {\n console.warn(\"[Fast Refresh] performing full reload\\n\\n\" + \"Fast Refresh will perform a full reload when you edit a file that's imported by modules outside of the React rendering tree.\\n\" + \"You might have a file which exports a React component but also exports a value that is imported by a non-React component file.\\n\" + \"Consider migrating the non-React component export to a separate file and importing it into both files.\\n\\n\" + \"It is also possible the parent component of the component you edited is a class component, which disables Fast Refresh.\\n\" + \"Fast Refresh requires at least one parent function component in your React tree.\");\n } else if (hadRuntimeError) {\n console.warn(\"[Fast Refresh] performing full reload because your application had an unrecoverable error\");\n }\n performFullReload(err);\n return;\n }\n var hasUpdates = Boolean(updatedModules.length);\n if (typeof onHotUpdateSuccess === \"function\") {\n // Maybe we want to do something.\n onHotUpdateSuccess(hasUpdates);\n }\n if (isUpdateAvailable()) {\n // While we were updating, there was a new update! Do it again.\n tryApplyUpdates(hasUpdates ? _client.onBuildOk : onHotUpdateSuccess);\n } else {\n (0, _client).onBuildOk();\n if (false) {}\n }\n };\n if (false) {}\n if (!isUpdateAvailable() || !canApplyUpdates()) {\n (0, _client).onBuildOk();\n return;\n }\n // https://webpack.js.org/api/hot-module-replacement/#check\n module.hot.check(/* autoApply */ true).then(function(updatedModules) {\n handleApplyUpdates(null, updatedModules);\n }, function(err) {\n handleApplyUpdates(err, null);\n });\n}\nfunction performFullReload(err) {\n var stackTrace = err && (err.stack && err.stack.split(\"\\n\").slice(0, 5).join(\"\\n\") || err.message || err + \"\");\n (0, _websocket).sendMessage(JSON.stringify({\n event: \"client-full-reload\",\n stackTrace: stackTrace\n }));\n window.location.reload();\n}\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=hot-dev-client.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvZGV2L2Vycm9yLW92ZXJsYXkvaG90LWRldi1jbGllbnQuanMuanMiLCJtYXBwaW5ncyI6IkFBQWE7QUFDYkEsOENBQTZDO0lBQ3pDRyxLQUFLLEVBQUUsSUFBSTtDQUNkLEVBQUMsQ0FBQztBQUNIRCxrQkFBZSxHQUFHRyxPQUFPLENBQUM7QUFDMUIsSUFBSUMsT0FBTyxHQUFHQyxtQkFBTyxDQUFDLHlJQUF3RCxDQUFDO0FBQy9FLElBQUlDLFVBQVUsR0FBR0Msc0JBQXNCLENBQUNGLG1CQUFPLENBQUMsNkZBQStCLENBQUMsQ0FBQztBQUNqRixJQUFJRyxVQUFVLEdBQUdILG1CQUFPLENBQUMsb0ZBQWEsQ0FBQztBQUN2QyxJQUFJSSxzQkFBc0IsR0FBR0Ysc0JBQXNCLENBQUNGLG1CQUFPLENBQUMsZ0hBQTJCLENBQUMsQ0FBQztBQUN6RixTQUFTRixPQUFPLEdBQUc7SUFDZixDQUFDLENBQUMsRUFBRUMsT0FBTyxDQUFDLENBQUNNLFFBQVEsRUFBRSxDQUFDO0lBQ3hCLENBQUMsQ0FBQyxFQUFFRixVQUFVLENBQUMsQ0FBQ0csa0JBQWtCLENBQUMsU0FBQ0MsS0FBSyxFQUFHO1FBQ3hDLElBQUlBLEtBQUssQ0FBQ0MsSUFBSSxDQU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gICAgICAgICAgICBzdGFydExhdGVuY3kgPSBEYXRlLm5vdygpO1xuICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCdbRmFzdCBSZWZyZXNoXSByZWJ1aWxkaW5nJyk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgIGNhc2UgJ2J1aWx0JzpcbiAgICAgICAgY2FzZSAnc3luYyc6XG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgaWYgKG9iai5oYXNoKSB7XG4gICAgICAgICAgICAgICAgICAgIGhhbmRsZUF2YWlsYWJsZUhhc2gob2JqLmhhc2gpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBjb25zdCB7IGVycm9ycyAsIHdhcm5pbmdzICB9ID0gb2JqO1xuICAgICAgICAgICAgICAgIGNvbnN0IGhhc0Vycm9ycyA9IEJvb2xlYW4oZXJyb3JzICYmIGVycm9ycy5sZW5ndGgpO1xuICAgICAgICAgICAgICAgIGlmIChoYXNFcnJvcnMpIHtcbiAgICAgICAgICAgICAgICAgICAgKDAsIF93ZWJzb2NrZXQpLnNlbmRNZXNzYWdlKEpTT04uc3RyaW5naWZ5KHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGV2ZW50OiAnY2xpZW50LWVycm9yJyxcbiAgICAgICAgICAgICAgICAgICAgICAgIGVycm9yQ291bnQ6IGVycm9ycy5sZW5ndGgsXG4gICAgICAgICAgICAgICAgICAgICAgICBjbGllbnRJZDogd2luZG93Ll9fbmV4dERldkNsaWVudElkXG4gICAgICAgICAgICAgICAgICAgIH0pKTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGhhbmRsZUVycm9ycyhlcnJvcnMpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBjb25zdCBoYXNXYXJuaW5ncyA9IEJvb2xlYW4od2FybmluZ3MgJiYgd2FybmluZ3MubGVuZ3RoKTtcbiAgICAgICAgICAgICAgICBpZiAoaGFzV2FybmluZ3MpIHtcbiAgICAgICAgICAgICAgICAgICAgKDAsIF93ZWJzb2NrZXQpLnNlbmRNZXNzYWdlKEpTT04uc3RyaW5naWZ5KHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGV2ZW50OiAnY2xpZW50LXdhcm5pbmcnLFxuICAgICAgICAgICAgICAgICAgICAgICAgd2FybmluZ0NvdW50OiB3YXJuaW5ncy5sZW5ndGgsXG4gICAgICAgICAgICAgICAgICAgICAgICBjbGllbnRJZDogd2luZG93Ll9fbmV4dERldkNsaWVudElkXG4gICAgICAgICAgICAgICAgICAgIH0pKTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGhhbmRsZVdhcm5pbmdzKHdhcm5pbmdzKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgKDAsIF93ZWJzb2NrZXQpLnNlbmRNZXNzYWdlKEpTT04uc3RyaW5naWZ5KHtcbiAgICAgICAgICAgICAgICAgICAgZXZlbnQ6ICdjbGllbnQtc3VjY2VzcycsXG4gICAgICAgICAgICAgICAgICAgIGNsaWVudElkOiB3aW5kb3cuX19uZXh0RGV2Q2xpZW50SWRcbiAgICAgICAgICAgICAgICB9KSk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGhhbmRsZVN1Y2Nlc3MoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgY2FzZSAnc2VydmVyQ29tcG9uZW50Q2hhbmdlcyc6XG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgKDAsIF93ZWJzb2NrZXQpLnNlbmRNZXNzYWdlKEpTT04uc3RyaW5naWZ5KHtcbiAgICAgICAgICAgICAgICAgICAgZXZlbnQ6ICdzZXJ2ZXItY29tcG9uZW50LXJlbG9hZC1wYWdlJyxcbiAgICAgICAgICAgICAgICAgICAgY2xpZW50SWQ6IHdpbmRvdy5fX25leHREZXZDbGllbnRJZFxuICAgICAgICAgICAgICAgIH0pKTtcbiAgICAgICAgICAgICAgICByZXR1cm4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XNzYWdlIiwiYXNzaWduIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///../node_modules/next/dist/client/dev/error-overlay/hot-dev-client.js\n"));
/***/ }),
/***/ "../node_modules/next/dist/client/dev/error-overlay/websocket.js":
/*!***********************************************************************!*\
!*** ../node_modules/next/dist/client/dev/error-overlay/websocket.js ***!
\***********************************************************************/
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.addMessageListener = addMessageListener;\nexports.sendMessage = sendMessage;\nexports.connectHMR = connectHMR;\nvar source;\nvar eventCallbacks = [];\nvar lastActivity = Date.now();\nfunction getSocketProtocol(assetPrefix) {\n var protocol = location.protocol;\n try {\n // assetPrefix is a url\n protocol = new URL(assetPrefix).protocol;\n } catch (_) {}\n return protocol === \"http:\" ? \"ws\" : \"wss\";\n}\nfunction addMessageListener(cb) {\n eventCallbacks.push(cb);\n}\nfunction sendMessage(data) {\n if (!source || source.readyState !== source.OPEN) return;\n return source.send(data);\n}\nfunction connectHMR(options) {\n var init = function init() {\n if (source) source.close();\n var hostname = location.hostname, port = location.port;\n var protocol = getSocketProtocol(options.assetPrefix || \"\");\n var assetPrefix = options.assetPrefix.replace(/^\\/+/, \"\");\n var url = \"\".concat(protocol, \"://\").concat(hostname, \":\").concat(port).concat(assetPrefix ? \"/\".concat(assetPrefix) : \"\");\n if (assetPrefix.startsWith(\"http\")) {\n url = \"\".concat(protocol, \"://\").concat(assetPrefix.split(\"://\")[1]);\n }\n source = new window.WebSocket(\"\".concat(url).concat(options.path));\n source.onopen = handleOnline;\n source.onerror = handleDisconnect;\n source.onmessage = handleMessage;\n };\n var handleOnline = function handleOnline() {\n if (options.log) console.log(\"[HMR] connected\");\n lastActivity = Date.now();\n };\n var handleMessage = function handleMessage(event) {\n lastActivity = Date.now();\n eventCallbacks.forEach(function(cb) {\n cb(event);\n });\n };\n var handleDisconnect = function handleDisconnect() {\n clearInterval(timer);\n source.close();\n setTimeout(init, options.timeout);\n };\n if (!options.timeout) {\n options.timeout = 5 * 1000;\n }\n init();\n var timer = setInterval(function() {\n if (Date.now() - lastActivity > options.timeout) {\n handleDisconnect();\n }\n }, options.timeout / 2);\n}\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=websocket.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvZGV2L2Vycm9yLW92ZXJsYXkvd2Vic29ja2V0LmpzLmpzIiwibWFwcGluZ3MiOiJBQUFhO0FBQ2JBLDhDQUE2QztJQUN6Q0csS0FBSyxFQUFFLElBQUk7Q0FDZCxFQUFDLENBQUM7QUFDSEQsMEJBQTBCLEdBQUdFLGtCQUFrQixDQUFDO0FBQ2hERixtQkFBbUIsR0FBR0csV0FBVyxDQUFDO0FBQ2xDSCxrQkFBa0IsR0FBR0ksVUFBVSxDQUFDO0FBQ2hDLElBQUlDLE1BQU07QUFDVixJQUFNQyxjQUFjLEdBQUcsRUFBRTtBQUN6QixJQUFJQyxZQUFZLEdBQUdDLElBQUksQ0FBQ0MsR0FBRyxFQUFFO0FBQzdCLFNBQVNDLGlCQUFpQixDQUFDQyxXQUFXLEVBQUU7SUFDcEMsSUFBSUMsUUFBUSxHQUFHQyxRQUFRLENBQUNELFFBQVE7SUFDaEMsSUFBSTtRQUNBLHVCQUF1QjtRQUN2QkEsUUFBUSxHQUFHLElBQUlFLEdBQUcsQ0FBQ0gsV0FBVyxDQUFDLENBQUNDLFFBQVEsQ0FBQztLQUM1QyxDQUFDLE9BQU9HLENBQUMsRUFBRSxFQUFFO0lBQ2QsT0FBT0gsUUFBUSxLQUFLLE9BQU8sR0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nZhbCIsImRlZmF1bHQiLCJfX2VzTW9kdWxlIiwiYXNzaWduIiwibW9kdWxlIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///../node_modules/next/dist/client/dev/error-overlay/websocket.js\n"));
/***/ }),
/***/ "../node_modules/next/dist/client/dev/fouc.js":
/*!****************************************************!*\
!*** ../node_modules/next/dist/client/dev/fouc.js ***!
\****************************************************/
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.displayContent = displayContent;\n// This wrapper function is used to avoid raising a Trusted Types violation.\nvar safeSetTimeout = function(callback) {\n return setTimeout(callback);\n};\nfunction displayContent() {\n return new Promise(function(resolve) {\n (window.requestAnimationFrame || safeSetTimeout)(function() {\n for(var x = document.querySelectorAll(\"[data-next-hide-fouc]\"), i = x.length; i--;){\n x[i].parentNode.removeChild(x[i]);\n }\n resolve();\n });\n });\n}\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=fouc.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvZGV2L2ZvdWMuanMuanMiLCJtYXBwaW5ncyI6IkFBQWE7QUFDYkEsOENBQTZDO0lBQ3pDRyxLQUFLLEVBQUUsSUFBSTtDQUNkLEVBQUMsQ0FBQztBQUNIRCxzQkFBc0IsR0FBR0UsY0FBYyxDQUFDO0FBQ3hDLDRFQUE0RTtBQUM1RSxJQUFNQyxjQUFjLEdBQUcsU0FBQ0MsUUFBUTtXQUFHQyxVQUFVLENBQUNELFFBQVEsQ0FBQztDQUFBO0FBQ3ZELFNBQVNGLGNBQWMsR0FBRztJQUN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VmYXVsdCAhPT0gbnVsbCkpICYmIHR5cGVvZiBleHBvcnRzLmRlZmF1bHQuX19lc01vZHVsZSA9PT0gJ3VuZGVmaW5lZCcpIHtcbiAgT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMuZGVmYXVsdCwgJ19fZXNNb2R1bGUnLCB7IHZhbHVlOiB0cnVlIH0pO1xuICBPYmplY3QuYXNzaWduKGV4cG9ydHMuZGVmYXVsdCwgZXhwb3J0cyk7XG4gIG1vZHVsZS5leHBvcnRzID0gZXhwb3J0cy5kZWZhdWx0O1xufVxuXG4vLyMgc291cmNlTWFwcGluZ1VSTD1mb3VjLmpzLm1hcCJdLCJuYW1lcyI6WyJPYmplY3QiLCJkZWZpbmVQcm9wZXJ0eSIsImV4cG9ydHMiLCJ2YWx1ZSIsImRpc3BsYXlDb250ZW50Iiwic2FmZVNldFRpbWVvdXQiLCJjYWxsYmFjayIsInNldFRpbWVvdXQiLCJQcm9taXNlIiwicmVzb2x2ZSIsIndpbmRvdyIsInJlcXVlc3RBbmltYXRpb25GcmFtZSIsIngiLCJkb2N1bWVudCIsInF1ZXJ5U2VsZWN0b3JBbGwiLCJpIiwibGVuZ3RoIiwicGFyZW50Tm9kZSIsInJlbW92ZUNoaWxkIiwiZGVmYXVsdCIsIl9fZXNNb2R1bGUiLCJhc3NpZ24iLCJtb2R1bGUiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///../node_modules/next/dist/client/dev/fouc.js\n"));
/***/ }),
/***/ "../node_modules/next/dist/client/dev/on-demand-entries-client.js":
/*!************************************************************************!*\
!*** ../node_modules/next/dist/client/dev/on-demand-entries-client.js ***!
\************************************************************************/
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nvar _interopRequireDefault = (__webpack_require__(/*! @swc/helpers/lib/_interop_require_default.js */ \"../node_modules/@swc/helpers/lib/_interop_require_default.js\")[\"default\"]);\nvar _cUsersGhoshOneDriveDocumentsProgamsUpscaylNodeModulesNextDistCompiledRegeneratorRuntimeRuntimeJs = /*#__PURE__*/ _interopRequireDefault(__webpack_require__(/*! ../node_modules/next/dist/compiled/regenerator-runtime/runtime.js */ \"../node_modules/next/dist/compiled/regenerator-runtime/runtime.js\"));\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _router = _interopRequireDefault1(__webpack_require__(/*! next/router */ \"../node_modules/next/router.js\"));\nvar _websocket = __webpack_require__(/*! ./error-overlay/websocket */ \"../node_modules/next/dist/client/dev/error-overlay/websocket.js\");\nfunction asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nfunction _asyncToGenerator(fn) {\n return function() {\n var self1 = this, args = arguments;\n return new Promise(function(resolve, reject) {\n var gen = fn.apply(self1, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}\nfunction _interopRequireDefault1(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\nvar _default = _asyncToGenerator(_cUsersGhoshOneDriveDocumentsProgamsUpscaylNodeModulesNextDistCompiledRegeneratorRuntimeRuntimeJs.default.mark(function _callee(page) {\n return _cUsersGhoshOneDriveDocumentsProgamsUpscaylNodeModulesNextDistCompiledRegeneratorRuntimeRuntimeJs.default.wrap(function _callee$(_ctx) {\n while(1)switch(_ctx.prev = _ctx.next){\n case 0:\n if (page) {\n // in AMP the router isn't initialized on the client and\n // client-transitions don't occur so ping initial page\n setInterval(function() {\n (0, _websocket).sendMessage(JSON.stringify({\n event: \"ping\",\n page: page\n }));\n }, 2500);\n } else {\n _router.default.ready(function() {\n setInterval(function() {\n // when notFound: true is returned we should use the notFoundPage\n // as the Router.pathname will point to the 404 page but we want\n // to ping the source page that returned notFound: true instead\n var notFoundSrcPage = self.__NEXT_DATA__.notFoundSrcPage;\n var pathname = (_router.default.pathname === \"/404\" || _router.default.pathname === \"/_error\") && notFoundSrcPage ? notFoundSrcPage : _router.default.pathname;\n (0, _websocket).sendMessage(JSON.stringify({\n event: \"ping\",\n page: pathname\n }));\n }, 2500);\n });\n }\n (0, _websocket).addMessageListener(function(event) {\n if (event.data.indexOf(\"{\") === -1) return;\n try {\n var payload = JSON.parse(event.data);\n // don't attempt fetching the page if we're already showing\n // the dev overlay as this can cause the error to be triggered\n // repeatedly\n if (payload.event === \"pong\" && payload.invalid && !self.__NEXT_DATA__.err) {\n // Payload can be invalid even if the page does exist.\n // So, we check if it can be created.\n fetch(location.href, {\n credentials: \"same-origin\"\n }).then(function(pageRes) {\n if (pageRes.status === 200) {\n // Page exists now, reload\n location.reload();\n } else {\n // Page doesn't exist\n if (self.__NEXT_DATA__.page === _router.default.pathname && _router.default.pathname !== \"/_error\") {\n // We are still on the page,\n // reload to show 404 error page\n location.reload();\n }\n }\n });\n }\n } catch (err) {\n console.error(\"on-demand-entries failed to parse response\", err);\n }\n });\n case 2:\n case \"end\":\n return _ctx.stop();\n }\n }, _callee);\n}));\nexports[\"default\"] = _default;\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=on-demand-entries-client.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvZGV2L29uLWRlbWFuZC1lbnRyaWVzLWNsaWVudC5qcy5qcyIsIm1hcHBpbmdzIjoiQUFBYTs7Ozs7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G4gICAgICAgICAgICAgICAgLy8gdG8gcGluZyB0aGUgc291cmNlIHBhZ2UgdGhhdCByZXR1cm5lZCBub3RGb3VuZDogdHJ1ZSBpbnN0ZWFkXG4gICAgICAgICAgICAgICAgY29uc3Qgbm90Rm91bmRTcmNQYWdlID0gc2VsZi5fX05FWFRfREFUQV9fLm5vdEZvdW5kU3JjUGFnZTtcbiAgICAgICAgICAgICAgICBjb25zdCBwYXRobmFtZSA9IChfcm91dGVyLmRlZmF1bHQucGF0aG5hbWUgPT09ICcvNDA0JyB8fCBfcm91dGVyLmRlZmF1bHQucGF0aG5hbWUgPT09ICcvX2Vycm9yJykgJiYgbm90Rm91bmRTcmNQYWdlID8gbm90Rm91bmRTcmNQYWdlIDogX3JvdXRlci5kZWZhdWx0LnBhdGhuYW1lO1xuICAgICAgICAgICAgICAgICgwLCBfd2Vic29ja2V0KS5zZW5kTWVzc2FnZShKU09OLnN0cmluZ2lmeSh7XG4gICAgICAgICAgICAgICAgICAgIGV2ZW50OiAncGluZycsXG4gICAgICAgICAgICAgICAgICAgIHBhZ2U6IHBhdGhuYW1lXG4gICAgICAgICAgICAgICAgfSkpO1xuICAgICAgICAgICAgfSwgMjUwMCk7XG4gICAgICAgIH0pO1xuICAgIH1cbiAgICAoMCwgX3dlYnNvY2tldCkuYWRkTWVzc2FnZUxpc3RlbmVyKChldmVudCk9PntcbiAgICAgICAgaWYgKGV2ZW50LmRhdGEuaW5kZXhPZigneycpID09PSAtMSkgcmV0dXJuO1xuICAgICAgICB0cnkge1xuICAgICAgICAgICAgY29uc3QgcGF5bG9hZCA9IEpTT04ucGFyc2UoZXZlbnQuZGF0YSk7XG4gICAgICAgICAgICAvLyBkb24ndCBhdHRlbXB0IGZldGNoaW5nIHRoZSBwYWdlIGlmIHdlJ3JlIGFscmVhZHkgc2hvd2luZ1xuICAgICAgICAgICAgLy8gdGhlIGRldiBvdmVybGF5IGFzIHRoaXMgY2FuIGNhdXNlIHRoZSBlcnJvciB0byBiZSB0cmlnZ2VyZWRcbiAgICAgICAgICAgIC8vIHJlcGVhdGVkbHlcbiAgICAgICAgICAgIGlmIChwYXlsb2FkLmV2ZW50ID09PSAncG9uZycgJiYgcGF5bG9hZC5pbnZhbGlkICYmICFzZWxmLl9fTkVYVF9EQVRBX18uZXJyKSB7XG4gICAgICAgICAgICAgICAgLy8gUGF5bG9hZCBjYW4gYmUgaW52YWxpZCBldmVuIGlmIHRoZSBwYWdlIGRvZXMgZXhpc3QuXG4gICAgICAgICAgICAgICAgLy8gU28sIHdlIGNoZWNrIGlmIGl0IGNhbiBiZSBjcmVhdGVkLlxuICAgICAgICAgICAgICAgIGZldGNoKGxvY2F0aW9uLmhyZWYsIHtcbiAgICAgICAgICAgICAgICAgICAgY3JlZGVudGlhbHM6ICdzYW1lLW9yaWdpbidcbiAgICAgICAgICAgICAgICB9KS50aGVuKChwYWdlUmVzKT0+e1xuICAgICAgICAgICAgICAgICAgICBpZiAocGFnZVJlcy5zdGF0dXMgPT09IDIwMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gUGFnZSBleGlzdHMgbm93LCByZWxvYWRcbiAgICAgICAgICAgICAgICAgICAgICAgIGxvY2F0aW9uLnJlbG9hZCgpO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gUGFnZSBkb2Vzbid0IGV4aXN0XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoc2VsZi5fX05FWFRfREFUQV9fLnBhZ2UgPT09IF9yb3V0ZXIuZGVmYXVsdC5wYXRobmFtZSAmJiBfcm91dGVyLmRlZmF1bHQucGF0aG5hbWUgIT09ICcvX2Vycm9yJykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIFdlIGFyZSBzdGlsbCBvbiB0aGUgcGFnZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyByZWxvYWQgdG8gc2hvdyA0MDQgZXJyb3IgcGFnZVxuICAgICAgICAgICAg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2x2ZSIsInJlamVjdCIsIl9uZXh0IiwiX3Rocm93Iiwia2V5IiwiYXJnIiwiaW5mbyIsImVycm9yIiwiZG9uZSIsIlByb21pc2UiLCJ0aGVuIiwiX2FzeW5jVG9HZW5lcmF0b3IiLCJmbiIsInNlbGYiLCJhcmdzIiwiYXJndW1lbnRzIiwiYXBwbHkiLCJlcnIiLCJ1bmRlZmluZWQiLCJvYmoiLCJfX2VzTW9kdWxlIiwiX2RlZmF1bHQiLCJwYWdlIiwic2V0SW50ZXJ2YWwiLCJzZW5kTWVzc2FnZSIsIkpTT04iLCJzdHJpbmdpZnkiLCJldmVudCIsInJlYWR5Iiwibm90Rm91bmRTcmNQYWdlIiwiX19ORVhUX0RBVEFfXyIsInBhdGhuYW1lIiwiYWRkTWVzc2FnZUxpc3RlbmVyIiwiZGF0YSIsImluZGV4T2YiLCJwYXlsb2FkIiwicGFyc2UiLCJpbnZhbGlkIiwiZmV0Y2giLCJsb2NhdGlvbiIsImhyZWYiLCJjcmVkZW50aWFscyIsInBhZ2VSZXMiLCJzdGF0dXMiLCJyZWxvYWQiLCJjb25zb2xlIiwiYXNzaWduIiwibW9kdWxlIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///../node_modules/next/dist/client/dev/on-demand-entries-client.js\n"));
/***/ }),
/***/ "../node_modules/next/dist/client/dev/webpack-hot-middleware-client.js":
/*!*****************************************************************************!*\
!*** ../node_modules/next/dist/client/dev/webpack-hot-middleware-client.js ***!
\*****************************************************************************/
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nvar _slicedToArray = (__webpack_require__(/*! @swc/helpers/lib/_sliced_to_array.js */ \"../node_modules/@swc/helpers/lib/_sliced_to_array.js\")[\"default\"]);\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _hotDevClient = _interopRequireDefault(__webpack_require__(/*! ./error-overlay/hot-dev-client */ \"../node_modules/next/dist/client/dev/error-overlay/hot-dev-client.js\"));\nvar _websocket = __webpack_require__(/*! ./error-overlay/websocket */ \"../node_modules/next/dist/client/dev/error-overlay/websocket.js\");\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\nvar _default = function() {\n var devClient = (0, _hotDevClient).default();\n devClient.subscribeToHmrEvent(function(obj) {\n if (obj.action === \"reloadPage\") {\n (0, _websocket).sendMessage(JSON.stringify({\n event: \"client-reload-page\",\n clientId: window.__nextDevClientId\n }));\n return window.location.reload();\n }\n if (obj.action === \"removedPage\") {\n var _data = _slicedToArray(obj.data, 1), page = _data[0];\n if (page === window.next.router.pathname) {\n (0, _websocket).sendMessage(JSON.stringify({\n event: \"client-removed-page\",\n clientId: window.__nextDevClientId,\n page: page\n }));\n return window.location.reload();\n }\n return;\n }\n if (obj.action === \"addedPage\") {\n var _data1 = _slicedToArray(obj.data, 1), page1 = _data1[0];\n if (page1 === window.next.router.pathname && typeof window.next.router.components[page1] === \"undefined\") {\n (0, _websocket).sendMessage(JSON.stringify({\n event: \"client-added-page\",\n clientId: window.__nextDevClientId,\n page: page1\n }));\n return window.location.reload();\n }\n return;\n }\n throw new Error(\"Unexpected action \" + obj.action);\n });\n return devClient;\n};\nexports[\"default\"] = _default;\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=webpack-hot-middleware-client.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvZGV2L3dlYnBhY2staG90LW1pZGRsZXdhcmUtY2xpZW50LmpzLmpzIiwibWFwcGluZ3MiOiJBQUFhOzs7OztBQUNiQSw4Q0FBNkM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Rvdy5uZXh0LnJvdXRlci5wYXRobmFtZSkge1xuICAgICAgICAgICAgICAgICgwLCBfd2Vic29ja2V0KS5zZW5kTWVzc2FnZShKU09OLnN0cmluZ2lmeSh7XG4gICAgICAgICAgICAgICAgICAgIGV2ZW50OiAnY2xpZW50LXJlbW92ZWQtcGFnZScsXG4gICAgICAgICAgICAgICAgICAgIGNsaWVudElkOiB3aW5kb3cuX19uZXh0RGV2Q2xpZW50SWQsXG4gICAgICAgICAgICAgICAgICAgIHBhZ2VcbiAgICAgICAgICAgICAgICB9KSk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHdpbmRvdy5sb2NhdGlvbi5yZWxvYWQoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuICAgICAgICBpZiAob2JqLmFjdGlvbiA9PT0gJ2FkZGVkUGFnZScpIHtcbiAgICAgICAgICAgIGNvbnN0IFtwYWdlXSA9IG9iai5kYXRhO1xuICAgICAgICAgICAgaWYgKHBhZ2UgPT09IHdpbmRvdy5uZXh0LnJvdXRlci5wYXRobmFtZSAmJiB0eXBlb2Ygd2luZG93Lm5leHQucm91dGVyLmNvbXBvbmVudHNbcGFnZV0gPT09ICd1bmRlZmluZWQnKSB7XG4gICAgICAgICAgICAgICAgKDAsIF93ZWJzb2NrZXQpLnNlbmRNZXNzYWdlKEpTT04uc3RyaW5naWZ5KHtcbiAgICAgICAgICAgICAgICAgICAgZXZlbnQ6ICdjbGllbnQtYWRkZWQtcGFnZScsXG4gICAgICAgICAgICAgICAgICAgIGNsaWVudElkOiB3aW5kb3cuX19uZXh0RGV2Q2xpZW50SWQsXG4gICAgICAgICAgICAgICAgICAgIHBhZ2VcbiAgICAgICAgICAgICAgICB9KSk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHdpbmRvdy5sb2NhdGlvbi5yZWxvYWQoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuICAg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InJlbG9hZCIsImRhdGEiLCJwYWdlIiwibmV4dCIsInJvdXRlciIsInBhdGhuYW1lIiwiY29tcG9uZW50cyIsIkVycm9yIiwiYXNzaWduIiwibW9kdWxlIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///../node_modules/next/dist/client/dev/webpack-hot-middleware-client.js\n"));
/***/ }),
/***/ "../node_modules/next/dist/client/has-base-path.js":
/*!*********************************************************!*\
!*** ../node_modules/next/dist/client/has-base-path.js ***!
\*********************************************************/
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.hasBasePath = hasBasePath;\nvar _pathHasPrefix = __webpack_require__(/*! ../shared/lib/router/utils/path-has-prefix */ \"../node_modules/next/dist/shared/lib/router/utils/path-has-prefix.js\");\nvar basePath = false || \"\";\nfunction hasBasePath(path) {\n return (0, _pathHasPrefix).pathHasPrefix(path, basePath);\n}\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=has-base-path.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvaGFzLWJhc2UtcGF0aC5qcy5qcyIsIm1hcHBpbmdzIjoiQUFBYTtBQUNiQSw4Q0FBNkM7SUFDekNHLEtBQUssRUFBRSxJQUFJO0NBQ2QsRUFBQyxDQUFDO0FBQ0hELG1CQUFtQixHQUFHRSxXQUFXLENBQUM7QUFDbEMsSUFBSUMsY0FBYyxHQUFHQyxtQkFBTyxDQUFDLHdIQUE0QyxDQUFDO0FBQzFFLElBQU1DLFFBQVEsR0FBR0MsTUFBa0MsSUFBSSxFQUFFO0FBQ3pELFNBQVNK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L=webpack-internal:///../node_modules/next/dist/client/has-base-path.js\n"));
/***/ }),
/***/ "../node_modules/next/dist/client/head-manager.js":
/*!********************************************************!*\
!*** ../node_modules/next/dist/client/head-manager.js ***!
\********************************************************/
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nvar _instanceof = (__webpack_require__(/*! @swc/helpers/lib/_instanceof.js */ \"../node_modules/@swc/helpers/lib/_instanceof.js\")[\"default\"]);\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = initHeadManager;\nexports.isEqualNode = isEqualNode;\nexports.DOMAttributeNames = void 0;\nfunction initHeadManager() {\n return {\n mountedInstances: new Set(),\n updateHead: function(head) {\n var tags = {};\n head.forEach(function(h) {\n if (// it won't be inlined. In this case revert to the original behavior\n h.type === \"link\" && h.props[\"data-optimized-fonts\"]) {\n if (document.querySelector('style[data-href=\"'.concat(h.props[\"data-href\"], '\"]'))) {\n return;\n } else {\n h.props.href = h.props[\"data-href\"];\n h.props[\"data-href\"] = undefined;\n }\n }\n var components = tags[h.type] || [];\n components.push(h);\n tags[h.type] = components;\n });\n var titleComponent = tags.title ? tags.title[0] : null;\n var title = \"\";\n if (titleComponent) {\n var children = titleComponent.props.children;\n title = typeof children === \"string\" ? children : Array.isArray(children) ? children.join(\"\") : \"\";\n }\n if (title !== document.title) document.title = title;\n [\n \"meta\",\n \"base\",\n \"link\",\n \"style\",\n \"script\"\n ].forEach(function(type) {\n updateElements(type, tags[type] || []);\n });\n }\n };\n}\nvar DOMAttributeNames = {\n acceptCharset: \"accept-charset\",\n className: \"class\",\n htmlFor: \"for\",\n httpEquiv: \"http-equiv\",\n noModule: \"noModule\"\n};\nexports.DOMAttributeNames = DOMAttributeNames;\nfunction reactElementToDOM(param) {\n var type = param.type, props = param.props;\n var el = document.createElement(type);\n for(var p in props){\n if (!props.hasOwnProperty(p)) continue;\n if (p === \"children\" || p === \"dangerouslySetInnerHTML\") continue;\n // we don't render undefined props to the DOM\n if (props[p] === undefined) continue;\n var attr = DOMAttributeNames[p] || p.toLowerCase();\n if (type === \"script\" && (attr === \"async\" || attr === \"defer\" || attr === \"noModule\")) {\n el[attr] = !!props[p];\n } else {\n el.setAttribute(attr, props[p]);\n }\n }\n var children = props.children, dangerouslySetInnerHTML = props.dangerouslySetInnerHTML;\n if (dangerouslySetInnerHTML) {\n el.innerHTML = dangerouslySetInnerHTML.__html || \"\";\n } else if (children) {\n el.textContent = typeof children === \"string\" ? children : Array.isArray(children) ? children.join(\"\") : \"\";\n }\n return el;\n}\nfunction isEqualNode(oldTag, newTag) {\n if (_instanceof(oldTag, HTMLElement) && _instanceof(newTag, HTMLElement)) {\n var nonce = newTag.getAttribute(\"nonce\");\n // Only strip the nonce if `oldTag` has had it stripped. An element's nonce attribute will not\n // be stripped if there is no content security policy response header that includes a nonce.\n if (nonce && !oldTag.getAttribute(\"nonce\")) {\n var cloneTag = newTag.cloneNode(true);\n cloneTag.setAttribute(\"nonce\", \"\");\n cloneTag.nonce = nonce;\n return nonce === oldTag.nonce && oldTag.isEqualNode(cloneTag);\n }\n }\n return oldTag.isEqualNode(newTag);\n}\nfunction updateElements(type, components) {\n var headEl = document.getElementsByTagName(\"head\")[0];\n var headCountEl = headEl.querySelector(\"meta[name=next-head-count]\");\n if (true) {\n if (!headCountEl) {\n console.error(\"Warning: next-head-count is missing. https://nextjs.org/docs/messages/next-head-count-missing\");\n return;\n }\n }\n var headCount = Number(headCountEl.content);\n var oldTags = [];\n for(var i = 0, j = headCountEl.previousElementSibling; i < headCount; i++, j = (j == null ? void 0 : j.previousElementSibling) || null){\n var ref;\n if ((j == null ? void 0 : (ref = j.tagName) == null ? void 0 : ref.toLowerCase()) === type) {\n oldTags.push(j);\n }\n }\n var newTags = components.map(reactElementToDOM).filter(function(newTag) {\n for(var k = 0, len = oldTags.length; k < len; k++){\n var oldTag = oldTags[k];\n if (isEqualNode(oldTag, newTag)) {\n oldTags.splice(k, 1);\n return false;\n }\n }\n return true;\n });\n oldTags.forEach(function(t) {\n var ref;\n return (ref = t.parentNode) == null ? void 0 : ref.removeChild(t);\n });\n newTags.forEach(function(t) {\n return headEl.insertBefore(t, headCountEl);\n });\n headCountEl.content = (headCount - oldTags.length + newTags.length).toString();\n}\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=head-manager.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvaGVhZC1tYW5hZ2VyLmpzLmpzIiwibWFwcGluZ3MiOiJBQUFhOzs7OztBQUNiQSw4Q0FBNkM7SUFDekNHLEtBQUssRUFBRSxJQUFJO0NBQ2QsRUFBQyxDQUFDO0FBQ0hELGtCQUFlLEdBQUdHLGVBQWUsQ0FBQztBQUNsQ0gsbUJBQW1CLEdBQUdJLFdBQVcsQ0FBQztBQUNsQ0oseUJBQXlCLEdBQUcsS0FBSyxDQUFDLENBQUM7QUFDbkMsU0FBU0csZUFBZSxHQUFHO0lBQ3ZCLE9BQU87UUFDSEcsZ0JBQWdCLEVBQUUsSUFBSUMsR0FBRyxFQUFFO1FBQzNCQyxVQUFVLEVBQUUsU0FBQ0MsSUFBSSxFQUFHO1lBQ2hCLElBQU1DLElBQUksR0FBRyxFQUFFO1lBQ2ZELElBQUksQ0FBQ0UsT0FBTyxDQUFDLFNBQUNDLENBQUMsRUFBRztnQkFDZCxJQUNBLG9FQUFvRTtnQkFDcEVBLENBQUMsQ0FBQ0MsSUFBSSxLQUFLLE1BQU0sSUFBSUQsQ0FBQyxDQUFDRSxLQUFLLENBQUMsc0JBQXNCLENBQUMsRUFBRTtvQkFDbEQsSUFBSUMsUUFBUSxDQU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yBsb2FkZWQgb25seSBvbiBjbGllbnQgbmF2aWdhdGlvblxuICAgICAgICAgICAgICAgIC8vIGl0IHdvbid0IGJlIGlubGluZWQuIEluIHRoaXMgY2FzZSByZXZlcnQgdG8gdGhlIG9yaWdpbmFsIGJlaGF2aW9yXG4gICAgICAgICAgICAgICAgaC50eXBlID09PSAnbGluaycgJiYgaC5wcm9wc1snZGF0YS1vcHRpbWl6ZWQtZm9udHMnXSkge1xuICAgICAgICAgICAgICAgICAgICBpZiAoZG9jdW1lbnQucXVlcnlTZWxlY3Rvcihgc3R5bGVbZGF0YS1ocmVmPVwiJHtoLnByb3BzWydkYXRhLWhyZWYnXX1cIl1gKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgaC5wcm9wcy5ocmVmID0gaC5wcm9wc1snZGF0YS1ocmVmJ107XG4gICAgICAgICAgICAgICAgICAgICAgICBoLnByb3BzWydkYXRhLWhyZWYnXSA9IHVuZGVmaW5lZDtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBjb25zdCBjb21wb25lbnRzID0gdGFnc1toLnR5cGVdIHx8IFtdO1xuICAgICAgICAgICAgICAgIGNvbXBvbmVudHMucHVzaChoKTtcbiAgICAgICAgICAgICAgICB0YWdzW2gudHlwZV0gPSBjb21wb25lbnRzO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBjb25zdCB0aXRsZUNvbXBvbmVudCA9IHRhZ3MudGl0bGUgPyB0YWdzLnRpdGxlWzBdIDogbnVsbDtcbiAgICAgICAgICAgIGxldCB0aXRsZSA9ICcnO1xuICAgICAgICAgICAgaWYgKHRpdGxlQ29tcG9uZW50KSB7XG4gICAgICAgICAgICAgICAgY29uc3QgeyBjaGlsZHJlbiAgfSA9IHRpdGxlQ29tcG9uZW50LnByb3BzO1xuICAgICAgICAgICAgICAgIHRpdGxlID0gdHlwZW9mIGNoaWxkcmVuID09PSAnc3RyaW5nJyA/IGNoaWxkcmVuIDogQXJyYXkuaXNBcnJheShjaGlsZHJlbikgPyBjaGlsZHJlbi5qb2luKCcnKSA6ICcnO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKHRpdGxlICE9PSBkb2N1bWVudC50aXRsZSkgZG9jdW1lbnQudGl0bGUgPSB0aXRsZTtcbiAgICAgICAgICAgIFtcbiAgICAgICAgICAgICAgICAnbWV0YScsXG4gICAgICAgICAgICAgICAgJ2Jhc2UnLFxuICAgICAgICAgICAgICAgICdsaW5rJyxcbiAgICAgICAgICAgICAgICAnc3R5bGUnLFxuICAgICAgICAgICAgICAgICdzY3JpcHQnXG4gICAgICAgICAgICBdLmZvckVhY2goKHR5cGUpPT57XG4gICAgICAgICAgICAgICAgdXBkYXRlRWxlbWVudHModHlwZSwgdGFnc1t0eXBlXSB8fCBbXSk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgIH07XG59XG5jb25zdCBET01BdHRyaWJ1dGVOYW1lcyA9IHtcbiAgICBhY2NlcHRDaGFyc2V0OiAnYWNjZXB0LWNoYXJzZXQnLFxuICAgIGNsYXNzTmFtZTogJ2NsYXNzJyxcbiAgICBodG1sRm9yOiAnZm9yJyxcbiAgICBodHRwRXF1aXY6ICdodHRwLWVxdWl2JyxcbiAgICBub01vZHVsZTogJ25vTW9kdWxlJ1xufTtcbmV4cG9ydHMuRE9NQXR0cmlidXRlTmFtZXMgPSBET01BdHRyaWJ1dGVOYW1lcztcbmZ1bmN0aW9uIHJlYWN0RWxlbWVudFRvRE9NKHsgdHlwZSAsIHByb3BzICB9KSB7XG4gICAgY29uc3QgZWwgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KHR5cGUpO1xuICAgIGZvcihjb25zdCBwIGluIHByb3BzKXtcbiAgICAgICAgaWYgKCFwcm9wcy5oYXNPd25Qcm9wZXJ0eShwKS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mxpbmciLCJyZWYiLCJ0YWdOYW1lIiwibmV3VGFncyIsIm1hcCIsImZpbHRlciIsImsiLCJsZW4iLCJsZW5ndGgiLCJzcGxpY2UiLCJ0IiwicGFyZW50Tm9kZSIsInJlbW92ZUNoaWxkIiwiaW5zZXJ0QmVmb3JlIiwidG9TdHJpbmciLCJfX2VzTW9kdWxlIiwiYXNzaWduIiwibW9kdWxlIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///../node_modules/next/dist/client/head-manager.js\n"));
/***/ }),
/***/ "../node_modules/next/dist/client/index.js":
/*!*************************************************!*\
!*** ../node_modules/next/dist/client/index.js ***!
\*************************************************/
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nvar _classCallCheck = (__webpack_require__(/*! @swc/helpers/lib/_class_call_check.js */ \"../node_modules/@swc/helpers/lib/_class_call_check.js\")[\"default\"]);\nvar _createClass = (__webpack_require__(/*! @swc/helpers/lib/_create_class.js */ \"../node_modules/@swc/helpers/lib/_create_class.js\")[\"default\"]);\nvar _inherits = (__webpack_require__(/*! @swc/helpers/lib/_inherits.js */ \"../node_modules/@swc/helpers/lib/_inherits.js\")[\"default\"]);\nvar _interopRequireDefault = (__webpack_require__(/*! @swc/helpers/lib/_interop_require_default.js */ \"../node_modules/@swc/helpers/lib/_interop_require_default.js\")[\"default\"]);\nvar _interopRequireWildcard = (__webpack_require__(/*! @swc/helpers/lib/_interop_require_wildcard.js */ \"../node_modules/@swc/helpers/lib/_interop_require_wildcard.js\")[\"default\"]);\nvar _slicedToArray = (__webpack_require__(/*! @swc/helpers/lib/_sliced_to_array.js */ \"../node_modules/@swc/helpers/lib/_sliced_to_array.js\")[\"default\"]);\nvar _createSuper = (__webpack_require__(/*! @swc/helpers/lib/_create_super.js */ \"../node_modules/@swc/helpers/lib/_create_super.js\")[\"default\"]);\nvar _cUsersGhoshOneDriveDocumentsProgamsUpscaylNodeModulesNextDistCompiledRegeneratorRuntimeRuntimeJs = /*#__PURE__*/ _interopRequireDefault(__webpack_require__(/*! ../node_modules/next/dist/compiled/regenerator-runtime/runtime.js */ \"../node_modules/next/dist/compiled/regenerator-runtime/runtime.js\"));\nvar _s = $RefreshSig$(), _s1 = $RefreshSig$();\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.initialize = initialize;\nexports.hydrate = hydrate;\nexports.emitter = exports.router = exports.version = void 0;\n__webpack_require__(/*! ../build/polyfills/polyfill-module */ \"../node_modules/next/dist/build/polyfills/polyfill-module.js\");\nvar _react = _interopRequireDefault1(__webpack_require__(/*! react */ \"../node_modules/react/index.js\"));\nvar _headManagerContext = __webpack_require__(/*! ../shared/lib/head-manager-context */ \"../node_modules/next/dist/shared/lib/head-manager-context.js\");\nvar _mitt = _interopRequireDefault1(__webpack_require__(/*! ../shared/lib/mitt */ \"../node_modules/next/dist/shared/lib/mitt.js\"));\nvar _routerContext = __webpack_require__(/*! ../shared/lib/router-context */ \"../node_modules/next/dist/shared/lib/router-context.js\");\nvar _isDynamic = __webpack_require__(/*! ../shared/lib/router/utils/is-dynamic */ \"../node_modules/next/dist/shared/lib/router/utils/is-dynamic.js\");\nvar _querystring = __webpack_require__(/*! ../shared/lib/router/utils/querystring */ \"../node_modules/next/dist/shared/lib/router/utils/querystring.js\");\nvar _runtimeConfig = __webpack_require__(/*! ../shared/lib/runtime-config */ \"../node_modules/next/dist/shared/lib/runtime-config.js\");\nvar _utils = __webpack_require__(/*! ../shared/lib/utils */ \"../node_modules/next/dist/shared/lib/utils.js\");\nvar _portal = __webpack_require__(/*! ./portal */ \"../node_modules/next/dist/client/portal/index.js\");\nvar _headManager = _interopRequireDefault1(__webpack_require__(/*! ./head-manager */ \"../node_modules/next/dist/client/head-manager.js\"));\nvar _pageLoader = _interopRequireDefault1(__webpack_require__(/*! ./page-loader */ \"../node_modules/next/dist/client/page-loader.js\"));\nvar _performanceRelayer = _interopRequireDefault1(__webpack_require__(/*! ./performance-relayer */ \"../node_modules/next/dist/client/performance-relayer.js\"));\nvar _routeAnnouncer = __webpack_require__(/*! ./route-announcer */ \"../node_modules/next/dist/client/route-announcer.js\");\nvar _router = __webpack_require__(/*! ./router */ \"../node_modules/next/dist/client/router.js\");\nvar _isError = __webpack_require__(/*! ../lib/is-error */ \"../node_modules/next/dist/lib/is-error.js\");\nvar _imageConfigContext = __webpack_require__(/*! ../shared/lib/image-config-context */ \"../node_modules/next/dist/shared/lib/image-config-context.js\");\nvar _removeBasePath = __webpack_require__(/*! ./remove-base-path */ \"../node_modules/next/dist/client/remove-base-path.js\");\nvar _hasBasePath = __webpack_require__(/*! ./has-base-path */ \"../node_modules/next/dist/client/has-base-path.js\");\nfunction asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nfunction _asyncToGenerator(fn) {\n return function() {\n var _$self = this, args = arguments;\n return new Promise(function(resolve, reject) {\n var gen = fn.apply(_$self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}\nfunction _extends() {\n _extends = Object.assign || function(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i];\n for(var key in source){\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}\nfunction _interopRequireDefault1(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\nfunction _getRequireWildcardCache() {\n if (typeof WeakMap !== \"function\") return null;\n var cache = new WeakMap();\n _getRequireWildcardCache = function _getRequireWildcardCache() {\n return cache;\n };\n return cache;\n}\nfunction _interopRequireWildcard1(obj) {\n if (obj && obj.__esModule) {\n return obj;\n }\n if (obj === null || typeof obj !== \"object\" && typeof obj !== \"function\") {\n return {\n default: obj\n };\n }\n var cache = _getRequireWildcardCache();\n if (cache && cache.has(obj)) {\n return cache.get(obj);\n }\n var newObj = {};\n var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;\n for(var key in obj){\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;\n if (desc && (desc.get || desc.set)) {\n Object.defineProperty(newObj, key, desc);\n } else {\n newObj[key] = obj[key];\n }\n }\n }\n newObj.default = obj;\n if (cache) {\n cache.set(obj, newObj);\n }\n return newObj;\n}\nvar ReactDOM = false ? 0 : __webpack_require__(/*! react-dom */ \"../node_modules/react-dom/index.js\");\nvar version = \"12.2.3\";\nexports.version = version;\nvar router;\nexports.router = router;\nvar emitter = (0, _mitt).default();\nexports.emitter = emitter;\nvar looseToArray = function(input) {\n return [].slice.call(input);\n};\nvar initialData;\nvar defaultLocale = undefined;\nvar asPath;\nvar pageLoader;\nvar appElement;\nvar headManager;\nvar initialMatchesMiddleware = false;\nvar lastRenderReject;\nvar webpackHMR;\nvar CachedApp, onPerfEntry;\nvar CachedComponent;\nself.__next_require__ = __webpack_require__;\nvar Container = /*#__PURE__*/ function(_Component) {\n _inherits(Container, _Component);\n var _super = _createSuper(Container);\n function Container() {\n _classCallCheck(this, Container);\n return _super.apply(this, arguments);\n }\n _createClass(Container, [\n {\n key: \"componentDidCatch\",\n value: function componentDidCatch(componentErr, info) {\n this.props.fn(componentErr, info);\n }\n },\n {\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.scrollToHash();\n // We need to replace the router state if:\n // - the page was (auto) exported and has a query string or search (hash)\n // - it was auto exported and is a dynamic route (to provide params)\n // - if it is a client-side skeleton (fallback render)\n // - if middleware matches the current page (may have rewrite params)\n // - if rewrites in next.config.js match (may have rewrite params)\n if (router.isSsr && // the asPath unexpectedly e.g. adding basePath when\n // it wasn't originally present\n initialData.page !== \"/404\" && initialData.page !== \"/_error\" && (initialData.isFallback || initialData.nextExport && ((0, _isDynamic).isDynamicRoute(router.pathname) || location.search || false || initialMatchesMiddleware) || initialData.props && initialData.props.__N_SSG && (location.search || false || initialMatchesMiddleware))) {\n // update query on mount for exported pages\n router.replace(router.pathname + \"?\" + String((0, _querystring).assign((0, _querystring).urlQueryToSearchParams(router.query), new URLSearchParams(location.search))), asPath, {\n // @ts-ignore\n // WARNING: `_h` is an internal option for handing Next.js\n // client-side hydration. Your app should _never_ use this property.\n // It may change at any time without notice.\n _h: 1,\n // Fallback pages must trigger the data fetch, so the transition is\n // not shallow.\n // Other pages (strictly updating query) happens shallowly, as data\n // requirements would already be present.\n shallow: !initialData.isFallback && !initialMatchesMiddleware\n }).catch(function(err) {\n if (!err.cancelled) throw err;\n });\n }\n }\n },\n {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate() {\n this.scrollToHash();\n }\n },\n {\n key: \"scrollToHash\",\n value: function scrollToHash() {\n var hash = location.hash;\n hash = hash && hash.substring(1);\n if (!hash) return;\n var el = document.getElementById(hash);\n if (!el) return;\n // If we call scrollIntoView() in here without a setTimeout\n // it won't scroll properly.\n setTimeout(function() {\n return el.scrollIntoView();\n }, 0);\n }\n },\n {\n key: \"render\",\n value: function render() {\n if (false) {} else {\n var ReactDevOverlay = (__webpack_require__(/*! next/dist/compiled/@next/react-dev-overlay/dist/client */ \"../node_modules/next/dist/compiled/@next/react-dev-overlay/dist/client.js\").ReactDevOverlay);\n return /*#__PURE__*/ _react.default.createElement(ReactDevOverlay, null, this.props.children);\n }\n }\n }\n ]);\n return Container;\n}(_react.default.Component);\nfunction initialize() {\n return _initialize.apply(this, arguments);\n}\nfunction _initialize() {\n _initialize = _asyncToGenerator(_cUsersGhoshOneDriveDocumentsProgamsUpscaylNodeModulesNextDistCompiledRegeneratorRuntimeRuntimeJs.default.mark(function _callee() {\n var opts, prefix, normalizeLocalePath, detectDomainLocale, parseRelativeUrl, formatUrl, parsedAs, localePathResult, detectedDomain, initScriptLoader, register, _args = arguments;\n return _cUsersGhoshOneDriveDocumentsProgamsUpscaylNodeModulesNextDistCompiledRegeneratorRuntimeRuntimeJs.default.wrap(function _callee$(_ctx) {\n while(1)switch(_ctx.prev = _ctx.next){\n case 0:\n opts = _args.length > 0 && _args[0] !== void 0 ? _args[0] : {};\n // This makes sure this specific lines are removed in production\n if (true) {\n webpackHMR = opts.webpackHMR;\n }\n initialData = JSON.parse(document.getElementById(\"__NEXT_DATA__\").textContent);\n window.__NEXT_DATA__ = initialData;\n defaultLocale = initialData.defaultLocale;\n prefix = initialData.assetPrefix || \"\";\n // With dynamic assetPrefix it's no longer possible to set assetPrefix at the build time\n // So, this is how we do it in the client side at runtime\n __webpack_require__.p = \"\".concat(prefix, \"/_next/\") //eslint-disable-line\n ;\n // Initialize next/config with the environment configuration\n (0, _runtimeConfig).setConfig({\n serverRuntimeConfig: {},\n publicRuntimeConfig: initialData.runtimeConfig || {}\n });\n asPath = (0, _utils).getURL();\n // make sure not to attempt stripping basePath for 404s\n if ((0, _hasBasePath).hasBasePath(asPath)) {\n asPath = (0, _removeBasePath).removeBasePath(asPath);\n }\n if (false) {}\n if (initialData.scriptLoader) {\n initScriptLoader = (__webpack_require__(/*! ./script */ \"../node_modules/next/dist/client/script.js\").initScriptLoader);\n initScriptLoader(initialData.scriptLoader);\n }\n pageLoader = new _pageLoader.default(initialData.buildId, prefix);\n register = function(param) {\n var _param = _slicedToArray(param, 2), r = _param[0], f = _param[1];\n return pageLoader.routeLoader.onEntrypoint(r, f);\n };\n if (window.__NEXT_P) {\n // Defer page registration for another tick. This will increase the overall\n // latency in hydrating the page, but reduce the total blocking time.\n window.__NEXT_P.map(function(p) {\n return setTimeout(function() {\n return register(p);\n }, 0);\n });\n }\n window.__NEXT_P = [];\n window.__NEXT_P.push = register;\n headManager = (0, _headManager).default();\n headManager.getIsSsr = function() {\n return router.isSsr;\n };\n appElement = document.getElementById(\"__next\");\n return _ctx.abrupt(\"return\", {\n assetPrefix: prefix\n });\n case 21:\n case \"end\":\n return _ctx.stop();\n }\n }, _callee);\n }));\n return _initialize.apply(this, arguments);\n}\nfunction hydrate(opts) {\n return _hydrate.apply(this, arguments);\n}\nfunction _hydrate() {\n _hydrate = _asyncToGenerator(_cUsersGhoshOneDriveDocumentsProgamsUpscaylNodeModulesNextDistCompiledRegeneratorRuntimeRuntimeJs.default.mark(function _callee(opts) {\n var initialErr, appEntrypoint, app, mod, pageEntrypoint, isValidElementType, getServerError, renderCtx;\n return _cUsersGhoshOneDriveDocumentsProgamsUpscaylNodeModulesNextDistCompiledRegeneratorRuntimeRuntimeJs.default.wrap(function _callee$(_ctx) {\n while(1)switch(_ctx.prev = _ctx.next){\n case 0:\n initialErr = initialData.err;\n _ctx.prev = 1;\n _ctx.next = 4;\n return pageLoader.routeLoader.whenEntrypoint(\"/_app\");\n case 4:\n appEntrypoint = _ctx.sent;\n if (!(\"error\" in appEntrypoint)) {\n _ctx.next = 7;\n break;\n }\n throw appEntrypoint.error;\n case 7:\n app = appEntrypoint.component, mod = appEntrypoint.exports;\n CachedApp = app;\n if (mod && mod.reportWebVitals) {\n onPerfEntry = function(param) {\n var id = param.id, name = param.name, startTime = param.startTime, value = param.value, duration = param.duration, entryType = param.entryType, entries = param.entries;\n // Combines timestamp with random number for unique ID\n var uniqueID = \"\".concat(Date.now(), \"-\").concat(Math.floor(Math.random() * (9e12 - 1)) + 1e12);\n var perfStartEntry;\n if (entries && entries.length) {\n perfStartEntry = entries[0].startTime;\n }\n var webVitals = {\n id: id || uniqueID,\n name: name,\n startTime: startTime || perfStartEntry,\n value: value == null ? duration : value,\n label: entryType === \"mark\" || entryType === \"measure\" ? \"custom\" : \"web-vital\"\n };\n mod.reportWebVitals(webVitals);\n };\n }\n if (// error, so we need to skip waiting for the entrypoint.\n !( true && initialData.err)) {\n _ctx.next = 14;\n break;\n }\n _ctx.t0 = {\n error: initialData.err\n };\n _ctx.next = 17;\n break;\n case 14:\n _ctx.next = 16;\n return pageLoader.routeLoader.whenEntrypoint(initialData.page);\n case 16:\n _ctx.t0 = _ctx.sent;\n case 17:\n pageEntrypoint = _ctx.t0;\n if (!(\"error\" in pageEntrypoint)) {\n _ctx.next = 20;\n break;\n }\n throw pageEntrypoint.error;\n case 20:\n CachedComponent = pageEntrypoint.component;\n if (false) {}\n isValidElementType = (__webpack_require__(/*! next/dist/compiled/react-is */ \"../node_modules/next/dist/compiled/react-is/index.js\").isValidElementType);\n if (isValidElementType(CachedComponent)) {\n _ctx.next = 25;\n break;\n }\n throw new Error('The default export is not a React Component in page: \"'.concat(initialData.page, '\"'));\n case 25:\n _ctx.next = 30;\n break;\n case 27:\n _ctx.prev = 27;\n _ctx.t1 = _ctx[\"catch\"](1);\n // This catches errors like throwing in the top level of a module\n initialErr = (0, _isError).getProperError(_ctx.t1);\n case 30:\n if (true) {\n getServerError = (__webpack_require__(/*! next/dist/compiled/@next/react-dev-overlay/dist/client */ \"../node_modules/next/dist/compiled/@next/react-dev-overlay/dist/client.js\").getServerError);\n // Server-side runtime errors need to be re-thrown on the client-side so\n // that the overlay is rendered.\n if (initialErr) {\n if (initialErr === initialData.err) {\n setTimeout(function() {\n var error;\n try {\n // Generate a new error object. We `throw` it because some browsers\n // will set the `stack` when thrown, and we want to ensure ours is\n // not overridden when we re-throw it below.\n throw new Error(initialErr.message);\n } catch (e) {\n error = e;\n }\n error.name = initialErr.name;\n error.stack = initialErr.stack;\n throw getServerError(error, initialErr.source);\n });\n } else {\n setTimeout(function() {\n throw initialErr;\n });\n }\n }\n }\n if (!window.__NEXT_PRELOADREADY) {\n _ctx.next = 34;\n break;\n }\n _ctx.next = 34;\n return window.__NEXT_PRELOADREADY(initialData.dynamicIds);\n case 34:\n exports.router = router = (0, _router).createRouter(initialData.page, initialData.query, asPath, {\n initialProps: initialData.props,\n pageLoader: pageLoader,\n App: CachedApp,\n Component: CachedComponent,\n wrapApp: wrapApp,\n err: initialErr,\n isFallback: Boolean(initialData.isFallback),\n subscription: function(info, App, scroll) {\n return render(Object.assign({}, info, {\n App: App,\n scroll: scroll\n }));\n },\n locale: initialData.locale,\n locales: initialData.locales,\n defaultLocale: defaultLocale,\n domainLocales: initialData.domainLocales,\n isPreview: initialData.isPreview,\n isRsc: initialData.rsc\n });\n _ctx.next = 37;\n return router._initialMatchesMiddlewarePromise;\n case 37:\n initialMatchesMiddleware = _ctx.sent;\n renderCtx = {\n App: CachedApp,\n initial: true,\n Component: CachedComponent,\n props: initialData.props,\n err: initialErr\n };\n if (!(opts == null ? void 0 : opts.beforeRender)) {\n _ctx.next = 42;\n break;\n }\n _ctx.next = 42;\n return opts.beforeRender();\n case 42:\n render(renderCtx);\n case 43:\n case \"end\":\n return _ctx.stop();\n }\n }, _callee, null, [\n [\n 1,\n 27\n ]\n ]);\n }));\n return _hydrate.apply(this, arguments);\n}\nfunction render(renderingProps) {\n return _render.apply(this, arguments);\n}\nfunction _render() {\n _render = _asyncToGenerator(_cUsersGhoshOneDriveDocumentsProgamsUpscaylNodeModulesNextDistCompiledRegeneratorRuntimeRuntimeJs.default.mark(function _callee(renderingProps) {\n var renderErr;\n return _cUsersGhoshOneDriveDocumentsProgamsUpscaylNodeModulesNextDistCompiledRegeneratorRuntimeRuntimeJs.default.wrap(function _callee$(_ctx) {\n while(1)switch(_ctx.prev = _ctx.next){\n case 0:\n if (!renderingProps.err) {\n _ctx.next = 4;\n break;\n }\n _ctx.next = 3;\n return renderError(renderingProps);\n case 3:\n return _ctx.abrupt(\"return\");\n case 4:\n _ctx.prev = 4;\n _ctx.next = 7;\n return doRender(renderingProps);\n case 7:\n _ctx.next = 17;\n break;\n case 9:\n _ctx.prev = 9;\n _ctx.t0 = _ctx[\"catch\"](4);\n renderErr = (0, _isError).getProperError(_ctx.t0);\n if (!renderErr.cancelled) {\n _ctx.next = 14;\n break;\n }\n throw renderErr;\n case 14:\n if (true) {\n // Ensure this error is displayed in the overlay in development\n setTimeout(function() {\n throw renderErr;\n });\n }\n _ctx.next = 17;\n return renderError(_extends({}, renderingProps, {\n err: renderErr\n }));\n case 17:\n case \"end\":\n return _ctx.stop();\n }\n }, _callee, null, [\n [\n 4,\n 9\n ]\n ]);\n }));\n return _render.apply(this, arguments);\n}\n// This method handles all runtime and debug errors.\n// 404 and 500 errors are special kind of errors\n// and they are still handle via the main render method.\nfunction renderError(renderErrorProps) {\n var App = renderErrorProps.App, err = renderErrorProps.err;\n // In development runtime errors are caught by our overlay\n // In production we catch runtime errors using componentDidCatch which will trigger renderError\n if (true) {\n // A Next.js rendering runtime error is always unrecoverable\n // FIXME: let's make this recoverable (error in GIP client-transition)\n webpackHMR.onUnrecoverableError();\n // We need to render an empty <App> so that the `<ReactDevOverlay>` can\n // render itself.\n return doRender({\n App: function() {\n return null;\n },\n props: {},\n Component: function() {\n return null;\n },\n styleSheets: []\n });\n }\n // Make sure we log the error to the console, otherwise users can't track down issues.\n console.error(err);\n console.error(\"A client-side exception has occurred, see here for more info: https://nextjs.org/docs/messages/client-side-exception-occurred\");\n return pageLoader.loadPage(\"/_error\").then(function(param) {\n var ErrorComponent = param.page, styleSheets = param.styleSheets;\n return (lastAppProps == null ? void 0 : lastAppProps.Component) === ErrorComponent ? Promise.resolve().then(function() {\n return /*#__PURE__*/ _interopRequireWildcard(__webpack_require__(/*! ../pages/_error */ \"../node_modules/next/dist/pages/_error.js\"));\n }).then(function(m) {\n return {\n ErrorComponent: m.default,\n styleSheets: []\n };\n }) : {\n ErrorComponent: ErrorComponent,\n styleSheets: styleSheets\n };\n }).then(function(param) {\n var ErrorComponent = param.ErrorComponent, styleSheets = param.styleSheets;\n var ref;\n // In production we do a normal render with the `ErrorComponent` as component.\n // If we've gotten here upon initial render, we can use the props from the server.\n // Otherwise, we need to call `getInitialProps` on `App` before mounting.\n var AppTree = wrapApp(App);\n var appCtx = {\n Component: ErrorComponent,\n AppTree: AppTree,\n router: router,\n ctx: {\n err: err,\n pathname: initialData.page,\n query: initialData.query,\n asPath: asPath,\n AppTree: AppTree\n }\n };\n return Promise.resolve(((ref = renderErrorProps.props) == null ? void 0 : ref.err) ? renderErrorProps.props : (0, _utils).loadGetInitialProps(App, appCtx)).then(function(initProps) {\n return doRender(_extends({}, renderErrorProps, {\n err: err,\n Component: ErrorComponent,\n styleSheets: styleSheets,\n props: initProps\n }));\n });\n });\n}\nvar reactRoot = null;\n// On initial render a hydrate should always happen\nvar shouldHydrate = true;\nfunction renderReactElement(domEl, fn) {\n // mark start of hydrate/render\n if (_utils.ST) {\n performance.mark(\"beforeRender\");\n }\n var reactEl = fn(shouldHydrate ? markHydrateComplete : markRenderComplete);\n if (false) { var startTransition; } else {\n // The check for `.hydrate` is there to support React alternatives like preact\n if (shouldHydrate) {\n ReactDOM.hydrate(reactEl, domEl);\n shouldHydrate = false;\n } else {\n ReactDOM.render(reactEl, domEl);\n }\n }\n}\nfunction markHydrateComplete() {\n if (!_utils.ST) return;\n performance.mark(\"afterHydrate\") // mark end of hydration\n ;\n performance.measure(\"Next.js-before-hydration\", \"navigationStart\", \"beforeRender\");\n performance.measure(\"Next.js-hydration\", \"beforeRender\", \"afterHydrate\");\n if (onPerfEntry) {\n performance.getEntriesByName(\"Next.js-hydration\").forEach(onPerfEntry);\n }\n clearMarks();\n}\nfunction markRenderComplete() {\n if (!_utils.ST) return;\n performance.mark(\"afterRender\") // mark end of render\n ;\n var navStartEntries = performance.getEntriesByName(\"routeChange\", \"mark\");\n if (!navStartEntries.length) return;\n performance.measure(\"Next.js-route-change-to-render\", navStartEntries[0].name, \"beforeRender\");\n performance.measure(\"Next.js-render\", \"beforeRender\", \"afterRender\");\n if (onPerfEntry) {\n performance.getEntriesByName(\"Next.js-render\").forEach(onPerfEntry);\n performance.getEntriesByName(\"Next.js-route-change-to-render\").forEach(onPerfEntry);\n }\n clearMarks();\n [\n \"Next.js-route-change-to-render\",\n \"Next.js-render\"\n ].forEach(function(measure) {\n return performance.clearMeasures(measure);\n });\n}\nfunction clearMarks() {\n [\n \"beforeRender\",\n \"afterHydrate\",\n \"afterRender\",\n \"routeChange\"\n ].forEach(function(mark) {\n return performance.clearMarks(mark);\n });\n}\nfunction AppContainer(param) {\n var children = param.children;\n return /*#__PURE__*/ _react.default.createElement(Container, {\n fn: function(error) {\n return renderError({\n App: CachedApp,\n err: error\n }).catch(function(err) {\n return console.error(\"Error rendering page: \", err);\n });\n }\n }, /*#__PURE__*/ _react.default.createElement(_routerContext.RouterContext.Provider, {\n value: (0, _router).makePublicRouterInstance(router)\n }, /*#__PURE__*/ _react.default.createElement(_headManagerContext.HeadManagerContext.Provider, {\n value: headManager\n }, /*#__PURE__*/ _react.default.createElement(_imageConfigContext.ImageConfigContext.Provider, {\n value: {\"deviceSizes\":[640,750,828,1080,1200,1920,2048,3840],\"imageSizes\":[16,32,48,64,96,128,256,384],\"path\":\"/_next/image\",\"loader\":\"default\",\"domains\":[],\"experimentalRemotePatterns\":[]}\n }, children))));\n}\n_c = AppContainer;\nfunction renderApp(App, appProps) {\n return /*#__PURE__*/ _react.default.createElement(App, Object.assign({}, appProps));\n}\nvar wrapApp = function(App) {\n return function(wrappedAppProps) {\n var appProps = _extends({}, wrappedAppProps, {\n Component: CachedComponent,\n err: initialData.err,\n router: router\n });\n return /*#__PURE__*/ _react.default.createElement(AppContainer, null, renderApp(App, appProps));\n };\n};\nvar RSCComponent;\nif (false) { var ServerRoot, rscCache, nextServerDataLoadingGlobal, DOMContentLoaded, initialServerDataFlushed, initialServerDataLoaded, initialServerDataWriter, initialServerDataBuffer, encoder, ref, createFromFetch, createFromReadableStream, getCacheKey, _s2, useServerResponse, fetchFlight, createResponseCache, nextServerDataRegisterWriter, nextServerDataCallback; }\nvar lastAppProps;\nfunction doRender(input) {\n var onStart = // This function has a return type to ensure it doesn't start returning a\n // Promise. It should remain synchronous.\n function onStart() {\n if (!styleSheets || // unless we're in production:\n \"development\" !== \"production\") {\n return false;\n }\n var currentStyleTags = looseToArray(document.querySelectorAll(\"style[data-n-href]\"));\n var currentHrefs = new Set(currentStyleTags.map(function(tag) {\n return tag.getAttribute(\"data-n-href\");\n }));\n var noscript = document.querySelector(\"noscript[data-n-css]\");\n var nonce = noscript == null ? void 0 : noscript.getAttribute(\"data-n-css\");\n styleSheets.forEach(function(param) {\n var href = param.href, text = param.text;\n if (!currentHrefs.has(href)) {\n var styleTag = document.createElement(\"style\");\n styleTag.setAttribute(\"data-n-href\", href);\n styleTag.setAttribute(\"media\", \"x\");\n if (nonce) {\n styleTag.setAttribute(\"nonce\", nonce);\n }\n document.head.appendChild(styleTag);\n styleTag.appendChild(document.createTextNode(text));\n }\n });\n return true;\n };\n var onHeadCommit = function onHeadCommit() {\n if (// unless we're in production:\n false) { var referenceNode, idx, currentHrefs, currentStyleTags, desiredHrefs; }\n if (input.scroll) {\n window.scrollTo(input.scroll.x, input.scroll.y);\n }\n };\n var onRootCommit = function onRootCommit() {\n resolvePromise();\n };\n var App = input.App, Component = input.Component, props = input.props, err = input.err, __N_RSC = input.__N_RSC;\n var styleSheets = \"initial\" in input ? undefined : input.styleSheets;\n Component = Component || lastAppProps.Component;\n props = props || lastAppProps.props;\n var isRSC = false ? 0 : !!__N_RSC;\n var appProps = _extends({}, props, {\n Component: isRSC ? RSCComponent : Component,\n err: err,\n router: router\n });\n // lastAppProps has to be set before ReactDom.render to account for ReactDom throwing an error.\n lastAppProps = appProps;\n var canceled = false;\n var resolvePromise;\n var renderPromise = new Promise(function(resolve, reject) {\n if (lastRenderReject) {\n lastRenderReject();\n }\n resolvePromise = function() {\n lastRenderReject = null;\n resolve();\n };\n lastRenderReject = function() {\n canceled = true;\n lastRenderReject = null;\n var error = new Error(\"Cancel rendering route\");\n error.cancelled = true;\n reject(error);\n };\n });\n onStart();\n var elem = /*#__PURE__*/ _react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/ _react.default.createElement(Head, {\n callback: onHeadCommit\n }), /*#__PURE__*/ _react.default.createElement(AppContainer, null, renderApp(App, appProps), /*#__PURE__*/ _react.default.createElement(_portal.Portal, {\n type: \"next-route-announcer\"\n }, /*#__PURE__*/ _react.default.createElement(_routeAnnouncer.RouteAnnouncer, null))));\n // We catch runtime errors using componentDidCatch which will trigger renderError\n renderReactElement(appElement, function(callback) {\n return /*#__PURE__*/ _react.default.createElement(Root, {\n callbacks: [\n callback,\n onRootCommit\n ]\n }, false ? /*#__PURE__*/ 0 : elem);\n });\n return renderPromise;\n}\nfunction Root(param) {\n var callbacks = param.callbacks, children = param.children;\n _s();\n // We use `useLayoutEffect` to guarantee the callbacks are executed\n // as soon as React flushes the update\n _react.default.useLayoutEffect(function() {\n return callbacks.forEach(function(callback) {\n return callback();\n });\n }, [\n callbacks\n ]);\n // We should ask to measure the Web Vitals after rendering completes so we\n // don't cause any hydration delay:\n _react.default.useEffect(function() {\n (0, _performanceRelayer).default(onPerfEntry);\n }, []);\n if (false) {}\n return children;\n}\n_s(Root, \"Gjgl5rfcc2T4sFnfEMfRvL6K4Q4=\");\n_c1 = Root;\n// Dummy component that we render as a child of Root so that we can\n// toggle the correct styles before the page is rendered.\nfunction Head(param) {\n var callback = param.callback;\n _s1();\n // We use `useLayoutEffect` to guarantee the callback is executed\n // as soon as React flushes the update.\n _react.default.useLayoutEffect(function() {\n return callback();\n }, [\n callback\n ]);\n return null;\n}\n_s1(Head, \"n7/vCynhJvM+pLkyL2DMQUF0odM=\");\n_c2 = Head;\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=index.js.map\nvar _c, _c1, _c2;\n$RefreshReg$(_c, \"AppContainer\");\n$RefreshReg$(_c1, \"Root\");\n$RefreshReg$(_c2, \"Head\");\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvaW5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GRjYXJkKG9iaikge1xuICAgIGlmIChvYmogJiYgb2JqLl9fZXNNb2R1bGUpIHtcbiAgICAgICAgcmV0dXJuIG9iajtcbiAgICB9XG4gICAgaWYgKG9iaiA9PT0gbnVsbCB8fCB0eXBlb2Ygb2JqICE9PSBcIm9iamVjdFwiICYmIHR5cGVvZiBvYmogIT09IFwiZnVuY3Rpb25cIikge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgZGVmYXVsdDogb2JqXG4gICAgICAgIH07XG4gICAgfVxuICAgIHZhciBjYWNoZSA9IF9nZXRSZXF1aXJlV2lsZGNhcmRDYWNoZSgpO1xuICAgIGlmIChjYWNoZSAmJiBjYWNoZS5oYXMob2JqKSkge1xuICAgICAgICByZXR1cm4gY2FjaGUuZ2V0KG9iaik7XG4gICAgfVxuICAgIHZhciBuZXdPYmogPSB7fTtcbiAgICB2YXIgaGFzUHJvcGVydHlEZXNjcmlwdG9yID0gT2JqZWN0LmRlZmluZVByb3BlcnR5ICYmIE9iamVjdC5nZXRPd25Qcm9wZXJ0eURlc2NyaXB0b3I7XG4gICAgZm9yKHZhciBrZXkgaW4gb2JqKXtcbiAgICAgICAgaWYgKE9iamVjdC5wcm90b3R5cGUuaGFzT3duUHJvcGVydHkuY2FsbChvYmosIGtleSkpIHtcbiAgICAgICAgICAgIHZhciBkZXNjID0gaGFzUHJvcGVydHlEZXNjcmlwdG9yID8gT2JqZWN0LmdldE93blByb3BlcnR5RGVzY3JpcHRvcihvYmosIGtleSkgOiBudWxsO1xuICAgICAgICAgICAgaWYgKGRlc2MgJiYgKGRlc2MuZ2V0IHx8IGRlc2Muc2V0KSkge1xuICAgICAgICAgICAgICAgIE9iamVjdC5kZWZpbmVQcm9wZXJ0eShuZXdPYmosIGtleSwgZGVzYyk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIG5ld09ialtrZXldID0gb2JqW2tleV07XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG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ICAgICAgICAgICAgICAgIC8vIENvbWJpbmVzIHRpbWVzdGFtcCB3aXRoIHJhbmRvbSBudW1iZXIgZm9yIHVuaXF1ZSBJRFxuICAgICAgICAgICAgICAgICAgICBjb25zdCB1bmlxdWVJRCA9IGAke0RhdGUubm93KCl9LSR7TWF0aC5mbG9vcihNYXRoLnJhbmRvbSgpICogKDllMTIgLSAxKSkgKyAxZTEyfWA7XG4gICAgICAgICAgICAgICAgICAgIGxldCBwZXJmU3RhcnRFbnRyeTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGVudHJpZXMgJiYgZW50cmllcy5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHBlcmZTdGFydEVudHJ5ID0gZW50cmllc1swXS5zdGFydFRpbWU7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgY29uc3Qgd2ViVml0YWxzID0ge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWQ6IGlkIHx8IHVuaXF1ZUlELFxuICAgICAgICAgICAgICAgICAgICAgICAgbmFtZSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHN0YXJ0VGltZTogc3RhcnRUaW1lIHx8IHBlcmZTdGFydEVudHJ5LFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWU6IHZhbHVlID09IG51bGwgPyBkdXJhdGlvbiA6IHZhbHVlLFxuICAgICAgICAgICAgICAgICAgICAgICAgbGFiZWw6IGVudHJ5VHlwZSA9PT0gJ21hcmsnIHx8IGVudHJ5VHlwZSA9PT0gJ21lYXN1cmUnID8gJ2N1c3RvbScgOiAnd2ViLXZpdGFsJ1xuICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgICAgICBtb2QucmVwb3J0V2ViVml0YWxzKHdlYlZpdGFscyk7XG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNvbnN0IHBhZ2VFbnRyeXBvaW50ID0gLy8gVGhlIGRldiB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AgICAgfVxuICAgICAgICB9IGNhdGNoIChlcnJvcjEpIHtcbiAgICAgICAgICAgIC8vIFRoaXMgY2F0Y2hlcyBlcnJvcnMgbGlrZSB0aHJvd2luZyBpbiB0aGUgdG9wIGxldmVsIG9mIGEgbW9kdWxlXG4gICAgICAgICAgICBpbml0aWFsRXJyID0gKDAsIF9pc0Vycm9yKS5nZXRQcm9wZXJFcnJvcihlcnJvcjEpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChwcm9jZXNzLmVudi5OT0RFX0VOViA9PT0gJ2RldmVsb3BtZW50Jykge1xuICAgICAgICAgICAgY29uc3QgeyBnZXRTZXJ2ZXJFcnJvciAsICB9ID0gcmVxdWlyZSgnbmV4dC9kaXN0L2NvbXBpbGVkL0BuZXh0L3JlYWN0LWRldi1vdmVybGF5L2Rpc3QvY2xpZW50Jyk7XG4gICAgICAgICAgICAvLyBTZXJ2ZXItc2lkZSBydW50aW1lIGVycm9ycyBuZWVkIHRvIGJlIHJlLXRocm93biBvbiB0aGUgY2xpZW50LXNpZGUgc29cbiAgICAgICAgICAgIC8vIHRoYXQgdGhlIG92ZXJsYXkgaXMgcmVuZGVyZWQuXG4gICAgICAgICAgICBpZiAoaW5pdGlhbEVycikge1xuICAgICAgICAgICAgICAgIGlmIChpbml0aWFsRXJyID09PSBpbml0aWFsRGF0YS5lcnIpIHtcbiAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dCgoKT0+e1xuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGVycm9yO1xuICAgICAgICAgICAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBHZW5lcmF0ZSBhIG5ldyBlcnJvciBvYmplY3QuIFdlIGB0aHJvd2AgaXQgYmVjYXVzZSBzb21lIGJyb3dzZXJzXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gd2lsbCBzZXQgdGhlIGBzdGFja2Agd2hlbiB0aHJvd24sIGFuZCB3ZSB3YW50IHRvIGVuc3VyZSBvdXJzIGlzXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gbm90IG92ZXJyaWRkZW4gd2hlbiB3ZSByZS10aHJvdyBpdCBiZWxvdy5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoaW5pdGlhbEVyci5tZXNzYWdlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlcnJvciA9IGU7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBlcnJvci5uYW1lID0gaW5pdGlhbEVyci5uYW1lO1xuICAgICAgICAgICAgICAgICAgICAgICAgZXJyb3Iuc3RhY2sgPSBpbml0aWFsRXJyLnN0YWNrO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3cgZ2V0U2VydmVyRXJyb3IoZXJyb3IsIGluaXRpYWxFcnIuc291cmNlKTtcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dCgoKT0+e1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3cgaW5pdGlhbEVycjtcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGlmICh3aW5kb3cuX19ORVhUX1BSRUxPQURSRUFEWSkge1xuICAgICAgICAgICAgeWllbGQgd2luZG93Ll9fTkVYVF9QUkVMT0FEUkVBRFkoaW5pdGlhbERhdGEuZHluYW1pY0lkcyk7XG4gICAgICAgIH1cbiAgICAgICAgZXhwb3J0cy5yb3V0ZXIgPSByb3V0ZXIgPSAoMCwgX3JvdXRlcikuY3JlYXRlUm91dGVyKGluaXRpYWxEYXRhLnBhZ2UsIGluaXRpYWxEYXRhLnF1ZXJ5LCBhc1BhdGgsIHtcbiAgICAgICAgICAgIGluaXRpYWxQcm9wczogaW5pdGlhbERhdGEucHJvcHMsXG4gICAgICAgICAgICBwYWdlTG9hZGVyLFxuICAgICAgICAgICAgQXBwOiBDYWNoZWRBcHAsXG4gICAgICAgICAgICBDb21wb25lbnQ6IENhY2hlZENvbXBvbmVudCxcbiAgICAgICAgICAgIHdyYXBBcHAsXG4gICAgICAgICAgICBlcnI6IGluaXRpYWxFcnIsXG4gICAgICAgICAgICBpc0ZhbGxiYWNrOiBCb29sZWFuKGluaXRpYWxEYXRhLmlzRmFsbGJhY2spLFxuICAgICAgICAgICAgc3Vic2NyaXB0aW9uOiAoaW5mbywgQXBwLCBzY3JvbGwpPT5yZW5kZXIoT2JqZWN0LmFzc2lnbih7fSwgaW5mbywge1xuICAgICAgICAgICAgICAgICAgICBBcHAsXG4gICAgICAgICAgICAgICAgICAgIHNjcm9sbFxuICAgICAgICAgICAgICAgIH0pKSxcbiAgICAgICAgICAgIGxvY2FsZTogaW5pdGlhbERhdGEubG9jYWxlLFxuICAgICAgICAgICAgbG9jYWxlczogaW5pdGlhbERhdGEubG9jYWxlcyxcbiAgICAgICAgICAgIGRlZmF1bHRMb2NhbGUsXG4gICAgICAgICAgICBkb21haW5Mb2NhbGVzOiBpbml0aWFsRGF0YS5kb21haW5Mb2NhbGVzLFxuICAgICAgICAgICAgaXNQcmV2aWV3OiBpbml0aWFsRGF0YS5pc1ByZXZpZXcsXG4gICAgICAgICAgICBpc1JzYzogaW5pdGlhbERhdGEucnNjXG4gICAgICAgIH0pO1xuICAgICAgICBpbml0aWFsTWF0Y2hlc01pZGRsZXdhcmUgPSB5aWVsZCByb3V0ZXIuX2luaXRpYWxNYXRjaGVzTWlkZGxld2FyZVByb21pc2U7XG4gICAgICAgIGNvbnN0IHJlbmRlckN0eCA9IHtcbiAgICAgICAgICAgIEFwcDogQ2FjaGVkQXBwLFxuICAgICAgICAgICAgaW5pdGlhbDogdHJ1ZSxcbiAgICAgICAgICAgIENvbXBvbmVudDogQ2FjaGVkQ29tcG9uZW50LFxuICAgICAgICAgICAgcHJvcHM6IGluaXRpYWxEYXRhLnByb3BzLFxuICAgICAgICAgICAgZXJyOiBpbml0aWFsRXJyXG4gICAgICAgIH07XG4gICAgICAgIGlmIChvcHRzID09IG51bGwgPyB2b2lkIDAgOiBvcHRzLmJlZm9yZVJlbmRlcikge1xuICAgICAgICAgICAgeWllbGQgb3B0cy5iZWZvcmVSZW5kZXIoKTtcbiAgICAgICAgfVxuICAgICAgICByZW5kZXIocmVuZGVyQ3R4KTtcbiAgICB9KTtcbiAgICByZXR1cm4gX2h5ZHJhdGUuYXBwbHkodGhpcywgYXJndW1lbnRzKTtcbn1cbmZ1bmN0aW9uIHJlbmRlcihyZW5kZXJpbmdQcm9wcykge1xuICAgIHJldHVybiBfcmVuZGVyLmFwcGx5KHRoaXMsIGFyZ3VtZW50cyk7XG59XG5mdW5jdGlvbiBfcmVuZGVyKCkge1xuICAgIF9yZW5kZXIgPSBfYXN5bmNUb0dlbmVyYXRvcihmdW5jdGlvbioocmVuZGVyaW5nUHJvcHMpIHtcbiAgICAgICAgaWYgKHJlbmRlcmluZ1Byb3BzLmVycikge1xuICAgICAgICAgICAgeWllbGQgcmVuZGVyRXJyb3IocmVuZGVyaW5nUHJvcHMpO1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgICB5aWVsZCBkb1JlbmRlcihyZW5kZXJpbmdQcm9wcyk7XG4gICAgICAgIH0gY2F0Y2ggKGVycikge1xuICAgICAgICAgICAgY29uc3QgcmVuZGVyRXJyID0gKDAsIF9pc0Vycm9yKS5nZXRQcm9wZXJFcnJvcihlcnIpO1xuICAgICAgICAgICAgLy8gYnViYmxlIHVwIGNhbmNlbGF0aW9uIGVycm9yc1xuICAgICAgICAgICAgaWYgKHJlbmRlckVyci5jYW5jZWxsZWQpIHtcbiAgICAgICAgICAgICAgICB0aHJvd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gICAgICAgICAgICByb3V0ZXIsXG4gICAgICAgICAgICBjdHg6IHtcbiAgICAgICAgICAgICAgICBlcnIsXG4gICAgICAgICAgICAgICAgcGF0aG5hbWU6IGluaXRpYWxEYXRhLnBhZ2UsXG4gICAgICAgICAgICAgICAgcXVlcnk6IGluaXRpYWxEYXRhLnF1ZXJ5LFxuICAgICAgICAgICAgICAgIGFzUGF0aCxcbiAgICAgICAgICAgICAgICBBcHBUcmVlXG4gICAgICAgICAgICB9XG4gICAgICAgIH07XG4gICAgICAgIHJldHVybiBQcm9taXNlLnJlc29sdmUoKChyZWYgPSByZW5kZXJFcnJvclByb3BzLnByb3BzKSA9PSBudWxsID8gdm9pZCAwIDogcmVmLmVycikgPyByZW5kZXJFcnJvclByb3BzLnByb3BzIDogKDAsIF91dGlscykubG9hZEdldEluaXRpYWxQcm9wcyhBcHAsIGFwcEN0eCkpLnRoZW4oKGluaXRQcm9wcyk9PmRvUmVuZGVyKF9leHRlbmRzKHt9LCByZW5kZXJFcnJvclByb3BzLCB7XG4gICAgICAgICAgICAgICAgZXJyLFxuICAgICAgICAgICAgICAgIENvbXBvbmVudDogRXJyb3JDb21wb25lbnQsXG4gICAgICAgICAgICAgICAgc3R5bGVTaGVldHMsXG4gICAgICAgICAgICAgICAgcHJvcHM6IGluaXRQcm9wc1xuICAgICAgICAgICAgfSkpKTtcbiAgICB9KTtcbn1cbmxldCByZWFjdFJvb3QgPSBudWxsO1xuLy8gT24gaW5pdGlhbCByZW5kZXIgYSBoeWRyYXRlIHNob3VsZCBhbHdheXMgaGFwcGVuXG5sZXQgc2hvdWxkSHlkcmF0ZSA9IHRydWU7XG5mdW5jdGlvbiByZW5kZXJSZWFjdEVsZW1lbnQoZG9tRWwsIGZuKSB7XG4gICAgLy8gbWFyayBzdGFydCBvZiBoeWRyYXRlL3JlbmRlclxuICAgIGlmIChfdXRpbHMuU1QpIHtcbiAgICAgICAgcGVyZm9ybWFuY2UubWFyaygnYmVmb3JlUmVuZGVyJyk7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ICAgICAgICAgIGlmIChzZXJpYWxpemVkKSB7XG4gICAgICAgICAgICAgICAgY29uc3QgcmVhZGFibGUgPSBuZXcgUmVhZGFibGVTdHJlYW0oe1xuICAgICAgICAgICAgICAgICAgICBzdGFydCAoY29udHJvbGxlcikge1xuICAgICAgICAgICAgICAgICAgICAgICAgY29udHJvbGxlci5lbnF1ZXVlKGVuY29kZXIuZW5jb2RlKHNlcmlhbGl6ZWQpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRyb2xsZXIuY2xvc2UoKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIHJlc3BvbnNlID0gY3JlYXRlRnJvbVJlYWRhYmxlU3RyZWFtKHJlYWRhYmxlKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgcmVzcG9uc2UgPSBjcmVhdGVGcm9tRmV0Y2goZmV0Y2hGbGlnaHQoZ2V0Q2FjaGVLZXkoKSkpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJzY0NhY2hlLnNldChjYWNoZUtleSwgcmVzcG9uc2UpO1xuICAgICAgICByZXR1cm4gcmVzcG9uc2U7XG4gICAgfVxuICAgIGNvbnN0IFNlcnZlclJvb3QgPSAoeyBjYWNoZUtleSAsIHNlcmlhbGl6ZWQgIH0pPT57XG4gICAgICAgIF9yZWFjdC5kZWZhdWx0LnVzZUVmZmVjdCgoKT0+e1xuICAgICAgICAgICAgcnNjQ2FjaGUuZGVsZXRlKGNhY2hlS2V5KTtcbiAgICAgICAgfSk7XG4gICAgICAgIGNvbnN0IHJlc3BvbnNlID0gdXNlU2VydmVyUmVzcG9uc2UoY2FjaGVLZXksIHNlcmlhbGl6ZWQpO1xuICAgICAgICByZXR1cm4gcmVzcG9uc2UucmVhZFJvb3QoKTtcbiAgICB9O1xuICAgIFJTQ0NvbXBvbmVudCA9IChwcm9wcyk9PntcbiAgICAgIC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js\n"));
/***/ }),
/***/ "../node_modules/next/dist/client/next-dev.js":
/*!****************************************************!*\
!*** ../node_modules/next/dist/client/next-dev.js ***!
\****************************************************/
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nvar _toConsumableArray = (__webpack_require__(/*! @swc/helpers/lib/_to_consumable_array.js */ \"../node_modules/@swc/helpers/lib/_to_consumable_array.js\")[\"default\"]);\nvar _ = __webpack_require__(/*! ./ */ \"../node_modules/next/dist/client/index.js\");\nvar _onDemandEntriesClient = _interopRequireDefault(__webpack_require__(/*! ./dev/on-demand-entries-client */ \"../node_modules/next/dist/client/dev/on-demand-entries-client.js\"));\nvar _webpackHotMiddlewareClient = _interopRequireDefault(__webpack_require__(/*! ./dev/webpack-hot-middleware-client */ \"../node_modules/next/dist/client/dev/webpack-hot-middleware-client.js\"));\nvar _devBuildWatcher = _interopRequireDefault(__webpack_require__(/*! ./dev/dev-build-watcher */ \"../node_modules/next/dist/client/dev/dev-build-watcher.js\"));\nvar _fouc = __webpack_require__(/*! ./dev/fouc */ \"../node_modules/next/dist/client/dev/fouc.js\");\nvar _websocket = __webpack_require__(/*! ./dev/error-overlay/websocket */ \"../node_modules/next/dist/client/dev/error-overlay/websocket.js\");\nvar _querystring = __webpack_require__(/*! ../shared/lib/router/utils/querystring */ \"../node_modules/next/dist/shared/lib/router/utils/querystring.js\");\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\nif (!window._nextSetupHydrationWarning) {\n var origConsoleError = window.console.error;\n window.console.error = function() {\n for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){\n args[_key] = arguments[_key];\n }\n var isHydrateError = args.some(function(arg) {\n return typeof arg === \"string\" && arg.match(/(hydration|content does not match|did not match)/i);\n });\n if (isHydrateError) {\n args = _toConsumableArray(args).concat([\n \"\\n\\nSee more info here: https://nextjs.org/docs/messages/react-hydration-error\", \n ]);\n }\n origConsoleError.apply(window.console, args);\n };\n window._nextSetupHydrationWarning = true;\n}\nwindow.next = {\n version: _.version,\n // router is initialized later so it has to be live-binded\n get router () {\n return _.router;\n },\n emitter: _.emitter\n};\nvar webpackHMR = (0, _webpackHotMiddlewareClient).default();\n(0, _).initialize({\n webpackHMR: webpackHMR\n}).then(function(param) {\n var assetPrefix = param.assetPrefix;\n (0, _websocket).connectHMR({\n assetPrefix: assetPrefix,\n path: \"/_next/webpack-hmr\"\n });\n return (0, _).hydrate({\n beforeRender: _fouc.displayContent\n }).then(function() {\n var devPagesManifestListener = function devPagesManifestListener(event) {\n if (event.data.indexOf(\"devPagesManifest\") !== -1) {\n fetch(\"\".concat(assetPrefix, \"/_next/static/development/_devPagesManifest.json\")).then(function(res) {\n return res.json();\n }).then(function(manifest) {\n window.__DEV_PAGES_MANIFEST = manifest;\n }).catch(function(err) {\n console.log(\"Failed to fetch devPagesManifest\", err);\n });\n } else if (event.data.indexOf(\"middlewareChanges\") !== -1) {\n return window.location.reload();\n } else if (event.data.indexOf(\"serverOnlyChanges\") !== -1) {\n var pages = JSON.parse(event.data).pages;\n // Make sure to reload when the dev-overlay is showing for an\n // API route\n if (pages.includes(_.router.query.__NEXT_PAGE)) {\n return window.location.reload();\n }\n if (!_.router.clc && pages.includes(_.router.pathname)) {\n console.log(\"Refreshing page data due to server-side change\");\n buildIndicatorHandler(\"building\");\n var clearIndicator = function() {\n return buildIndicatorHandler(\"built\");\n };\n _.router.replace(_.router.pathname + \"?\" + String((0, _querystring).assign((0, _querystring).urlQueryToSearchParams(_.router.query), new URLSearchParams(location.search))), _.router.asPath, {\n scroll: false\n }).catch(function() {\n // trigger hard reload when failing to refresh data\n // to show error overlay properly\n location.reload();\n }).finally(clearIndicator);\n }\n }\n };\n (0, _onDemandEntriesClient).default();\n var buildIndicatorHandler = function() {};\n (0, _websocket).addMessageListener(devPagesManifestListener);\n if (true) {\n (0, _devBuildWatcher).default(function(handler) {\n buildIndicatorHandler = handler;\n }, \"bottom-right\");\n }\n });\n}).catch(function(err) {\n console.error(\"Error was not caught\", err);\n});\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=next-dev.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvbmV4dC1kZXYuanMuanMiLCJtYXBwaW5ncyI6IkFBQWE7Ozs7O0FBQ2IsSUFBSUEsQ0FBQyxHQUFHQyxtQkFBTyxDQUFDLHFEQUFJLENBQUM7QUFDckIsSUFBSUMsc0JBQXNCLEdBQUdDLHNCQUFzQixDQUFDRixtQkFBTyxDQUFDLHdHQUFnQyxDQUFDLENBQUM7QUFDOUYsSUFBSUcsMkJBQTJCLEdBQUdELHNCQUFzQixDQUFDRixtQkFBTyxDQUFDLGtIQUFxQyxDQUFDLENBQUM7QUFDeEcsSUFBSUksZ0JBQWdCLEdBQUdGLHNCQUFzQixDQUFDRixtQkFBTyxDQUFDLDBGQUF5QixDQUFDLENBQUM7QUFDakYsSUFBSUssS0FBSyxHQUFHTCxtQkFBTyxDQUFDLGdFQUFZLENBQUM7QUFDakMsSUFBSU0sVUFBVSxHQUFHTixtQkFBTyxDQUFDLHNHQUErQixDQUFDO0FBQ3pELElBQUlPLFlBQVksR0FBR1AsbUJBQU8sQ0FBQyxnSEFBd0MsQ0FBQztBQUNwRSxTQUFTRSxzQkFBc0IsQ0FBQ00sR0FBRyxFQUFFO0lBQ2pDLE9BQU9BLEdBQUcsSUFBSUEsR0FBRyxDQUFDQyxVQUFVLEdBQUdELEdBQUcsR0FBRztRQUNqQ0UsT0FBTyxFQUFFRixHQUFHO0tBQ2YsQ0FBQztDQUNMO0FBQ0QsSUFBSSxDQUFDRyx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AgICAgICAgICBpZiAocGFnZXMuaW5jbHVkZXMoXy5yb3V0ZXIucXVlcnkuX19ORVhUX1BBR0UpKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB3aW5kb3cubG9jYXRpb24ucmVsb2FkKCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmICghXy5yb3V0ZXIuY2xjICYmIHBhZ2VzLmluY2x1ZGVzKF8ucm91dGVyLnBhdGhuYW1lKSkge1xuICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygnUmVmcmVzaGluZyBwYWdlIGRhdGEgZHVlIHRvIHNlcnZlci1zaWRlIGNoYW5nZScpO1xuICAgICAgICAgICAgICAgICAgICBidWlsZEluZGljYXRvckhhbmRsZXIoJ2J1aWxkaW5nJyk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IGNsZWFySW5kaWNhdG9yID0gKCk9PmJ1aWxkSW5kaWNhdG9ySGFuZGxlcignYnVpbHQnKTtcbiAgICAgICAgICAgICAgICAgICAgXy5yb3V0ZXIucmVwbGFjZShfLnJvdXRlci5wYXRobmFtZSArICc/JyArIFN0cmluZygoMCwgX3F1ZXJ5c3RyaW5nKS5hc3NpZ24oKDAsIF9xdWVyeXN0cmluZykudXJsUXVlcnlUb1NlYXJjaFBhcmFtcyhfLnJvdXRlci5xdWVyeSksIG5ldyBVUkxTZWFyY2hQYXJhbXMobG9jYXRpb24uc2VhcmNoKSkpLCBfLnJvdXRlci5hc1BhdGgsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHNjcm9sbDogZmFsc2VcbiAgICAgICAgICAgICAgICAgICAgfSkuY2F0Y2goKCk9PntcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIHRyaWdnZXIgaGFyZCByZWxvYWQgd2hlbiBmYWlsaW5nIHRvIHJlZnJlc2ggZGF0YVxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gdG8gc2hvdyBlcnJvciBvdmVybGF5IHByb3Blcmx5XG4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WduIiwidXJsUXVlcnlUb1NlYXJjaFBhcmFtcyIsIlVSTFNlYXJjaFBhcmFtcyIsInNlYXJjaCIsImFzUGF0aCIsInNjcm9sbCIsImZpbmFsbHkiLCJhZGRNZXNzYWdlTGlzdGVuZXIiLCJwcm9jZXNzIiwiZW52IiwiX19ORVhUX0JVSUxEX0lORElDQVRPUiIsImhhbmRsZXIiLCJfX05FWFRfQlVJTERfSU5ESUNBVE9SX1BPU0lUSU9OIiwiZXhwb3J0cyIsIk9iamVjdCIsImRlZmluZVByb3BlcnR5IiwidmFsdWUiLCJtb2R1bGUiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///../node_modules/next/dist/client/next-dev.js\n"));
/***/ }),
/***/ "../node_modules/next/dist/client/normalize-trailing-slash.js":
/*!********************************************************************!*\
!*** ../node_modules/next/dist/client/normalize-trailing-slash.js ***!
\********************************************************************/
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.normalizePathTrailingSlash = void 0;\nvar _removeTrailingSlash = __webpack_require__(/*! ../shared/lib/router/utils/remove-trailing-slash */ \"../node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.js\");\nvar _parsePath = __webpack_require__(/*! ../shared/lib/router/utils/parse-path */ \"../node_modules/next/dist/shared/lib/router/utils/parse-path.js\");\nvar normalizePathTrailingSlash = function(path) {\n if (!path.startsWith(\"/\")) {\n return path;\n }\n var ref = (0, _parsePath).parsePath(path), pathname = ref.pathname, query = ref.query, hash = ref.hash;\n if (false) {}\n return \"\".concat((0, _removeTrailingSlash).removeTrailingSlash(pathname)).concat(query).concat(hash);\n};\nexports.normalizePathTrailingSlash = normalizePathTrailingSlash;\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=normalize-trailing-slash.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\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2YgZXhwb3J0cy5kZWZhdWx0ID09PSAnZnVuY3Rpb24nIHx8ICh0eXBlb2YgZXhwb3J0cy5kZWZhdWx0ID09PSAnb2JqZWN0JyAmJiBleHBvcnRzLmRlZmF1bHQgIT09IG51bGwpKSAmJiB0eXBlb2YgZXhwb3J0cy5kZWZhdWx0Ll9fZXNNb2R1bGUgPT09ICd1bmRlZmluZWQnKSB7XG4gIE9iamVjdC5kZWZpbmVQcm9wZXJ0eShleHBvcnRzLmRlZmF1bHQsICdfX2VzTW9kdWxlJywgeyB2YWx1ZTogdHJ1ZSB9KTtcbiAgT2JqZWN0LmFzc2lnbihleHBvcnRzLmRlZmF1bHQsIGV4cG9ydHMpO1xuICBtb2R1bGUuZXhwb3J0cyA9IGV4cG9ydHMuZGVmYXVsdDtcbn1cblxuLy8jIHNvdXJjZU1hcHBpbmdVUkw9bm9ybWFsaXplLXRyYWlsaW5nLXNsYXNoLmpzLm1hcCJdLCJuYW1lcyI6WyJPYmplY3QiLCJkZWZpbmVQcm9wZXJ0eSIsImV4cG9ydHMiLCJ2YWx1ZSIsIm5vcm1hbGl6ZVBhdGhUcmFpbGluZ1NsYXNoIiwiX3JlbW92ZVRyYWlsaW5nU2xhc2giLCJyZXF1aXJlIiwiX3BhcnNlUGF0aCIsInBhdGgiLCJzdGFydHNXaXRoIiwicGFyc2VQYXRoIiwicGF0aG5hbWUiLCJxdWVyeSIsImhhc2giLCJwcm9jZXNzIiwiZW52IiwiX19ORVhUX1RSQUlMSU5HX1NMQVNIIiwidGVzdCIsInJlbW92ZVRyYWlsaW5nU2xhc2giLCJlbmRzV2l0aCIsImRlZmF1bHQiLCJfX2VzTW9kdWxlIiwiYXNzaWduIiwibW9kdWxlIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///../node_modules/next/dist/client/normalize-trailing-slash.js\n"));
/***/ }),
/***/ "../node_modules/next/dist/client/page-loader.js":
/*!*******************************************************!*\
!*** ../node_modules/next/dist/client/page-loader.js ***!
\*******************************************************/
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nvar _classCallCheck = (__webpack_require__(/*! @swc/helpers/lib/_class_call_check.js */ \"../node_modules/@swc/helpers/lib/_class_call_check.js\")[\"default\"]);\nvar _createClass = (__webpack_require__(/*! @swc/helpers/lib/_create_class.js */ \"../node_modules/@swc/helpers/lib/_create_class.js\")[\"default\"]);\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _addBasePath = __webpack_require__(/*! ./add-base-path */ \"../node_modules/next/dist/client/add-base-path.js\");\nvar _router = __webpack_require__(/*! ../shared/lib/router/router */ \"../node_modules/next/dist/shared/lib/router/router.js\");\nvar _getAssetPathFromRoute = _interopRequireDefault(__webpack_require__(/*! ../shared/lib/router/utils/get-asset-path-from-route */ \"../node_modules/next/dist/shared/lib/router/utils/get-asset-path-from-route.js\"));\nvar _addLocale = __webpack_require__(/*! ./add-locale */ \"../node_modules/next/dist/client/add-locale.js\");\nvar _isDynamic = __webpack_require__(/*! ../shared/lib/router/utils/is-dynamic */ \"../node_modules/next/dist/shared/lib/router/utils/is-dynamic.js\");\nvar _parseRelativeUrl = __webpack_require__(/*! ../shared/lib/router/utils/parse-relative-url */ \"../node_modules/next/dist/shared/lib/router/utils/parse-relative-url.js\");\nvar _removeTrailingSlash = __webpack_require__(/*! ../shared/lib/router/utils/remove-trailing-slash */ \"../node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.js\");\nvar _routeLoader = __webpack_require__(/*! ./route-loader */ \"../node_modules/next/dist/client/route-loader.js\");\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\nvar PageLoader = /*#__PURE__*/ function() {\n function PageLoader(buildId, assetPrefix) {\n _classCallCheck(this, PageLoader);\n this.routeLoader = (0, _routeLoader).createRouteLoader(assetPrefix);\n this.buildId = buildId;\n this.assetPrefix = assetPrefix;\n this.promisedSsgManifest = new Promise(function(resolve) {\n if (window.__SSG_MANIFEST) {\n resolve(window.__SSG_MANIFEST);\n } else {\n window.__SSG_MANIFEST_CB = function() {\n resolve(window.__SSG_MANIFEST);\n };\n }\n });\n }\n _createClass(PageLoader, [\n {\n key: \"getPageList\",\n value: function getPageList() {\n if (false) {} else {\n if (window.__DEV_PAGES_MANIFEST) {\n return window.__DEV_PAGES_MANIFEST.pages;\n } else {\n if (!this.promisedDevPagesManifest) {\n // TODO: Decide what should happen when fetching fails instead of asserting\n // @ts-ignore\n this.promisedDevPagesManifest = fetch(\"\".concat(this.assetPrefix, \"/_next/static/development/_devPagesManifest.json\")).then(function(res) {\n return res.json();\n }).then(function(manifest) {\n window.__DEV_PAGES_MANIFEST = manifest;\n return manifest.pages;\n }).catch(function(err) {\n console.log(\"Failed to fetch devPagesManifest\", err);\n });\n }\n // TODO Remove this assertion as this could be undefined\n return this.promisedDevPagesManifest;\n }\n }\n }\n },\n {\n key: \"getMiddlewareList\",\n value: function getMiddlewareList() {\n if (false) { var middlewareRegex; } else {\n if (window.__DEV_MIDDLEWARE_MANIFEST) {\n return window.__DEV_MIDDLEWARE_MANIFEST;\n } else {\n if (!this.promisedMiddlewareManifest) {\n // TODO: Decide what should happen when fetching fails instead of asserting\n // @ts-ignore\n this.promisedMiddlewareManifest = fetch(\"\".concat(this.assetPrefix, \"/_next/static/\").concat(this.buildId, \"/_devMiddlewareManifest.json\")).then(function(res) {\n return res.json();\n }).then(function(manifest) {\n window.__DEV_MIDDLEWARE_MANIFEST = manifest;\n return manifest;\n }).catch(function(err) {\n console.log(\"Failed to fetch _devMiddlewareManifest\", err);\n });\n }\n // TODO Remove this assertion as this could be undefined\n return this.promisedMiddlewareManifest;\n }\n }\n }\n },\n {\n key: \"getDataHref\",\n value: function getDataHref(params) {\n var _this = this;\n var asPath = params.asPath, href = params.href, locale = params.locale;\n var ref = (0, _parseRelativeUrl).parseRelativeUrl(href), hrefPathname = ref.pathname, query = ref.query, search = ref.search;\n var ref1 = (0, _parseRelativeUrl).parseRelativeUrl(asPath), asPathname = ref1.pathname;\n var route = (0, _removeTrailingSlash).removeTrailingSlash(hrefPathname);\n if (route[0] !== \"/\") {\n throw new Error('Route name should start with a \"/\", got \"'.concat(route, '\"'));\n }\n var getHrefForSlug = function(path) {\n var dataRoute = (0, _getAssetPathFromRoute).default((0, _removeTrailingSlash).removeTrailingSlash((0, _addLocale).addLocale(path, locale)), \".json\");\n return (0, _addBasePath).addBasePath(\"/_next/data/\".concat(_this.buildId).concat(dataRoute).concat(search), true);\n };\n return getHrefForSlug(params.skipInterpolation ? asPathname : (0, _isDynamic).isDynamicRoute(route) ? (0, _router).interpolateAs(hrefPathname, asPathname, query).result : route);\n }\n },\n {\n /**\n * @param {string} route - the route (file-system path)\n */ key: \"_isSsg\",\n value: function _isSsg(route) {\n return this.promisedSsgManifest.then(function(manifest) {\n return manifest.has(route);\n });\n }\n },\n {\n key: \"loadPage\",\n value: function loadPage(route) {\n return this.routeLoader.loadRoute(route).then(function(res) {\n if (\"component\" in res) {\n return {\n page: res.component,\n mod: res.exports,\n styleSheets: res.styles.map(function(o) {\n return {\n href: o.href,\n text: o.content\n };\n })\n };\n }\n throw res.error;\n });\n }\n },\n {\n key: \"prefetch\",\n value: function prefetch(route) {\n return this.routeLoader.prefetch(route);\n }\n }\n ]);\n return PageLoader;\n}();\nexports[\"default\"] = PageLoader;\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=page-loader.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvcGFnZS1sb2FkZXIuanMuanMiLCJtYXBwaW5ncyI6IkFBQWE7Oz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y5fX0RFVl9QQUdFU19NQU5JRkVTVCkge1xuICAgICAgICAgICAgICAgIHJldHVybiB3aW5kb3cuX19ERVZfUEFHRVNfTUFOSUZFU1QucGFnZXM7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGlmICghdGhpcy5wcm9taXNlZERldlBhZ2VzTWFuaWZlc3QpIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gVE9ETzogRGVjaWRlIHdoYXQgc2hvdWxkIGhhcHBlbiB3aGVuIGZldGNoaW5nIGZhaWxzIGluc3RlYWQgb2YgYXNzZXJ0aW5nXG4gICAgICAgICAgICAgICAgICAgIC8vIEB0cy1pZ25vcmVcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5wcm9taXNlZERldlBhZ2VzTWFuaWZlc3QgPSBmZXRjaChgJHt0aGlzLmFzc2V0UHJlZml4fS9fbmV4dC9zdGF0aWMvZGV2ZWxvcG1lbnQvX2RldlBhZ2VzTWFuaWZlc3QuanNvbmApLnRoZW4oKHJlcyk9PnJlcy5qc29uKCkpLnRoZW4oKG1hbmlmZXN0KT0+e1xuICAgICAgICAgICAgICAgICAgICAgICAgd2luZG93Ll9fREVWX1BBR0VTX01BTklGRVNUID0gbWFuaWZlc3Q7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gbWFuaWZlc3QucGFnZXM7XG4gICAgICAgICAgICAgICAgICAgIH0pLmNhdGNoKChlcnIpPT57XG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZyhgRmFpbGVkIHRvIGZldGNoIGRldlBhZ2VzTWFuaWZlc3RgLCBlcnIpO1xuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgLy8gVE9ETyBSZW1vdmUgdGhpcyBhc3NlcnRpb24gYXMgdGhpcyBjb3VsZCBiZSB1bmRlZmluZWRcbiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5wcm9taXNlZERldlBhZ2VzTWFuaWZlc3Q7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG4gICAgZ2V0TWlkZGxld2FyZUxpc3QoKSB7XG4gICAgICAgIGlmIChwcm9jZXNzLmVudi5OT0RFX0VOViA9PT0gJ3Byb2R1Y3Rpb24nKSB7XG4gICAgICAgICAgICBjb25zdCBtaWRkbGV3YXJlUmVnZXggPSBwcm9jZXNzLmVudi5fX05FWFRfTUlERExFV0FSRV9SRUdFWDtcbiAgICAgICAgICAgIHdpbmRvdy5fX01JRERMRVdBUkVfTUFOSUZFU1QgPSBtaWRkbGV3YXJlUmVnZXggPyBbXG4gICAgICAgICAgICAgICAgW1xuICAgICAgICAgICAgICAgICAgICBtaWRkbGV3YXJlUmVnZXgsXG4gICAgICAgICAgICAgICAgICAgIGZhbHNlXG4gICAgICAgICAgICAgICAgXVxuICAgICAgICAgICAgXSA6IFtdO1xuICAgICAgICAgICAgcmV0dXJuIHdpbmRvdy5fX01JRERMRVdBUkVfTUFOSUZFU1Q7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBpZiAod2luZG93Ll9fREVWX01JRERMRVdBUkVfTUFOSUZFU1QpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gd2luZG93Ll9fREVWX01JRERMRVdBUkVfTUFOSUZFU1Q7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGlmICghdGhpcy5wcm9taXNlZE1pZGRsZXdhcmVNYW5pZmVzdCkge1xuICAgICAgICAgICAgICAgICAgICAvLyBUT0RPOiBEZWNpZGUgd2hhdCBzaG91bGQgaGFwcGVuIHdoZW4gZmV0Y2hpbmcgZmFpbHMgaW5zdGVhZCBvZiBhc3NlcnRpbmdcbiAgICAgICAgICAgICAgICAgICAgLy8gQHRzLWlnbm9yZVxuICAgICAgICAgICAgICAgICAgICB0aGlzLnByb21pc2VkTWlkZGxld2FyZU1hbmlmZXN0ID0gZmV0Y2goYCR7dGhpcy5hc3NldFByZWZpeH0vX25leHQvc3RhdGljLyR7dGhpcy5idWlsZElkfS9fZGV2TWlkZGxld2FyZU1hbmlmZXN0Lmpzb25gKS50aGVuKChyZXMpPT5yZXMuanNvbigpKS50aGVuKChtYW5pZmVzdCk9PntcbiAgICAgICAgICAgICAgICAgICAgICAgIHdpbmRvdy5fX0RFVl9NSURETEVXQVJFX01BTklGRVNUID0gbWFuaWZlc3Q7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gbWFuaWZlc3Q7XG4gICAgICAgICAgICAgICAgICAgIH0pLmNhdGNoKChlcnIpPT57XG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZyhgRmFpbGVkIHRvIGZldGNoIF9kZXZNaWRkbGV3YXJlTWFuaWZlc3RgLCBlcnIpO1xuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgLy8gVE9ETyBSZW1vdmUgdGhpcyBhc3NlcnRpb24gYXMgdGhpcyBjb3VsZCBiZSB1bmRlZmluZWRcbiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5wcm9taXNlZE1pZGRsZXdhcmVNYW5pZmVzdDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cbiAgICBnZXREYXRhSHJlZihwYXJhbXMpIHtcbiAgICAgICAgY29uc3QgeyBhc1BhdGggLCBocmVmICwgbG9jYWxlICB9ID0gcGFyYW1zO1xuICAgICAgICBjb25zdCB7IHBhdGhuYW1lOiBocmVmUGF0aG5hbWUgLCBxdWVyeSAsIHNlYXJjaCAgfSA9ICgwLCBfcGFyc2VSZWxhdGl2ZVVybCkucGFyc2VSZWxhdGl2ZVVybChocmVmKTtcbiAgICAgICAgY29uc3QgeyBwYXRobmFtZTogYXNQYXRobmFtZSAgfSA9ICgwLCBfcGFyc2VSZWxhdGl2ZVVybCkucGFyc2VSZWxhdGl2ZVVybChhc1BhdGgpO1xuICAgICAgICBjb25zdCByb3V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AgIHJldHVybiB0aGlzLnByb21pc2VkU3NnTWFuaWZlc3QudGhlbigobWFuaWZlc3QpPT5tYW5pZmVzdC5oYXMocm91dGUpKTtcbiAgICB9XG4gICAgbG9hZFBhZ2Uocm91dGUpIHtcbiAgICAgICAgcmV0dXJuIHRoaXMucm91dGVMb2FkZXIubG9hZFJvdXRlKHJvdXRlKS50aGVuKChyZXMpPT57XG4gICAgICAgICAgICBpZiAoJ2NvbXBvbmVudCcgaW4gcmVzKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICAgICAgcGFnZTogcmVzLmNvbXBvbmVudCxcbiAgICAgICAgICAgICAgICAgICAgbW9kOiByZXMuZXhwb3J0cyxcbiAgICAgICAgICAgICAgICAgICAgc3R5bGVTaGVldHM6IHJlcy5zdHlsZXMubWFwKChvKT0+KHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBocmVmOiBvLmhyZWYsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGV4dDogby5jb250ZW50XG4gICAgICAgICAgICAgICAgICAgICAgICB9KSlcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdGhyb3cgcmVzLmVycm9yO1xuICAgICAgICB9KTtcbiAgICB9XG4gICAgcHJlZmV0Y2gocm91dGUpIHtcbiAgICAgICAgcmV0dXJuIHRoaXMucm91dGVMb2FkZXIucHJlZmV0Y2gocm91dGUpO1xuICAgIH1cbiAgICBjb25zdHJ1Y3RvcihidWlsZElkLCBhc3NldFByZWZpeCl7XG4gICAgICAgIHRoaXMucm91dGVMb2FkZXIgPSAoMCwgX3JvdXRlTG9hZGVyKS5jcmVhdGVSb3V0ZUxvYWRlcihhc3NldFByZWZpeCk7XG4gICAgICAgIHRoaXMuYnVpbGRJZCA9IGJ1aWxkSWQ7XG4gICAgICAgIHRoaXMuYXNzZXRQcmVmaXggPSBhc3NldFByZWZpeDtcbiAgICAgICAgdGhpcy5wcm9taXN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CJFcnJvciIsImdldEhyZWZGb3JTbHVnIiwicGF0aCIsImRhdGFSb3V0ZSIsImFkZExvY2FsZSIsImFkZEJhc2VQYXRoIiwic2tpcEludGVycG9sYXRpb24iLCJpc0R5bmFtaWNSb3V0ZSIsImludGVycG9sYXRlQXMiLCJyZXN1bHQiLCJfaXNTc2ciLCJoYXMiLCJsb2FkUGFnZSIsImxvYWRSb3V0ZSIsInBhZ2UiLCJjb21wb25lbnQiLCJtb2QiLCJzdHlsZVNoZWV0cyIsInN0eWxlcyIsIm1hcCIsIm8iLCJ0ZXh0IiwiY29udGVudCIsImVycm9yIiwicHJlZmV0Y2giLCJhc3NpZ24iLCJtb2R1bGUiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///../node_modules/next/dist/client/page-loader.js\n"));
/***/ }),
/***/ "../node_modules/next/dist/client/performance-relayer.js":
/*!***************************************************************!*\
!*** ../node_modules/next/dist/client/performance-relayer.js ***!
\***************************************************************/
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _webVitals = __webpack_require__(/*! next/dist/compiled/web-vitals */ \"../node_modules/next/dist/compiled/web-vitals/web-vitals.umd.js\");\nvar initialHref = location.href;\nvar isRegistered = false;\nvar userReportHandler;\nfunction onReport(metric) {\n if (userReportHandler) {\n userReportHandler(metric);\n }\n // This code is not shipped, executed, or present in the client-side\n // JavaScript bundle unless explicitly enabled in your application.\n //\n // When this feature is enabled, we'll make it very clear by printing a\n // message during the build (`next build`).\n if (false) { var send, vitalsUrl, blob, body, fallbackSend; }\n}\nvar _default = function(onPerfEntry) {\n // Update function if it changes:\n userReportHandler = onPerfEntry;\n // Only register listeners once:\n if (isRegistered) {\n return;\n }\n isRegistered = true;\n (0, _webVitals).onCLS(onReport);\n (0, _webVitals).onFID(onReport);\n (0, _webVitals).onFCP(onReport);\n (0, _webVitals).onLCP(onReport);\n (0, _webVitals).onTTFB(onReport);\n (0, _webVitals).onINP(onReport);\n};\nexports[\"default\"] = _default;\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=performance-relayer.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvcGVyZm9ybWFuY2UtcmVsYXllci5qcy5qcyIsIm1hcHBpbmdzIjoiQUFBYTtBQUNiQSw4Q0FBNkM7SUFDekNHLEtBQUssRUFBRSxJQUFJO0NBQ2QsRUFBQyxDQUFDO0FBQ0hELGtCQUFlLEdBQUcsS0FBSyxDQUFDLENBQUM7QUFDekIsSUFBSUcsVUFBVSxHQUFHQyxtQkFBTyxDQUFDLHNHQUErQixDQUFDO0FBQ3pELElBQU1DLFdBQVcsR0FBR0MsUUFBUSxDQUFDQyxJQUFJO0FBQ2pDLElBQUlDLFlBQVksR0FBRyxLQUFLO0FBQ3hCLElBQUlDLGlCQUFpQjtBQUNyQixTQUFTQyxRQUFRLENBQUNDLE1BQU0sRUFBRTtJQUN0QixJQUFJRixpQkFBaUIsRUFBRTtRQUNuQkEsaUJBQWlCLENBQUNFLE1BQU0sQ0FBQyxDQUFDO0tBQzdCO0lBQ0Qsb0VBQW9FO0lBQ3BFLG1FQUFtRTtJQUNuRSxFQUFFO0lBQ0YsdUVBQXVFO0lBQ3ZFLDJDQUEyQztJQUMzQyxJQUFJQyxLQUMyQixFQUFFLGtEQWtDaEM7Q0FDSjtBQUNELElBQUkrQixRQUFRLEdBQUcsU0FBQ0MsV0FBVyxFQUFHO0lBQzFCLGlDQUFpQztJQUNqQ25DLGlCQUFpQixHQUFHbUMsV0FBVyxDQUFDO0lBQ2hDLGdDQUFnQztJQUNoQyx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nVlIH0pO1xuICBPYmplY3QuYXNzaWduKGV4cG9ydHMuZGVmYXVsdCwgZXhwb3J0cyk7XG4gIG1vZHVsZS5leHBvcnRzID0gZXhwb3J0cy5kZWZhdWx0O1xufVxuXG4vLyMgc291cmNlTWFwcGluZ1VSTD1wZXJmb3JtYW5jZS1yZWxheWVyLmpzLm1hcCJdLCJuYW1lcyI6WyJPYmplY3QiLCJkZWZpbmVQcm9wZXJ0eSIsImV4cG9ydHMiLCJ2YWx1ZSIsImRlZmF1bHQiLCJfd2ViVml0YWxzIiwicmVxdWlyZSIsImluaXRpYWxIcmVmIiwibG9jYXRpb24iLCJocmVmIiwiaXNSZWdpc3RlcmVkIiwidXNlclJlcG9ydEhhbmRsZXIiLCJvblJlcG9ydCIsIm1ldHJpYyIsInByb2Nlc3MiLCJlbnYiLCJfX05FWFRfQU5BTFlUSUNTX0lEIiwiZmFsbGJhY2tTZW5kIiwiZmV0Y2giLCJ2aXRhbHNVcmwiLCJib2R5IiwiYmxvYiIsIm1ldGhvZCIsImNyZWRlbnRpYWxzIiwia2VlcGFsaXZlIiwiY2F0Y2giLCJjb25zb2xlIiwiZXJyb3IiLCJkc24iLCJpZCIsInBhZ2UiLCJ3aW5kb3ciLCJfX05FWFRfREFUQV9fIiwiZXZlbnRfbmFtZSIsIm5hbWUiLCJ0b1N0cmluZyIsInNwZWVkIiwibmF2aWdhdG9yIiwiQmxvYiIsIlVSTFNlYXJjaFBhcmFtcyIsInR5cGUiLCJzZW5kIiwic2VuZEJlYWNvbiIsImJpbmQiLCJlcnIiLCJfZGVmYXVsdCIsIm9uUGVyZkVudHJ5Iiwib25DTFMiLCJvbkZJRCIsIm9uRkNQIiwib25MQ1AiLCJvblRURkIiLCJvbklOUCIsIl9fZXNNb2R1bGUiLCJhc3NpZ24iLCJtb2R1bGUiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///../node_modules/next/dist/client/performance-relayer.js\n"));
/***/ }),
/***/ "../node_modules/next/dist/client/portal/index.js":
/*!********************************************************!*\
!*** ../node_modules/next/dist/client/portal/index.js ***!
\********************************************************/
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nvar _slicedToArray = (__webpack_require__(/*! @swc/helpers/lib/_sliced_to_array.js */ \"../node_modules/@swc/helpers/lib/_sliced_to_array.js\")[\"default\"]);\nvar _s = $RefreshSig$();\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.Portal = void 0;\nvar _react = _interopRequireDefault(__webpack_require__(/*! react */ \"../node_modules/react/index.js\"));\nvar _reactDom = __webpack_require__(/*! react-dom */ \"../node_modules/react-dom/index.js\");\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\nvar Portal = function(param) {\n var children = param.children, type = param.type;\n _s();\n var portalNode = _react.default.useRef(null);\n var ref = _slicedToArray(_react.default.useState(), 2), forceUpdate = ref[1];\n _react.default.useEffect(function() {\n portalNode.current = document.createElement(type);\n document.body.appendChild(portalNode.current);\n forceUpdate({});\n return function() {\n if (portalNode.current) {\n document.body.removeChild(portalNode.current);\n }\n };\n }, [\n type\n ]);\n return portalNode.current ? /*#__PURE__*/ (0, _reactDom).createPortal(children, portalNode.current) : null;\n};\n_s(Portal, \"2G1G/n0Mrpmd7ljT9Y3X5peSz9o=\");\n_c = Portal;\nexports.Portal = Portal;\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=index.js.map\nvar _c;\n$RefreshReg$(_c, \"Portal\");\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvcG9ydGFsL2luZGV4LmpzLmp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XNlUmVmIiwidXNlU3RhdGUiLCJmb3JjZVVwZGF0ZSIsInVzZUVmZmVjdCIsImN1cnJlbnQiLCJkb2N1bWVudCIsImNyZWF0ZUVsZW1lbnQiLCJib2R5IiwiYXBwZW5kQ2hpbGQiLCJyZW1vdmVDaGlsZCIsImNyZWF0ZVBvcnRhbCIsImFzc2lnbiIsIm1vZHVsZSJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///../node_modules/next/dist/client/portal/index.js\n"));
/***/ }),
/***/ "../node_modules/next/dist/client/remove-base-path.js":
/*!************************************************************!*\
!*** ../node_modules/next/dist/client/remove-base-path.js ***!
\************************************************************/
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.removeBasePath = removeBasePath;\nvar _hasBasePath = __webpack_require__(/*! ./has-base-path */ \"../node_modules/next/dist/client/has-base-path.js\");\nvar basePath = false || \"\";\nfunction removeBasePath(path) {\n if (false) {}\n path = path.slice(basePath.length);\n if (!path.startsWith(\"/\")) path = \"/\".concat(path);\n return path;\n}\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=remove-base-path.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvcmVtb3ZlLWJhc2UtcGF0aC5qcy5qcyIsIm1hcHBpbmdzIjoiQUFBYTtBQUNiQSw4Q0FBNkM7SUFDekNHLEtBQUssRUFBRSxJQUFJO0NBQ2QsRUFBQyxDQUFDO0FBQ0hELHNCQUFzQixHQUFHRSxjQUFjLENBQUM7QUFDeEMsSUFBSUMsWUFBWSxHQUFHQyxtQkFBTyxDQUFDL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B0cnVlIH0pO1xuICBPYmplY3QuYXNzaWduKGV4cG9ydHMuZGVmYXVsdCwgZXhwb3J0cyk7XG4gIG1vZHVsZS5leHBvcnRzID0gZXhwb3J0cy5kZWZhdWx0O1xufVxuXG4vLyMgc291cmNlTWFwcGluZ1VSTD1yZW1vdmUtYmFzZS1wYXRoLmpzLm1hcCJdLCJuYW1lcyI6WyJPYmplY3QiLCJkZWZpbmVQcm9wZXJ0eSIsImV4cG9ydHMiLCJ2YWx1ZSIsInJlbW92ZUJhc2VQYXRoIiwiX2hhc0Jhc2VQYXRoIiwicmVxdWlyZSIsImJhc2VQYXRoIiwicHJvY2VzcyIsImVudiIsIl9fTkVYVF9ST1VURVJfQkFTRVBBVEgiLCJwYXRoIiwiX19ORVhUX01BTlVBTF9DTElFTlRfQkFTRV9QQVRIIiwiaGFzQmFzZVBhdGgiLCJzbGljZSIsImxlbmd0aCIsInN0YXJ0c1dpdGgiLCJkZWZhdWx0IiwiX19lc01vZHVsZSIsImFzc2lnbiIsIm1vZHVsZSJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///../node_modules/next/dist/client/remove-base-path.js\n"));
/***/ }),
/***/ "../node_modules/next/dist/client/remove-locale.js":
/*!*********************************************************!*\
!*** ../node_modules/next/dist/client/remove-locale.js ***!
\*********************************************************/
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.removeLocale = removeLocale;\nvar _parsePath = __webpack_require__(/*! ../shared/lib/router/utils/parse-path */ \"../node_modules/next/dist/shared/lib/router/utils/parse-path.js\");\nfunction removeLocale(path, locale) {\n if (false) { var localeLower, pathLower, pathname; }\n return path;\n}\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=remove-locale.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sour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HBvcnRzLmRlZmF1bHQgPT09ICdmdW5jdGlvbicgfHwgKHR5cGVvZiBleHBvcnRzLmRlZmF1bHQgPT09ICdvYmplY3QnICYmIGV4cG9ydHMuZGVmYXVsdCAhPT0gbnVsbCkpICYmIHR5cGVvZiBleHBvcnRzLmRlZmF1bHQuX19lc01vZHVsZSA9PT0gJ3VuZGVmaW5lZCcpIHtcbiAgT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMuZGVmYXVsdCwgJ19fZXNNb2R1bGUnLCB7IHZhbHVlOiB0cnVlIH0pO1xuICBPYmplY3QuYXNzaWduKGV4cG9ydHMuZGVmYXVsdCwgZXhwb3J0cyk7XG4gIG1vZHVsZS5leHBvcnRzID0gZXhwb3J0cy5kZWZhdWx0O1xufVxuXG4vLyMgc291cmNlTWFwcGluZ1VSTD1yZW1vdmUtbG9jYWxlLmpzLm1hcCJdLCJuYW1lcyI6WyJPYmplY3QiLCJkZWZpbmVQcm9wZXJ0eSIsImV4cG9ydHMiLCJ2YWx1ZSIsInJlbW92ZUxvY2FsZSIsIl9wYXJzZVBhdGgiLCJyZXF1aXJlIiwicGF0aCIsImxvY2FsZSIsInByb2Nlc3MiLCJlbnYiLCJfX05FWFRfSTE4Tl9TVVBQT1JUIiwicGF0aG5hbWUiLCJwYXJzZVBhdGgiLCJwYXRoTG93ZXIiLCJ0b0xvd2VyQ2FzZSIsImxvY2FsZUxvd2VyIiwic3RhcnRzV2l0aCIsImxlbmd0aCIsInNsaWNlIiwiZGVmYXVsdCIsIl9fZXNNb2R1bGUiLCJhc3NpZ24iLCJtb2R1bGUiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///../node_modules/next/dist/client/remove-locale.js\n"));
/***/ }),
/***/ "../node_modules/next/dist/client/request-idle-callback.js":
/*!*****************************************************************!*\
!*** ../node_modules/next/dist/client/request-idle-callback.js ***!
\*****************************************************************/
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.cancelIdleCallback = exports.requestIdleCallback = void 0;\nvar requestIdleCallback = typeof self !== \"undefined\" && self.requestIdleCallback && self.requestIdleCallback.bind(window) || function(cb) {\n var start = Date.now();\n return setTimeout(function() {\n cb({\n didTimeout: false,\n timeRemaining: function timeRemaining() {\n return Math.max(0, 50 - (Date.now() - start));\n }\n });\n }, 1);\n};\nexports.requestIdleCallback = requestIdleCallback;\nvar cancelIdleCallback = typeof self !== \"undefined\" && self.cancelIdleCallback && self.cancelIdleCallback.bind(window) || function(id) {\n return clearTimeout(id);\n};\nexports.cancelIdleCallback = cancelIdleCallback;\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=request-idle-callback.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvcmVxdWVzdC1pZGxlLWNhbGxiYWNrLmpzLmpzIiwibWFwcGluZ3MiOiJBQUFhO0FBQ2JBLDhDQUE2QztJQUN6Q0csS0FBSyxFQUFFLElBQUk7Q0FDZCxFQUFDLENBQUM7QUFDSEQsMEJBQTBCLEdBQUdBLDJCQUEyQixHQUFHLEtBQUssQ0FBQyxDQUFDO0FBQ2xFLElBQU1HLG1CQUFtQixHQUFHLE9BQU9DLElBQUksS0FBSyxXQUFXLElBQUlBLElBQUksQ0FBQ0QsbUJBQW1CLElBQUlDLElBQUksQ0FBQ0QsbUJBQW1CLENBQUNFLElBQUksQ0FBQ0MsTUFBTSxDQUFDLElBQUksU0FBU0MsRUFBRSxFQUFFO0lBQ3pJLElBQUlDLEtBQUssR0FBR0MsSUFBSSxDQUFDQyxHQUFHLEVBQUU7SUFDdEIsT0FBT0MsVU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m93Iiwic2V0VGltZW91dCIsImRpZFRpbWVvdXQiLCJ0aW1lUmVtYWluaW5nIiwiTWF0aCIsIm1heCIsImlkIiwiY2xlYXJUaW1lb3V0IiwiZGVmYXVsdCIsIl9fZXNNb2R1bGUiLCJhc3NpZ24iLCJtb2R1bGUiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///../node_modules/next/dist/client/request-idle-callback.js\n"));
/***/ }),
/***/ "../node_modules/next/dist/client/route-announcer.js":
/*!***********************************************************!*\
!*** ../node_modules/next/dist/client/route-announcer.js ***!
\***********************************************************/
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nvar _slicedToArray = (__webpack_require__(/*! @swc/helpers/lib/_sliced_to_array.js */ \"../node_modules/@swc/helpers/lib/_sliced_to_array.js\")[\"default\"]);\nvar _s = $RefreshSig$();\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.RouteAnnouncer = RouteAnnouncer;\nexports[\"default\"] = void 0;\nvar _react = _interopRequireDefault(__webpack_require__(/*! react */ \"../node_modules/react/index.js\"));\nvar _router = __webpack_require__(/*! ./router */ \"../node_modules/next/dist/client/router.js\");\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\nfunction RouteAnnouncer() {\n _s();\n var asPath = (0, _router).useRouter().asPath;\n var ref = _slicedToArray(_react.default.useState(\"\"), 2), routeAnnouncement = ref[0], setRouteAnnouncement = ref[1];\n // Only announce the path change, but not for the first load because screen\n // reader will do that automatically.\n var previouslyLoadedPath = _react.default.useRef(asPath);\n // Every time the path changes, announce the new pages title following this\n // priority: first the document title (from head), otherwise the first h1, or\n // if none of these exist, then the pathname from the URL. This methodology is\n // inspired by Marcy Suttons accessible client routing user testing. More\n // information can be found here:\n // https://www.gatsbyjs.com/blog/2019-07-11-user-testing-accessible-client-routing/\n _react.default.useEffect(function() {\n // If the path hasn't change, we do nothing.\n if (previouslyLoadedPath.current === asPath) return;\n previouslyLoadedPath.current = asPath;\n if (document.title) {\n setRouteAnnouncement(document.title);\n } else {\n var pageHeader = document.querySelector(\"h1\");\n var ref;\n var content = (ref = pageHeader == null ? void 0 : pageHeader.innerText) != null ? ref : pageHeader == null ? void 0 : pageHeader.textContent;\n setRouteAnnouncement(content || asPath);\n }\n }, [\n asPath\n ]);\n return /*#__PURE__*/ _react.default.createElement(\"p\", {\n \"aria-live\": \"assertive\" // Make the announcement immediately.\n ,\n id: \"__next-route-announcer__\",\n role: \"alert\",\n style: {\n border: 0,\n clip: \"rect(0 0 0 0)\",\n height: \"1px\",\n margin: \"-1px\",\n overflow: \"hidden\",\n padding: 0,\n position: \"absolute\",\n width: \"1px\",\n // https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe\n whiteSpace: \"nowrap\",\n wordWrap: \"normal\"\n }\n }, routeAnnouncement);\n}\n_s(RouteAnnouncer, \"XmDOMcfEgRlT21GulgLTmCStecg=\");\n_c = RouteAnnouncer;\nvar _default = RouteAnnouncer;\nexports[\"default\"] = _default;\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=route-announcer.js.map\nvar _c;\n$RefreshReg$(_c, \"RouteAnnouncer\");\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvcm91dGUtYW5ub3VuY2VyLmpzLmpzIiwibWFwcGluZ3MiOiJBQUFhOzs7Ozs7QUFDYkEsOENBQTZDO0lBQ3pDRyxLQUFLLEVBQUUsSUFBSTtDQUNkLEVBQUMsQ0FBQztBQUNIRCxzQkFBc0IsR0FBR0UsY0FBYyxDQUFDO0FBQ3hD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kb2N1bWVudCIsInRpdGxlIiwicGFnZUhlYWRlciIsInF1ZXJ5U2VsZWN0b3IiLCJyZWYiLCJjb250ZW50IiwiaW5uZXJUZXh0IiwidGV4dENvbnRlbnQiLCJjcmVhdGVFbGVtZW50IiwiaWQiLCJyb2xlIiwic3R5bGUiLCJib3JkZXIiLCJjbGlwIiwiaGVpZ2h0IiwibWFyZ2luIiwib3ZlcmZsb3ciLCJwYWRkaW5nIiwicG9zaXRpb24iLCJ3aWR0aCIsIndoaXRlU3BhY2UiLCJ3b3JkV3JhcCIsIl9kZWZhdWx0IiwiYXNzaWduIiwibW9kdWxlIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///../node_modules/next/dist/client/route-announcer.js\n"));
/***/ }),
/***/ "../node_modules/next/dist/client/route-loader.js":
/*!********************************************************!*\
!*** ../node_modules/next/dist/client/route-loader.js ***!
\********************************************************/
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.markAssetError = markAssetError;\nexports.isAssetError = isAssetError;\nexports.getClientBuildManifest = getClientBuildManifest;\nexports.createRouteLoader = createRouteLoader;\nvar _getAssetPathFromRoute = _interopRequireDefault(__webpack_require__(/*! ../shared/lib/router/utils/get-asset-path-from-route */ \"../node_modules/next/dist/shared/lib/router/utils/get-asset-path-from-route.js\"));\nvar _trustedTypes = __webpack_require__(/*! ./trusted-types */ \"../node_modules/next/dist/client/trusted-types.js\");\nvar _requestIdleCallback = __webpack_require__(/*! ./request-idle-callback */ \"../node_modules/next/dist/client/request-idle-callback.js\");\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\n// 3.8s was arbitrarily chosen as it's what https://web.dev/interactive\n// considers as \"Good\" time-to-interactive. We must assume something went\n// wrong beyond this point, and then fall-back to a full page transition to\n// show the user something of value.\nvar MS_MAX_IDLE_DELAY = 3800;\nfunction withFuture(key, map, generator) {\n var entry = map.get(key);\n if (entry) {\n if (\"future\" in entry) {\n return entry.future;\n }\n return Promise.resolve(entry);\n }\n var resolver;\n var prom = new Promise(function(resolve) {\n resolver = resolve;\n });\n map.set(key, entry = {\n resolve: resolver,\n future: prom\n });\n return generator ? generator() // eslint-disable-next-line no-sequences\n .then(function(value) {\n return resolver(value), value;\n }).catch(function(err) {\n map.delete(key);\n throw err;\n }) : prom;\n}\nfunction hasPrefetch(link) {\n try {\n link = document.createElement(\"link\");\n return(// with relList.support\n (!!window.MSInputMethodContext && !!document.documentMode) || link.relList.supports(\"prefetch\"));\n } catch (e) {\n return false;\n }\n}\nvar canPrefetch = hasPrefetch();\nfunction prefetchViaDom(href, as, link) {\n return new Promise(function(res, rej) {\n var selector = '\\n link[rel=\"prefetch\"][href^=\"'.concat(href, '\"],\\n link[rel=\"preload\"][href^=\"').concat(href, '\"],\\n script[src^=\"').concat(href, '\"]');\n if (document.querySelector(selector)) {\n return res();\n }\n link = document.createElement(\"link\");\n // The order of property assignment here is intentional:\n if (as) link.as = as;\n link.rel = \"prefetch\";\n link.crossOrigin = undefined;\n link.onload = res;\n link.onerror = rej;\n // `href` should always be last:\n link.href = href;\n document.head.appendChild(link);\n });\n}\nvar ASSET_LOAD_ERROR = Symbol(\"ASSET_LOAD_ERROR\");\nfunction markAssetError(err) {\n return Object.defineProperty(err, ASSET_LOAD_ERROR, {});\n}\nfunction isAssetError(err) {\n return err && ASSET_LOAD_ERROR in err;\n}\nfunction appendScript(src, script) {\n return new Promise(function(resolve, reject) {\n script = document.createElement(\"script\");\n // The order of property assignment here is intentional.\n // 1. Setup success/failure hooks in case the browser synchronously\n // executes when `src` is set.\n script.onload = resolve;\n script.onerror = function() {\n return reject(markAssetError(new Error(\"Failed to load script: \".concat(src))));\n };\n // 2. Configure the cross-origin attribute before setting `src` in case the\n // browser begins to fetch.\n script.crossOrigin = undefined;\n // 3. Finally, set the source and inject into the DOM in case the child\n // must be appended for fetching to start.\n script.src = src;\n document.body.appendChild(script);\n });\n}\n// We wait for pages to be built in dev before we start the route transition\n// timeout to prevent an un-necessary hard navigation in development.\nvar devBuildPromise;\n// Resolve a promise that times out after given amount of milliseconds.\nfunction resolvePromiseWithTimeout(p, ms, err) {\n return new Promise(function(resolve, reject) {\n var cancelled = false;\n p.then(function(r) {\n // Resolved, cancel the timeout\n cancelled = true;\n resolve(r);\n }).catch(reject);\n // We wrap these checks separately for better dead-code elimination in\n // production bundles.\n if (true) {\n (devBuildPromise || Promise.resolve()).then(function() {\n (0, _requestIdleCallback).requestIdleCallback(function() {\n return setTimeout(function() {\n if (!cancelled) {\n reject(err);\n }\n }, ms);\n });\n });\n }\n if (false) {}\n });\n}\nfunction getClientBuildManifest() {\n if (self.__BUILD_MANIFEST) {\n return Promise.resolve(self.__BUILD_MANIFEST);\n }\n var onBuildManifest = new Promise(function(resolve) {\n // Mandatory because this is not concurrent safe:\n var cb = self.__BUILD_MANIFEST_CB;\n self.__BUILD_MANIFEST_CB = function() {\n resolve(self.__BUILD_MANIFEST);\n cb && cb();\n };\n });\n return resolvePromiseWithTimeout(onBuildManifest, MS_MAX_IDLE_DELAY, markAssetError(new Error(\"Failed to load client build manifest\")));\n}\nfunction getFilesForRoute(assetPrefix, route) {\n if (true) {\n var scriptUrl = assetPrefix + \"/_next/static/chunks/pages\" + encodeURI((0, _getAssetPathFromRoute).default(route, \".js\"));\n return Promise.resolve({\n scripts: [\n (0, _trustedTypes).__unsafeCreateTrustedScriptURL(scriptUrl)\n ],\n // Styles are handled by `style-loader` in development:\n css: []\n });\n }\n return getClientBuildManifest().then(function(manifest) {\n if (!(route in manifest)) {\n throw markAssetError(new Error(\"Failed to lookup route: \".concat(route)));\n }\n var allFiles = manifest[route].map(function(entry) {\n return assetPrefix + \"/_next/\" + encodeURI(entry);\n });\n return {\n scripts: allFiles.filter(function(v) {\n return v.endsWith(\".js\");\n }).map(function(v) {\n return (0, _trustedTypes).__unsafeCreateTrustedScriptURL(v);\n }),\n css: allFiles.filter(function(v) {\n return v.endsWith(\".css\");\n })\n };\n });\n}\nfunction createRouteLoader(assetPrefix) {\n var maybeExecuteScript = function maybeExecuteScript(src) {\n // With HMR we might need to \"reload\" scripts when they are\n // disposed and readded. Executing scripts twice has no functional\n // differences\n if (false) { var prom; } else {\n return appendScript(src);\n }\n };\n var fetchStyleSheet = function fetchStyleSheet(href) {\n var prom = styleSheets.get(href);\n if (prom) {\n return prom;\n }\n styleSheets.set(href, prom = fetch(href).then(function(res) {\n if (!res.ok) {\n throw new Error(\"Failed to load stylesheet: \".concat(href));\n }\n return res.text().then(function(text) {\n return {\n href: href,\n content: text\n };\n });\n }).catch(function(err) {\n throw markAssetError(err);\n }));\n return prom;\n };\n var entrypoints = new Map();\n var loadedScripts = new Map();\n var styleSheets = new Map();\n var routes = new Map();\n return {\n whenEntrypoint: function whenEntrypoint(route) {\n return withFuture(route, entrypoints);\n },\n onEntrypoint: function onEntrypoint(route, execute) {\n (execute ? Promise.resolve().then(function() {\n return execute();\n }).then(function(exports1) {\n return {\n component: exports1 && exports1.default || exports1,\n exports: exports1\n };\n }, function(err) {\n return {\n error: err\n };\n }) : Promise.resolve(undefined)).then(function(input) {\n var old = entrypoints.get(route);\n if (old && \"resolve\" in old) {\n if (input) {\n entrypoints.set(route, input);\n old.resolve(input);\n }\n } else {\n if (input) {\n entrypoints.set(route, input);\n } else {\n entrypoints.delete(route);\n }\n // when this entrypoint has been resolved before\n // the route is outdated and we want to invalidate\n // this cache entry\n routes.delete(route);\n }\n });\n },\n loadRoute: function loadRoute(route, prefetch) {\n var _this = this;\n return withFuture(route, routes, function() {\n var devBuildPromiseResolve;\n if (true) {\n devBuildPromise = new Promise(function(resolve) {\n devBuildPromiseResolve = resolve;\n });\n }\n return resolvePromiseWithTimeout(getFilesForRoute(assetPrefix, route).then(function(param) {\n var scripts = param.scripts, css = param.css;\n return Promise.all([\n entrypoints.has(route) ? [] : Promise.all(scripts.map(maybeExecuteScript)),\n Promise.all(css.map(fetchStyleSheet)), \n ]);\n }).then(function(res) {\n return _this.whenEntrypoint(route).then(function(entrypoint) {\n return {\n entrypoint: entrypoint,\n styles: res[1]\n };\n });\n }), MS_MAX_IDLE_DELAY, markAssetError(new Error(\"Route did not complete loading: \".concat(route)))).then(function(param) {\n var entrypoint = param.entrypoint, styles = param.styles;\n var res = Object.assign({\n styles: styles\n }, entrypoint);\n return \"error\" in entrypoint ? entrypoint : res;\n }).catch(function(err) {\n if (prefetch) {\n // we don't want to cache errors during prefetch\n throw err;\n }\n return {\n error: err\n };\n }).finally(function() {\n return devBuildPromiseResolve == null ? void 0 : devBuildPromiseResolve();\n });\n });\n },\n prefetch: function prefetch(route) {\n var _this = this;\n // https://github.com/GoogleChromeLabs/quicklink/blob/453a661fa1fa940e2d2e044452398e38c67a98fb/src/index.mjs#L115-L118\n // License: Apache 2.0\n var cn;\n if (cn = navigator.connection) {\n // Don't prefetch if using 2G or if Save-Data is enabled.\n if (cn.saveData || /2g/.test(cn.effectiveType)) return Promise.resolve();\n }\n return getFilesForRoute(assetPrefix, route).then(function(output) {\n return Promise.all(canPrefetch ? output.scripts.map(function(script) {\n return prefetchViaDom(script.toString(), \"script\");\n }) : []);\n }).then(function() {\n (0, _requestIdleCallback).requestIdleCallback(function() {\n return _this.loadRoute(route, true).catch(function() {});\n });\n }).catch(function() {});\n }\n };\n}\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=route-loader.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvcm91dGUtbG9hZGVyLmpzLmpzIiwibWFwcGluZ3MiOiJBQUFhO0FBQ2JBLDhDQUE2QztJQUN6Q0csS0FBSyxFQUFFLElBQUk7Q0FD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tcywgZXJyKSB7XG4gICAgcmV0dXJuIG5ldyBQcm9taXNlKChyZXNvbHZlLCByZWplY3QpPT57XG4gICAgICAgIGxldCBjYW5jZWxsZWQgPSBmYWxzZTtcbiAgICAgICAgcC50aGVuKChyKT0+e1xuICAgICAgICAgICAgLy8gUmVzb2x2ZWQsIGNhbmNlbCB0aGUgdGltZW91dFxuICAgICAgICAgICAgY2FuY2VsbGVkID0gdHJ1ZTtcbiAgICAgICAgICAgIHJlc29sdmUocik7XG4gICAgICAgIH0pLmNhdGNoKHJlamVjdCk7XG4gICAgICAgIC8vIFdlIHdyYXAgdGhlc2UgY2hlY2tzIHNlcGFyYXRlbHkgZm9yIGJldHRlciBkZWFkLWNvZGUgZWxpbWluYXRpb24gaW5cbiAgICAgICAgLy8gcHJvZHVjdGlvbiBidW5kbGVzLlxuICAgICAgICBpZiAocHJvY2Vzcy5lbnYuTk9ERV9FTlYgPT09ICdkZXZlbG9wbWVudCcpIHtcbiAgICAgICAgICAgIChkZXZCdWlsZFByb21pc2UgfHwgUHJvbWlzZS5yZXNvbHZlKCkpLnRoZW4oKCk9PntcbiAgICAgICAgICAgICAgICAoMCwgX3JlcXVlc3RJZGxlQ2FsbGJhY2spLnJlcXVlc3RJZGxlQ2FsbGJhY2soKCk9PnNldFRpbWVvdXQoKCk9PntcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICghY2FuY2VsbGVkKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVqZWN0KGVycik7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0sIG1zKSk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgICAgICBpZiAocHJvY2Vzcy5lbnYuTk9ERV9FTlYgIT09ICdkZXZlbG9wbWVudCcpIHtcbiAgICAgICAgICAgICgwLCBfcmVxdWVzdElkbGVDYWxsYmFjaykucmVxdWVzdElkbGVDYWxsYmFjaygoKT0+c2V0VGltZW91dCgoKT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b2x2ZSgpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgbG9hZGVkU2NyaXB0cy5zZXQoc3JjLnRvU3RyaW5nKCksIHByb20gPSBhcHBlbmRTY3JpcHQoc3JjKSk7XG4gICAgICAgICAgICByZXR1cm4gcHJvbTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHJldHVybiBhcHBlbmRTY3JpcHQoc3JjKTtcbiAgICAgICAgfVxuICAgIH1cbiAgICBmdW5jdGlvbiBmZXRjaFN0eWxlU2hlZXQoaHJlZikge1xuICAgICAgICBsZXQgcHJvbSA9IHN0eWxlU2hlZXRzLmdldChocmVmKTtcbiAgICAgICAgaWYgKHByb20pIHtcbiAgICAgICAgICAgIHJldHVybiBwcm9tO1xuICAgICAgICB9XG4gICAgICAgIHN0eWxlU2hlZXRzLnNldChocmVmLCBwcm9tID0gZmV0Y2goaHJlZikudGhlbigocmVzKT0+e1xuICAgICAgICAgICAgaWYgKCFyZXMub2spIHtcbiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoYEZhaWxlZCB0byBsb2FkIHN0eWxlc2hlZXQ6ICR7aHJlZn1gKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiByZXMudGV4dCgpLnRoZW4oKHRleHQpPT4oe1xuICAgICAgICAgICAgICAgICAgICBocmVmOiBocmVmLFxuICAgICAgICAgICAgICAgICAgICBjb250ZW50OiB0ZXh0XG4gICAgICAgICAgICAgICAgfSkpO1xuICAgICAgICB9KS5jYXRjaCgoZXJyKT0+e1xuICAgICAgICAgICAgdGhyb3cgbWFya0Fzc2V0RXJyb3IoZXJyKTtcbiAgICAgICAgfSkpO1xuICAgICAgICByZXR1cm4gcHJvbTtcbiAgICB9XG4gICAgcmV0dXJuIHtcbiAgICAgICAgd2hlbkVudHJ5cG9pbnQgKHJvdXRlKSB7XG4gICAgICAgICAgICByZXR1cm4gd2l0aEZ1dHVyZShyb3V0ZSwgZW50cnlwb2ludHMpO1xuICAgICAgICB9LFxuICAgICAgICBvbkVudHJ5cG9pbnQgKHJvdXRlLCBleGVjdXRlKSB7XG4gICAgICAgICAgICAoZXhlY3V0ZSA/IFByb21pc2UucmVzb2x2ZSgpLnRoZW4oKCk9PmV4ZWN1dGUoKSkudGhlbigoZXhwb3J0cyk9Pih7XG4gICAgICAgICAgICAgICAgICAgIGNvbXBvbmVudDogZXhwb3J0cyAmJiBleHBvcnRzLmRlZmF1bHQgfHwgZXhwb3J0cyxcbiAgICAgICAgICAgICAgICAgICAgZXhwb3J0czogZXhwb3J0c1xuICAgICAgICAgICAgICAgIH0pLCAoZXJyKT0+KHtcbiAgICAgICAgICAgICAgICAgICAgZXJyb3I6IGVyclxuICAgICAgICAgICAgICAgIH0pKSA6IFByb21pc2UucmVzb2x2ZSh1bmRlZmluZWQpKS50aGVuKChpbnB1dCk9PntcbiAgICAgICAgICAgICAgICBjb25zdCBvbGQgPSBlbnRyeXBvaW50cy5nZXQocm91dGUpO1xuICAgICAgICAgICAgICAgIGlmIChvbGQgJiYgJ3Jlc29sdmUnIGluIG9sZCkge1xuICAgICAgICAgICAgICAgICAgICBpZiAoaW5wdXQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGVudHJ5cG9pbnRzLnNldChyb3V0ZSwgaW5wdXQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgb2xkLnJlc29sdmUoaW5wdXQpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGlucHV0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBlbnRyeXBvaW50cy5zZXQocm91dGUsIGlucHV0KTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGVudHJ5cG9pbnRzLmRlbGV0ZShyb3V0ZSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgLy8gd2hlbiB0aGlzIGVudHJ5cG9pbnQgaGFzIGJlZW4gcmVzb2x2ZWQgYmVmb3JlXG4gICAgICAgICAgICAgICAgICAgIC8vIHRoZSByb3V0ZSBpcyBvdXRkYXRlZCBhbmQgd2Ugd2FudCB0byBpbnZhbGlkYXRlXG4gICAgICAgICAgICAgICAgICAgIC8vIHRoaXMgY2FjaGUgZW50cnlcbiAgICAgICAgICAgICAgICAgICAgcm91dGVzLmRlbGV0ZShyb3V0ZSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0sXG4gICAgICAgIGxvYWRSb3V0ZSAocm91dGUsIHByZWZldGNoKSB7XG4gICAgICAgICAgICByZXR1cm4gd2l0aEZ1dHVyZShyb3V0ZSwgcm91dGVzLCAoKT0+e1xuICAgICAgICAgICAgICAgIGxldCBkZXZCdWlsZFByb21pc2VSZXNvbHZlO1xuICAgICAgICAgICAgICAgIGlmIChwcm9jZXNzLmVudi5OT0RFX0VOViA9PT0gJ2RldmVsb3BtZW50Jykge1xuICAgICAgICAgICAgICAgICAgICBkZXZCdWlsZFByb21pc2UgPSBuZXcgUHJvbWlzZSgocmVzb2x2ZSk9PntcbiAgICAgICAgICAgICAgICAgICAgICAgIGRldkJ1aWxkUHJvbWlzZVJlc29sdmUgPSByZXNvbHZlO1xuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuIHJlc29sdmVQcm9taXNlV2l0aFRpbWVvdXQoZ2V0RmlsZXNGb3JSb3V0ZShhc3NldFByZWZpeCwgcm91dGUpLnRoZW4oKHsgc2NyaXB0cyAsIGNzcyAgfSk9PntcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFByb21pc2UuYWxsKFtcbiAgICAgICAgICAgICAgICAgICAgICAgIGVudHJ5cG9pbnRzLmhhcyhyb3V0ZSkgPyBbXSA6IFByb21pc2UuYWxsKHNjcmlwdHMubWFwKG1heWJlRXhlY3V0ZVNjcmlwdCkpLFxuICAgICAgICAgICAgICAgICAgICAgICAgUHJvbWlzZS5hbGwoY3NzLm1hcChmZXRjaFN0eWxlU2hlZXQpKSwgXG4gICAgICAgICAgICAgICAgICAgIF0pO1xuICAgICAgICAgICAgICAgIH0pLnRoZW4oKHJlcyk9PntcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMud2hlbkVudHJ5cG9pbnQocm91dGUpLnRoZW4oKGVudHJ5cG9pbnQpPT4oe1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVudHJ5cG9pbnQsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3R5bGVzOiByZXNbMV1cbiAgICAgICAgICAgICAgICAgICAgICAgIH0pKTtcbiAgICAgICAgICAgICAgICB9KSwgTVNfTUFYX0lETEVfREVMQVksIG1hcmtBc3NldEVycm9yKG5ldyBFcnJvcihgUm91dGUgZGlkIG5vdCBjb21wbGV0ZSBsb2FkaW5nOiAke3JvdXRlfWApKSkudGhlbigoeyBlbnRyeXBvaW50ICwgc3R5bGVzICB9KT0+e1xuICAgICAgICAgICAgICAgICAgICBjb25zdCByZXMgPSBPYmplY3QuYXNzaWduKHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHN0eWxlczogc3R5bGVzXG4gICAgICAgICAgICAgICAgICAgIH0sIGVudHJ5cG9pbnQpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2Vycm9yJyBpbiBlbnRyeXBvaW50ID8gZW50cnlwb2ludCA6IHJlcztcbiAgICAgICAgICAgICAgICB9KS5jYXRjaCgoZXJyKT0+e1xuICAgICAgICAgICAgICAgICAgICBpZiAocHJlZmV0Y2gpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIHdlIGRvbid0IHdhbnQgdG8gY2FjaGUgZXJyb3JzIGR1cmluZyBwcmVmZXRjaFxuICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3cgZXJyO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBlcnJvcjogZXJyXG4gICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgfSkuZmluYWxseSgoKT0+e1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZGV2QnVpbGRQcm9taXNlUmVzb2x2ZSA9PSBudWxsID8gdm9pZCAwIDogZGV2QnVpbGRQcm9taXNlUmVzb2x2ZSgpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0sXG4gICAgICAgIHByZWZldGNoIChyb3V0ZSkge1xuICAgICAgICAgICAgLy8gaHR0cHM6Ly9naXRodWIuY29tL0dvb2dsZUNocm9tZUxhYnMvcXVpY2tsaW5rL2Jsb2IvNDUzYTY2MWZhMWZhOTQwZTJkMmUwNDQ0NTIzOThlMzhjNjdhOThmYi9zcmMvaW5kZXgubWpzI0wxMTUtTDExOFxuICAgICAgICAgICAgLy8gTGljZW5zZTogQXBhY2hlIDIuMFxuICAgICAgICAgICAgbGV0IGNuO1xuICAgICAgICAgICAgaWYgKGNuID0gbmF2aWdhdG9yLmNvbm5lY3Rpb24pIHtcbiAgICAgICAgICAgICAgICAvLyBEb24ndCBwcmVmZXRjaCBpZiB1c2luZyAyRyBvciBpZiBTYXZlLURhdGEgaXMgZW5hYmxlZC5cbiAgICAgICAgICAgICAgICBpZiAoY24uc2F2ZURhdGEgfHwgLzJnLy50ZXN0KGNuLmVmZmVjdGl2ZVR5cGUpKSByZXR1cm4gUHJvbWlzZS5yZXNvbHZlKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gZ2V0RmlsZXNGb3JSb3V0ZShhc3NldFByZWZpeCwgcm91dGUpLnRoZW4oKG91dHB1dCk9PlByb21pc2UuYWxsKGNhblByZWZldGNoID8gb3V0cHV0LnNjcmlwdHMubWFwKChzY3JpcHQpPT5wcmVmZXRjaFZ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3V0ZSIsImFzc2V0UHJlZml4Iiwicm91dGUiLCJzY3JpcHRVcmwiLCJlbmNvZGVVUkkiLCJzY3JpcHRzIiwiX191bnNhZmVDcmVhdGVUcnVzdGVkU2NyaXB0VVJMIiwiY3NzIiwibWFuaWZlc3QiLCJhbGxGaWxlcyIsImZpbHRlciIsInYiLCJlbmRzV2l0aCIsIm1heWJlRXhlY3V0ZVNjcmlwdCIsImxvYWRlZFNjcmlwdHMiLCJ0b1N0cmluZyIsImZldGNoU3R5bGVTaGVldCIsInN0eWxlU2hlZXRzIiwiZmV0Y2giLCJvayIsInRleHQiLCJjb250ZW50IiwiZW50cnlwb2ludHMiLCJNYXAiLCJyb3V0ZXMiLCJ3aGVuRW50cnlwb2ludCIsIm9uRW50cnlwb2ludCIsImV4ZWN1dGUiLCJjb21wb25lbnQiLCJlcnJvciIsInVuZGVmaW5lZCIsImlucHV0Iiwib2xkIiwibG9hZFJvdXRlIiwicHJlZmV0Y2giLCJkZXZCdWlsZFByb21pc2VSZXNvbHZlIiwiYWxsIiwiaGFzIiwiZW50cnlwb2ludCIsInN0eWxlcyIsImFzc2lnbiIsImZpbmFsbHkiLCJjbiIsIm5hdmlnYXRvciIsImNvbm5lY3Rpb24iLCJzYXZlRGF0YSIsInRlc3QiLCJlZmZlY3RpdmVUeXBlIiwib3V0cHV0IiwibW9kdWxlIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///../node_modules/next/dist/client/route-loader.js\n"));
/***/ }),
/***/ "../node_modules/next/dist/client/router.js":
/*!**************************************************!*\
!*** ../node_modules/next/dist/client/router.js ***!
\**************************************************/
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nvar _construct = (__webpack_require__(/*! @swc/helpers/lib/_construct.js */ \"../node_modules/@swc/helpers/lib/_construct.js\")[\"default\"]);\nvar _toConsumableArray = (__webpack_require__(/*! @swc/helpers/lib/_to_consumable_array.js */ \"../node_modules/@swc/helpers/lib/_to_consumable_array.js\")[\"default\"]);\nvar _s = $RefreshSig$();\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"Router\", ({\n enumerable: true,\n get: function get() {\n return _router.default;\n }\n}));\nObject.defineProperty(exports, \"withRouter\", ({\n enumerable: true,\n get: function get() {\n return _withRouter.default;\n }\n}));\nexports.useRouter = useRouter;\nexports.createRouter = createRouter;\nexports.makePublicRouterInstance = makePublicRouterInstance;\nexports[\"default\"] = void 0;\nvar _react = _interopRequireDefault(__webpack_require__(/*! react */ \"../node_modules/react/index.js\"));\nvar _router = _interopRequireDefault(__webpack_require__(/*! ../shared/lib/router/router */ \"../node_modules/next/dist/shared/lib/router/router.js\"));\nvar _routerContext = __webpack_require__(/*! ../shared/lib/router-context */ \"../node_modules/next/dist/shared/lib/router-context.js\");\nvar _isError = _interopRequireDefault(__webpack_require__(/*! ../lib/is-error */ \"../node_modules/next/dist/lib/is-error.js\"));\nvar _withRouter = _interopRequireDefault(__webpack_require__(/*! ./with-router */ \"../node_modules/next/dist/client/with-router.js\"));\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\nvar singletonRouter = {\n router: null,\n readyCallbacks: [],\n ready: function ready(cb) {\n if (this.router) return cb();\n if (true) {\n this.readyCallbacks.push(cb);\n }\n }\n};\n// Create public properties and methods of the router in the singletonRouter\nvar urlPropertyFields = [\n \"pathname\",\n \"route\",\n \"query\",\n \"asPath\",\n \"components\",\n \"isFallback\",\n \"basePath\",\n \"locale\",\n \"locales\",\n \"defaultLocale\",\n \"isReady\",\n \"isPreview\",\n \"isLocaleDomain\",\n \"domainLocales\", \n];\nvar routerEvents = [\n \"routeChangeStart\",\n \"beforeHistoryChange\",\n \"routeChangeComplete\",\n \"routeChangeError\",\n \"hashChangeStart\",\n \"hashChangeComplete\", \n];\nvar coreMethodFields = [\n \"push\",\n \"replace\",\n \"reload\",\n \"back\",\n \"prefetch\",\n \"beforePopState\", \n];\n// Events is a static property on the router, the router doesn't have to be initialized to use it\nObject.defineProperty(singletonRouter, \"events\", {\n get: function get() {\n return _router.default.events;\n }\n});\nurlPropertyFields.forEach(function(field) {\n // Here we need to use Object.defineProperty because we need to return\n // the property assigned to the actual router\n // The value might get changed as we change routes and this is the\n // proper way to access it\n Object.defineProperty(singletonRouter, field, {\n get: function get() {\n var router = getRouter();\n return router[field];\n }\n });\n});\ncoreMethodFields.forEach(function(field) {\n singletonRouter[field] = function() {\n for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){\n args[_key] = arguments[_key];\n }\n var _router;\n var router = getRouter();\n return (_router = router)[field].apply(_router, _toConsumableArray(args));\n };\n});\nrouterEvents.forEach(function(event) {\n singletonRouter.ready(function() {\n _router.default.events.on(event, function() {\n for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){\n args[_key] = arguments[_key];\n }\n var eventField = \"on\".concat(event.charAt(0).toUpperCase()).concat(event.substring(1));\n var _singletonRouter = singletonRouter;\n if (_singletonRouter[eventField]) {\n try {\n var __singletonRouter;\n (__singletonRouter = _singletonRouter)[eventField].apply(__singletonRouter, _toConsumableArray(args));\n } catch (err) {\n console.error(\"Error when running the Router event: \".concat(eventField));\n console.error((0, _isError).default(err) ? \"\".concat(err.message, \"\\n\").concat(err.stack) : err + \"\");\n }\n }\n });\n });\n});\nfunction getRouter() {\n if (!singletonRouter.router) {\n var message = \"No router instance found.\\n\" + 'You should only use \"next/router\" on the client side of your app.\\n';\n throw new Error(message);\n }\n return singletonRouter.router;\n}\nvar _default = singletonRouter;\nexports[\"default\"] = _default;\nfunction useRouter() {\n _s();\n return _react.default.useContext(_routerContext.RouterContext);\n}\n_s(useRouter, \"gDsCjeeItUuvgOWf1v4qoK9RF6k=\");\nfunction createRouter() {\n for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){\n args[_key] = arguments[_key];\n }\n singletonRouter.router = _construct(_router.default, _toConsumableArray(args));\n singletonRouter.readyCallbacks.forEach(function(cb) {\n return cb();\n });\n singletonRouter.readyCallbacks = [];\n return singletonRouter.router;\n}\nfunction makePublicRouterInstance(router) {\n var scopedRouter = router;\n var instance = {};\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;\n try {\n for(var _iterator = urlPropertyFields[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){\n var property = _step.value;\n if (typeof scopedRouter[property] === \"object\") {\n instance[property] = Object.assign(Array.isArray(scopedRouter[property]) ? [] : {}, scopedRouter[property]) // makes sure query is not stateful\n ;\n continue;\n }\n instance[property] = scopedRouter[property];\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally{\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally{\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n // Events is a static property on the router, the router doesn't have to be initialized to use it\n instance.events = _router.default.events;\n coreMethodFields.forEach(function(field) {\n instance[field] = function() {\n for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){\n args[_key] = arguments[_key];\n }\n var _scopedRouter;\n return (_scopedRouter = scopedRouter)[field].apply(_scopedRouter, _toConsumableArray(args));\n };\n });\n return instance;\n}\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=router.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvcm91dGVyLmpzLmpzIiwibWFwcGluZ3MiOiJBQUFhOzs7Ozs7O0FBQ2JBLDhDQUE2QztJQUN6Q0csS0FBSyxFQUFFLElBQUk7Q0FDZCxFQ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HQiLCJ1c2VDb250ZXh0IiwiUm91dGVyQ29udGV4dCIsInNjb3BlZFJvdXRlciIsImluc3RhbmNlIiwicHJvcGVydHkiLCJhc3NpZ24iLCJBcnJheSIsImlzQXJyYXkiLCJtb2R1bGUiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///../node_modules/next/dist/client/router.js\n"));
/***/ }),
/***/ "../node_modules/next/dist/client/script.js":
/*!**************************************************!*\
!*** ../node_modules/next/dist/client/script.js ***!
\**************************************************/
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nvar _slicedToArray = (__webpack_require__(/*! @swc/helpers/lib/_sliced_to_array.js */ \"../node_modules/@swc/helpers/lib/_sliced_to_array.js\")[\"default\"]);\nvar _toConsumableArray = (__webpack_require__(/*! @swc/helpers/lib/_to_consumable_array.js */ \"../node_modules/@swc/helpers/lib/_to_consumable_array.js\")[\"default\"]);\nvar _s = $RefreshSig$();\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.handleClientScriptLoad = handleClientScriptLoad;\nexports.initScriptLoader = initScriptLoader;\nexports[\"default\"] = void 0;\nvar _react = _interopRequireWildcard(__webpack_require__(/*! react */ \"../node_modules/react/index.js\"));\nvar _headManagerContext = __webpack_require__(/*! ../shared/lib/head-manager-context */ \"../node_modules/next/dist/shared/lib/head-manager-context.js\");\nvar _headManager = __webpack_require__(/*! ./head-manager */ \"../node_modules/next/dist/client/head-manager.js\");\nvar _requestIdleCallback = __webpack_require__(/*! ./request-idle-callback */ \"../node_modules/next/dist/client/request-idle-callback.js\");\nfunction _extends() {\n _extends = Object.assign || function(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i];\n for(var key in source){\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}\nfunction _getRequireWildcardCache() {\n if (typeof WeakMap !== \"function\") return null;\n var cache = new WeakMap();\n _getRequireWildcardCache = function _getRequireWildcardCache() {\n return cache;\n };\n return cache;\n}\nfunction _interopRequireWildcard(obj) {\n if (obj && obj.__esModule) {\n return obj;\n }\n if (obj === null || typeof obj !== \"object\" && typeof obj !== \"function\") {\n return {\n default: obj\n };\n }\n var cache = _getRequireWildcardCache();\n if (cache && cache.has(obj)) {\n return cache.get(obj);\n }\n var newObj = {};\n var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;\n for(var key in obj){\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;\n if (desc && (desc.get || desc.set)) {\n Object.defineProperty(newObj, key, desc);\n } else {\n newObj[key] = obj[key];\n }\n }\n }\n newObj.default = obj;\n if (cache) {\n cache.set(obj, newObj);\n }\n return newObj;\n}\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for(i = 0; i < sourceKeys.length; i++){\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}\nvar ScriptCache = new Map();\nvar LoadCache = new Set();\nvar ignoreProps = [\n \"onLoad\",\n \"dangerouslySetInnerHTML\",\n \"children\",\n \"onError\",\n \"strategy\", \n];\nvar loadScript = function(props) {\n var src = props.src, id = props.id, _onLoad = props.onLoad, onLoad = _onLoad === void 0 ? function() {} : _onLoad, dangerouslySetInnerHTML = props.dangerouslySetInnerHTML, _children = props.children, children = _children === void 0 ? \"\" : _children, _strategy = props.strategy, strategy = _strategy === void 0 ? \"afterInteractive\" : _strategy, onError = props.onError;\n var cacheKey = id || src;\n // Script has already loaded\n if (cacheKey && LoadCache.has(cacheKey)) {\n return;\n }\n // Contents of this script are already loading/loaded\n if (ScriptCache.has(src)) {\n LoadCache.add(cacheKey);\n // Execute onLoad since the script loading has begun\n ScriptCache.get(src).then(onLoad, onError);\n return;\n }\n var el = document.createElement(\"script\");\n var loadPromise = new Promise(function(resolve, reject) {\n el.addEventListener(\"load\", function(e) {\n resolve();\n if (onLoad) {\n onLoad.call(this, e);\n }\n });\n el.addEventListener(\"error\", function(e) {\n reject(e);\n });\n }).catch(function(e) {\n if (onError) {\n onError(e);\n }\n });\n if (src) {\n ScriptCache.set(src, loadPromise);\n }\n LoadCache.add(cacheKey);\n if (dangerouslySetInnerHTML) {\n el.innerHTML = dangerouslySetInnerHTML.__html || \"\";\n } else if (children) {\n el.textContent = typeof children === \"string\" ? children : Array.isArray(children) ? children.join(\"\") : \"\";\n } else if (src) {\n el.src = src;\n }\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;\n try {\n for(var _iterator = Object.entries(props)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){\n var _value = _slicedToArray(_step.value, 2), k = _value[0], value = _value[1];\n if (value === undefined || ignoreProps.includes(k)) {\n continue;\n }\n var attr = _headManager.DOMAttributeNames[k] || k.toLowerCase();\n el.setAttribute(attr, value);\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally{\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally{\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n if (strategy === \"worker\") {\n el.setAttribute(\"type\", \"text/partytown\");\n }\n el.setAttribute(\"data-nscript\", strategy);\n document.body.appendChild(el);\n};\nfunction handleClientScriptLoad(props) {\n var _strategy = props.strategy, strategy = _strategy === void 0 ? \"afterInteractive\" : _strategy;\n if (strategy === \"lazyOnload\") {\n window.addEventListener(\"load\", function() {\n (0, _requestIdleCallback).requestIdleCallback(function() {\n return loadScript(props);\n });\n });\n } else {\n loadScript(props);\n }\n}\nfunction loadLazyScript(props) {\n if (document.readyState === \"complete\") {\n (0, _requestIdleCallback).requestIdleCallback(function() {\n return loadScript(props);\n });\n } else {\n window.addEventListener(\"load\", function() {\n (0, _requestIdleCallback).requestIdleCallback(function() {\n return loadScript(props);\n });\n });\n }\n}\nfunction addBeforeInteractiveToCache() {\n var scripts = _toConsumableArray(document.querySelectorAll('[data-nscript=\"beforeInteractive\"]')).concat(_toConsumableArray(document.querySelectorAll('[data-nscript=\"beforePageRender\"]')));\n scripts.forEach(function(script) {\n var cacheKey = script.id || script.getAttribute(\"src\");\n LoadCache.add(cacheKey);\n });\n}\nfunction initScriptLoader(scriptLoaderItems) {\n scriptLoaderItems.forEach(handleClientScriptLoad);\n addBeforeInteractiveToCache();\n}\nfunction Script(props) {\n _s();\n var _src = props.src, src = _src === void 0 ? \"\" : _src, _onLoad = props.onLoad, onLoad = _onLoad === void 0 ? function() {} : _onLoad, _strategy = props.strategy, strategy = _strategy === void 0 ? \"afterInteractive\" : _strategy, onError = props.onError, restProps = _objectWithoutPropertiesLoose(props, [\n \"src\",\n \"onLoad\",\n \"strategy\",\n \"onError\"\n ]);\n // Context is available only during SSR\n var ref = (0, _react).useContext(_headManagerContext.HeadManagerContext), updateScripts = ref.updateScripts, scripts = ref.scripts, getIsSsr = ref.getIsSsr;\n (0, _react).useEffect(function() {\n if (strategy === \"afterInteractive\") {\n loadScript(props);\n } else if (strategy === \"lazyOnload\") {\n loadLazyScript(props);\n }\n }, [\n props,\n strategy\n ]);\n if (strategy === \"beforeInteractive\" || strategy === \"worker\") {\n if (updateScripts) {\n scripts[strategy] = (scripts[strategy] || []).concat([\n _extends({\n src: src,\n onLoad: onLoad,\n onError: onError\n }, restProps), \n ]);\n updateScripts(scripts);\n } else if (getIsSsr && getIsSsr()) {\n // Script has already loaded during SSR\n LoadCache.add(restProps.id || src);\n } else if (getIsSsr && !getIsSsr()) {\n loadScript(props);\n }\n }\n return null;\n}\n_s(Script, \"e8WGedLHPLUuZjHFS2+Zt0avCrA=\");\n_c = Script;\nvar _default = Script;\nexports[\"default\"] = _default;\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=script.js.map\nvar _c;\n$RefreshReg$(_c, \"Script\");\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvc2NyaXB0LmpzLmpzIiwibWFwcGluZ3MiOiJBQUFhOzs7Ozs7O0FBQ2JBLDhDQUE2QztJQUN6Q0csS0FBSyxFQUFFLElBQUk7Q0FDZCxFQUFDLENBQUM7QUFDSEQsOEJBQThCLEdBQUdFLHNCQUFzQixDQUFDO0FBQ3hERix3QkFBd0IsR0FBR0csZ0JBQWdCLENBQUM7QUFDNUNILGtCQUFlLEdBQUcsS0FBSyxDQUFDLENBQUM7QUFDekIsSUFBSUssTUFBTSxHQUFHQyx1QkFBdUIsQ0FBQ0MsbUJBQU8sQ0FBQyw2Q0FBTyxDQUFDLENBQUM7QUFDdEQsSUFBSUMsbUJBQW1CLEdBQUdELG1CQUFPLENBQUMsd0dBQW9DLENBQUM7QUFDdkUsSUFBSUUsWUFBWSxHQUFHRixtQkFBTyxDQUFDLHdFQUFnQixDQUFDO0FBQzVDLElBQUlHLG9CQUFvQixHQUFHSCxtQkFBTyxDQUFDLDBGQUF5QixDQUFDO0FBQzdELFNBQVNJLFFBQVEsR0FBRztJQUNoQkEsUUFBUSxHQUFHYixNQUFNLENBQUNjLE1BQU0sSUFBSSxTQUFTQyxNQUFNLEVBQUU7UUFDekMsSUFBSSxJQUFJQyxDQUFDLEdBQUcsQ0FBQyxFQUFFQSxDQUFDLEdBQUdDLFNBQVMsQ0FBQ0MsTUFBTSxFQUFFRixDQUFDLEVBQUUsQ0FBQztZQUNyQyxJQUFJRyxNQUFNLEdBQUdGLFNBQVMsQ0FBQ0QsQ0FBQyxDQUFDO1lBQ3pCLElBQUksS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ydHkuY2FsbChvYmosIGtleSkpIHtcbiAgICAgICAgICAgIHZhciBkZXNjID0gaGFzUHJvcGVydHlEZXNjcmlwdG9yID8gT2JqZWN0LmdldE93blByb3BlcnR5RGVzY3JpcHRvcihvYmosIGtleSkgOiBudWxsO1xuICAgICAgICAgICAgaWYgKGRlc2MgJiYgKGRlc2MuZ2V0IHx8IGRlc2Muc2V0KSkge1xuICAgICAgICAgICAgICAgIE9iamVjdC5kZWZpbmVQcm9wZXJ0eShuZXdPYmosIGtleSwgZGVzYyk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIG5ld09ialtrZXldID0gb2JqW2tleV07XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG4gICAgbmV3T2JqLmRlZmF1bHQgPSBvYmo7XG4gICAgaWYgKGNhY2hlKSB7XG4gICAgICAgIGNhY2hlLnNldChvYmosIG5ld09iaik7XG4gICAgfVxuICAgIHJldHVybiBuZXdPYmo7XG59XG5mdW5jdGlvbiBfb2JqZWN0V2l0aG91dFByb3BlcnRpZXNMb29zZShzb3VyY2UsIGV4Y2x1ZGVkKSB7XG4gICAgaWYgKHNvdXJjZSA9PSBudWxsKSByZXR1cm4ge307XG4gICAgdmFyIHRhcmdldCA9IHt9O1xuICAgIHZhciBzb3VyY2VLZXlzID0gT2JqZWN0LmtleXMoc291cmNlKTtcbiAgICB2YXIga2V5LCBpO1xuICAgIGZvcihpID0gMDsgaSA8IHNvdXJjZUtleXMubGVuZ3RoOyBpKyspe1xuICAgICAgICBrZXkgPSBzb3VyY2VLZXlzW2ldO1xuICAgICAgICBpZiAoZXhjbHVkZWQuaW5kZXhPZihrZXkpID49IDApIGNvbnRpbnVlO1xuICAgICAgICB0YXJnZXRba2V5XSA9IHNvdXJjZVtrZXldO1xuICAgIH1cbiAgICByZXR1cm4gdGFyZ2V0O1xufVxuY29uc3QgU2NyaXB0Q2FjaGUgPSBuZXcgTWFwKCk7XG5jb25zdCBMb2FkQ2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lamVjdCk9PntcbiAgICAgICAgZWwuYWRkRXZlbnRMaXN0ZW5lcignbG9hZCcsIGZ1bmN0aW9uKGUpIHtcbiAgICAgICAgICAgIHJlc29sdmUoKTtcbiAgICAgICAgICAgIGlmIChvbkxvYWQpIHtcbiAgICAgICAgICAgICAgICBvbkxvYWQuY2FsbCh0aGlzLCBlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgICAgIGVsLmFkZEV2ZW50TGlzdGVuZXIoJ2Vycm9yJywgZnVuY3Rpb24oZSkge1xuICAgICAgICAgICAgcmVqZWN0KGUpO1xuICAgICAgICB9KTtcbiAgICB9KS5jYXRjaChmdW5jdGlvbihlKSB7XG4gICAgICAgIGlmIChvbkVycm9yKSB7XG4gICAgICAgICAgICBvbkVycm9yKGUpO1xuICAgICAgICB9XG4gICAgfSk7XG4gICAgaWYgKHNyYykge1xuICAgICAgICBTY3JpcHRDYWNoZS5zZXQoc3JjLCBsb2FkUHJvbWlzZSk7XG4gICAgfVxuICAgIExvYWRDYWNoZS5hZGQoY2FjaGVLZXkpO1xuICAgIGlmIChkYW5nZXJvdXNseVNldElubmVySFRNTCkge1xuICAgICAgICBlbC5pbm5lckhUTUwgPSBkYW5nZXJvdXNseVNldElubmVySFRNTC5fX2h0bWwgfHwgJyc7XG4gICAgfSBlbHNlIGlmIChjaGlsZHJlbikge1xuICAgICAgICBlbC50ZXh0Q29udGVudCA9IHR5cGVvZiBjaGlsZHJlbiA9PT0gJ3N0cmluZycgPyBjaGlsZHJlbiA6IEFycmF5LmlzQXJyYXkoY2hpbGRyZW4pID8gY2hpbGRyZW4uam9pbignJykgOiAnJztcbiAgICB9IGVsc2UgaWYgKHNyYykge1xuICAgICAgICBlbC5zcmMgPSBzcmM7XG4gICAgfVxuICAgIGZvciAoY29uc3QgW2ssIHZhbHVlXSBvZiBPYmplY3QuZW50cmllcyhwcm9wcykpe1xuICAgICAgICBpZiAodmFsdWUgPT09IHVuZGVmaW5lZCB8fCBpZ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0IiwiYWRkRXZlbnRMaXN0ZW5lciIsImUiLCJjYXRjaCIsImlubmVySFRNTCIsIl9faHRtbCIsInRleHRDb250ZW50IiwiQXJyYXkiLCJpc0FycmF5Iiwiam9pbiIsImVudHJpZXMiLCJrIiwidW5kZWZpbmVkIiwiaW5jbHVkZXMiLCJhdHRyIiwiRE9NQXR0cmlidXRlTmFtZXMiLCJ0b0xvd2VyQ2FzZSIsInNldEF0dHJpYnV0ZSIsImJvZHkiLCJhcHBlbmRDaGlsZCIsIndpbmRvdyIsInJlcXVlc3RJZGxlQ2FsbGJhY2siLCJsb2FkTGF6eVNjcmlwdCIsInJlYWR5U3RhdGUiLCJhZGRCZWZvcmVJbnRlcmFjdGl2ZVRvQ2FjaGUiLCJzY3JpcHRzIiwicXVlcnlTZWxlY3RvckFsbCIsImZvckVhY2giLCJzY3JpcHQiLCJnZXRBdHRyaWJ1dGUiLCJzY3JpcHRMb2FkZXJJdGVtcyIsIlNjcmlwdCIsInJlc3RQcm9wcyIsInVzZUNvbnRleHQiLCJIZWFkTWFuYWdlckNvbnRleHQiLCJ1cGRhdGVTY3JpcHRzIiwiZ2V0SXNTc3IiLCJ1c2VFZmZlY3QiLCJjb25jYXQiLCJfZGVmYXVsdCIsIm1vZHVsZSJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///../node_modules/next/dist/client/script.js\n"));
/***/ }),
/***/ "../node_modules/next/dist/client/trusted-types.js":
/*!*********************************************************!*\
!*** ../node_modules/next/dist/client/trusted-types.js ***!
\*********************************************************/
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.__unsafeCreateTrustedScriptURL = __unsafeCreateTrustedScriptURL;\n/**\n * Stores the Trusted Types Policy. Starts as undefined and can be set to null\n * if Trusted Types is not supported in the browser.\n */ var policy;\n/**\n * Getter for the Trusted Types Policy. If it is undefined, it is instantiated\n * here or set to null if Trusted Types is not supported in the browser.\n */ function getPolicy() {\n if (typeof policy === \"undefined\" && \"object\" !== \"undefined\") {\n var ref;\n policy = ((ref = window.trustedTypes) == null ? void 0 : ref.createPolicy(\"nextjs\", {\n createHTML: function(input) {\n return input;\n },\n createScript: function(input) {\n return input;\n },\n createScriptURL: function(input) {\n return input;\n }\n })) || null;\n }\n return policy;\n}\nfunction __unsafeCreateTrustedScriptURL(url) {\n var ref;\n return ((ref = getPolicy()) == null ? void 0 : ref.createScriptURL(url)) || url;\n}\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=trusted-types.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jbGllbnQvdHJ1c3RlZC10eXBlcy5qcy5qcyIsIm1hcHBpbmdzIjoiQUFBYTtBQUNiQSw4Q0FBNkM7SUFDekNHLEtBQUssRUFBRSxJQUFJO0NBQ2QsRUFBQyxDQUFDO0FBQ0hELHNDQUFzQyxHQUFHRSw4QkFBOEIsQ0FBQztBQUN4RTs7O0dBR0csQ0FBQyxJQUFJQyxNQUFNO0FBQ2Q7OztHQUdHLENBQUMsU0FBU0MsU0FBUyxHQUFHO0lBQ3JCLElBQUksT0FBT0QsTUFBTSxLQUFLLFdBQVcsSUFBSSxRQUFhLEtBQUssV0FBVyxFQUFFO1FBQ2hFLElBQUlFLEdBQUc7UUFDUEYsTUFBTSxHQUFHLENBQUMsQ0FBQ0UsR0FBRyxHQUFHQyxNQUFNLENBQUNDLFlBQVksQ0FBQyxJQUFJLElBQUksR0FBRyxLQUFLLENBQUMsR0FBR0YsR0FBRyxDQUFDRyxZQUFZLENBQUMsUUFBUSxFQUFFO1lBQ2hGQyxVQUFVLEVBQUUsU0FBQ0Ms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sInJlZiIsIndpbmRvdyIsInRydXN0ZWRUeXBlcyIsImNyZWF0ZVBvbGljeSIsImNyZWF0ZUhUTUwiLCJpbnB1dCIsImNyZWF0ZVNjcmlwdCIsImNyZWF0ZVNjcmlwdFVSTCIsInVybCIsImRlZmF1bHQiLCJfX2VzTW9kdWxlIiwiYXNzaWduIiwibW9kdWxlIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///../node_modules/next/dist/client/trusted-types.js\n"));
/***/ }),
/***/ "../node_modules/next/dist/client/with-router.js":
/*!*******************************************************!*\
!*** ../node_modules/next/dist/client/with-router.js ***!
\*******************************************************/
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = withRouter;\nvar _react = _interopRequireDefault(__webpack_require__(/*! react */ \"../node_modules/react/index.js\"));\nvar _router = __webpack_require__(/*! ./router */ \"../node_modules/next/dist/client/router.js\");\nfunction withRouter(ComposedComponent) {\n var WithRouterWrapper = function WithRouterWrapper(props) {\n _s();\n return /*#__PURE__*/ _react.default.createElement(ComposedComponent, Object.assign({\n router: (0, _router).useRouter()\n }, props));\n };\n var _s = $RefreshSig$();\n _s(WithRouterWrapper, \"CeygcqajjFExIxFEzW4x/gfWEGQ=\");\n WithRouterWrapper.getInitialProps = ComposedComponent.getInitialProps;\n WithRouterWrapper.origGetInitialProps = ComposedComponent.origGetInitialProps;\n if (true) {\n var name = ComposedComponent.displayName || ComposedComponent.name || \"Unknown\";\n WithRouterWrapper.displayName = \"withRouter(\".concat(name, \")\");\n }\n return WithRouterWrapper;\n}\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=with-router.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })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Byb2Nlc3MiLCJuYW1lIiwiZGlzcGxheU5hbWUiLCJvYmoiLCJfX2VzTW9kdWxlIiwibW9kdWxlIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///../node_modules/next/dist/client/with-router.js\n"));
/***/ }),
/***/ "../node_modules/next/dist/compiled/strip-ansi/index.js":
/*!**************************************************************!*\
!*** ../node_modules/next/dist/compiled/strip-ansi/index.js ***!
\**************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("var __dirname = \"/\";\n\n(function() {\n \"use strict\";\n var e = {\n 208: function(e) {\n e.exports = function() {\n var ref = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, tmp = ref.onlyFirst, _$e = tmp === void 0 ? false : tmp;\n var r = [\n \"[\\\\u001B\\\\u009B][[\\\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\\\d\\\\/#&.:=?%@~_]+)*|[a-zA-Z\\\\d]+(?:;[-a-zA-Z\\\\d\\\\/#&.:=?%@~_]*)*)?\\\\u0007)\",\n \"(?:(?:\\\\d{1,4}(?:;\\\\d{0,4})*)?[\\\\dA-PR-TZcf-ntqry=><~]))\"\n ].join(\"|\");\n return new RegExp(r, _$e ? undefined : \"g\");\n };\n },\n 926: function(e, r, _) {\n var t = _(208);\n e.exports = function(e) {\n return typeof e === \"string\" ? e.replace(t(), \"\") : e;\n };\n }\n };\n var r = {};\n function __nccwpck_require__(_) {\n var t = r[_];\n if (t !== undefined) {\n return t.exports;\n }\n var a = r[_] = {\n exports: {}\n };\n var n = true;\n try {\n e[_](a, a.exports, __nccwpck_require__);\n n = false;\n } finally{\n if (n) delete r[_];\n }\n return a.exports;\n }\n if (typeof __nccwpck_require__ !== \"undefined\") __nccwpck_require__.ab = __dirname + \"/\";\n var _ = __nccwpck_require__(926);\n module.exports = _;\n})();\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9k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3QiOiIifQ==\n//# sourceURL=webpack-internal:///../node_modules/next/dist/compiled/strip-ansi/index.js\n"));
/***/ }),
/***/ "../node_modules/next/dist/pages/_error.js":
/*!*************************************************!*\
!*** ../node_modules/next/dist/pages/_error.js ***!
\*************************************************/
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nvar _classCallCheck = (__webpack_require__(/*! @swc/helpers/lib/_class_call_check.js */ \"../node_modules/@swc/helpers/lib/_class_call_check.js\")[\"default\"]);\nvar _createClass = (__webpack_require__(/*! @swc/helpers/lib/_create_class.js */ \"../node_modules/@swc/helpers/lib/_create_class.js\")[\"default\"]);\nvar _inherits = (__webpack_require__(/*! @swc/helpers/lib/_inherits.js */ \"../node_modules/@swc/helpers/lib/_inherits.js\")[\"default\"]);\nvar _createSuper = (__webpack_require__(/*! @swc/helpers/lib/_create_super.js */ \"../node_modules/@swc/helpers/lib/_create_super.js\")[\"default\"]);\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _react = _interopRequireDefault(__webpack_require__(/*! react */ \"../node_modules/react/index.js\"));\nvar _head = _interopRequireDefault(__webpack_require__(/*! ../shared/lib/head */ \"../node_modules/next/dist/shared/lib/head.js\"));\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\nvar statusCodes = {\n 400: \"Bad Request\",\n 404: \"This page could not be found\",\n 405: \"Method Not Allowed\",\n 500: \"Internal Server Error\"\n};\nfunction _getInitialProps(param) {\n var res = param.res, err = param.err;\n var statusCode = res && res.statusCode ? res.statusCode : err ? err.statusCode : 404;\n return {\n statusCode: statusCode\n };\n}\nvar _Component;\nvar Error = /*#__PURE__*/ function(_superClass) {\n _inherits(Error, _superClass);\n var _super = _createSuper(Error);\n function Error() {\n _classCallCheck(this, Error);\n return _super.apply(this, arguments);\n }\n _createClass(Error, [\n {\n key: \"render\",\n value: function render() {\n var _props = this.props, statusCode = _props.statusCode, _withDarkMode = _props.withDarkMode, withDarkMode = _withDarkMode === void 0 ? true : _withDarkMode;\n var title = this.props.title || statusCodes[statusCode] || \"An unexpected error has occurred\";\n return /*#__PURE__*/ _react.default.createElement(\"div\", {\n style: styles.error\n }, /*#__PURE__*/ _react.default.createElement(_head.default, null, /*#__PURE__*/ _react.default.createElement(\"title\", null, statusCode ? \"\".concat(statusCode, \": \").concat(title) : \"Application error: a client-side exception has occurred\")), /*#__PURE__*/ _react.default.createElement(\"div\", null, /*#__PURE__*/ _react.default.createElement(\"style\", {\n dangerouslySetInnerHTML: {\n __html: \"\\n body { margin: 0; color: #000; background: #fff; }\\n .next-error-h1 {\\n border-right: 1px solid rgba(0, 0, 0, .3);\\n }\\n \\n \".concat(withDarkMode ? \"@media (prefers-color-scheme: dark) {\\n body { color: #fff; background: #000; }\\n .next-error-h1 {\\n border-right: 1px solid rgba(255, 255, 255, .3);\\n }\\n }\" : \"\")\n }\n }), statusCode ? /*#__PURE__*/ _react.default.createElement(\"h1\", {\n className: \"next-error-h1\",\n style: styles.h1\n }, statusCode) : null, /*#__PURE__*/ _react.default.createElement(\"div\", {\n style: styles.desc\n }, /*#__PURE__*/ _react.default.createElement(\"h2\", {\n style: styles.h2\n }, this.props.title || statusCode ? title : /*#__PURE__*/ _react.default.createElement(_react.default.Fragment, null, \"Application error: a client-side exception has occurred (see the browser console for more information)\"), \".\"))));\n }\n }\n ]);\n return Error;\n}(_Component = _react.default.Component);\nError.displayName = \"ErrorPage\";\nError.getInitialProps = _getInitialProps;\nError.origGetInitialProps = _getInitialProps;\nvar styles = {\n error: {\n fontFamily: '-apple-system, BlinkMacSystemFont, Roboto, \"Segoe UI\", \"Fira Sans\", Avenir, \"Helvetica Neue\", \"Lucida Grande\", sans-serif',\n height: \"100vh\",\n textAlign: \"center\",\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"center\",\n justifyContent: \"center\"\n },\n desc: {\n display: \"inline-block\",\n textAlign: \"left\",\n lineHeight: \"49px\",\n height: \"49px\",\n verticalAlign: \"middle\"\n },\n h1: {\n display: \"inline-block\",\n margin: 0,\n marginRight: \"20px\",\n padding: \"10px 23px 10px 0\",\n fontSize: \"24px\",\n fontWeight: 500,\n verticalAlign: \"top\"\n },\n h2: {\n fontSize: \"14px\",\n fontWeight: \"normal\",\n lineHeight: \"inherit\",\n margin: 0,\n padding: 0\n }\n};\nexports[\"default\"] = Error; //# sourceMappingURL=_error.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9wYWdlcy9fZXJyb3IuanMuanMiLCJtYXBwaW5ncyI6IkFBQWE7Ozs7Ozs7O0FBQ2JBLDhDQUE2QztJQUN6Q0csS0FBSyxFQUFFLElBQUk7Q0FDZCxFQUFDLENBQUM7QUFDSEQsa0JBQWUsR0FBRyxLQUFLLENBQUMsQ0FBQztBQUN6QixJQUFJRyxNQUFNLEdBQUdDLHNCQUFzQixDQUFDQyxtQkFBTyxDQUFDLDZDQUFPLENBQUMsQ0FBQztBQUNyRCxJQUFJQyxLQUFLLEdBQUdGLHNCQUFzQixDQUFDQyxtQkFBTyxDQUFDLHdFQUFvQixDQUFDLENBQUM7QUFDakUsU0FBU0Qsc0JBQXNCLENBQUNHLEdBQUcsRUFBRTtJQUNqQyxPQUFPQSxHQUFHLElBQUlBLEdBQUcsQ0FBQ0MsVUFBVSxHQUFHRCxHQUFHLEdBQUc7UUFDakNMLE9BQU8sRUFBRUssR0FBRztLQUNmLENBQUM7Q0FDTDtBQUNELElBQU1FLFdBQVcsR0FBRztBQUNoQixPQUFHLEVBQUUsYUFBYTtBQUNsQixPQUFHLEVBQUUsOEJBQThCO0FBQ25DLE9BQUcsRUFBRSxvQkFBb0I7QUFDekIsT0FBRyxFQUFFLHVCQUF1QjtDQUMvQjtBQUNELFNBQVNDLGdCQUFnQixDQUFDLEtBQWMsRUFBRT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wdGlvbiBoYXMgb2NjdXJyZWQnKSksIC8qI19fUFVSRV9fKi8gX3JlYWN0LmRlZmF1bHQuY3JlYXRlRWxlbWVudChcImRpdlwiLCBudWxsLCAvKiNfX1BVUkVfXyovIF9yZWFjdC5kZWZhdWx0LmNyZWF0ZUVsZW1lbnQoXCJzdHlsZVwiLCB7XG4gICAgICAgICAgICBkYW5nZXJvdXNseVNldElubmVySFRNTDoge1xuICAgICAgICAgICAgICAgIF9faHRtbDogYFxuICAgICAgICAgICAgICAgIGJvZHkgeyBtYXJnaW46IDA7IGNvbG9yOiAjMDAwOyBiYWNrZ3JvdW5kOiAjZmZmOyB9XG4gICAgICAgICAgICAgICAgLm5leHQtZXJyb3ItaDEge1xuICAgICAgICAgICAgICAgICAgYm9yZGVyLXJpZ2h0OiAxcHggc29saWQgcmdiYSgwLCAwLCAwLCAuMyk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgICR7d2l0aERhcmtNb2RlID8gYEBtZWRpYSAocHJlZmVycy1jb2xvci1zY2hlbWU6IGRhcmspIHtcbiAgICAgICAgICAgICAgICAgIGJvZHkgeyBjb2xvcjogI2ZmZjsgYmFja2dyb3VuZDogIzAwMDsgfVxuICAgICAgICAgICAgICAgICAgLm5leHQtZXJyb3ItaDEge1xuICAgICAgICAgICAgICAgICAgICBib3JkZXItcmlnaHQ6IDFweCBzb2xpZCByZ2JhKDI1NSwgMjU1LCAyNTUsIC4zKTtcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9YCA6ICcnfWBcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSksIHN0YXR1c0NvZGUgPyAvKiNfX1BVUkVfXyovIF9yZWFjdC5kZWZhdWx0LmNyZWF0ZUVsZW1lbnQoXCJoMVwiLCB7XG4gICAgICAgICAgICBjbGFzc05hbWU6IFwibmV4dC1lcnJvci1oMVwiLFxuICAgICAgICAgICAgc3R5bGU6IHN0eWxlcy5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iX2ludGVyb3BSZXF1aXJlRGVmYXVsdCIsInJlcXVpcmUiLCJfaGVhZCIsIm9iaiIsIl9fZXNNb2R1bGUiLCJzdGF0dXNDb2RlcyIsIl9nZXRJbml0aWFsUHJvcHMiLCJyZXMiLCJlcnIiLCJzdGF0dXNDb2RlIiwiX0NvbXBvbmVudCIsIkVycm9yIiwicmVuZGVyIiwicHJvcHMiLCJ3aXRoRGFya01vZGUiLCJ0aXRsZSIsImNyZWF0ZUVsZW1lbnQiLCJzdHlsZSIsInN0eWxlcyIsImVycm9yIiwiZGFuZ2Vyb3VzbHlTZXRJbm5lckhUTUwiLCJfX2h0bWwiLCJjbGFzc05hbWUiLCJoMSIsImRlc2MiLCJoMiIsIkZyYWdtZW50IiwiQ29tcG9uZW50IiwiZGlzcGxheU5hbWUiLCJnZXRJbml0aWFsUHJvcHMiLCJvcmlnR2V0SW5pdGlhbFByb3BzIiwiZm9udEZhbWlseSIsImhlaWdodCIsInRleHRBbGlnbiIsImRpc3BsYXkiLCJmbGV4RGlyZWN0aW9uIiwiYWxpZ25JdGVtcyIsImp1c3RpZnlDb250ZW50IiwibGluZUhlaWdodCIsInZlcnRpY2FsQWxpZ24iLCJtYXJnaW4iLCJtYXJnaW5SaWdodCIsInBhZGRpbmciLCJmb250U2l6ZSIsImZvbnRXZWlnaHQiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///../node_modules/next/dist/pages/_error.js\n"));
/***/ }),
/***/ "../node_modules/next/dist/shared/lib/amp-context.js":
/*!***********************************************************!*\
!*** ../node_modules/next/dist/shared/lib/amp-context.js ***!
\***********************************************************/
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.AmpStateContext = void 0;\nvar _react = _interopRequireDefault(__webpack_require__(/*! react */ \"../node_modules/react/index.js\"));\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\nvar AmpStateContext = _react.default.createContext({});\nexports.AmpStateContext = AmpStateContext;\nif (true) {\n AmpStateContext.displayName = \"AmpStateContext\";\n} //# sourceMappingURL=amp-context.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9zaGFyZWQvbGliL2FtcC1jb250ZXh0LmpzLmpzIiwibWFwcGluZ3MiOiJBQUFhO0FBQ2JBLDhDQUE2QztJQUN6Q0csS0FBSyxFQUFFLElBQUk7Q0FDZCxFQUFDLENBQUM7QUFDSEQsdUJBQXVCLEdBQUcsS0FBSyxDQUFDLENBQUM7QUFDakMsSUFBSUcsTUFBTSxHQUFHQyxzQkFBc0IsQ0FBQ0MsbUJBQU8sQ0FBQyw2Q0FBTyxDQUFDLENBQUM7QUFDckQsU0FBU0Qsc0JBQXNCLENBQUNFLEdBQUcsRUFBRTtJQUNqQyxPQUFPQSxHQUFHLElBQUlBLEdBQUcsQ0FBQ0MsVUFBVSxHQUFHRCxHQUFHLEdBQUc7UUFDakNFLE9BQU8sRUFBRUYsR0FBRztLQUNmLENBQUM7Q0FDTDtBQUNELElBQU1KLGVBQWUsR0FBR0MsTUFBTSxDQUFDSyxPQUFPLENBQUNDLGFBQWEsQ0FBQyxFQUFFLENBQUM7QUFDeERULHVCQUF1QixHQUFHRSxlQUFlLENBQUM7QUFDMUMsSUFBSVEsSUFBcUMsRUFBRTtJQUN2Q1IsZUFBZSxDQUFDUyxXQUFXLEdBQUcsaUJBQWlCLENBQUM7Q0FDbkQsQ0FFRCx1Q0FBdUMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9fTl9FLy4uL25vZGVfbW9kdWxlcy9uZXh0L2Rpc3Qvc2hhcmVkL2xpYi9hbXAtY29udGV4dC5qcz83MGQ5Il0sInNvdXJjZXNDb250ZW50IjpbIlwidXNlIHN0cmljdFwiO1xuT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsIFwiX19lc01vZHVsZVwiLCB7XG4gICAgdmFsdWU6IHRydWVcbn0pO1xuZXhwb3J0cy5BbXBTdGF0ZUNvbnRleHQgPSB2b2lkIDA7XG52YXIgX3JlYWN0ID0gX2ludGVyb3BSZXF1aXJlRGVmYXVsdChyZXF1aXJlKFwicmVhY3RcIikpO1xuZnVuY3Rpb24gX2ludGVyb3BSZXF1aXJlRGVmYXVsdChvYmopIHtcbiAgICByZXR1cm4gb2JqICYmIG9iai5fX2VzTW9kdWxlID8gb2JqIDoge1xuICAgICAgICBkZWZhdWx0OiBvYmpcbiAgICB9O1xufVxuY29uc3QgQW1wU3RhdGVDb250ZXh0ID0gX3JlYWN0LmRlZmF1bHQuY3JlYXRlQ29udGV4dCh7fSk7XG5leHBvcnRzLkFtcFN0YXRlQ29udGV4dCA9IEFtcFN0YXRlQ29udGV4dDtcbmlmIChwcm9jZXNzLmVudi5OT0RFX0VOViAhPT0gJ3Byb2R1Y3Rpb24nKSB7XG4gICAgQW1wU3RhdGVDb250ZXh0LmRpc3BsYXlOYW1lID0gJ0FtcFN0YXRlQ29udGV4dCc7XG59XG5cbi8vIyBzb3VyY2VNYXBwaW5nVVJMPWFtcC1jb250ZXh0LmpzLm1hcCJdLCJuYW1lcyI6WyJPYmplY3QiLCJkZWZpbmVQcm9wZXJ0eSIsImV4cG9ydHMiLCJ2YWx1ZSIsIkFtcFN0YXRlQ29udGV4dCIsIl9yZWFjdCIsIl9pbnRlcm9wUmVxdWlyZURlZmF1bHQiLCJyZXF1aXJlIiwib2JqIiwiX19lc01vZHVsZSIsImRlZmF1bHQiLCJjcmVhdGVDb250ZXh0IiwicHJvY2VzcyIsImRpc3BsYXlOYW1lIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///../node_modules/next/dist/shared/lib/amp-context.js\n"));
/***/ }),
/***/ "../node_modules/next/dist/shared/lib/amp-mode.js":
/*!********************************************************!*\
!*** ../node_modules/next/dist/shared/lib/amp-mode.js ***!
\********************************************************/
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.isInAmpMode = isInAmpMode;\nfunction isInAmpMode() {\n var ref = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, _ampFirst = ref.ampFirst, ampFirst = _ampFirst === void 0 ? false : _ampFirst, _hybrid = ref.hybrid, hybrid = _hybrid === void 0 ? false : _hybrid, _hasQuery = ref.hasQuery, hasQuery = _hasQuery === void 0 ? false : _hasQuery;\n return ampFirst || hybrid && hasQuery;\n} //# sourceMappingURL=amp-mode.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9zaGFyZWQvbGliL2FtcC1tb2RlLmpzLmpzIiwibWFwcGluZ3MiOiJBQUFhO0FBQ2JBLDhDQUE2QztJQUN6Q0csS0FBSyxFQUFFLElBQUk7Q0FDZCxFQUFDLENBQUM7QUFDSEQsbUJBQW1CLEdBQUdFLFdBQVcsQ0FBQztBQUNsQyxTQUFTQSxXQUFXLEdBQWdFO1FBQS9ELEdBQTZELEdBQTdELCtDQUE2RCxrQkFBRixFQUFFLGNBQTdELEdBQTZELENBQTNEQyxRQUFRLEVBQVJBLFFBQVEsMEJBQUUsS0FBSyx3QkFBakIsR0FBNkQsQ0FBekNDLE1BQU0sRUFBTkEsTUFBTSx3QkFBRSxLQUFLLHdCQUFqQyxHQUE2RCxDQUF6QkMsUUFBUSxFQUFSQSxRQUFRLDBCQUFFLEtBQUs7SUFDcEUsT0FBT0YsUUFBUSxJQUFJQyxNQUFNLElBQUlDLFFBQVEsQ0FBQztDQUN6QyxDQUVELG9DQUFvQyIsInNvdXJjZXMiOlsid2VicGFjazovL19OX0UvLi4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9zaGFyZWQvbGliL2FtcC1tb2RlLmpzPzU3YTQiXSwic291cmNlc0NvbnRlbnQiOlsiXCJ1c2Ugc3RyaWN0XCI7XG5PYmplY3QuZGVmaW5lUHJvcGVydHkoZXhwb3J0cywgXCJfX2VzTW9kdWxlXCIsIHtcbiAgICB2YWx1ZTogdHJ1ZVxufSk7XG5leHBvcnRzLmlzSW5BbXBNb2RlID0gaXNJbkFtcE1vZGU7XG5mdW5jdGlvbiBpc0luQW1wTW9kZSh7IGFtcEZpcnN0ID1mYWxzZSAsIGh5YnJpZCA9ZmFsc2UgLCBoYXNRdWVyeSA9ZmFsc2UgLCAgfSA9IHt9KSB7XG4gICAgcmV0dXJuIGFtcEZpcnN0IHx8IGh5YnJpZCAmJiBoYXNRdWVyeTtcbn1cblxuLy8jIHNvdXJjZU1hcHBpbmdVUkw9YW1wLW1vZGUuanMubWFwIl0sIm5hbWVzIjpbIk9iamVjdCIsImRlZmluZVByb3BlcnR5IiwiZXhwb3J0cyIsInZhbHVlIiwiaXNJbkFtcE1vZGUiLCJhbXBGaXJzdCIsImh5YnJpZCIsImhhc1F1ZXJ5Il0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///../node_modules/next/dist/shared/lib/amp-mode.js\n"));
/***/ }),
/***/ "../node_modules/next/dist/shared/lib/escape-regexp.js":
/*!*************************************************************!*\
!*** ../node_modules/next/dist/shared/lib/escape-regexp.js ***!
\*************************************************************/
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.escapeStringRegexp = escapeStringRegexp;\n// regexp is based on https://github.com/sindresorhus/escape-string-regexp\nvar reHasRegExp = /[|\\\\{}()[\\]^$+*?.-]/;\nvar reReplaceRegExp = /[|\\\\{}()[\\]^$+*?.-]/g;\nfunction escapeStringRegexp(str) {\n // see also: https://github.com/lodash/lodash/blob/2da024c3b4f9947a48517639de7560457cd4ec6c/escapeRegExp.js#L23\n if (reHasRegExp.test(str)) {\n return str.replace(reReplaceRegExp, \"\\\\$&\");\n }\n return str;\n} //# sourceMappingURL=escape-regexp.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\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L2VzY2FwZS1zdHJpbmctcmVnZXhwXG5jb25zdCByZUhhc1JlZ0V4cCA9IC9bfFxcXFx7fSgpW1xcXV4kKyo/Li1dLztcbmNvbnN0IHJlUmVwbGFjZVJlZ0V4cCA9IC9bfFxcXFx7fSgpW1xcXV4kKyo/Li1dL2c7XG5mdW5jdGlvbiBlc2NhcGVTdHJpbmdSZWdleHAoc3RyKSB7XG4gICAgLy8gc2VlIGFsc286IGh0dHBzOi8vZ2l0aHViLmNvbS9sb2Rhc2gvbG9kYXNoL2Jsb2IvMmRhMDI0YzNiNGY5OTQ3YTQ4NTE3NjM5ZGU3NTYwNDU3Y2Q0ZWM2Yy9lc2NhcGVSZWdFeHAuanMjTDIzXG4gICAgaWYgKHJlSGFzUmVnRXhwLnRlc3Qoc3RyKSkge1xuICAgICAgICByZXR1cm4gc3RyLnJlcGxhY2UocmVSZXBsYWNlUmVnRXhwLCAnXFxcXCQmJyk7XG4gICAgfVxuICAgIHJldHVybiBzdHI7XG59XG5cbi8vIyBzb3VyY2VNYXBwaW5nVVJMPWVzY2FwZS1yZWdleHAuanMubWFwIl0sIm5hbWVzIjpbIk9iamVjdCIsImRlZmluZVByb3BlcnR5IiwiZXhwb3J0cyIsInZhbHVlIiwiZXNjYXBlU3RyaW5nUmVnZXhwIiwicmVIYXNSZWdFeHAiLCJyZVJlcGxhY2VSZWdFeHAiLCJzdHIiLCJ0ZXN0IiwicmVwbGFjZSJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///../node_modules/next/dist/shared/lib/escape-regexp.js\n"));
/***/ }),
/***/ "../node_modules/next/dist/shared/lib/head-manager-context.js":
/*!********************************************************************!*\
!*** ../node_modules/next/dist/shared/lib/head-manager-context.js ***!
\********************************************************************/
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.HeadManagerContext = void 0;\nvar _react = _interopRequireDefault(__webpack_require__(/*! react */ \"../node_modules/react/index.js\"));\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\nvar HeadManagerContext = _react.default.createContext({});\nexports.HeadManagerContext = HeadManagerContext;\nif (true) {\n HeadManagerContext.displayName = \"HeadManagerContext\";\n} //# sourceMappingURL=head-manager-context.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9zaGFyZWQvbGliL2hlYWQtbWFuYWdlci1jb250ZXh0LmpzLmpzIiwibWFwcGluZ3MiOiJBQUFhO0FBQ2JBLDhDQUE2QztJQUN6Q0csS0FBSyxFQUFFLElBQUk7Q0FDZCxFQUFDLENBQUM7QUFDSEQsMEJBQTBCLEdBQUcsS0FBSyxDQUFDLENBQUM7QUFDcEMsSUFBSUcsTUFBTSxHQUFHQyxzQkFBc0IsQ0FBQ0MsbUJBQU8sQ0FBQyw2Q0FBTyxDQUFDLENBQUM7QUFDckQsU0FBU0Qsc0JBQXNCLENBQUNFLEdBQUcsRUFBRTtJQUNqQyxPQUFPQSxHQUFHLElBQUlBLEdBQUcsQ0FBQ0MsVUFBVSxHQUFHRCxHQUFHLEdBQUc7UUFDakNFLE9BQU8sRUFBRUYsR0FBRztLQUNmLENBQUM7Q0FDTDtBQUNELElBQU1KLGtCQUFrQixHQUFHQyxNQUFNLENBQUNLLE9BQU8sQ0FBQ0MsYUFBYSxDQUFDLEVBQUUsQ0FBQztBQUMzRFQsMEJBQTBCLEdBQUdFLGtCQUFrQixDQUFDO0FBQ2hELElBQUlRLElBQXFDLEVBQUU7SUFDdkNSLGtCQUFrQixDQUFDUyxXQUFXLEdBQUcsb0JBQW9CLENBQUM7Q0FDekQsQ0FFRCxnREFBZ0QiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9fTl9FLy4uL25vZGVfbW9kdWxlcy9uZXh0L2Rpc3Qvc2hhcmVkL2xpYi9oZWFkLW1hbmF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dXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///../node_modules/next/dist/shared/lib/head-manager-context.js\n"));
/***/ }),
/***/ "../node_modules/next/dist/shared/lib/head.js":
/*!****************************************************!*\
!*** ../node_modules/next/dist/shared/lib/head.js ***!
\****************************************************/
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nvar _s = $RefreshSig$();\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.defaultHead = defaultHead;\nexports[\"default\"] = void 0;\nvar _react = _interopRequireWildcard(__webpack_require__(/*! react */ \"../node_modules/react/index.js\"));\nvar _sideEffect = _interopRequireDefault(__webpack_require__(/*! ./side-effect */ \"../node_modules/next/dist/shared/lib/side-effect.js\"));\nvar _ampContext = __webpack_require__(/*! ./amp-context */ \"../node_modules/next/dist/shared/lib/amp-context.js\");\nvar _headManagerContext = __webpack_require__(/*! ./head-manager-context */ \"../node_modules/next/dist/shared/lib/head-manager-context.js\");\nvar _ampMode = __webpack_require__(/*! ./amp-mode */ \"../node_modules/next/dist/shared/lib/amp-mode.js\");\nvar _utils = __webpack_require__(/*! ./utils */ \"../node_modules/next/dist/shared/lib/utils.js\");\nfunction _extends() {\n _extends = Object.assign || function(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i];\n for(var key in source){\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\nfunction _getRequireWildcardCache() {\n if (typeof WeakMap !== \"function\") return null;\n var cache = new WeakMap();\n _getRequireWildcardCache = function _getRequireWildcardCache() {\n return cache;\n };\n return cache;\n}\nfunction _interopRequireWildcard(obj) {\n if (obj && obj.__esModule) {\n return obj;\n }\n if (obj === null || typeof obj !== \"object\" && typeof obj !== \"function\") {\n return {\n default: obj\n };\n }\n var cache = _getRequireWildcardCache();\n if (cache && cache.has(obj)) {\n return cache.get(obj);\n }\n var newObj = {};\n var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;\n for(var key in obj){\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;\n if (desc && (desc.get || desc.set)) {\n Object.defineProperty(newObj, key, desc);\n } else {\n newObj[key] = obj[key];\n }\n }\n }\n newObj.default = obj;\n if (cache) {\n cache.set(obj, newObj);\n }\n return newObj;\n}\nfunction defaultHead() {\n var inAmpMode = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false;\n var head = [\n /*#__PURE__*/ _react.default.createElement(\"meta\", {\n charSet: \"utf-8\"\n })\n ];\n if (!inAmpMode) {\n head.push(/*#__PURE__*/ _react.default.createElement(\"meta\", {\n name: \"viewport\",\n content: \"width=device-width\"\n }));\n }\n return head;\n}\nfunction onlyReactElement(list, child) {\n // React children can be \"string\" or \"number\" in this case we ignore them for backwards compat\n if (typeof child === \"string\" || typeof child === \"number\") {\n return list;\n }\n // Adds support for React.Fragment\n if (child.type === _react.default.Fragment) {\n return list.concat(_react.default.Children.toArray(child.props.children).reduce(function(fragmentList, fragmentChild) {\n if (typeof fragmentChild === \"string\" || typeof fragmentChild === \"number\") {\n return fragmentList;\n }\n return fragmentList.concat(fragmentChild);\n }, []));\n }\n return list.concat(child);\n}\nvar METATYPES = [\n \"name\",\n \"httpEquiv\",\n \"charSet\",\n \"itemProp\"\n];\n/*\n returns a function for filtering head child elements\n which shouldn't be duplicated, like <title/>\n Also adds support for deduplicated `key` properties\n*/ function unique() {\n var keys = new Set();\n var tags = new Set();\n var metaTypes = new Set();\n var metaCategories = {};\n return function(h) {\n var isUnique = true;\n var hasKey = false;\n if (h.key && typeof h.key !== \"number\" && h.key.indexOf(\"$\") > 0) {\n hasKey = true;\n var key = h.key.slice(h.key.indexOf(\"$\") + 1);\n if (keys.has(key)) {\n isUnique = false;\n } else {\n keys.add(key);\n }\n }\n // eslint-disable-next-line default-case\n switch(h.type){\n case \"title\":\n case \"base\":\n if (tags.has(h.type)) {\n isUnique = false;\n } else {\n tags.add(h.type);\n }\n break;\n case \"meta\":\n for(var i = 0, len = METATYPES.length; i < len; i++){\n var metatype = METATYPES[i];\n if (!h.props.hasOwnProperty(metatype)) continue;\n if (metatype === \"charSet\") {\n if (metaTypes.has(metatype)) {\n isUnique = false;\n } else {\n metaTypes.add(metatype);\n }\n } else {\n var category = h.props[metatype];\n var categories = metaCategories[metatype] || new Set();\n if ((metatype !== \"name\" || !hasKey) && categories.has(category)) {\n isUnique = false;\n } else {\n categories.add(category);\n metaCategories[metatype] = categories;\n }\n }\n }\n break;\n }\n return isUnique;\n };\n}\n/**\n *\n * @param headChildrenElements List of children of <Head>\n */ function reduceComponents(headChildrenElements, props) {\n return headChildrenElements.reduce(onlyReactElement, []).reverse().concat(defaultHead(props.inAmpMode).reverse()).filter(unique()).reverse().map(function(c, i) {\n var key = c.key || i;\n if (false) { var newProps; }\n if (false) { var srcMessage; }\n return /*#__PURE__*/ _react.default.cloneElement(c, {\n key: key\n });\n });\n}\n/**\n * This component injects elements to `<head>` of your page.\n * To avoid duplicated `tags` in `<head>` you can use the `key` property, which will make sure every tag is only rendered once.\n */ function Head(param) {\n var children = param.children;\n _s();\n var ampState = (0, _react).useContext(_ampContext.AmpStateContext);\n var headManager = (0, _react).useContext(_headManagerContext.HeadManagerContext);\n return /*#__PURE__*/ _react.default.createElement(_sideEffect.default, {\n reduceComponentsToState: reduceComponents,\n headManager: headManager,\n inAmpMode: (0, _ampMode).isInAmpMode(ampState)\n }, children);\n}\n_s(Head, \"sCUayZmr5V93tUjujy03KdMBCec=\");\n_c = Head;\nvar _default = Head;\nexports[\"default\"] = _default;\nif ((typeof exports.default === \"function\" || typeof exports.default === \"object\" && exports.default !== null) && typeof exports.default.__esModule === \"undefined\") {\n Object.defineProperty(exports.default, \"__esModule\", {\n value: true\n });\n Object.assign(exports.default, exports);\n module.exports = exports.default;\n} //# sourceMappingURL=head.js.map\nvar _c;\n$RefreshReg$(_c, \"Head\");\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLong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dG9yID0gT2JqZWN0LmRlZmluZVByb3BlcnR5ICYmIE9iamVjdC5nZXRPd25Qcm9wZXJ0eURlc2NyaXB0b3I7XG4gICAgZm9yKHZhciBrZXkgaW4gb2JqKXtcbiAgICAgICAgaWYgKE9iamVjdC5wcm90b3R5cGUuaGFzT3duUHJvcGVydHkuY2FsbChvYmosIGtleSkpIHtcbiAgICAgICAgICAgIHZhciBkZXNjID0gaGFzUHJvcGVydHlEZXNjcmlwdG9yID8gT2JqZWN0LmdldE93blByb3BlcnR5RGVzY3JpcHRvcihvYmosIGtleSkgOiBudWxsO1xuICAgICAgICAgICAgaWYgKGRlc2MgJiYgKGRlc2MuZ2V0IHx8IGRlc2Muc2V0KSkge1xuICAgICAgICAgICAgICAgIE9iamVjdC5kZWZpbmVQcm9wZXJ0eShuZXdPYmosIGtleSwgZGVzYyk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIG5ld09ialtrZXldID0gb2JqW2tleV07XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG4gICAgbmV3T2JqLmRlZmF1bHQgPSBvYmo7XG4gICAgaWYgKGNhY2hlKSB7XG4gICAgICAgIGNhY2hlLnNldChvYmosIG5ld09iaik7XG4gICAgfVxuICAgIHJldHVybiBuZXdPYmo7XG59XG5mdW5jdGlvbiBkZWZhdWx0SGVhZChpbkFtcE1vZGUgPSBmYWxzZSkge1xuICAgIGNvbnN0IGhlYWQgPSBbXG4gICAgICAgIC8qI19fUFVSRV9fKi8gX3JlYWN0LmRlZmF1bHQuY3JlYXRlRWxlbWVudChcIm1ldGFcIiwge1xuICAgICAgICAgICAgY2hhclNldDogXCJ1dGYtOFwiXG4gICAgICAgIH0pXG4gICAgXTtcbiAgICBpZiAoIWluQW1wTW9kZSkge1xuICAgICAgICBoZWFkLnB1c2goLyojX19QVVJFX18qLyBfcmVhY3QuZGVmYXVsdC5jcmVhdGVFbGVtZW50KFwibWV0YVwiLCB7XG4gICAgICAgICA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mF1bHQtY2FzZVxuICAgICAgICBzd2l0Y2goaC50eXBlKXtcbiAgICAgICAgICAgIGNhc2UgJ3RpdGxlJzpcbiAgICAgICAgICAgIGNhc2UgJ2Jhc2UnOlxuICAgICAgICAgICAgICAgIGlmICh0YWdzLmhhcyhoLnR5cGUpKSB7XG4gICAgICAgICAgICAgICAgICAgIGlzVW5pcXVlID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgdGFncy5hZGQoaC50eXBlKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICBjYXNlICdtZXRhJzpcbiAgICAgICAgICAgICAgICBmb3IobGV0IGkgPSAwLCBsZW4gPSBNRVRBVFlQRVMubGVuZ3RoOyBpIDwgbGVuOyBpKyspe1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBtZXRhdHlwZSA9IE1FVEFUWVBFU1tpXTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFoLnByb3BzLmhhc093blByb3BlcnR5KG1ldGF0eXBlKSkgY29udGludWU7XG4gICAgICAgICAgICAgICAgICAgIGlmIChtZXRhdHlwZSA9PT0gJ2NoYXJTZXQnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAobWV0YVR5cGVzLmhhcyhtZXRhdHlwZSkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpc1VuaXF1ZSA9IGZhbHNlO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtZXRhVHlwZXMuYWRkKG1ldGF0eXBlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGNhdGVnb3J5ID0gaC5wcm9wc1ttZXRhdHlwZV07XG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBjYXRlZ29yaWVzID0gbWV0YUNhdGVnb3JpZXNbbWV0YXR5cGVdIHx8IG5ldyBTZXQoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgobWV0YXR5cGUgIT09ICduYW1lJyB8fCAhaGFzS2V5KSAmJiBjYXRlZ29yaWVzLmhhcyhjYXRlZ29yeSkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpc1VuaXF1ZSA9IGZhbHNlO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXRlZ29yaWVzLmFkZChjYXRlZ29yeSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbWV0YUNhdGVnb3JpZXNbbWV0YXR5cGVdID0gY2F0ZWdvcmllcztcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gaXNVbmlxdWU7XG4gICAgfTtcbn1cbi8qKlxuICpcbiAqIEBwYXJhbSBoZWFkQ2hpbGRyZW5FbGVtZW50cyBMaXN0IG9mIGNoaWxkcmVuIG9mIDxIZWFkPlxuICovIGZ1bmN0aW9uIHJlZHVjZUNvbXBvbmVudHMoaGVhZENoaWxkcmVuRWxlbWVudHMsIHByb3BzKSB7XG4gICAgcmV0dXJuIGhlYWRDaGlsZHJlbkVsZW1lbnRzLnJlZHVjZShvbmx5UmVhY3RFbGVtZW50LCBbXSkucmV2ZXJzZSgpLmNvbmNhdChkZWZhdWx0SGVhZChwcm9wcy5pbkFtcE1vZGUpLnJldmVyc2UoKSkuZmlsdGVyKHVuaXF1ZSgpKS5yZXZlcnNlKCkubWFwKChjLCBpKT0+e1xuICAgICAgICBjb25zdCBrZXkgPSBjLmtleSB8fCBpO1xuICAgICAgICBpZiAocHJvY2Vzcy5lbnY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WdlciIsIkhlYWRNYW5hZ2VyQ29udGV4dCIsInJlZHVjZUNvbXBvbmVudHNUb1N0YXRlIiwiaXNJbkFtcE1vZGUiLCJfZGVmYXVsdCIsIm1vZHVsZSJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///../node_modules/next/dist/shared/lib/head.js\n"));
/***/ }),
/***/ "../node_modules/next/dist/shared/lib/i18n/normalize-locale-path.js":
/*!**************************************************************************!*\
!*** ../node_modules/next/dist/shared/lib/i18n/normalize-locale-path.js ***!
\**************************************************************************/
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.normalizeLocalePath = normalizeLocalePath;\nfunction normalizeLocalePath(pathname, locales) {\n var detectedLocale;\n // first item will be empty string from splitting at first char\n var pathnameParts = pathname.split(\"/\");\n (locales || []).some(function(locale) {\n if (pathnameParts[1] && pathnameParts[1].toLowerCase() === locale.toLowerCase()) {\n detectedLocale = locale;\n pathnameParts.splice(1, 1);\n pathname = pathnameParts.join(\"/\") || \"/\";\n return true;\n }\n return false;\n });\n return {\n pathname: pathname,\n detectedLocale: detectedLocale\n };\n} //# sourceMappingURL=normalize-locale-path.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9zaGFyZWQvbGliL2kxOG4vbm9ybWFsaXplLWxvY2FsZS1wYXRoLmpzLmpzIiwibWFwcGluZ3MiOiJBQUFhO0FBQ2JBLDhDQUE2QztJQUN6Q0csS0FBSyxFQUFFLElBQUk7Q0FDZCxFQUFDLENBQUM7QUFDSEQsMkJBQTJCLEdBQUdFLG1CQUFtQixDQUFDO0FBQ2xELFNBQVNBLG1CQUFtQixDQUFDQyxRQUFRLEVBQUVDLE9BQU8sRUFBRTtJQUM1QyxJQUFJQyxjQUFjO0lBQ2xCLCtEQUErRDtJQUMvRCxJQUFN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ic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///../node_modules/next/dist/shared/lib/i18n/normalize-locale-path.js\n"));
/***/ }),
/***/ "../node_modules/next/dist/shared/lib/image-config-context.js":
/*!********************************************************************!*\
!*** ../node_modules/next/dist/shared/lib/image-config-context.js ***!
\********************************************************************/
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.ImageConfigContext = void 0;\nvar _react = _interopRequireDefault(__webpack_require__(/*! react */ \"../node_modules/react/index.js\"));\nvar _imageConfig = __webpack_require__(/*! ./image-config */ \"../node_modules/next/dist/shared/lib/image-config.js\");\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\nvar ImageConfigContext = _react.default.createContext(_imageConfig.imageConfigDefault);\nexports.ImageConfigContext = ImageConfigContext;\nif (true) {\n ImageConfigContext.displayName = \"ImageConfigContext\";\n} //# sourceMappingURL=image-config-context.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9zaGFyZWQvbGliL2ltYWdlLWNvbmZpZy1jb250ZXh0LmpzLmpzIiwibWFwcGluZ3MiOiJBQUFhO0FBQ2JBLDhDQUE2QztJQUN6Q0csS0FBSyxFQUFFLElBQUk7Q0FDZCxFQUFDLENBQUM7QUFDSEQsMEJBQTBCLEdBQUcsS0FBSyxDQUFDLENBQUM7QUFDcEMsSUFBSUcsTUFBTSxHQUFHQyxzQkFBc0IsQ0FBQ0MsbUJBQU8sQ0FBQyw2Q0FBTyxDQUFDLENBQUM7QUFDckQsSUFBSUMsWUFBWSxHQUFHRCxtQkFBTyxDQUFDLDRFQUFnQixDQUFDO0FBQzVDLFNBQVNELHNCQUFzQixDQUFDRyxHQUFHLEVBQUU7SUFDakMsT0FBT0EsR0FBRyxJQUFJQSxHQUFHLENBQUNDLF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29uZmlnRGVmYXVsdCk7XG5leHBvcnRzLkltYWdlQ29uZmlnQ29udGV4dCA9IEltYWdlQ29uZmlnQ29udGV4dDtcbmlmIChwcm9jZXNzLmVudi5OT0RFX0VOViAhPT0gJ3Byb2R1Y3Rpb24nKSB7XG4gICAgSW1hZ2VDb25maWdDb250ZXh0LmRpc3BsYXlOYW1lID0gJ0ltYWdlQ29uZmlnQ29udGV4dCc7XG59XG5cbi8vIyBzb3VyY2VNYXBwaW5nVVJMPWltYWdlLWNvbmZpZy1jb250ZXh0LmpzLm1hcCJdLCJuYW1lcyI6WyJPYmplY3QiLCJkZWZpbmVQcm9wZXJ0eSIsImV4cG9ydHMiLCJ2YWx1ZSIsIkltYWdlQ29uZmlnQ29udGV4dCIsIl9yZWFjdCIsIl9pbnRlcm9wUmVxdWlyZURlZmF1bHQiLCJyZXF1aXJlIiwiX2ltYWdlQ29uZmlnIiwib2JqIiwiX19lc01vZHVsZSIsImRlZmF1bHQiLCJjcmVhdGVDb250ZXh0IiwiaW1hZ2VDb25maWdEZWZhdWx0IiwicHJvY2VzcyIsImRpc3BsYXlOYW1lIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///../node_modules/next/dist/shared/lib/image-config-context.js\n"));
/***/ }),
/***/ "../node_modules/next/dist/shared/lib/image-config.js":
/*!************************************************************!*\
!*** ../node_modules/next/dist/shared/lib/image-config.js ***!
\************************************************************/
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.imageConfigDefault = exports.VALID_LOADERS = void 0;\nvar VALID_LOADERS = [\n \"default\",\n \"imgix\",\n \"cloudinary\",\n \"akamai\",\n \"custom\", \n];\nexports.VALID_LOADERS = VALID_LOADERS;\nvar imageConfigDefault = {\n deviceSizes: [\n 640,\n 750,\n 828,\n 1080,\n 1200,\n 1920,\n 2048,\n 3840\n ],\n imageSizes: [\n 16,\n 32,\n 48,\n 64,\n 96,\n 128,\n 256,\n 384\n ],\n path: \"/_next/image\",\n loader: \"default\",\n domains: [],\n disableStaticImages: false,\n minimumCacheTTL: 60,\n formats: [\n \"image/webp\"\n ],\n dangerouslyAllowSVG: false,\n contentSecurityPolicy: \"script-src 'none'; frame-src 'none'; sandbox;\"\n};\nexports.imageConfigDefault = imageConfigDefault; //# sourceMappingURL=image-config.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9zaGFyZWQvbGliL2ltYWdlLWNvbmZpZy5qcy5qcyIsIm1hcHBpbmdzIjoiQUFBYTtBQUNiQSw4Q0FBNkM7SUFDekNHLEtBQUssRUFBRSxJQUFJO0NBQ2QsRUFBQyxDQUFDO0FBQ0hELDBCQUEwQixHQUFHQSxxQkFBcUIsR0FBRyxLQUFLLENBQUMsQ0FBQztBQUM1RCxJQUFNRyxhQUFhLEdBQUc7SUFDbEIsU0FBUztJQUNULE9BQU87SUFDUCxZQUFZO0lBQ1osUUFBUTtJQUNSLFFBQVE7Q0FDWDtBQUNESCxxQkFBcUIsR0FBR0csYUFBYSxDQUFDO0FBQ3RDLElBQU1ELGtCQUFrQixHQUFHO0lBQ3ZCRSxXQUFXLEVBQUU7QUFDVCxXQUFHO0FBQ0gsV0FBRztBQUNILFdBQUc7QUFDSCxZQUFJO0FBQ0osWUFBSTtBQUNKLFlBQUk7QUFDSixZQUFJO0FBQ0osWUFBSTtLQUNQO0lBQ0RDLFVBQVUsRUFBRTtBQUNSLFVBQUU7QUFDRixVQUFFO0FBQ0YsVUFBRTtBQUNGLFVBQUU7QUFDRixVQUFFO0FBQ0YsV0FBRztBQUNILFdBQUc7QUFDSCxXQUFHO0tBQ047SUFDREMsSUFBSSxFQUFFLGNBQWM7SUFDcEJDLE1BQU0sRUFBRSxTQUFTO0lBQ2pCQyxPQUFPLEVBQUUsRUFBRTtJQUNYQyxtQkFBbUIsRUFBRSx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Dk2LFxuICAgICAgICAxMjgsXG4gICAgICAgIDI1NixcbiAgICAgICAgMzg0XG4gICAgXSxcbiAgICBwYXRoOiAnL19uZXh0L2ltYWdlJyxcbiAgICBsb2FkZXI6ICdkZWZhdWx0JyxcbiAgICBkb21haW5zOiBbXSxcbiAgICBkaXNhYmxlU3RhdGljSW1hZ2VzOiBmYWxzZSxcbiAgICBtaW5pbXVtQ2FjaGVUVEw6IDYwLFxuICAgIGZvcm1hdHM6IFtcbiAgICAgICAgJ2ltYWdlL3dlYnAnXG4gICAgXSxcbiAgICBkYW5nZXJvdXNseUFsbG93U1ZHOiBmYWxzZSxcbiAgICBjb250ZW50U2VjdXJpdHlQb2xpY3k6IGBzY3JpcHQtc3JjICdub25lJzsgZnJhbWUtc3JjICdub25lJzsgc2FuZGJveDtgXG59O1xuZXhwb3J0cy5pbWFnZUNvbmZpZ0RlZmF1bHQgPSBpbWFnZUNvbmZpZ0RlZmF1bHQ7XG5cbi8vIyBzb3VyY2VNYXBwaW5nVVJMPWltYWdlLWNvbmZpZy5qcy5tYXAiXSwibmFtZXMiOlsiT2JqZWN0IiwiZGVmaW5lUHJvcGVydHkiLCJleHBvcnRzIiwidmFsdWUiLCJpbWFnZUNvbmZpZ0RlZmF1bHQiLCJWQUxJRF9MT0FERVJTIiwiZGV2aWNlU2l6ZXMiLCJpbWFnZVNpemVzIiwicGF0aCIsImxvYWRlciIsImRvbWFpbnMiLCJkaXNhYmxlU3RhdGljSW1hZ2VzIiwibWluaW11bUNhY2hlVFRMIiwiZm9ybWF0cyIsImRhbmdlcm91c2x5QWxsb3dTVkciLCJjb250ZW50U2VjdXJpdHlQb2xpY3kiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///../node_modules/next/dist/shared/lib/image-config.js\n"));
/***/ }),
/***/ "../node_modules/next/dist/shared/lib/is-plain-object.js":
/*!***************************************************************!*\
!*** ../node_modules/next/dist/shared/lib/is-plain-object.js ***!
\***************************************************************/
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.getObjectClassLabel = getObjectClassLabel;\nexports.isPlainObject = isPlainObject;\nfunction getObjectClassLabel(value) {\n return Object.prototype.toString.call(value);\n}\nfunction isPlainObject(value) {\n if (getObjectClassLabel(value) !== \"[object Object]\") {\n return false;\n }\n var prototype = Object.getPrototypeOf(value);\n /**\n * this used to be previously:\n *\n * `return prototype === null || prototype === Object.prototype`\n *\n * but Edge Runtime expose Object from vm, being that kind of type-checking wrongly fail.\n *\n * It was changed to the current implementation since it's resilient to serialization.\n */ return prototype === null || prototype.hasOwnProperty(\"isPrototypeOf\");\n} //# sourceMappingURL=is-plain-object.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9zaGFyZWQvbGliL2lzLXBsYWluLW9iamVjdC5qcy5qcyIsIm1hcHBpbmdzIjoiQUFBYTtBQUNiQSw4Q0FBNkM7SUFDekNHLEtBQUssRUFBRSxJQUFJO0NBQ2QsRUFBQyxDQUFDO0FBQ0hELDJCQUEyQixHQUFHRSxtQkFBbUIsQ0FBQztBQUNsREYscUJBQXFCLEdBQUdHLGFBQWEsQ0FBQztBQUN0QyxTQUFTRCxtQkFBbUIsQ0FBQ0QsS0FBSyxFQUFFO0lBQ2hDLE9BQU9ILE1BQU0sQ0FBQ00sU0FBUyxDQUFDQyxRQUFRLENBQUNDLElBQUksQ0FBQ0wsS0FBSyxDQUFDLENBQUM7Q0FDaEQ7QUFDRCxTQUFTRSxhQUFhLENBQUNGLEtBQUssRUFBRTtJQUMxQixJQUFJQyxtQkFBbUIsQ0FBQ0QsS0FBSyxDQUFDLEtBQUssaUJBQWlCLEVBQUU7UUFDbEQsT0FBTyxLQUFLLENBQUM7S0FDaEI7SUFDRCxJQUFNRyxTQUFTLEdBQUdOLE1BQU0sQ0FBQ1MsY0FBYy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GdlIFJ1bnRpbWUgZXhwb3NlIE9iamVjdCBmcm9tIHZtLCBiZWluZyB0aGF0IGtpbmQgb2YgdHlwZS1jaGVja2luZyB3cm9uZ2x5IGZhaWwuXG4gICAqXG4gICAqIEl0IHdhcyBjaGFuZ2VkIHRvIHRoZSBjdXJyZW50IGltcGxlbWVudGF0aW9uIHNpbmNlIGl0J3MgcmVzaWxpZW50IHRvIHNlcmlhbGl6YXRpb24uXG4gICAqLyByZXR1cm4gcHJvdG90eXBlID09PSBudWxsIHx8IHByb3RvdHlwZS5oYXNPd25Qcm9wZXJ0eSgnaXNQcm90b3R5cGVPZicpO1xufVxuXG4vLyMgc291cmNlTWFwcGluZ1VSTD1pcy1wbGFpbi1vYmplY3QuanMubWFwIl0sIm5hbWVzIjpbIk9iamVjdCIsImRlZmluZVByb3BlcnR5IiwiZXhwb3J0cyIsInZhbHVlIiwiZ2V0T2JqZWN0Q2xhc3NMYWJlbCIsImlzUGxhaW5PYmplY3QiLCJwcm90b3R5cGUiLCJ0b1N0cmluZyIsImNhbGwiLCJnZXRQcm90b3R5cGVPZiIsImhhc093blByb3BlcnR5Il0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///../node_modules/next/dist/shared/lib/is-plain-object.js\n"));
/***/ }),
/***/ "../node_modules/next/dist/shared/lib/mitt.js":
/*!****************************************************!*\
!*** ../node_modules/next/dist/shared/lib/mitt.js ***!
\****************************************************/
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nvar _toConsumableArray = (__webpack_require__(/*! @swc/helpers/lib/_to_consumable_array.js */ \"../node_modules/@swc/helpers/lib/_to_consumable_array.js\")[\"default\"]);\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = mitt;\nfunction mitt() {\n var all = Object.create(null);\n return {\n on: function on(type, handler) {\n (all[type] || (all[type] = [])).push(handler);\n },\n off: function off(type, handler) {\n if (all[type]) {\n all[type].splice(all[type].indexOf(handler) >>> 0, 1);\n }\n },\n emit: function emit(type) {\n for(var _len = arguments.length, evts = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++){\n evts[_key - 1] = arguments[_key];\n }\n (all[type] || []).slice().map(function(handler) {\n handler.apply(void 0, _toConsumableArray(evts));\n });\n }\n };\n} //# sourceMappingURL=mitt.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9zaGFyZWQvbGliL21pdHQuanMuanMiLCJtYXBwaW5ncyI6IkFBQWE7Ozs7O0FBQ2JBLDhDQUE2QztJQUN6Q0csS0FBSyxFQUFFLElBQUk7Q0FDZCxFQUFDLENBQUM7QUFDSEQsa0JBQWUsR0FBR0csSUFBSSxDQUFDO0FBQ3ZCLFNBQVNBLElBQUksR0FBRztJQUNaLElBQU1DLEdBQUcsR0FBR04sTUFBTSxDQUFDTyxNQUFNLENBQUMsSUFBSSxDQUFDO0lBQy9CLE9BQU87UUFDSEMsRUFBRSxFQUFGQSxTQUFBQSxFQUFFLENBQUVDLElBQUksRUFBRUMsT0FBTyxFQUFFO1lBQ2YsQ0FBQ0osR0FBRyxDQUFDRyxJQUFJLENBQUMsSUFBSSxDQUFDSCxHQUFHLENBQUNHLElBQUksQ0FBQyxHQUFHLEVBQUUsQ0FBQyxDQUFDLENBQUNFLElBQUksQ0FBQ0QsT0FBTyxDQUFDLENBQUM7U0FDakQ7UUFDREUsR0FBRyxFQUFIQSxTQUFBQSxHQUFHLENBQUVILElBQUksRUFBRUMsT0FBTyxFQUFFO1lBQ2hCLElBQUlKLEdBQUcsQ0FBQ0csSUFBSSxDQUFDLEVBQUU7Z0JBQ1hILEdBQUcsQ0FBQ0csSUFBSSxDQUFDLENBQUNJLE1BQU0sQ0FBQ1AsR0FBRyxDQUFDRyxJQUFJLENBQUMsQ0FBQ0ssT0FBTyxDQUF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xuICAgIHJldHVybiB7XG4gICAgICAgIG9uICh0eXBlLCBoYW5kbGVyKSB7XG4gICAgICAgICAgICAoYWxsW3R5cGVdIHx8IChhbGxbdHlwZV0gPSBbXSkpLnB1c2goaGFuZGxlcik7XG4gICAgICAgIH0sXG4gICAgICAgIG9mZiAodHlwZSwgaGFuZGxlcikge1xuICAgICAgICAgICAgaWYgKGFsbFt0eXBlXSkge1xuICAgICAgICAgICAgICAgIGFsbFt0eXBlXS5zcGxpY2UoYWxsW3R5cGVdLmluZGV4T2YoaGFuZGxlcikgPj4+IDAsIDEpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICBlbWl0ICh0eXBlLCAuLi5ldnRzKSB7XG4gICAgICAgICAgICAoYWxsW3R5cGVdIHx8IFtdKS5zbGljZSgpLm1hcCgoaGFuZGxlcik9PntcbiAgICAgICAgICAgICAgICBoYW5kbGVyKC4uLmV2dHMpO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICB9O1xufVxuXG4vLyMgc291cmNlTWFwcGluZ1VSTD1taXR0LmpzLm1hcCJdLCJuYW1lcyI6WyJPYmplY3QiLCJkZWZpbmVQcm9wZXJ0eSIsImV4cG9ydHMiLCJ2YWx1ZSIsImRlZmF1bHQiLCJtaXR0IiwiYWxsIiwiY3JlYXRlIiwib24iLCJ0eXBlIiwiaGFuZGxlciIsInB1c2giLCJvZmYiLCJzcGxpY2UiLCJpbmRleE9mIiwiZW1pdCIsImV2dHMiLCJzbGljZSIsIm1hcCJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///../node_modules/next/dist/shared/lib/mitt.js\n"));
/***/ }),
/***/ "../node_modules/next/dist/shared/lib/page-path/denormalize-page-path.js":
/*!*******************************************************************************!*\
!*** ../node_modules/next/dist/shared/lib/page-path/denormalize-page-path.js ***!
\*******************************************************************************/
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.denormalizePagePath = denormalizePagePath;\nvar _utils = __webpack_require__(/*! ../router/utils */ \"../node_modules/next/dist/shared/lib/router/utils/index.js\");\nvar _normalizePathSep = __webpack_require__(/*! ./normalize-path-sep */ \"../node_modules/next/dist/shared/lib/page-path/normalize-path-sep.js\");\nfunction denormalizePagePath(page) {\n var _page = (0, _normalizePathSep).normalizePathSep(page);\n return _page.startsWith(\"/index/\") && !(0, _utils).isDynamicRoute(_page) ? _page.slice(6) : _page !== \"/index\" ? _page : \"/\";\n} //# sourceMappingURL=denormalize-page-path.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9zaGFyZWQvbGliL3BhZ2UtcGF0aC9kZW5vcm1hbGl6ZS1wYWdlLXBhdGguanMuanMiLCJtYXBwaW5ncyI6IkFBQWE7QUFDYkEsOENBQTZDO0lBQ3pDRyxLQUFLLEVBQUUsSUFBSTtDQUNkLEVBQUMsQ0FBQztBQUNIRCwyQkFBMkIsR0FBR0UsbUJBQW1CLENBQUM7QUFDbEQsSUFBSUMsTUFBTSxHQUFHQyxtQkFBTyxDQUFDLG1GQUFpQixDQUFDO0FBQ3ZDLElBQUlDLGlCQUFpQixHQUFHRCxtQkFBTyxDQUFDLGtHQUFzQixDQUFDO0FBQ3ZELFNBQVNGLG1CQUFtQixDQUFDSSxJQUFJLEVBQUU7SUFDL0IsSUFBSUMsS0FBSyxHQUFHLENBQUMsQ0FBQyxFQUFFRixpQkFBaUIsQ0FBQyxDQUFDRyxnQkFBZ0IsQ0FBQ0YsSUFBSSxDQUFDO0lBQ3pELE9BQU9DLEtBQUssQ0FBQ0UsVUFBVSxDQUFDLFNBQVMsQ0FBQyxJQUFJLENBQUMsQ0FBQyxDQUFDLEVBQUVOLE1BQU0sQ0FBQyxDQUFDTyxjQUFjLENBQUNILEtBQUssQ0FBQyxHQUFHQSxLQUFLLENBQUNJLEt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WdlUGF0aCIsIl91dGlscyIsInJlcXVpcmUiLCJfbm9ybWFsaXplUGF0aFNlcCIsInBhZ2UiLCJfcGFnZSIsIm5vcm1hbGl6ZVBhdGhTZXAiLCJzdGFydHNXaXRoIiwiaXNEeW5hbWljUm91dGUiLCJzbGljZSJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///../node_modules/next/dist/shared/lib/page-path/denormalize-page-path.js\n"));
/***/ }),
/***/ "../node_modules/next/dist/shared/lib/page-path/normalize-path-sep.js":
/*!****************************************************************************!*\
!*** ../node_modules/next/dist/shared/lib/page-path/normalize-path-sep.js ***!
\****************************************************************************/
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.normalizePathSep = normalizePathSep;\nfunction normalizePathSep(path) {\n return path.replace(/\\\\/g, \"/\");\n} //# sourceMappingURL=normalize-path-sep.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9zaGFyZWQvbGliL3BhZ2UtcGF0aC9ub3JtYWxpemUtcGF0aC1zZXAuanMuanMiLCJtYXBwaW5ncyI6IkFBQWE7QUFDYkEsOENBQTZDO0lBQ3pDRyxLQUFLLEVBQUUsSUFBSTtDQUNkLEVBQUMsQ0FBQztBQUNIRCx3QkFBd0IsR0FBR0UsZ0JBQWdCLENBQUM7QUFDNUMsU0FBU0EsZ0JBQWdCLENBQUNDLElBQUksRUFBRTtJQUM1QixPQUFPQSxJQUFJLENBQUNDLE9BQU8sUUFBUSxHQUFHLENBQUMsQ0FBQztDQUNuQyxDQUVELDhDQUE4QyIsInNvdXJjZXMiOlsid2VicGFjazovL19OX0UvLi4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9zaGFyZWQvbGliL3BhZ2UtcGF0aC9ub3JtYWxpemUtcGF0aC1zZXAuanM/NzIxNyJdLCJzb3VyY2VzQ29udGVudCI6WyJcInVzZSBzdHJpY3RcIjtcbk9iamVjdC5kZWZpbmVQcm9wZXJ0eShleHBvcnRzLCBcIl9fZXNNb2R1bGVcIiwge1xuICAgIHZhbHVlOiB0cnVlXG59KTtcbmV4cG9ydHMubm9ybWFsaXplUGF0aFNlcCA9IG5vcm1hbGl6ZVBhdGhTZXA7XG5mdW5jdGlvbiBub3JtYWxpemVQYXRoU2VwKHBhdGgpIHtcbiAgICByZXR1cm4gcGF0aC5yZXBsYWNlKC9cXFxcL2csICcvJyk7XG59XG5cbi8vIyBzb3VyY2VNYXBwaW5nVVJMPW5vcm1hbGl6ZS1wYXRoLXNlcC5qcy5tYXAiXSwibmFtZXMiOlsiT2JqZWN0IiwiZGVmaW5lUHJvcGVydHkiLCJleHBvcnRzIiwidmFsdWUiLCJub3JtYWxpemVQYXRoU2VwIiwicGF0aCIsInJlcGxhY2UiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///../node_modules/next/dist/shared/lib/page-path/normalize-path-sep.js\n"));
/***/ }),
/***/ "../node_modules/next/dist/shared/lib/router-context.js":
/*!**************************************************************!*\
!*** ../node_modules/next/dist/shared/lib/router-context.js ***!
\**************************************************************/
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.RouterContext = void 0;\nvar _react = _interopRequireDefault(__webpack_require__(/*! react */ \"../node_modules/react/index.js\"));\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\nvar RouterContext = _react.default.createContext(null);\nexports.RouterContext = RouterContext;\nif (true) {\n RouterContext.displayName = \"RouterContext\";\n} //# sourceMappingURL=router-context.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9zaGFyZWQvbGliL3JvdXRlci1jb250ZXh0Lmpz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G9iaikge1xuICAgIHJldHVybiBvYmogJiYgb2JqLl9fZXNNb2R1bGUgPyBvYmogOiB7XG4gICAgICAgIGRlZmF1bHQ6IG9ialxuICAgIH07XG59XG5jb25zdCBSb3V0ZXJDb250ZXh0ID0gX3JlYWN0LmRlZmF1bHQuY3JlYXRlQ29udGV4dChudWxsKTtcbmV4cG9ydHMuUm91dGVyQ29udGV4dCA9IFJvdXRlckNvbnRleHQ7XG5pZiAocHJvY2Vzcy5lbnYuTk9ERV9FTlYgIT09ICdwcm9kdWN0aW9uJykge1xuICAgIFJvdXRlckNvbnRleHQuZGlzcGxheU5hbWUgPSAnUm91dGVyQ29udGV4dCc7XG59XG5cbi8vIyBzb3VyY2VNYXBwaW5nVVJMPXJvdXRlci1jb250ZXh0LmpzLm1hcCJdLCJuYW1lcyI6WyJPYmplY3QiLCJkZWZpbmVQcm9wZXJ0eSIsImV4cG9ydHMiLCJ2YWx1ZSIsIlJvdXRlckNvbnRleHQiLCJfcmVhY3QiLCJfaW50ZXJvcFJlcXVpcmVEZWZhdWx0IiwicmVxdWlyZSIsIm9iaiIsIl9fZXNNb2R1bGUiLCJkZWZhdWx0IiwiY3JlYXRlQ29udGV4dCIsInByb2Nlc3MiLCJkaXNwbGF5TmFtZSJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///../node_modules/next/dist/shared/lib/router-context.js\n"));
/***/ }),
/***/ "../node_modules/next/dist/shared/lib/router/router.js":
/*!*************************************************************!*\
!*** ../node_modules/next/dist/shared/lib/router/router.js ***!
\*************************************************************/
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nvar _classCallCheck = (__webpack_require__(/*! @swc/helpers/lib/_class_call_check.js */ \"../node_modules/@swc/helpers/lib/_class_call_check.js\")[\"default\"]);\nvar _createClass = (__webpack_require__(/*! @swc/helpers/lib/_create_class.js */ \"../node_modules/@swc/helpers/lib/_create_class.js\")[\"default\"]);\nvar _interopRequireDefault = (__webpack_require__(/*! @swc/helpers/lib/_interop_require_default.js */ \"../node_modules/@swc/helpers/lib/_interop_require_default.js\")[\"default\"]);\nvar _slicedToArray = (__webpack_require__(/*! @swc/helpers/lib/_sliced_to_array.js */ \"../node_modules/@swc/helpers/lib/_sliced_to_array.js\")[\"default\"]);\nvar _cUsersGhoshOneDriveDocumentsProgamsUpscaylNodeModulesNextDistCompiledRegeneratorRuntimeRuntimeJs = /*#__PURE__*/ _interopRequireDefault(__webpack_require__(/*! ../node_modules/next/dist/compiled/regenerator-runtime/runtime.js */ \"../node_modules/next/dist/compiled/regenerator-runtime/runtime.js\"));\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.isLocalURL = isLocalURL;\nexports.interpolateAs = interpolateAs;\nexports.resolveHref = resolveHref;\nexports.createKey = createKey;\nexports[\"default\"] = void 0;\nvar _normalizeTrailingSlash = __webpack_require__(/*! ../../../client/normalize-trailing-slash */ \"../node_modules/next/dist/client/normalize-trailing-slash.js\");\nvar _removeTrailingSlash = __webpack_require__(/*! ./utils/remove-trailing-slash */ \"../node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.js\");\nvar _routeLoader = __webpack_require__(/*! ../../../client/route-loader */ \"../node_modules/next/dist/client/route-loader.js\");\nvar _script = __webpack_require__(/*! ../../../client/script */ \"../node_modules/next/dist/client/script.js\");\nvar _isError = _interopRequireWildcard(__webpack_require__(/*! ../../../lib/is-error */ \"../node_modules/next/dist/lib/is-error.js\"));\nvar _denormalizePagePath = __webpack_require__(/*! ../page-path/denormalize-page-path */ \"../node_modules/next/dist/shared/lib/page-path/denormalize-page-path.js\");\nvar _normalizeLocalePath = __webpack_require__(/*! ../i18n/normalize-locale-path */ \"../node_modules/next/dist/shared/lib/i18n/normalize-locale-path.js\");\nvar _mitt = _interopRequireDefault1(__webpack_require__(/*! ../mitt */ \"../node_modules/next/dist/shared/lib/mitt.js\"));\nvar _utils = __webpack_require__(/*! ../utils */ \"../node_modules/next/dist/shared/lib/utils.js\");\nvar _isDynamic = __webpack_require__(/*! ./utils/is-dynamic */ \"../node_modules/next/dist/shared/lib/router/utils/is-dynamic.js\");\nvar _parseRelativeUrl = __webpack_require__(/*! ./utils/parse-relative-url */ \"../node_modules/next/dist/shared/lib/router/utils/parse-relative-url.js\");\nvar _querystring = __webpack_require__(/*! ./utils/querystring */ \"../node_modules/next/dist/shared/lib/router/utils/querystring.js\");\nvar _resolveRewrites = _interopRequireDefault1(__webpack_require__(/*! ./utils/resolve-rewrites */ \"?36cb\"));\nvar _routeMatcher = __webpack_require__(/*! ./utils/route-matcher */ \"../node_modules/next/dist/shared/lib/router/utils/route-matcher.js\");\nvar _routeRegex = __webpack_require__(/*! ./utils/route-regex */ \"../node_modules/next/dist/shared/lib/router/utils/route-regex.js\");\nvar _formatUrl = __webpack_require__(/*! ./utils/format-url */ \"../node_modules/next/dist/shared/lib/router/utils/format-url.js\");\nvar _detectDomainLocale = __webpack_require__(/*! ../../../client/detect-domain-locale */ \"../node_modules/next/dist/client/detect-domain-locale.js\");\nvar _parsePath = __webpack_require__(/*! ./utils/parse-path */ \"../node_modules/next/dist/shared/lib/router/utils/parse-path.js\");\nvar _addLocale = __webpack_require__(/*! ../../../client/add-locale */ \"../node_modules/next/dist/client/add-locale.js\");\nvar _removeLocale = __webpack_require__(/*! ../../../client/remove-locale */ \"../node_modules/next/dist/client/remove-locale.js\");\nvar _removeBasePath = __webpack_require__(/*! ../../../client/remove-base-path */ \"../node_modules/next/dist/client/remove-base-path.js\");\nvar _addBasePath = __webpack_require__(/*! ../../../client/add-base-path */ \"../node_modules/next/dist/client/add-base-path.js\");\nvar _hasBasePath = __webpack_require__(/*! ../../../client/has-base-path */ \"../node_modules/next/dist/client/has-base-path.js\");\nvar _getNextPathnameInfo = __webpack_require__(/*! ./utils/get-next-pathname-info */ \"../node_modules/next/dist/shared/lib/router/utils/get-next-pathname-info.js\");\nvar _formatNextPathnameInfo = __webpack_require__(/*! ./utils/format-next-pathname-info */ \"../node_modules/next/dist/shared/lib/router/utils/format-next-pathname-info.js\");\nfunction asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nfunction _asyncToGenerator(fn) {\n return function() {\n var self1 = this, args = arguments;\n return new Promise(function(resolve, reject) {\n var gen = fn.apply(self1, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}\nfunction _extends() {\n _extends = Object.assign || function(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i];\n for(var key in source){\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}\nfunction _interopRequireDefault1(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\nfunction _getRequireWildcardCache() {\n if (typeof WeakMap !== \"function\") return null;\n var cache = new WeakMap();\n _getRequireWildcardCache = function _getRequireWildcardCache() {\n return cache;\n };\n return cache;\n}\nfunction _interopRequireWildcard(obj) {\n if (obj && obj.__esModule) {\n return obj;\n }\n if (obj === null || typeof obj !== \"object\" && typeof obj !== \"function\") {\n return {\n default: obj\n };\n }\n var cache = _getRequireWildcardCache();\n if (cache && cache.has(obj)) {\n return cache.get(obj);\n }\n var newObj = {};\n var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;\n for(var key in obj){\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;\n if (desc && (desc.get || desc.set)) {\n Object.defineProperty(newObj, key, desc);\n } else {\n newObj[key] = obj[key];\n }\n }\n }\n newObj.default = obj;\n if (cache) {\n cache.set(obj, newObj);\n }\n return newObj;\n}\nfunction buildCancellationError() {\n return Object.assign(new Error(\"Route Cancelled\"), {\n cancelled: true\n });\n}\nfunction isLocalURL(url) {\n // prevent a hydration mismatch on href for url with anchor refs\n if (!(0, _utils).isAbsoluteUrl(url)) return true;\n try {\n // absolute urls can be local if they are on the same origin\n var locationOrigin = (0, _utils).getLocationOrigin();\n var resolved = new URL(url, locationOrigin);\n return resolved.origin === locationOrigin && (0, _hasBasePath).hasBasePath(resolved.pathname);\n } catch (_) {\n return false;\n }\n}\nfunction interpolateAs(route, asPathname, query) {\n var interpolatedRoute = \"\";\n var dynamicRegex = (0, _routeRegex).getRouteRegex(route);\n var dynamicGroups = dynamicRegex.groups;\n var dynamicMatches = (asPathname !== route ? (0, _routeMatcher).getRouteMatcher(dynamicRegex)(asPathname) : \"\") || // TODO: should this take priority; also need to change in the router.\n query;\n interpolatedRoute = route;\n var params = Object.keys(dynamicGroups);\n if (!params.every(function(param) {\n var value = dynamicMatches[param] || \"\";\n var _param = dynamicGroups[param], repeat = _param.repeat, optional = _param.optional;\n // support single-level catch-all\n // TODO: more robust handling for user-error (passing `/`)\n var replaced = \"[\".concat(repeat ? \"...\" : \"\").concat(param, \"]\");\n if (optional) {\n replaced = \"\".concat(!value ? \"/\" : \"\", \"[\").concat(replaced, \"]\");\n }\n if (repeat && !Array.isArray(value)) value = [\n value\n ];\n return (optional || param in dynamicMatches) && (interpolatedRoute = interpolatedRoute.replace(replaced, repeat ? value.map(// path delimiter escaped since they are being inserted\n // into the URL and we expect URL encoded segments\n // when parsing dynamic route params\n function(segment) {\n return encodeURIComponent(segment);\n }).join(\"/\") : encodeURIComponent(value)) || \"/\");\n })) {\n interpolatedRoute = \"\" // did not satisfy all requirements\n ;\n // n.b. We ignore this error because we handle warning for this case in\n // development in the `<Link>` component directly.\n }\n return {\n params: params,\n result: interpolatedRoute\n };\n}\nfunction omit(object, keys) {\n var omitted = {};\n Object.keys(object).forEach(function(key) {\n if (!keys.includes(key)) {\n omitted[key] = object[key];\n }\n });\n return omitted;\n}\nfunction resolveHref(router, href, resolveAs) {\n // we use a dummy base url for relative urls\n var base;\n var urlAsString = typeof href === \"string\" ? href : (0, _formatUrl).formatWithValidation(href);\n // repeated slashes and backslashes in the URL are considered\n // invalid and will never match a Next.js page/file\n var urlProtoMatch = urlAsString.match(/^[a-zA-Z]{1,}:\\/\\//);\n var urlAsStringNoProto = urlProtoMatch ? urlAsString.slice(urlProtoMatch[0].length) : urlAsString;\n var urlParts = urlAsStringNoProto.split(\"?\");\n if ((urlParts[0] || \"\").match(/(\\/\\/|\\\\)/)) {\n console.error(\"Invalid href passed to next/router: \".concat(urlAsString, \", repeated forward-slashes (//) or backslashes \\\\ are not valid in the href\"));\n var normalizedUrl = (0, _utils).normalizeRepeatedSlashes(urlAsStringNoProto);\n urlAsString = (urlProtoMatch ? urlProtoMatch[0] : \"\") + normalizedUrl;\n }\n // Return because it cannot be routed by the Next.js router\n if (!isLocalURL(urlAsString)) {\n return resolveAs ? [\n urlAsString\n ] : urlAsString;\n }\n try {\n base = new URL(urlAsString.startsWith(\"#\") ? router.asPath : router.pathname, \"http://n\");\n } catch (_) {\n // fallback to / for invalid asPath values e.g. //\n base = new URL(\"/\", \"http://n\");\n }\n try {\n var finalUrl = new URL(urlAsString, base);\n finalUrl.pathname = (0, _normalizeTrailingSlash).normalizePathTrailingSlash(finalUrl.pathname);\n var interpolatedAs = \"\";\n if ((0, _isDynamic).isDynamicRoute(finalUrl.pathname) && finalUrl.searchParams && resolveAs) {\n var query = (0, _querystring).searchParamsToUrlQuery(finalUrl.searchParams);\n var ref = interpolateAs(finalUrl.pathname, finalUrl.pathname, query), result = ref.result, params = ref.params;\n if (result) {\n interpolatedAs = (0, _formatUrl).formatWithValidation({\n pathname: result,\n hash: finalUrl.hash,\n query: omit(query, params)\n });\n }\n }\n // if the origin didn't change, it means we received a relative href\n var resolvedHref = finalUrl.origin === base.origin ? finalUrl.href.slice(finalUrl.origin.length) : finalUrl.href;\n return resolveAs ? [\n resolvedHref,\n interpolatedAs || resolvedHref\n ] : resolvedHref;\n } catch (_1) {\n return resolveAs ? [\n urlAsString\n ] : urlAsString;\n }\n}\nfunction stripOrigin(url) {\n var origin = (0, _utils).getLocationOrigin();\n return url.startsWith(origin) ? url.substring(origin.length) : url;\n}\nfunction prepareUrlAs(router, url, as) {\n // If url and as provided as an object representation,\n // we'll format them into the string version here.\n var ref = _slicedToArray(resolveHref(router, url, true), 2), resolvedHref = ref[0], resolvedAs = ref[1];\n var origin = (0, _utils).getLocationOrigin();\n var hrefHadOrigin = resolvedHref.startsWith(origin);\n var asHadOrigin = resolvedAs && resolvedAs.startsWith(origin);\n resolvedHref = stripOrigin(resolvedHref);\n resolvedAs = resolvedAs ? stripOrigin(resolvedAs) : resolvedAs;\n var preparedUrl = hrefHadOrigin ? resolvedHref : (0, _addBasePath).addBasePath(resolvedHref);\n var preparedAs = as ? stripOrigin(resolveHref(router, as)) : resolvedAs || resolvedHref;\n return {\n url: preparedUrl,\n as: asHadOrigin ? preparedAs : (0, _addBasePath).addBasePath(preparedAs)\n };\n}\nfunction resolveDynamicRoute(pathname, pages) {\n var cleanPathname = (0, _removeTrailingSlash).removeTrailingSlash((0, _denormalizePagePath).denormalizePagePath(pathname));\n if (cleanPathname === \"/404\" || cleanPathname === \"/_error\") {\n return pathname;\n }\n // handle resolving href for dynamic routes\n if (!pages.includes(cleanPathname)) {\n // eslint-disable-next-line array-callback-return\n pages.some(function(page) {\n if ((0, _isDynamic).isDynamicRoute(page) && (0, _routeRegex).getRouteRegex(page).re.test(cleanPathname)) {\n pathname = page;\n return true;\n }\n });\n }\n return (0, _removeTrailingSlash).removeTrailingSlash(pathname);\n}\nvar manualScrollRestoration = false && 0;\nvar SSG_DATA_NOT_FOUND = Symbol(\"SSG_DATA_NOT_FOUND\");\nfunction fetchRetry(url, attempts, options) {\n return fetch(url, {\n // Cookies are required to be present for Next.js' SSG \"Preview Mode\".\n // Cookies may also be required for `getServerSideProps`.\n //\n // > `fetch` wont send cookies, unless you set the credentials init\n // > option.\n // https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch\n //\n // > For maximum browser compatibility when it comes to sending &\n // > receiving cookies, always supply the `credentials: 'same-origin'`\n // > option instead of relying on the default.\n // https://github.com/github/fetch#caveats\n credentials: \"same-origin\",\n method: options.method || \"GET\",\n headers: Object.assign({}, options.headers, {\n \"x-nextjs-data\": \"1\"\n })\n }).then(function(response) {\n return !response.ok && attempts > 1 && response.status >= 500 ? fetchRetry(url, attempts - 1, options) : response;\n });\n}\nvar backgroundCache = {};\nfunction fetchNextData(param) {\n var dataHref = param.dataHref, inflightCache = param.inflightCache, isPrefetch = param.isPrefetch, hasMiddleware = param.hasMiddleware, isServerRender = param.isServerRender, parseJSON = param.parseJSON, persistCache = param.persistCache, isBackground = param.isBackground, unstable_skipClientCache = param.unstable_skipClientCache;\n var ref = new URL(dataHref, window.location.href), cacheKey = ref.href;\n var ref1;\n var getData = function(params) {\n return fetchRetry(dataHref, isServerRender ? 3 : 1, {\n headers: isPrefetch ? {\n purpose: \"prefetch\"\n } : {},\n method: (ref1 = params == null ? void 0 : params.method) != null ? ref1 : \"GET\"\n }).then(function(response) {\n if (response.ok && (params == null ? void 0 : params.method) === \"HEAD\") {\n return {\n dataHref: dataHref,\n response: response,\n text: \"\",\n json: {}\n };\n }\n return response.text().then(function(text) {\n if (!response.ok) {\n /**\n * When the data response is a redirect because of a middleware\n * we do not consider it an error. The headers must bring the\n * mapped location.\n * TODO: Change the status code in the handler.\n */ if (hasMiddleware && [\n 301,\n 302,\n 307,\n 308\n ].includes(response.status)) {\n return {\n dataHref: dataHref,\n response: response,\n text: text,\n json: {}\n };\n }\n if (response.status === 404) {\n var ref;\n if ((ref = tryToParseAsJSON(text)) == null ? void 0 : ref.notFound) {\n return {\n dataHref: dataHref,\n json: {\n notFound: SSG_DATA_NOT_FOUND\n },\n response: response,\n text: text\n };\n }\n /**\n * If there is a 404 that is not for SSG we used to fail but if\n * there is a middleware we must respond with an empty object.\n * For now we will return the data when there is a middleware.\n * TODO: Update the server to success on these requests.\n */ if (hasMiddleware) {\n return {\n dataHref: dataHref,\n response: response,\n text: text,\n json: {}\n };\n }\n }\n var error = new Error(\"Failed to load static props\");\n /**\n * We should only trigger a server-side transition if this was\n * caused on a client-side transition. Otherwise, we'd get into\n * an infinite loop.\n */ if (!isServerRender) {\n (0, _routeLoader).markAssetError(error);\n }\n throw error;\n }\n return {\n dataHref: dataHref,\n json: parseJSON ? tryToParseAsJSON(text) : {},\n response: response,\n text: text\n };\n });\n }).then(function(data) {\n if (!persistCache || \"development\" !== \"production\" || 0) {\n delete inflightCache[cacheKey];\n }\n return data;\n }).catch(function(err) {\n delete inflightCache[cacheKey];\n throw err;\n });\n };\n // when skipping client cache we wait to update\n // inflight cache until successful data response\n // this allows racing click event with fetching newer data\n // without blocking navigation when stale data is available\n if (unstable_skipClientCache && persistCache) {\n return getData({}).then(function(data) {\n inflightCache[cacheKey] = Promise.resolve(data);\n return data;\n });\n }\n if (inflightCache[cacheKey] !== undefined) {\n return inflightCache[cacheKey];\n }\n return inflightCache[cacheKey] = getData(isBackground ? {\n method: \"HEAD\"\n } : {});\n}\nfunction tryToParseAsJSON(text) {\n try {\n return JSON.parse(text);\n } catch (error) {\n return {};\n }\n}\nfunction createKey() {\n return Math.random().toString(36).slice(2, 10);\n}\nfunction handleHardNavigation(param) {\n var url = param.url, router = param.router;\n // ensure we don't trigger a hard navigation to the same\n // URL as this can end up with an infinite refresh\n if (url === (0, _addBasePath).addBasePath((0, _addLocale).addLocale(router.asPath, router.locale))) {\n throw new Error(\"Invariant: attempted to hard navigate to the same URL \".concat(url, \" \").concat(location.href));\n }\n window.location.href = url;\n}\nvar getCancelledHandler = function(param) {\n var route = param.route, router = param.router;\n var cancelled = false;\n var cancel = router.clc = function() {\n cancelled = true;\n };\n var handleCancelled = function() {\n if (cancelled) {\n var error = new Error('Abort fetching component for route: \"'.concat(route, '\"'));\n error.cancelled = true;\n throw error;\n }\n if (cancel === router.clc) {\n router.clc = null;\n }\n };\n return handleCancelled;\n};\nvar Router = /*#__PURE__*/ function() {\n function Router(pathname1, query1, as1, param) {\n var initialProps = param.initialProps, pageLoader = param.pageLoader, App = param.App, wrapApp = param.wrapApp, Component = param.Component, err = param.err, subscription = param.subscription, isFallback = param.isFallback, locale = param.locale, locales = param.locales, defaultLocale = param.defaultLocale, domainLocales = param.domainLocales, isPreview = param.isPreview, isRsc = param.isRsc;\n var _this = this;\n _classCallCheck(this, Router);\n // Server Data Cache\n this.sdc = {};\n this.isFirstPopStateEvent = true;\n this._key = createKey();\n this.onPopState = function(e) {\n var isFirstPopStateEvent = _this.isFirstPopStateEvent;\n _this.isFirstPopStateEvent = false;\n var state = e.state;\n if (!state) {\n // We get state as undefined for two reasons.\n // 1. With older safari (< 8) and older chrome (< 34)\n // 2. When the URL changed with #\n //\n // In the both cases, we don't need to proceed and change the route.\n // (as it's already changed)\n // But we can simply replace the state with the new changes.\n // Actually, for (1) we don't need to nothing. But it's hard to detect that event.\n // So, doing the following for (1) does no harm.\n var pathname = _this.pathname, query = _this.query;\n _this.changeState(\"replaceState\", (0, _formatUrl).formatWithValidation({\n pathname: (0, _addBasePath).addBasePath(pathname),\n query: query\n }), (0, _utils).getURL());\n return;\n }\n // __NA is used to identify if the history entry can be handled by the app-router.\n if (state.__NA) {\n window.location.reload();\n return;\n }\n if (!state.__N) {\n return;\n }\n // Safari fires popstateevent when reopening the browser.\n if (isFirstPopStateEvent && _this.locale === state.options.locale && state.as === _this.asPath) {\n return;\n }\n var forcedScroll;\n var url = state.url, as = state.as, options = state.options, key = state.key;\n if (false) { var v; }\n _this._key = key;\n var pathname1 = (0, _parseRelativeUrl).parseRelativeUrl(url).pathname;\n // Make sure we don't re-render on initial load,\n // can be caused by navigating back from an external site\n if (_this.isSsr && as === (0, _addBasePath).addBasePath(_this.asPath) && pathname1 === (0, _addBasePath).addBasePath(_this.pathname)) {\n return;\n }\n // If the downstream application returns falsy, return.\n // They will then be responsible for handling the event.\n if (_this._bps && !_this._bps(state)) {\n return;\n }\n _this.change(\"replaceState\", url, as, Object.assign({}, options, {\n shallow: options.shallow && _this._shallow,\n locale: options.locale || _this.defaultLocale,\n // @ts-ignore internal value not exposed on types\n _h: 0\n }), forcedScroll);\n };\n // represents the current component key\n var route = (0, _removeTrailingSlash).removeTrailingSlash(pathname1);\n // set up the component cache (by route keys)\n this.components = {};\n // We should not keep the cache, if there's an error\n // Otherwise, this cause issues when when going back and\n // come again to the errored page.\n if (pathname1 !== \"/_error\") {\n this.components[route] = {\n Component: Component,\n initial: true,\n props: initialProps,\n err: err,\n __N_SSG: initialProps && initialProps.__N_SSG,\n __N_SSP: initialProps && initialProps.__N_SSP,\n __N_RSC: !!isRsc\n };\n }\n this.components[\"/_app\"] = {\n Component: App,\n styleSheets: []\n };\n // Backwards compat for Router.router.events\n // TODO: Should be remove the following major version as it was never documented\n this.events = Router.events;\n this.pageLoader = pageLoader;\n // if auto prerendered and dynamic route wait to update asPath\n // until after mount to prevent hydration mismatch\n var autoExportDynamic = (0, _isDynamic).isDynamicRoute(pathname1) && self.__NEXT_DATA__.autoExport;\n this.basePath = false || \"\";\n this.sub = subscription;\n this.clc = null;\n this._wrapApp = wrapApp;\n // make sure to ignore extra popState in safari on navigating\n // back from external site\n this.isSsr = true;\n this.isLocaleDomain = false;\n this.isReady = !!(self.__NEXT_DATA__.gssp || self.__NEXT_DATA__.gip || self.__NEXT_DATA__.appGip && !self.__NEXT_DATA__.gsp || !autoExportDynamic && !self.location.search && !false);\n if (false) {}\n this.state = {\n route: route,\n pathname: pathname1,\n query: query1,\n asPath: autoExportDynamic ? pathname1 : as1,\n isPreview: !!isPreview,\n locale: false ? 0 : undefined,\n isFallback: isFallback\n };\n this._initialMatchesMiddlewarePromise = Promise.resolve(false);\n if (true) {\n // make sure \"as\" doesn't start with double slashes or else it can\n // throw an error as it's considered invalid\n if (!as1.startsWith(\"//\")) {\n // in order for `e.state` to work on the `onpopstate` event\n // we have to register the initial route upon initialization\n var options = {\n locale: locale\n };\n var asPath = (0, _utils).getURL();\n this._initialMatchesMiddlewarePromise = matchesMiddleware({\n router: this,\n locale: locale,\n asPath: asPath\n }).then(function(matches) {\n options._shouldResolveHref = as1 !== pathname1;\n _this.changeState(\"replaceState\", matches ? asPath : (0, _formatUrl).formatWithValidation({\n pathname: (0, _addBasePath).addBasePath(pathname1),\n query: query1\n }), asPath, options);\n return matches;\n });\n }\n window.addEventListener(\"popstate\", this.onPopState);\n // enable custom scroll restoration handling when available\n // otherwise fallback to browser's default handling\n if (false) {}\n }\n }\n _createClass(Router, [\n {\n key: \"reload\",\n value: function reload() {\n window.location.reload();\n }\n },\n {\n /**\n * Go back in history\n */ key: \"back\",\n value: function back() {\n window.history.back();\n }\n },\n {\n /**\n * Performs a `pushState` with arguments\n * @param url of the route\n * @param as masks `url` for the browser\n * @param options object you can define `shallow` and other options\n */ key: \"push\",\n value: function push(url, as) {\n var options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};\n if (false) {}\n var ref;\n ref = prepareUrlAs(this, url, as), url = ref.url, as = ref.as, ref;\n return this.change(\"pushState\", url, as, options);\n }\n },\n {\n /**\n * Performs a `replaceState` with arguments\n * @param url of the route\n * @param as masks `url` for the browser\n * @param options object you can define `shallow` and other options\n */ key: \"replace\",\n value: function replace(url, as) {\n var options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};\n var ref;\n ref = prepareUrlAs(this, url, as), url = ref.url, as = ref.as, ref;\n return this.change(\"replaceState\", url, as, options);\n }\n },\n {\n key: \"change\",\n value: function change(method, url, as, options, forcedScroll) {\n var _this = this;\n return _asyncToGenerator(_cUsersGhoshOneDriveDocumentsProgamsUpscaylNodeModulesNextDistCompiledRegeneratorRuntimeRuntimeJs.default.mark(function _callee() {\n var isQueryUpdating, shouldResolveHref, nextState, isSsr, prevLocale, parsedAs, localePathResult, didNavigate, ref, detectedDomain, asNoBasePath, _shallow, shallow, _scroll, scroll, routeProps, cleanedAs, localeChange, parsed, pathname, query, pages, rewrites, ref1, ref2, resolvedAs, isMiddlewareMatch, rewritesResult, route, routeMatch, parsedAs1, asPathname, routeRegex, shouldInterpolate, interpolatedAs, missingParams, ref21, ref3, routeInfo, prefixedAs, rewriteAs, localeResult, routeRegex1, curRouteMatch, error, props, __N_SSG, __N_SSP, component, scripts, destination, parsedHref, ref4, newUrl, newAs, notFoundRoute, _route, isValidShallowRoute, _scroll1, shouldScroll, resetScroll, hashRegex;\n return _cUsersGhoshOneDriveDocumentsProgamsUpscaylNodeModulesNextDistCompiledRegeneratorRuntimeRuntimeJs.default.wrap(function _callee$(_ctx) {\n while(1)switch(_ctx.prev = _ctx.next){\n case 0:\n if (isLocalURL(url)) {\n _ctx.next = 3;\n break;\n }\n handleHardNavigation({\n url: url,\n router: _this\n });\n return _ctx.abrupt(\"return\", false);\n case 3:\n isQueryUpdating = options._h;\n shouldResolveHref = isQueryUpdating || options._shouldResolveHref || (0, _parsePath).parsePath(url).pathname === (0, _parsePath).parsePath(as).pathname;\n nextState = _extends({}, _this.state);\n // for static pages with query params in the URL we delay\n // marking the router ready until after the query is updated\n // or a navigation has occurred\n _this.isReady = true;\n isSsr = _this.isSsr;\n if (!isQueryUpdating) {\n _this.isSsr = false;\n }\n if (!(isQueryUpdating && _this.clc)) {\n _ctx.next = 11;\n break;\n }\n return _ctx.abrupt(\"return\", false);\n case 11:\n prevLocale = nextState.locale;\n if (true) {\n _ctx.next = 24;\n break;\n }\n nextState.locale = options.locale === false ? _this.defaultLocale : options.locale || nextState.locale;\n if (typeof options.locale === \"undefined\") {\n options.locale = nextState.locale;\n }\n parsedAs = (0, _parseRelativeUrl).parseRelativeUrl((0, _hasBasePath).hasBasePath(as) ? (0, _removeBasePath).removeBasePath(as) : as);\n localePathResult = (0, _normalizeLocalePath).normalizeLocalePath(parsedAs.pathname, _this.locales);\n if (localePathResult.detectedLocale) {\n nextState.locale = localePathResult.detectedLocale;\n parsedAs.pathname = (0, _addBasePath).addBasePath(parsedAs.pathname);\n as = (0, _formatUrl).formatWithValidation(parsedAs);\n url = (0, _addBasePath).addBasePath((0, _normalizeLocalePath).normalizeLocalePath((0, _hasBasePath).hasBasePath(url) ? (0, _removeBasePath).removeBasePath(url) : url, _this.locales).pathname);\n }\n didNavigate = false;\n // we need to wrap this in the env check again since regenerator runtime\n // moves this on its own due to the return\n if (false) {}\n detectedDomain = (0, _detectDomainLocale).detectDomainLocale(_this.domainLocales, undefined, nextState.locale);\n // we need to wrap this in the env check again since regenerator runtime\n // moves this on its own due to the return\n if (false) {}\n if (!didNavigate) {\n _ctx.next = 24;\n break;\n }\n return _ctx.abrupt(\"return\", new Promise(function() {}));\n case 24:\n // marking route changes as a navigation start entry\n if (_utils.ST) {\n performance.mark(\"routeChange\");\n }\n _shallow = options.shallow, shallow = _shallow === void 0 ? false : _shallow, _scroll = options.scroll, scroll = _scroll === void 0 ? true : _scroll;\n routeProps = {\n shallow: shallow\n };\n if (_this._inFlightRoute && _this.clc) {\n if (!isSsr) {\n Router.events.emit(\"routeChangeError\", buildCancellationError(), _this._inFlightRoute, routeProps);\n }\n _this.clc();\n _this.clc = null;\n }\n as = (0, _addBasePath).addBasePath((0, _addLocale).addLocale((0, _hasBasePath).hasBasePath(as) ? (0, _removeBasePath).removeBasePath(as) : as, options.locale, _this.defaultLocale));\n cleanedAs = (0, _removeLocale).removeLocale((0, _hasBasePath).hasBasePath(as) ? (0, _removeBasePath).removeBasePath(as) : as, nextState.locale);\n _this._inFlightRoute = as;\n localeChange = prevLocale !== nextState.locale;\n if (!(!isQueryUpdating && _this.onlyAHashChange(cleanedAs) && !localeChange)) {\n _ctx.next = 48;\n break;\n }\n nextState.asPath = cleanedAs;\n Router.events.emit(\"hashChangeStart\", as, routeProps);\n // TODO: do we need the resolved href when only a hash change?\n _this.changeState(method, url, as, _extends({}, options, {\n scroll: false\n }));\n if (scroll) {\n _this.scrollToHash(cleanedAs);\n }\n _ctx.prev = 37;\n _ctx.next = 40;\n return _this.set(nextState, _this.components[nextState.route], null);\n case 40:\n _ctx.next = 46;\n break;\n case 42:\n _ctx.prev = 42;\n _ctx.t0 = _ctx[\"catch\"](37);\n if ((0, _isError).default(_ctx.t0) && _ctx.t0.cancelled) {\n Router.events.emit(\"routeChangeError\", _ctx.t0, cleanedAs, routeProps);\n }\n throw _ctx.t0;\n case 46:\n Router.events.emit(\"hashChangeComplete\", as, routeProps);\n return _ctx.abrupt(\"return\", true);\n case 48:\n parsed = (0, _parseRelativeUrl).parseRelativeUrl(url);\n pathname = parsed.pathname, query = parsed.query;\n ;\n _ctx.prev = 51;\n ;\n _ctx.t1 = _slicedToArray;\n _ctx.next = 56;\n return Promise.all([\n _this.pageLoader.getPageList(),\n (0, _routeLoader).getClientBuildManifest(),\n _this.pageLoader.getMiddlewareList(), \n ]);\n case 56:\n _ctx.t2 = _ctx.sent;\n ref1 = (0, _ctx.t1)(_ctx.t2, 2);\n pages = ref1[0];\n ref2 = ref1[1], rewrites = ref2.__rewrites, ref2;\n ref1;\n _ctx.next = 67;\n break;\n case 63:\n _ctx.prev = 63;\n _ctx.t3 = _ctx[\"catch\"](51);\n // If we fail to resolve the page list or client-build manifest, we must\n // do a server-side transition:\n handleHardNavigation({\n url: as,\n router: _this\n });\n return _ctx.abrupt(\"return\", false);\n case 67:\n // If asked to change the current URL we should reload the current page\n // (not location.reload() but reload getInitialProps and other Next.js stuffs)\n // We also need to set the method = replaceState always\n // as this should not go into the history (That's how browsers work)\n // We should compare the new asPath to the current asPath, not the url\n if (!_this.urlIsNew(cleanedAs) && !localeChange) {\n method = \"replaceState\";\n }\n resolvedAs = as;\n // url and as should always be prefixed with basePath by this\n // point by either next/link or router.push/replace so strip the\n // basePath from the pathname to match the pages dir 1-to-1\n pathname = pathname ? (0, _removeTrailingSlash).removeTrailingSlash((0, _removeBasePath).removeBasePath(pathname)) : pathname;\n _ctx.next = 72;\n return matchesMiddleware({\n asPath: as,\n locale: nextState.locale,\n router: _this\n });\n case 72:\n isMiddlewareMatch = _ctx.sent;\n if (options.shallow && isMiddlewareMatch) {\n pathname = _this.pathname;\n }\n if (!(shouldResolveHref && pathname !== \"/_error\")) {\n _ctx.next = 86;\n break;\n }\n options._shouldResolveHref = true;\n if (true) {\n _ctx.next = 85;\n break;\n }\n rewritesResult = (0, _resolveRewrites).default((0, _addBasePath).addBasePath((0, _addLocale).addLocale(cleanedAs, nextState.locale), true), pages, rewrites, query, function(p) {\n return resolveDynamicRoute(p, pages);\n }, _this.locales);\n if (!rewritesResult.externalDest) {\n _ctx.next = 81;\n break;\n }\n handleHardNavigation({\n url: as,\n router: _this\n });\n return _ctx.abrupt(\"return\", true);\n case 81:\n if (!isMiddlewareMatch) {\n resolvedAs = rewritesResult.asPath;\n }\n if (rewritesResult.matchedPage && rewritesResult.resolvedHref) {\n // if this directly matches a page we need to update the href to\n // allow the correct page chunk to be loaded\n pathname = rewritesResult.resolvedHref;\n parsed.pathname = (0, _addBasePath).addBasePath(pathname);\n if (!isMiddlewareMatch) {\n url = (0, _formatUrl).formatWithValidation(parsed);\n }\n }\n _ctx.next = 86;\n break;\n case 85:\n {\n parsed.pathname = resolveDynamicRoute(pathname, pages);\n if (parsed.pathname !== pathname) {\n pathname = parsed.pathname;\n parsed.pathname = (0, _addBasePath).addBasePath(pathname);\n if (!isMiddlewareMatch) {\n url = (0, _formatUrl).formatWithValidation(parsed);\n }\n }\n }\n case 86:\n if (isLocalURL(as)) {\n _ctx.next = 91;\n break;\n }\n if (false) {}\n throw new Error('Invalid href: \"'.concat(url, '\" and as: \"').concat(as, '\", received relative href and external as') + \"\\nSee more info: https://nextjs.org/docs/messages/invalid-relative-url-external-as\");\n case 89:\n handleHardNavigation({\n url: as,\n router: _this\n });\n return _ctx.abrupt(\"return\", false);\n case 91:\n resolvedAs = (0, _removeLocale).removeLocale((0, _removeBasePath).removeBasePath(resolvedAs), nextState.locale);\n route = (0, _removeTrailingSlash).removeTrailingSlash(pathname);\n routeMatch = false;\n if (!(0, _isDynamic).isDynamicRoute(route)) {\n _ctx.next = 109;\n break;\n }\n parsedAs1 = (0, _parseRelativeUrl).parseRelativeUrl(resolvedAs);\n asPathname = parsedAs1.pathname;\n routeRegex = (0, _routeRegex).getRouteRegex(route);\n routeMatch = (0, _routeMatcher).getRouteMatcher(routeRegex)(asPathname);\n shouldInterpolate = route === asPathname;\n interpolatedAs = shouldInterpolate ? interpolateAs(route, asPathname, query) : {};\n if (!(!routeMatch || shouldInterpolate && !interpolatedAs.result)) {\n _ctx.next = 108;\n break;\n }\n missingParams = Object.keys(routeRegex.groups).filter(function(param) {\n return !query[param];\n });\n if (!(missingParams.length > 0 && !isMiddlewareMatch)) {\n _ctx.next = 106;\n break;\n }\n if (true) {\n console.warn(\"\".concat(shouldInterpolate ? \"Interpolating href\" : \"Mismatching `as` and `href`\", \" failed to manually provide \") + \"the params: \".concat(missingParams.join(\", \"), \" in the `href`'s `query`\"));\n }\n throw new Error((shouldInterpolate ? \"The provided `href` (\".concat(url, \") value is missing query values (\").concat(missingParams.join(\", \"), \") to be interpolated properly. \") : \"The provided `as` value (\".concat(asPathname, \") is incompatible with the `href` value (\").concat(route, \"). \")) + \"Read more: https://nextjs.org/docs/messages/\".concat(shouldInterpolate ? \"href-interpolation-failed\" : \"incompatible-href-as\"));\n case 106:\n _ctx.next = 109;\n break;\n case 108:\n if (shouldInterpolate) {\n as = (0, _formatUrl).formatWithValidation(Object.assign({}, parsedAs1, {\n pathname: interpolatedAs.result,\n query: omit(query, interpolatedAs.params)\n }));\n } else {\n // Merge params into `query`, overwriting any specified in search\n Object.assign(query, routeMatch);\n }\n case 109:\n if (!isQueryUpdating) {\n Router.events.emit(\"routeChangeStart\", as, routeProps);\n }\n _ctx.prev = 110;\n ;\n _ctx.next = 114;\n return _this.getRouteInfo({\n route: route,\n pathname: pathname,\n query: query,\n as: as,\n resolvedAs: resolvedAs,\n routeProps: routeProps,\n locale: nextState.locale,\n isPreview: nextState.isPreview,\n hasMiddleware: isMiddlewareMatch\n });\n case 114:\n routeInfo = _ctx.sent;\n if (\"route\" in routeInfo && isMiddlewareMatch) {\n pathname = routeInfo.route || route;\n route = pathname;\n query = Object.assign({}, routeInfo.query || {}, query);\n if (routeMatch && pathname !== parsed.pathname) {\n Object.keys(routeMatch).forEach(function(key) {\n if (routeMatch && query[key] === routeMatch[key]) {\n delete query[key];\n }\n });\n }\n if ((0, _isDynamic).isDynamicRoute(pathname)) {\n prefixedAs = routeInfo.resolvedAs || (0, _addBasePath).addBasePath((0, _addLocale).addLocale(as, nextState.locale), true);\n rewriteAs = prefixedAs;\n if ((0, _hasBasePath).hasBasePath(rewriteAs)) {\n rewriteAs = (0, _removeBasePath).removeBasePath(rewriteAs);\n }\n if (false) {}\n routeRegex1 = (0, _routeRegex).getRouteRegex(pathname);\n curRouteMatch = (0, _routeMatcher).getRouteMatcher(routeRegex1)(rewriteAs);\n if (curRouteMatch) {\n Object.assign(query, curRouteMatch);\n }\n }\n }\n if (!(\"type\" in routeInfo)) {\n _ctx.next = 123;\n break;\n }\n if (!(routeInfo.type === \"redirect-internal\")) {\n _ctx.next = 121;\n break;\n }\n return _ctx.abrupt(\"return\", _this.change(method, routeInfo.newUrl, routeInfo.newAs, options));\n case 121:\n handleHardNavigation({\n url: routeInfo.destination,\n router: _this\n });\n return _ctx.abrupt(\"return\", new Promise(function() {}));\n case 123:\n error = routeInfo.error, props = routeInfo.props, __N_SSG = routeInfo.__N_SSG, __N_SSP = routeInfo.__N_SSP;\n component = routeInfo.Component;\n if (component && component.unstable_scriptLoader) {\n scripts = [].concat(component.unstable_scriptLoader());\n scripts.forEach(function(script) {\n (0, _script).handleClientScriptLoad(script.props);\n });\n }\n if (!((__N_SSG || __N_SSP) && props)) {\n _ctx.next = 154;\n break;\n }\n if (!(props.pageProps && props.pageProps.__N_REDIRECT)) {\n _ctx.next = 137;\n break;\n }\n // Use the destination from redirect without adding locale\n options.locale = false;\n destination = props.pageProps.__N_REDIRECT;\n if (!(destination.startsWith(\"/\") && props.pageProps.__N_REDIRECT_BASE_PATH !== false)) {\n _ctx.next = 135;\n break;\n }\n parsedHref = (0, _parseRelativeUrl).parseRelativeUrl(destination);\n parsedHref.pathname = resolveDynamicRoute(parsedHref.pathname, pages);\n ref4 = prepareUrlAs(_this, destination, destination), newUrl = ref4.url, newAs = ref4.as;\n return _ctx.abrupt(\"return\", _this.change(method, newUrl, newAs, options));\n case 135:\n handleHardNavigation({\n url: destination,\n router: _this\n });\n return _ctx.abrupt(\"return\", new Promise(function() {}));\n case 137:\n nextState.isPreview = !!props.__N_PREVIEW;\n if (!(props.notFound === SSG_DATA_NOT_FOUND)) {\n _ctx.next = 154;\n break;\n }\n ;\n _ctx.prev = 140;\n _ctx.next = 143;\n return _this.fetchComponent(\"/404\");\n case 143:\n notFoundRoute = \"/404\";\n _ctx.next = 149;\n break;\n case 146:\n _ctx.prev = 146;\n _ctx.t4 = _ctx[\"catch\"](140);\n notFoundRoute = \"/_error\";\n case 149:\n _ctx.next = 151;\n return _this.getRouteInfo({\n route: notFoundRoute,\n pathname: notFoundRoute,\n query: query,\n as: as,\n resolvedAs: resolvedAs,\n routeProps: {\n shallow: false\n },\n locale: nextState.locale,\n isPreview: nextState.isPreview\n });\n case 151:\n routeInfo = _ctx.sent;\n if (!(\"type\" in routeInfo)) {\n _ctx.next = 154;\n break;\n }\n throw new Error(\"Unexpected middleware effect on /404\");\n case 154:\n Router.events.emit(\"beforeHistoryChange\", as, routeProps);\n _this.changeState(method, url, as, options);\n if (isQueryUpdating && pathname === \"/_error\" && ((ref21 = self.__NEXT_DATA__.props) == null ? void 0 : (ref3 = ref21.pageProps) == null ? void 0 : ref3.statusCode) === 500 && (props == null ? void 0 : props.pageProps)) {\n // ensure statusCode is still correct for static 500 page\n // when updating query information\n props.pageProps.statusCode = 500;\n }\n ;\n isValidShallowRoute = options.shallow && nextState.route === ((_route = routeInfo.route) != null ? _route : route);\n ;\n shouldScroll = (_scroll1 = options.scroll) != null ? _scroll1 : !isValidShallowRoute;\n resetScroll = shouldScroll ? {\n x: 0,\n y: 0\n } : null;\n _ctx.next = 164;\n return _this.set(_extends({}, nextState, {\n route: route,\n pathname: pathname,\n query: query,\n asPath: cleanedAs,\n isFallback: false\n }), routeInfo, forcedScroll != null ? forcedScroll : resetScroll).catch(function(e) {\n if (e.cancelled) error = error || e;\n else throw e;\n });\n case 164:\n if (!error) {\n _ctx.next = 167;\n break;\n }\n if (!isQueryUpdating) {\n Router.events.emit(\"routeChangeError\", error, cleanedAs, routeProps);\n }\n throw error;\n case 167:\n if (false) {}\n if (!isQueryUpdating) {\n Router.events.emit(\"routeChangeComplete\", as, routeProps);\n }\n hashRegex = /#.+$/;\n if (shouldScroll && hashRegex.test(as)) {\n _this.scrollToHash(as);\n }\n return _ctx.abrupt(\"return\", true);\n case 174:\n _ctx.prev = 174;\n _ctx.t5 = _ctx[\"catch\"](110);\n if (!((0, _isError).default(_ctx.t5) && _ctx.t5.cancelled)) {\n _ctx.next = 178;\n break;\n }\n return _ctx.abrupt(\"return\", false);\n case 178:\n throw _ctx.t5;\n case 179:\n case \"end\":\n return _ctx.stop();\n }\n }, _callee, null, [\n [\n 37,\n 42\n ],\n [\n 51,\n 63\n ],\n [\n 110,\n 174\n ],\n [\n 140,\n 146\n ]\n ]);\n }))();\n }\n },\n {\n key: \"changeState\",\n value: function changeState(method, url, as) {\n var options = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};\n if (true) {\n if (typeof window.history === \"undefined\") {\n console.error(\"Warning: window.history is not available.\");\n return;\n }\n if (typeof window.history[method] === \"undefined\") {\n console.error(\"Warning: window.history.\".concat(method, \" is not available\"));\n return;\n }\n }\n if (method !== \"pushState\" || (0, _utils).getURL() !== as) {\n this._shallow = options.shallow;\n window.history[method]({\n url: url,\n as: as,\n options: options,\n __N: true,\n key: this._key = method !== \"pushState\" ? this._key : createKey()\n }, // Passing the empty string here should be safe against future changes to the method.\n // https://developer.mozilla.org/en-US/docs/Web/API/History/replaceState\n \"\", as);\n }\n }\n },\n {\n key: \"handleRouteInfoError\",\n value: function handleRouteInfoError(err, pathname, query, as, routeProps, loadErrorFail) {\n var _this = this;\n return _asyncToGenerator(_cUsersGhoshOneDriveDocumentsProgamsUpscaylNodeModulesNextDistCompiledRegeneratorRuntimeRuntimeJs.default.mark(function _callee() {\n var Component, styleSheets, props, ref, routeInfo;\n return _cUsersGhoshOneDriveDocumentsProgamsUpscaylNodeModulesNextDistCompiledRegeneratorRuntimeRuntimeJs.default.wrap(function _callee$(_ctx) {\n while(1)switch(_ctx.prev = _ctx.next){\n case 0:\n console.error(err);\n if (!err.cancelled) {\n _ctx.next = 3;\n break;\n }\n // bubble up cancellation errors\n throw err;\n case 3:\n if (!((0, _routeLoader).isAssetError(err) || loadErrorFail)) {\n _ctx.next = 7;\n break;\n }\n Router.events.emit(\"routeChangeError\", err, as, routeProps);\n // If we can't load the page it could be one of following reasons\n // 1. Page doesn't exists\n // 2. Page does exist in a different zone\n // 3. Internal error while loading the page\n // So, doing a hard reload is the proper way to deal with this.\n handleHardNavigation({\n url: as,\n router: _this\n });\n // Changing the URL doesn't block executing the current code path.\n // So let's throw a cancellation error stop the routing logic.\n throw buildCancellationError();\n case 7:\n _ctx.prev = 7;\n ;\n ;\n ;\n if (!(typeof Component === \"undefined\" || typeof styleSheets === \"undefined\")) {\n _ctx.next = 19;\n break;\n }\n ;\n _ctx.next = 15;\n return _this.fetchComponent(\"/_error\");\n case 15:\n ref = _ctx.sent;\n Component = ref.page;\n styleSheets = ref.styleSheets;\n ref;\n case 19:\n routeInfo = {\n props: props,\n Component: Component,\n styleSheets: styleSheets,\n err: err,\n error: err\n };\n if (routeInfo.props) {\n _ctx.next = 31;\n break;\n }\n _ctx.prev = 21;\n _ctx.next = 24;\n return _this.getInitialProps(Component, {\n err: err,\n pathname: pathname,\n query: query\n });\n case 24:\n routeInfo.props = _ctx.sent;\n _ctx.next = 31;\n break;\n case 27:\n _ctx.prev = 27;\n _ctx.t0 = _ctx[\"catch\"](21);\n console.error(\"Error in error page `getInitialProps`: \", _ctx.t0);\n routeInfo.props = {};\n case 31:\n return _ctx.abrupt(\"return\", routeInfo);\n case 34:\n _ctx.prev = 34;\n _ctx.t1 = _ctx[\"catch\"](7);\n return _ctx.abrupt(\"return\", _this.handleRouteInfoError((0, _isError).default(_ctx.t1) ? _ctx.t1 : new Error(_ctx.t1 + \"\"), pathname, query, as, routeProps, true));\n case 37:\n case \"end\":\n return _ctx.stop();\n }\n }, _callee, null, [\n [\n 7,\n 34\n ],\n [\n 21,\n 27\n ]\n ]);\n }))();\n }\n },\n {\n key: \"getRouteInfo\",\n value: function getRouteInfo(param) {\n var requestedRoute = param.route, pathname = param.pathname, query = param.query, as = param.as, resolvedAs = param.resolvedAs, routeProps = param.routeProps, locale = param.locale, hasMiddleware = param.hasMiddleware, isPreview = param.isPreview, unstable_skipClientCache = param.unstable_skipClientCache;\n var _this = this;\n return _asyncToGenerator(_cUsersGhoshOneDriveDocumentsProgamsUpscaylNodeModulesNextDistCompiledRegeneratorRuntimeRuntimeJs.default.mark(function _callee() {\n var route, ref, ref4, ref5, handleCancelled, existingInfo, cachedRouteInfo, fetchNextDataParams, data, routeInfo, isValidElementType, useStreamedFlightData, shouldFetchData, props, cacheKey, flightInfo;\n return _cUsersGhoshOneDriveDocumentsProgamsUpscaylNodeModulesNextDistCompiledRegeneratorRuntimeRuntimeJs.default.wrap(function _callee$(_ctx) {\n while(1)switch(_ctx.prev = _ctx.next){\n case 0:\n route = requestedRoute;\n _ctx.prev = 1;\n ;\n handleCancelled = getCancelledHandler({\n route: route,\n router: _this\n });\n existingInfo = _this.components[route];\n if (!(routeProps.shallow && existingInfo && _this.route === route)) {\n _ctx.next = 7;\n break;\n }\n return _ctx.abrupt(\"return\", existingInfo);\n case 7:\n cachedRouteInfo = existingInfo && !(\"initial\" in existingInfo) && \"development\" !== \"development\" ? 0 : undefined;\n fetchNextDataParams = {\n dataHref: _this.pageLoader.getDataHref({\n href: (0, _formatUrl).formatWithValidation({\n pathname: pathname,\n query: query\n }),\n skipInterpolation: true,\n asPath: resolvedAs,\n locale: locale\n }),\n hasMiddleware: true,\n isServerRender: _this.isSsr,\n parseJSON: true,\n inflightCache: _this.sdc,\n persistCache: !isPreview,\n isPrefetch: false,\n unstable_skipClientCache: unstable_skipClientCache\n };\n _ctx.next = 11;\n return withMiddlewareEffects({\n fetchData: function() {\n return fetchNextData(fetchNextDataParams);\n },\n asPath: resolvedAs,\n locale: locale,\n router: _this\n });\n case 11:\n data = _ctx.sent;\n handleCancelled();\n if (!((data == null ? void 0 : (ref = data.effect) == null ? void 0 : ref.type) === \"redirect-internal\" || (data == null ? void 0 : (ref4 = data.effect) == null ? void 0 : ref4.type) === \"redirect-external\")) {\n _ctx.next = 15;\n break;\n }\n return _ctx.abrupt(\"return\", data.effect);\n case 15:\n if (!((data == null ? void 0 : (ref5 = data.effect) == null ? void 0 : ref5.type) === \"rewrite\")) {\n _ctx.next = 25;\n break;\n }\n route = (0, _removeTrailingSlash).removeTrailingSlash(data.effect.resolvedHref);\n pathname = data.effect.resolvedHref;\n query = _extends({}, query, data.effect.parsedAs.query);\n resolvedAs = data.effect.parsedAs.pathname;\n // Check again the cache with the new destination.\n existingInfo = _this.components[route];\n if (!(routeProps.shallow && existingInfo && _this.route === route && !hasMiddleware)) {\n _ctx.next = 24;\n break;\n }\n // If we have a match with the current route due to rewrite,\n // we can copy the existing information to the rewritten one.\n // Then, we return the information along with the matched route.\n _this.components[requestedRoute] = _extends({}, existingInfo, {\n route: route\n });\n return _ctx.abrupt(\"return\", _extends({}, existingInfo, {\n route: route\n }));\n case 24:\n cachedRouteInfo = existingInfo && !(\"initial\" in existingInfo) && \"development\" !== \"development\" ? 0 : undefined;\n case 25:\n if (!(route === \"/api\" || route.startsWith(\"/api/\"))) {\n _ctx.next = 28;\n break;\n }\n handleHardNavigation({\n url: as,\n router: _this\n });\n return _ctx.abrupt(\"return\", new Promise(function() {}));\n case 28:\n _ctx.t0 = cachedRouteInfo;\n if (_ctx.t0) {\n _ctx.next = 33;\n break;\n }\n _ctx.next = 32;\n return _this.fetchComponent(route).then(function(res) {\n return {\n Component: res.page,\n styleSheets: res.styleSheets,\n __N_SSG: res.mod.__N_SSG,\n __N_SSP: res.mod.__N_SSP,\n __N_RSC: !!res.mod.__next_rsc__\n };\n });\n case 32:\n _ctx.t0 = _ctx.sent;\n case 33:\n routeInfo = _ctx.t0;\n if (false) {}\n isValidElementType = (__webpack_require__(/*! next/dist/compiled/react-is */ \"../node_modules/next/dist/compiled/react-is/index.js\").isValidElementType);\n if (isValidElementType(routeInfo.Component)) {\n _ctx.next = 38;\n break;\n }\n throw new Error('The default export is not a React Component in page: \"'.concat(pathname, '\"'));\n case 38:\n useStreamedFlightData = routeInfo.__N_RSC && ( true || 0);\n shouldFetchData = routeInfo.__N_SSG || routeInfo.__N_SSP || routeInfo.__N_RSC;\n _ctx.next = 42;\n return _this._getData(_asyncToGenerator(_cUsersGhoshOneDriveDocumentsProgamsUpscaylNodeModulesNextDistCompiledRegeneratorRuntimeRuntimeJs.default.mark(function _callee() {\n var json;\n return _cUsersGhoshOneDriveDocumentsProgamsUpscaylNodeModulesNextDistCompiledRegeneratorRuntimeRuntimeJs.default.wrap(function _callee$(_ctx) {\n while(1)switch(_ctx.prev = _ctx.next){\n case 0:\n if (!(shouldFetchData && !useStreamedFlightData)) {\n _ctx.next = 8;\n break;\n }\n _ctx.t0 = data;\n if (_ctx.t0) {\n _ctx.next = 6;\n break;\n }\n _ctx.next = 5;\n return fetchNextData({\n dataHref: _this.pageLoader.getDataHref({\n href: (0, _formatUrl).formatWithValidation({\n pathname: pathname,\n query: query\n }),\n asPath: resolvedAs,\n locale: locale\n }),\n isServerRender: _this.isSsr,\n parseJSON: true,\n inflightCache: _this.sdc,\n persistCache: !isPreview,\n isPrefetch: false,\n unstable_skipClientCache: unstable_skipClientCache\n });\n case 5:\n _ctx.t0 = _ctx.sent;\n case 6:\n json = _ctx.t0.json;\n return _ctx.abrupt(\"return\", {\n props: json\n });\n case 8:\n _ctx.t1 = {};\n _ctx.next = 11;\n return _this.getInitialProps(routeInfo.Component, {\n pathname: pathname,\n query: query,\n asPath: as,\n locale: locale,\n locales: _this.locales,\n defaultLocale: _this.defaultLocale\n });\n case 11:\n _ctx.t2 = _ctx.sent;\n return _ctx.abrupt(\"return\", {\n headers: _ctx.t1,\n props: _ctx.t2\n });\n case 13:\n case \"end\":\n return _ctx.stop();\n }\n }, _callee);\n })));\n case 42:\n props = _ctx.sent.props;\n // Only bust the data cache for SSP routes although\n // middleware can skip cache per request with\n // x-middleware-cache: no-cache as well\n if (routeInfo.__N_SSP && fetchNextDataParams.dataHref) {\n cacheKey = new URL(fetchNextDataParams.dataHref, window.location.href).href;\n delete _this.sdc[cacheKey];\n }\n // we kick off a HEAD request in the background\n // when a non-prefetch request is made to signal revalidation\n if (!_this.isPreview && routeInfo.__N_SSG && \"development\" !== \"development\") {}\n ;\n if (!routeInfo.__N_RSC) {\n _ctx.next = 56;\n break;\n }\n if (!useStreamedFlightData) {\n _ctx.next = 53;\n break;\n }\n _ctx.next = 50;\n return _this._getData(function() {\n return _this._getFlightData((0, _formatUrl).formatWithValidation({\n query: _extends({}, query, {\n __flight__: \"1\"\n }),\n pathname: (0, _isDynamic).isDynamicRoute(route) ? interpolateAs(pathname, (0, _parseRelativeUrl).parseRelativeUrl(resolvedAs).pathname, query).result : pathname\n }));\n });\n case 50:\n _ctx.t1 = _ctx.sent.data;\n _ctx.next = 54;\n break;\n case 53:\n _ctx.t1 = props.__flight__;\n case 54:\n _ctx.t2 = _ctx.t1;\n flightInfo = {\n __flight__: _ctx.t2\n };\n case 56:\n props.pageProps = Object.assign({}, props.pageProps, flightInfo);\n routeInfo.props = props;\n routeInfo.route = route;\n routeInfo.query = query;\n routeInfo.resolvedAs = resolvedAs;\n _this.components[route] = routeInfo;\n // If the route was rewritten in the process of fetching data,\n // we update the cache to allow hitting the same data for shallow requests.\n if (route !== requestedRoute) {\n _this.components[requestedRoute] = _extends({}, routeInfo, {\n route: route\n });\n }\n return _ctx.abrupt(\"return\", routeInfo);\n case 66:\n _ctx.prev = 66;\n _ctx.t3 = _ctx[\"catch\"](1);\n return _ctx.abrupt(\"return\", _this.handleRouteInfoError((0, _isError).getProperError(_ctx.t3), pathname, query, as, routeProps));\n case 69:\n case \"end\":\n return _ctx.stop();\n }\n }, _callee, null, [\n [\n 1,\n 66\n ]\n ]);\n }))();\n }\n },\n {\n key: \"set\",\n value: function set(state, data, resetScroll) {\n this.state = state;\n return this.sub(data, this.components[\"/_app\"].Component, resetScroll);\n }\n },\n {\n /**\n * Callback to execute before replacing router state\n * @param cb callback to be executed\n */ key: \"beforePopState\",\n value: function beforePopState(cb) {\n this._bps = cb;\n }\n },\n {\n key: \"onlyAHashChange\",\n value: function onlyAHashChange(as) {\n if (!this.asPath) return false;\n var ref = _slicedToArray(this.asPath.split(\"#\"), 2), oldUrlNoHash = ref[0], oldHash = ref[1];\n var ref1 = _slicedToArray(as.split(\"#\"), 2), newUrlNoHash = ref1[0], newHash = ref1[1];\n // Makes sure we scroll to the provided hash if the url/hash are the same\n if (newHash && oldUrlNoHash === newUrlNoHash && oldHash === newHash) {\n return true;\n }\n // If the urls are change, there's more than a hash change\n if (oldUrlNoHash !== newUrlNoHash) {\n return false;\n }\n // If the hash has changed, then it's a hash only change.\n // This check is necessary to handle both the enter and\n // leave hash === '' cases. The identity case falls through\n // and is treated as a next reload.\n return oldHash !== newHash;\n }\n },\n {\n key: \"scrollToHash\",\n value: function scrollToHash(as) {\n var ref = _slicedToArray(as.split(\"#\"), 2), tmp = ref[1], hash = tmp === void 0 ? \"\" : tmp;\n // Scroll to top if the hash is just `#` with no value or `#top`\n // To mirror browsers\n if (hash === \"\" || hash === \"top\") {\n window.scrollTo(0, 0);\n return;\n }\n // Decode hash to make non-latin anchor works.\n var rawHash = decodeURIComponent(hash);\n // First we check if the element by id is found\n var idEl = document.getElementById(rawHash);\n if (idEl) {\n idEl.scrollIntoView();\n return;\n }\n // If there's no element with the id, we check the `name` property\n // To mirror browsers\n var nameEl = document.getElementsByName(rawHash)[0];\n if (nameEl) {\n nameEl.scrollIntoView();\n }\n }\n },\n {\n key: \"urlIsNew\",\n value: function urlIsNew(asPath) {\n return this.asPath !== asPath;\n }\n },\n {\n /**\n * Prefetch page code, you may wait for the data during page rendering.\n * This feature only works in production!\n * @param url the href of prefetched page\n * @param asPath the as path of the prefetched page\n */ key: \"prefetch\",\n value: function prefetch(url) {\n var asPath = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : url, options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};\n var _this = this;\n return _asyncToGenerator(_cUsersGhoshOneDriveDocumentsProgamsUpscaylNodeModulesNextDistCompiledRegeneratorRuntimeRuntimeJs.default.mark(function _callee() {\n var parsed, pathname, query, parsedAs, localePathResult, pages, resolvedAs, locale, isMiddlewareMatch, rewrites, ref, rewritesResult, data, route;\n return _cUsersGhoshOneDriveDocumentsProgamsUpscaylNodeModulesNextDistCompiledRegeneratorRuntimeRuntimeJs.default.wrap(function _callee$(_ctx) {\n while(1)switch(_ctx.prev = _ctx.next){\n case 0:\n parsed = (0, _parseRelativeUrl).parseRelativeUrl(url);\n pathname = parsed.pathname, query = parsed.query;\n if (false) {}\n _ctx.next = 5;\n return _this.pageLoader.getPageList();\n case 5:\n pages = _ctx.sent;\n resolvedAs = asPath;\n locale = typeof options.locale !== \"undefined\" ? options.locale || undefined : _this.locale;\n _ctx.next = 10;\n return matchesMiddleware({\n asPath: asPath,\n locale: locale,\n router: _this\n });\n case 10:\n isMiddlewareMatch = _ctx.sent;\n if (true) {\n _ctx.next = 24;\n break;\n }\n ;\n ;\n _ctx.next = 16;\n return (0, _routeLoader).getClientBuildManifest();\n case 16:\n ref = _ctx.sent;\n rewrites = ref.__rewrites;\n ref;\n rewritesResult = (0, _resolveRewrites).default((0, _addBasePath).addBasePath((0, _addLocale).addLocale(asPath, _this.locale), true), pages, rewrites, parsed.query, function(p) {\n return resolveDynamicRoute(p, pages);\n }, _this.locales);\n if (!rewritesResult.externalDest) {\n _ctx.next = 22;\n break;\n }\n return _ctx.abrupt(\"return\");\n case 22:\n resolvedAs = (0, _removeLocale).removeLocale((0, _removeBasePath).removeBasePath(rewritesResult.asPath), _this.locale);\n if (rewritesResult.matchedPage && rewritesResult.resolvedHref) {\n // if this directly matches a page we need to update the href to\n // allow the correct page chunk to be loaded\n pathname = rewritesResult.resolvedHref;\n parsed.pathname = pathname;\n if (!isMiddlewareMatch) {\n url = (0, _formatUrl).formatWithValidation(parsed);\n }\n }\n case 24:\n parsed.pathname = resolveDynamicRoute(parsed.pathname, pages);\n if ((0, _isDynamic).isDynamicRoute(parsed.pathname)) {\n pathname = parsed.pathname;\n parsed.pathname = pathname;\n Object.assign(query, (0, _routeMatcher).getRouteMatcher((0, _routeRegex).getRouteRegex(parsed.pathname))((0, _parsePath).parsePath(asPath).pathname) || {});\n if (!isMiddlewareMatch) {\n url = (0, _formatUrl).formatWithValidation(parsed);\n }\n }\n if (false) {}\n return _ctx.abrupt(\"return\");\n case 28:\n _ctx.next = 30;\n return withMiddlewareEffects({\n fetchData: function() {\n return fetchNextData({\n dataHref: _this.pageLoader.getDataHref({\n href: (0, _formatUrl).formatWithValidation({\n pathname: pathname,\n query: query\n }),\n skipInterpolation: true,\n asPath: resolvedAs,\n locale: locale\n }),\n hasMiddleware: true,\n isServerRender: _this.isSsr,\n parseJSON: true,\n inflightCache: _this.sdc,\n persistCache: !_this.isPreview,\n isPrefetch: true\n });\n },\n asPath: asPath,\n locale: locale,\n router: _this\n });\n case 30:\n data = _ctx.sent;\n /**\n * If there was a rewrite we apply the effects of the rewrite on the\n * current parameters for the prefetch.\n */ if ((data == null ? void 0 : data.effect.type) === \"rewrite\") {\n parsed.pathname = data.effect.resolvedHref;\n pathname = data.effect.resolvedHref;\n query = _extends({}, query, data.effect.parsedAs.query);\n resolvedAs = data.effect.parsedAs.pathname;\n url = (0, _formatUrl).formatWithValidation(parsed);\n }\n if (!((data == null ? void 0 : data.effect.type) === \"redirect-external\")) {\n _ctx.next = 34;\n break;\n }\n return _ctx.abrupt(\"return\");\n case 34:\n route = (0, _removeTrailingSlash).removeTrailingSlash(pathname);\n _ctx.next = 37;\n return Promise.all([\n _this.pageLoader._isSsg(route).then(function(isSsg) {\n return isSsg ? fetchNextData({\n dataHref: (data == null ? void 0 : data.dataHref) || _this.pageLoader.getDataHref({\n href: url,\n asPath: resolvedAs,\n locale: locale\n }),\n isServerRender: false,\n parseJSON: true,\n inflightCache: _this.sdc,\n persistCache: !_this.isPreview,\n isPrefetch: true,\n unstable_skipClientCache: options.unstable_skipClientCache || options.priority\n }).then(function() {\n return false;\n }) : false;\n }),\n _this.pageLoader[options.priority ? \"loadPage\" : \"prefetch\"](route), \n ]);\n case 37:\n case \"end\":\n return _ctx.stop();\n }\n }, _callee);\n }))();\n }\n },\n {\n key: \"fetchComponent\",\n value: function fetchComponent(route) {\n var _this = this;\n return _asyncToGenerator(_cUsersGhoshOneDriveDocumentsProgamsUpscaylNodeModulesNextDistCompiledRegeneratorRuntimeRuntimeJs.default.mark(function _callee() {\n var handleCancelled, componentResult;\n return _cUsersGhoshOneDriveDocumentsProgamsUpscaylNodeModulesNextDistCompiledRegeneratorRuntimeRuntimeJs.default.wrap(function _callee$(_ctx) {\n while(1)switch(_ctx.prev = _ctx.next){\n case 0:\n handleCancelled = getCancelledHandler({\n route: route,\n router: _this\n });\n _ctx.prev = 1;\n _ctx.next = 4;\n return _this.pageLoader.loadPage(route);\n case 4:\n componentResult = _ctx.sent;\n handleCancelled();\n return _ctx.abrupt(\"return\", componentResult);\n case 9:\n _ctx.prev = 9;\n _ctx.t0 = _ctx[\"catch\"](1);\n handleCancelled();\n throw _ctx.t0;\n case 13:\n case \"end\":\n return _ctx.stop();\n }\n }, _callee, null, [\n [\n 1,\n 9\n ]\n ]);\n }))();\n }\n },\n {\n key: \"_getData\",\n value: function _getData(fn) {\n var _this = this;\n var cancelled = false;\n var cancel = function() {\n cancelled = true;\n };\n this.clc = cancel;\n return fn().then(function(data) {\n if (cancel === _this.clc) {\n _this.clc = null;\n }\n if (cancelled) {\n var err = new Error(\"Loading initial props cancelled\");\n err.cancelled = true;\n throw err;\n }\n return data;\n });\n }\n },\n {\n key: \"_getFlightData\",\n value: function _getFlightData(dataHref) {\n // Do not cache RSC flight response since it's not a static resource\n return fetchNextData({\n dataHref: dataHref,\n isServerRender: true,\n parseJSON: false,\n inflightCache: this.sdc,\n persistCache: false,\n isPrefetch: false\n }).then(function(param) {\n var text = param.text;\n return {\n data: text\n };\n });\n }\n },\n {\n key: \"getInitialProps\",\n value: function getInitialProps(Component, ctx) {\n var ref = this.components[\"/_app\"], App = ref.Component;\n var AppTree = this._wrapApp(App);\n ctx.AppTree = AppTree;\n return (0, _utils).loadGetInitialProps(App, {\n AppTree: AppTree,\n Component: Component,\n router: this,\n ctx: ctx\n });\n }\n },\n {\n key: \"route\",\n get: function get() {\n return this.state.route;\n }\n },\n {\n key: \"pathname\",\n get: function get() {\n return this.state.pathname;\n }\n },\n {\n key: \"query\",\n get: function get() {\n return this.state.query;\n }\n },\n {\n key: \"asPath\",\n get: function get() {\n return this.state.asPath;\n }\n },\n {\n key: \"locale\",\n get: function get() {\n return this.state.locale;\n }\n },\n {\n key: \"isFallback\",\n get: function get() {\n return this.state.isFallback;\n }\n },\n {\n key: \"isPreview\",\n get: function get() {\n return this.state.isPreview;\n }\n }\n ]);\n return Router;\n}();\nRouter.events = (0, _mitt).default();\nfunction matchesMiddleware(options) {\n return Promise.resolve(options.router.pageLoader.getMiddlewareList()).then(function(items) {\n var ref = (0, _parsePath).parsePath(options.asPath), asPathname = ref.pathname;\n var cleanedAs = (0, _hasBasePath).hasBasePath(asPathname) ? (0, _removeBasePath).removeBasePath(asPathname) : asPathname;\n return !!(items == null ? void 0 : items.some(function(param) {\n var _param = _slicedToArray(param, 2), regex = _param[0], ssr = _param[1];\n return !ssr && new RegExp(regex).test((0, _addLocale).addLocale(cleanedAs, options.locale));\n }));\n });\n}\nfunction withMiddlewareEffects(options) {\n return matchesMiddleware(options).then(function(matches) {\n if (matches && options.fetchData) {\n return options.fetchData().then(function(data) {\n return getMiddlewareData(data.dataHref, data.response, options).then(function(effect) {\n return {\n dataHref: data.dataHref,\n json: data.json,\n response: data.response,\n text: data.text,\n effect: effect\n };\n });\n }).catch(function(_err) {\n /**\n * TODO: Revisit this in the future.\n * For now we will not consider middleware data errors to be fatal.\n * maybe we should revisit in the future.\n */ return null;\n });\n }\n return null;\n });\n}\nfunction getMiddlewareData(source, response, options) {\n var nextConfig = {\n basePath: options.router.basePath,\n i18n: {\n locales: options.router.locales\n },\n trailingSlash: Boolean(false)\n };\n var rewriteHeader = response.headers.get(\"x-nextjs-rewrite\");\n var rewriteTarget = rewriteHeader || response.headers.get(\"x-nextjs-matched-path\");\n var matchedPath = response.headers.get(\"x-matched-path\");\n if (!rewriteTarget && !(matchedPath == null ? void 0 : matchedPath.includes(\"__next_data_catchall\"))) {\n rewriteTarget = matchedPath;\n }\n if (rewriteTarget) {\n if (rewriteTarget.startsWith(\"/\")) {\n var parsedRewriteTarget = (0, _parseRelativeUrl).parseRelativeUrl(rewriteTarget);\n var pathnameInfo = (0, _getNextPathnameInfo).getNextPathnameInfo(parsedRewriteTarget.pathname, {\n nextConfig: nextConfig,\n parseData: true\n });\n var fsPathname = (0, _removeTrailingSlash).removeTrailingSlash(pathnameInfo.pathname);\n return Promise.all([\n options.router.pageLoader.getPageList(),\n (0, _routeLoader).getClientBuildManifest(), \n ]).then(function(param) {\n var _param = _slicedToArray(param, 2), pages = _param[0], ref = _param[1], rewrites = ref.__rewrites;\n var as = (0, _addLocale).addLocale(pathnameInfo.pathname, pathnameInfo.locale);\n if ((0, _isDynamic).isDynamicRoute(as) || !rewriteHeader && pages.includes((0, _normalizeLocalePath).normalizeLocalePath((0, _removeBasePath).removeBasePath(as), options.router.locales).pathname)) {\n var parsedSource = (0, _getNextPathnameInfo).getNextPathnameInfo((0, _parseRelativeUrl).parseRelativeUrl(source).pathname, {\n parseData: true\n });\n as = (0, _addBasePath).addBasePath(parsedSource.pathname);\n parsedRewriteTarget.pathname = as;\n }\n if (false) { var result; }\n var resolvedHref = !pages.includes(fsPathname) ? resolveDynamicRoute((0, _normalizeLocalePath).normalizeLocalePath((0, _removeBasePath).removeBasePath(parsedRewriteTarget.pathname), options.router.locales).pathname, pages) : fsPathname;\n if ((0, _isDynamic).isDynamicRoute(resolvedHref)) {\n var matches = (0, _routeMatcher).getRouteMatcher((0, _routeRegex).getRouteRegex(resolvedHref))(as);\n Object.assign(parsedRewriteTarget.query, matches || {});\n }\n return {\n type: \"rewrite\",\n parsedAs: parsedRewriteTarget,\n resolvedHref: resolvedHref\n };\n });\n }\n var src = (0, _parsePath).parsePath(source);\n var pathname = (0, _formatNextPathnameInfo).formatNextPathnameInfo(_extends({}, (0, _getNextPathnameInfo).getNextPathnameInfo(src.pathname, {\n nextConfig: nextConfig,\n parseData: true\n }), {\n defaultLocale: options.router.defaultLocale,\n buildId: \"\"\n }));\n return Promise.resolve({\n type: \"redirect-external\",\n destination: \"\".concat(pathname).concat(src.query).concat(src.hash)\n });\n }\n var redirectTarget = response.headers.get(\"x-nextjs-redirect\");\n if (redirectTarget) {\n if (redirectTarget.startsWith(\"/\")) {\n var src1 = (0, _parsePath).parsePath(redirectTarget);\n var pathname1 = (0, _formatNextPathnameInfo).formatNextPathnameInfo(_extends({}, (0, _getNextPathnameInfo).getNextPathnameInfo(src1.pathname, {\n nextConfig: nextConfig,\n parseData: true\n }), {\n defaultLocale: options.router.defaultLocale,\n buildId: \"\"\n }));\n return Promise.resolve({\n type: \"redirect-internal\",\n newAs: \"\".concat(pathname1).concat(src1.query).concat(src1.hash),\n newUrl: \"\".concat(pathname1).concat(src1.query).concat(src1.hash)\n });\n }\n return Promise.resolve({\n type: \"redirect-external\",\n destination: redirectTarget\n });\n }\n return Promise.resolve({\n type: \"next\"\n });\n}\nexports[\"default\"] = Router; //# sourceMappingURL=router.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();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gc2VsZiA9IHRoaXMsIGFyZ3MgPSBhcmd1bWVudHM7XG4gICAgICAgIHJldHVybiBuZXcgUHJvbWlzZShmdW5jdGlvbihyZXNvbHZlLCByZWplY3QpIHtcbiAgICAgICAgICAgIHZhciBnZW4gPSBmbi5hcHBseShzZWxmLCBhcmdzKTtcbiAgICAgICAgICAgIGZ1bmN0aW9uIF9uZXh0KHZhbHVlKSB7XG4gICAgICAgICAgICAgICAgYXN5bmNHZW5lcmF0b3JTdGVwKGdlbiwgcmVzb2x2ZSwgcmVqZWN0LCBfbmV4dCwgX3Rocm93LCBcIm5leHRcIiwgdmFsdWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZnVuY3Rpb24gX3Rocm93KGVycikge1xuICAgICAgICAgICAgICAgIGFzeW5jR2VuZXJhdG9yU3RlcChnZW4sIHJlc29sdmUsIHJlamVjdCwgX25leHQsIF90aHJvdywgXCJ0aHJvd1wiLCBlcnIpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgX25leHQodW5kZWZpbmVkKTtcbiAgICAgICAgfSk7XG4gICAgfTtcbn1cbmZ1bmN0aW9uIF9leHRlbmRzKCkge1xuICAgIF9leHRlbmRzID0gT2JqZWN0LmFzc2lnbiB8fCBmdW5jdGlvbih0YXJnZXQpIHtcbiAgICAgICAgZm9yKHZhciBpID0gMTsgaSA8IGFyZ3VtZW50cy5sZW5ndGg7IGkrKyl7XG4gICAgICAgICAgICB2YXIgc291cmNlID0gYXJndW1lbnRzW2ldO1xuICAgICAgICAgICAgZm9yKHZhciBrZXkgaW4gc291cmNlKXtcbiAgICAgICAgICAgICAgICBpZiAoT2JqZWN0LnByb3RvdHlwZS5oYXNPd25Qcm9wZXJ0eS5jYWxsKHNvdXJjZSwga2V5KSkge1xuICAgICAgICAgICAgICAgICAgICB0YXJnZXRba2V5XSA9IHNvdXJjZVtrZXldO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBy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XNjcmlwdG9yID0gT2JqZWN0LmRlZmluZVByb3BlcnR5ICYmIE9iamVjdC5nZXRPd25Qcm9wZXJ0eURlc2NyaXB0b3I7XG4gICAgZm9yKHZhciBrZXkgaW4gb2JqKXtcbiAgICAgICAgaWYgKE9iamVjdC5wcm90b3R5cGUuaGFzT3duUHJvcGVydHkuY2FsbChvYmosIGtleSkpIHtcbiAgICAgICAgICAgIHZhciBkZXNjID0gaGFzUHJvcGVydHlEZXNjcmlwdG9yID8gT2JqZWN0LmdldE93blByb3BlcnR5RGVzY3JpcHRvcihvYmosIGtleSkgOiBudWxsO1xuICAgICAgICAgICAgaWYgKGRlc2MgJiYgKGRlc2MuZ2V0IHx8IGRlc2Muc2V0KSkge1xuICAgICAgICAgICAgICAgIE9iamVjdC5kZWZpbmVQcm9wZXJ0eShuZXdPYmosIGtleSwgZGVzYyk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIG5ld09ialtrZXldID0gb2JqW2tleV07XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG4gICAgbmV3T2JqLmRlZmF1bHQgPSBvYmo7XG4gICAgaWYgKGNhY2hlKSB7XG4gICAgICAgIGNhY2hlLnNldChvYmosIG5ld09iaik7XG4gICAgfVxuICAgIHJldHVybiBuZXdPYmo7XG59XG5mdW5jdGlvbiBidWlsZENhbmNlbGxhdGlvbkVycm9yKCkge1xuICAgIHJldHVybiBPYmplY3QuYXNzaWduKG5ldyBFcnJvcignUm91dGUgQ2FuY2VsbGVkJyksIHtcbiAgICAgICAgY2FuY2VsbGVkOiB0cnVlXG4gICAgfSk7XG59XG5mdW5jdGlvbiBpc0xvY2FsVVJMKHVybCkge1xuICAgIC8vIHByZXZlbnQgYSBoeWRyYXRpb24gbWlzbWF0Y2ggb24gaHJlZiBmb3IgdXJsIHdpdGggYW5jaG9yIHJlZnNcbiAgICBpZiAoISgwLCBfdXRpbHMpLmlzQWJzb2x1dGVVcmwodXJsKSkgcmV0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hvZCkgPT09ICdIRUFEJykge1xuICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgIGRhdGFIcmVmLFxuICAgICAgICAgICAgICAgICAgICByZXNwb25zZSxcbiAgICAgICAgICAgICAgICAgICAgdGV4dDogJycsXG4gICAgICAgICAgICAgICAgICAgIGpzb246IHt9XG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiByZXNwb25zZS50ZXh0KCkudGhlbigodGV4dCk9PntcbiAgICAgICAgICAgICAgICBpZiAoIXJlc3BvbnNlLm9rKSB7XG4gICAgICAgICAgICAgICAgICAgIC8qKlxuICAgICAgICAgICAgICogV2hlbiB0aGUgZGF0YSByZXNwb25zZSBpcyBhIHJlZGlyZWN0IGJlY2F1c2Ugb2YgYSBtaWRkbGV3YXJlXG4gICAgICAgICAgICAgKiB3ZSBkbyBub3QgY29uc2lkZXIgaXQgYW4gZXJyb3IuIFRoZSBoZWFkZXJzIG11c3QgYnJpbmcgdGhlXG4gICAgICAgICAgICAgKiBtYXBwZWQgbG9jYXRpb24uXG4gICAgICAgICAgICAgKiBUT0RPOiBDaGFuZ2UgdGhlIHN0YXR1cyBjb2RlIGluIHRoZSBoYW5kbGVyLlxuICAgICAgICAgICAgICovIGlmIChoYXNNaWRkbGV3YXJlICYmIFtcbiAgICAgICAgICAgICAgICAgICAgICAgIDMwMSxcbiAgICAgICAgICAgICAgICAgICAgICAgIDMwMixcbiAgICAgICAgICAgICAgICAgICAgICAgIDMwNyxcbiAgICAgICAgICAgICAgICAgICAgICAgIDMwOFxuICAgICAgICAgICAgICAgICAgICBdLmluY2x1ZGVzKHJlc3BvbnNlLnN0YXR1cykpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZGF0YUhyZWYsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzcG9uc2UsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGV4dCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBqc29uOiB7fVxuICAgICAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAocmVzcG9uc2Uuc3RhdHVzID09PSA0MDQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciByZWY7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoKHJlZiA9IHRyeVRvUGFyc2VBc0pTT04odGV4dCkpID09IG51bGwgPyB2b2lkIDAgOiByZWYubm90Rm91bmQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkYXRhSHJlZixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAganNvbjoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbm90Rm91bmQ6IFNTR19EQVRBX05PVF9GT1VORFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXNwb25zZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGV4dFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAvKipcbiAgICAgICAgICAgICAgICogSWYgdGhlcmUgaXMgYSA0MDQgdGhhdCBpcyBub3QgZm9yIFNTRyB3ZSB1c2VkIHRvIGZhaWwgYnV0IGlmXG4gICAgICAgICAgICAgICAqIHRoZXJlIGlzIGEgbWlkZGxld2FyZSB3ZSBtdXN0IHJlc3BvbmQgd2l0aCBhbiBlbXB0eSBvYmplY3QuXG4gICAgICAgICAgICAgICAqIEZvciBub3cgd2Ugd2lsbCByZXR1cm4gdGhlIGRhdGEgd2hlbiB0aGVyZSBpcyBhIG1pZGRsZXdhcmUuXG4gICAgICAgICAgICAgICAqIFRPRE86IFVwZGF0ZSB0aGUgc2VydmVyIHRvIHN1Y2Nlc3Mgb24gdGhlc2UgcmVxdWVzdHMuXG4gICAgICAgICAgICAgICAqLyBpZiAoaGFzTWlkZGxld2FyZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRhdGFIcmVmLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXNwb25zZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGV4dCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAganNvbjoge31cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IGVycm9yID0gbmV3IEVycm9yKGBGYWlsZWQgdG8gbG9hZCBzdGF0aWMgcHJvcHNgKTtcbiAgICAgICAgICAgICAgICAgICAgLyoqXG4gICAgICAgICAgICAgKiBXZSBzaG91bGQgb25seSB0cmlnZ2VyIGEgc2VydmVyLXNpZGUgdHJhbnNpdGlvbiBpZiB0aGlzIHdhc1xuICAgICAgICAgICAgICogY2F1c2VkIG9uIGEgY2xpZW50LXNpZGUgdHJhbnNpdGlvbi4gT3RoZXJ3aXNlLCB3ZSdkIGdldCBpbnRvXG4gICAgICAgICAgICAgKiBhbiBpbmZpbml0ZSBsb29wLlxuICAgICAgICAgICAgICovIGlmICghaXNTZXJ2ZXJSZW5kZXIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICgwLCBfcm91dGVMb2FkZXIpLm1hcmtBc3NldEVycm9yKGVycm9yKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB0aHJvdyBlcnJvcjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICAgICAgZGF0YUhyZWYsXG4gICAgICAgICAgICAgICAgICAgIGpzb246IHBhcnNlSlNPTiA/IHRyeVRvUGFyc2VBc0pTT04odGV4dCkgOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgcmVzcG9uc2UsXG4gICAgICAgICAgICAgICAgICAgIHRleHRcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0pLnRoZW4oKGRhdGEpPT57XG4gICAgICAgICAgICBpZiAoIXBlcnNpc3RDYWNoZSB8fCBwcm9jZXNzLmVudi5OT0RFX0VOViAhPT0gJ3Byb2R1Y3Rpb24nIHx8IGRhdGEucmVzcG9uc2UuaGVhZGVycy5nZXQoJ3gtbWlkZGxld2FyZS1jYWNoZScpID09PSAnbm8tY2FjaGUnKSB7XG4gICAgICAgICAgICAgICAgZGVsZXRlIGluZmxpZ2h0Q2FjaGVbY2FjaGVLZXldO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIGRhdGE7XG4gICAgICAgIH0pLmNhdGNoKChlcnIpPT57XG4gICAgICAgICAgICBkZWxldGUgaW5mbGlnaHRDYWNoZVtjYWNoZUtleV07XG4gICAgICAgICAgICB0aHJvdyBlcnI7XG4gICAgICAgIH0pO1xuICAgIH07XG4gICAgLy8gd2hlbiBza2lwcGluZyBjbGllbnQgY2FjaGUgd2Ugd2FpdCB0byB1cGRhdGVcbiAgICAvLyBpbmZsaWdodCBjYWNoZSB1bnRpbCBzdWNjZXNzZnVsIGRhdGEgcmVzcG9uc2VcbiAgICAvLyB0aGlzIGFsbG93cyByYWNpbmcgY2xpY2sgZXZlbnQgd2l0aCBmZXRjaGluZyBuZXdlciBkYXRhXG4gICAgLy8gd2l0aG91dCBibG9ja2luZyBuYXZpZ2F0aW9uIHdoZW4gc3RhbGUgZGF0YSBpcyBhdmFpbGFibGVcbiAgICBpZiAodW5zdGFibGVfc2tpcENsaWVud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93biBkdWUgdG8gdGhlIHJldHVyblxuICAgICAgICAgICAgICAgIGlmIChwcm9jZXNzLmVudi5fX05FWFRfSTE4Tl9TVVBQT1JUKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciByZWY7XG4gICAgICAgICAgICAgICAgICAgIC8vIGlmIHRoZSBsb2NhbGUgaXNuJ3QgY29uZmlndXJlZCBoYXJkIG5hdmlnYXRlIHRvIHNob3cgNDA0IHBhZ2VcbiAgICAgICAgICAgICAgICAgICAgaWYgKCEoKHJlZiA9IF90aGlzLmxvY2FsZXMpID09IG51bGwgPyB2b2lkIDAgOiByZWYuaW5jbHVkZXMobmV4dFN0YXRlLmxvY2FsZSkpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBwYXJzZWRBcy5wYXRobmFtZSA9ICgwLCBfYWRkTG9jYWxlKS5hZGRMb2NhbGUocGFyc2VkQXMucGF0aG5hbWUsIG5leHRTdGF0ZS5sb2NhbGUpO1xuICAgICAgICAgICAgICAgICAgICAgICAgaGFuZGxlSGFyZE5hdmlnYXRpb24oe1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogKDAsIF9mb3JtYXRVcmwpLmZvcm1hdFdpdGhWYWxpZGF0aW9uKHBhcnNlZEFzKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByb3V0ZXI6IF90aGlzXG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIHRoaXMgd2FzIHByZXZpb3VzbHkgYSByZXR1cm4gYnV0IHdhcyByZW1vdmVkIGluIGZhdm9yXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBvZiBiZXR0ZXIgZGVhZCBjb2RlIGVsaW1pbmF0aW9uIHdpdGggcmVnZW5lcmF0b3IgcnVudGltZVxuICAgICAgICAgICAgICAgICAgICAgICAgZGlkTmF2aWdhdGUgPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICA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F9hZGRCYXNlUGF0aCkuYWRkQmFzZVBhdGgoYCR7bmV4dFN0YXRlLmxvY2FsZSA9PT0gZGV0ZWN0ZWREb21haW4uZGVmYXVsdExvY2FsZSA/ICcnIDogYC8ke25leHRTdGF0ZS5sb2NhbGV9YH0ke2FzTm9CYXNlUGF0aCA9PT0gJy8nID8gJycgOiBhc05vQmFzZVBhdGh9YCB8fCAnLycpfWAsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcm91dGVyOiBfdGhpc1xuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyB0aGlzIHdhcyBwcmV2aW91c2x5IGEgcmV0dXJuIGJ1dCB3YXMgcmVtb3ZlZCBpbiBmYXZvclxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gb2YgYmV0dGVyIGRlYWQgY29kZSBlbGltaW5hdGlvbiB3aXRoIHJlZ2VuZXJhdG9yIHJ1bnRpbWVcbiAgICAgICAgICAgICAgICAgICAgICAgIGRpZE5hdmlnYXRlID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoZGlkTmF2aWdhdGUpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBQcm9taXNlKCgpPT57fSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgLy8gbWFya2luZyByb3V0ZSBjaGFuZ2VzIGFzIGEgbmF2aWdhdGlvbiBzdGFydCBlbnRyeVxuICAgICAgICAgICAgaWYgKF91dGlscy5TVCkge1xuICAgICAgICAgICAgICAgIHBlcmZvcm1hbmNlLm1hcmsoJ3JvdXRlQ2hhbmdlJyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjb25zdCB7IHNoYWxsb3cgPWZhbHNlICwgc2Nyb2xsID10cnVlICB9ID0gb3B0aW9ucztcbiAgICAgICAgICAgIGNvbn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CBfaXNFcnJvcikuZGVmYXVsdChlcnIpICYmIGVyci5jYW5jZWxsZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIFJvdXRlci5ldmVudHMuZW1pdCgncm91dGVDaGFuZ2VFcnJvcicsIGVyciwgY2xlYW5lZEFzLCByb3V0ZVByb3BzKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB0aHJvdyBlcnI7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIFJvdXRlci5ldmVudHMuZW1pdCgnaGFzaENoYW5nZUNvbXBsZXRlJywgYXMsIHJvdXRlUHJvcHMpO1xuICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgbGV0IHBhcnNlZCA9ICgwLCBfcGFyc2VSZWxhdGl2ZVVybCkucGFyc2VSZWxhdGl2ZVVybCh1cmwpO1xuICAgICAgICAgICAgbGV0IHsgcGF0aG5hbWUgLCBxdWVyeSAgfSA9IHBhcnNlZDtcbiAgICAgICAgICAgIC8vIFRoZSBidWlsZCBtYW5pZmVzdCBuZWVkcyB0byBiZSBsb2FkZWQgYmVmb3JlIGF1dG8tc3RhdGljIGR5bmFtaWMgcGFnZXNcbiAgICAgICAgICAgIC8vIGdldCB0aGVpciBxdWVyeSBwYXJhbWV0ZXJzIHRvIGFsbG93IGVuc3VyaW5nIHRoZXkgY2FuIGJlIHBhcnNlZCBwcm9wZXJseVxuICAgICAgICAgICAgLy8gd2hlbiByZXdyaXR0ZW4gdG9cbiAgICAgICAgICAgIGxldCBwYWdlcywgcmV3cml0ZXM7XG4gICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgIFtwYWdlcywgeyBfX3Jld3JpdGVzOiByZXdyaXRlcyAgfV0gPSB5aWVsZCBQcm9taXNlLmFsbChbXG4gICAgICAgICAgICAgICAgICAgIF90aGlzLnBhZ2VMb2FkZXIuZ2V0UGFnZUxpc3QoKSxcbiAgIC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ICAgICAgICAgICAgICAgICAgICBoYW5kbGVIYXJkTmF2aWdhdGlvbih7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiBhcyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByb3V0ZXI6IF90aGlzXG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmICghaXNNaWRkbGV3YXJlTWF0Y2gpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlc29sdmVkQXMgPSByZXdyaXRlc1Jlc3VsdC5hc1BhdGg7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKHJld3JpdGVzUmVzdWx0Lm1hdGNoZWRQYWdlICYmIHJld3JpdGVzUmVzdWx0LnJlc29sdmVkSHJlZikge1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gaWYgdGhpcyBkaXJlY3RseSBtYXRjaGVzIGEgcGFnZSB3ZSBuZWVkIHRvIHVwZGF0ZSB0aGUgaHJlZiB0b1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gYWxsb3cgdGhlIGNvcnJlY3QgcGFnZSBjaHVuayB0byBiZSBsb2FkZWRcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhdGhuYW1lID0gcmV3cml0ZXNSZXN1bHQucmVzb2x2ZWRIcmVmO1xuICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VkLnBhdGhuYW1lID0gKDAsIF9hZGRCYXNlUGF0aCkuYWRkQmFzZVBhdGgocGF0aG5hbWUpO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFpc01pZGRsZXdhcmVNYXRjaCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybCA9ICgwLCBfZm9ybWF0VXJsKS5mb3JtYXRXaXRoVmFsaWRhdGlvbihwYXJzZWQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgcGFyc2VkLnBhdGhuYW1lID0gcmVzb2x2ZUR5bmFtaWNSb3V0ZShwYXRobmFtZSwgcGFnZXMpO1xuICAgICAgICAgICAgICAgICAgICBpZiAocGFyc2VkLnBhdGhuYW1lICE9PSBwYXRobmFtZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcGF0aG5hbWUgPSBwYXJzZWQucGF0aG5hbWU7XG4gICAgICAgICAgICAgICAgICAgICAgICBwYXJzZWQucGF0aG5hbWUgPSAoMCwgX2FkZEJhc2VQYXRoKS5hZGRCYXNlUGF0aChwYXRobmFtZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoIWlzTWlkZGxld2FyZU1hdGNoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsID0gKDAsIF9mb3JtYXRVcmwpLmZvcm1hdFdpdGhWYWxpZGF0aW9uKHBhcnNlZCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoIWlzTG9jYWxVUkwoYXMpKSB7XG4gICAgICAgICAgICAgICAgaWYgKHByb2Nlc3MuZW52Lk5PREVfRU5WICE9PSAncHJvZHVjdGlvbicpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGBJbnZhbGlkIGhyZWY6IFwiJHt1cmx9XCIgYW5kIGFzOiBcIiR7YXN9XCIsIHJlY2VpdmVkIHJlbGF0aXZlIGhyZWYgYW5kIGV4dGVybmFsIGFzYCArIGBcXG5TZWUgbW9yZSBpbmZvOiBodHRwczovL25leHRqcy5vcmcvZG9jcy9tZXNzYWdlcy9pbnZhbGlkLXJlbGF0aXZlLXVybC1leHRlcm5h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ICAgaWYgKCFpc1F1ZXJ5VXBkYXRpbmcpIHtcbiAgICAgICAgICAgICAgICBSb3V0ZXIuZXZlbnRzLmVtaXQoJ3JvdXRlQ2hhbmdlU3RhcnQnLCBhcywgcm91dGVQcm9wcyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgIHZhciByZWYyLCByZWYzO1xuICAgICAgICAgICAgICAgIGxldCByb3V0ZUluZm8gPSB5aWVsZCBfdGhpcy5nZXRSb3V0ZUluZm8oe1xuICAgICAgICAgICAgICAgICAgICByb3V0ZSxcbiAgICAgICAgICAgICAgICAgICAgcGF0aG5hbWUsXG4gICAgICAgICAgICAgICAgICAgIHF1ZXJ5LFxuICAgICAgICAgICAgICAgICAgICBhcyxcbiAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZWRBcyxcbiAgICAgICAgICAgICAgICAgICAgcm91dGVQcm9wcyxcbiAgICAgICAgICAgICAgICAgICAgbG9jYWxlOiBuZXh0U3RhdGUubG9jYWxlLFxuICAgICAgICAgICAgICAgICAgICBpc1ByZXZpZXc6IG5leHRTdGF0ZS5pc1ByZXZpZXcsXG4gICAgICAgICAgICAgICAgICAgIGhhc01pZGRsZXdhcmU6IGlzTWlkZGxld2FyZU1hdGNoXG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgaWYgKCdyb3V0ZScgaW4gcm91dGVJbmZvICYmIGlzTWlkZGxld2FyZU1hdGNoKSB7XG4gICAgICAgICAgICAgICAgICAgIHBhdGhuYW1lID0gcm91dGVJbmZvLnJvdXRlIHx8IHJvdXRlO1xuICAgICAgICAgICAgICAgICAgICByb3V0ZSA9IHBhdGhuYW1lO1xuICAgICAgICAgICAgICAgICAgICBxdWVyeSA9IE9iamVjdC5hc3NpZ24oe30sIHJvdXRlSW5mby5xdWVyeSB8fCB7fSwgcXVlcnkpO1xuICAgICAgICAgICAgICAgICAgICBpZiAocm91dGVNYXRjaCAmJiBwYXRobmFtZSAhPT0gcGFyc2VkLnBhdGhuYW1lKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBPYmplY3Qua2V5cyhyb3V0ZU1hdGNoKS5mb3JFYWNoKChrZXkpPT57XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHJvdXRlTWF0Y2ggJiYgcXVlcnlba2V5XSA9PT0gcm91dGVNYXRjaFtrZXldKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlbGV0ZSBxdWVyeVtrZXldO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmICgoMCwgX2lzRHluYW1pYykuaXNEeW5hbWljUm91dGUocGF0aG5hbWUpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBwcmVmaXhlZEFzID0gcm91dGVJbmZvLnJlc29sdmVkQXMgfHwgKDAsIF9hZGRCYXNlUGF0aCkuYWRkQmFzZVBhdGgoKDAsIF9hZGRMb2NhbGUpLmFkZExvY2FsZShhcywgbmV4dFN0YXRlLmxvY2FsZSksIHRydWUpO1xuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHJld3JpdGVBcyA9IHByZWZpeGVkQXM7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoKDAsIF9oYXNCYXNlUGF0aCkuaGFzQmFzZVBhdGgocmV3cml0ZUFzKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJld3JpdGVBcyA9ICgwLCBfcmVtb3ZlQmFzZVBhdGgpLnJlbW92ZUJhc2VQYXRoKHJld3JpdGVBcyk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAocHJvY2Vzcy5lbnYuX19ORVhUX0kxOE5fU1VQUE9SVCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGxvY2FsZVJlc3VsdCA9ICgwLCBfbm9ybWFsaXplTG9jYWxlUGF0aCkubm9ybWFsaXplTG9jYWxlUGF0aChyZXdyaXRlQXMsIF90aGlzLmxvY2FsZXMpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5leHRTdGF0ZS5sb2NhbGUgPSBsb2NhbGVSZXN1bHQuZGV0ZWN0ZWRMb2NhbGUgfHwgbmV4dFN0YXRlLmxvY2FsZTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXdyaXRlQXMgPSBsb2NhbGVSZXN1bHQucGF0aG5hbWU7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zdCByb3V0ZVJlZ2V4ID0gKDAsIF9yb3V0ZVJlZ2V4KS5nZXRSb3V0ZVJlZ2V4KHBhdGhuYW1lKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGN1clJvdXRlTWF0Y2ggPSAoMCwgX3JvdXRlTWF0Y2hlcikuZ2V0Um91dGVNYXRjaGVyKHJvdXRlUmVnZXgpKHJld3JpdGVBcyk7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoY3VyUm91dGVNYXRjaCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIE9iamVjdC5hc3NpZ24ocXVlcnksIGN1clJvdXRlTWF0Y2gpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIC8vIElmIHRoZSByb3V0ZUluZm8gYnJpbmdzIGEgcmVkaXJlY3Qgd2Ugc2ltcGx5IGFwcGx5IGl0LlxuICAgICAgICAgICAgICAgIGlmICgndHlwZScgaW4gcm91dGVJbmZvKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChyb3V0ZUluZm8udHlwZSA9PT0gJ3JlZGlyZWN0LWludGVybmFsJykge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIF90aGlzLmNoYW5nZShtZXRob2QsIHJvdXRlSW5mby5uZXdVcmwsIHJvdXRlSW5mby5uZXdBcywgb3B0aW9ucyk7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBoYW5kbGVIYXJkTmF2aWdhdGlvbih7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiByb3V0ZUluZm8uZGVzdGluYXRpb24sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcm91dGVyOiBfdGhpc1xuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gbmV3IFByb21pc2UoKCk9Pnt9KTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBsZXQgeyBlcnJvciAsIHByb3BzICwgX19OX1NTRyAsIF9fTl9TU1AgIH0gPSByb3V0ZUluZm87XG4gICAgICAgICAgICAgICAgY29uc3QgY29tcG9uZW50ID0gcm91dGVJbmZvLkNvbXBvbmVudDtcbiAgICAgICAgICAgICAgICBpZiAoY29tcG9uZW50ICYmIGNvbXBvbmVudC51bnN0YWJsZV9zY3JpcHRMb2FkZXIpIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3Qgc2NyaXB0cyA9IFtdLmNvbmNhdChjb21wb25lbnQudW5zdGFibGVfc2NyaXB0TG9hZGVyKCkpO1xuICAgICAgICAgICAgICAgICAgICBzY3JpcHRzLmZvckVhY2goKHNjcmlwdCk9PntcbiAgICAgICAgICAgICAgICAgICAgICAgICgwLCBfc2NyaXB0KS5oYW5kbGVDbGllbnRTY3JpcHRMb2FkKHNjcmlwdC5wcm9wcyk7XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAvLyBoYW5kbGUgcmVkaXJlY3Qgb24gY2xpZW50LXRyYW5zaXRpb25cbiAgICAgICAgICAgICAgICBpZiAoKF9fTl9TU0cgfHwgX19OX1NTUCkgJiYgcHJvcHMpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHByb3BzLnBhZ2VQcm9wcyAmJiBwcm9wcy5wYWdlUHJvcHMuX19OX1JFRElSRUNUKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBVc2UgdGhlIGRlc3RpbmF0aW9uIGZyb20gcmVkaXJlY3Qgd2l0aG91dCBhZGRpbmcgbG9jYWxlXG4gICAgICAgICAgICAgICAgICAgICAgICBvcHRpb25zLmxvY2FsZSA9IGZhbHNlO1xuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgZGVzdGluYXRpb24gPSBwcm9wcy5wYWdlUHJvcHMuX19OX1JFRElSRUNUO1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gY2hlY2sgaWYgZGVzdGluYXRpb24gaXMgaW50ZXJuYWwgKHJlc29sdmVzIHRvIGEgcGFnZSkgYW5kIGF0dGVtcHRcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIGNsaWVudC1uYXZpZ2F0aW9uIGlmIGl0IGlzIGZhbGxpbmcgYmFjayB0byBoYXJkIG5hdmlnYXRpb24gaWZcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIGl0J3Mgbm90XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoZGVzdGluYXRpb24uc3RhcnRzV2l0aCgnLycpICYmIHByb3BzLnBhZ2VQcm9wcy5fX05fUkVESVJFQ1RfQkFTRV9QQVRIICE9PSBmYWxzZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHBhcnNlZEhyZWYgPSAoMCwgX3BhcnNlUmVsYXRpdmVVcmwpLnBhcnNlUmVsYXRpdmVVcmwoZGVzdGluYXRpb24pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlZEhyZWYucGF0aG5hbWUgPSByZXNvbHZlRHluYW1pY1JvdXRlKHBhcnNlZEhyZWYucGF0aG5hbWUsIHBhZ2VzKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCB7IHVybDogbmV3VXJsICwgYXM6IG5ld0FzICB9ID0gcHJlcGFyZVVybEFzKF90aGlzLCBkZXN0aW5hdGlvbiwgZGVzdGluYXRpb24pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBfdGhpcy5jaGFuZ2UobWV0aG9kLCBuZXdVcmwsIG5ld0FzLCBvcHRpb25zKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGhhbmRsZUhhcmROYXZpZ2F0aW9uKHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw6IGRlc3RpbmF0aW9uLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJvdXRlcjogX3RoaXNcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBQcm9taXNlKCgpPT57fSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbmV4dFN0YXRlLmlzUHJldmlldyA9ICEhcHJvcHMuX19OX1BSRVZJRVc7XG4gICAgICAgICAgICAgICAgICAgIC8vIGhhbmRsZSBTU0cgZGF0YSA0MDRcbiAgICAgICAgICAgICAgICAgICAgaWYgKHByb3BzLm5vdEZvdW5kID09PSBTU0dfREFUQV9OT1RfRk9VTkQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBub3RGb3VuZFJvdXRlO1xuICAgICAgICAgICAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB5aWVsZCBfdGhpcy5mZXRjaENvbXBvbmVudCgnLzQwNCcpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5vdEZvdW5kUm91dGUgPSAnLzQwNCc7XG4gICAgICAgICAgICAgICAgICAgICAgICB9IGNhdGNoIChfKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbm90Rm91bmRSb3V0ZSA9ICcvX2Vycm9yJztcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIHJvdXRlSW5mbyA9IHlpZWxkIF90aGlzLmdldFJvdXRlSW5mbyh7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcm91dGU6IG5vdEZvdW5kUm91dGUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGF0aG5hbWU6IG5vdEZvdW5kUm91dGUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcXVlcnksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYXMsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZWRBcyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByb3V0ZVByb3BzOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNoYWxsb3c6IGZhbHNlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb2NhbGU6IG5leHRTdGF0ZS5sb2NhbGUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaXNQcmV2aWV3OiBuZXh0U3RhdGUuaXNQcmV2aWV3XG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgndHlwZScgaW4gcm91dGVJbmZvKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGBVbmV4cGVjdGVkIG1pZGRsZXdhcmUgZWZmZWN0IG9uIC80MDRgKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBSb3V0ZXIuZXZlbnRzLmVtaXQoJ2JlZm9yZUhpc3RvcnlDa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91bGRTY3JvbGwgPSAoX3Njcm9sbCA9IG9wdGlvbnMuc2Nyb2xsKSAhPSBudWxsID8gX3Njcm9sbCA6ICFpc1ZhbGlkU2hhbGxvd1JvdXRlO1xuICAgICAgICAgICAgICAgIGNvbnN0IHJlc2V0U2Nyb2xsID0gc2hvdWxkU2Nyb2xsID8ge1xuICAgICAgICAgICAgICAgICAgICB4OiAwLFxuICAgICAgICAgICAgICAgICAgICB5OiAwXG4gICAgICAgICAgICAgICAgfSA6IG51bGw7XG4gICAgICAgICAgICAgICAgeWllbGQgX3RoaXMuc2V0KF9leHRlbmRzKHt9LCBuZXh0U3RhdGUsIHtcbiAgICAgICAgICAgICAgICAgICAgcm91dGUsXG4gICAgICAgICAgICAgICAgICAgIHBhdGhuYW1lLFxuICAgICAgICAgICAgICAgICAgICBxdWVyeSxcbiAgICAgICAgICAgICAgICAgICAgYXNQYXRoOiBjbGVhbmVkQXMsXG4gICAgICAgICAgICAgICAgICAgIGlzRmFsbGJhY2s6IGZhbHNlXG4gICAgICAgICAgICAgICAgfSksIHJvdXRlSW5mbywgZm9yY2VkU2Nyb2xsICE9IG51bGwgPyBmb3JjZWRTY3JvbGwgOiByZXNldFNjcm9sbCkuY2F0Y2goKGUpPT57XG4gICAgICAgICAgICAgICAgICAgIGlmIChlLmNhbmNlbGxlZCkgZXJyb3IgPSBlcnJvciB8fCBlO1xuICAgICAgICAgICAgICAgICAgICBlbHNlIHRocm93IGU7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgaWYgKGVycm9yKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICghaXNRdWVyeVVwZGF0aW5nKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBSb3V0ZXIuZXZlbnRzLmVtaXQoJ3JvdXRlQ2hhbmdlRXJyb3InLCBlcnJvciwgY2xlYW5lZEFzLCByb3V0ZVByb3BzKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB0aHJvdyBlcnJvcjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKHByb2Nlc3MuZW52Ll9fTkVYVF9JMThOX1NVUFBPUlQpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKG5leHRTdGF0ZS5sb2NhbGUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LmRvY3VtZW50RWxlbWVudC5sYW5nID0gbmV4dFN0YXRlLmxvY2FsZTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoIWlzUXVlcnlVcGRhdGluZykge1xuICAgICAgICAgICAgICAgICAgICBSb3V0ZXIuZXZlbnRzLmVtaXQoJ3JvdXRlQ2hhbmdlQ29tcGxldGUnLCBhcywgcm91dGVQcm9wcyk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIC8vIEEgaGFzaCBtYXJrICMgaXMgdGhlIG9wdGlvbmFsIGxhc3QgcGFydCBvZiBhIFVSTFxuICAgICAgICAgICAgICAgIGNvbnN0IGhhc2hSZWdleCA9IC8jLiskLztcbiAgICAgICAgICAgICAgICBpZiAoc2hvdWxkU2Nyb2xsICYmIGhhc2hSZWdleC50ZXN0KGFzKSkge1xuICAgICAgICAgICAgICAgICAgICBfdGhpcy5zY3JvbGxUb0hhc2goYXMpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgICAgIH0gY2F0Y2ggKGVycjEpIHtcbiAgICAgICAgICAgICAgICBpZiAoKDAsIF9pc0Vycm9yKS5kZWZhdWx0KGVycjEpICYmIGVycjEuY2FuY2VsbGVkKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgdGhyb3cgZXJyMTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSkoKTtcbiAgICB9XG4gICAgY2hhbmdlU3RhdGUobWV0aG9kLCB1cmwsIGFzLCBvcHRpb25zID0ge30pIHtcbiAgICAgICAgaWYgKHByb2Nlc3MuZW52Lk5PREVfRU5WICE9PSAncHJvZHVjdGlvbicpIHtcbiAgICAgICAgICAgIGlmICh0eXBlb2Ygd2luZG93Lmhpc3RvcnkgPT09ICd1bmRlZmluZWQnKSB7XG4gICAgICAgICAgICAgICAgY29uc29sZS5lcnJvcihgV2FybmluZzogd2luZG93Lmhpc3RvcnkgaXMgbm90IGF2YWlsYWJsZS5gKTtcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAodHlwZW9mIHdpbmRvdy5oaXN0b3J5W21ldGhvZF0gPT09ICd1bmRlZmluZWQnKSB7XG4gICAgICAgICAgICAgICAgY29uc29sZS5lcnJvcihgV2FybmluZzogd2luZG93Lmhpc3RvcnkuJHttZXRob2R9IGlzIG5vdCBhdmFpbGFibGVgKTtcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1ldGhvZCAhPT0gJ3B1c2hTdGF0ZScgfHwgKDAsIF91dGlscykuZ2V0VVJMKCkgIT09IGFzKSB7XG4gICAgICAgICAgICB0aGlzLl9zaGFsbG93ID0gb3B0aW9ucy5zaGFsbG93O1xuICAgICAgICAgICAgd2luZG93Lmhpc3RvcnlbbWV0aG9kXSh7XG4gICAgICAgICAgICAgICAgdXJsLFxuICAgICAgICAgICAgICAgIGFzLFxuICAgICAgICAgICAgICAgIG9wdGlvbnMsXG4gICAgICAgICAgICAgICAgX19OOiB0cnVlLFxuICAgICAgICAgICAgICAgIGtleTogdGhpcy5fa2V5ID0gbWV0aG9kICE9PSAncHVzaFN0YXRlJyA/IHRoaXMuX2tleSA6IGNyZWF0ZUtleSgpXG4gICAgICAgICAgICB9LCAvLyBNb3N0IGJyb3dzZXJzIGN1cnJlbnRseSBp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yByZWFzb25zXG4gICAgICAgICAgICAgICAgLy8gIDEuIFBhZ2UgZG9lc24ndCBleGlzdHNcbiAgICAgICAgICAgICAgICAvLyAgMi4gUGFnZSBkb2VzIGV4aXN0IGluIGEgZGlmZmVyZW50IHpvbmVcbiAgICAgICAgICAgICAgICAvLyAgMy4gSW50ZXJuYWwgZXJyb3Igd2hpbGUgbG9hZGluZyB0aGUgcGFnZVxuICAgICAgICAgICAgICAgIC8vIFNvLCBkb2luZyBhIGhhcmQgcmVsb2FkIGlzIHRoZSBwcm9wZXIgd2F5IHRvIGRlYWwgd2l0aCB0aGlzLlxuICAgICAgICAgICAgICAgIGhhbmRsZUhhcmROYXZpZ2F0aW9uKHtcbiAgICAgICAgICAgICAgICAgICAgdXJsOiBhcyxcbiAgICAgICAgICAgICAgICAgICAgcm91dGVyOiBfdGhpc1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIC8vIENoYW5naW5nIHRoZSBVUkwgZG9lc24ndCBibG9jayBleGVjdXRpbmcgdGhlIGN1cnJlbnQgY29kZSBwYXRoLlxuICAgICAgICAgICAgICAgIC8vIFNvIGxldCdzIHRocm93IGEgY2FuY2VsbGF0aW9uIGVycm9yIHN0b3AgdGhlIHJvdXRpbmcgbG9naWMuXG4gICAgICAgICAgICAgICAgdGhyb3cgYnVpbGRDYW5jZWxsYXRpb25FcnJvcigpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICBsZXQgQ29tcG9uZW50O1xuICAgICAgICAgICAgICAgIGxldCBzdHlsZVNoZWV0cztcbiAgICAgICAgICAgICAgICBsZXQgcHJvcHM7XG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBDb21wb25lbnQgPT09ICd1bmRlZmluZWQnIHx8IHR5cGVvZiBzdHlsZVNoZWV0cyA9PT0gJ3VuZGVmaW5lZCcpIHtcbiAgICAgICAgICAgICAgICAgICAgKHsgcGFnZTogQ29tcG9uZW50ICwgc3R5bGVTaGVldHMgIH0gPSB5aWVsZCBfdGhpcy5mZXRjaENvbXBvbmVudCgnL19lcnJvcicpKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgY29uc3Qgcm91dGVJbmZvID0ge1xuICAgICAgICAgICAgICAgICAgICBwcm9wcyxcbiAgICAgICAgICAgICAgICAgICAgQ29tcG9uZW50LFxuICAgICAgICAgICAgICAgICAgICBzdHlsZVNoZWV0cyxcbiAgICAgICAgICAgICAgICAgICAgZXJyLFxuICAgICAgICAgICAgICAgICAgICBlcnJvcjogZXJyXG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICBpZiAoIXJvdXRlSW5mby5wcm9wcykge1xuICAgICAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcm91dGVJbmZvLnByb3BzID0geWllbGQgX3RoaXMuZ2V0SW5pdGlhbFByb3BzKENvbXBvbmVudCwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVycixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXRobmFtZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBxdWVyeVxuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGdpcEVycikge1xuICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5lcnJvcignRXJyb3IgaW4gZXJyb3IgcGFnZSBgZ2V0SW5pdGlhbFByb3BzYDogJywgZ2lwRXJyKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJvdXRlSW5mby5wcm9wcyA9IHt9O1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiByb3V0ZUluZm87XG4gICAgICAgICAgICB9IGNhdGNoIChyb3V0ZUluZm9FcnIpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gX3RoaXMuaGFuZGxlUm91dG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AgICAgICAgICAgICByb3V0ZSxcbiAgICAgICAgICAgICAgICAgICAgcm91dGVyOiBfdGhpc1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIGxldCBleGlzdGluZ0luZm8gPSBfdGhpcy5jb21wb25lbnRzW3JvdXRlXTtcbiAgICAgICAgICAgICAgICBpZiAocm91dGVQcm9wcy5zaGFsbG93ICYmIGV4aXN0aW5nSW5mbyAmJiBfdGhpcy5yb3V0ZSA9PT0gcm91dGUpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGV4aXN0aW5nSW5mbztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgbGV0IGNhY2hlZFJvdXRlSW5mbyA9IGV4aXN0aW5nSW5mbyAmJiAhKCdpbml0aWFsJyBpbiBleGlzdGluZ0luZm8pICYmIHByb2Nlc3MuZW52Lk5PREVfRU5WICE9PSAnZGV2ZWxvcG1lbnQnID8gZXhpc3RpbmdJbmZvIDogdW5kZWZpbmVkO1xuICAgICAgICAgICAgICAgIGNvbnN0IGZldGNoTmV4dERhdGFQYXJhbXMgPSB7XG4gICAgICAgICAgICAgICAgICAgIGRhdGFIcmVmOiBfdGhpcy5wYWdlTG9hZGVyLmdldERhdGFIcmVmKHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGhyZWY6ICgwLCBfZm9ybWF0VXJsKS5mb3JtYXRXaXRoVmFsaWRhdGlvbih7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGF0aG5hbWUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcXVlcnlcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgICAgICAgICAgICAgc2tpcEludGVycG9sYXRpb246IHRydWUsXG4gICAgICAgICAgICAgICAgICAgICAgICBhc1BhdGg6IHJlc29sdmVkQXMsXG4gICAgICAgICAgICAgICAgICAgICAgICBsb2NhbGVcbiAgICAgICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgICAgICAgIGhhc01pZGRsZXdhcmU6IHRydWUsXG4gICAgICAgICAgICAgICAgICAgIGlzU2VydmVyUmVuZGVyOiBfdGhpcy5pc1NzcixcbiAgICAgICAgICAgICAgICAgICAgcGFyc2VKU09OOiB0cnVlLFxuICAgICAgICAgICAgICAgICAgICBpbmZsaWdodENhY2hlOiBfdGhpcy5zZGMsXG4gICAgICAgICAgICAgICAgICAgIHBlcnNpc3RDYWNoZTogIWlzUHJldmlldyxcbiAgICAgICAgICAgICAgICAgICAgaXNQcmVmZXRjaDogZmFsc2UsXG4gICAgICAgICAgICAgICAgICAgIHVuc3RhYmxlX3NraXBDbGllbnRDYWNoZVxuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgY29uc3QgZGF0YSA9IHlpZWxkIHdpdGhNaWRkbGV3YXJlRWZmZWN0cyh7XG4gICAgICAgICAgICAgICAgICAgIGZldGNoRGF0YTogKCk9PmZldGNoTmV4dERhdGEoZmV0Y2hOZXh0RGF0YVBhcmFtcyksXG4gICAgICAgICAgICAgICAgICAgIGFzUGF0aDogcmVzb2x2ZWRBcyxcbiAgICAgICAgICAgICAgICAgICAgbG9jYWxlOiBsb2NhbGUsXG4gICAgICAgICAgICAgICAgICAgIHJvdXRlcjogX3RoaXNcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICBoYW5kbGVDYW5jZWxsZWQoKTtcbiAgICAgICAgICAgICAgICBpZiAoKGRhdGEgPT0gbnVsbCA/IHZvaWQgMCA6IChyZWYgPSBkYXRhLmVmZmVjdCkgPT0gbnVsbCA/IHZvaWQgMCA6IHJlZi50eXBlKSA9PT0gJ3JlZGlyZWN0LWludGVybmFsJyB8fCAoZGF0YSA9PSBudWxsID8gdm9pZCAwIDogKHJlZjQgPSBkYXRhLmVmZmVjdCkgPT0gbnVsbCA/IHZvaWQgMCA6IHJlZjQudHlwZSkgPT09ICdyZWRpcmVjdC1leHRlcm5hbCcpIHtcbiAgICAgICAgICA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3RpbmcgaW5mb3JtYXRpb24gdG8gdGhlIHJld3JpdHRlbiBvbmUuXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBUaGVuLCB3ZSByZXR1cm4gdGhlIGluZm9ybWF0aW9uIGFsb25nIHdpdGggdGhlIG1hdGNoZWQgcm91dGUuXG4gICAgICAgICAgICAgICAgICAgICAgICBfdGhpcy5jb21wb25lbnRzW3JlcXVlc3RlZFJvdXRlXSA9IF9leHRlbmRzKHt9LCBleGlzdGluZ0luZm8sIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByb3V0ZVxuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gX2V4dGVuZHMoe30sIGV4aXN0aW5nSW5mbywge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJvdXRlXG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBjYWNoZWRSb3V0ZUluZm8gPSBleGlzdGluZ0luZm8gJiYgISgnaW5pdGlhbCcgaW4gZXhpc3RpbmdJbmZvKSAmJiBwcm9jZXNzLmVudi5OT0RFX0VOViAhPT0gJ2RldmVsb3BtZW50JyA/IGV4aXN0aW5nSW5mbyA6IHVuZGVmaW5lZDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKHJvdXRlID09PSAnL2FwaScgfHwgcm91dGUuc3RhcnRzV2l0aCgnL2FwaS8nKSkge1xuICAgICAgICAgICAgICAgICAgICBoYW5kbGVIYXJkTmF2aWdhdGlvbih7XG4gICAgICAgICAgICAgICAgICAgICAgICB1cmw6IGFzLFxuICAgICAgICAgICAgICAgICAgICAgICAgcm91dGVyOiBfdGhpc1xuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBQcm9taXNlKCgpPT57fSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGNvbnN0IHJvdXRlSW5mbyA9IGNhY2hlZFJvdXRlSW5mbyB8fCAoeWllbGQgX3RoaXMuZmV0Y2hDb21wb25lbnQocm91dGUpLnRoZW4oKHJlcyk9Pih7XG4gICAgICAgICAgICAgICAgICAgICAgICBDb21wb25lbnQ6IHJlcy5wYWdlLFxuICAgICAgICAgICAgICAgICAgICAgICAgc3R5bGVTaGVldHM6IHJlcy5zdHlsZVNoZWV0cyxcbiAgICAgICAgICAgICAgICAgICAgICAgIF9fTl9TU0c6IHJlcy5tb2QuX19OX1NTRyxcbiAgICAgICAgICAgICAgICAgICAgICAgIF9fTl9TU1A6IHJlcy5tb2QuX19OX1NTUCxcbiAgICAgICAgICAgICAgICAgICAgICAgIF9fTl9SU0M6ICEhcmVzLm1vZC5fX25leHRfcnNjX19cbiAgICAgICAgICAgICAgICAgICAgfSkpKTtcbiAgICAgICAgICAgICAgICBpZiAocHJvY2Vzcy5lbnYuTk9ERV9FTlYgIT09ICdwcm9kdWN0aW9uJykge1xuICAgICAgICAgICAgICAgICAgICBjb25zdCB7IGlzVmFsaWRFbGVtZW50VHlwZSAgfSA9IHJlcXVpcmUoJ25leHQvZGlzdC9jb21waWxlZC9yZWFjdC1pcycpO1xuICAgICAgICAgICAgICAgICAgICBpZiAoIWlzVmFsaWRFbGVtZW50VHlwZShyb3V0ZUluZm8uQ29tcG9uZW50KSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGBUaGUgZGVmYXVsdCBleHBvcnQgaXMgbm90IGEgUmVhY3QgQ29tcG9uZW50IGluIHBhZ2U6IFwiJHtwYXRobmFtZX1cImApO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIC8qKlxuICAgICAgICogRm9yIHNlcnZlciBjb21wb25lbnRzLCBub24tU1NSIHBhZ2VzIHdpbGwgaGF2ZSBzdGF0aWNhbGx5IG9wdGltaXplZFxuICAgICAgICogZmxpZ2h0IGRhdGEgaW4gYSBwcm9kdWN0aW9uIGJ1aWxkLiBTbyBvbmx5IGRldmVsb3BtZW50IGFuZCBTU1IgcGFnZXNcbiAgICAgICAqIHdpbGwgYWx3YXlzIGhhdmUgdGhlIHJlYWwtdGltZSBnZW5lcmF0ZWQgYW5kIHN0cmVhbWVkIGZsaWdodCBkYXRhLlxuICAgICAgICovIGNvbnN0IHVzZVN0cmVhbWVkRmxpZ2h0RGF0YSA9IHJvdXRlSW5mby5fX05fUlNDICYmIChwcm9jZXNzLmVudi5OT0RFX0VOViAhPT0gJ3Byb2R1Y3Rpb24nIHx8IHJvdXRlSW5mby5fX05fU1NQKTtcbiAgICAgICAgICAgICAgICBjb25zdCBzaG91bGRGZXRjaERhdGEgPSByb3V0ZUluZm8uX19OX1NTRyB8fCByb3V0ZUluZm8uX19OX1NTUCB8fCByb3V0ZUluZm8uX19OX1JTQztcbiAgICAgICAgICAgICAgICBjb25zdCB7IHByb3BzICB9ID0geWllbGQgX3RoaXMuX2dldERhdGEoX2FzeW5jVG9HZW5lcmF0b3IoZnVuY3Rpb24qKCkge1xuICAgICAgICAgICAgICAgICAgICBpZiAoc2hvdWxkRmV0Y2hEYXRhICYmICF1c2VTdHJlYW1lZEZsaWdodERhdGEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHsganNvbiAgfSA9IGRhdGEgfHwgKHlpZWxkIGZldGNoTmV4dERhdGEoe1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRhdGFIcmVmOiBfdGhpcy5wYWdlTG9hZGVyLmdldERhdGFIcmVmKHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaHJlZjogKDAsIF9mb3JtYXRVcmwpLmZvcm1hdFdpdGhWYWxpZGF0aW9uKHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhdGhuYW1lLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcXVlcnlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFzUGF0aDogcmVzb2x2ZWRBcyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9jYWxlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaXNTZXJ2ZXJSZW5kZXI6IF90aGlzLmlzU3NyLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlSlNPTjogdHJ1ZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbmZsaWdodENhY2hlOiBfdGhpcy5zZGMsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGVyc2lzdENhY2hlOiAhaXNQcmV2aWV3LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlzUHJlZmV0Y2g6IGZhbHNlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc3RhYmxlX3NraXBDbGllbnRDYWNoZVxuICAgICAgICAgICAgICAgICAgICAgICAgfSkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcm9wczoganNvblxuICAgICAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgaGVhZGVyczoge30sXG4gICAgICAgICAgICAgICAgICAgICAgICBwcm9wczogeWllbGQgX3RoaXMuZ2V0SW5pdGlhbFByb3BzKHJvdXRlSW5mby5Db21wb25lbnQsIC8vIHdlIHByb3ZpZGUgQXBwVHJlZSBsYXRlciBzbyB0aGlzIG5lZWRzIHRvIGJlIGBhbnlgXG4gICAgICAgICAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGF0aG5hbWUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcXVlcnksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYXNQYXRoOiBhcyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb2NhbGUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9jYWxlczogX3RoaXMubG9jYWxlcyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZWZhdWx0TG9jYWxlOiBfdGhpcy5kZWZhdWx0TG9jYWxlXG4gICAgICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIH0pKTtcbiAgICAgICAgICAgICAgICAvLyBPbmx5IGJ1c3QgdGhlIGRhdGEgY2FjaGUgZm9yIFNTUCByb3V0ZXMgYWx0aG91Z2hcbiAgICAgICAgICAgICAgICAvLyBtaWRkbGV3YXJlIGNhbiBza2lwIGNhY2hlIHBlciByZXF1ZXN0IHdpdGhcbiAgICAgICAgICAgICAgICAvLyB4LW1pZGRsZXdhcmUtY2FjaGU6IG5vLWNhY2hlIGFzIHdlbGxcbiAgICAgICAgICAgICAgICBpZiAocm91dGVJbmZvLl9fTl9TU1AgJiYgZmV0Y2hOZXh0RGF0YVBhcmFtcy5kYXRhSHJlZikge1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBjYWNoZUtleSA9IG5ldyBVUkwoZmV0Y2hOZXh0RGF0YVBhcmFtcy5kYXRhSHJlZiwgd2luZG93LmxvY2F0aW9uLmhyZWYpLmhyZWY7XG4gICAgICAgICAgICAgICAgICAgIGRlbGV0ZSBfdGhpcy5zZGNbY2FjaGVLZXldO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAvLyB3ZSBraWNrIG9mZiBhIEhFQUQgcmVxdWVzdCBpbiB0aGUgYmFja2dyb3VuZFxuICAgICAgICAgICAgICAgIC8vIHdoZW4gYSBub24tcHJlZmV0Y2ggcmVxdWVzdCBpcyBtYWRlIHRvIHNpZ25hbCByZXZhbGlkYXRpb25cbiAgICAgICAgICAgICAgICBpZiAoIV90aGlzLmlzUHJldmlldyAmJiByb3V0ZUluZm8uX19OX1NTRyAmJiBwcm9jZXNzLmVudi5OT0RFX0VOViAhPT0gJ2RldmVsb3BtZW50Jykge1xuICAgICAgICAgICAgICAgICAgICBmZXRjaE5leHREYXRhKE9iamVjdC5hc3NpZ24oe30sIGZldGNoTmV4dERhdGFQYXJhbXMsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlzQmFja2dyb3VuZDogdHJ1ZSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHBlcnNpc3RDYWNoZTogZmFsc2UsXG4gICAgICAgICAgICAgICAgICAgICAgICBpbmZsaWdodENhY2hlOiBiYWNrZ3JvdW5kQ2FjaGVcbiAgICAgICAgICAgICAgICAgICAgfSkpLmNhdGNoKCgpPT57fSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGxldCBmbGlnaHRJbmZvO1xuICAgICAgICAgICAgICAgIGlmIChyb3V0ZUluZm8uX19OX1JTQykge1xuICAgICAgICAgICAgICAgICAgICBmbGlnaHRJbmZvID0ge1xuICAgICAgICAgICAgICAgICAgICAgICAgX19mbGlnaHRfXzogdXNlU3RyZWFtZWRGbGlnaHREYXRhID8gKHlpZWxkIF90aGlzLl9nZXREYXRhKCgpPT5fdGhpcy5fZ2V0RmxpZ2h0RGF0YSgoMCwgX2Zvcm1hdFVybCkuZm9ybWF0V2l0aFZhbGlkYXRpb24oe1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBxdWVyeTogX2V4dGVuZHMoe30sIHF1ZXJ5LCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfX2ZsaWdodF9fOiAnMSdcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhdGhuYW1lOiAoMCwgX2lzRHluYW1pYykuaX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uICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIC8vIFByZWZldGNoIGlzIG5vdCBzdXBwb3J0ZWQgaW4gZGV2ZWxvcG1lbnQgbW9kZSBiZWNhdXNlIGl0IHdvdWxkIHRyaWdnZXIgb24tZGVtYW5kLWVudHJpZXNcbiAgICAgICAgICAgIGlmIChwcm9jZXNzLmVudi5OT0RFX0VOViAhPT0gJ3Byb2R1Y3Rpb24nKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgLy8gVE9ETzogaWYgdGhlIHJvdXRlIG1pZGRsZXdhcmUncyBkYXRhIHJlcXVlc3RcbiAgICAgICAgICAgIC8vIHJlc29sdmVzIHRvIGlzIG5vdCBhbiBTU0cgcm91dGUgd2Ugc2hvdWxkIGJ1c3QgdGhlIGNhY2hlXG4gICAgICAgICAgICAvLyBidXQgd2Ugc2hvdWxkbid0IGFsbG93IHByZWZldGNoIHRvIGtlZXAgdHJpZ2dlcmluZ1xuICAgICAgICAgICAgLy8gcmVxdWVzdHMgZm9yIFNTUCBwYWdlc1xuICAgICAgICAgICAgY29uc3QgZGF0YSA9IHlpZWxkIHdpdGhNaWRkbGV3YXJlRWZmZWN0cyh7XG4gICAgICAgICAgICAgICAgZmV0Y2hEYXRhOiAoKT0+ZmV0Y2hOZXh0RGF0YSh7XG4gICAgICAgICAgICAgICAgICAgICAgICBkYXRhSHJlZjogX3RoaXMucGFnZUxvYWRlci5nZXREYXRhSHJlZih7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaHJlZjogKDAsIF9mb3JtYXRVcmwpLmZvcm1hdFdpdGhWYWxpZGF0aW9uKHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGF0aG5hbWUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHF1ZXJ5XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2tpcEludGVycG9sYXRpb246IHRydWUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYXNQYXRoOiByZXNvbHZlZEFzLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxvY2FsZVxuICAgICAgICAgICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgICAgICAgICAgICBoYXNNaWRkbGV3YXJlOiB0cnVlLFxuICAgICAgICAgICAgICAgICAgICAgICAgaXNTZXJ2ZXJSZW5kZXI6IF90aGlzLmlzU3NyLFxuICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VKU09OOiB0cnVlLFxuICAgICAgICAgICAgICAgICAgICAgICAgaW5mbGlnaHRDYWNoZTogX3RoaXMuc2RjLFxuICAgICAgICAgICAgICAgICAgICAgICAgcGVyc2lzdENhY2hlOiAhX3RoaXMuaXNQcmV2aWV3LFxuICAgICAgICAgICAgICAgICAgICAgICAgaXNQcmVmZXRjaDogdHJ1ZVxuICAgICAgICAgICAgICAgICAgICB9KSxcbiAgICAgICAgICAgICAgICBhc1BhdGg6IGFzUGF0aCxcbiAgICAgICAgICAgICAgICBsb2NhbGU6IGxvY2FsZSxcbiAgICAgICAgICAgICAgICByb3V0ZXI6IF90aGlzXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIC8qKlxuICAgICAqIElmIHRoZXJlIHdhcyBhIHJld3JpdGUgd2UgYXBwbHkgdGhlIGVmZmVjdHMgb2YgdGhlIHJld3JpdGUgb24gdGhlXG4gICAgICogY3VycmVudCBwYXJhbWV0ZXJzIGZvciB0aGUgcHJlZmV0Y2guXG4gICAgICovIGlmICgoZGF0YSA9PSBudWxsID8gdm9pZCAwIDogZGF0YS5lZmZlY3QudHlwZSkgPT09ICdyZXdyaXRlJykge1xuICAgICAgICAgICAgICAgIHBhcnNlZC5wYXRobmFtZSA9IGRhdGEuZWZmZWN0LnJlc29sdmVkSHJlZjtcbiAgICAgICAgICAgICAgICBwYXRobmFtZSA9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VyLmdldERhdGFIcmVmKHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBocmVmOiB1cmwsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYXNQYXRoOiByZXNvbHZlZEFzLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxvY2FsZTogbG9jYWxlXG4gICAgICAgICAgICAgICAgICAgICAgICB9KSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGlzU2VydmVyUmVuZGVyOiBmYWxzZSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlSlNPTjogdHJ1ZSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGluZmxpZ2h0Q2FjaGU6IF90aGlzLnNkYyxcbiAgICAgICAgICAgICAgICAgICAgICAgIHBlcnNpc3RDYWNoZTogIV90aGlzLmlzUHJldmlldyxcbiAgICAgICAgICAgICAgICAgICAgICAgIGlzUHJlZmV0Y2g6IHRydWUsXG4gICAgICAgICAgICAgICAgICAgICAgICB1bnN0YWJsZV9za2lwQ2xpZW50Q2FjaGU6IG9wdGlvbnMudW5zdGFibGVfc2tpcENsaWVudENhY2hlIHx8IG9wdGlvbnMucHJpb3JpdHlcbiAgICAgICAgICAgICAgICAgICAgfSkudGhlbigoKT0+ZmFsc2UpIDogZmFsc2U7XG4gICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgICAgX3RoaXMucGFnZUxvYWRlcltvcHRpb25zLnByaW9yaXR5ID8gJ2xvYWRQYWdlJyA6ICdwcmVmZXRjaCddKHJvdXRlKSwgXG4gICAgICAgICAgICBdKTtcbiAgICAgICAgfSkoKTtcbiAgICB9XG4gICAgZmV0Y2hDb21wb25lbnQocm91dGUpIHtcbiAgICAgICAgdmFyIF90aGlzID0gdGhpcztcbiAgICAgICAgcmV0dXJuIF9hc3luY1RvR2VuZXJhdG9yKGZ1bmN0aW9uKigpIHtcbiAgICAgICAgICAgIGNvbnN0IGhhbmRsZUNhbmNlbGxlZCA9IGdldENhbmNlbGxlZEhhbmRsZXIoe1xuICAgICAgICAgICAgICAgIHJvdXRlLFxuICAgICAgICAgICAgICAgIHJvdXRlcjogX3RoaXNcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICBjb25zdCBjb21wb25lbnRSZXN1bHQgPSB5aWVsZCBfdGhpcy5wYWdlTG9hZGVyLmxvYWRQYWdlKHJvdXRlKTtcbiAgICAgICAgICAgICAgICBoYW5kbGVDYW5jZWxsZWQoKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gY29tcG9uZW50UmVzdWx0O1xuICAgICAgICAgICAgfSBjYXRjaCAoZXJyKSB7XG4gICAgICAgICAgICAgICAgaGFuZGxlQ2FuY2VsbGVkKCk7XG4gICAgICAgICAgICAgICAgdGhyb3cgZXJyO1xuICAgICAgICAgICAgfVxuICAgICAgICB9KSgpO1xuICAgIH1cbiAgICBfZ2V0RGF0YShmbikge1xuICAgICAgICBsZXQgY2FuY2VsbGVkID0gZmFsc2U7XG4gICAgICAgIGNvbnN0IGNhbmNlbCA9ICgpPT57XG4gICAgICAgICAgICBjYW5jZWxsZWQgPSB0cnVlO1xuICAgICAgICB9O1xuICAgICAgICB0aGlzLmNsYyA9IGNhbmNlbDtcbiAgICAgICAgcmV0dXJuIGZuKCkudGhlbigoZGF0YSk9PntcbiAgICAgICAgICAgIGlmIChjYW5jZWwgPT09IHRoaXMuY2xjKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5jbGMgPSBudWxsO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKGNhbmNlbGxlZCkge1xuICAgICAgICAgICAgICAgIGNvbnN0IGVyciA9IG5ldyBFcnJvcignTG9hZGluZyBpbml0aWFsIHByb3BzIGNhbmNlbGxlZCcpO1xuICAgICAgICAgICAgICAgIGVyci5jYW5jZWxsZWQgPSB0cnVlO1xuICAgICAgICAgICAgICAgIHRocm93IGVycjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBkYXRhO1xuICAgICAgICB9KTtcbiAgICB9XG4gICAgX2dldEZsaWdodERhdGEoZGF0YUhyZWYpIHtcbiAgICAgICAgLy8gRG8gbm90IGNhY2hlIFJTQyBmbGlnaHQgcmVzcG9uc2Ugc2luY2UgaXQncyBub3QgYSBzdGF0aWMgcmVzb3VyY2VcbiAgICAgICAgcmV0dXJuIGZldGNoTmV4dERhdGEoe1xuICAgICAgICAgICAgZGF0YUhyZWYsXG4gICAgICAgICAgICBpc1NlcnZlclJlbmRlcjogdHJ1ZSxcbiAgICAgICAgICAgIHBhcnNlSlNPTjogZmFsc2UsXG4gICAgICAgICAgICBpbmZsaWdodENhY2hlOiB0aGlzLnNkYyxcbiAgICAgICAgICAgIHBlcnNpc3RDYWNoZTogZmFsc2UsXG4gICAgICAgICAgICBpc1ByZWZldGNoOiBmYWxzZVxuICAgICAgICB9KS50aGVuKCh7IHRleHQgIH0pPT4oe1xuICAgICAgICAgICAgICAgIGRhdGE6IHRleHRcbiAgICAgICAgICAgIH0pKTtcbiAgICB9XG4gICAgZ2V0SW5pdGlhbFByb3BzKENvbXBvbmVudCwgY3R4KSB7XG4gICAgICAgIGNvbnN0IHsgQ29tcG9uZW50OiBBcHAgIH0gPSB0aGlzLmNvbXBvbmVudHNbJy9fYXBwJ107XG4gICAgICAgIGNvbnN0IEFwcFRyZWUgPSB0aGlzLl93cmFwQXBwKEFwcCk7XG4gICAgICAgIGN0eC5BcHBUcmVlID0gQXBwVHJlZTtcbiAgICAgICAgcmV0dXJuICgwLCBfdXRpbHMpLmxvYWRHZXRJbml0aWFsUHJvcHMoQXBwLCB7XG4gICAgICAgICAgICBBcHBUcmVlLFxuICAgICAgICAgICAgQ29tcG9uZW50LFxuICAgICAgICAgICAgcm91dGVyOiB0aGlzLFxuICAgICAgICAgICAgY3R4XG4gICAgICAgIH0pO1xuICAgIH1cbiAgICBnZXQgcm91dGUoKSB7XG4gICAgICAgIHJldHVybiB0aGlzLnN0YXRlLnJvdXRlO1x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e1xuICAgICAgICAgICAgICAgICAgICBwYXRobmFtZTogKDAsIF9hZGRCYXNlUGF0aCkuYWRkQmFzZVBhdGgocGF0aG5hbWUpLFxuICAgICAgICAgICAgICAgICAgICBxdWVyeVxuICAgICAgICAgICAgICAgIH0pLCAoMCwgX3V0aWxzKS5nZXRVUkwoKSk7XG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgLy8gX19OQSBpcyB1c2VkIHRvIGlkZW50aWZ5IGlmIHRoZSBoaXN0b3J5IGVudHJ5IGNhbiBiZSBoYW5kbGVkIGJ5IHRoZSBhcHAtcm91dGVyLlxuICAgICAgICAgICAgaWYgKHN0YXRlLl9fTkEpIHtcbiAgICAgICAgICAgICAgICB3aW5kb3cubG9jYXRpb24ucmVsb2FkKCk7XG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCFzdGF0ZS5fX04pIHtcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICAvLyBTYWZhcmkgZmlyZXMgcG9wc3RhdGVldmVudCB3aGVuIHJlb3BlbmluZyB0aGUgYnJvd3Nlci5cbiAgICAgICAgICAgIGlmIChpc0ZpcnN0UG9wU3RhdGVFdmVudCAmJiB0aGlzLmxvY2FsZSA9PT0gc3RhdGUub3B0aW9ucy5sb2NhbGUgJiYgc3RhdGUuYXMgPT09IHRoaXMuYXNQYXRoKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgbGV0IGZvcmNlZFNjcm9sbDtcbiAgICAgICAgICAgIGNvbnN0IHsgdXJsICwgYXMgLCBvcHRpb25zICwga2V5ICB9ID0gc3RhdGU7XG4gICAgICAgICAgICBpZiAocHJvY2Vzcy5lbnYuX19ORVhUX1NDUk9MTF9SRVNUT1JBVElPTikge1xuICAgICAgICAgICAgICAgIGlmIChtYW51YWxTY3JvbGxSZXN0b3JhdGlvbikge1xuICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5fa2V5ICE9PSBrZXkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIFNuYXBzaG90IGN1cnJlbnQgc2Nyb2xsIHBvc2l0aW9uOlxuICAgICAgICAgICAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZXNzaW9uU3RvcmFnZS5zZXRJdGVtKCdfX25leHRfc2Nyb2xsXycgKyB0aGlzLl9rZXksIEpTT04uc3RyaW5naWZ5KHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgeDogc2VsZi5wYWdlWE9mZnNldCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgeTogc2VsZi5wYWdlWU9mZnNldFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHt9XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBSZXN0b3JlIG9sZCBzY3JvbGwgcG9zaXRpb246XG4gICAgICAgICAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHYgPSBzZXNzaW9uU3RvcmFnZS5nZXRJdGVtKCdfX25leHRfc2Nyb2xsXycgKyBrZXkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvcmNlZFNjcm9sbCA9IEpTT04ucGFyc2Uodik7XG4gICAgICAgICAgICAgICAgICAgICAgICB9IGNhdGNoIChlMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvcmNlZFNjcm9sbCA9IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgeDogMCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgeTogMFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4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uICAgICAgICAgICAgcXVlcnk6IHF1ZXJ5MSxcbiAgICAgICAgICAgIGFzUGF0aDogYXV0b0V4cG9ydER5bmFtaWMgPyBwYXRobmFtZTEgOiBhczEsXG4gICAgICAgICAgICBpc1ByZXZpZXc6ICEhaXNQcmV2aWV3LFxuICAgICAgICAgICAgbG9jYWxlOiBwcm9jZXNzLmVudi5fX05FWFRfSTE4Tl9TVVBQT1JUID8gbG9jYWxlIDogdW5kZWZpbmVkLFxuICAgICAgICAgICAgaXNGYWxsYmFja1xuICAgICAgICB9O1xuICAgICAgICB0aGlzLl9pbml0aWFsTWF0Y2hlc01pZGRsZXdhcmVQcm9taXNlID0gUHJvbWlzZS5yZXNvbHZlKGZhbHNlKTtcbiAgICAgICAgaWYgKHR5cGVvZiB3aW5kb3cgIT09ICd1bmRlZmluZWQnKSB7XG4gICAgICAgICAgICAvLyBtYWtlIHN1cmUgXCJhc1wiIGRvZXNuJ3Qgc3RhcnQgd2l0aCBkb3VibGUgc2xhc2hlcyBvciBlbHNlIGl0IGNhblxuICAgICAgICAgICAgLy8gdGhyb3cgYW4gZXJyb3IgYXMgaXQncyBjb25zaWRlcmVkIGludmFsaWRcbiAgICAgICAgICAgIGlmICghYXMxLnN0YXJ0c1dpdGgoJy8vJykpIHtcbiAgICAgICAgICAgICAgICAvLyBpbiBvcmRlciBmb3IgYGUuc3RhdGVgIHRvIHdvcmsgb24gdGhlIGBvbnBvcHN0YXRlYCBldmVudFxuICAgICAgICAgICAgICAgIC8vIHdlIGhhdmUgdG8gcmVnaXN0ZXIgdGhlIGluaXRpYWwgcm91dGUgdXBvbiBpbml0aWFsaXphdGlvblxuICAgICAgICAgICAgICAgIGNvbnN0IG9wdGlvbnMgPSB7XG4gICAgICAgICAgICAgICAgICAgIGxvY2FsZVxuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgY29uc3QgYXNQYXRoID0gKDAsIF91dGlscykuZ2V0VVJMKCk7XG4gICAgICAgICAgICAgICAgdGhpcy5faW5pdGlhbE1hdGNoZXNNaWRkbGV3YXJlUHJvbWlzZSA9IG1hdGNoZXNNaWRkbGV3YXJlKHtcbiAgICAgICAgICAgICAgICAgICAgcm91dGVyOiB0aGlzLFxuICAgICAgICAgICAgICAgICAgICBsb2NhbGUsXG4gICAgICAgICAgICAgICAgICAgIGFzUGF0aFxuICAgICAgICAgICAgICAgIH0pLnRoZW4oKG1hdGNoZXMpPT57XG4gICAgICAgICAgICAgICAgICAgIG9wdGlvbnMuX3Nob3VsZFJlc29sdmVIcmVmID0gYXMxICE9PSBwYXRobmFtZTE7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuY2hhbmdlU3RhdGUoJ3JlcGxhY2VTdGF0ZScsIG1hdGNoZXMgPyBhc1BhdGggOiAoMCwgX2Zvcm1hdFVybCkuZm9ybWF0V2l0aFZhbGlkYXRpb24oe1xuICAgICAgICAgICAgICAgICAgICAgICAgcGF0aG5hbWU6ICgwLCBfYWRkQmFzZVBhdGgpLmFkZEJhc2VQYXRoKHBhdGhuYW1lMSksXG4gICAgICAgICAgICAgICAgICAgICAgICBxdWVyeTogcXVlcnkxXG4gICAgICAgICAgICAgICAgICAgIH0pLCBhc1BhdGgsIG9wdGlvbnMpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gbWF0Y2hlcztcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHdpbmRvdy5hZGRFdmVudExpc3RlbmVyKCdwb3BzdGF0ZScsIHRoaXMub25Qb3BTdGF0ZSk7XG4gICAgICAgICAgICAvLyBlbmFibGUgY3VzdG9tIHNjcm9sbCByZXN0b3JhdGlvbiBoYW5kbGluZyB3aGVuIGF2YWlsYWJsZVxuICAgICAgICAgICAgLy8gb3RoZXJ3aXNlIGZhbGxiYWNrIHRvIGJyb3dzZXIncyBkZWZhdWx0IGhhbmRsaW5nXG4gICAgICAgICAgICBpZiAocHJvY2Vzcy5lbnYuX19ORVhUX1NDUk9MT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cbiAgICByZXR1cm4gbWF0Y2hlc01pZGRsZXdhcmUob3B0aW9ucykudGhlbigobWF0Y2hlcyk9PntcbiAgICAgICAgaWYgKG1hdGNoZXMgJiYgb3B0aW9ucy5mZXRjaERhdGEpIHtcbiAgICAgICAgICAgIHJldHVybiBvcHRpb25zLmZldGNoRGF0YSgpLnRoZW4oKGRhdGEpPT5nZXRNaWRkbGV3YXJlRGF0YShkYXRhLmRhdGFIcmVmLCBkYXRhLnJlc3BvbnNlLCBvcHRpb25zKS50aGVuKChlZmZlY3QpPT4oe1xuICAgICAgICAgICAgICAgICAgICAgICAgZGF0YUhyZWY6IGRhdGEuZGF0YUhyZWYsXG4gICAgICAgICAgICAgICAgICAgICAgICBqc29uOiBkYXRhLmpzb24sXG4gICAgICAgICAgICAgICAgICAgICAgICByZXNwb25zZTogZGF0YS5yZXNwb25zZSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHRleHQ6IGRhdGEudGV4dCxcbiAgICAgICAgICAgICAgICAgICAgICAgIGVmZmVjdFxuICAgICAgICAgICAgICAgICAgICB9KSkpLmNhdGNoKChfZXJyKT0+e1xuICAgICAgICAgICAgICAgIC8qKlxuICAgICAgICAgICAqIFRPRE86IFJldmlzaXQgdGhpcyBpbiB0aGUgZnV0dXJlLlxuICAgICAgICAgICAqIEZvciBub3cgd2Ugd2lsbCBub3QgY29uc2lkZXIgbWlkZGxld2FyZSBkYXRhIGVycm9ycyB0byBiZSBmYXRhbC5cbiAgICAgICAgICAgKiBtYXliZSB3ZSBzaG91bGQgcmV2aXNpdCBpbiB0aGUgZnV0dXJlLlxuICAgICAgICAgICAqLyByZXR1cm4gbnVsbDtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBudWxsO1xuICAgIH0pO1xufVxuZnVuY3Rpb24gZ2V0TWlkZGxld2FyZURhdGEoc291cmNlLCByZXNwb25zZSwgb3B0aW9ucykge1xuICAgIGNvbnN0IG5leHRDb25maWcgPSB7XG4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oMCwgX3BhcnNlUmVsYXRpdmVVcmwpLnBhcnNlUmVsYXRpdmVVcmwoc291cmNlKS5wYXRobmFtZSwge1xuICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VEYXRhOiB0cnVlXG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICBhcyA9ICgwLCBfYWRkQmFzZVBhdGgpLmFkZEJhc2VQYXRoKHBhcnNlZFNvdXJjZS5wYXRobmFtZSk7XG4gICAgICAgICAgICAgICAgICAgIHBhcnNlZFJld3JpdGVUYXJnZXQucGF0aG5hbWUgPSBhcztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKHByb2Nlc3MuZW52Ll9fTkVYVF9IQVNfUkVXUklURVMpIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgcmVzdWx0ID0gKDAsIF9yZXNvbHZlUmV3cml0ZXMpLmRlZmF1bHQoYXMsIHBhZ2VzLCByZXdyaXRlcywgcGFyc2VkUmV3cml0ZVRhcmdldC5xdWVyeSwgKHBhdGgpPT5yZXNvbHZlRHluYW1pY1JvdXRlKHBhdGgsIHBhZ2VzKSwgb3B0aW9ucy5yb3V0ZXIubG9jYWxlcyk7XG4gICAgICAgICAgICAgICAgICAgIGlmIChyZXN1bHQubWF0Y2hlZFBhZ2UpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlZFJld3JpdGVUYXJnZXQucGF0aG5hbWUgPSByZXN1bHQucGFyc2VkQXMucGF0aG5hbWU7XG4gICAgICAgICAgICAgICAgICAgICAgICBhcyA9IHBhcnNlZFJld3JpdGVUYXJnZXQucGF0aG5hbWU7XG4gICAgICAgICAgICAgICAgICAgICAgICBPYmplY3QuYXNzaWduKHBhcnNlZFJld3JpdGVUYXJnZXQucXVlcnksIHJlc3VsdC5wYXJzZWRBcy5xdWVyeSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICA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FtZSIsInBhcnNlZFNvdXJjZSIsInBhdGgiLCJzcmMiLCJmb3JtYXROZXh0UGF0aG5hbWVJbmZvIiwiYnVpbGRJZCIsInJlZGlyZWN0VGFyZ2V0Il0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///../node_modules/next/dist/shared/lib/router/router.js\n"));
/***/ }),
/***/ "../node_modules/next/dist/shared/lib/router/utils/add-locale.js":
/*!***********************************************************************!*\
!*** ../node_modules/next/dist/shared/lib/router/utils/add-locale.js ***!
\***********************************************************************/
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.addLocale = addLocale;\nvar _addPathPrefix = __webpack_require__(/*! ./add-path-prefix */ \"../node_modules/next/dist/shared/lib/router/utils/add-path-prefix.js\");\nvar _pathHasPrefix = __webpack_require__(/*! ./path-has-prefix */ \"../node_modules/next/dist/shared/lib/router/utils/path-has-prefix.js\");\nfunction addLocale(path, locale, defaultLocale, ignorePrefix) {\n if (locale && locale !== defaultLocale && (ignorePrefix || !(0, _pathHasPrefix).pathHasPrefix(path.toLowerCase(), \"/\".concat(locale.toLowerCase())) && !(0, _pathHasPrefix).pathHasPrefix(path.toLowerCase(), \"/api\"))) {\n return (0, _addPathPrefix).addPathPrefix(path, \"/\".concat(locale));\n }\n return path;\n} //# sourceMappingURL=add-locale.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9zaGFyZWQvbGliL3JvdXRlci91dGlscy9hZGQtbG9jYWxlLmpzLmpzIiwibWFwcGluZ3MiOiJBQUFhO0FBQ2JBLDhDQUE2QztJQUN6Q0csS0FBSyxFQUFFLElBQUk7Q0FDZCxFQUFDLENBQUM7QUFDSEQsaUJBQWlCLEdBQUdFLFNBQVMsQ0FBQztBQUM5QixJQUFJQyxjQUFjLEdBQUdDLG1CQUF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jYWxlO1xudmFyIF9hZGRQYXRoUHJlZml4ID0gcmVxdWlyZShcIi4vYWRkLXBhdGgtcHJlZml4XCIpO1xudmFyIF9wYXRoSGFzUHJlZml4ID0gcmVxdWlyZShcIi4vcGF0aC1oYXMtcHJlZml4XCIpO1xuZnVuY3Rpb24gYWRkTG9jYWxlKHBhdGgsIGxvY2FsZSwgZGVmYXVsdExvY2FsZSwgaWdub3JlUHJlZml4KSB7XG4gICAgaWYgKGxvY2FsZSAmJiBsb2NhbGUgIT09IGRlZmF1bHRMb2NhbGUgJiYgKGlnbm9yZVByZWZpeCB8fCAhKDAsIF9wYXRoSGFzUHJlZml4KS5wYXRoSGFzUHJlZml4KHBhdGgudG9Mb3dlckNhc2UoKSwgYC8ke2xvY2FsZS50b0xvd2VyQ2FzZSgpfWApICYmICEoMCwgX3BhdGhIYXNQcmVmaXgpLnBhdGhIYXNQcmVmaXgocGF0aC50b0xvd2VyQ2FzZSgpLCAnL2FwaScpKSkge1xuICAgICAgICByZXR1cm4gKDAsIF9hZGRQYXRoUHJlZml4KS5hZGRQYXRoUHJlZml4KHBhdGgsIGAvJHtsb2NhbGV9YCk7XG4gICAgfVxuICAgIHJldHVybiBwYXRoO1xufVxuXG4vLyMgc291cmNlTWFwcGluZ1VSTD1hZGQtbG9jYWxlLmpzLm1hcCJdLCJuYW1lcyI6WyJPYmplY3QiLCJkZWZpbmVQcm9wZXJ0eSIsImV4cG9ydHMiLCJ2YWx1ZSIsImFkZExvY2FsZSIsIl9hZGRQYXRoUHJlZml4IiwicmVxdWlyZSIsIl9wYXRoSGFzUHJlZml4IiwicGF0aCIsImxvY2FsZSIsImRlZmF1bHRMb2NhbGUiLCJpZ25vcmVQcmVmaXgiLCJwYXRoSGFzUHJlZml4IiwidG9Mb3dlckNhc2UiLCJhZGRQYXRoUHJlZml4Il0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///../node_modules/next/dist/shared/lib/router/utils/add-locale.js\n"));
/***/ }),
/***/ "../node_modules/next/dist/shared/lib/router/utils/add-path-prefix.js":
/*!****************************************************************************!*\
!*** ../node_modules/next/dist/shared/lib/router/utils/add-path-prefix.js ***!
\****************************************************************************/
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.addPathPrefix = addPathPrefix;\nvar _parsePath = __webpack_require__(/*! ./parse-path */ \"../node_modules/next/dist/shared/lib/router/utils/parse-path.js\");\nfunction addPathPrefix(path, prefix) {\n if (!path.startsWith(\"/\") || !prefix) {\n return path;\n }\n var ref = (0, _parsePath).parsePath(path), pathname = ref.pathname, query = ref.query, hash = ref.hash;\n return \"\".concat(prefix).concat(pathname).concat(query).concat(hash);\n} //# sourceMappingURL=add-path-prefix.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9zaGFyZWQvbGliL3JvdXRlci91dGlscy9hZGQtcGF0aC1wcmVmaXguanMuanMiLCJtYXBwaW5ncyI6IkFBQWE7QUFDYkEsOENBQTZDO0lBQ3pDRyxLQUFLLEVBQUUsSUFBSTtDQUNkLEVBQUMsQ0FBQztBQUNIRCxxQkFBcUIsR0FBR0UsYUFBYSxDQUFDO0FBQ3RDLElBQUlDLFVBQVUsR0FBR0MsbUJBQU8sQ0FBQyxxRkFBYyxDQUFDO0FBQ3hDLFNBQVNGLGFBQWEsQ0FBQ0csSUFBSSxFQUFFQyxNQUFNLEVBQUU7SUFDakMsSUFBSSxDQUFDRCxJQUFJLENBQUNFLFVBQVUsQ0FBQyxHQUFHLENBQUMsSUFBSSxDQUFDRCxNQUFNLEVBQUU7UUFDbEMsT0FBT0QsSUFBSSxDQUFDO0tBQ2Y7SUFDRCxJQUFxQyxHQUErQixHQUEvQixDQUFDLENBQUMsRUFBRUYsVUFBVSxDQUFDLENBQUNLLFNBQVMsQ0FBQ0gsSUFBSSxDQU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291cmNlTWFwcGluZ1VSTD1hZGQtcGF0aC1wcmVmaXguanMubWFwIl0sIm5hbWVzIjpbIk9iamVjdCIsImRlZmluZVByb3BlcnR5IiwiZXhwb3J0cyIsInZhbHVlIiwiYWRkUGF0aFByZWZpeCIsIl9wYXJzZVBhdGgiLCJyZXF1aXJlIiwicGF0aCIsInByZWZpeCIsInN0YXJ0c1dpdGgiLCJwYXJzZVBhdGgiLCJwYXRobmFtZSIsInF1ZXJ5IiwiaGFzaCJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///../node_modules/next/dist/shared/lib/router/utils/add-path-prefix.js\n"));
/***/ }),
/***/ "../node_modules/next/dist/shared/lib/router/utils/add-path-suffix.js":
/*!****************************************************************************!*\
!*** ../node_modules/next/dist/shared/lib/router/utils/add-path-suffix.js ***!
\****************************************************************************/
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.addPathSuffix = addPathSuffix;\nvar _parsePath = __webpack_require__(/*! ./parse-path */ \"../node_modules/next/dist/shared/lib/router/utils/parse-path.js\");\nfunction addPathSuffix(path, suffix) {\n if (!path.startsWith(\"/\") || !suffix) {\n return path;\n }\n var ref = (0, _parsePath).parsePath(path), pathname = ref.pathname, query = ref.query, hash = ref.hash;\n return \"\".concat(pathname).concat(suffix).concat(query).concat(hash);\n} //# sourceMappingURL=add-path-suffix.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9zaGFyZWQvbGliL3JvdXRlci91dGlscy9hZGQtcGF0aC1zdWZmaXguanMuanMiLCJtYXBwaW5ncyI6IkFBQWE7QUFDYkEsOENBQTZDO0lBQ3pDRyxLQUFLLEVBQUUsSUFBSTtDQUNkLEVBQUMsQ0FBQztBQUNIRCxxQkFBcUIsR0FBR0UsYUFBYSxDQUFDO0FBQ3RD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W5jdGlvbiBhZGRQYXRoU3VmZml4KHBhdGgsIHN1ZmZpeCkge1xuICAgIGlmICghcGF0aC5zdGFydHNXaXRoKCcvJykgfHwgIXN1ZmZpeCkge1xuICAgICAgICByZXR1cm4gcGF0aDtcbiAgICB9XG4gICAgY29uc3QgeyBwYXRobmFtZSAsIHF1ZXJ5ICwgaGFzaCAgfSA9ICgwLCBfcGFyc2VQYXRoKS5wYXJzZVBhdGgocGF0aCk7XG4gICAgcmV0dXJuIGAke3BhdGhuYW1lfSR7c3VmZml4fSR7cXVlcnl9JHtoYXNofWA7XG59XG5cbi8vIyBzb3VyY2VNYXBwaW5nVVJMPWFkZC1wYXRoLXN1ZmZpeC5qcy5tYXAiXSwibmFtZXMiOlsiT2JqZWN0IiwiZGVmaW5lUHJvcGVydHkiLCJleHBvcnRzIiwidmFsdWUiLCJhZGRQYXRoU3VmZml4IiwiX3BhcnNlUGF0aCIsInJlcXVpcmUiLCJwYXRoIiwic3VmZml4Iiwic3RhcnRzV2l0aCIsInBhcnNlUGF0aCIsInBhdGhuYW1lIiwicXVlcnkiLCJoYXNoIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///../node_modules/next/dist/shared/lib/router/utils/add-path-suffix.js\n"));
/***/ }),
/***/ "../node_modules/next/dist/shared/lib/router/utils/format-next-pathname-info.js":
/*!**************************************************************************************!*\
!*** ../node_modules/next/dist/shared/lib/router/utils/format-next-pathname-info.js ***!
\**************************************************************************************/
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.formatNextPathnameInfo = formatNextPathnameInfo;\nvar _removeTrailingSlash = __webpack_require__(/*! ./remove-trailing-slash */ \"../node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.js\");\nvar _addPathPrefix = __webpack_require__(/*! ./add-path-prefix */ \"../node_modules/next/dist/shared/lib/router/utils/add-path-prefix.js\");\nvar _addPathSuffix = __webpack_require__(/*! ./add-path-suffix */ \"../node_modules/next/dist/shared/lib/router/utils/add-path-suffix.js\");\nvar _addLocale = __webpack_require__(/*! ./add-locale */ \"../node_modules/next/dist/shared/lib/router/utils/add-locale.js\");\nfunction formatNextPathnameInfo(info) {\n var pathname = (0, _addLocale).addLocale(info.pathname, info.locale, info.buildId ? undefined : info.defaultLocale, info.ignorePrefix);\n if (info.buildId) {\n pathname = (0, _addPathSuffix).addPathSuffix((0, _addPathPrefix).addPathPrefix(pathname, \"/_next/data/\".concat(info.buildId)), info.pathname === \"/\" ? \"index.json\" : \".json\");\n }\n pathname = (0, _addPathPrefix).addPathPrefix(pathname, info.basePath);\n return info.trailingSlash ? !info.buildId && !pathname.endsWith(\"/\") ? (0, _addPathSuffix).addPathSuffix(pathname, \"/\") : pathname : (0, _removeTrailingSlash).removeTrailingSlash(pathname);\n} //# sourceMappingURL=format-next-pathname-info.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9zaGFyZWQvbGliL3JvdXRlci91dGlscy9mb3JtYXQtbmV4dC1wYXRobmFtZS1pbmZvLmpzLmpzIiwibWFwcGluZ3MiOiJBQUFhO0FBQ2JBLDhDQUE2QztJQUN6Q0csS0FBSyxFQUFFLElBQUk7Q0FDZCxFQUFDLENBQUM7QUFDSEQsOEJBQThCLEdBQUdFLHNCQUFzQixDQUFDO0FBQ3hELElBQUlDLG9CQUFvQixHQUFHQyxtQkFBTyxDQUFDLDJHQUF5QixDQUFDO0FBQzdELElBQUlDLGNBQWMsR0FBR0QsbUJBQU8sQ0FBQywrRkFBbUIsQ0FBQztBQUNqRCxJQUFJRSxjQUFjLEdBQUdGLG1CQUFPLENBQUMsK0ZBQW1CLENBQUM7QUFDakQsSUFBSUcsVUFBVSxHQUFHSCxtQkFBTyxDQUFDLHFGQUFjLENBQUM7QUFDeEMsU0FBU0Ysc0JBQXNCLENBQUNNLElBQ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URL=webpack-internal:///../node_modules/next/dist/shared/lib/router/utils/format-next-pathname-info.js\n"));
/***/ }),
/***/ "../node_modules/next/dist/shared/lib/router/utils/format-url.js":
/*!***********************************************************************!*\
!*** ../node_modules/next/dist/shared/lib/router/utils/format-url.js ***!
\***********************************************************************/
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.formatUrl = formatUrl;\nexports.formatWithValidation = formatWithValidation;\nexports.urlObjectKeys = void 0;\nvar querystring = _interopRequireWildcard(__webpack_require__(/*! ./querystring */ \"../node_modules/next/dist/shared/lib/router/utils/querystring.js\"));\nfunction _getRequireWildcardCache() {\n if (typeof WeakMap !== \"function\") return null;\n var cache = new WeakMap();\n _getRequireWildcardCache = function _getRequireWildcardCache() {\n return cache;\n };\n return cache;\n}\nfunction _interopRequireWildcard(obj) {\n if (obj && obj.__esModule) {\n return obj;\n }\n if (obj === null || typeof obj !== \"object\" && typeof obj !== \"function\") {\n return {\n default: obj\n };\n }\n var cache = _getRequireWildcardCache();\n if (cache && cache.has(obj)) {\n return cache.get(obj);\n }\n var newObj = {};\n var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;\n for(var key in obj){\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;\n if (desc && (desc.get || desc.set)) {\n Object.defineProperty(newObj, key, desc);\n } else {\n newObj[key] = obj[key];\n }\n }\n }\n newObj.default = obj;\n if (cache) {\n cache.set(obj, newObj);\n }\n return newObj;\n}\nvar slashedProtocols = /https?|ftp|gopher|file/;\nfunction formatUrl(urlObj) {\n var auth = urlObj.auth, hostname = urlObj.hostname;\n var protocol = urlObj.protocol || \"\";\n var pathname = urlObj.pathname || \"\";\n var hash = urlObj.hash || \"\";\n var query = urlObj.query || \"\";\n var host = false;\n auth = auth ? encodeURIComponent(auth).replace(/%3A/i, \":\") + \"@\" : \"\";\n if (urlObj.host) {\n host = auth + urlObj.host;\n } else if (hostname) {\n host = auth + (~hostname.indexOf(\":\") ? \"[\".concat(hostname, \"]\") : hostname);\n if (urlObj.port) {\n host += \":\" + urlObj.port;\n }\n }\n if (query && typeof query === \"object\") {\n query = String(querystring.urlQueryToSearchParams(query));\n }\n var search = urlObj.search || query && \"?\".concat(query) || \"\";\n if (protocol && !protocol.endsWith(\":\")) protocol += \":\";\n if (urlObj.slashes || (!protocol || slashedProtocols.test(protocol)) && host !== false) {\n host = \"//\" + (host || \"\");\n if (pathname && pathname[0] !== \"/\") pathname = \"/\" + pathname;\n } else if (!host) {\n host = \"\";\n }\n if (hash && hash[0] !== \"#\") hash = \"#\" + hash;\n if (search && search[0] !== \"?\") search = \"?\" + search;\n pathname = pathname.replace(/[?#]/g, encodeURIComponent);\n search = search.replace(\"#\", \"%23\");\n return \"\".concat(protocol).concat(host).concat(pathname).concat(search).concat(hash);\n}\nvar urlObjectKeys = [\n \"auth\",\n \"hash\",\n \"host\",\n \"hostname\",\n \"href\",\n \"path\",\n \"pathname\",\n \"port\",\n \"protocol\",\n \"query\",\n \"search\",\n \"slashes\", \n];\nexports.urlObjectKeys = urlObjectKeys;\nfunction formatWithValidation(url) {\n if (true) {\n if (url !== null && typeof url === \"object\") {\n Object.keys(url).forEach(function(key) {\n if (urlObjectKeys.indexOf(key) === -1) {\n console.warn(\"Unknown key passed via urlObject into url.format: \".concat(key));\n }\n });\n }\n }\n return formatUrl(url);\n} //# sourceMappingURL=format-url.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9zaGFyZWQvbGliL3JvdXRlci91dGlscy9mb3JtYXQtdXJsLmpzLmpzIiwibWFwcGluZ3MiOiJBQUFhO0FBQ2JBLDhDQUE2QztJQUN6Q0csS0FBSyxFQUFFLElBQUk7Q0FDZCxFQUFDLENBQUM7QUFDSEQsa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0aG5hbWUiLCJoYXNoIiwicXVlcnkiLCJob3N0IiwiZW5jb2RlVVJJQ29tcG9uZW50IiwicmVwbGFjZSIsImluZGV4T2YiLCJwb3J0IiwiU3RyaW5nIiwidXJsUXVlcnlUb1NlYXJjaFBhcmFtcyIsInNlYXJjaCIsImVuZHNXaXRoIiwic2xhc2hlcyIsInRlc3QiLCJ1cmwiLCJwcm9jZXNzIiwia2V5cyIsImZvckVhY2giLCJjb25zb2xlIiwid2FybiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///../node_modules/next/dist/shared/lib/router/utils/format-url.js\n"));
/***/ }),
/***/ "../node_modules/next/dist/shared/lib/router/utils/get-asset-path-from-route.js":
/*!**************************************************************************************!*\
!*** ../node_modules/next/dist/shared/lib/router/utils/get-asset-path-from-route.js ***!
\**************************************************************************************/
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = getAssetPathFromRoute;\nfunction getAssetPathFromRoute(route) {\n var ext = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : \"\";\n var path = route === \"/\" ? \"/index\" : /^\\/index(\\/|$)/.test(route) ? \"/index\".concat(route) : \"\".concat(route);\n return path + ext;\n} //# sourceMappingURL=get-asset-path-from-route.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9zaGFyZWQvbGliL3JvdXRlci91dGlscy9nZXQtYXNzZXQtcGF0aC1mcm9tLXJvdXRlLmpzLmpzIiwibWFwcGluZ3MiOiJBQUFhO0FBQ2JBLDhDQUE2QztJQUN6Q0csS0FBSyxFQUFFLElBQUk7Q0FDZCxFQUFDLENBQUM7QUFDSEQsa0JBQWUsR0FBR0cscUJBQXFCLENBQUM7QUFDeEMsU0FBU0EscUJBQXFCLENBQUNDLEtBQUssRUFBWTtRQUFWQy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JkZWZhdWx0IiwiZ2V0QXNzZXRQYXRoRnJvbVJvdXRlIiwicm91dGUiLCJleHQiLCJwYXRoIiwidGVzdCJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///../node_modules/next/dist/shared/lib/router/utils/get-asset-path-from-route.js\n"));
/***/ }),
/***/ "../node_modules/next/dist/shared/lib/router/utils/get-next-pathname-info.js":
/*!***********************************************************************************!*\
!*** ../node_modules/next/dist/shared/lib/router/utils/get-next-pathname-info.js ***!
\***********************************************************************************/
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.getNextPathnameInfo = getNextPathnameInfo;\nvar _normalizeLocalePath = __webpack_require__(/*! ../../i18n/normalize-locale-path */ \"../node_modules/next/dist/shared/lib/i18n/normalize-locale-path.js\");\nvar _removePathPrefix = __webpack_require__(/*! ./remove-path-prefix */ \"../node_modules/next/dist/shared/lib/router/utils/remove-path-prefix.js\");\nvar _pathHasPrefix = __webpack_require__(/*! ./path-has-prefix */ \"../node_modules/next/dist/shared/lib/router/utils/path-has-prefix.js\");\nfunction getNextPathnameInfo(pathname, options) {\n var _nextConfig;\n var ref = (_nextConfig = options.nextConfig) != null ? _nextConfig : {}, basePath = ref.basePath, i18n = ref.i18n, trailingSlash = ref.trailingSlash;\n var info = {\n pathname: pathname,\n trailingSlash: pathname !== \"/\" ? pathname.endsWith(\"/\") : trailingSlash\n };\n if (basePath && (0, _pathHasPrefix).pathHasPrefix(info.pathname, basePath)) {\n info.pathname = (0, _removePathPrefix).removePathPrefix(info.pathname, basePath);\n info.basePath = basePath;\n }\n if (options.parseData === true && info.pathname.startsWith(\"/_next/data/\") && info.pathname.endsWith(\".json\")) {\n var paths = info.pathname.replace(/^\\/_next\\/data\\//, \"\").replace(/\\.json$/, \"\").split(\"/\");\n var buildId = paths[0];\n info.pathname = paths[1] !== \"index\" ? \"/\".concat(paths.slice(1).join(\"/\")) : \"/\";\n info.buildId = buildId;\n }\n if (i18n) {\n var pathLocale = (0, _normalizeLocalePath).normalizeLocalePath(info.pathname, i18n.locales);\n info.locale = pathLocale == null ? void 0 : pathLocale.detectedLocale;\n info.pathname = (pathLocale == null ? void 0 : pathLocale.pathname) || info.pathname;\n }\n return info;\n} //# sourceMappingURL=get-next-pathname-info.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9zaGFyZWQvbGliL3JvdXRlci91dGlscy9nZXQtbmV4dC1wYXRobmFtZS1pbmZvLmpzLmpzIiwibWFwcGluZ3MiOiJBQUFhO0FBQ2JBLDhDQUE2QztJQUN6Q0csS0FBSyxFQUFFLElBQUk7Q0FDZCxFQUFDLENBQUM7QUFDSEQsMkJBQTJCLEdBQUdFLG1CQUFtQixDQUFDO0FBQ2xELElBQUlDLG9CQUFvQixHQUFHQyxtQkFBTyxDQUFDLDRHQUFrQyxDQUFDO0FBQ3RFLElBQUlDLGlCQUFpQixHQUFHRCxtQkFBTyxDQUFDLHFHQUFzQixDQUFDO0FBQ3ZELElBQUlFLGNBQWMsR0FBR0YsbUJBQU8sQ0FBQywrRkFBbUIsQ0FBQztBQUNqRCxTQUFTRixtQkFBbUIsQ0FBQ0ssUUFBUSxFQUFFQyxPQUFPLEVBQUU7SUFDNUMsSUFBSUMsV0FBVztJQUNmLElBQTZDLEdBQTZELEdBQTdELENBQUNBLFdBQVcsR0FBR0QsT0FBTyxDQUFDRSxVQUFVLENBQUMsSUFBSSxJQUFJLEdBQUdELFdBQVcsR0FBRyxFQUFFLEVBQWxHRSxRQUFRLEdBQTZCLEdBQTZELENBQWxHQSxRQUFRLEVBQUdDLElBQUksR0FBc0IsR0FBNkQsQ0FBdkZBLElBQUksRUFBR0MsYUFBYSxHQUFNLEdBQTZELENBQWhGQSxhQUFhO0lBQ3ZDLElBQU1DLElBQUksR0FBRztRQUNUUCxRQUFRLEV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W5nU2xhc2giLCJpbmZvIiwiZW5kc1dpdGgiLCJwYXRoSGFzUHJlZml4IiwicmVtb3ZlUGF0aFByZWZpeCIsInBhcnNlRGF0YSIsInN0YXJ0c1dpdGgiLCJwYXRocyIsInJlcGxhY2UiLCJzcGxpdCIsImJ1aWxkSWQiLCJzbGljZSIsImpvaW4iLCJwYXRoTG9jYWxlIiwibm9ybWFsaXplTG9jYWxlUGF0aCIsImxvY2FsZXMiLCJsb2NhbGUiLCJkZXRlY3RlZExvY2FsZSJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///../node_modules/next/dist/shared/lib/router/utils/get-next-pathname-info.js\n"));
/***/ }),
/***/ "../node_modules/next/dist/shared/lib/router/utils/index.js":
/*!******************************************************************!*\
!*** ../node_modules/next/dist/shared/lib/router/utils/index.js ***!
\******************************************************************/
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"getSortedRoutes\", ({\n enumerable: true,\n get: function get() {\n return _sortedRoutes.getSortedRoutes;\n }\n}));\nObject.defineProperty(exports, \"isDynamicRoute\", ({\n enumerable: true,\n get: function get() {\n return _isDynamic.isDynamicRoute;\n }\n}));\nvar _sortedRoutes = __webpack_require__(/*! ./sorted-routes */ \"../node_modules/next/dist/shared/lib/router/utils/sorted-routes.js\");\nvar _isDynamic = __webpack_require__(/*! ./is-dynamic */ \"../node_modules/next/dist/shared/lib/router/utils/is-dynamic.js\"); //# sourceMappingURL=index.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9zaGFyZWQvbGliL3JvdXRlci91dGlscy9pbmRleC5qcy5qcyIsIm1hcHBpbmdzIjoiQUFBYTtBQUNiQSw4Q0FBNkM7SUFDekNHLEtBQUssRUFBRSxJQUFJO0NBQ2QsRUFBQyxDQUFDO0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W5jdGlvbigpIHtcbiAgICAgICAgcmV0dXJuIF9pc0R5bmFtaWMuaXNEeW5hbWljUm91dGU7XG4gICAgfVxufSk7XG52YXIgX3NvcnRlZFJvdXRlcyA9IHJlcXVpcmUoXCIuL3NvcnRlZC1yb3V0ZXNcIik7XG52YXIgX2lzRHluYW1pYyA9IHJlcXVpcmUoXCIuL2lzLWR5bmFtaWNcIik7XG5cbi8vIyBzb3VyY2VNYXBwaW5nVVJMPWluZGV4LmpzLm1hcCJdLCJuYW1lcyI6WyJPYmplY3QiLCJkZWZpbmVQcm9wZXJ0eSIsImV4cG9ydHMiLCJ2YWx1ZSIsImVudW1lcmFibGUiLCJnZXQiLCJfc29ydGVkUm91dGVzIiwiZ2V0U29ydGVkUm91dGVzIiwiX2lzRHluYW1pYyIsImlzRHluYW1pY1JvdXRlIiwicmVxdWlyZSJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///../node_modules/next/dist/shared/lib/router/utils/index.js\n"));
/***/ }),
/***/ "../node_modules/next/dist/shared/lib/router/utils/is-dynamic.js":
/*!***********************************************************************!*\
!*** ../node_modules/next/dist/shared/lib/router/utils/is-dynamic.js ***!
\***********************************************************************/
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.isDynamicRoute = isDynamicRoute;\n// Identify /[param]/ in route string\nvar TEST_ROUTE = /\\/\\[[^/]+?\\](?=\\/|$)/;\nfunction isDynamicRoute(route) {\n return TEST_ROUTE.test(route);\n} //# sourceMappingURL=is-dynamic.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9zaGFyZWQvbGliL3JvdXRlci91dGlscy9pcy1keW5hbWljLmpzLmpzIiwibWFwcGluZ3MiOiJBQUFhO0FBQ2JBLDhDQUE2QztJQUN6Q0csS0FBSyxFQUFFLElBQ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),
/***/ "../node_modules/next/dist/shared/lib/router/utils/parse-path.js":
/*!***********************************************************************!*\
!*** ../node_modules/next/dist/shared/lib/router/utils/parse-path.js ***!
\***********************************************************************/
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.parsePath = parsePath;\nfunction parsePath(path) {\n var hashIndex = path.indexOf(\"#\");\n var queryIndex = path.indexOf(\"?\");\n var hasQuery = queryIndex > -1 && (hashIndex < 0 || queryIndex < hashIndex);\n if (hasQuery || hashIndex > -1) {\n return {\n pathname: path.substring(0, hasQuery ? queryIndex : hashIndex),\n query: hasQuery ? path.substring(queryIndex, hashIndex > -1 ? hashIndex : undefined) : \"\",\n hash: hashIndex > -1 ? path.slice(hashIndex) : \"\"\n };\n }\n return {\n pathname: path,\n query: \"\",\n hash: \"\"\n };\n} //# sourceMappingURL=parse-path.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9zaGFyZWQvbGliL3JvdXRlci91dGlscy9wYXJzZS1wYXRoLmpzLmpzIiwibWFwcGluZ3MiOiJBQUFhO0FBQ2JBLDhDQUE2QztJQUN6Q0csS0FBSyxFQUFFLElBQUk7Q0FDZCxFQUFDLENBQUM7QUFDSEQsaUJBQWlCLEdBQUdFLFNBQVMsQ0FBQztBQUM5QixTQUFTQSxTQUFTLENBQUNDLElBQUksRUFBRTtJQUNyQixJQUFNQyxTQUFTLEdBQUdELElBQUksQ0FBQ0UsT0FBTyxDQUFDLEdBQUcsQ0FBQztJQUNuQyxJQUFNQyxVQUFVLEdBQUdILElBQUksQ0FBQ0UsT0FBTyxDQUFDLEdBQUcsQ0FBQztJQUNwQyxJQUFNRSxRQUFRLEdBQUdELFVBQVUsR0FBRyxDQUFDLENBQUMsSUFBSSxDQUFDRixTQUFTLEdBQUcsQ0FBQyxJQUFJRSxVQUFVL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c3QgcXVlcnlJbmRleCA9IHBhdGguaW5kZXhPZignPycpO1xuICAgIGNvbnN0IGhhc1F1ZXJ5ID0gcXVlcnlJbmRleCA+IC0xICYmIChoYXNoSW5kZXggPCAwIHx8IHF1ZXJ5SW5kZXggPCBoYXNoSW5kZXgpO1xuICAgIGlmIChoYXNRdWVyeSB8fCBoYXNoSW5kZXggPiAtMSkge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgcGF0aG5hbWU6IHBhdGguc3Vic3RyaW5nKDAsIGhhc1F1ZXJ5ID8gcXVlcnlJbmRleCA6IGhhc2hJbmRleCksXG4gICAgICAgICAgICBxdWVyeTogaGFzUXVlcnkgPyBwYXRoLnN1YnN0cmluZyhxdWVyeUluZGV4LCBoYXNoSW5kZXggPiAtMSA/IGhhc2hJbmRleCA6IHVuZGVmaW5lZCkgOiAnJyxcbiAgICAgICAgICAgIGhhc2g6IGhhc2hJbmRleCA+IC0xID8gcGF0aC5zbGljZShoYXNoSW5kZXgpIDogJydcbiAgICAgICAgfTtcbiAgICB9XG4gICAgcmV0dXJuIHtcbiAgICAgICAgcGF0aG5hbWU6IHBhdGgsXG4gICAgICAgIHF1ZXJ5OiAnJyxcbiAgICAgICAgaGFzaDogJydcbiAgICB9O1xufVxuXG4vLyMgc291cmNlTWFwcGluZ1VSTD1wYXJzZS1wYXRoLmpzLm1hcCJdLCJuYW1lcyI6WyJPYmplY3QiLCJkZWZpbmVQcm9wZXJ0eSIsImV4cG9ydHMiLCJ2YWx1ZSIsInBhcnNlUGF0aCIsInBhdGgiLCJoYXNoSW5kZXgiLCJpbmRleE9mIiwicXVlcnlJbmRleCIsImhhc1F1ZXJ5IiwicGF0aG5hbWUiLCJzdWJzdHJpbmciLCJxdWVyeSIsInVuZGVmaW5lZCIsImhhc2giLCJzbGljZSJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///../node_modules/next/dist/shared/lib/router/utils/parse-path.js\n"));
/***/ }),
/***/ "../node_modules/next/dist/shared/lib/router/utils/parse-relative-url.js":
/*!*******************************************************************************!*\
!*** ../node_modules/next/dist/shared/lib/router/utils/parse-relative-url.js ***!
\*******************************************************************************/
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.parseRelativeUrl = parseRelativeUrl;\nvar _utils = __webpack_require__(/*! ../../utils */ \"../node_modules/next/dist/shared/lib/utils.js\");\nvar _querystring = __webpack_require__(/*! ./querystring */ \"../node_modules/next/dist/shared/lib/router/utils/querystring.js\");\nfunction parseRelativeUrl(url, base) {\n var globalBase = new URL( false ? 0 : (0, _utils).getLocationOrigin());\n var resolvedBase = base ? new URL(base, globalBase) : url.startsWith(\".\") ? new URL( false ? 0 : window.location.href) : globalBase;\n var ref = new URL(url, resolvedBase), pathname = ref.pathname, searchParams = ref.searchParams, search = ref.search, hash = ref.hash, href = ref.href, origin = ref.origin;\n if (origin !== globalBase.origin) {\n throw new Error(\"invariant: invalid relative URL, router received \".concat(url));\n }\n return {\n pathname: pathname,\n query: (0, _querystring).searchParamsToUrlQuery(searchParams),\n search: search,\n hash: hash,\n href: href.slice(globalBase.origin.length)\n };\n} //# sourceMappingURL=parse-relative-url.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9zaGFyZWQvbGliL3JvdXRlci91dGlscy9wYXJzZS1yZWxhdGl2ZS11cmwuanMuanMiLCJtYXBwaW5ncyI6IkFBQWE7QUFDYkEsOENBQTZDO0lBQ3pDRyxLQUFLLEVBQUUsSUFBSTtDQUNkLEVBQUMsQ0FBQztBQUNIRCx3QkFBd0IsR0FBR0UsZ0JBQWdCLENBQUM7QUFDNUMsSUFBSUMsTUFBTSxHQUFHQyxtQkFBTyxDQUFDLGtFQUFhLENBQUM7QUFDbkMsSUFBSUMsWUFBWSxHQUFHRCxtQkFBTyxDQUFD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yYW1zIiwic2VhcmNoIiwiaGFzaCIsIm9yaWdpbiIsIkVycm9yIiwicXVlcnkiLCJzZWFyY2hQYXJhbXNUb1VybFF1ZXJ5Iiwic2xpY2UiLCJsZW5ndGgiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///../node_modules/next/dist/shared/lib/router/utils/parse-relative-url.js\n"));
/***/ }),
/***/ "../node_modules/next/dist/shared/lib/router/utils/path-has-prefix.js":
/*!****************************************************************************!*\
!*** ../node_modules/next/dist/shared/lib/router/utils/path-has-prefix.js ***!
\****************************************************************************/
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.pathHasPrefix = pathHasPrefix;\nvar _parsePath = __webpack_require__(/*! ./parse-path */ \"../node_modules/next/dist/shared/lib/router/utils/parse-path.js\");\nfunction pathHasPrefix(path, prefix) {\n if (typeof path !== \"string\") {\n return false;\n }\n var pathname = (0, _parsePath).parsePath(path).pathname;\n return pathname === prefix || pathname.startsWith(prefix + \"/\");\n} //# sourceMappingURL=path-has-prefix.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9zaGFyZWQvbGliL3JvdXRlci91dGlscy9wYXRoLWhhcy1wcmVmaXguanMuanMiLCJtYXBwaW5ncyI6IkFBQWE7QUFDYkEsOENBQTZDO0lBQ3pDRyxLQUFLLEVBQUUsSUFBSTtDQUNkLEVBQUMsQ0FBQztBQUNIRCxxQkFBcUIsR0FBR0UsYUFBYSxDQUFDO0FBQ3RDLElBQUlDLFVBQVUsR0FBR0MsbUJBQU8sQ0FBQyxxRkFBYyxDQUFDO0FBQ3hDLFNBQVNGLGFBQWEsQ0FBQ0csSUFBSSxFQUFFQyxNQUFNLEVBQUU7SUFDakMsSUFBSSxPQUFPRCxJQUFJLEtBQUssUUFBUSxFQUFFO1FBQzFC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wiZGVmaW5lUHJvcGVydHkiLCJleHBvcnRzIiwidmFsdWUiLCJwYXRoSGFzUHJlZml4IiwiX3BhcnNlUGF0aCIsInJlcXVpcmUiLCJwYXRoIiwicHJlZml4IiwicGF0aG5hbWUiLCJwYXJzZVBhdGgiLCJzdGFydHNXaXRoIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///../node_modules/next/dist/shared/lib/router/utils/path-has-prefix.js\n"));
/***/ }),
/***/ "../node_modules/next/dist/shared/lib/router/utils/querystring.js":
/*!************************************************************************!*\
!*** ../node_modules/next/dist/shared/lib/router/utils/querystring.js ***!
\************************************************************************/
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nvar _slicedToArray = (__webpack_require__(/*! @swc/helpers/lib/_sliced_to_array.js */ \"../node_modules/@swc/helpers/lib/_sliced_to_array.js\")[\"default\"]);\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.searchParamsToUrlQuery = searchParamsToUrlQuery;\nexports.urlQueryToSearchParams = urlQueryToSearchParams;\nexports.assign = assign;\nfunction searchParamsToUrlQuery(searchParams) {\n var query = {};\n searchParams.forEach(function(value, key) {\n if (typeof query[key] === \"undefined\") {\n query[key] = value;\n } else if (Array.isArray(query[key])) {\n query[key].push(value);\n } else {\n query[key] = [\n query[key],\n value\n ];\n }\n });\n return query;\n}\nfunction stringifyUrlQueryParam(param) {\n if (typeof param === \"string\" || typeof param === \"number\" && !isNaN(param) || typeof param === \"boolean\") {\n return String(param);\n } else {\n return \"\";\n }\n}\nfunction urlQueryToSearchParams(urlQuery) {\n var result = new URLSearchParams();\n Object.entries(urlQuery).forEach(function(param) {\n var _param = _slicedToArray(param, 2), key = _param[0], value = _param[1];\n if (Array.isArray(value)) {\n value.forEach(function(item) {\n return result.append(key, stringifyUrlQueryParam(item));\n });\n } else {\n result.set(key, stringifyUrlQueryParam(value));\n }\n });\n return result;\n}\nfunction assign(target) {\n for(var _len = arguments.length, searchParamsList = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++){\n searchParamsList[_key - 1] = arguments[_key];\n }\n searchParamsList.forEach(function(searchParams) {\n Array.from(searchParams.keys()).forEach(function(key) {\n return target.delete(key);\n });\n searchParams.forEach(function(value, key) {\n return target.append(key, value);\n });\n });\n return target;\n} //# sourceMappingURL=querystring.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9zaGFyZWQvbGliL3JvdXRlci91dGlscy9xdWVyeXN0cmluZy5qcy5qcyIsIm1hcHBpbmdzIjoiQUFBYTs7Ozs7QUFDYkEsOENBQTZDO0lBQ3pDRyxLQUFLLEVBQUUsSUFBSTtDQUNkLEVBQUMsQ0FBQztBQUNIRCw4QkFBOEIsR0FBR0Usc0JBQXNCLENBQUM7QUFDeERGLDhCQUE4QixHQUFHRyxzQkFBc0IsQ0FBQztBQUN4REgsY0FBYyxHQUFHSSxNQUFNLENBQUM7QUFDeEIsU0FBU0Ysc0JBQXNCLENBQUNHLFlBQVksRUFBRTtJQUMxQyxJQUFNQyxLQUFLLEdBQUcsRUFBRTtJQUNoQkQsWUFBWSxDQUFDRSxPQUFPLENBQUMsU0FBQ04sS0FBSyxFQUFFTyxHQUFHLEVBQUc7UUFDL0IsSUFBSSxPQUFPRixLQUFLLENBQUNFLEdBQUcsQ0FBQyxLQUFLLFdBQVcsRUFBRTtZQUNuQ0YsS0FBSyxDQUFDRSxHQUFHLENBQUMsR0FBR1AsS0FBSyxDQUFDO1NBQ3RCLE1BQU0sSUFBSVEsS0FBSyxDQUFDQyxPQUFPLENBQUNKLEtBQUssQ0FBQ0UsR0FBRyxDQUFDLENBQUMsRUFBRTtZQUNsQ0YsS0FBSyxDQUFDRSxHQUFHLENBQUMsQ0FBQ0csSUFBSSxDQUFDVixLQUFLLENBQUMsQ0FBQzt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WFwIl0sIm5hbWVzIjpbIk9iamVjdCIsImRlZmluZVByb3BlcnR5IiwiZXhwb3J0cyIsInZhbHVlIiwic2VhcmNoUGFyYW1zVG9VcmxRdWVyeSIsInVybFF1ZXJ5VG9TZWFyY2hQYXJhbXMiLCJhc3NpZ24iLCJzZWFyY2hQYXJhbXMiLCJxdWVyeSIsImZvckVhY2giLCJrZXkiLCJBcnJheSIsImlzQXJyYXkiLCJwdXNoIiwic3RyaW5naWZ5VXJsUXVlcnlQYXJhbSIsInBhcmFtIiwiaXNOYU4iLCJTdHJpbmciLCJ1cmxRdWVyeSIsInJlc3VsdCIsIlVSTFNlYXJjaFBhcmFtcyIsImVudHJpZXMiLCJpdGVtIiwiYXBwZW5kIiwic2V0IiwidGFyZ2V0Iiwic2VhcmNoUGFyYW1zTGlzdCIsImZyb20iLCJrZXlzIiwiZGVsZXRlIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///../node_modules/next/dist/shared/lib/router/utils/querystring.js\n"));
/***/ }),
/***/ "../node_modules/next/dist/shared/lib/router/utils/remove-path-prefix.js":
/*!*******************************************************************************!*\
!*** ../node_modules/next/dist/shared/lib/router/utils/remove-path-prefix.js ***!
\*******************************************************************************/
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.removePathPrefix = removePathPrefix;\nvar _pathHasPrefix = __webpack_require__(/*! ./path-has-prefix */ \"../node_modules/next/dist/shared/lib/router/utils/path-has-prefix.js\");\nfunction removePathPrefix(path, prefix) {\n if ((0, _pathHasPrefix).pathHasPrefix(path, prefix)) {\n var withoutPrefix = path.slice(prefix.length);\n return withoutPrefix.startsWith(\"/\") ? withoutPrefix : \"/\".concat(withoutPrefix);\n }\n return path;\n} //# sourceMappingURL=remove-path-prefix.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1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cbnZhciBfcGF0aEhhc1ByZWZpeCA9IHJlcXVpcmUoXCIuL3BhdGgtaGFzLXByZWZpeFwiKTtcbmZ1bmN0aW9uIHJlbW92ZVBhdGhQcmVmaXgocGF0aCwgcHJlZml4KSB7XG4gICAgaWYgKCgwLCBfcGF0aEhhc1ByZWZpeCkucGF0aEhhc1ByZWZpeChwYXRoLCBwcmVmaXgpKSB7XG4gICAgICAgIGNvbnN0IHdpdGhvdXRQcmVmaXggPSBwYXRoLnNsaWNlKHByZWZpeC5sZW5ndGgpO1xuICAgICAgICByZXR1cm4gd2l0aG91dFByZWZpeC5zdGFydHNXaXRoKCcvJykgPyB3aXRob3V0UHJlZml4IDogYC8ke3dpdGhvdXRQcmVmaXh9YDtcbiAgICB9XG4gICAgcmV0dXJuIHBhdGg7XG59XG5cbi8vIyBzb3VyY2VNYXBwaW5nVVJMPXJlbW92ZS1wYXRoLXByZWZpeC5qcy5tYXAiXSwibmFtZXMiOlsiT2JqZWN0IiwiZGVmaW5lUHJvcGVydHkiLCJleHBvcnRzIiwidmFsdWUiLCJyZW1vdmVQYXRoUHJlZml4IiwiX3BhdGhIYXNQcmVmaXgiLCJyZXF1aXJlIiwicGF0aCIsInByZWZpeCIsInBhdGhIYXNQcmVmaXgiLCJ3aXRob3V0UHJlZml4Iiwic2xpY2UiLCJsZW5ndGgiLCJzdGFydHNXaXRoIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///../node_modules/next/dist/shared/lib/router/utils/remove-path-prefix.js\n"));
/***/ }),
/***/ "../node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.js":
/*!**********************************************************************************!*\
!*** ../node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.js ***!
\**********************************************************************************/
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.removeTrailingSlash = removeTrailingSlash;\nfunction removeTrailingSlash(route) {\n return route.replace(/\\/$/, \"\") || \"/\";\n} //# sourceMappingURL=remove-trailing-slash.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module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iLCJkZWZpbmVQcm9wZXJ0eSIsImV4cG9ydHMiLCJ2YWx1ZSIsInJlbW92ZVRyYWlsaW5nU2xhc2giLCJyb3V0ZSIsInJlcGxhY2UiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///../node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.js\n"));
/***/ }),
/***/ "../node_modules/next/dist/shared/lib/router/utils/route-matcher.js":
/*!**************************************************************************!*\
!*** ../node_modules/next/dist/shared/lib/router/utils/route-matcher.js ***!
\**************************************************************************/
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.getRouteMatcher = getRouteMatcher;\nvar _utils = __webpack_require__(/*! ../../utils */ \"../node_modules/next/dist/shared/lib/utils.js\");\nfunction getRouteMatcher(param) {\n var re = param.re, groups = param.groups;\n return function(pathname) {\n var routeMatch = re.exec(pathname);\n if (!routeMatch) {\n return false;\n }\n var decode = function(param) {\n try {\n return decodeURIComponent(param);\n } catch (_) {\n throw new _utils.DecodeError(\"failed to decode param\");\n }\n };\n var params = {};\n Object.keys(groups).forEach(function(slugName) {\n var g = groups[slugName];\n var m = routeMatch[g.pos];\n if (m !== undefined) {\n params[slugName] = ~m.indexOf(\"/\") ? m.split(\"/\").map(function(entry) {\n return decode(entry);\n }) : g.repeat ? [\n decode(m)\n ] : decode(m);\n }\n });\n return params;\n };\n} //# sourceMappingURL=route-matcher.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9zaGFyZWQvbGliL3JvdXRlci91dGlscy9yb3V0ZS1tYXRjaGVyLmpzLmpzIiwibWFwcGluZ3MiOiJBQUFhO0FBQ2JBLDhDQUE2QztJQUN6Q0csS0FBSyxFQUFFLElBQUk7Q0FDZCxFQUFDLENBQUM7QUFDSEQsdUJBQXVCLEdBQUdFLGVBQ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XJyb3IiLCJwYXJhbXMiLCJrZXlzIiwiZm9yRWFjaCIsInNsdWdOYW1lIiwiZyIsIm0iLCJwb3MiLCJ1bmRlZmluZWQiLCJpbmRleE9mIiwic3BsaXQiLCJtYXAiLCJlbnRyeSIsInJlcGVhdCJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///../node_modules/next/dist/shared/lib/router/utils/route-matcher.js\n"));
/***/ }),
/***/ "../node_modules/next/dist/shared/lib/router/utils/route-regex.js":
/*!************************************************************************!*\
!*** ../node_modules/next/dist/shared/lib/router/utils/route-regex.js ***!
\************************************************************************/
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.getRouteRegex = getRouteRegex;\nexports.getNamedRouteRegex = getNamedRouteRegex;\nexports.getMiddlewareRegex = getMiddlewareRegex;\nexports.getNamedMiddlewareRegex = getNamedMiddlewareRegex;\nvar _escapeRegexp = __webpack_require__(/*! ../../escape-regexp */ \"../node_modules/next/dist/shared/lib/escape-regexp.js\");\nvar _removeTrailingSlash = __webpack_require__(/*! ./remove-trailing-slash */ \"../node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.js\");\nfunction _extends() {\n _extends = Object.assign || function(target) {\n for(var i = 1; i < arguments.length; i++){\n var source = arguments[i];\n for(var key in source){\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}\nfunction getRouteRegex(normalizedRoute) {\n var ref = getParametrizedRoute(normalizedRoute), parameterizedRoute = ref.parameterizedRoute, groups = ref.groups;\n return {\n re: new RegExp(\"^\".concat(parameterizedRoute, \"(?:/)?$\")),\n groups: groups\n };\n}\nfunction getNamedRouteRegex(normalizedRoute) {\n var result = getNamedParametrizedRoute(normalizedRoute);\n return _extends({}, getRouteRegex(normalizedRoute), {\n namedRegex: \"^\".concat(result.namedParameterizedRoute, \"(?:/)?$\"),\n routeKeys: result.routeKeys\n });\n}\nfunction getParametrizedRoute(route) {\n var segments = (0, _removeTrailingSlash).removeTrailingSlash(route).slice(1).split(\"/\");\n var groups = {};\n var groupIndex = 1;\n return {\n parameterizedRoute: segments.map(function(segment) {\n if (segment.startsWith(\"[\") && segment.endsWith(\"]\")) {\n var ref = parseParameter(segment.slice(1, -1)), key = ref.key, optional = ref.optional, repeat = ref.repeat;\n groups[key] = {\n pos: groupIndex++,\n repeat: repeat,\n optional: optional\n };\n return repeat ? optional ? \"(?:/(.+?))?\" : \"/(.+?)\" : \"/([^/]+?)\";\n } else {\n return \"/\".concat((0, _escapeRegexp).escapeStringRegexp(segment));\n }\n }).join(\"\"),\n groups: groups\n };\n}\nfunction getNamedParametrizedRoute(route) {\n var segments = (0, _removeTrailingSlash).removeTrailingSlash(route).slice(1).split(\"/\");\n var getSafeRouteKey = buildGetSafeRouteKey();\n var routeKeys = {};\n return {\n namedParameterizedRoute: segments.map(function(segment) {\n if (segment.startsWith(\"[\") && segment.endsWith(\"]\")) {\n var ref = parseParameter(segment.slice(1, -1)), key = ref.key, optional = ref.optional, repeat = ref.repeat;\n // replace any non-word characters since they can break\n // the named regex\n var cleanedKey = key.replace(/\\W/g, \"\");\n var invalidKey = false;\n // check if the key is still invalid and fallback to using a known\n // safe key\n if (cleanedKey.length === 0 || cleanedKey.length > 30) {\n invalidKey = true;\n }\n if (!isNaN(parseInt(cleanedKey.slice(0, 1)))) {\n invalidKey = true;\n }\n if (invalidKey) {\n cleanedKey = getSafeRouteKey();\n }\n routeKeys[cleanedKey] = key;\n return repeat ? optional ? \"(?:/(?<\".concat(cleanedKey, \">.+?))?\") : \"/(?<\".concat(cleanedKey, \">.+?)\") : \"/(?<\".concat(cleanedKey, \">[^/]+?)\");\n } else {\n return \"/\".concat((0, _escapeRegexp).escapeStringRegexp(segment));\n }\n }).join(\"\"),\n routeKeys: routeKeys\n };\n}\n/**\n * Parses a given parameter from a route to a data structure that can be used\n * to generate the parametrized route. Examples:\n * - `[...slug]` -> `{ name: 'slug', repeat: true, optional: true }`\n * - `[foo]` -> `{ name: 'foo', repeat: false, optional: true }`\n * - `bar` -> `{ name: 'bar', repeat: false, optional: false }`\n */ function parseParameter(param) {\n var optional = param.startsWith(\"[\") && param.endsWith(\"]\");\n if (optional) {\n param = param.slice(1, -1);\n }\n var repeat = param.startsWith(\"...\");\n if (repeat) {\n param = param.slice(3);\n }\n return {\n key: param,\n repeat: repeat,\n optional: optional\n };\n}\n/**\n * Builds a function to generate a minimal routeKey using only a-z and minimal\n * number of characters.\n */ function buildGetSafeRouteKey() {\n var routeKeyCharCode = 97;\n var routeKeyCharLength = 1;\n return function() {\n var routeKey = \"\";\n for(var i = 0; i < routeKeyCharLength; i++){\n routeKey += String.fromCharCode(routeKeyCharCode);\n routeKeyCharCode++;\n if (routeKeyCharCode > 122) {\n routeKeyCharLength++;\n routeKeyCharCode = 97;\n }\n }\n return routeKey;\n };\n}\nfunction getMiddlewareRegex(normalizedRoute, options) {\n var ref = getParametrizedRoute(normalizedRoute), parameterizedRoute = ref.parameterizedRoute, groups = ref.groups;\n var ref1 = options != null ? options : {}, _catchAll = ref1.catchAll, catchAll = _catchAll === void 0 ? true : _catchAll;\n if (parameterizedRoute === \"/\") {\n var catchAllRegex = catchAll ? \".*\" : \"\";\n return {\n groups: {},\n re: new RegExp(\"^/\".concat(catchAllRegex, \"$\"))\n };\n }\n var catchAllGroupedRegex = catchAll ? \"(?:(/.*)?)\" : \"\";\n return {\n groups: groups,\n re: new RegExp(\"^\".concat(parameterizedRoute).concat(catchAllGroupedRegex, \"$\"))\n };\n}\nfunction getNamedMiddlewareRegex(normalizedRoute, options) {\n var parameterizedRoute = getParametrizedRoute(normalizedRoute).parameterizedRoute;\n var _catchAll = options.catchAll, catchAll = _catchAll === void 0 ? true : _catchAll;\n if (parameterizedRoute === \"/\") {\n var catchAllRegex = catchAll ? \".*\" : \"\";\n return {\n namedRegex: \"^/\".concat(catchAllRegex, \"$\")\n };\n }\n var namedParameterizedRoute = getNamedParametrizedRoute(normalizedRoute).namedParameterizedRoute;\n var catchAllGroupedRegex = catchAll ? \"(?:(/.*)?)\" : \"\";\n return {\n namedRegex: \"^\".concat(namedParameterizedRoute).concat(catchAllGroupedRegex, \"$\")\n };\n} //# sourceMappingURL=route-regex.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9zaGFyZWQvbGliL3JvdXRlci91dGlscy9yb3V0ZS1yZWdleC5qcy5qcyIsIm1hcHBpbmdzIjoiQUFBYTtBQUNiQSw4Q0FBNkM7SUFDekNHLEtBQUssRUFBRSxJQUFJO0NBQ2QsRUFBQyxDQUFDO0FBQ0hELHFCQUFxQixHQUFHRSxhQUFhLENBQUM7QUFDdENGLDBCQUEwQixHQUFHRyxrQkFBa0IsQ0FBQztBQUNoREgsMEJBQTBCLEdBQUdJLGtCQUFrQixDQUFDO0FBQ2hESiwrQkFBK0IsR0FBR0ssdUJBQXVCLENBQUM7QUFDMUQsSUFBSUMsYUFBYSxHQUFHQyxtQkFBTyxDQUFDLGtGQUFxQixDQUFDO0FBQ2xELElBQUlDLG9CQUFvQixHQUFHRCxtQkFBTyxDQUFDLDJHQUF5QixDQUFDO0FBQzdELFNBQVNFLFFBQVEsR0FBRztJQUNoQkEsUUFBUSxHQUFHWCxNQUFNLENBQUNZLE1BQU0sSUFBSSxTQUFTQyxNQUFNLEVBQUU7UUFDekMsSUFBSSxJQUFJQyxDQUFDLEdBQUcsQ0FBQyxFQUFFQSxDQUFDLEdBQUdDLFNBQVMsQ0FBQ0MsTUFBTSxFQUFFRixDQUFDLEVBQUUsQ0FBQztZQUNyQyxJQUFJRyxNQUFNLEdBQUdGLFNBQVMsQ0FBQ0QsQ0FBQyxDQUFDO1lBQ3pCLElBQUksSUFBSUksR0FBRyxJQUFJRCxNQUFNLENBQUM7Z0JBQ2xCLElBQUlqQixNQUFN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W50cy5tYXAoKHNlZ21lbnQpPT57XG4gICAgICAgICAgICBpZiAoc2VnbWVudC5zdGFydHNXaXRoKCdbJykgJiYgc2VnbWVudC5lbmRzV2l0aCgnXScpKSB7XG4gICAgICAgICAgICAgICAgY29uc3QgeyBrZXkgLCBvcHRpb25hbCAsIHJlcGVhdCAgfSA9IHBhcnNlUGFyYW1ldGVyKHNlZ21lbnQuc2xpY2UoMSwgLTEpKTtcbiAgICAgICAgICAgICAgICBncm91cHNba2V5XSA9IHtcbiAgICAgICAgICAgICAgICAgICAgcG9zOiBncm91cEluZGV4KyssXG4gICAgICAgICAgICAgICAgICAgIHJlcGVhdCxcbiAgICAgICAgICAgICAgICAgICAgb3B0aW9uYWxcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIHJldHVybiByZXBlYXQgPyBvcHRpb25hbCA/ICcoPzovKC4rPykpPycgOiAnLyguKz8pJyA6ICcvKFteL10rPyknO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gYC8keygwLCBfZXNjYXBlUmVnZXhwKS5lc2NhcGVTdHJpbmdSZWdleHAoc2VnbWVudCl9YDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSkuam9pbignJyksXG4gICAgICAgIGdyb3Vwc1xuICAgIH07XG59XG5mdW5jdGlvbiBnZXROYW1lZFBhcmFtZXRyaXplZFJvdXRlKHJvdXRlKSB7XG4gICAgY29uc3Qgc2VnbWVudHMgPSAoMCwgX3JlbW92ZVRyYWlsaW5nU2xhc2gpLnJlbW92ZVRyYWlsaW5nU2xhc2gocm91dGUpLnNsaWNlKDEpLnNwbGl0KCcvJyk7XG4gICAgY29uc3QgZ2V0U2FmZVJvdXRlS2V5ID0gYnVpbGRHZXRTYWZlUm91dGVLZXkoKTtcbiAgICBjb25zdCByb3V0ZUtleXMgPSB7fTtcbiAgICByZXR1cm4ge1xuICAgICAgICBuYW1lZFBhcmFtZXRlcml6ZWRSb3V0ZTogc2VnbWVudHMubWFwKChzZWdtZW50KT0+e1xuICAgICAgICAgICAgaWYgKHNlZ21lbnQuc3RhcnRzV2l0aCgnWycpICYmIHNlZ21lbnQuZW5kc1dpdGgoJ10nKSkge1xuICAgICAgICAgICAgICAgIGNvbnN0IHsga2V5ICwgb3B0aW9uYWwgLCByZXBlYXQgIH0gPSBwYXJzZVBhcmFtZXRlcihzZWdtZW50LnNsaWNlKDEsIC0xKSk7XG4gICAgICAgICAgICAgICAgLy8gcmVwbGFjZSBhbnkgbm9uLXdvcmQgY2hhcmFjdGVycyBzaW5jZSB0aGV5IGNhbiBicmVha1xuICAgICAgICAgICAgICAgIC8vIHRoZSBuYW1lZCByZWdleFxuICAgICAgICAgICAgICAgIGxldCBjbGVhbmVkS2V5ID0ga2V5LnJlcGxhY2UoL1xcVy9nLCAnJyk7XG4gICAgICAgICAgICAgICAgbGV0IGludmFsaWRLZXkgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICAvLyBjaGVjayBpZiB0aGUga2V5IGlzIHN0aWxsIGludmFsaWQgYW5kIGZhbGxiYWNrIHRvIHVzaW5nIGEga25vd25cbiAgICAgICAgICAgICAgICAvLyBzYWZlIGtleVxuICAgICAgICAgICAgICAgIGlmIChjbGVhbmVkS2V5Lmxlbmd0aCA9PT0gMCB8fCBjbGVhbmVkS2V5Lmxlbmd0aCA+IDMwKSB7XG4gICAgICAgICAgICAgICAgICAgIGludmFsaWRLZXkgPSB0cnVlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoIWlzTmFOKHBhcnNlSW50KGNsZWFuZWRLZXkuc2xpY2UoMCwgMSkpKSkge1xuICAgICAgICAgICAgICAgICAgICBpbnZhbGlkS2V5ID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKGludmFsaWRLZXkpIHtcbiAgICAgICAgICAgICAgICAgICAgY2xlYW5lZEtleSA9IGdldFNhZmVSb3V0ZUtleSgpO1xu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wiUmVnRXhwIiwicmVzdWx0IiwiZ2V0TmFtZWRQYXJhbWV0cml6ZWRSb3V0ZSIsIm5hbWVkUmVnZXgiLCJuYW1lZFBhcmFtZXRlcml6ZWRSb3V0ZSIsInJvdXRlS2V5cyIsInJvdXRlIiwic2VnbWVudHMiLCJyZW1vdmVUcmFpbGluZ1NsYXNoIiwic2xpY2UiLCJzcGxpdCIsImdyb3VwSW5kZXgiLCJtYXAiLCJzZWdtZW50Iiwic3RhcnRzV2l0aCIsImVuZHNXaXRoIiwicGFyc2VQYXJhbWV0ZXIiLCJvcHRpb25hbCIsInJlcGVhdCIsInBvcyIsImVzY2FwZVN0cmluZ1JlZ2V4cCIsImpvaW4iLCJnZXRTYWZlUm91dGVLZXkiLCJidWlsZEdldFNhZmVSb3V0ZUtleSIsImNsZWFuZWRLZXkiLCJyZXBsYWNlIiwiaW52YWxpZEtleSIsImlzTmFOIiwicGFyc2VJbnQiLCJwYXJhbSIsInJvdXRlS2V5Q2hhckNvZGUiLCJyb3V0ZUtleUNoYXJMZW5ndGgiLCJyb3V0ZUtleSIsIlN0cmluZyIsImZyb21DaGFyQ29kZSIsIm9wdGlvbnMiLCJjYXRjaEFsbCIsImNhdGNoQWxsUmVnZXgiLCJjYXRjaEFsbEdyb3VwZWRSZWdleCJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///../node_modules/next/dist/shared/lib/router/utils/route-regex.js\n"));
/***/ }),
/***/ "../node_modules/next/dist/shared/lib/router/utils/sorted-routes.js":
/*!**************************************************************************!*\
!*** ../node_modules/next/dist/shared/lib/router/utils/sorted-routes.js ***!
\**************************************************************************/
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nvar _classCallCheck = (__webpack_require__(/*! @swc/helpers/lib/_class_call_check.js */ \"../node_modules/@swc/helpers/lib/_class_call_check.js\")[\"default\"]);\nvar _createClass = (__webpack_require__(/*! @swc/helpers/lib/_create_class.js */ \"../node_modules/@swc/helpers/lib/_create_class.js\")[\"default\"]);\nvar _toConsumableArray = (__webpack_require__(/*! @swc/helpers/lib/_to_consumable_array.js */ \"../node_modules/@swc/helpers/lib/_to_consumable_array.js\")[\"default\"]);\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.getSortedRoutes = getSortedRoutes;\nvar UrlNode = /*#__PURE__*/ function() {\n function UrlNode() {\n _classCallCheck(this, UrlNode);\n this.placeholder = true;\n this.children = new Map();\n this.slugName = null;\n this.restSlugName = null;\n this.optionalRestSlugName = null;\n }\n _createClass(UrlNode, [\n {\n key: \"insert\",\n value: function insert(urlPath) {\n this._insert(urlPath.split(\"/\").filter(Boolean), [], false);\n }\n },\n {\n key: \"smoosh\",\n value: function smoosh() {\n return this._smoosh();\n }\n },\n {\n key: \"_smoosh\",\n value: function _smoosh() {\n var prefix = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : \"/\";\n var _this = this;\n var childrenPaths = _toConsumableArray(this.children.keys()).sort();\n if (this.slugName !== null) {\n childrenPaths.splice(childrenPaths.indexOf(\"[]\"), 1);\n }\n if (this.restSlugName !== null) {\n childrenPaths.splice(childrenPaths.indexOf(\"[...]\"), 1);\n }\n if (this.optionalRestSlugName !== null) {\n childrenPaths.splice(childrenPaths.indexOf(\"[[...]]\"), 1);\n }\n var routes = childrenPaths.map(function(c) {\n return _this.children.get(c)._smoosh(\"\".concat(prefix).concat(c, \"/\"));\n }).reduce(function(prev, curr) {\n return _toConsumableArray(prev).concat(_toConsumableArray(curr));\n }, []);\n if (this.slugName !== null) {\n var _routes;\n (_routes = routes).push.apply(_routes, _toConsumableArray(this.children.get(\"[]\")._smoosh(\"\".concat(prefix, \"[\").concat(this.slugName, \"]/\"))));\n }\n if (!this.placeholder) {\n var r = prefix === \"/\" ? \"/\" : prefix.slice(0, -1);\n if (this.optionalRestSlugName != null) {\n throw new Error('You cannot define a route with the same specificity as a optional catch-all route (\"'.concat(r, '\" and \"').concat(r, \"[[...\").concat(this.optionalRestSlugName, ']]\").'));\n }\n routes.unshift(r);\n }\n if (this.restSlugName !== null) {\n var _routes1;\n (_routes1 = routes).push.apply(_routes1, _toConsumableArray(this.children.get(\"[...]\")._smoosh(\"\".concat(prefix, \"[...\").concat(this.restSlugName, \"]/\"))));\n }\n if (this.optionalRestSlugName !== null) {\n var _routes2;\n (_routes2 = routes).push.apply(_routes2, _toConsumableArray(this.children.get(\"[[...]]\")._smoosh(\"\".concat(prefix, \"[[...\").concat(this.optionalRestSlugName, \"]]/\"))));\n }\n return routes;\n }\n },\n {\n key: \"_insert\",\n value: function _insert(urlPaths, slugNames, isCatchAll) {\n if (urlPaths.length === 0) {\n this.placeholder = false;\n return;\n }\n if (isCatchAll) {\n throw new Error(\"Catch-all must be the last part of the URL.\");\n }\n // The next segment in the urlPaths list\n var nextSegment = urlPaths[0];\n // Check if the segment matches `[something]`\n if (nextSegment.startsWith(\"[\") && nextSegment.endsWith(\"]\")) {\n var handleSlug = function handleSlug(previousSlug, nextSlug) {\n if (previousSlug !== null) {\n // If the specific segment already has a slug but the slug is not `something`\n // This prevents collisions like:\n // pages/[post]/index.js\n // pages/[id]/index.js\n // Because currently multiple dynamic params on the same segment level are not supported\n if (previousSlug !== nextSlug) {\n // TODO: This error seems to be confusing for users, needs an error link, the description can be based on above comment.\n throw new Error(\"You cannot use different slug names for the same dynamic path ('\".concat(previousSlug, \"' !== '\").concat(nextSlug, \"').\"));\n }\n }\n slugNames.forEach(function(slug) {\n if (slug === nextSlug) {\n throw new Error('You cannot have the same slug name \"'.concat(nextSlug, '\" repeat within a single dynamic path'));\n }\n if (slug.replace(/\\W/g, \"\") === nextSegment.replace(/\\W/g, \"\")) {\n throw new Error('You cannot have the slug names \"'.concat(slug, '\" and \"').concat(nextSlug, '\" differ only by non-word symbols within a single dynamic path'));\n }\n });\n slugNames.push(nextSlug);\n };\n // Strip `[` and `]`, leaving only `something`\n var segmentName = nextSegment.slice(1, -1);\n var isOptional = false;\n if (segmentName.startsWith(\"[\") && segmentName.endsWith(\"]\")) {\n // Strip optional `[` and `]`, leaving only `something`\n segmentName = segmentName.slice(1, -1);\n isOptional = true;\n }\n if (segmentName.startsWith(\"...\")) {\n // Strip `...`, leaving only `something`\n segmentName = segmentName.substring(3);\n isCatchAll = true;\n }\n if (segmentName.startsWith(\"[\") || segmentName.endsWith(\"]\")) {\n throw new Error(\"Segment names may not start or end with extra brackets ('\".concat(segmentName, \"').\"));\n }\n if (segmentName.startsWith(\".\")) {\n throw new Error(\"Segment names may not start with erroneous periods ('\".concat(segmentName, \"').\"));\n }\n if (isCatchAll) {\n if (isOptional) {\n if (this.restSlugName != null) {\n throw new Error('You cannot use both an required and optional catch-all route at the same level (\"[...'.concat(this.restSlugName, ']\" and \"').concat(urlPaths[0], '\" ).'));\n }\n handleSlug(this.optionalRestSlugName, segmentName);\n // slugName is kept as it can only be one particular slugName\n this.optionalRestSlugName = segmentName;\n // nextSegment is overwritten to [[...]] so that it can later be sorted specifically\n nextSegment = \"[[...]]\";\n } else {\n if (this.optionalRestSlugName != null) {\n throw new Error('You cannot use both an optional and required catch-all route at the same level (\"[[...'.concat(this.optionalRestSlugName, ']]\" and \"').concat(urlPaths[0], '\").'));\n }\n handleSlug(this.restSlugName, segmentName);\n // slugName is kept as it can only be one particular slugName\n this.restSlugName = segmentName;\n // nextSegment is overwritten to [...] so that it can later be sorted specifically\n nextSegment = \"[...]\";\n }\n } else {\n if (isOptional) {\n throw new Error('Optional route parameters are not yet supported (\"'.concat(urlPaths[0], '\").'));\n }\n handleSlug(this.slugName, segmentName);\n // slugName is kept as it can only be one particular slugName\n this.slugName = segmentName;\n // nextSegment is overwritten to [] so that it can later be sorted specifically\n nextSegment = \"[]\";\n }\n }\n // If this UrlNode doesn't have the nextSegment yet we create a new child UrlNode\n if (!this.children.has(nextSegment)) {\n this.children.set(nextSegment, new UrlNode());\n }\n this.children.get(nextSegment)._insert(urlPaths.slice(1), slugNames, isCatchAll);\n }\n }\n ]);\n return UrlNode;\n}();\nfunction getSortedRoutes(normalizedPages) {\n // First the UrlNode is created, and every UrlNode can have only 1 dynamic segment\n // Eg you can't have pages/[post]/abc.js and pages/[hello]/something-else.js\n // Only 1 dynamic segment per nesting level\n // So in the case that is test/integration/dynamic-routing it'll be this:\n // pages/[post]/comments.js\n // pages/blog/[post]/comment/[id].js\n // Both are fine because `pages/[post]` and `pages/blog` are on the same level\n // So in this case `UrlNode` created here has `this.slugName === 'post'`\n // And since your PR passed through `slugName` as an array basically it'd including it in too many possibilities\n // Instead what has to be passed through is the upwards path's dynamic names\n var root = new UrlNode();\n // Here the `root` gets injected multiple paths, and insert will break them up into sublevels\n normalizedPages.forEach(function(pagePath) {\n return root.insert(pagePath);\n });\n // Smoosh will then sort those sublevels up to the point where you get the correct route definition priority\n return root.smoosh();\n} //# sourceMappingURL=sorted-routes.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9zaGFyZWQvbGliL3JvdXRlci91dGlscy9zb3J0ZWQtcm91dGVzLmpzLmpzIiwibWFwcGluZ3MiOiJBQUFhOzs7Ozs7O0FBQ2JBLDhDQUE2QztJQUN6Q0csS0FBSyxFQUFFLElBQUk7Q0FDZCxFQUFDLENBQUM7QUFDSEQsdUJBQXVCLEdBQUdFLGVBQWUsQ0FBQztBQUMxQyxXQUFhLGlCQTRJVDthQTVJRUMsT0FBTzs7UUFxSUwsSUFBSSxDQUFDQyxXQUFXLEdBQUcsSUFBSSxDQUFDO1FBQ3hCLElBQUksQ0FBQ0MsUUFBUSxHQUFHLElBQUlDLEdBQUcsRUFBRSxDQUFDO1FBQzFCLElBQUksQ0FBQ0MsUUFBUSxHQUFHLElBQUksQ0FBQztRQUNyQixJQUFJLENBQUNDLFlBQVksR0FBRyxJQUFJLENBQUM7UUFDekIsSUFBSSxDQUFDQyxvQkFBb0IsR0FBRyxJQUFJLENBQU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AgICAgfVxuICAgICAgICAgICAgaWYgKHNlZ21lbnROYW1lLnN0YXJ0c1dpdGgoJy4nKSkge1xuICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihgU2VnbWVudCBuYW1lcyBtYXkgbm90IHN0YXJ0IHdpdGggZXJyb25lb3VzIHBlcmlvZHMgKCcke3NlZ21lbnROYW1lfScpLmApO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZnVuY3Rpb24gaGFuZGxlU2x1ZyhwcmV2aW91c1NsdWcsIG5leHRTbHVnKSB7XG4gICAgICAgICAgICAgICAgaWYgKHByZXZpb3VzU2x1ZyAhPT0gbnVsbCkge1xuICAgICAgICAgICAgICAgICAgICAvLyBJZiB0aGUgc3BlY2lmaWMgc2VnbWVudCBhbHJlYWR5IGhhcyBhIHNsdWcgYnV0IHRoZSBzbHVnIGlzIG5vdCBgc29tZXRoaW5nYFxuICAgICAgICAgICAgICAgICAgICAvLyBUaGlzIHByZXZlbnRzIGNvbGxpc2lvbnMgbGlrZTpcbiAgICAgICAgICAgICAgICAgICAgLy8gcGFnZXMvW3Bvc3RdL2luZGV4LmpzXG4gICAgICAgICAgICAgICAgICAgIC8vIHBhZ2VzL1tpZF0vaW5kZXguanNcbiAgICAgICAgICAgICAgICAgICAgLy8gQmVjYXVzZSBjdXJyZW50bHkgbXVsdGlwbGUgZHluYW1pYyBwYXJhbXMgb24gdGhlIHNhbWUgc2VnbWVudCBsZXZlbCBhcmUgbm90IHN1cHBvcnRlZFxuICAgICAgICAgICAgICAgICAgICBpZiAocHJldmlvdXNTbHVnICE9PSBuZXh0U2x1Zykge1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gVE9ETzogVGhpcyBlcnJvciBzZWVtcyB0byBiZSBjb25mdXNpbmcgZm9yIHVzZXJzLCBuZWVkcyBhbiBlcnJvciBsaW5rLCB0aGUgZGVzY3JpcHRpb24gY2FuIGJlIGJhc2VkIG9uIGFib3ZlIGNvbW1lbnQuXG4gICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoYFlvdSBjYW5ub3QgdXNlIGRpZmZlcmVudCBzbHVnIG5hbWVzIGZvciB0aGUgc2FtZSBkeW5hbWljIHBhdGggKCcke3ByZXZpb3VzU2x1Z30nICE9PSAnJHtuZXh0U2x1Z30nKS5gKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBzbHVnTmFtZXMuZm9yRWFjaCgoc2x1Zyk9PntcbiAgICAgICAgICAgICAgICAgICAgaWYgKHNsdWcgPT09IG5leHRTbHVnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoYFlvdSBjYW5ub3QgaGF2ZSB0aGUgc2FtZSBzbHVnIG5hbWUgXCIke25leHRTbHVnfVwiIHJlcGVhdCB3aXRoaW4gYSBzaW5nbGUgZHluYW1pYyBwYXRoYCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKHNsdWcucmVwbGFjZSgvXFxXL2csICcnKSA9PT0gbmV4dFNlZ21lbnQucmVwbGFjZSgvXFxXL2csICcnKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGBZb3UgY2Fubm90IGhhdmUgdGhlIHNsdWcgbmFtZXMgXCIke3NsdWd9XCIgYW5kIFwiJHtuZXh0U2x1Z31cIiBkaWZmZXIgb25seSBieSBub24td29yZCBzeW1ib2xzIHdpdGhpbiBhIHNpbmdsZSBkeW5hbWljIHBhdGhgKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIHNsdWdOYW1lcy5wdXNoKG5leHRTbHVnKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChpc0NhdGNoQWxsKSB7XG4gICAgICAgICAgICAgICAgaWYgKGlzT3B0aW9uYWwpIHtcbiAg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m9ybWFsaXplZFBhZ2VzIiwicm9vdCIsInBhZ2VQYXRoIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///../node_modules/next/dist/shared/lib/router/utils/sorted-routes.js\n"));
/***/ }),
/***/ "../node_modules/next/dist/shared/lib/runtime-config.js":
/*!**************************************************************!*\
!*** ../node_modules/next/dist/shared/lib/runtime-config.js ***!
\**************************************************************/
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.setConfig = setConfig;\nexports[\"default\"] = void 0;\nvar runtimeConfig;\nvar _default = function() {\n return runtimeConfig;\n};\nexports[\"default\"] = _default;\nfunction setConfig(configValue) {\n runtimeConfig = configValue;\n} //# sourceMappingURL=runtime-config.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9zaGFyZWQvbGliL3J1bnRpbWUtY29uZmlnLmpzLmpzIiwibWFwcGluZ3MiOiJBQUFhO0FBQ2JBLDhDQUE2QztJQUN6Q0csS0FBSyxFQUFFLElBQUk7Q0FDZCxFQUFDLENBQUM7QUFDSEQsaUJBQWlCLEdBQUdFLFNBQVMsQ0FBQztBQUM5QkYsa0JBQWUsR0FBRyxLQUFLLENBQUMsQ0FBQztBQUN6QixJQUFJSSxhQUFhO0FBQ2pCLElBQUlDLFFBQVEsR0FBRyxXQUFJO0lBQ2YsT0FBT0QsYUFBYSxDQUFDO0NBQ3hCO0FBQ0RKLGtCQUFlLEdBQUdLLFFBQVEsQ0FBQztBQUMzQixTQUFTSCxTQUFTLENBQUNJLFdBQVcsRUFBRTtJQUM1QkYsYUFBYSxHQUFHRSxXQUFXLENBQUM7Q0FDL0IsQ0FFRCwwQ0FBMEMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9fTl9FLy4uL25vZGVfbW9kdWxlcy9uZXh0L2Rpc3Qvc2hhcmVkL2xpYi9ydW50aW1lLWNvbmZpZy5qcz9mMTYxIl0sInNvdXJjZXNDb250ZW50IjpbIlwidXNlIHN0cmljdFwiO1xuT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsIFwiX19lc01vZHVsZVwiLCB7XG4gICAgdmFsdWU6IHRydWVcbn0pO1xuZXhwb3J0cy5zZXRDb25maWcgPSBzZXRDb25maWc7XG5leHBvcnRzLmRlZmF1bHQgPSB2b2lkIDA7XG5sZXQgcnVudGltZUNvbmZpZztcbnZhciBfZGVmYXVsdCA9ICgpPT57XG4gICAgcmV0dXJuIHJ1bnRpbWVDb25maWc7XG59O1xuZXhwb3J0cy5kZWZhdWx0ID0gX2RlZmF1bHQ7XG5mdW5jdGlvbiBzZXRDb25maWcoY29uZmlnVmFsdWUpIHtcbiAgICBydW50aW1lQ29uZmlnID0gY29uZmlnVmFsdWU7XG59XG5cbi8vIyBzb3VyY2VNYXBwaW5nVVJMPXJ1bnRpbWUtY29uZmlnLmpzLm1hcCJdLCJuYW1lcyI6WyJPYmplY3QiLCJkZWZpbmVQcm9wZXJ0eSIsImV4cG9ydHMiLCJ2YWx1ZSIsInNldENvbmZpZyIsImRlZmF1bHQiLCJydW50aW1lQ29uZmlnIiwiX2RlZmF1bHQiLCJjb25maWdWYWx1ZSJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///../node_modules/next/dist/shared/lib/runtime-config.js\n"));
/***/ }),
/***/ "../node_modules/next/dist/shared/lib/side-effect.js":
/*!***********************************************************!*\
!*** ../node_modules/next/dist/shared/lib/side-effect.js ***!
\***********************************************************/
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nvar _s = $RefreshSig$();\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = SideEffect;\nvar _react = _interopRequireWildcard(__webpack_require__(/*! react */ \"../node_modules/react/index.js\"));\nfunction SideEffect(props) {\n var emitChange = function emitChange() {\n if (headManager && headManager.mountedInstances) {\n var headElements = _react.Children.toArray(Array.from(headManager.mountedInstances).filter(Boolean));\n headManager.updateHead(reduceComponentsToState(headElements, props));\n }\n };\n _s();\n var headManager = props.headManager, reduceComponentsToState = props.reduceComponentsToState;\n if (isServer) {\n var ref;\n headManager == null ? void 0 : (ref = headManager.mountedInstances) == null ? void 0 : ref.add(props.children);\n emitChange();\n }\n useClientOnlyLayoutEffect(function() {\n var ref1;\n headManager == null ? void 0 : (ref1 = headManager.mountedInstances) == null ? void 0 : ref1.add(props.children);\n return function() {\n var ref;\n headManager == null ? void 0 : (ref = headManager.mountedInstances) == null ? void 0 : ref.delete(props.children);\n };\n });\n // We need to call `updateHead` method whenever the `SideEffect` is trigger in all\n // life-cycles: mount, update, unmount. However, if there are multiple `SideEffect`s\n // being rendered, we only trigger the method from the last one.\n // This is ensured by keeping the last unflushed `updateHead` in the `_pendingUpdate`\n // singleton in the layout effect pass, and actually trigger it in the effect pass.\n useClientOnlyLayoutEffect(function() {\n if (headManager) {\n headManager._pendingUpdate = emitChange;\n }\n return function() {\n if (headManager) {\n headManager._pendingUpdate = emitChange;\n }\n };\n });\n useClientOnlyEffect(function() {\n if (headManager && headManager._pendingUpdate) {\n headManager._pendingUpdate();\n headManager._pendingUpdate = null;\n }\n return function() {\n if (headManager && headManager._pendingUpdate) {\n headManager._pendingUpdate();\n headManager._pendingUpdate = null;\n }\n };\n });\n return null;\n}\n_s(SideEffect, \"gHVkikNHNxjVdD11eJBzaqkCiPY=\", false, function() {\n return [\n useClientOnlyLayoutEffect,\n useClientOnlyLayoutEffect,\n useClientOnlyEffect\n ];\n});\n_c = SideEffect;\nfunction _getRequireWildcardCache() {\n if (typeof WeakMap !== \"function\") return null;\n var cache = new WeakMap();\n _getRequireWildcardCache = function _getRequireWildcardCache() {\n return cache;\n };\n return cache;\n}\nfunction _interopRequireWildcard(obj) {\n if (obj && obj.__esModule) {\n return obj;\n }\n if (obj === null || typeof obj !== \"object\" && typeof obj !== \"function\") {\n return {\n default: obj\n };\n }\n var cache = _getRequireWildcardCache();\n if (cache && cache.has(obj)) {\n return cache.get(obj);\n }\n var newObj = {};\n var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;\n for(var key in obj){\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;\n if (desc && (desc.get || desc.set)) {\n Object.defineProperty(newObj, key, desc);\n } else {\n newObj[key] = obj[key];\n }\n }\n }\n newObj.default = obj;\n if (cache) {\n cache.set(obj, newObj);\n }\n return newObj;\n}\nvar isServer = \"object\" === \"undefined\";\nvar useClientOnlyLayoutEffect = isServer ? function() {} : _react.useLayoutEffect;\nvar useClientOnlyEffect = isServer ? function() {} : _react.useEffect; //# sourceMappingURL=side-effect.js.map\nvar _c;\n$RefreshReg$(_c, \"SideEffect\");\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9zaGFyZWQvbGliL3NpZGUtZWZmZWN0LmpzLmpzIiwibWFwcGluZ3MiOiJBQUFhOztBQUNiQSw4Q0FBNkM7SUFDekNHLEtBQUssRUFBRSxJQUFJO0NBQ2QsRUFBQyxDQUFDO0FBQ0hELGtCQUFlLEdBQUdHLFVBQVUsQ0FBQztBQUM3QixJQUFJQyxNQUFNLEdBQUdDLHVCQUF1QixDQUFDQyxtQkFBTyxDQUFDLDZDQUFPLENBQUMsQ0FBQztBQUN0RCxTQUFTSCxVQUFVLENBQUNJLEtBQUssRUFBRTtRQUVkQyxVQUFVLEdBQW5CLFNBQVNBLFVBQVUsR0FBRztRQUNsQixJQUFJQyxXQUFXLElBQUlBLFdBQVcsQ0FBQ0MsZ0JBQWdCLEVBQUU7WUFDN0MsSUFBTUMsWUFBWSxHQUFHUCxNQUFNLENBQUNRLFFBQVEsQ0FBQ0MsT0FBTyxDQUFDQyxLQUFLLENB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CJkZWxldGUiLCJfcGVuZGluZ1VwZGF0ZSIsInVzZUNsaWVudE9ubHlFZmZlY3QiLCJfZ2V0UmVxdWlyZVdpbGRjYXJkQ2FjaGUiLCJXZWFrTWFwIiwiY2FjaGUiLCJvYmoiLCJfX2VzTW9kdWxlIiwiaGFzIiwiZ2V0IiwibmV3T2JqIiwiaGFzUHJvcGVydHlEZXNjcmlwdG9yIiwiZ2V0T3duUHJvcGVydHlEZXNjcmlwdG9yIiwia2V5IiwicHJvdG90eXBlIiwiaGFzT3duUHJvcGVydHkiLCJjYWxsIiwiZGVzYyIsInNldCIsInVzZUxheW91dEVmZmVjdCIsInVzZUVmZmVjdCJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///../node_modules/next/dist/shared/lib/side-effect.js\n"));
/***/ }),
/***/ "../node_modules/next/dist/shared/lib/utils.js":
/*!*****************************************************!*\
!*** ../node_modules/next/dist/shared/lib/utils.js ***!
\*****************************************************/
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nvar _classCallCheck = (__webpack_require__(/*! @swc/helpers/lib/_class_call_check.js */ \"../node_modules/@swc/helpers/lib/_class_call_check.js\")[\"default\"]);\nvar _inherits = (__webpack_require__(/*! @swc/helpers/lib/_inherits.js */ \"../node_modules/@swc/helpers/lib/_inherits.js\")[\"default\"]);\nvar _interopRequireDefault = (__webpack_require__(/*! @swc/helpers/lib/_interop_require_default.js */ \"../node_modules/@swc/helpers/lib/_interop_require_default.js\")[\"default\"]);\nvar _toConsumableArray = (__webpack_require__(/*! @swc/helpers/lib/_to_consumable_array.js */ \"../node_modules/@swc/helpers/lib/_to_consumable_array.js\")[\"default\"]);\nvar _wrapNativeSuper = (__webpack_require__(/*! @swc/helpers/lib/_wrap_native_super.js */ \"../node_modules/@swc/helpers/lib/_wrap_native_super.js\")[\"default\"]);\nvar _createSuper = (__webpack_require__(/*! @swc/helpers/lib/_create_super.js */ \"../node_modules/@swc/helpers/lib/_create_super.js\")[\"default\"]);\nvar _cUsersGhoshOneDriveDocumentsProgamsUpscaylNodeModulesNextDistCompiledRegeneratorRuntimeRuntimeJs = /*#__PURE__*/ _interopRequireDefault(__webpack_require__(/*! ../node_modules/next/dist/compiled/regenerator-runtime/runtime.js */ \"../node_modules/next/dist/compiled/regenerator-runtime/runtime.js\"));\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.execOnce = execOnce;\nexports.getLocationOrigin = getLocationOrigin;\nexports.getURL = getURL;\nexports.getDisplayName = getDisplayName;\nexports.isResSent = isResSent;\nexports.normalizeRepeatedSlashes = normalizeRepeatedSlashes;\nexports.loadGetInitialProps = loadGetInitialProps;\nexports.ST = exports.SP = exports.warnOnce = exports.isAbsoluteUrl = void 0;\nfunction asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nfunction _asyncToGenerator(fn) {\n return function() {\n var self = this, args = arguments;\n return new Promise(function(resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}\nfunction execOnce(fn) {\n var used = false;\n var result;\n return function() {\n for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){\n args[_key] = arguments[_key];\n }\n if (!used) {\n used = true;\n result = fn.apply(void 0, _toConsumableArray(args));\n }\n return result;\n };\n}\n// Scheme: https://tools.ietf.org/html/rfc3986#section-3.1\n// Absolute URL: https://tools.ietf.org/html/rfc3986#section-4.3\nvar ABSOLUTE_URL_REGEX = /^[a-zA-Z][a-zA-Z\\d+\\-.]*?:/;\nvar isAbsoluteUrl = function(url) {\n return ABSOLUTE_URL_REGEX.test(url);\n};\nexports.isAbsoluteUrl = isAbsoluteUrl;\nfunction getLocationOrigin() {\n var _location = window.location, protocol = _location.protocol, hostname = _location.hostname, port = _location.port;\n return \"\".concat(protocol, \"//\").concat(hostname).concat(port ? \":\" + port : \"\");\n}\nfunction getURL() {\n var href = window.location.href;\n var origin = getLocationOrigin();\n return href.substring(origin.length);\n}\nfunction getDisplayName(Component) {\n return typeof Component === \"string\" ? Component : Component.displayName || Component.name || \"Unknown\";\n}\nfunction isResSent(res) {\n return res.finished || res.headersSent;\n}\nfunction normalizeRepeatedSlashes(url) {\n var urlParts = url.split(\"?\");\n var urlNoQuery = urlParts[0];\n return urlNoQuery // first we replace any non-encoded backslashes with forward\n // then normalize repeated forward slashes\n .replace(/\\\\/g, \"/\").replace(/\\/\\/+/g, \"/\") + (urlParts[1] ? \"?\".concat(urlParts.slice(1).join(\"?\")) : \"\");\n}\nfunction loadGetInitialProps(App, ctx) {\n return _loadGetInitialProps.apply(this, arguments);\n}\nfunction _loadGetInitialProps() {\n _loadGetInitialProps = _asyncToGenerator(_cUsersGhoshOneDriveDocumentsProgamsUpscaylNodeModulesNextDistCompiledRegeneratorRuntimeRuntimeJs.default.mark(function _callee(App, ctx) {\n var ref, message, res, props, message1;\n return _cUsersGhoshOneDriveDocumentsProgamsUpscaylNodeModulesNextDistCompiledRegeneratorRuntimeRuntimeJs.default.wrap(function _callee$(_ctx) {\n while(1)switch(_ctx.prev = _ctx.next){\n case 0:\n if (false) {}\n ;\n if (!((ref = App.prototype) == null ? void 0 : ref.getInitialProps)) {\n _ctx.next = 5;\n break;\n }\n message = '\"'.concat(getDisplayName(App), '.getInitialProps()\" is defined as an instance method - visit https://nextjs.org/docs/messages/get-initial-props-as-an-instance-method for more information.');\n throw new Error(message);\n case 5:\n res = ctx.res || ctx.ctx && ctx.ctx.res;\n if (App.getInitialProps) {\n _ctx.next = 13;\n break;\n }\n if (!(ctx.ctx && ctx.Component)) {\n _ctx.next = 12;\n break;\n }\n _ctx.next = 10;\n return loadGetInitialProps(ctx.Component, ctx.ctx);\n case 10:\n _ctx.t0 = _ctx.sent;\n return _ctx.abrupt(\"return\", {\n pageProps: _ctx.t0\n });\n case 12:\n return _ctx.abrupt(\"return\", {});\n case 13:\n _ctx.next = 15;\n return App.getInitialProps(ctx);\n case 15:\n props = _ctx.sent;\n if (!(res && isResSent(res))) {\n _ctx.next = 18;\n break;\n }\n return _ctx.abrupt(\"return\", props);\n case 18:\n if (props) {\n _ctx.next = 21;\n break;\n }\n message1 = '\"'.concat(getDisplayName(App), '.getInitialProps()\" should resolve to an object. But found \"').concat(props, '\" instead.');\n throw new Error(message1);\n case 21:\n if (true) {\n if (Object.keys(props).length === 0 && !ctx.ctx) {\n console.warn(\"\".concat(getDisplayName(App), \" returned an empty object from `getInitialProps`. This de-optimizes and prevents automatic static optimization. https://nextjs.org/docs/messages/empty-object-getInitialProps\"));\n }\n }\n return _ctx.abrupt(\"return\", props);\n case 23:\n case \"end\":\n return _ctx.stop();\n }\n }, _callee);\n }));\n return _loadGetInitialProps.apply(this, arguments);\n}\nvar warnOnce = function(_) {};\nif (true) {\n var warnings = new Set();\n exports.warnOnce = warnOnce = function(msg) {\n if (!warnings.has(msg)) {\n console.warn(msg);\n }\n warnings.add(msg);\n };\n}\nvar SP = typeof performance !== \"undefined\";\nexports.SP = SP;\nvar ST = SP && [\n \"mark\",\n \"measure\",\n \"getEntriesByName\"\n].every(function(method) {\n return typeof performance[method] === \"function\";\n});\nexports.ST = ST;\nvar DecodeError = /*#__PURE__*/ function(Error1) {\n _inherits(DecodeError, Error1);\n var _super = _createSuper(DecodeError);\n function DecodeError() {\n _classCallCheck(this, DecodeError);\n return _super.apply(this, arguments);\n }\n return DecodeError;\n}(_wrapNativeSuper(Error));\nexports.DecodeError = DecodeError;\nvar NormalizeError = /*#__PURE__*/ function(Error1) {\n _inherits(NormalizeError, Error1);\n var _super = _createSuper(NormalizeError);\n function NormalizeError() {\n _classCallCheck(this, NormalizeError);\n return _super.apply(this, arguments);\n }\n return NormalizeError;\n}(_wrapNativeSuper(Error));\nexports.NormalizeError = NormalizeError;\nvar PageNotFoundError = /*#__PURE__*/ function(Error1) {\n _inherits(PageNotFoundError, Error1);\n var _super = _createSuper(PageNotFoundError);\n function PageNotFoundError(page) {\n _classCallCheck(this, PageNotFoundError);\n var _this;\n _this = _super.call(this);\n _this.code = \"ENOENT\";\n _this.message = \"Cannot find module for page: \".concat(page);\n return _this;\n }\n return PageNotFoundError;\n}(_wrapNativeSuper(Error));\nexports.PageNotFoundError = PageNotFoundError;\nvar MissingStaticPage = /*#__PURE__*/ function(Error1) {\n _inherits(MissingStaticPage, Error1);\n var _super = _createSuper(MissingStaticPage);\n function MissingStaticPage(page, message) {\n _classCallCheck(this, MissingStaticPage);\n var _this;\n _this = _super.call(this);\n _this.message = \"Failed to load static file for page: \".concat(page, \" \").concat(message);\n return _this;\n }\n return MissingStaticPage;\n}(_wrapNativeSuper(Error));\nexports.MissingStaticPage = MissingStaticPage;\nvar MiddlewareNotFoundError = /*#__PURE__*/ function(Error1) {\n _inherits(MiddlewareNotFoundError, Error1);\n var _super = _createSuper(MiddlewareNotFoundError);\n function MiddlewareNotFoundError() {\n _classCallCheck(this, MiddlewareNotFoundError);\n var _this;\n _this = _super.call(this);\n _this.code = \"ENOENT\";\n _this.message = \"Cannot find the middleware module\";\n return _this;\n }\n return MiddlewareNotFoundError;\n}(_wrapNativeSuper(Error));\nexports.MiddlewareNotFoundError = MiddlewareNotFoundError;\nexports.warnOnce = warnOnce; //# sourceMappingURL=utils.js.map\n\n\n;\n // Wrapped in an IIFE to avoid polluting the global scope\n ;\n (function () {\n var _a, _b;\n // Legacy CSS implementations will `eval` browser code in a Node.js context\n // to extract CSS. For backwards compatibility, we need to check we're in a\n // browser context before continuing.\n if (typeof self !== 'undefined' &&\n // AMP / No-JS mode does not inject these helpers:\n '$RefreshHelpers$' in self) {\n // @ts-ignore __webpack_module__ is global\n var currentExports = module.exports;\n // @ts-ignore __webpack_module__ is global\n var prevExports = (_b = (_a = module.hot.data) === null || _a === void 0 ? void 0 : _a.prevExports) !== null && _b !== void 0 ? _b : null;\n // This cannot happen in MainTemplate because the exports mismatch between\n // templating and execution.\n self.$RefreshHelpers$.registerExportsForReactRefresh(currentExports, module.id);\n // A module can be accepted automatically based on its exports, e.g. when\n // it is a Refresh Boundary.\n if (self.$RefreshHelpers$.isReactRefreshBoundary(currentExports)) {\n // Save the previous exports on update so we can compare the boundary\n // signatures.\n module.hot.dispose(function (data) {\n data.prevExports = currentExports;\n });\n // Unconditionally accept an update to this module, we'll check if it's\n // still a Refresh Boundary later.\n // @ts-ignore importMeta is replaced in the loader\n module.hot.accept();\n // This field is set when the previous version of this module was a\n // Refresh Boundary, letting us know we need to check for invalidation or\n // enqueue an update.\n if (prevExports !== null) {\n // A boundary can become ineligible if its exports are incompatible\n // with the previous exports.\n //\n // For example, if you add/remove/change exports, we'll want to\n // re-execute the importing modules, and force those components to\n // re-render. Similarly, if you convert a class component to a\n // function, we want to invalidate the boundary.\n if (self.$RefreshHelpers$.shouldInvalidateReactRefreshBoundary(prevExports, currentExports)) {\n module.hot.invalidate();\n }\n else {\n self.$RefreshHelpers$.scheduleUpdate();\n }\n }\n }\n else {\n // Since we just executed the code for the module, it's possible that the\n // new exports made it ineligible for being a boundary.\n // We only care about the case when we were _previously_ a boundary,\n // because we already accepted this update (accidental side effect).\n var isNoLongerABoundary = prevExports !== null;\n if (isNoLongerABoundary) {\n module.hot.invalidate();\n }\n }\n }\n })();\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9zaGFyZWQvbGliL3V0aWxzLmpzLmpzIiwibWFwcGluZ3MiOiJBQUFhOzs7Ozs7Ozs7OztBQUNiQSw4Q0FBNkM7SUFDekNHLEtBQUssRUFBRSxJQUFJO0N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Ob3RGb3VuZEVycm9yIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///../node_modules/next/dist/shared/lib/utils.js\n"));
/***/ }),
/***/ "../node_modules/next/dist/compiled/react-is/cjs/react-is.development.js":
/*!*******************************************************************************!*\
!*** ../node_modules/next/dist/compiled/react-is/cjs/react-is.development.js ***!
\*******************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("/** @license React v17.0.2\n * react-is.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\nif (true) {\n (function() {\n'use strict';\n\n// ATTENTION\n// When adding new symbols to this file,\n// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'\n// The Symbol used to tag the ReactElement-like types. If there is no native Symbol\n// nor polyfill, then a plain number is used for performance.\nvar REACT_ELEMENT_TYPE = 0xeac7;\nvar REACT_PORTAL_TYPE = 0xeaca;\nvar REACT_FRAGMENT_TYPE = 0xeacb;\nvar REACT_STRICT_MODE_TYPE = 0xeacc;\nvar REACT_PROFILER_TYPE = 0xead2;\nvar REACT_PROVIDER_TYPE = 0xeacd;\nvar REACT_CONTEXT_TYPE = 0xeace;\nvar REACT_FORWARD_REF_TYPE = 0xead0;\nvar REACT_SUSPENSE_TYPE = 0xead1;\nvar REACT_SUSPENSE_LIST_TYPE = 0xead8;\nvar REACT_MEMO_TYPE = 0xead3;\nvar REACT_LAZY_TYPE = 0xead4;\nvar REACT_BLOCK_TYPE = 0xead9;\nvar REACT_SERVER_BLOCK_TYPE = 0xeada;\nvar REACT_FUNDAMENTAL_TYPE = 0xead5;\nvar REACT_SCOPE_TYPE = 0xead7;\nvar REACT_OPAQUE_ID_TYPE = 0xeae0;\nvar REACT_DEBUG_TRACING_MODE_TYPE = 0xeae1;\nvar REACT_OFFSCREEN_TYPE = 0xeae2;\nvar REACT_LEGACY_HIDDEN_TYPE = 0xeae3;\n\nif (typeof Symbol === 'function' && Symbol.for) {\n var symbolFor = Symbol.for;\n REACT_ELEMENT_TYPE = symbolFor('react.element');\n REACT_PORTAL_TYPE = symbolFor('react.portal');\n REACT_FRAGMENT_TYPE = symbolFor('react.fragment');\n REACT_STRICT_MODE_TYPE = symbolFor('react.strict_mode');\n REACT_PROFILER_TYPE = symbolFor('react.profiler');\n REACT_PROVIDER_TYPE = symbolFor('react.provider');\n REACT_CONTEXT_TYPE = symbolFor('react.context');\n REACT_FORWARD_REF_TYPE = symbolFor('react.forward_ref');\n REACT_SUSPENSE_TYPE = symbolFor('react.suspense');\n REACT_SUSPENSE_LIST_TYPE = symbolFor('react.suspense_list');\n REACT_MEMO_TYPE = symbolFor('react.memo');\n REACT_LAZY_TYPE = symbolFor('react.lazy');\n REACT_BLOCK_TYPE = symbolFor('react.block');\n REACT_SERVER_BLOCK_TYPE = symbolFor('react.server.block');\n REACT_FUNDAMENTAL_TYPE = symbolFor('react.fundamental');\n REACT_SCOPE_TYPE = symbolFor('react.scope');\n REACT_OPAQUE_ID_TYPE = symbolFor('react.opaque.id');\n REACT_DEBUG_TRACING_MODE_TYPE = symbolFor('react.debug_trace_mode');\n REACT_OFFSCREEN_TYPE = symbolFor('react.offscreen');\n REACT_LEGACY_HIDDEN_TYPE = symbolFor('react.legacy_hidden');\n}\n\n// Filter certain DOM attributes (e.g. src, href) if their values are empty strings.\n\nvar enableScopeAPI = false; // Experimental Create Event Handle API.\n\nfunction isValidElementType(type) {\n if (typeof type === 'string' || typeof type === 'function') {\n return true;\n } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).\n\n\n if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || type === REACT_DEBUG_TRACING_MODE_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || type === REACT_LEGACY_HIDDEN_TYPE || enableScopeAPI ) {\n return true;\n }\n\n if (typeof type === 'object' && type !== null) {\n 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) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction typeOf(object) {\n if (typeof object === 'object' && object !== null) {\n var $$typeof = object.$$typeof;\n\n switch ($$typeof) {\n case REACT_ELEMENT_TYPE:\n var type = object.type;\n\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n case REACT_PROFILER_TYPE:\n case REACT_STRICT_MODE_TYPE:\n case REACT_SUSPENSE_TYPE:\n case REACT_SUSPENSE_LIST_TYPE:\n return type;\n\n default:\n var $$typeofType = type && type.$$typeof;\n\n switch ($$typeofType) {\n case REACT_CONTEXT_TYPE:\n case REACT_FORWARD_REF_TYPE:\n case REACT_LAZY_TYPE:\n case REACT_MEMO_TYPE:\n case REACT_PROVIDER_TYPE:\n return $$typeofType;\n\n default:\n return $$typeof;\n }\n\n }\n\n case REACT_PORTAL_TYPE:\n return $$typeof;\n }\n }\n\n return undefined;\n}\nvar ContextConsumer = REACT_CONTEXT_TYPE;\nvar ContextProvider = REACT_PROVIDER_TYPE;\nvar Element = REACT_ELEMENT_TYPE;\nvar ForwardRef = REACT_FORWARD_REF_TYPE;\nvar Fragment = REACT_FRAGMENT_TYPE;\nvar Lazy = REACT_LAZY_TYPE;\nvar Memo = REACT_MEMO_TYPE;\nvar Portal = REACT_PORTAL_TYPE;\nvar Profiler = REACT_PROFILER_TYPE;\nvar StrictMode = REACT_STRICT_MODE_TYPE;\nvar Suspense = REACT_SUSPENSE_TYPE;\nvar hasWarnedAboutDeprecatedIsAsyncMode = false;\nvar hasWarnedAboutDeprecatedIsConcurrentMode = false; // AsyncMode should be deprecated\n\nfunction isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint\n\n console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 18+.');\n }\n }\n\n return false;\n}\nfunction isConcurrentMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsConcurrentMode) {\n hasWarnedAboutDeprecatedIsConcurrentMode = true; // Using console['warn'] to evade Babel and ESLint\n\n console['warn']('The ReactIs.isConcurrentMode() alias has been deprecated, ' + 'and will be removed in React 18+.');\n }\n }\n\n return false;\n}\nfunction isContextConsumer(object) {\n return typeOf(object) === REACT_CONTEXT_TYPE;\n}\nfunction isContextProvider(object) {\n return typeOf(object) === REACT_PROVIDER_TYPE;\n}\nfunction isElement(object) {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n}\nfunction isForwardRef(object) {\n return typeOf(object) === REACT_FORWARD_REF_TYPE;\n}\nfunction isFragment(object) {\n return typeOf(object) === REACT_FRAGMENT_TYPE;\n}\nfunction isLazy(object) {\n return typeOf(object) === REACT_LAZY_TYPE;\n}\nfunction isMemo(object) {\n return typeOf(object) === REACT_MEMO_TYPE;\n}\nfunction isPortal(object) {\n return typeOf(object) === REACT_PORTAL_TYPE;\n}\nfunction isProfiler(object) {\n return typeOf(object) === REACT_PROFILER_TYPE;\n}\nfunction isStrictMode(object) {\n return typeOf(object) === REACT_STRICT_MODE_TYPE;\n}\nfunction isSuspense(object) {\n return typeOf(object) === REACT_SUSPENSE_TYPE;\n}\n\nexports.ContextConsumer = ContextConsumer;\nexports.ContextProvider = ContextProvider;\nexports.Element = Element;\nexports.ForwardRef = ForwardRef;\nexports.Fragment = Fragment;\nexports.Lazy = Lazy;\nexports.Memo = Memo;\nexports.Portal = Portal;\nexports.Profiler = Profiler;\nexports.StrictMode = StrictMode;\nexports.Suspense = Suspense;\nexports.isAsyncMode = isAsyncMode;\nexports.isConcurrentMode = isConcurrentMode;\nexports.isContextConsumer = isContextConsumer;\nexports.isContextProvider = isContextProvider;\nexports.isElement = isElement;\nexports.isForwardRef = isForwardRef;\nexports.isFragment = isFragment;\nexports.isLazy = isLazy;\nexports.isMemo = isMemo;\nexports.isPortal = isPortal;\nexports.isProfiler = isProfiler;\nexports.isStrictMode = isStrictMode;\nexports.isSuspense = isSuspense;\nexports.isValidElementType = isValidElementType;\nexports.typeOf = typeOf;\n })();\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jb21waWxlZC9yZWFjdC1pcy9janMvcmVhY3QtaXMuZGV2ZWxvcG1lbnQuanMuanMiLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFYTs7QUFFYixJQUFJLElBQXFDO0FBQ3pDO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTs7QUFFQSw0QkFBNEI7O0FBRTVCO0FBQ0E7QUFDQTtBQUNBLElBQUk7OztBQUdKO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO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VzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///../node_modules/next/dist/compiled/react-is/cjs/react-is.development.js\n"));
/***/ }),
/***/ "../node_modules/next/dist/compiled/react-is/index.js":
/*!************************************************************!*\
!*** ../node_modules/next/dist/compiled/react-is/index.js ***!
\************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\n\nif (false) {} else {\n module.exports = __webpack_require__(/*! ./cjs/react-is.development.js */ \"../node_modules/next/dist/compiled/react-is/cjs/react-is.development.js\");\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jb21waWxlZC9yZWFjdC1pcy9pbmRleC5qcy5qcyIsIm1hcHBpbmdzIjoiQUFBYTs7QUFFYixJQUFJLEtBQXFDLEVBQUUsRUFFMUMsQ0FBQztBQUNGLEVBQUUsb0pBQXlEO0FBQzNEIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vX05fRS8uLi9ub2RlX21vZHVsZXMvbmV4dC9kaXN0L2NvbXBpbGVkL3JlYWN0LWlzL2luZGV4LmpzP2M3NWQiXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xuXG5pZiAocHJvY2Vzcy5lbnYuTk9ERV9FTlYgPT09ICdwcm9kdWN0aW9uJykge1xuICBtb2R1bGUuZXhwb3J0cyA9IHJlcXVpcmUoJy4vY2pzL3JlYWN0LWlzLnByb2R1Y3Rpb24ubWluLmpzJyk7XG59IGVsc2Uge1xuICBtb2R1bGUuZXhwb3J0cyA9IHJlcXVpcmUoJy4vY2pzL3JlYWN0LWlzLmRldmVsb3BtZW50LmpzJyk7XG59XG4iXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///../node_modules/next/dist/compiled/react-is/index.js\n"));
/***/ }),
/***/ "../node_modules/next/dist/compiled/regenerator-runtime/runtime.js":
/*!*************************************************************************!*\
!*** ../node_modules/next/dist/compiled/regenerator-runtime/runtime.js ***!
\*************************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
eval(__webpack_require__.ts("/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar runtime = (function (exports) {\n \"use strict\";\n\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var undefined; // More compressible than void 0.\n var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n return generator;\n }\n exports.wrap = wrap;\n\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there's no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don't have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }\n\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\";\n\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n\n // This is a polyfill for %IteratorPrototype% for environments that\n // don't natively support it.\n var IteratorPrototype = {};\n IteratorPrototype[iteratorSymbol] = function () {\n return this;\n };\n\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n if (NativeIteratorPrototype &&\n NativeIteratorPrototype !== Op &&\n hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n }\n\n var Gp = GeneratorFunctionPrototype.prototype =\n Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;\n GeneratorFunctionPrototype.constructor = GeneratorFunction;\n GeneratorFunctionPrototype[toStringTagSymbol] =\n GeneratorFunction.displayName = \"GeneratorFunction\";\n\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function(method) {\n prototype[method] = function(arg) {\n return this._invoke(method, arg);\n };\n });\n }\n\n exports.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n : false;\n };\n\n exports.mark = function(genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n if (!(toStringTagSymbol in genFun)) {\n genFun[toStringTagSymbol] = \"GeneratorFunction\";\n }\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n\n // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n // meant to be awaited.\n exports.awrap = function(arg) {\n return { __await: arg };\n };\n\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (record.type === \"throw\") {\n reject(record.arg);\n } else {\n var result = record.arg;\n var value = result.value;\n if (value &&\n typeof value === \"object\" &&\n hasOwn.call(value, \"__await\")) {\n return PromiseImpl.resolve(value.__await).then(function(value) {\n invoke(\"next\", value, resolve, reject);\n }, function(err) {\n invoke(\"throw\", err, resolve, reject);\n });\n }\n\n return PromiseImpl.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration.\n result.value = unwrapped;\n resolve(result);\n }, function(error) {\n // If a rejected Promise was yielded, throw the rejection back\n // into the async generator function so it can be handled there.\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n this._invoke = enqueue;\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n AsyncIterator.prototype[asyncIteratorSymbol] = function () {\n return this;\n };\n exports.AsyncIterator = AsyncIterator;\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n if (PromiseImpl === void 0) PromiseImpl = Promise;\n\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList),\n PromiseImpl\n );\n\n return exports.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === \"next\") {\n // Setting context._sent for legacy support of Babel's\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === \"return\") {\n context.abrupt(\"return\", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n }\n\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method always terminates the yield* loop.\n context.delegate = null;\n\n if (context.method === \"throw\") {\n // Note: [\"return\"] must be used for ES3 parsing compatibility.\n if (delegate.iterator[\"return\"]) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = \"return\";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === \"throw\") {\n // If maybeInvokeDelegate(context) changed context.method from\n // \"return\" to \"throw\", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n\n context.method = \"throw\";\n context.arg = new TypeError(\n \"The iterator does not provide a 'throw' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was \"throw\" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was \"next\", forget context.arg since it has been\n // \"consumed\" by the delegate iterator. If context.method was\n // \"return\", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n Gp[toStringTagSymbol] = \"Generator\";\n\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn't happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n Gp[iteratorSymbol] = function() {\n return this;\n };\n\n Gp.toString = function() {\n return \"[object Generator]\";\n };\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: \"root\" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n exports.keys = function(object) {\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n // Return an iterator with no values.\n return { next: doneResult };\n }\n exports.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel's\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = \"next\";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = \"next\";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, \"finallyLoc\") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === \"break\" ||\n type === \"continue\") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" ||\n record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n \"catch\": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n\n // Regardless of whether this script is executing as a CommonJS module\n // or not, return the runtime object so that we can declare the variable\n // regeneratorRuntime in the outer scope, which allows this module to be\n // injected easily by `bin/regenerator --include-runtime script.js`.\n return exports;\n\n}(\n // If this script is executing as a CommonJS module, use module.exports\n // as the regeneratorRuntime namespace. Otherwise create a new empty\n // object. Either way, the resulting object will be used to initialize\n // the regeneratorRuntime variable at the top of this file.\n true ? module.exports : 0\n));\n\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n // This module should not be running in strict mode, so the above\n // assignment should always work unless something is misconfigured. Just\n // in case runtime.js accidentally runs in strict mode, we can escape\n // strict mode using a global Function call. This could conceivably fail\n // if a Content Security Policy forbids using Function, but in that case\n // the proper solution is to fix the accidental strict mode problem. If\n // you've misconfigured your bundler to force strict mode and applied a\n // CSP to forbid Function, and you're not willing to fix either of those\n // problems, please detail your unique predicament in a GitHub issue.\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLC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G4gICAgICAgIHN0YXRlID0gR2VuU3RhdGVFeGVjdXRpbmc7XG5cbiAgICAgICAgdmFyIHJlY29yZCA9IHRyeUNhdGNoKGlubmVyRm4sIHNlbGYsIGNvbnRleHQpO1xuICAgICAgICBpZiAocmVjb3JkLnR5cGUgPT09IFwibm9ybWFsXCIpIHtcbiAgICAgICAgICAvLyBJZiBhbiBleGNlcHRpb24gaXMgdGhyb3duIGZyb20gaW5uZXJGbiwgd2UgbGVhdmUgc3RhdGUgPT09XG4gICAgICAgICAgLy8gR2VuU3RhdGVFeGVjdXRpbmcgYW5kIGxvb3AgYmFjayBmb3IgYW5vdGhlciBpbnZvY2F0aW9uLlxuICAgICAgICAgIHN0YXRlID0gY29udGV4dC5kb25lXG4gICAgICAgICAgICA/IEdlblN0YXRlQ29tcGxldGVkXG4gICAgICAgICAgICA6IEdlblN0YXRlU3VzcGVuZGVkWWllbGQ7XG5cbiAgICAgICAgICBpZiAocmVjb3JkLmFyZyA9PT0gQ29udGludWVTZW50aW5lbCkge1xuICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIHZhbHVlOiByZWNvcmQuYXJnLFxuICAgICAgICAgICAgZG9uZTogY29udGV4dC5kb25lXG4gICAgICAgICAgfTtcblxuICAgICAgICB9IGVsc2UgaWYgKHJlY29yZC50eXBlID09PSBcInRocm93XCIpIHtcbiAgICAgICAgICBzdGF0ZSA9IEdlblN0YXRlQ29tcGxldGVkO1xuICAgICAgICAgIC8vIERpc3BhdGNoIHRoZSBleGNlcHRpb24gYnkgbG9vcGluZyBiYWNrIGFyb3VuZCB0byB0aGVcbiAgICAgICAgICAvLyBjb250ZXh0LmRpc3BhdGNoRXhjZXB0aW9uKGNvbnRleHQuYXJnKSBjYWxsIGFib3ZlLlxuICAgICAgICAgIGNvbnRleHQubWV0aG9kID0gXCJ0aHJvd1wiO1xuICAgICAgICAgIGNvbnRleHQuYXJnID0gcm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b24gdmFsdWUgb2YgdGhlIGVudGlyZSBmdW5jdGlvbiB0b1xuICAgICAgICAgIC8vIHRocm93IHRoZSBleGNlcHRpb24uXG4gICAgICAgICAgcmV0dXJuIGhhbmRsZShcImVuZFwiKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChlbnRyeS50cnlMb2MgPD0gdGhpcy5wcmV2KSB7XG4gICAgICAgICAgdmFyIGhhc0NhdGNoID0gaGFzT3duLmNhbGwoZW50cnksIFwiY2F0Y2hMb2NcIik7XG4gICAgICAgICAgdmFyIGhhc0ZpbmFsbHkgPSBoYXNPd24uY2FsbChlbnRyeSwgXCJmaW5hbGx5TG9jXCIpO1xuXG4gICAgICAgICAgaWYgKGhhc0NhdGNoICYmIGhhc0ZpbmFsbHkpIHtcbiAgICAgICAgICAgIGlmICh0aGlzLnByZXYgPCBlbnRyeS5jYXRjaExvYykge1xuICAgICAgICAgICAgICByZXR1cm4gaGFuZGxlKGVudHJ5LmNhdGNoTG9jLCB0cnVlKTtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAodGhpcy5wcmV2IDwgZW50cnkuZmluYWxseUxvYykge1xuICAgICAgICAgICAgICByZXR1cm4gaGFuZGxlKGVudHJ5LmZpbmFsbHlMb2MpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgfSBlbHNlIGlmIChoYXNDYXRjaCkge1xuICAgICAgICAgICAgaWYgKHRoaXMucHJldiA8IGVudHJ5LmNhdGNoTG9jKSB7XG4gICAgICAgICAgICAgIHJldHVybiBoYW5kbGUoZW50cnkuY2F0Y2hMb2MsIHRydWUpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgfSBlbHNlIGlmIChoYXNGaW5hbGx5KSB7XG4gICAgICAgICAgICBpZiAodGhpcy5wcmV2IDwgZW50cnkuZmluYWxseUxvYykge1xuICAgICAgICAgICAgICByZXR1cm4gaGFuZGxlKGVudHJ5LmZpbmFsbHlMb2MpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcInRyeSBzdGF0ZW1lbnQgd2l0aG91dCBjYXRjaCBvciBmaW5hbGx5XCIpO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfVxuICAgIH0sXG5cbiAgICBhYnJ1cHQ6IGZ1bmN0aW9uKHR5cGUsIGFyZykge1xuICAgICAgZm9yICh2YXIgaSA9IHRoaXMudHJ5RW50cmllcy5sZW5ndGggLSAxOyBpID49IDA7IC0taSkge1xuICAgICAgICB2YXIgZW50cnkgPSB0aGlzLnRyeUVudHJpZXNbaV07XG4gICAgICAgIGlmIChlbnRyeS50cnlMb2MgPD0gdGhpcy5wcmV2ICYmXG4gICAgICAgICAgICBoYXNPd24uY2FsbChlbnRyeSwgXCJmaW5hbGx5TG9jXCIpICYmXG4gICAgICAgICAgICB0aGlzLnByZXYgPCBlbnRyeS5maW5hbGx5TG9jKSB7XG4gICAgICAgICAgdmFyIGZpbmFsbHlFbnRyeSA9IGVudHJ5O1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIGlmIChmaW5hbGx5RW50cnkgJiZcbiAgICAgICAgICAodHlwZSA9PT0gXCJicmVha1wiIHx8XG4gICAgICAgICAgIHR5cGUgPT09IFwiY29udGludWVcIikgJiZcbiAgICAgICAgICBmaW5hbGx5RW50cnkudHJ5TG9jIDw9IGFyZyAmJlxuICAgICAgICAgIGFyZyA8PSBmaW5hbGx5RW50cnkuZmluYWxseUxvYykge1xuICAgICAgICAvLyBJZ25vcmUgdGhlIGZpbmFsbHkgZW50cnkgaWYgY29udHJvbCBpcyBub3QganVtcGluZyB0byBhXG4gICAgICAgIC8vIGxvY2F0aW9uIG91dHNpZGUgdGhlIHRyeS9jYXRjaCBibG9jay5cbiAgICAgICAgZmluYWxseUVudHJ5ID0gbnVsbDtcbiAgICAgIH1cblxuICAgICAgdmFyIHJlY29yZCA9IGZpbmFsbHl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wgYnV0IGluIHRoYXQgY2FzZVxuICAvLyB0aGUgcHJvcGVyIHNvbHV0aW9uIGlzIHRvIGZpeCB0aGUgYWNjaWRlbnRhbCBzdHJpY3QgbW9kZSBwcm9ibGVtLiBJZlxuICAvLyB5b3UndmUgbWlzY29uZmlndXJlZCB5b3VyIGJ1bmRsZXIgdG8gZm9yY2Ugc3RyaWN0IG1vZGUgYW5kIGFwcGxpZWQgYVxuICAvLyBDU1AgdG8gZm9yYmlkIEZ1bmN0aW9uLCBhbmQgeW91J3JlIG5vdCB3aWxsaW5nIHRvIGZpeCBlaXRoZXIgb2YgdGhvc2VcbiAgLy8gcHJvYmxlbXMsIHBsZWFzZSBkZXRhaWwgeW91ciB1bmlxdWUgcHJlZGljYW1lbnQgaW4gYSBHaXRIdWIgaXNzdWUuXG4gIEZ1bmN0aW9uKFwiclwiLCBcInJlZ2VuZXJhdG9yUnVudGltZSA9IHJcIikocnVudGltZSk7XG59XG4iXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///../node_modules/next/dist/compiled/regenerator-runtime/runtime.js\n"));
/***/ }),
/***/ "../node_modules/next/dist/compiled/web-vitals/web-vitals.umd.js":
/*!***********************************************************************!*\
!*** ../node_modules/next/dist/compiled/web-vitals/web-vitals.umd.js ***!
\***********************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
eval(__webpack_require__.ts("var __dirname = \"/\";\n(function(){var e={61:function(e,n){!function(e,o){ true?o(n):0}(this,(function(e){\"use strict\";var n,o,y,T,w,C=!1,c=function(e){addEventListener(\"pageshow\",(function(n){n.persisted&&(C=!0,e(n))}),!0)},u=function(){return window.performance&&(performance.getEntriesByType&&performance.getEntriesByType(\"navigation\")[0]||function(){var e=performance.timing,n={entryType:\"navigation\",startTime:0};for(var o in e)\"navigationStart\"!==o&&\"toJSON\"!==o&&(n[o]=Math.max(e[o]-e.navigationStart,0));return n}())},f=function(e,n){var o=u();return{name:e,value:void 0===n?-1:n,delta:0,entries:[],id:\"v2-\".concat(Date.now(),\"-\").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:C?\"back_forward_cache\":o&&o.type}},s=function(e,n,o){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var y=new PerformanceObserver((function(e){n(e.getEntries())}));return y.observe(Object.assign({type:e,buffered:!0},o||{})),y}}catch(e){}},l=function(e,n){var o=function t(o){\"pagehide\"!==o.type&&\"hidden\"!==document.visibilityState||(e(o),n&&(removeEventListener(\"visibilitychange\",t,!0),removeEventListener(\"pagehide\",t,!0)))};addEventListener(\"visibilitychange\",o,!0),addEventListener(\"pagehide\",o,!0)},d=function(e,n,o){var y;return function(T){n.value>=0&&(T||o)&&(n.delta=n.value-(y||0),(n.delta||void 0===y)&&(y=n.value,e(n)))}},I=-1,v=function(){return\"hidden\"===document.visibilityState?0:1/0},m=function(){l((function(e){var n=e.timeStamp;I=n}),!0)},h=function(){return I<0&&(I=v(),m(),c((function(){setTimeout((function(){I=v(),m()}),0)}))),{get firstHiddenTime(){return I}}},g=function(e,n){n=n||{};var o,y=h(),T=f(\"FCP\"),a=function(e){e.forEach((function(e){\"first-contentful-paint\"===e.name&&(C&&C.disconnect(),e.startTime<y.firstHiddenTime&&(T.value=e.startTime,T.entries.push(e),o(!0)))}))},w=window.performance&&window.performance.getEntriesByName&&window.performance.getEntriesByName(\"first-contentful-paint\")[0],C=w?null:s(\"paint\",a);(w||C)&&(o=d(e,T,n.reportAllChanges),w&&a([w]),c((function(y){T=f(\"FCP\"),o=d(e,T,n.reportAllChanges),requestAnimationFrame((function(){requestAnimationFrame((function(){T.value=performance.now()-y.timeStamp,o(!0)}))}))})))},P=!1,M=-1,E=function(e,n){n=n||{},P||(g((function(e){M=e.value})),P=!0);var o,i=function(n){M>-1&&e(n)},y=f(\"CLS\",0),T=0,w=[],u=function(e){e.forEach((function(e){if(!e.hadRecentInput){var n=w[0],C=w[w.length-1];T&&e.startTime-C.startTime<1e3&&e.startTime-n.startTime<5e3?(T+=e.value,w.push(e)):(T=e.value,w=[e]),T>y.value&&(y.value=T,y.entries=w,o())}}))},C=s(\"layout-shift\",u);C&&(o=d(i,y,n.reportAllChanges),l((function(){u(C.takeRecords()),o(!0)})),c((function(){T=0,M=-1,y=f(\"CLS\",0),o=d(i,y,n.reportAllChanges)})))},N={passive:!0,capture:!0},O=new Date,L=function(e,T){n||(n=T,o=e,y=new Date,A(removeEventListener),S())},S=function(){if(o>=0&&o<y-O){var e={entryType:\"first-input\",name:n.type,target:n.target,cancelable:n.cancelable,startTime:n.timeStamp,processingStart:n.timeStamp+o};T.forEach((function(n){n(e)})),T=[]}},b=function(e){if(e.cancelable){var n=(e.timeStamp>1e12?new Date:performance.now())-e.timeStamp;\"pointerdown\"==e.type?function(e,n){var t=function(){L(e,n),r()},i=function(){r()},r=function(){removeEventListener(\"pointerup\",t,N),removeEventListener(\"pointercancel\",i,N)};addEventListener(\"pointerup\",t,N),addEventListener(\"pointercancel\",i,N)}(n,e):L(n,e)}},A=function(e){[\"mousedown\",\"keydown\",\"touchstart\",\"pointerdown\"].forEach((function(n){return e(n,b,N)}))},F=function(e,y){y=y||{};var w,C=h(),I=f(\"FID\"),p=function(e){e.startTime<C.firstHiddenTime&&(I.value=e.processingStart-e.startTime,I.entries.push(e),w(!0))},v=function(e){e.forEach(p)},P=s(\"first-input\",v);w=d(e,I,y.reportAllChanges),P&&l((function(){v(P.takeRecords()),P.disconnect()}),!0),P&&c((function(){var C;I=f(\"FID\"),w=d(e,I,y.reportAllChanges),T=[],o=-1,n=null,A(addEventListener),C=p,T.push(C),S()}))},R=0,H=1/0,J=0,k=function(e){e.forEach((function(e){e.interactionId&&(H=Math.min(H,e.interactionId),J=Math.max(J,e.interactionId),R=J?(J-H)/7+1:0)}))},B=function(){return w?R:performance.interactionCount||0},D=function(){\"interactionCount\"in performance||w||(w=s(\"event\",k,{type:\"event\",buffered:!0,durationThreshold:0}))},z=0,x=function(){return B()-z},G=[],K={},q=function(e,n){n=n||{},D();var o,y=f(\"INP\"),r=function(e){e.forEach((function(e){e.interactionId&&function(e){var n=G[G.length-1],o=K[e.interactionId];if(o||G.length<10||e.duration>n.latency){if(o)o.entries.push(e),o.latency=Math.max(o.latency,e.duration);else{var y={id:e.interactionId,latency:e.duration,entries:[e]};K[y.id]=y,G.push(y)}G.sort((function(e,n){return n.latency-e.latency})),G.splice(10).forEach((function(e){delete K[e.id]}))}}(e)}));var n,T=(n=Math.min(G.length-1,Math.floor(x()/50)),G[n]);T&&T.latency!==y.value&&(y.value=T.latency,y.entries=T.entries,o())},T=s(\"event\",r,{durationThreshold:n.durationThreshold||40});o=d(e,y,n.reportAllChanges),T&&(l((function(){r(T.takeRecords()),y.value<0&&x()>0&&(y.value=0,y.entries=[]),o(!0)})),c((function(){G=[],z=B(),y=f(\"INP\"),o=d(e,y,n.reportAllChanges)})))},Q={},_=function(e,n){n=n||{};var o,y=h(),T=f(\"LCP\"),a=function(e){var n=e[e.length-1];if(n){var w=n.startTime;w<y.firstHiddenTime&&(T.value=w,T.entries=[n],o())}},w=s(\"largest-contentful-paint\",a);if(w){o=d(e,T,n.reportAllChanges);var u=function(){Q[T.id]||(a(w.takeRecords()),w.disconnect(),Q[T.id]=!0,o(!0))};[\"keydown\",\"click\"].forEach((function(e){addEventListener(e,u,{once:!0,capture:!0})})),l(u,!0),c((function(y){T=f(\"LCP\"),o=d(e,T,n.reportAllChanges),requestAnimationFrame((function(){requestAnimationFrame((function(){T.value=performance.now()-y.timeStamp,Q[T.id]=!0,o(!0)}))}))}))}},j=function(e,n){n=n||{};var o,y=f(\"TTFB\"),T=d(e,y,n.reportAllChanges);o=function(){var e=u();if(e){if(y.value=e.responseStart,y.value<0||y.value>performance.now())return;y.entries=[e],T(!0)}},\"complete\"===document.readyState?setTimeout(o,0):addEventListener(\"load\",(function(){return setTimeout(o,0)})),c((function(o){y=f(\"TTFB\"),T=d(e,y,n.reportAllChanges),y.value=performance.now()-o.timeStamp,T(!0)}))};e.getCLS=E,e.getFCP=g,e.getFID=F,e.getINP=q,e.getLCP=_,e.getTTFB=j,e.onCLS=E,e.onFCP=g,e.onFID=F,e.onINP=q,e.onLCP=_,e.onTTFB=j,Object.defineProperty(e,\"__esModule\",{value:!0})}))}};if(typeof __nccwpck_require__!==\"undefined\")__nccwpck_require__.ab=__dirname+\"/\";var n={};e[61](0,n);module.exports=n})();//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL25leHQvZGlzdC9jb21waWxlZC93ZWItdml0YWxzL3dlYi12aXRhbHMudW1kLmpzLmpzIiwibWFwcGluZ3MiOiI7QUFBQSxZQUFZLE9BQU8saUJBQWlCLGVBQWUsS0FBSSxNQUFNLENBQUMsQ0FBQyxtQkFBbUIsYUFBYSxpQ0FBaUMseUNBQXlDLHlCQUF5QixNQUFNLGNBQWMsb0hBQW9ILDRCQUE0QixvQ0FBb0MsOEZBQThGLFNBQVMsSUFBSSxpQkFBaUIsVUFBVSxPQUFPLHNMQUFzTCxtQkFBbUIsSUFBSSx3REFBd0QsMkNBQTJDLGtCQUFrQixHQUFHLGdDQUFnQyxtQkFBbUIsTUFBTSxNQUFNLFdBQVcsaUJBQWlCLG9CQUFvQix5SkFBeUosNEVBQTRFLG1CQUFtQixNQUFNLG1CQUFtQixzRkFBc0YsbUJBQW1CLGdEQUFnRCxjQUFjLGVBQWUsa0JBQWtCLElBQUksTUFBTSxjQUFjLHFDQUFxQyx1QkFBdUIsVUFBVSxLQUFLLEtBQUssc0JBQXNCLFdBQVcsaUJBQWlCLFFBQVEscUNBQXFDLHVCQUF1QixvSUFBb0ksR0FBRyxtSkFBbUosOERBQThELHlFQUF5RSxrQ0FBa0MsNENBQTRDLEdBQUcsR0FBRyxJQUFJLDJCQUEyQixPQUFPLG9CQUFvQixVQUFVLFNBQVMsb0JBQW9CLFdBQVcscUNBQXFDLHVCQUF1QixzQkFBc0IsMkJBQ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DTFM9RSxlLm9uRkNQPWcsZS5vbkZJRD1GLGUub25JTlA9cSxlLm9uTENQPV8sZS5vblRURkI9aixPYmplY3QuZGVmaW5lUHJvcGVydHkoZSxcIl9fZXNNb2R1bGVcIix7dmFsdWU6ITB9KX0pKX19O2lmKHR5cGVvZiBfX25jY3dwY2tfcmVxdWlyZV9fIT09XCJ1bmRlZmluZWRcIilfX25jY3dwY2tfcmVxdWlyZV9fLmFiPV9fZGlybmFtZStcIi9cIjt2YXIgbj17fTtlWzYxXSgwLG4pO21vZHVsZS5leHBvcnRzPW59KSgpOyJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///../node_modules/next/dist/compiled/web-vitals/web-vitals.umd.js\n"));
/***/ }),
/***/ "../node_modules/next/dist/lib/is-error.js":
/*!*************************************************!*\
!*** ../node_modules/next/dist/lib/is-error.js ***!
\*************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = isError;\nexports.getProperError = getProperError;\nvar _isPlainObject = __webpack_require__(/*! ../shared/lib/is-plain-object */ \"../node_modules/next/dist/shared/lib/is-plain-object.js\");\nfunction isError(err) {\n return typeof err === \"object\" && err !== null && \"name\" in err && \"message\" in err;\n}\nfunction getProperError(err) {\n if (isError(err)) {\n return err;\n }\n if (true) {\n // provide better error for case where `throw undefined`\n // is called in development\n if (typeof err === \"undefined\") {\n return new Error(\"An undefined error was thrown, \" + \"see here for more info: https://nextjs.org/docs/messages/threw-undefined\");\n }\n if (err === null) {\n return new Error(\"A null error was thrown, \" + \"see here for more info: https://nextjs.org/docs/messages/threw-undefined\");\n }\n }\n return new Error((0, _isPlainObject).isPlainObject(err) ? JSON.stringify(err) : err + \"\");\n}\n\n//# sourceMappingURL=is-error.js.map//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJ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VycjtcbiAgICB9XG4gICAgaWYgKHByb2Nlc3MuZW52Lk5PREVfRU5WID09PSBcImRldmVsb3BtZW50XCIpIHtcbiAgICAgICAgLy8gcHJvdmlkZSBiZXR0ZXIgZXJyb3IgZm9yIGNhc2Ugd2hlcmUgYHRocm93IHVuZGVmaW5lZGBcbiAgICAgICAgLy8gaXMgY2FsbGVkIGluIGRldmVsb3BtZW50XG4gICAgICAgIGlmICh0eXBlb2YgZXJyID09PSBcInVuZGVmaW5lZFwiKSB7XG4gICAgICAgICAgICByZXR1cm4gbmV3IEVycm9yKFwiQW4gdW5kZWZpbmVkIGVycm9yIHdhcyB0aHJvd24sIFwiICsgXCJzZWUgaGVyZSBmb3IgbW9yZSBpbmZvOiBodHRwczovL25leHRqcy5vcmcvZG9jcy9tZXNzYWdlcy90aHJldy11bmRlZmluZWRcIik7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKGVyciA9PT0gbnVsbCkge1xuICAgICAgICAgICAgcmV0dXJuIG5ldyBFcnJvcihcIkEgbnVsbCBlcnJvciB3YXMgdGhyb3duLCBcIiArIFwic2VlIGhlcmUgZm9yIG1vcmUgaW5mbzogaHR0cHM6Ly9uZXh0anMub3JnL2RvY3MvbWVzc2FnZXMvdGhyZXctdW5kZWZpbmVkXCIpO1xuICAgICAgICB9XG4gICAgfVxuICAgIHJldHVybiBuZXcgRXJyb3IoKDAsIF9pc1BsYWluT2JqZWN0KS5pc1BsYWluT2JqZWN0KGVycikgPyBKU09OLnN0cmluZ2lmeShlcnIpIDogZXJyICsgXCJcIik7XG59XG5cbi8vIyBzb3VyY2VNYXBwaW5nVVJMPWlzLWVycm9yLmpzLm1hcCJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///../node_modules/next/dist/lib/is-error.js\n"));
/***/ }),
/***/ "../node_modules/next/router.js":
/*!**************************************!*\
!*** ../node_modules/next/router.js ***!
\**************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
eval(__webpack_require__.ts("module.exports = __webpack_require__(/*! ./dist/client/router */ \"../node_modules/next/dist/client/router.js\")\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL25leHQvcm91dGVyLmpzLmpzIiwibWFwcGluZ3MiOiJBQUFBLDhHQUFnRCIsInNvdXJjZXMiOlsid2VicGFjazovL19OX0UvLi4vbm9kZV9tb2R1bGVzL25leHQvcm91dGVyLmpzP2IyN2IiXSwic291cmNlc0NvbnRlbnQiOlsibW9kdWxlLmV4cG9ydHMgPSByZXF1aXJlKCcuL2Rpc3QvY2xpZW50L3JvdXRlcicpXG4iXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///../node_modules/next/router.js\n"));
/***/ }),
/***/ "../node_modules/react-dom/cjs/react-dom.development.js":
/*!**************************************************************!*\
!*** ../node_modules/react-dom/cjs/react-dom.development.js ***!
\**************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("/** @license React v17.0.2\n * react-dom.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\nif (true) {\n (function() {\n'use strict';\n\nvar React = __webpack_require__(/*! react */ \"../node_modules/react/index.js\");\nvar _assign = __webpack_require__(/*! object-assign */ \"../node_modules/next/dist/build/polyfills/object-assign.js\");\nvar Scheduler = __webpack_require__(/*! scheduler */ \"../node_modules/scheduler/index.js\");\nvar tracing = __webpack_require__(/*! scheduler/tracing */ \"../node_modules/scheduler/tracing.js\");\n\nvar ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n\n// by calls to these methods by a Babel plugin.\n//\n// In PROD (or in packages without access to React internals),\n// they are left as they are instead.\n\nfunction warn(format) {\n {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n printWarning('warn', format, args);\n }\n}\nfunction error(format) {\n {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n printWarning('error', format, args);\n }\n}\n\nfunction printWarning(level, format, args) {\n // When changing this logic, you might want to also\n // update consoleWithStackDev.www.js as well.\n {\n var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n var stack = ReactDebugCurrentFrame.getStackAddendum();\n\n if (stack !== '') {\n format += '%s';\n args = args.concat([stack]);\n }\n\n var argsWithFormat = args.map(function (item) {\n return '' + item;\n }); // Careful: RN currently depends on this prefix\n\n argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it\n // breaks IE9: https://github.com/facebook/react/issues/13610\n // eslint-disable-next-line react-internal/no-production-logging\n\n Function.prototype.apply.call(console[level], console, argsWithFormat);\n }\n}\n\nif (!React) {\n {\n throw Error( \"ReactDOM was loaded before React. Make sure you load the React package before loading ReactDOM.\" );\n }\n}\n\nvar FunctionComponent = 0;\nvar ClassComponent = 1;\nvar IndeterminateComponent = 2; // Before we know whether it is function or class\n\nvar HostRoot = 3; // Root of a host tree. Could be nested inside another node.\n\nvar HostPortal = 4; // A subtree. Could be an entry point to a different renderer.\n\nvar HostComponent = 5;\nvar HostText = 6;\nvar Fragment = 7;\nvar Mode = 8;\nvar ContextConsumer = 9;\nvar ContextProvider = 10;\nvar ForwardRef = 11;\nvar Profiler = 12;\nvar SuspenseComponent = 13;\nvar MemoComponent = 14;\nvar SimpleMemoComponent = 15;\nvar LazyComponent = 16;\nvar IncompleteClassComponent = 17;\nvar DehydratedFragment = 18;\nvar SuspenseListComponent = 19;\nvar FundamentalComponent = 20;\nvar ScopeComponent = 21;\nvar Block = 22;\nvar OffscreenComponent = 23;\nvar LegacyHiddenComponent = 24;\n\n// Filter certain DOM attributes (e.g. src, href) if their values are empty strings.\n\nvar enableProfilerTimer = true; // Record durations for commit and passive effects phases.\n\nvar enableFundamentalAPI = false; // Experimental Scope support.\nvar enableNewReconciler = false; // Errors that are thrown while unmounting (or after in the case of passive effects)\nvar warnAboutStringRefs = false;\n\nvar allNativeEvents = new Set();\n/**\n * Mapping from registration name to event name\n */\n\n\nvar registrationNameDependencies = {};\n/**\n * Mapping from lowercase registration names to the properly cased version,\n * used to warn in the case of missing event handlers. Available\n * only in true.\n * @type {Object}\n */\n\nvar possibleRegistrationNames = {} ; // Trust the developer to only use possibleRegistrationNames in true\n\nfunction registerTwoPhaseEvent(registrationName, dependencies) {\n registerDirectEvent(registrationName, dependencies);\n registerDirectEvent(registrationName + 'Capture', dependencies);\n}\nfunction registerDirectEvent(registrationName, dependencies) {\n {\n if (registrationNameDependencies[registrationName]) {\n error('EventRegistry: More than one plugin attempted to publish the same ' + 'registration name, `%s`.', registrationName);\n }\n }\n\n registrationNameDependencies[registrationName] = dependencies;\n\n {\n var lowerCasedName = registrationName.toLowerCase();\n possibleRegistrationNames[lowerCasedName] = registrationName;\n\n if (registrationName === 'onDoubleClick') {\n possibleRegistrationNames.ondblclick = registrationName;\n }\n }\n\n for (var i = 0; i < dependencies.length; i++) {\n allNativeEvents.add(dependencies[i]);\n }\n}\n\nvar canUseDOM = !!(typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined');\n\n// A reserved attribute.\n// It is handled by React separately and shouldn't be written to the DOM.\nvar RESERVED = 0; // A simple string attribute.\n// Attributes that aren't in the filter are presumed to have this type.\n\nvar STRING = 1; // A string attribute that accepts booleans in React. In HTML, these are called\n// \"enumerated\" attributes with \"true\" and \"false\" as possible values.\n// When true, it should be set to a \"true\" string.\n// When false, it should be set to a \"false\" string.\n\nvar BOOLEANISH_STRING = 2; // A real boolean attribute.\n// When true, it should be present (set either to an empty string or its name).\n// When false, it should be omitted.\n\nvar BOOLEAN = 3; // An attribute that can be used as a flag as well as with a value.\n// When true, it should be present (set either to an empty string or its name).\n// When false, it should be omitted.\n// For any other value, should be present with that value.\n\nvar OVERLOADED_BOOLEAN = 4; // An attribute that must be numeric or parse as a numeric.\n// When falsy, it should be removed.\n\nvar NUMERIC = 5; // An attribute that must be positive numeric or parse as a positive numeric.\n// When falsy, it should be removed.\n\nvar POSITIVE_NUMERIC = 6;\n\n/* eslint-disable max-len */\nvar 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\";\n/* eslint-enable max-len */\n\nvar ATTRIBUTE_NAME_CHAR = ATTRIBUTE_NAME_START_CHAR + \"\\\\-.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040\";\nvar ROOT_ATTRIBUTE_NAME = 'data-reactroot';\nvar VALID_ATTRIBUTE_NAME_REGEX = new RegExp('^[' + ATTRIBUTE_NAME_START_CHAR + '][' + ATTRIBUTE_NAME_CHAR + ']*$');\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar illegalAttributeNameCache = {};\nvar validatedAttributeNameCache = {};\nfunction isAttributeNameSafe(attributeName) {\n if (hasOwnProperty.call(validatedAttributeNameCache, attributeName)) {\n return true;\n }\n\n if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) {\n return false;\n }\n\n if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) {\n validatedAttributeNameCache[attributeName] = true;\n return true;\n }\n\n illegalAttributeNameCache[attributeName] = true;\n\n {\n error('Invalid attribute name: `%s`', attributeName);\n }\n\n return false;\n}\nfunction shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag) {\n if (propertyInfo !== null) {\n return propertyInfo.type === RESERVED;\n }\n\n if (isCustomComponentTag) {\n return false;\n }\n\n if (name.length > 2 && (name[0] === 'o' || name[0] === 'O') && (name[1] === 'n' || name[1] === 'N')) {\n return true;\n }\n\n return false;\n}\nfunction shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag) {\n if (propertyInfo !== null && propertyInfo.type === RESERVED) {\n return false;\n }\n\n switch (typeof value) {\n case 'function': // $FlowIssue symbol is perfectly valid here\n\n case 'symbol':\n // eslint-disable-line\n return true;\n\n case 'boolean':\n {\n if (isCustomComponentTag) {\n return false;\n }\n\n if (propertyInfo !== null) {\n return !propertyInfo.acceptsBooleans;\n } else {\n var prefix = name.toLowerCase().slice(0, 5);\n return prefix !== 'data-' && prefix !== 'aria-';\n }\n }\n\n default:\n return false;\n }\n}\nfunction shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag) {\n if (value === null || typeof value === 'undefined') {\n return true;\n }\n\n if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag)) {\n return true;\n }\n\n if (isCustomComponentTag) {\n return false;\n }\n\n if (propertyInfo !== null) {\n\n switch (propertyInfo.type) {\n case BOOLEAN:\n return !value;\n\n case OVERLOADED_BOOLEAN:\n return value === false;\n\n case NUMERIC:\n return isNaN(value);\n\n case POSITIVE_NUMERIC:\n return isNaN(value) || value < 1;\n }\n }\n\n return false;\n}\nfunction getPropertyInfo(name) {\n return properties.hasOwnProperty(name) ? properties[name] : null;\n}\n\nfunction PropertyInfoRecord(name, type, mustUseProperty, attributeName, attributeNamespace, sanitizeURL, removeEmptyString) {\n this.acceptsBooleans = type === BOOLEANISH_STRING || type === BOOLEAN || type === OVERLOADED_BOOLEAN;\n this.attributeName = attributeName;\n this.attributeNamespace = attributeNamespace;\n this.mustUseProperty = mustUseProperty;\n this.propertyName = name;\n this.type = type;\n this.sanitizeURL = sanitizeURL;\n this.removeEmptyString = removeEmptyString;\n} // When adding attributes to this list, be sure to also add them to\n// the `possibleStandardNames` module to ensure casing and incorrect\n// name warnings.\n\n\nvar properties = {}; // These props are reserved by React. They shouldn't be written to the DOM.\n\nvar reservedProps = ['children', 'dangerouslySetInnerHTML', // TODO: This prevents the assignment of defaultValue to regular\n// elements (not just inputs). Now that ReactDOMInput assigns to the\n// defaultValue property -- do we need this?\n'defaultValue', 'defaultChecked', 'innerHTML', 'suppressContentEditableWarning', 'suppressHydrationWarning', 'style'];\nreservedProps.forEach(function (name) {\n properties[name] = new PropertyInfoRecord(name, RESERVED, false, // mustUseProperty\n name, // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false);\n}); // A few React string attributes have a different name.\n// This is a mapping from React prop names to the attribute names.\n\n[['acceptCharset', 'accept-charset'], ['className', 'class'], ['htmlFor', 'for'], ['httpEquiv', 'http-equiv']].forEach(function (_ref) {\n var name = _ref[0],\n attributeName = _ref[1];\n properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty\n attributeName, // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false);\n}); // These are \"enumerated\" HTML attributes that accept \"true\" and \"false\".\n// In React, we let users pass `true` and `false` even though technically\n// these aren't boolean attributes (they are coerced to strings).\n\n['contentEditable', 'draggable', 'spellCheck', 'value'].forEach(function (name) {\n properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty\n name.toLowerCase(), // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false);\n}); // These are \"enumerated\" SVG attributes that accept \"true\" and \"false\".\n// In React, we let users pass `true` and `false` even though technically\n// these aren't boolean attributes (they are coerced to strings).\n// Since these are SVG attributes, their attribute names are case-sensitive.\n\n['autoReverse', 'externalResourcesRequired', 'focusable', 'preserveAlpha'].forEach(function (name) {\n properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty\n name, // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false);\n}); // These are HTML boolean attributes.\n\n['allowFullScreen', 'async', // Note: there is a special case that prevents it from being written to the DOM\n// on the client side because the browsers are inconsistent. Instead we call focus().\n'autoFocus', 'autoPlay', 'controls', 'default', 'defer', 'disabled', 'disablePictureInPicture', 'disableRemotePlayback', 'formNoValidate', 'hidden', 'loop', 'noModule', 'noValidate', 'open', 'playsInline', 'readOnly', 'required', 'reversed', 'scoped', 'seamless', // Microdata\n'itemScope'].forEach(function (name) {\n properties[name] = new PropertyInfoRecord(name, BOOLEAN, false, // mustUseProperty\n name.toLowerCase(), // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false);\n}); // These are the few React props that we set as DOM properties\n// rather than attributes. These are all booleans.\n\n['checked', // Note: `option.selected` is not updated if `select.multiple` is\n// disabled with `removeAttribute`. We have special logic for handling this.\n'multiple', 'muted', 'selected' // NOTE: if you add a camelCased prop to this list,\n// you'll need to set attributeName to name.toLowerCase()\n// instead in the assignment below.\n].forEach(function (name) {\n properties[name] = new PropertyInfoRecord(name, BOOLEAN, true, // mustUseProperty\n name, // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false);\n}); // These are HTML attributes that are \"overloaded booleans\": they behave like\n// booleans, but can also accept a string value.\n\n['capture', 'download' // NOTE: if you add a camelCased prop to this list,\n// you'll need to set attributeName to name.toLowerCase()\n// instead in the assignment below.\n].forEach(function (name) {\n properties[name] = new PropertyInfoRecord(name, OVERLOADED_BOOLEAN, false, // mustUseProperty\n name, // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false);\n}); // These are HTML attributes that must be positive numbers.\n\n['cols', 'rows', 'size', 'span' // NOTE: if you add a camelCased prop to this list,\n// you'll need to set attributeName to name.toLowerCase()\n// instead in the assignment below.\n].forEach(function (name) {\n properties[name] = new PropertyInfoRecord(name, POSITIVE_NUMERIC, false, // mustUseProperty\n name, // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false);\n}); // These are HTML attributes that must be numbers.\n\n['rowSpan', 'start'].forEach(function (name) {\n properties[name] = new PropertyInfoRecord(name, NUMERIC, false, // mustUseProperty\n name.toLowerCase(), // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false);\n});\nvar CAMELIZE = /[\\-\\:]([a-z])/g;\n\nvar capitalize = function (token) {\n return token[1].toUpperCase();\n}; // This is a list of all SVG attributes that need special casing, namespacing,\n// or boolean value assignment. Regular attributes that just accept strings\n// and have the same names are omitted, just like in the HTML attribute filter.\n// Some of these attributes can be hard to find. This list was created by\n// scraping the MDN documentation.\n\n\n['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,\n// you'll need to set attributeName to name.toLowerCase()\n// instead in the assignment below.\n].forEach(function (attributeName) {\n var name = attributeName.replace(CAMELIZE, capitalize);\n properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty\n attributeName, null, // attributeNamespace\n false, // sanitizeURL\n false);\n}); // String SVG attributes with the xlink namespace.\n\n['xlink:actuate', 'xlink:arcrole', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type' // NOTE: if you add a camelCased prop to this list,\n// you'll need to set attributeName to name.toLowerCase()\n// instead in the assignment below.\n].forEach(function (attributeName) {\n var name = attributeName.replace(CAMELIZE, capitalize);\n properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty\n attributeName, 'http://www.w3.org/1999/xlink', false, // sanitizeURL\n false);\n}); // String SVG attributes with the xml namespace.\n\n['xml:base', 'xml:lang', 'xml:space' // NOTE: if you add a camelCased prop to this list,\n// you'll need to set attributeName to name.toLowerCase()\n// instead in the assignment below.\n].forEach(function (attributeName) {\n var name = attributeName.replace(CAMELIZE, capitalize);\n properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty\n attributeName, 'http://www.w3.org/XML/1998/namespace', false, // sanitizeURL\n false);\n}); // These attribute exists both in HTML and SVG.\n// The attribute name is case-sensitive in SVG so we can't just use\n// the React name like we do for attributes that exist only in HTML.\n\n['tabIndex', 'crossOrigin'].forEach(function (attributeName) {\n properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty\n attributeName.toLowerCase(), // attributeName\n null, // attributeNamespace\n false, // sanitizeURL\n false);\n}); // These attributes accept URLs. These must not allow javascript: URLS.\n// These will also need to accept Trusted Types object in the future.\n\nvar xlinkHref = 'xlinkHref';\nproperties[xlinkHref] = new PropertyInfoRecord('xlinkHref', STRING, false, // mustUseProperty\n'xlink:href', 'http://www.w3.org/1999/xlink', true, // sanitizeURL\nfalse);\n['src', 'href', 'action', 'formAction'].forEach(function (attributeName) {\n properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty\n attributeName.toLowerCase(), // attributeName\n null, // attributeNamespace\n true, // sanitizeURL\n true);\n});\n\n// and any newline or tab are filtered out as if they're not part of the URL.\n// https://url.spec.whatwg.org/#url-parsing\n// Tab or newline are defined as \\r\\n\\t:\n// https://infra.spec.whatwg.org/#ascii-tab-or-newline\n// A C0 control is a code point in the range \\u0000 NULL to \\u001F\n// INFORMATION SEPARATOR ONE, inclusive:\n// https://infra.spec.whatwg.org/#c0-control-or-space\n\n/* eslint-disable max-len */\n\nvar 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;\nvar didWarn = false;\n\nfunction sanitizeURL(url) {\n {\n if (!didWarn && isJavaScriptProtocol.test(url)) {\n didWarn = true;\n\n 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));\n }\n }\n}\n\n/**\n * Get the value for a property on a node. Only used in DEV for SSR validation.\n * The \"expected\" argument is used as a hint of what the expected value is.\n * Some properties have multiple equivalent values.\n */\nfunction getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if ( propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n\n if (value === '') {\n return true;\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n } // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n\n\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n}\n/**\n * Get the value for a attribute on a node. Only used in DEV for SSR validation.\n * The third argument is used as a hint of what the expected value is. Some\n * attributes have multiple equivalent values.\n */\n\nfunction getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n } // If the object is an opaque reference ID, it's expected that\n // the next prop is different than the server value, so just return\n // expected\n\n\n if (isOpaqueHydratingObject(expected)) {\n return expected;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n}\n/**\n * Sets the value for a property on a node.\n *\n * @param {DOMElement} node\n * @param {string} name\n * @param {*} value\n */\n\nfunction setValueForProperty(node, name, value, isCustomComponentTag) {\n var propertyInfo = getPropertyInfo(name);\n\n if (shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag)) {\n return;\n }\n\n if (shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag)) {\n value = null;\n } // If the prop isn't in the special list, treat it as a simple attribute.\n\n\n if (isCustomComponentTag || propertyInfo === null) {\n if (isAttributeNameSafe(name)) {\n var _attributeName = name;\n\n if (value === null) {\n node.removeAttribute(_attributeName);\n } else {\n node.setAttribute(_attributeName, '' + value);\n }\n }\n\n return;\n }\n\n var mustUseProperty = propertyInfo.mustUseProperty;\n\n if (mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n\n if (value === null) {\n var type = propertyInfo.type;\n node[propertyName] = type === BOOLEAN ? false : '';\n } else {\n // Contrary to `setAttribute`, object properties are properly\n // `toString`ed by IE8/9.\n node[propertyName] = value;\n }\n\n return;\n } // The rest are treated as attributes with special cases.\n\n\n var attributeName = propertyInfo.attributeName,\n attributeNamespace = propertyInfo.attributeNamespace;\n\n if (value === null) {\n node.removeAttribute(attributeName);\n } else {\n var _type = propertyInfo.type;\n var attributeValue;\n\n if (_type === BOOLEAN || _type === OVERLOADED_BOOLEAN && value === true) {\n // If attribute type is boolean, we know for sure it won't be an execution sink\n // and we won't require Trusted Type here.\n attributeValue = '';\n } else {\n // `setAttribute` with objects becomes only `[object]` in IE8/9,\n // ('' + value) makes it output the correct toString()-value.\n {\n attributeValue = '' + value;\n }\n\n if (propertyInfo.sanitizeURL) {\n sanitizeURL(attributeValue.toString());\n }\n }\n\n if (attributeNamespace) {\n node.setAttributeNS(attributeNamespace, attributeName, attributeValue);\n } else {\n node.setAttribute(attributeName, attributeValue);\n }\n }\n}\n\n// ATTENTION\n// When adding new symbols to this file,\n// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'\n// The Symbol used to tag the ReactElement-like types. If there is no native Symbol\n// nor polyfill, then a plain number is used for performance.\nvar REACT_ELEMENT_TYPE = 0xeac7;\nvar REACT_PORTAL_TYPE = 0xeaca;\nvar REACT_FRAGMENT_TYPE = 0xeacb;\nvar REACT_STRICT_MODE_TYPE = 0xeacc;\nvar REACT_PROFILER_TYPE = 0xead2;\nvar REACT_PROVIDER_TYPE = 0xeacd;\nvar REACT_CONTEXT_TYPE = 0xeace;\nvar REACT_FORWARD_REF_TYPE = 0xead0;\nvar REACT_SUSPENSE_TYPE = 0xead1;\nvar REACT_SUSPENSE_LIST_TYPE = 0xead8;\nvar REACT_MEMO_TYPE = 0xead3;\nvar REACT_LAZY_TYPE = 0xead4;\nvar REACT_BLOCK_TYPE = 0xead9;\nvar REACT_SERVER_BLOCK_TYPE = 0xeada;\nvar REACT_FUNDAMENTAL_TYPE = 0xead5;\nvar REACT_SCOPE_TYPE = 0xead7;\nvar REACT_OPAQUE_ID_TYPE = 0xeae0;\nvar REACT_DEBUG_TRACING_MODE_TYPE = 0xeae1;\nvar REACT_OFFSCREEN_TYPE = 0xeae2;\nvar REACT_LEGACY_HIDDEN_TYPE = 0xeae3;\n\nif (typeof Symbol === 'function' && Symbol.for) {\n var symbolFor = Symbol.for;\n REACT_ELEMENT_TYPE = symbolFor('react.element');\n REACT_PORTAL_TYPE = symbolFor('react.portal');\n REACT_FRAGMENT_TYPE = symbolFor('react.fragment');\n REACT_STRICT_MODE_TYPE = symbolFor('react.strict_mode');\n REACT_PROFILER_TYPE = symbolFor('react.profiler');\n REACT_PROVIDER_TYPE = symbolFor('react.provider');\n REACT_CONTEXT_TYPE = symbolFor('react.context');\n REACT_FORWARD_REF_TYPE = symbolFor('react.forward_ref');\n REACT_SUSPENSE_TYPE = symbolFor('react.suspense');\n REACT_SUSPENSE_LIST_TYPE = symbolFor('react.suspense_list');\n REACT_MEMO_TYPE = symbolFor('react.memo');\n REACT_LAZY_TYPE = symbolFor('react.lazy');\n REACT_BLOCK_TYPE = symbolFor('react.block');\n REACT_SERVER_BLOCK_TYPE = symbolFor('react.server.block');\n REACT_FUNDAMENTAL_TYPE = symbolFor('react.fundamental');\n REACT_SCOPE_TYPE = symbolFor('react.scope');\n REACT_OPAQUE_ID_TYPE = symbolFor('react.opaque.id');\n REACT_DEBUG_TRACING_MODE_TYPE = symbolFor('react.debug_trace_mode');\n REACT_OFFSCREEN_TYPE = symbolFor('react.offscreen');\n REACT_LEGACY_HIDDEN_TYPE = symbolFor('react.legacy_hidden');\n}\n\nvar MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\nvar FAUX_ITERATOR_SYMBOL = '@@iterator';\nfunction getIteratorFn(maybeIterable) {\n if (maybeIterable === null || typeof maybeIterable !== 'object') {\n return null;\n }\n\n var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];\n\n if (typeof maybeIterator === 'function') {\n return maybeIterator;\n }\n\n return null;\n}\n\n// Helpers to patch console.logs to avoid logging during side-effect free\n// replaying on render function. This currently only patches the object\n// lazily which won't cover if the log function was extracted eagerly.\n// We could also eagerly patch the method.\nvar disabledDepth = 0;\nvar prevLog;\nvar prevInfo;\nvar prevWarn;\nvar prevError;\nvar prevGroup;\nvar prevGroupCollapsed;\nvar prevGroupEnd;\n\nfunction disabledLog() {}\n\ndisabledLog.__reactDisabledLog = true;\nfunction disableLogs() {\n {\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n prevLog = console.log;\n prevInfo = console.info;\n prevWarn = console.warn;\n prevError = console.error;\n prevGroup = console.group;\n prevGroupCollapsed = console.groupCollapsed;\n prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099\n\n var props = {\n configurable: true,\n enumerable: true,\n value: disabledLog,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n info: props,\n log: props,\n warn: props,\n error: props,\n group: props,\n groupCollapsed: props,\n groupEnd: props\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n disabledDepth++;\n }\n}\nfunction reenableLogs() {\n {\n disabledDepth--;\n\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n var props = {\n configurable: true,\n enumerable: true,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n log: _assign({}, props, {\n value: prevLog\n }),\n info: _assign({}, props, {\n value: prevInfo\n }),\n warn: _assign({}, props, {\n value: prevWarn\n }),\n error: _assign({}, props, {\n value: prevError\n }),\n group: _assign({}, props, {\n value: prevGroup\n }),\n groupCollapsed: _assign({}, props, {\n value: prevGroupCollapsed\n }),\n groupEnd: _assign({}, props, {\n value: prevGroupEnd\n })\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n if (disabledDepth < 0) {\n error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');\n }\n }\n}\n\nvar ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;\nvar prefix;\nfunction describeBuiltInComponentFrame(name, source, ownerFn) {\n {\n if (prefix === undefined) {\n // Extract the VM specific prefix used by each line.\n try {\n throw Error();\n } catch (x) {\n var match = x.stack.trim().match(/\\n( *(at )?)/);\n prefix = match && match[1] || '';\n }\n } // We use the prefix to ensure our stacks line up with native stack frames.\n\n\n return '\\n' + prefix + name;\n }\n}\nvar reentry = false;\nvar componentFrameCache;\n\n{\n var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;\n componentFrameCache = new PossiblyWeakMap();\n}\n\nfunction describeNativeComponentFrame(fn, construct) {\n // If something asked for a stack inside a fake render, it should get ignored.\n if (!fn || reentry) {\n return '';\n }\n\n {\n var frame = componentFrameCache.get(fn);\n\n if (frame !== undefined) {\n return frame;\n }\n }\n\n var control;\n reentry = true;\n var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.\n\n Error.prepareStackTrace = undefined;\n var previousDispatcher;\n\n {\n previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function\n // for warnings.\n\n ReactCurrentDispatcher.current = null;\n disableLogs();\n }\n\n try {\n // This should throw.\n if (construct) {\n // Something should be setting the props in the constructor.\n var Fake = function () {\n throw Error();\n }; // $FlowFixMe\n\n\n Object.defineProperty(Fake.prototype, 'props', {\n set: function () {\n // We use a throwing setter instead of frozen or non-writable props\n // because that won't throw in a non-strict mode function.\n throw Error();\n }\n });\n\n if (typeof Reflect === 'object' && Reflect.construct) {\n // We construct a different control for this case to include any extra\n // frames added by the construct call.\n try {\n Reflect.construct(Fake, []);\n } catch (x) {\n control = x;\n }\n\n Reflect.construct(fn, [], Fake);\n } else {\n try {\n Fake.call();\n } catch (x) {\n control = x;\n }\n\n fn.call(Fake.prototype);\n }\n } else {\n try {\n throw Error();\n } catch (x) {\n control = x;\n }\n\n fn();\n }\n } catch (sample) {\n // This is inlined manually because closure doesn't do it for us.\n if (sample && control && typeof sample.stack === 'string') {\n // This extracts the first frame from the sample that isn't also in the control.\n // Skipping one frame that we assume is the frame that calls the two.\n var sampleLines = sample.stack.split('\\n');\n var controlLines = control.stack.split('\\n');\n var s = sampleLines.length - 1;\n var c = controlLines.length - 1;\n\n while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {\n // We expect at least one stack frame to be shared.\n // Typically this will be the root most one. However, stack frames may be\n // cut off due to maximum stack limits. In this case, one maybe cut off\n // earlier than the other. We assume that the sample is longer or the same\n // and there for cut off earlier. So we should find the root most frame in\n // the sample somewhere in the control.\n c--;\n }\n\n for (; s >= 1 && c >= 0; s--, c--) {\n // Next we find the first one that isn't the same which should be the\n // frame that called our sample function and the control.\n if (sampleLines[s] !== controlLines[c]) {\n // In V8, the first line is describing the message but other VMs don't.\n // If we're about to return the first line, and the control is also on the same\n // line, that's a pretty good indicator that our sample threw at same line as\n // the control. I.e. before we entered the sample frame. So we ignore this result.\n // This can happen if you passed a class to function component, or non-function.\n if (s !== 1 || c !== 1) {\n do {\n s--;\n c--; // We may still have similar intermediate frames from the construct call.\n // The next one that isn't the same should be our match though.\n\n if (c < 0 || sampleLines[s] !== controlLines[c]) {\n // V8 adds a \"new\" prefix for native classes. Let's remove it to make it prettier.\n var _frame = '\\n' + sampleLines[s].replace(' at new ', ' at ');\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, _frame);\n }\n } // Return the line we found.\n\n\n return _frame;\n }\n } while (s >= 1 && c >= 0);\n }\n\n break;\n }\n }\n }\n } finally {\n reentry = false;\n\n {\n ReactCurrentDispatcher.current = previousDispatcher;\n reenableLogs();\n }\n\n Error.prepareStackTrace = previousPrepareStackTrace;\n } // Fallback to just using the name if we couldn't make it throw.\n\n\n var name = fn ? fn.displayName || fn.name : '';\n var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, syntheticFrame);\n }\n }\n\n return syntheticFrame;\n}\n\nfunction describeClassComponentFrame(ctor, source, ownerFn) {\n {\n return describeNativeComponentFrame(ctor, true);\n }\n}\nfunction describeFunctionComponentFrame(fn, source, ownerFn) {\n {\n return describeNativeComponentFrame(fn, false);\n }\n}\n\nfunction shouldConstruct(Component) {\n var prototype = Component.prototype;\n return !!(prototype && prototype.isReactComponent);\n}\n\nfunction describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {\n\n if (type == null) {\n return '';\n }\n\n if (typeof type === 'function') {\n {\n return describeNativeComponentFrame(type, shouldConstruct(type));\n }\n }\n\n if (typeof type === 'string') {\n return describeBuiltInComponentFrame(type);\n }\n\n switch (type) {\n case REACT_SUSPENSE_TYPE:\n return describeBuiltInComponentFrame('Suspense');\n\n case REACT_SUSPENSE_LIST_TYPE:\n return describeBuiltInComponentFrame('SuspenseList');\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_FORWARD_REF_TYPE:\n return describeFunctionComponentFrame(type.render);\n\n case REACT_MEMO_TYPE:\n // Memo may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);\n\n case REACT_BLOCK_TYPE:\n return describeFunctionComponentFrame(type._render);\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n // Lazy may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);\n } catch (x) {}\n }\n }\n }\n\n return '';\n}\n\nfunction describeFiber(fiber) {\n var owner = fiber._debugOwner ? fiber._debugOwner.type : null ;\n var source = fiber._debugSource ;\n\n switch (fiber.tag) {\n case HostComponent:\n return describeBuiltInComponentFrame(fiber.type);\n\n case LazyComponent:\n return describeBuiltInComponentFrame('Lazy');\n\n case SuspenseComponent:\n return describeBuiltInComponentFrame('Suspense');\n\n case SuspenseListComponent:\n return describeBuiltInComponentFrame('SuspenseList');\n\n case FunctionComponent:\n case IndeterminateComponent:\n case SimpleMemoComponent:\n return describeFunctionComponentFrame(fiber.type);\n\n case ForwardRef:\n return describeFunctionComponentFrame(fiber.type.render);\n\n case Block:\n return describeFunctionComponentFrame(fiber.type._render);\n\n case ClassComponent:\n return describeClassComponentFrame(fiber.type);\n\n default:\n return '';\n }\n}\n\nfunction getStackByFiberInDevAndProd(workInProgress) {\n try {\n var info = '';\n var node = workInProgress;\n\n do {\n info += describeFiber(node);\n node = node.return;\n } while (node);\n\n return info;\n } catch (x) {\n return '\\nError generating stack: ' + x.message + '\\n' + x.stack;\n }\n}\n\nfunction getWrappedName(outerType, innerType, wrapperName) {\n var functionName = innerType.displayName || innerType.name || '';\n return outerType.displayName || (functionName !== '' ? wrapperName + \"(\" + functionName + \")\" : wrapperName);\n}\n\nfunction getContextName(type) {\n return type.displayName || 'Context';\n}\n\nfunction getComponentName(type) {\n if (type == null) {\n // Host root, text node or just invalid type.\n return null;\n }\n\n {\n if (typeof type.tag === 'number') {\n error('Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.');\n }\n }\n\n if (typeof type === 'function') {\n return type.displayName || type.name || null;\n }\n\n if (typeof type === 'string') {\n return type;\n }\n\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return 'Fragment';\n\n case REACT_PORTAL_TYPE:\n return 'Portal';\n\n case REACT_PROFILER_TYPE:\n return 'Profiler';\n\n case REACT_STRICT_MODE_TYPE:\n return 'StrictMode';\n\n case REACT_SUSPENSE_TYPE:\n return 'Suspense';\n\n case REACT_SUSPENSE_LIST_TYPE:\n return 'SuspenseList';\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_CONTEXT_TYPE:\n var context = type;\n return getContextName(context) + '.Consumer';\n\n case REACT_PROVIDER_TYPE:\n var provider = type;\n return getContextName(provider._context) + '.Provider';\n\n case REACT_FORWARD_REF_TYPE:\n return getWrappedName(type, type.render, 'ForwardRef');\n\n case REACT_MEMO_TYPE:\n return getComponentName(type.type);\n\n case REACT_BLOCK_TYPE:\n return getComponentName(type._render);\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n return getComponentName(init(payload));\n } catch (x) {\n return null;\n }\n }\n }\n }\n\n return null;\n}\n\nvar ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\nvar current = null;\nvar isRendering = false;\nfunction getCurrentFiberOwnerNameInDevOrNull() {\n {\n if (current === null) {\n return null;\n }\n\n var owner = current._debugOwner;\n\n if (owner !== null && typeof owner !== 'undefined') {\n return getComponentName(owner.type);\n }\n }\n\n return null;\n}\n\nfunction getCurrentFiberStackInDev() {\n {\n if (current === null) {\n return '';\n } // Safe because if current fiber exists, we are reconciling,\n // and it is guaranteed to be the work-in-progress version.\n\n\n return getStackByFiberInDevAndProd(current);\n }\n}\n\nfunction resetCurrentFiber() {\n {\n ReactDebugCurrentFrame.getCurrentStack = null;\n current = null;\n isRendering = false;\n }\n}\nfunction setCurrentFiber(fiber) {\n {\n ReactDebugCurrentFrame.getCurrentStack = getCurrentFiberStackInDev;\n current = fiber;\n isRendering = false;\n }\n}\nfunction setIsRendering(rendering) {\n {\n isRendering = rendering;\n }\n}\nfunction getIsRendering() {\n {\n return isRendering;\n }\n}\n\n// Flow does not allow string concatenation of most non-string types. To work\n// around this limitation, we use an opaque type that can only be obtained by\n// passing the value through getToStringValue first.\nfunction toString(value) {\n return '' + value;\n}\nfunction getToStringValue(value) {\n switch (typeof value) {\n case 'boolean':\n case 'number':\n case 'object':\n case 'string':\n case 'undefined':\n return value;\n\n default:\n // function, symbol are assigned as empty strings\n return '';\n }\n}\n\nvar hasReadOnlyValue = {\n button: true,\n checkbox: true,\n image: true,\n hidden: true,\n radio: true,\n reset: true,\n submit: true\n};\nfunction checkControlledValueProps(tagName, props) {\n {\n if (!(hasReadOnlyValue[props.type] || props.onChange || props.onInput || props.readOnly || props.disabled || props.value == null)) {\n 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`.');\n }\n\n if (!(props.onChange || props.readOnly || props.disabled || props.checked == null)) {\n 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`.');\n }\n }\n}\n\nfunction isCheckable(elem) {\n var type = elem.type;\n var nodeName = elem.nodeName;\n return nodeName && nodeName.toLowerCase() === 'input' && (type === 'checkbox' || type === 'radio');\n}\n\nfunction getTracker(node) {\n return node._valueTracker;\n}\n\nfunction detachTracker(node) {\n node._valueTracker = null;\n}\n\nfunction getValueFromNode(node) {\n var value = '';\n\n if (!node) {\n return value;\n }\n\n if (isCheckable(node)) {\n value = node.checked ? 'true' : 'false';\n } else {\n value = node.value;\n }\n\n return value;\n}\n\nfunction trackValueOnNode(node) {\n var valueField = isCheckable(node) ? 'checked' : 'value';\n var descriptor = Object.getOwnPropertyDescriptor(node.constructor.prototype, valueField);\n var currentValue = '' + node[valueField]; // if someone has already defined a value or Safari, then bail\n // and don't track value will cause over reporting of changes,\n // but it's better then a hard failure\n // (needed for certain tests that spyOn input values and Safari)\n\n if (node.hasOwnProperty(valueField) || typeof descriptor === 'undefined' || typeof descriptor.get !== 'function' || typeof descriptor.set !== 'function') {\n return;\n }\n\n var get = descriptor.get,\n set = descriptor.set;\n Object.defineProperty(node, valueField, {\n configurable: true,\n get: function () {\n return get.call(this);\n },\n set: function (value) {\n currentValue = '' + value;\n set.call(this, value);\n }\n }); // We could've passed this the first time\n // but it triggers a bug in IE11 and Edge 14/15.\n // Calling defineProperty() again should be equivalent.\n // https://github.com/facebook/react/issues/11768\n\n Object.defineProperty(node, valueField, {\n enumerable: descriptor.enumerable\n });\n var tracker = {\n getValue: function () {\n return currentValue;\n },\n setValue: function (value) {\n currentValue = '' + value;\n },\n stopTracking: function () {\n detachTracker(node);\n delete node[valueField];\n }\n };\n return tracker;\n}\n\nfunction track(node) {\n if (getTracker(node)) {\n return;\n } // TODO: Once it's just Fiber we can move this to node._wrapperState\n\n\n node._valueTracker = trackValueOnNode(node);\n}\nfunction updateValueIfChanged(node) {\n if (!node) {\n return false;\n }\n\n var tracker = getTracker(node); // if there is no tracker at this point it's unlikely\n // that trying again will succeed\n\n if (!tracker) {\n return true;\n }\n\n var lastValue = tracker.getValue();\n var nextValue = getValueFromNode(node);\n\n if (nextValue !== lastValue) {\n tracker.setValue(nextValue);\n return true;\n }\n\n return false;\n}\n\nfunction getActiveElement(doc) {\n doc = doc || (typeof document !== 'undefined' ? document : undefined);\n\n if (typeof doc === 'undefined') {\n return null;\n }\n\n try {\n return doc.activeElement || doc.body;\n } catch (e) {\n return doc.body;\n }\n}\n\nvar didWarnValueDefaultValue = false;\nvar didWarnCheckedDefaultChecked = false;\nvar didWarnControlledToUncontrolled = false;\nvar didWarnUncontrolledToControlled = false;\n\nfunction isControlled(props) {\n var usesChecked = props.type === 'checkbox' || props.type === 'radio';\n return usesChecked ? props.checked != null : props.value != null;\n}\n/**\n * Implements an <input> host component that allows setting these optional\n * props: `checked`, `value`, `defaultChecked`, and `defaultValue`.\n *\n * If `checked` or `value` are not supplied (or null/undefined), user actions\n * that affect the checked state or value will trigger updates to the element.\n *\n * If they are supplied (and not null/undefined), the rendered element will not\n * trigger updates to the element. Instead, the props must change in order for\n * the rendered element to be updated.\n *\n * The rendered element will be initialized as unchecked (or `defaultChecked`)\n * with an empty value (or `defaultValue`).\n *\n * See http://www.w3.org/TR/2012/WD-html5-20121025/the-input-element.html\n */\n\n\nfunction getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n}\nfunction initWrapperState(element, props) {\n {\n checkControlledValueProps('input', props);\n\n if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnCheckedDefaultChecked) {\n 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);\n\n didWarnCheckedDefaultChecked = true;\n }\n\n if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue) {\n 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);\n\n didWarnValueDefaultValue = true;\n }\n }\n\n var node = element;\n var defaultValue = props.defaultValue == null ? '' : props.defaultValue;\n node._wrapperState = {\n initialChecked: props.checked != null ? props.checked : props.defaultChecked,\n initialValue: getToStringValue(props.value != null ? props.value : defaultValue),\n controlled: isControlled(props)\n };\n}\nfunction updateChecked(element, props) {\n var node = element;\n var checked = props.checked;\n\n if (checked != null) {\n setValueForProperty(node, 'checked', checked, false);\n }\n}\nfunction updateWrapper(element, props) {\n var node = element;\n\n {\n var controlled = isControlled(props);\n\n if (!node._wrapperState.controlled && controlled && !didWarnUncontrolledToControlled) {\n 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');\n\n didWarnUncontrolledToControlled = true;\n }\n\n if (node._wrapperState.controlled && !controlled && !didWarnControlledToUncontrolled) {\n 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');\n\n didWarnControlledToUncontrolled = true;\n }\n }\n\n updateChecked(element, props);\n var value = getToStringValue(props.value);\n var type = props.type;\n\n if (value != null) {\n if (type === 'number') {\n if (value === 0 && node.value === '' || // We explicitly want to coerce to number here if possible.\n // eslint-disable-next-line\n node.value != value) {\n node.value = toString(value);\n }\n } else if (node.value !== toString(value)) {\n node.value = toString(value);\n }\n } else if (type === 'submit' || type === 'reset') {\n // Submit/reset inputs need the attribute removed completely to avoid\n // blank-text buttons.\n node.removeAttribute('value');\n return;\n }\n\n {\n // When syncing the value attribute, the value comes from a cascade of\n // properties:\n // 1. The value React property\n // 2. The defaultValue React property\n // 3. Otherwise there should be no change\n if (props.hasOwnProperty('value')) {\n setDefaultValue(node, props.type, value);\n } else if (props.hasOwnProperty('defaultValue')) {\n setDefaultValue(node, props.type, getToStringValue(props.defaultValue));\n }\n }\n\n {\n // When syncing the checked attribute, it only changes when it needs\n // to be removed, such as transitioning from a checkbox into a text input\n if (props.checked == null && props.defaultChecked != null) {\n node.defaultChecked = !!props.defaultChecked;\n }\n }\n}\nfunction postMountWrapper(element, props, isHydrating) {\n var node = element; // Do not assign value if it is already set. This prevents user text input\n // from being lost during SSR hydration.\n\n if (props.hasOwnProperty('value') || props.hasOwnProperty('defaultValue')) {\n var type = props.type;\n var isButton = type === 'submit' || type === 'reset'; // Avoid setting value attribute on submit/reset inputs as it overrides the\n // default value provided by the browser. See: #12872\n\n if (isButton && (props.value === undefined || props.value === null)) {\n return;\n }\n\n var initialValue = toString(node._wrapperState.initialValue); // Do not assign value if it is already set. This prevents user text input\n // from being lost during SSR hydration.\n\n if (!isHydrating) {\n {\n // When syncing the value attribute, the value property should use\n // the wrapperState._initialValue property. This uses:\n //\n // 1. The value React property when present\n // 2. The defaultValue React property when present\n // 3. An empty string\n if (initialValue !== node.value) {\n node.value = initialValue;\n }\n }\n }\n\n {\n // Otherwise, the value attribute is synchronized to the property,\n // so we assign defaultValue to the same thing as the value property\n // assignment step above.\n node.defaultValue = initialValue;\n }\n } // Normally, we'd just do `node.checked = node.checked` upon initial mount, less this bug\n // this is needed to work around a chrome bug where setting defaultChecked\n // will sometimes influence the value of checked (even after detachment).\n // Reference: https://bugs.chromium.org/p/chromium/issues/detail?id=608416\n // We need to temporarily unset name to avoid disrupting radio button groups.\n\n\n var name = node.name;\n\n if (name !== '') {\n node.name = '';\n }\n\n {\n // When syncing the checked attribute, both the checked property and\n // attribute are assigned at the same time using defaultChecked. This uses:\n //\n // 1. The checked React property when present\n // 2. The defaultChecked React property when present\n // 3. Otherwise, false\n node.defaultChecked = !node.defaultChecked;\n node.defaultChecked = !!node._wrapperState.initialChecked;\n }\n\n if (name !== '') {\n node.name = name;\n }\n}\nfunction restoreControlledState(element, props) {\n var node = element;\n updateWrapper(node, props);\n updateNamedCousins(node, props);\n}\n\nfunction updateNamedCousins(rootNode, props) {\n var name = props.name;\n\n if (props.type === 'radio' && name != null) {\n var queryRoot = rootNode;\n\n while (queryRoot.parentNode) {\n queryRoot = queryRoot.parentNode;\n } // If `rootNode.form` was non-null, then we could try `form.elements`,\n // but that sometimes behaves strangely in IE8. We could also try using\n // `form.getElementsByName`, but that will only return direct children\n // and won't include inputs that use the HTML5 `form=` attribute. Since\n // the input might not even be in a form. It might not even be in the\n // document. Let's just use the local `querySelectorAll` to ensure we don't\n // miss anything.\n\n\n var group = queryRoot.querySelectorAll('input[name=' + JSON.stringify('' + name) + '][type=\"radio\"]');\n\n for (var i = 0; i < group.length; i++) {\n var otherNode = group[i];\n\n if (otherNode === rootNode || otherNode.form !== rootNode.form) {\n continue;\n } // This will throw if radio buttons rendered by different copies of React\n // and the same name are rendered into the same form (same as #1939).\n // That's probably okay; we don't support it just as we don't support\n // mixing React radio buttons with non-React ones.\n\n\n var otherProps = getFiberCurrentPropsFromNode(otherNode);\n\n if (!otherProps) {\n {\n throw Error( \"ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.\" );\n }\n } // We need update the tracked value on the named cousin since the value\n // was changed but the input saw no event or value set\n\n\n updateValueIfChanged(otherNode); // If this is a controlled radio button group, forcing the input that\n // was previously checked to update will cause it to be come re-checked\n // as appropriate.\n\n updateWrapper(otherNode, otherProps);\n }\n }\n} // In Chrome, assigning defaultValue to certain input types triggers input validation.\n// For number inputs, the display value loses trailing decimal points. For email inputs,\n// Chrome raises \"The specified value <x> is not a valid email address\".\n//\n// Here we check to see if the defaultValue has actually changed, avoiding these problems\n// when the user is inputting text\n//\n// https://github.com/facebook/react/issues/7253\n\n\nfunction setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || getActiveElement(node.ownerDocument) !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}\n\nvar didWarnSelectedSetOnOption = false;\nvar didWarnInvalidChild = false;\n\nfunction flattenChildren(children) {\n var content = ''; // Flatten children. We'll warn if they are invalid\n // during validateProps() which runs for hydration too.\n // Note that this would throw on non-element objects.\n // Elements are stringified (which is normally irrelevant\n // but matters for <fbt>).\n\n React.Children.forEach(children, function (child) {\n if (child == null) {\n return;\n }\n\n content += child; // Note: we don't warn about invalid children here.\n // Instead, this is done separately below so that\n // it happens during the hydration code path too.\n });\n return content;\n}\n/**\n * Implements an <option> host component that warns when `selected` is set.\n */\n\n\nfunction validateProps(element, props) {\n {\n // This mirrors the code path above, but runs for hydration too.\n // Warn about invalid children here so that client and hydration are consistent.\n // TODO: this seems like it could cause a DEV-only throw for hydration\n // if children contains a non-element object. We should try to avoid that.\n if (typeof props.children === 'object' && props.children !== null) {\n React.Children.forEach(props.children, function (child) {\n if (child == null) {\n return;\n }\n\n if (typeof child === 'string' || typeof child === 'number') {\n return;\n }\n\n if (typeof child.type !== 'string') {\n return;\n }\n\n if (!didWarnInvalidChild) {\n didWarnInvalidChild = true;\n\n error('Only strings and numbers are supported as <option> children.');\n }\n });\n } // TODO: Remove support for `selected` in <option>.\n\n\n if (props.selected != null && !didWarnSelectedSetOnOption) {\n error('Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');\n\n didWarnSelectedSetOnOption = true;\n }\n }\n}\nfunction postMountWrapper$1(element, props) {\n // value=\"\" should make a value attribute (#6219)\n if (props.value != null) {\n element.setAttribute('value', toString(getToStringValue(props.value)));\n }\n}\nfunction getHostProps$1(element, props) {\n var hostProps = _assign({\n children: undefined\n }, props);\n\n var content = flattenChildren(props.children);\n\n if (content) {\n hostProps.children = content;\n }\n\n return hostProps;\n}\n\nvar didWarnValueDefaultValue$1;\n\n{\n didWarnValueDefaultValue$1 = false;\n}\n\nfunction getDeclarationErrorAddendum() {\n var ownerName = getCurrentFiberOwnerNameInDevOrNull();\n\n if (ownerName) {\n return '\\n\\nCheck the render method of `' + ownerName + '`.';\n }\n\n return '';\n}\n\nvar valuePropNames = ['value', 'defaultValue'];\n/**\n * Validation function for `value` and `defaultValue`.\n */\n\nfunction checkSelectPropTypes(props) {\n {\n checkControlledValueProps('select', props);\n\n for (var i = 0; i < valuePropNames.length; i++) {\n var propName = valuePropNames[i];\n\n if (props[propName] == null) {\n continue;\n }\n\n var isArray = Array.isArray(props[propName]);\n\n if (props.multiple && !isArray) {\n error('The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum());\n } else if (!props.multiple && isArray) {\n error('The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum());\n }\n }\n }\n}\n\nfunction updateOptions(node, multiple, propValue, setDefaultSelected) {\n var options = node.options;\n\n if (multiple) {\n var selectedValues = propValue;\n var selectedValue = {};\n\n for (var i = 0; i < selectedValues.length; i++) {\n // Prefix to avoid chaos with special keys.\n selectedValue['$' + selectedValues[i]] = true;\n }\n\n for (var _i = 0; _i < options.length; _i++) {\n var selected = selectedValue.hasOwnProperty('$' + options[_i].value);\n\n if (options[_i].selected !== selected) {\n options[_i].selected = selected;\n }\n\n if (selected && setDefaultSelected) {\n options[_i].defaultSelected = true;\n }\n }\n } else {\n // Do not set `select.value` as exact behavior isn't consistent across all\n // browsers for all cases.\n var _selectedValue = toString(getToStringValue(propValue));\n\n var defaultSelected = null;\n\n for (var _i2 = 0; _i2 < options.length; _i2++) {\n if (options[_i2].value === _selectedValue) {\n options[_i2].selected = true;\n\n if (setDefaultSelected) {\n options[_i2].defaultSelected = true;\n }\n\n return;\n }\n\n if (defaultSelected === null && !options[_i2].disabled) {\n defaultSelected = options[_i2];\n }\n }\n\n if (defaultSelected !== null) {\n defaultSelected.selected = true;\n }\n }\n}\n/**\n * Implements a <select> host component that allows optionally setting the\n * props `value` and `defaultValue`. If `multiple` is false, the prop must be a\n * stringable. If `multiple` is true, the prop must be an array of stringables.\n *\n * If `value` is not supplied (or null/undefined), user actions that change the\n * selected option will trigger updates to the rendered options.\n *\n * If it is supplied (and not null/undefined), the rendered options will not\n * update in response to user actions. Instead, the `value` prop must change in\n * order for the rendered options to update.\n *\n * If `defaultValue` is provided, any options with the supplied values will be\n * selected.\n */\n\n\nfunction getHostProps$2(element, props) {\n return _assign({}, props, {\n value: undefined\n });\n}\nfunction initWrapperState$1(element, props) {\n var node = element;\n\n {\n checkSelectPropTypes(props);\n }\n\n node._wrapperState = {\n wasMultiple: !!props.multiple\n };\n\n {\n if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue$1) {\n error('Select 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 select ' + 'element and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components');\n\n didWarnValueDefaultValue$1 = true;\n }\n }\n}\nfunction postMountWrapper$2(element, props) {\n var node = element;\n node.multiple = !!props.multiple;\n var value = props.value;\n\n if (value != null) {\n updateOptions(node, !!props.multiple, value, false);\n } else if (props.defaultValue != null) {\n updateOptions(node, !!props.multiple, props.defaultValue, true);\n }\n}\nfunction postUpdateWrapper(element, props) {\n var node = element;\n var wasMultiple = node._wrapperState.wasMultiple;\n node._wrapperState.wasMultiple = !!props.multiple;\n var value = props.value;\n\n if (value != null) {\n updateOptions(node, !!props.multiple, value, false);\n } else if (wasMultiple !== !!props.multiple) {\n // For simplicity, reapply `defaultValue` if `multiple` is toggled.\n if (props.defaultValue != null) {\n updateOptions(node, !!props.multiple, props.defaultValue, true);\n } else {\n // Revert the select back to its default unselected state.\n updateOptions(node, !!props.multiple, props.multiple ? [] : '', false);\n }\n }\n}\nfunction restoreControlledState$1(element, props) {\n var node = element;\n var value = props.value;\n\n if (value != null) {\n updateOptions(node, !!props.multiple, value, false);\n }\n}\n\nvar didWarnValDefaultVal = false;\n\n/**\n * Implements a <textarea> host component that allows setting `value`, and\n * `defaultValue`. This differs from the traditional DOM API because value is\n * usually set as PCDATA children.\n *\n * If `value` is not supplied (or null/undefined), user actions that affect the\n * value will trigger updates to the element.\n *\n * If `value` is supplied (and not null/undefined), the rendered element will\n * not trigger updates to the element. Instead, the `value` prop must change in\n * order for the rendered element to be updated.\n *\n * The rendered element will be initialized with an empty value, the prop\n * `defaultValue` if specified, or the children content (deprecated).\n */\nfunction getHostProps$3(element, props) {\n var node = element;\n\n if (!(props.dangerouslySetInnerHTML == null)) {\n {\n throw Error( \"`dangerouslySetInnerHTML` does not make sense on <textarea>.\" );\n }\n } // Always set children to the same thing. In IE9, the selection range will\n // get reset if `textContent` is mutated. We could add a check in setTextContent\n // to only set the value if/when the value differs from the node value (which would\n // completely solve this IE9 bug), but Sebastian+Sophie seemed to like this\n // solution. The value can be a boolean or object so that's why it's forced\n // to be a string.\n\n\n var hostProps = _assign({}, props, {\n value: undefined,\n defaultValue: undefined,\n children: toString(node._wrapperState.initialValue)\n });\n\n return hostProps;\n}\nfunction initWrapperState$2(element, props) {\n var node = element;\n\n {\n checkControlledValueProps('textarea', props);\n\n if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValDefaultVal) {\n error('%s contains a textarea with both value and defaultValue props. ' + 'Textarea 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 textarea ' + 'and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component');\n\n didWarnValDefaultVal = true;\n }\n }\n\n var initialValue = props.value; // Only bother fetching default value if we're going to use it\n\n if (initialValue == null) {\n var children = props.children,\n defaultValue = props.defaultValue;\n\n if (children != null) {\n {\n error('Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.');\n }\n\n {\n if (!(defaultValue == null)) {\n {\n throw Error( \"If you supply `defaultValue` on a <textarea>, do not pass children.\" );\n }\n }\n\n if (Array.isArray(children)) {\n if (!(children.length <= 1)) {\n {\n throw Error( \"<textarea> can only have at most one child.\" );\n }\n }\n\n children = children[0];\n }\n\n defaultValue = children;\n }\n }\n\n if (defaultValue == null) {\n defaultValue = '';\n }\n\n initialValue = defaultValue;\n }\n\n node._wrapperState = {\n initialValue: getToStringValue(initialValue)\n };\n}\nfunction updateWrapper$1(element, props) {\n var node = element;\n var value = getToStringValue(props.value);\n var defaultValue = getToStringValue(props.defaultValue);\n\n if (value != null) {\n // Cast `value` to a string to ensure the value is set correctly. While\n // browsers typically do this as necessary, jsdom doesn't.\n var newValue = toString(value); // To avoid side effects (such as losing text selection), only set value if changed\n\n if (newValue !== node.value) {\n node.value = newValue;\n }\n\n if (props.defaultValue == null && node.defaultValue !== newValue) {\n node.defaultValue = newValue;\n }\n }\n\n if (defaultValue != null) {\n node.defaultValue = toString(defaultValue);\n }\n}\nfunction postMountWrapper$3(element, props) {\n var node = element; // This is in postMount because we need access to the DOM node, which is not\n // available until after the component has mounted.\n\n var textContent = node.textContent; // Only set node.value if textContent is equal to the expected\n // initial value. In IE10/IE11 there is a bug where the placeholder attribute\n // will populate textContent as well.\n // https://developer.microsoft.com/microsoft-edge/platform/issues/101525/\n\n if (textContent === node._wrapperState.initialValue) {\n if (textContent !== '' && textContent !== null) {\n node.value = textContent;\n }\n }\n}\nfunction restoreControlledState$2(element, props) {\n // DOM component is still mounted; update\n updateWrapper$1(element, props);\n}\n\nvar HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';\nvar MATH_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';\nvar SVG_NAMESPACE = 'http://www.w3.org/2000/svg';\nvar Namespaces = {\n html: HTML_NAMESPACE,\n mathml: MATH_NAMESPACE,\n svg: SVG_NAMESPACE\n}; // Assumes there is no parent namespace.\n\nfunction getIntrinsicNamespace(type) {\n switch (type) {\n case 'svg':\n return SVG_NAMESPACE;\n\n case 'math':\n return MATH_NAMESPACE;\n\n default:\n return HTML_NAMESPACE;\n }\n}\nfunction getChildNamespace(parentNamespace, type) {\n if (parentNamespace == null || parentNamespace === HTML_NAMESPACE) {\n // No (or default) parent namespace: potential entry point.\n return getIntrinsicNamespace(type);\n }\n\n if (parentNamespace === SVG_NAMESPACE && type === 'foreignObject') {\n // We're leaving SVG.\n return HTML_NAMESPACE;\n } // By default, pass namespace below.\n\n\n return parentNamespace;\n}\n\n/* globals MSApp */\n\n/**\n * Create a function which has 'unsafe' privileges (required by windows8 apps)\n */\nvar createMicrosoftUnsafeLocalFunction = function (func) {\n if (typeof MSApp !== 'undefined' && MSApp.execUnsafeLocalFunction) {\n return function (arg0, arg1, arg2, arg3) {\n MSApp.execUnsafeLocalFunction(function () {\n return func(arg0, arg1, arg2, arg3);\n });\n };\n } else {\n return func;\n }\n};\n\nvar reusableSVGContainer;\n/**\n * Set the innerHTML property of a node\n *\n * @param {DOMElement} node\n * @param {string} html\n * @internal\n */\n\nvar setInnerHTML = createMicrosoftUnsafeLocalFunction(function (node, html) {\n if (node.namespaceURI === Namespaces.svg) {\n\n if (!('innerHTML' in node)) {\n // IE does not have innerHTML for SVG nodes, so instead we inject the\n // new markup in a temp node and then move the child nodes across into\n // the target node\n reusableSVGContainer = reusableSVGContainer || document.createElement('div');\n reusableSVGContainer.innerHTML = '<svg>' + html.valueOf().toString() + '</svg>';\n var svgNode = reusableSVGContainer.firstChild;\n\n while (node.firstChild) {\n node.removeChild(node.firstChild);\n }\n\n while (svgNode.firstChild) {\n node.appendChild(svgNode.firstChild);\n }\n\n return;\n }\n }\n\n node.innerHTML = html;\n});\n\n/**\n * HTML nodeType values that represent the type of the node\n */\nvar ELEMENT_NODE = 1;\nvar TEXT_NODE = 3;\nvar COMMENT_NODE = 8;\nvar DOCUMENT_NODE = 9;\nvar DOCUMENT_FRAGMENT_NODE = 11;\n\n/**\n * Set the textContent property of a node. For text updates, it's faster\n * to set the `nodeValue` of the Text node directly instead of using\n * `.textContent` which will remove the existing node and create a new one.\n *\n * @param {DOMElement} node\n * @param {string} text\n * @internal\n */\n\nvar setTextContent = function (node, text) {\n if (text) {\n var firstChild = node.firstChild;\n\n if (firstChild && firstChild === node.lastChild && firstChild.nodeType === TEXT_NODE) {\n firstChild.nodeValue = text;\n return;\n }\n }\n\n node.textContent = text;\n};\n\n// List derived from Gecko source code:\n// https://github.com/mozilla/gecko-dev/blob/4e638efc71/layout/style/test/property_database.js\nvar shorthandToLonghand = {\n animation: ['animationDelay', 'animationDirection', 'animationDuration', 'animationFillMode', 'animationIterationCount', 'animationName', 'animationPlayState', 'animationTimingFunction'],\n background: ['backgroundAttachment', 'backgroundClip', 'backgroundColor', 'backgroundImage', 'backgroundOrigin', 'backgroundPositionX', 'backgroundPositionY', 'backgroundRepeat', 'backgroundSize'],\n backgroundPosition: ['backgroundPositionX', 'backgroundPositionY'],\n border: ['borderBottomColor', 'borderBottomStyle', 'borderBottomWidth', 'borderImageOutset', 'borderImageRepeat', 'borderImageSlice', 'borderImageSource', 'borderImageWidth', 'borderLeftColor', 'borderLeftStyle', 'borderLeftWidth', 'borderRightColor', 'borderRightStyle', 'borderRightWidth', 'borderTopColor', 'borderTopStyle', 'borderTopWidth'],\n borderBlockEnd: ['borderBlockEndColor', 'borderBlockEndStyle', 'borderBlockEndWidth'],\n borderBlockStart: ['borderBlockStartColor', 'borderBlockStartStyle', 'borderBlockStartWidth'],\n borderBottom: ['borderBottomColor', 'borderBottomStyle', 'borderBottomWidth'],\n borderColor: ['borderBottomColor', 'borderLeftColor', 'borderRightColor', 'borderTopColor'],\n borderImage: ['borderImageOutset', 'borderImageRepeat', 'borderImageSlice', 'borderImageSource', 'borderImageWidth'],\n borderInlineEnd: ['borderInlineEndColor', 'borderInlineEndStyle', 'borderInlineEndWidth'],\n borderInlineStart: ['borderInlineStartColor', 'borderInlineStartStyle', 'borderInlineStartWidth'],\n borderLeft: ['borderLeftColor', 'borderLeftStyle', 'borderLeftWidth'],\n borderRadius: ['borderBottomLeftRadius', 'borderBottomRightRadius', 'borderTopLeftRadius', 'borderTopRightRadius'],\n borderRight: ['borderRightColor', 'borderRightStyle', 'borderRightWidth'],\n borderStyle: ['borderBottomStyle', 'borderLeftStyle', 'borderRightStyle', 'borderTopStyle'],\n borderTop: ['borderTopColor', 'borderTopStyle', 'borderTopWidth'],\n borderWidth: ['borderBottomWidth', 'borderLeftWidth', 'borderRightWidth', 'borderTopWidth'],\n columnRule: ['columnRuleColor', 'columnRuleStyle', 'columnRuleWidth'],\n columns: ['columnCount', 'columnWidth'],\n flex: ['flexBasis', 'flexGrow', 'flexShrink'],\n flexFlow: ['flexDirection', 'flexWrap'],\n font: ['fontFamily', 'fontFeatureSettings', 'fontKerning', 'fontLanguageOverride', 'fontSize', 'fontSizeAdjust', 'fontStretch', 'fontStyle', 'fontVariant', 'fontVariantAlternates', 'fontVariantCaps', 'fontVariantEastAsian', 'fontVariantLigatures', 'fontVariantNumeric', 'fontVariantPosition', 'fontWeight', 'lineHeight'],\n fontVariant: ['fontVariantAlternates', 'fontVariantCaps', 'fontVariantEastAsian', 'fontVariantLigatures', 'fontVariantNumeric', 'fontVariantPosition'],\n gap: ['columnGap', 'rowGap'],\n grid: ['gridAutoColumns', 'gridAutoFlow', 'gridAutoRows', 'gridTemplateAreas', 'gridTemplateColumns', 'gridTemplateRows'],\n gridArea: ['gridColumnEnd', 'gridColumnStart', 'gridRowEnd', 'gridRowStart'],\n gridColumn: ['gridColumnEnd', 'gridColumnStart'],\n gridColumnGap: ['columnGap'],\n gridGap: ['columnGap', 'rowGap'],\n gridRow: ['gridRowEnd', 'gridRowStart'],\n gridRowGap: ['rowGap'],\n gridTemplate: ['gridTemplateAreas', 'gridTemplateColumns', 'gridTemplateRows'],\n listStyle: ['listStyleImage', 'listStylePosition', 'listStyleType'],\n margin: ['marginBottom', 'marginLeft', 'marginRight', 'marginTop'],\n marker: ['markerEnd', 'markerMid', 'markerStart'],\n mask: ['maskClip', 'maskComposite', 'maskImage', 'maskMode', 'maskOrigin', 'maskPositionX', 'maskPositionY', 'maskRepeat', 'maskSize'],\n maskPosition: ['maskPositionX', 'maskPositionY'],\n outline: ['outlineColor', 'outlineStyle', 'outlineWidth'],\n overflow: ['overflowX', 'overflowY'],\n padding: ['paddingBottom', 'paddingLeft', 'paddingRight', 'paddingTop'],\n placeContent: ['alignContent', 'justifyContent'],\n placeItems: ['alignItems', 'justifyItems'],\n placeSelf: ['alignSelf', 'justifySelf'],\n textDecoration: ['textDecorationColor', 'textDecorationLine', 'textDecorationStyle'],\n textEmphasis: ['textEmphasisColor', 'textEmphasisStyle'],\n transition: ['transitionDelay', 'transitionDuration', 'transitionProperty', 'transitionTimingFunction'],\n wordWrap: ['overflowWrap']\n};\n\n/**\n * CSS properties which accept numbers but are not in units of \"px\".\n */\nvar isUnitlessNumber = {\n animationIterationCount: true,\n borderImageOutset: true,\n borderImageSlice: true,\n borderImageWidth: true,\n boxFlex: true,\n boxFlexGroup: true,\n boxOrdinalGroup: true,\n columnCount: true,\n columns: true,\n flex: true,\n flexGrow: true,\n flexPositive: true,\n flexShrink: true,\n flexNegative: true,\n flexOrder: true,\n gridArea: true,\n gridRow: true,\n gridRowEnd: true,\n gridRowSpan: true,\n gridRowStart: true,\n gridColumn: true,\n gridColumnEnd: true,\n gridColumnSpan: true,\n gridColumnStart: true,\n fontWeight: true,\n lineClamp: true,\n lineHeight: true,\n opacity: true,\n order: true,\n orphans: true,\n tabSize: true,\n widows: true,\n zIndex: true,\n zoom: true,\n // SVG-related properties\n fillOpacity: true,\n floodOpacity: true,\n stopOpacity: true,\n strokeDasharray: true,\n strokeDashoffset: true,\n strokeMiterlimit: true,\n strokeOpacity: true,\n strokeWidth: true\n};\n/**\n * @param {string} prefix vendor-specific prefix, eg: Webkit\n * @param {string} key style name, eg: transitionDuration\n * @return {string} style name prefixed with `prefix`, properly camelCased, eg:\n * WebkitTransitionDuration\n */\n\nfunction prefixKey(prefix, key) {\n return prefix + key.charAt(0).toUpperCase() + key.substring(1);\n}\n/**\n * Support style names that may come passed in prefixed by adding permutations\n * of vendor prefixes.\n */\n\n\nvar prefixes = ['Webkit', 'ms', 'Moz', 'O']; // Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an\n// infinite loop, because it iterates over the newly added props too.\n\nObject.keys(isUnitlessNumber).forEach(function (prop) {\n prefixes.forEach(function (prefix) {\n isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop];\n });\n});\n\n/**\n * Convert a value into the proper css writable value. The style name `name`\n * should be logical (no hyphens), as specified\n * in `CSSProperty.isUnitlessNumber`.\n *\n * @param {string} name CSS property name such as `topMargin`.\n * @param {*} value CSS property value such as `10px`.\n * @return {string} Normalized style value with dimensions applied.\n */\n\nfunction dangerousStyleValue(name, value, isCustomProperty) {\n // Note that we've removed escapeTextForBrowser() calls here since the\n // whole string will be escaped when the attribute is injected into\n // the markup. If you provide unsafe user data here they can inject\n // arbitrary CSS which may be problematic (I couldn't repro this):\n // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet\n // http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/\n // This is not an XSS hole but instead a potential CSS injection issue\n // which has lead to a greater discussion about how we're going to\n // trust URLs moving forward. See #2115901\n var isEmpty = value == null || typeof value === 'boolean' || value === '';\n\n if (isEmpty) {\n return '';\n }\n\n if (!isCustomProperty && typeof value === 'number' && value !== 0 && !(isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name])) {\n return value + 'px'; // Presumes implicit 'px' suffix for unitless numbers\n }\n\n return ('' + value).trim();\n}\n\nvar uppercasePattern = /([A-Z])/g;\nvar msPattern = /^ms-/;\n/**\n * Hyphenates a camelcased CSS property name, for example:\n *\n * > hyphenateStyleName('backgroundColor')\n * < \"background-color\"\n * > hyphenateStyleName('MozTransition')\n * < \"-moz-transition\"\n * > hyphenateStyleName('msTransition')\n * < \"-ms-transition\"\n *\n * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix\n * is converted to `-ms-`.\n */\n\nfunction hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}\n\nvar warnValidStyle = function () {};\n\n{\n // 'msTransform' is correct, but the other prefixes should be capitalized\n var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/;\n var msPattern$1 = /^-ms-/;\n var hyphenPattern = /-(.)/g; // style values shouldn't contain a semicolon\n\n var badStyleValueWithSemicolonPattern = /;\\s*$/;\n var warnedStyleNames = {};\n var warnedStyleValues = {};\n var warnedForNaNValue = false;\n var warnedForInfinityValue = false;\n\n var camelize = function (string) {\n return string.replace(hyphenPattern, function (_, character) {\n return character.toUpperCase();\n });\n };\n\n var warnHyphenatedStyleName = function (name) {\n if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {\n return;\n }\n\n warnedStyleNames[name] = true;\n\n error('Unsupported style property %s. Did you mean %s?', name, // As Andi Smith suggests\n // (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix\n // is converted to lowercase `ms`.\n camelize(name.replace(msPattern$1, 'ms-')));\n };\n\n var warnBadVendoredStyleName = function (name) {\n if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {\n return;\n }\n\n warnedStyleNames[name] = true;\n\n error('Unsupported vendor-prefixed style property %s. Did you mean %s?', name, name.charAt(0).toUpperCase() + name.slice(1));\n };\n\n var warnStyleValueWithSemicolon = function (name, value) {\n if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) {\n return;\n }\n\n warnedStyleValues[value] = true;\n\n error(\"Style property values shouldn't contain a semicolon. \" + 'Try \"%s: %s\" instead.', name, value.replace(badStyleValueWithSemicolonPattern, ''));\n };\n\n var warnStyleValueIsNaN = function (name, value) {\n if (warnedForNaNValue) {\n return;\n }\n\n warnedForNaNValue = true;\n\n error('`NaN` is an invalid value for the `%s` css style property.', name);\n };\n\n var warnStyleValueIsInfinity = function (name, value) {\n if (warnedForInfinityValue) {\n return;\n }\n\n warnedForInfinityValue = true;\n\n error('`Infinity` is an invalid value for the `%s` css style property.', name);\n };\n\n warnValidStyle = function (name, value) {\n if (name.indexOf('-') > -1) {\n warnHyphenatedStyleName(name);\n } else if (badVendoredStyleNamePattern.test(name)) {\n warnBadVendoredStyleName(name);\n } else if (badStyleValueWithSemicolonPattern.test(value)) {\n warnStyleValueWithSemicolon(name, value);\n }\n\n if (typeof value === 'number') {\n if (isNaN(value)) {\n warnStyleValueIsNaN(name, value);\n } else if (!isFinite(value)) {\n warnStyleValueIsInfinity(name, value);\n }\n }\n };\n}\n\nvar warnValidStyle$1 = warnValidStyle;\n\n/**\n * Operations for dealing with CSS properties.\n */\n\n/**\n * This creates a string that is expected to be equivalent to the style\n * attribute generated by server-side rendering. It by-passes warnings and\n * security checks so it's not safe to use this value for anything other than\n * comparison. It is only used in DEV for SSR validation.\n */\n\nfunction createDangerousStringForStyles(styles) {\n {\n var serialized = '';\n var delimiter = '';\n\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n\n var styleValue = styles[styleName];\n\n if (styleValue != null) {\n var isCustomProperty = styleName.indexOf('--') === 0;\n serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':';\n serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);\n delimiter = ';';\n }\n }\n\n return serialized || null;\n }\n}\n/**\n * Sets the value for multiple styles on a node. If a value is specified as\n * '' (empty string), the corresponding style property will be unset.\n *\n * @param {DOMElement} node\n * @param {object} styles\n */\n\nfunction setValueForStyles(node, styles) {\n var style = node.style;\n\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n\n var isCustomProperty = styleName.indexOf('--') === 0;\n\n {\n if (!isCustomProperty) {\n warnValidStyle$1(styleName, styles[styleName]);\n }\n }\n\n var styleValue = dangerousStyleValue(styleName, styles[styleName], isCustomProperty);\n\n if (styleName === 'float') {\n styleName = 'cssFloat';\n }\n\n if (isCustomProperty) {\n style.setProperty(styleName, styleValue);\n } else {\n style[styleName] = styleValue;\n }\n }\n}\n\nfunction isValueEmpty(value) {\n return value == null || typeof value === 'boolean' || value === '';\n}\n/**\n * Given {color: 'red', overflow: 'hidden'} returns {\n * color: 'color',\n * overflowX: 'overflow',\n * overflowY: 'overflow',\n * }. This can be read as \"the overflowY property was set by the overflow\n * shorthand\". That is, the values are the property that each was derived from.\n */\n\n\nfunction expandShorthandMap(styles) {\n var expanded = {};\n\n for (var key in styles) {\n var longhands = shorthandToLonghand[key] || [key];\n\n for (var i = 0; i < longhands.length; i++) {\n expanded[longhands[i]] = key;\n }\n }\n\n return expanded;\n}\n/**\n * When mixing shorthand and longhand property names, we warn during updates if\n * we expect an incorrect result to occur. In particular, we warn for:\n *\n * Updating a shorthand property (longhand gets overwritten):\n * {font: 'foo', fontVariant: 'bar'} -> {font: 'baz', fontVariant: 'bar'}\n * becomes .style.font = 'baz'\n * Removing a shorthand property (longhand gets lost too):\n * {font: 'foo', fontVariant: 'bar'} -> {fontVariant: 'bar'}\n * becomes .style.font = ''\n * Removing a longhand property (should revert to shorthand; doesn't):\n * {font: 'foo', fontVariant: 'bar'} -> {font: 'foo'}\n * becomes .style.fontVariant = ''\n */\n\n\nfunction validateShorthandPropertyCollisionInDev(styleUpdates, nextStyles) {\n {\n if (!nextStyles) {\n return;\n }\n\n var expandedUpdates = expandShorthandMap(styleUpdates);\n var expandedStyles = expandShorthandMap(nextStyles);\n var warnedAbout = {};\n\n for (var key in expandedUpdates) {\n var originalKey = expandedUpdates[key];\n var correctOriginalKey = expandedStyles[key];\n\n if (correctOriginalKey && originalKey !== correctOriginalKey) {\n var warningKey = originalKey + ',' + correctOriginalKey;\n\n if (warnedAbout[warningKey]) {\n continue;\n }\n\n warnedAbout[warningKey] = true;\n\n error('%s a style property during rerender (%s) when a ' + 'conflicting property is set (%s) can lead to styling bugs. To ' + \"avoid this, don't mix shorthand and non-shorthand properties \" + 'for the same value; instead, replace the shorthand with ' + 'separate values.', isValueEmpty(styleUpdates[originalKey]) ? 'Removing' : 'Updating', originalKey, correctOriginalKey);\n }\n }\n }\n}\n\n// For HTML, certain tags should omit their close tag. We keep a list for\n// those special-case tags.\nvar omittedCloseTags = {\n area: true,\n base: true,\n br: true,\n col: true,\n embed: true,\n hr: true,\n img: true,\n input: true,\n keygen: true,\n link: true,\n meta: true,\n param: true,\n source: true,\n track: true,\n wbr: true // NOTE: menuitem's close tag should be omitted, but that causes problems.\n\n};\n\n// `omittedCloseTags` except that `menuitem` should still have its closing tag.\n\nvar voidElementTags = _assign({\n menuitem: true\n}, omittedCloseTags);\n\nvar HTML = '__html';\n\nfunction assertValidProps(tag, props) {\n if (!props) {\n return;\n } // Note the use of `==` which checks for null or undefined.\n\n\n if (voidElementTags[tag]) {\n if (!(props.children == null && props.dangerouslySetInnerHTML == null)) {\n {\n throw Error( tag + \" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.\" );\n }\n }\n }\n\n if (props.dangerouslySetInnerHTML != null) {\n if (!(props.children == null)) {\n {\n throw Error( \"Can only set one of `children` or `props.dangerouslySetInnerHTML`.\" );\n }\n }\n\n if (!(typeof props.dangerouslySetInnerHTML === 'object' && HTML in props.dangerouslySetInnerHTML)) {\n {\n throw Error( \"`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/link/dangerously-set-inner-html for more information.\" );\n }\n }\n }\n\n {\n if (!props.suppressContentEditableWarning && props.contentEditable && props.children != null) {\n error('A component is `contentEditable` and contains `children` managed by ' + 'React. It is now your responsibility to guarantee that none of ' + 'those nodes are unexpectedly modified or duplicated. This is ' + 'probably not intentional.');\n }\n }\n\n if (!(props.style == null || typeof props.style === 'object')) {\n {\n throw Error( \"The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.\" );\n }\n }\n}\n\nfunction isCustomComponent(tagName, props) {\n if (tagName.indexOf('-') === -1) {\n return typeof props.is === 'string';\n }\n\n switch (tagName) {\n // These are reserved SVG and MathML elements.\n // We don't mind this list too much because we expect it to never grow.\n // The alternative is to track the namespace in a few places which is convoluted.\n // https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts\n case 'annotation-xml':\n case 'color-profile':\n case 'font-face':\n case 'font-face-src':\n case 'font-face-uri':\n case 'font-face-format':\n case 'font-face-name':\n case 'missing-glyph':\n return false;\n\n default:\n return true;\n }\n}\n\n// When adding attributes to the HTML or SVG allowed attribute list, be sure to\n// also add them to this module to ensure casing and incorrect name\n// warnings.\nvar possibleStandardNames = {\n // HTML\n accept: 'accept',\n acceptcharset: 'acceptCharset',\n 'accept-charset': 'acceptCharset',\n accesskey: 'accessKey',\n action: 'action',\n allowfullscreen: 'allowFullScreen',\n alt: 'alt',\n as: 'as',\n async: 'async',\n autocapitalize: 'autoCapitalize',\n autocomplete: 'autoComplete',\n autocorrect: 'autoCorrect',\n autofocus: 'autoFocus',\n autoplay: 'autoPlay',\n autosave: 'autoSave',\n capture: 'capture',\n cellpadding: 'cellPadding',\n cellspacing: 'cellSpacing',\n challenge: 'challenge',\n charset: 'charSet',\n checked: 'checked',\n children: 'children',\n cite: 'cite',\n class: 'className',\n classid: 'classID',\n classname: 'className',\n cols: 'cols',\n colspan: 'colSpan',\n content: 'content',\n contenteditable: 'contentEditable',\n contextmenu: 'contextMenu',\n controls: 'controls',\n controlslist: 'controlsList',\n coords: 'coords',\n crossorigin: 'crossOrigin',\n dangerouslysetinnerhtml: 'dangerouslySetInnerHTML',\n data: 'data',\n datetime: 'dateTime',\n default: 'default',\n defaultchecked: 'defaultChecked',\n defaultvalue: 'defaultValue',\n defer: 'defer',\n dir: 'dir',\n disabled: 'disabled',\n disablepictureinpicture: 'disablePictureInPicture',\n disableremoteplayback: 'disableRemotePlayback',\n download: 'download',\n draggable: 'draggable',\n enctype: 'encType',\n enterkeyhint: 'enterKeyHint',\n for: 'htmlFor',\n form: 'form',\n formmethod: 'formMethod',\n formaction: 'formAction',\n formenctype: 'formEncType',\n formnovalidate: 'formNoValidate',\n formtarget: 'formTarget',\n frameborder: 'frameBorder',\n headers: 'headers',\n height: 'height',\n hidden: 'hidden',\n high: 'high',\n href: 'href',\n hreflang: 'hrefLang',\n htmlfor: 'htmlFor',\n httpequiv: 'httpEquiv',\n 'http-equiv': 'httpEquiv',\n icon: 'icon',\n id: 'id',\n innerhtml: 'innerHTML',\n inputmode: 'inputMode',\n integrity: 'integrity',\n is: 'is',\n itemid: 'itemID',\n itemprop: 'itemProp',\n itemref: 'itemRef',\n itemscope: 'itemScope',\n itemtype: 'itemType',\n keyparams: 'keyParams',\n keytype: 'keyType',\n kind: 'kind',\n label: 'label',\n lang: 'lang',\n list: 'list',\n loop: 'loop',\n low: 'low',\n manifest: 'manifest',\n marginwidth: 'marginWidth',\n marginheight: 'marginHeight',\n max: 'max',\n maxlength: 'maxLength',\n media: 'media',\n mediagroup: 'mediaGroup',\n method: 'method',\n min: 'min',\n minlength: 'minLength',\n multiple: 'multiple',\n muted: 'muted',\n name: 'name',\n nomodule: 'noModule',\n nonce: 'nonce',\n novalidate: 'noValidate',\n open: 'open',\n optimum: 'optimum',\n pattern: 'pattern',\n placeholder: 'placeholder',\n playsinline: 'playsInline',\n poster: 'poster',\n preload: 'preload',\n profile: 'profile',\n radiogroup: 'radioGroup',\n readonly: 'readOnly',\n referrerpolicy: 'referrerPolicy',\n rel: 'rel',\n required: 'required',\n reversed: 'reversed',\n role: 'role',\n rows: 'rows',\n rowspan: 'rowSpan',\n sandbox: 'sandbox',\n scope: 'scope',\n scoped: 'scoped',\n scrolling: 'scrolling',\n seamless: 'seamless',\n selected: 'selected',\n shape: 'shape',\n size: 'size',\n sizes: 'sizes',\n span: 'span',\n spellcheck: 'spellCheck',\n src: 'src',\n srcdoc: 'srcDoc',\n srclang: 'srcLang',\n srcset: 'srcSet',\n start: 'start',\n step: 'step',\n style: 'style',\n summary: 'summary',\n tabindex: 'tabIndex',\n target: 'target',\n title: 'title',\n type: 'type',\n usemap: 'useMap',\n value: 'value',\n width: 'width',\n wmode: 'wmode',\n wrap: 'wrap',\n // SVG\n about: 'about',\n accentheight: 'accentHeight',\n 'accent-height': 'accentHeight',\n accumulate: 'accumulate',\n additive: 'additive',\n alignmentbaseline: 'alignmentBaseline',\n 'alignment-baseline': 'alignmentBaseline',\n allowreorder: 'allowReorder',\n alphabetic: 'alphabetic',\n amplitude: 'amplitude',\n arabicform: 'arabicForm',\n 'arabic-form': 'arabicForm',\n ascent: 'ascent',\n attributename: 'attributeName',\n attributetype: 'attributeType',\n autoreverse: 'autoReverse',\n azimuth: 'azimuth',\n basefrequency: 'baseFrequency',\n baselineshift: 'baselineShift',\n 'baseline-shift': 'baselineShift',\n baseprofile: 'baseProfile',\n bbox: 'bbox',\n begin: 'begin',\n bias: 'bias',\n by: 'by',\n calcmode: 'calcMode',\n capheight: 'capHeight',\n 'cap-height': 'capHeight',\n clip: 'clip',\n clippath: 'clipPath',\n 'clip-path': 'clipPath',\n clippathunits: 'clipPathUnits',\n cliprule: 'clipRule',\n 'clip-rule': 'clipRule',\n color: 'color',\n colorinterpolation: 'colorInterpolation',\n 'color-interpolation': 'colorInterpolation',\n colorinterpolationfilters: 'colorInterpolationFilters',\n 'color-interpolation-filters': 'colorInterpolationFilters',\n colorprofile: 'colorProfile',\n 'color-profile': 'colorProfile',\n colorrendering: 'colorRendering',\n 'color-rendering': 'colorRendering',\n contentscripttype: 'contentScriptType',\n contentstyletype: 'contentStyleType',\n cursor: 'cursor',\n cx: 'cx',\n cy: 'cy',\n d: 'd',\n datatype: 'datatype',\n decelerate: 'decelerate',\n descent: 'descent',\n diffuseconstant: 'diffuseConstant',\n direction: 'direction',\n display: 'display',\n divisor: 'divisor',\n dominantbaseline: 'dominantBaseline',\n 'dominant-baseline': 'dominantBaseline',\n dur: 'dur',\n dx: 'dx',\n dy: 'dy',\n edgemode: 'edgeMode',\n elevation: 'elevation',\n enablebackground: 'enableBackground',\n 'enable-background': 'enableBackground',\n end: 'end',\n exponent: 'exponent',\n externalresourcesrequired: 'externalResourcesRequired',\n fill: 'fill',\n fillopacity: 'fillOpacity',\n 'fill-opacity': 'fillOpacity',\n fillrule: 'fillRule',\n 'fill-rule': 'fillRule',\n filter: 'filter',\n filterres: 'filterRes',\n filterunits: 'filterUnits',\n floodopacity: 'floodOpacity',\n 'flood-opacity': 'floodOpacity',\n floodcolor: 'floodColor',\n 'flood-color': 'floodColor',\n focusable: 'focusable',\n fontfamily: 'fontFamily',\n 'font-family': 'fontFamily',\n fontsize: 'fontSize',\n 'font-size': 'fontSize',\n fontsizeadjust: 'fontSizeAdjust',\n 'font-size-adjust': 'fontSizeAdjust',\n fontstretch: 'fontStretch',\n 'font-stretch': 'fontStretch',\n fontstyle: 'fontStyle',\n 'font-style': 'fontStyle',\n fontvariant: 'fontVariant',\n 'font-variant': 'fontVariant',\n fontweight: 'fontWeight',\n 'font-weight': 'fontWeight',\n format: 'format',\n from: 'from',\n fx: 'fx',\n fy: 'fy',\n g1: 'g1',\n g2: 'g2',\n glyphname: 'glyphName',\n 'glyph-name': 'glyphName',\n glyphorientationhorizontal: 'glyphOrientationHorizontal',\n 'glyph-orientation-horizontal': 'glyphOrientationHorizontal',\n glyphorientationvertical: 'glyphOrientationVertical',\n 'glyph-orientation-vertical': 'glyphOrientationVertical',\n glyphref: 'glyphRef',\n gradienttransform: 'gradientTransform',\n gradientunits: 'gradientUnits',\n hanging: 'hanging',\n horizadvx: 'horizAdvX',\n 'horiz-adv-x': 'horizAdvX',\n horizoriginx: 'horizOriginX',\n 'horiz-origin-x': 'horizOriginX',\n ideographic: 'ideographic',\n imagerendering: 'imageRendering',\n 'image-rendering': 'imageRendering',\n in2: 'in2',\n in: 'in',\n inlist: 'inlist',\n intercept: 'intercept',\n k1: 'k1',\n k2: 'k2',\n k3: 'k3',\n k4: 'k4',\n k: 'k',\n kernelmatrix: 'kernelMatrix',\n kernelunitlength: 'kernelUnitLength',\n kerning: 'kerning',\n keypoints: 'keyPoints',\n keysplines: 'keySplines',\n keytimes: 'keyTimes',\n lengthadjust: 'lengthAdjust',\n letterspacing: 'letterSpacing',\n 'letter-spacing': 'letterSpacing',\n lightingcolor: 'lightingColor',\n 'lighting-color': 'lightingColor',\n limitingconeangle: 'limitingConeAngle',\n local: 'local',\n markerend: 'markerEnd',\n 'marker-end': 'markerEnd',\n markerheight: 'markerHeight',\n markermid: 'markerMid',\n 'marker-mid': 'markerMid',\n markerstart: 'markerStart',\n 'marker-start': 'markerStart',\n markerunits: 'markerUnits',\n markerwidth: 'markerWidth',\n mask: 'mask',\n maskcontentunits: 'maskContentUnits',\n maskunits: 'maskUnits',\n mathematical: 'mathematical',\n mode: 'mode',\n numoctaves: 'numOctaves',\n offset: 'offset',\n opacity: 'opacity',\n operator: 'operator',\n order: 'order',\n orient: 'orient',\n orientation: 'orientation',\n origin: 'origin',\n overflow: 'overflow',\n overlineposition: 'overlinePosition',\n 'overline-position': 'overlinePosition',\n overlinethickness: 'overlineThickness',\n 'overline-thickness': 'overlineThickness',\n paintorder: 'paintOrder',\n 'paint-order': 'paintOrder',\n panose1: 'panose1',\n 'panose-1': 'panose1',\n pathlength: 'pathLength',\n patterncontentunits: 'patternContentUnits',\n patterntransform: 'patternTransform',\n patternunits: 'patternUnits',\n pointerevents: 'pointerEvents',\n 'pointer-events': 'pointerEvents',\n points: 'points',\n pointsatx: 'pointsAtX',\n pointsaty: 'pointsAtY',\n pointsatz: 'pointsAtZ',\n prefix: 'prefix',\n preservealpha: 'preserveAlpha',\n preserveaspectratio: 'preserveAspectRatio',\n primitiveunits: 'primitiveUnits',\n property: 'property',\n r: 'r',\n radius: 'radius',\n refx: 'refX',\n refy: 'refY',\n renderingintent: 'renderingIntent',\n 'rendering-intent': 'renderingIntent',\n repeatcount: 'repeatCount',\n repeatdur: 'repeatDur',\n requiredextensions: 'requiredExtensions',\n requiredfeatures: 'requiredFeatures',\n resource: 'resource',\n restart: 'restart',\n result: 'result',\n results: 'results',\n rotate: 'rotate',\n rx: 'rx',\n ry: 'ry',\n scale: 'scale',\n security: 'security',\n seed: 'seed',\n shaperendering: 'shapeRendering',\n 'shape-rendering': 'shapeRendering',\n slope: 'slope',\n spacing: 'spacing',\n specularconstant: 'specularConstant',\n specularexponent: 'specularExponent',\n speed: 'speed',\n spreadmethod: 'spreadMethod',\n startoffset: 'startOffset',\n stddeviation: 'stdDeviation',\n stemh: 'stemh',\n stemv: 'stemv',\n stitchtiles: 'stitchTiles',\n stopcolor: 'stopColor',\n 'stop-color': 'stopColor',\n stopopacity: 'stopOpacity',\n 'stop-opacity': 'stopOpacity',\n strikethroughposition: 'strikethroughPosition',\n 'strikethrough-position': 'strikethroughPosition',\n strikethroughthickness: 'strikethroughThickness',\n 'strikethrough-thickness': 'strikethroughThickness',\n string: 'string',\n stroke: 'stroke',\n strokedasharray: 'strokeDasharray',\n 'stroke-dasharray': 'strokeDasharray',\n strokedashoffset: 'strokeDashoffset',\n 'stroke-dashoffset': 'strokeDashoffset',\n strokelinecap: 'strokeLinecap',\n 'stroke-linecap': 'strokeLinecap',\n strokelinejoin: 'strokeLinejoin',\n 'stroke-linejoin': 'strokeLinejoin',\n strokemiterlimit: 'strokeMiterlimit',\n 'stroke-miterlimit': 'strokeMiterlimit',\n strokewidth: 'strokeWidth',\n 'stroke-width': 'strokeWidth',\n strokeopacity: 'strokeOpacity',\n 'stroke-opacity': 'strokeOpacity',\n suppresscontenteditablewarning: 'suppressContentEditableWarning',\n suppresshydrationwarning: 'suppressHydrationWarning',\n surfacescale: 'surfaceScale',\n systemlanguage: 'systemLanguage',\n tablevalues: 'tableValues',\n targetx: 'targetX',\n targety: 'targetY',\n textanchor: 'textAnchor',\n 'text-anchor': 'textAnchor',\n textdecoration: 'textDecoration',\n 'text-decoration': 'textDecoration',\n textlength: 'textLength',\n textrendering: 'textRendering',\n 'text-rendering': 'textRendering',\n to: 'to',\n transform: 'transform',\n typeof: 'typeof',\n u1: 'u1',\n u2: 'u2',\n underlineposition: 'underlinePosition',\n 'underline-position': 'underlinePosition',\n underlinethickness: 'underlineThickness',\n 'underline-thickness': 'underlineThickness',\n unicode: 'unicode',\n unicodebidi: 'unicodeBidi',\n 'unicode-bidi': 'unicodeBidi',\n unicoderange: 'unicodeRange',\n 'unicode-range': 'unicodeRange',\n unitsperem: 'unitsPerEm',\n 'units-per-em': 'unitsPerEm',\n unselectable: 'unselectable',\n valphabetic: 'vAlphabetic',\n 'v-alphabetic': 'vAlphabetic',\n values: 'values',\n vectoreffect: 'vectorEffect',\n 'vector-effect': 'vectorEffect',\n version: 'version',\n vertadvy: 'vertAdvY',\n 'vert-adv-y': 'vertAdvY',\n vertoriginx: 'vertOriginX',\n 'vert-origin-x': 'vertOriginX',\n vertoriginy: 'vertOriginY',\n 'vert-origin-y': 'vertOriginY',\n vhanging: 'vHanging',\n 'v-hanging': 'vHanging',\n videographic: 'vIdeographic',\n 'v-ideographic': 'vIdeographic',\n viewbox: 'viewBox',\n viewtarget: 'viewTarget',\n visibility: 'visibility',\n vmathematical: 'vMathematical',\n 'v-mathematical': 'vMathematical',\n vocab: 'vocab',\n widths: 'widths',\n wordspacing: 'wordSpacing',\n 'word-spacing': 'wordSpacing',\n writingmode: 'writingMode',\n 'writing-mode': 'writingMode',\n x1: 'x1',\n x2: 'x2',\n x: 'x',\n xchannelselector: 'xChannelSelector',\n xheight: 'xHeight',\n 'x-height': 'xHeight',\n xlinkactuate: 'xlinkActuate',\n 'xlink:actuate': 'xlinkActuate',\n xlinkarcrole: 'xlinkArcrole',\n 'xlink:arcrole': 'xlinkArcrole',\n xlinkhref: 'xlinkHref',\n 'xlink:href': 'xlinkHref',\n xlinkrole: 'xlinkRole',\n 'xlink:role': 'xlinkRole',\n xlinkshow: 'xlinkShow',\n 'xlink:show': 'xlinkShow',\n xlinktitle: 'xlinkTitle',\n 'xlink:title': 'xlinkTitle',\n xlinktype: 'xlinkType',\n 'xlink:type': 'xlinkType',\n xmlbase: 'xmlBase',\n 'xml:base': 'xmlBase',\n xmllang: 'xmlLang',\n 'xml:lang': 'xmlLang',\n xmlns: 'xmlns',\n 'xml:space': 'xmlSpace',\n xmlnsxlink: 'xmlnsXlink',\n 'xmlns:xlink': 'xmlnsXlink',\n xmlspace: 'xmlSpace',\n y1: 'y1',\n y2: 'y2',\n y: 'y',\n ychannelselector: 'yChannelSelector',\n z: 'z',\n zoomandpan: 'zoomAndPan'\n};\n\nvar ariaProperties = {\n 'aria-current': 0,\n // state\n 'aria-details': 0,\n 'aria-disabled': 0,\n // state\n 'aria-hidden': 0,\n // state\n 'aria-invalid': 0,\n // state\n 'aria-keyshortcuts': 0,\n 'aria-label': 0,\n 'aria-roledescription': 0,\n // Widget Attributes\n 'aria-autocomplete': 0,\n 'aria-checked': 0,\n 'aria-expanded': 0,\n 'aria-haspopup': 0,\n 'aria-level': 0,\n 'aria-modal': 0,\n 'aria-multiline': 0,\n 'aria-multiselectable': 0,\n 'aria-orientation': 0,\n 'aria-placeholder': 0,\n 'aria-pressed': 0,\n 'aria-readonly': 0,\n 'aria-required': 0,\n 'aria-selected': 0,\n 'aria-sort': 0,\n 'aria-valuemax': 0,\n 'aria-valuemin': 0,\n 'aria-valuenow': 0,\n 'aria-valuetext': 0,\n // Live Region Attributes\n 'aria-atomic': 0,\n 'aria-busy': 0,\n 'aria-live': 0,\n 'aria-relevant': 0,\n // Drag-and-Drop Attributes\n 'aria-dropeffect': 0,\n 'aria-grabbed': 0,\n // Relationship Attributes\n 'aria-activedescendant': 0,\n 'aria-colcount': 0,\n 'aria-colindex': 0,\n 'aria-colspan': 0,\n 'aria-controls': 0,\n 'aria-describedby': 0,\n 'aria-errormessage': 0,\n 'aria-flowto': 0,\n 'aria-labelledby': 0,\n 'aria-owns': 0,\n 'aria-posinset': 0,\n 'aria-rowcount': 0,\n 'aria-rowindex': 0,\n 'aria-rowspan': 0,\n 'aria-setsize': 0\n};\n\nvar warnedProperties = {};\nvar rARIA = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$');\nvar rARIACamel = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$');\nvar hasOwnProperty$1 = Object.prototype.hasOwnProperty;\n\nfunction validateProperty(tagName, name) {\n {\n if (hasOwnProperty$1.call(warnedProperties, name) && warnedProperties[name]) {\n return true;\n }\n\n if (rARIACamel.test(name)) {\n var ariaName = 'aria-' + name.slice(4).toLowerCase();\n var correctName = ariaProperties.hasOwnProperty(ariaName) ? ariaName : null; // If this is an aria-* attribute, but is not listed in the known DOM\n // DOM properties, then it is an invalid aria-* attribute.\n\n if (correctName == null) {\n error('Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.', name);\n\n warnedProperties[name] = true;\n return true;\n } // aria-* attributes should be lowercase; suggest the lowercase version.\n\n\n if (name !== correctName) {\n error('Invalid ARIA attribute `%s`. Did you mean `%s`?', name, correctName);\n\n warnedProperties[name] = true;\n return true;\n }\n }\n\n if (rARIA.test(name)) {\n var lowerCasedName = name.toLowerCase();\n var standardName = ariaProperties.hasOwnProperty(lowerCasedName) ? lowerCasedName : null; // If this is an aria-* attribute, but is not listed in the known DOM\n // DOM properties, then it is an invalid aria-* attribute.\n\n if (standardName == null) {\n warnedProperties[name] = true;\n return false;\n } // aria-* attributes should be lowercase; suggest the lowercase version.\n\n\n if (name !== standardName) {\n error('Unknown ARIA attribute `%s`. Did you mean `%s`?', name, standardName);\n\n warnedProperties[name] = true;\n return true;\n }\n }\n }\n\n return true;\n}\n\nfunction warnInvalidARIAProps(type, props) {\n {\n var invalidProps = [];\n\n for (var key in props) {\n var isValid = validateProperty(type, key);\n\n if (!isValid) {\n invalidProps.push(key);\n }\n }\n\n var unknownPropString = invalidProps.map(function (prop) {\n return '`' + prop + '`';\n }).join(', ');\n\n if (invalidProps.length === 1) {\n error('Invalid aria prop %s on <%s> tag. ' + 'For details, see https://reactjs.org/link/invalid-aria-props', unknownPropString, type);\n } else if (invalidProps.length > 1) {\n error('Invalid aria props %s on <%s> tag. ' + 'For details, see https://reactjs.org/link/invalid-aria-props', unknownPropString, type);\n }\n }\n}\n\nfunction validateProperties(type, props) {\n if (isCustomComponent(type, props)) {\n return;\n }\n\n warnInvalidARIAProps(type, props);\n}\n\nvar didWarnValueNull = false;\nfunction validateProperties$1(type, props) {\n {\n if (type !== 'input' && type !== 'textarea' && type !== 'select') {\n return;\n }\n\n if (props != null && props.value === null && !didWarnValueNull) {\n didWarnValueNull = true;\n\n if (type === 'select' && props.multiple) {\n error('`value` prop on `%s` should not be null. ' + 'Consider using an empty array when `multiple` is set to `true` ' + 'to clear the component or `undefined` for uncontrolled components.', type);\n } else {\n error('`value` prop on `%s` should not be null. ' + 'Consider using an empty string to clear the component or `undefined` ' + 'for uncontrolled components.', type);\n }\n }\n }\n}\n\nvar validateProperty$1 = function () {};\n\n{\n var warnedProperties$1 = {};\n var _hasOwnProperty = Object.prototype.hasOwnProperty;\n var EVENT_NAME_REGEX = /^on./;\n var INVALID_EVENT_NAME_REGEX = /^on[^A-Z]/;\n var rARIA$1 = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$');\n var rARIACamel$1 = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$');\n\n validateProperty$1 = function (tagName, name, value, eventRegistry) {\n if (_hasOwnProperty.call(warnedProperties$1, name) && warnedProperties$1[name]) {\n return true;\n }\n\n var lowerCasedName = name.toLowerCase();\n\n if (lowerCasedName === 'onfocusin' || lowerCasedName === 'onfocusout') {\n error('React uses onFocus and onBlur instead of onFocusIn and onFocusOut. ' + 'All React events are normalized to bubble, so onFocusIn and onFocusOut ' + 'are not needed/supported by React.');\n\n warnedProperties$1[name] = true;\n return true;\n } // We can't rely on the event system being injected on the server.\n\n\n if (eventRegistry != null) {\n var registrationNameDependencies = eventRegistry.registrationNameDependencies,\n possibleRegistrationNames = eventRegistry.possibleRegistrationNames;\n\n if (registrationNameDependencies.hasOwnProperty(name)) {\n return true;\n }\n\n var registrationName = possibleRegistrationNames.hasOwnProperty(lowerCasedName) ? possibleRegistrationNames[lowerCasedName] : null;\n\n if (registrationName != null) {\n error('Invalid event handler property `%s`. Did you mean `%s`?', name, registrationName);\n\n warnedProperties$1[name] = true;\n return true;\n }\n\n if (EVENT_NAME_REGEX.test(name)) {\n error('Unknown event handler property `%s`. It will be ignored.', name);\n\n warnedProperties$1[name] = true;\n return true;\n }\n } else if (EVENT_NAME_REGEX.test(name)) {\n // If no event plugins have been injected, we are in a server environment.\n // So we can't tell if the event name is correct for sure, but we can filter\n // out known bad ones like `onclick`. We can't suggest a specific replacement though.\n if (INVALID_EVENT_NAME_REGEX.test(name)) {\n error('Invalid event handler property `%s`. ' + 'React events use the camelCase naming convention, for example `onClick`.', name);\n }\n\n warnedProperties$1[name] = true;\n return true;\n } // Let the ARIA attribute hook validate ARIA attributes\n\n\n if (rARIA$1.test(name) || rARIACamel$1.test(name)) {\n return true;\n }\n\n if (lowerCasedName === 'innerhtml') {\n error('Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.');\n\n warnedProperties$1[name] = true;\n return true;\n }\n\n if (lowerCasedName === 'aria') {\n error('The `aria` attribute is reserved for future use in React. ' + 'Pass individual `aria-` attributes instead.');\n\n warnedProperties$1[name] = true;\n return true;\n }\n\n if (lowerCasedName === 'is' && value !== null && value !== undefined && typeof value !== 'string') {\n error('Received a `%s` for a string attribute `is`. If this is expected, cast ' + 'the value to a string.', typeof value);\n\n warnedProperties$1[name] = true;\n return true;\n }\n\n if (typeof value === 'number' && isNaN(value)) {\n error('Received NaN for the `%s` attribute. If this is expected, cast ' + 'the value to a string.', name);\n\n warnedProperties$1[name] = true;\n return true;\n }\n\n var propertyInfo = getPropertyInfo(name);\n var isReserved = propertyInfo !== null && propertyInfo.type === RESERVED; // Known attributes should match the casing specified in the property config.\n\n if (possibleStandardNames.hasOwnProperty(lowerCasedName)) {\n var standardName = possibleStandardNames[lowerCasedName];\n\n if (standardName !== name) {\n error('Invalid DOM property `%s`. Did you mean `%s`?', name, standardName);\n\n warnedProperties$1[name] = true;\n return true;\n }\n } else if (!isReserved && name !== lowerCasedName) {\n // Unknown attributes should have lowercase casing since that's how they\n // will be cased anyway with server rendering.\n error('React does not recognize the `%s` prop on a DOM element. If you ' + 'intentionally want it to appear in the DOM as a custom ' + 'attribute, spell it as lowercase `%s` instead. ' + 'If you accidentally passed it from a parent component, remove ' + 'it from the DOM element.', name, lowerCasedName);\n\n warnedProperties$1[name] = true;\n return true;\n }\n\n if (typeof value === 'boolean' && shouldRemoveAttributeWithWarning(name, value, propertyInfo, false)) {\n if (value) {\n error('Received `%s` for a non-boolean attribute `%s`.\\n\\n' + 'If you want to write it to the DOM, pass a string instead: ' + '%s=\"%s\" or %s={value.toString()}.', value, name, name, value, name);\n } else {\n error('Received `%s` for a non-boolean attribute `%s`.\\n\\n' + 'If you want to write it to the DOM, pass a string instead: ' + '%s=\"%s\" or %s={value.toString()}.\\n\\n' + 'If you used to conditionally omit it with %s={condition && value}, ' + 'pass %s={condition ? value : undefined} instead.', value, name, name, value, name, name, name);\n }\n\n warnedProperties$1[name] = true;\n return true;\n } // Now that we've validated casing, do not validate\n // data types for reserved props\n\n\n if (isReserved) {\n return true;\n } // Warn when a known attribute is a bad type\n\n\n if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, false)) {\n warnedProperties$1[name] = true;\n return false;\n } // Warn when passing the strings 'false' or 'true' into a boolean prop\n\n\n if ((value === 'false' || value === 'true') && propertyInfo !== null && propertyInfo.type === BOOLEAN) {\n error('Received the string `%s` for the boolean attribute `%s`. ' + '%s ' + 'Did you mean %s={%s}?', value, name, value === 'false' ? 'The browser will interpret it as a truthy value.' : 'Although this works, it will not work as expected if you pass the string \"false\".', name, value);\n\n warnedProperties$1[name] = true;\n return true;\n }\n\n return true;\n };\n}\n\nvar warnUnknownProperties = function (type, props, eventRegistry) {\n {\n var unknownProps = [];\n\n for (var key in props) {\n var isValid = validateProperty$1(type, key, props[key], eventRegistry);\n\n if (!isValid) {\n unknownProps.push(key);\n }\n }\n\n var unknownPropString = unknownProps.map(function (prop) {\n return '`' + prop + '`';\n }).join(', ');\n\n if (unknownProps.length === 1) {\n error('Invalid value for prop %s on <%s> tag. Either remove it from the element, ' + 'or pass a string or number value to keep it in the DOM. ' + 'For details, see https://reactjs.org/link/attribute-behavior ', unknownPropString, type);\n } else if (unknownProps.length > 1) {\n error('Invalid values for props %s on <%s> tag. Either remove them from the element, ' + 'or pass a string or number value to keep them in the DOM. ' + 'For details, see https://reactjs.org/link/attribute-behavior ', unknownPropString, type);\n }\n }\n};\n\nfunction validateProperties$2(type, props, eventRegistry) {\n if (isCustomComponent(type, props)) {\n return;\n }\n\n warnUnknownProperties(type, props, eventRegistry);\n}\n\nvar IS_EVENT_HANDLE_NON_MANAGED_NODE = 1;\nvar IS_NON_DELEGATED = 1 << 1;\nvar IS_CAPTURE_PHASE = 1 << 2;\nvar IS_REPLAYED = 1 << 4;\n// set to LEGACY_FB_SUPPORT. LEGACY_FB_SUPPORT only gets set when\n// we call willDeferLaterForLegacyFBSupport, thus not bailing out\n// will result in endless cycles like an infinite loop.\n// We also don't want to defer during event replaying.\n\nvar SHOULD_NOT_PROCESS_POLYFILL_EVENT_PLUGINS = IS_EVENT_HANDLE_NON_MANAGED_NODE | IS_NON_DELEGATED | IS_CAPTURE_PHASE;\n\n/**\n * Gets the target node from a native browser event by accounting for\n * inconsistencies in browser DOM APIs.\n *\n * @param {object} nativeEvent Native browser event.\n * @return {DOMEventTarget} Target node.\n */\n\nfunction getEventTarget(nativeEvent) {\n // Fallback to nativeEvent.srcElement for IE9\n // https://github.com/facebook/react/issues/12506\n var target = nativeEvent.target || nativeEvent.srcElement || window; // Normalize SVG <use> element events #4963\n\n if (target.correspondingUseElement) {\n target = target.correspondingUseElement;\n } // Safari may fire events on text nodes (Node.TEXT_NODE is 3).\n // @see http://www.quirksmode.org/js/events_properties.html\n\n\n return target.nodeType === TEXT_NODE ? target.parentNode : target;\n}\n\nvar restoreImpl = null;\nvar restoreTarget = null;\nvar restoreQueue = null;\n\nfunction restoreStateOfTarget(target) {\n // We perform this translation at the end of the event loop so that we\n // always receive the correct fiber here\n var internalInstance = getInstanceFromNode(target);\n\n if (!internalInstance) {\n // Unmounted\n return;\n }\n\n if (!(typeof restoreImpl === 'function')) {\n {\n throw Error( \"setRestoreImplementation() needs to be called to handle a target for controlled events. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n var stateNode = internalInstance.stateNode; // Guard against Fiber being unmounted.\n\n if (stateNode) {\n var _props = getFiberCurrentPropsFromNode(stateNode);\n\n restoreImpl(internalInstance.stateNode, internalInstance.type, _props);\n }\n}\n\nfunction setRestoreImplementation(impl) {\n restoreImpl = impl;\n}\nfunction enqueueStateRestore(target) {\n if (restoreTarget) {\n if (restoreQueue) {\n restoreQueue.push(target);\n } else {\n restoreQueue = [target];\n }\n } else {\n restoreTarget = target;\n }\n}\nfunction needsStateRestore() {\n return restoreTarget !== null || restoreQueue !== null;\n}\nfunction restoreStateIfNeeded() {\n if (!restoreTarget) {\n return;\n }\n\n var target = restoreTarget;\n var queuedTargets = restoreQueue;\n restoreTarget = null;\n restoreQueue = null;\n restoreStateOfTarget(target);\n\n if (queuedTargets) {\n for (var i = 0; i < queuedTargets.length; i++) {\n restoreStateOfTarget(queuedTargets[i]);\n }\n }\n}\n\n// the renderer. Such as when we're dispatching events or if third party\n// libraries need to call batchedUpdates. Eventually, this API will go away when\n// everything is batched by default. We'll then have a similar API to opt-out of\n// scheduled work and instead do synchronous work.\n// Defaults\n\nvar batchedUpdatesImpl = function (fn, bookkeeping) {\n return fn(bookkeeping);\n};\n\nvar discreteUpdatesImpl = function (fn, a, b, c, d) {\n return fn(a, b, c, d);\n};\n\nvar flushDiscreteUpdatesImpl = function () {};\n\nvar batchedEventUpdatesImpl = batchedUpdatesImpl;\nvar isInsideEventHandler = false;\nvar isBatchingEventUpdates = false;\n\nfunction finishEventHandler() {\n // Here we wait until all updates have propagated, which is important\n // when using controlled components within layers:\n // https://github.com/facebook/react/issues/1698\n // Then we restore state of any controlled component.\n var controlledComponentsHavePendingUpdates = needsStateRestore();\n\n if (controlledComponentsHavePendingUpdates) {\n // If a controlled event was fired, we may need to restore the state of\n // the DOM node back to the controlled value. This is necessary when React\n // bails out of the update without touching the DOM.\n flushDiscreteUpdatesImpl();\n restoreStateIfNeeded();\n }\n}\n\nfunction batchedUpdates(fn, bookkeeping) {\n if (isInsideEventHandler) {\n // If we are currently inside another batch, we need to wait until it\n // fully completes before restoring state.\n return fn(bookkeeping);\n }\n\n isInsideEventHandler = true;\n\n try {\n return batchedUpdatesImpl(fn, bookkeeping);\n } finally {\n isInsideEventHandler = false;\n finishEventHandler();\n }\n}\nfunction batchedEventUpdates(fn, a, b) {\n if (isBatchingEventUpdates) {\n // If we are currently inside another batch, we need to wait until it\n // fully completes before restoring state.\n return fn(a, b);\n }\n\n isBatchingEventUpdates = true;\n\n try {\n return batchedEventUpdatesImpl(fn, a, b);\n } finally {\n isBatchingEventUpdates = false;\n finishEventHandler();\n }\n}\nfunction discreteUpdates(fn, a, b, c, d) {\n var prevIsInsideEventHandler = isInsideEventHandler;\n isInsideEventHandler = true;\n\n try {\n return discreteUpdatesImpl(fn, a, b, c, d);\n } finally {\n isInsideEventHandler = prevIsInsideEventHandler;\n\n if (!isInsideEventHandler) {\n finishEventHandler();\n }\n }\n}\nfunction flushDiscreteUpdatesIfNeeded(timeStamp) {\n {\n if (!isInsideEventHandler) {\n flushDiscreteUpdatesImpl();\n }\n }\n}\nfunction setBatchingImplementation(_batchedUpdatesImpl, _discreteUpdatesImpl, _flushDiscreteUpdatesImpl, _batchedEventUpdatesImpl) {\n batchedUpdatesImpl = _batchedUpdatesImpl;\n discreteUpdatesImpl = _discreteUpdatesImpl;\n flushDiscreteUpdatesImpl = _flushDiscreteUpdatesImpl;\n batchedEventUpdatesImpl = _batchedEventUpdatesImpl;\n}\n\nfunction isInteractive(tag) {\n return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea';\n}\n\nfunction shouldPreventMouseEvent(name, type, props) {\n switch (name) {\n case 'onClick':\n case 'onClickCapture':\n case 'onDoubleClick':\n case 'onDoubleClickCapture':\n case 'onMouseDown':\n case 'onMouseDownCapture':\n case 'onMouseMove':\n case 'onMouseMoveCapture':\n case 'onMouseUp':\n case 'onMouseUpCapture':\n case 'onMouseEnter':\n return !!(props.disabled && isInteractive(type));\n\n default:\n return false;\n }\n}\n/**\n * @param {object} inst The instance, which is the source of events.\n * @param {string} registrationName Name of listener (e.g. `onClick`).\n * @return {?function} The stored callback.\n */\n\n\nfunction getListener(inst, registrationName) {\n var stateNode = inst.stateNode;\n\n if (stateNode === null) {\n // Work in progress (ex: onload events in incremental mode).\n return null;\n }\n\n var props = getFiberCurrentPropsFromNode(stateNode);\n\n if (props === null) {\n // Work in progress.\n return null;\n }\n\n var listener = props[registrationName];\n\n if (shouldPreventMouseEvent(registrationName, inst.type, props)) {\n return null;\n }\n\n if (!(!listener || typeof listener === 'function')) {\n {\n throw Error( \"Expected `\" + registrationName + \"` listener to be a function, instead got a value of `\" + typeof listener + \"` type.\" );\n }\n }\n\n return listener;\n}\n\nvar passiveBrowserEventsSupported = false; // Check if browser support events with passive listeners\n// https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Safely_detecting_option_support\n\nif (canUseDOM) {\n try {\n var options = {}; // $FlowFixMe: Ignore Flow complaining about needing a value\n\n Object.defineProperty(options, 'passive', {\n get: function () {\n passiveBrowserEventsSupported = true;\n }\n });\n window.addEventListener('test', options, options);\n window.removeEventListener('test', options, options);\n } catch (e) {\n passiveBrowserEventsSupported = false;\n }\n}\n\nfunction invokeGuardedCallbackProd(name, func, context, a, b, c, d, e, f) {\n var funcArgs = Array.prototype.slice.call(arguments, 3);\n\n try {\n func.apply(context, funcArgs);\n } catch (error) {\n this.onError(error);\n }\n}\n\nvar invokeGuardedCallbackImpl = invokeGuardedCallbackProd;\n\n{\n // In DEV mode, we swap out invokeGuardedCallback for a special version\n // that plays more nicely with the browser's DevTools. The idea is to preserve\n // \"Pause on exceptions\" behavior. Because React wraps all user-provided\n // functions in invokeGuardedCallback, and the production version of\n // invokeGuardedCallback uses a try-catch, all user exceptions are treated\n // like caught exceptions, and the DevTools won't pause unless the developer\n // takes the extra step of enabling pause on caught exceptions. This is\n // unintuitive, though, because even though React has caught the error, from\n // the developer's perspective, the error is uncaught.\n //\n // To preserve the expected \"Pause on exceptions\" behavior, we don't use a\n // try-catch in DEV. Instead, we synchronously dispatch a fake event to a fake\n // DOM node, and call the user-provided callback from inside an event handler\n // for that fake event. If the callback throws, the error is \"captured\" using\n // a global event handler. But because the error happens in a different\n // event loop context, it does not interrupt the normal program flow.\n // Effectively, this gives us try-catch behavior without actually using\n // try-catch. Neat!\n // Check that the browser supports the APIs we need to implement our special\n // DEV version of invokeGuardedCallback\n if (typeof window !== 'undefined' && typeof window.dispatchEvent === 'function' && typeof document !== 'undefined' && typeof document.createEvent === 'function') {\n var fakeNode = document.createElement('react');\n\n invokeGuardedCallbackImpl = function invokeGuardedCallbackDev(name, func, context, a, b, c, d, e, f) {\n // If document doesn't exist we know for sure we will crash in this method\n // when we call document.createEvent(). However this can cause confusing\n // errors: https://github.com/facebookincubator/create-react-app/issues/3482\n // So we preemptively throw with a better message instead.\n if (!(typeof document !== 'undefined')) {\n {\n throw Error( \"The `document` global was defined when React was initialized, but is not defined anymore. This can happen in a test environment if a component schedules an update from an asynchronous callback, but the test has already finished running. To solve this, you can either unmount the component at the end of your test (and ensure that any asynchronous operations get canceled in `componentWillUnmount`), or you can change the test itself to be asynchronous.\" );\n }\n }\n\n var evt = document.createEvent('Event');\n var didCall = false; // Keeps track of whether the user-provided callback threw an error. We\n // set this to true at the beginning, then set it to false right after\n // calling the function. If the function errors, `didError` will never be\n // set to false. This strategy works even if the browser is flaky and\n // fails to call our global error handler, because it doesn't rely on\n // the error event at all.\n\n var didError = true; // Keeps track of the value of window.event so that we can reset it\n // during the callback to let user code access window.event in the\n // browsers that support it.\n\n var windowEvent = window.event; // Keeps track of the descriptor of window.event to restore it after event\n // dispatching: https://github.com/facebook/react/issues/13688\n\n var windowEventDescriptor = Object.getOwnPropertyDescriptor(window, 'event');\n\n function restoreAfterDispatch() {\n // We immediately remove the callback from event listeners so that\n // nested `invokeGuardedCallback` calls do not clash. Otherwise, a\n // nested call would trigger the fake event handlers of any call higher\n // in the stack.\n fakeNode.removeEventListener(evtType, callCallback, false); // We check for window.hasOwnProperty('event') to prevent the\n // window.event assignment in both IE <= 10 as they throw an error\n // \"Member not found\" in strict mode, and in Firefox which does not\n // support window.event.\n\n if (typeof window.event !== 'undefined' && window.hasOwnProperty('event')) {\n window.event = windowEvent;\n }\n } // Create an event handler for our fake event. We will synchronously\n // dispatch our fake event using `dispatchEvent`. Inside the handler, we\n // call the user-provided callback.\n\n\n var funcArgs = Array.prototype.slice.call(arguments, 3);\n\n function callCallback() {\n didCall = true;\n restoreAfterDispatch();\n func.apply(context, funcArgs);\n didError = false;\n } // Create a global error event handler. We use this to capture the value\n // that was thrown. It's possible that this error handler will fire more\n // than once; for example, if non-React code also calls `dispatchEvent`\n // and a handler for that event throws. We should be resilient to most of\n // those cases. Even if our error event handler fires more than once, the\n // last error event is always used. If the callback actually does error,\n // we know that the last error event is the correct one, because it's not\n // possible for anything else to have happened in between our callback\n // erroring and the code that follows the `dispatchEvent` call below. If\n // the callback doesn't error, but the error event was fired, we know to\n // ignore it because `didError` will be false, as described above.\n\n\n var error; // Use this to track whether the error event is ever called.\n\n var didSetError = false;\n var isCrossOriginError = false;\n\n function handleWindowError(event) {\n error = event.error;\n didSetError = true;\n\n if (error === null && event.colno === 0 && event.lineno === 0) {\n isCrossOriginError = true;\n }\n\n if (event.defaultPrevented) {\n // Some other error handler has prevented default.\n // Browsers silence the error report if this happens.\n // We'll remember this to later decide whether to log it or not.\n if (error != null && typeof error === 'object') {\n try {\n error._suppressLogging = true;\n } catch (inner) {// Ignore.\n }\n }\n }\n } // Create a fake event type.\n\n\n var evtType = \"react-\" + (name ? name : 'invokeguardedcallback'); // Attach our event handlers\n\n window.addEventListener('error', handleWindowError);\n fakeNode.addEventListener(evtType, callCallback, false); // Synchronously dispatch our fake event. If the user-provided function\n // errors, it will trigger our global error handler.\n\n evt.initEvent(evtType, false, false);\n fakeNode.dispatchEvent(evt);\n\n if (windowEventDescriptor) {\n Object.defineProperty(window, 'event', windowEventDescriptor);\n }\n\n if (didCall && didError) {\n if (!didSetError) {\n // The callback errored, but the error event never fired.\n error = new Error('An error was thrown inside one of your components, but React ' + \"doesn't know what it was. This is likely due to browser \" + 'flakiness. React does its best to preserve the \"Pause on ' + 'exceptions\" behavior of the DevTools, which requires some ' + \"DEV-mode only tricks. It's possible that these don't work in \" + 'your browser. Try triggering the error in production mode, ' + 'or switching to a modern browser. If you suspect that this is ' + 'actually an issue with React, please file an issue.');\n } else if (isCrossOriginError) {\n error = new Error(\"A cross-origin error was thrown. React doesn't have access to \" + 'the actual error object in development. ' + 'See https://reactjs.org/link/crossorigin-error for more information.');\n }\n\n this.onError(error);\n } // Remove our event listeners\n\n\n window.removeEventListener('error', handleWindowError);\n\n if (!didCall) {\n // Something went really wrong, and our event was not dispatched.\n // https://github.com/facebook/react/issues/16734\n // https://github.com/facebook/react/issues/16585\n // Fall back to the production implementation.\n restoreAfterDispatch();\n return invokeGuardedCallbackProd.apply(this, arguments);\n }\n };\n }\n}\n\nvar invokeGuardedCallbackImpl$1 = invokeGuardedCallbackImpl;\n\nvar hasError = false;\nvar caughtError = null; // Used by event system to capture/rethrow the first error.\n\nvar hasRethrowError = false;\nvar rethrowError = null;\nvar reporter = {\n onError: function (error) {\n hasError = true;\n caughtError = error;\n }\n};\n/**\n * Call a function while guarding against errors that happens within it.\n * Returns an error if it throws, otherwise null.\n *\n * In production, this is implemented using a try-catch. The reason we don't\n * use a try-catch directly is so that we can swap out a different\n * implementation in DEV mode.\n *\n * @param {String} name of the guard to use for logging or debugging\n * @param {Function} func The function to invoke\n * @param {*} context The context to use when calling the function\n * @param {...*} args Arguments for function\n */\n\nfunction invokeGuardedCallback(name, func, context, a, b, c, d, e, f) {\n hasError = false;\n caughtError = null;\n invokeGuardedCallbackImpl$1.apply(reporter, arguments);\n}\n/**\n * Same as invokeGuardedCallback, but instead of returning an error, it stores\n * it in a global so it can be rethrown by `rethrowCaughtError` later.\n * TODO: See if caughtError and rethrowError can be unified.\n *\n * @param {String} name of the guard to use for logging or debugging\n * @param {Function} func The function to invoke\n * @param {*} context The context to use when calling the function\n * @param {...*} args Arguments for function\n */\n\nfunction invokeGuardedCallbackAndCatchFirstError(name, func, context, a, b, c, d, e, f) {\n invokeGuardedCallback.apply(this, arguments);\n\n if (hasError) {\n var error = clearCaughtError();\n\n if (!hasRethrowError) {\n hasRethrowError = true;\n rethrowError = error;\n }\n }\n}\n/**\n * During execution of guarded functions we will capture the first error which\n * we will rethrow to be handled by the top level error handler.\n */\n\nfunction rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n}\nfunction hasCaughtError() {\n return hasError;\n}\nfunction clearCaughtError() {\n if (hasError) {\n var error = caughtError;\n hasError = false;\n caughtError = null;\n return error;\n } else {\n {\n {\n throw Error( \"clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n }\n}\n\n/**\n * `ReactInstanceMap` maintains a mapping from a public facing stateful\n * instance (key) and the internal representation (value). This allows public\n * methods to accept the user facing instance as an argument and map them back\n * to internal methods.\n *\n * Note that this module is currently shared and assumed to be stateless.\n * If this becomes an actual Map, that will break.\n */\nfunction get(key) {\n return key._reactInternals;\n}\nfunction has(key) {\n return key._reactInternals !== undefined;\n}\nfunction set(key, value) {\n key._reactInternals = value;\n}\n\n// Don't change these two values. They're used by React Dev Tools.\nvar NoFlags =\n/* */\n0;\nvar PerformedWork =\n/* */\n1; // You can change the rest (and add more).\n\nvar Placement =\n/* */\n2;\nvar Update =\n/* */\n4;\nvar PlacementAndUpdate =\n/* */\n6;\nvar Deletion =\n/* */\n8;\nvar ContentReset =\n/* */\n16;\nvar Callback =\n/* */\n32;\nvar DidCapture =\n/* */\n64;\nvar Ref =\n/* */\n128;\nvar Snapshot =\n/* */\n256;\nvar Passive =\n/* */\n512; // TODO (effects) Remove this bit once the new reconciler is synced to the old.\n\nvar PassiveUnmountPendingDev =\n/* */\n8192;\nvar Hydrating =\n/* */\n1024;\nvar HydratingAndUpdate =\n/* */\n1028; // Passive & Update & Callback & Ref & Snapshot\n\nvar LifecycleEffectMask =\n/* */\n932; // Union of all host effects\n\nvar HostEffectMask =\n/* */\n2047; // These are not really side effects, but we still reuse this field.\n\nvar Incomplete =\n/* */\n2048;\nvar ShouldCapture =\n/* */\n4096;\nvar ForceUpdateForLegacySuspense =\n/* */\n16384; // Static tags describe aspects of a fiber that are not specific to a render,\n\nvar ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;\nfunction getNearestMountedFiber(fiber) {\n var node = fiber;\n var nearestMounted = fiber;\n\n if (!fiber.alternate) {\n // If there is no alternate, this might be a new tree that isn't inserted\n // yet. If it is, then it will have a pending insertion effect on it.\n var nextNode = node;\n\n do {\n node = nextNode;\n\n if ((node.flags & (Placement | Hydrating)) !== NoFlags) {\n // This is an insertion or in-progress hydration. The nearest possible\n // mounted fiber is the parent but we need to continue to figure out\n // if that one is still mounted.\n nearestMounted = node.return;\n }\n\n nextNode = node.return;\n } while (nextNode);\n } else {\n while (node.return) {\n node = node.return;\n }\n }\n\n if (node.tag === HostRoot) {\n // TODO: Check if this was a nested HostRoot when used with\n // renderContainerIntoSubtree.\n return nearestMounted;\n } // If we didn't hit the root, that means that we're in an disconnected tree\n // that has been unmounted.\n\n\n return null;\n}\nfunction getSuspenseInstanceFromFiber(fiber) {\n if (fiber.tag === SuspenseComponent) {\n var suspenseState = fiber.memoizedState;\n\n if (suspenseState === null) {\n var current = fiber.alternate;\n\n if (current !== null) {\n suspenseState = current.memoizedState;\n }\n }\n\n if (suspenseState !== null) {\n return suspenseState.dehydrated;\n }\n }\n\n return null;\n}\nfunction getContainerFromFiber(fiber) {\n return fiber.tag === HostRoot ? fiber.stateNode.containerInfo : null;\n}\nfunction isFiberMounted(fiber) {\n return getNearestMountedFiber(fiber) === fiber;\n}\nfunction isMounted(component) {\n {\n var owner = ReactCurrentOwner.current;\n\n if (owner !== null && owner.tag === ClassComponent) {\n var ownerFiber = owner;\n var instance = ownerFiber.stateNode;\n\n if (!instance._warnedAboutRefsInRender) {\n error('%s is accessing isMounted inside its render() function. ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', getComponentName(ownerFiber.type) || 'A component');\n }\n\n instance._warnedAboutRefsInRender = true;\n }\n }\n\n var fiber = get(component);\n\n if (!fiber) {\n return false;\n }\n\n return getNearestMountedFiber(fiber) === fiber;\n}\n\nfunction assertIsMounted(fiber) {\n if (!(getNearestMountedFiber(fiber) === fiber)) {\n {\n throw Error( \"Unable to find node on an unmounted component.\" );\n }\n }\n}\n\nfunction findCurrentFiberUsingSlowPath(fiber) {\n var alternate = fiber.alternate;\n\n if (!alternate) {\n // If there is no alternate, then we only need to check if it is mounted.\n var nearestMounted = getNearestMountedFiber(fiber);\n\n if (!(nearestMounted !== null)) {\n {\n throw Error( \"Unable to find node on an unmounted component.\" );\n }\n }\n\n if (nearestMounted !== fiber) {\n return null;\n }\n\n return fiber;\n } // If we have two possible branches, we'll walk backwards up to the root\n // to see what path the root points to. On the way we may hit one of the\n // special cases and we'll deal with them.\n\n\n var a = fiber;\n var b = alternate;\n\n while (true) {\n var parentA = a.return;\n\n if (parentA === null) {\n // We're at the root.\n break;\n }\n\n var parentB = parentA.alternate;\n\n if (parentB === null) {\n // There is no alternate. This is an unusual case. Currently, it only\n // happens when a Suspense component is hidden. An extra fragment fiber\n // is inserted in between the Suspense fiber and its children. Skip\n // over this extra fragment fiber and proceed to the next parent.\n var nextParent = parentA.return;\n\n if (nextParent !== null) {\n a = b = nextParent;\n continue;\n } // If there's no parent, we're at the root.\n\n\n break;\n } // If both copies of the parent fiber point to the same child, we can\n // assume that the child is current. This happens when we bailout on low\n // priority: the bailed out fiber's child reuses the current child.\n\n\n if (parentA.child === parentB.child) {\n var child = parentA.child;\n\n while (child) {\n if (child === a) {\n // We've determined that A is the current branch.\n assertIsMounted(parentA);\n return fiber;\n }\n\n if (child === b) {\n // We've determined that B is the current branch.\n assertIsMounted(parentA);\n return alternate;\n }\n\n child = child.sibling;\n } // We should never have an alternate for any mounting node. So the only\n // way this could possibly happen is if this was unmounted, if at all.\n\n\n {\n {\n throw Error( \"Unable to find node on an unmounted component.\" );\n }\n }\n }\n\n if (a.return !== b.return) {\n // The return pointer of A and the return pointer of B point to different\n // fibers. We assume that return pointers never criss-cross, so A must\n // belong to the child set of A.return, and B must belong to the child\n // set of B.return.\n a = parentA;\n b = parentB;\n } else {\n // The return pointers point to the same fiber. We'll have to use the\n // default, slow path: scan the child sets of each parent alternate to see\n // which child belongs to which set.\n //\n // Search parent A's child set\n var didFindChild = false;\n var _child = parentA.child;\n\n while (_child) {\n if (_child === a) {\n didFindChild = true;\n a = parentA;\n b = parentB;\n break;\n }\n\n if (_child === b) {\n didFindChild = true;\n b = parentA;\n a = parentB;\n break;\n }\n\n _child = _child.sibling;\n }\n\n if (!didFindChild) {\n // Search parent B's child set\n _child = parentB.child;\n\n while (_child) {\n if (_child === a) {\n didFindChild = true;\n a = parentB;\n b = parentA;\n break;\n }\n\n if (_child === b) {\n didFindChild = true;\n b = parentB;\n a = parentA;\n break;\n }\n\n _child = _child.sibling;\n }\n\n if (!didFindChild) {\n {\n throw Error( \"Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.\" );\n }\n }\n }\n }\n\n if (!(a.alternate === b)) {\n {\n throw Error( \"Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n } // If the root is not a host container, we're in a disconnected tree. I.e.\n // unmounted.\n\n\n if (!(a.tag === HostRoot)) {\n {\n throw Error( \"Unable to find node on an unmounted component.\" );\n }\n }\n\n if (a.stateNode.current === a) {\n // We've determined that A is the current branch.\n return fiber;\n } // Otherwise B has to be current branch.\n\n\n return alternate;\n}\nfunction findCurrentHostFiber(parent) {\n var currentParent = findCurrentFiberUsingSlowPath(parent);\n\n if (!currentParent) {\n return null;\n } // Next we'll drill down this component to find the first HostComponent/Text.\n\n\n var node = currentParent;\n\n while (true) {\n if (node.tag === HostComponent || node.tag === HostText) {\n return node;\n } else if (node.child) {\n node.child.return = node;\n node = node.child;\n continue;\n }\n\n if (node === currentParent) {\n return null;\n }\n\n while (!node.sibling) {\n if (!node.return || node.return === currentParent) {\n return null;\n }\n\n node = node.return;\n }\n\n node.sibling.return = node.return;\n node = node.sibling;\n } // Flow needs the return null here, but ESLint complains about it.\n // eslint-disable-next-line no-unreachable\n\n\n return null;\n}\nfunction findCurrentHostFiberWithNoPortals(parent) {\n var currentParent = findCurrentFiberUsingSlowPath(parent);\n\n if (!currentParent) {\n return null;\n } // Next we'll drill down this component to find the first HostComponent/Text.\n\n\n var node = currentParent;\n\n while (true) {\n if (node.tag === HostComponent || node.tag === HostText || enableFundamentalAPI ) {\n return node;\n } else if (node.child && node.tag !== HostPortal) {\n node.child.return = node;\n node = node.child;\n continue;\n }\n\n if (node === currentParent) {\n return null;\n }\n\n while (!node.sibling) {\n if (!node.return || node.return === currentParent) {\n return null;\n }\n\n node = node.return;\n }\n\n node.sibling.return = node.return;\n node = node.sibling;\n } // Flow needs the return null here, but ESLint complains about it.\n // eslint-disable-next-line no-unreachable\n\n\n return null;\n}\nfunction doesFiberContain(parentFiber, childFiber) {\n var node = childFiber;\n var parentFiberAlternate = parentFiber.alternate;\n\n while (node !== null) {\n if (node === parentFiber || node === parentFiberAlternate) {\n return true;\n }\n\n node = node.return;\n }\n\n return false;\n}\n\nvar attemptUserBlockingHydration;\nfunction setAttemptUserBlockingHydration(fn) {\n attemptUserBlockingHydration = fn;\n}\nvar attemptContinuousHydration;\nfunction setAttemptContinuousHydration(fn) {\n attemptContinuousHydration = fn;\n}\nvar attemptHydrationAtCurrentPriority;\nfunction setAttemptHydrationAtCurrentPriority(fn) {\n attemptHydrationAtCurrentPriority = fn;\n}\nvar attemptHydrationAtPriority;\nfunction setAttemptHydrationAtPriority(fn) {\n attemptHydrationAtPriority = fn;\n} // TODO: Upgrade this definition once we're on a newer version of Flow that\nvar hasScheduledReplayAttempt = false; // The queue of discrete events to be replayed.\n\nvar queuedDiscreteEvents = []; // Indicates if any continuous event targets are non-null for early bailout.\n// if the last target was dehydrated.\n\nvar queuedFocus = null;\nvar queuedDrag = null;\nvar queuedMouse = null; // For pointer events there can be one latest event per pointerId.\n\nvar queuedPointers = new Map();\nvar queuedPointerCaptures = new Map(); // We could consider replaying selectionchange and touchmoves too.\n\nvar queuedExplicitHydrationTargets = [];\nfunction hasQueuedDiscreteEvents() {\n return queuedDiscreteEvents.length > 0;\n}\nvar discreteReplayableEvents = ['mousedown', 'mouseup', 'touchcancel', 'touchend', 'touchstart', 'auxclick', 'dblclick', 'pointercancel', 'pointerdown', 'pointerup', 'dragend', 'dragstart', 'drop', 'compositionend', 'compositionstart', 'keydown', 'keypress', 'keyup', 'input', 'textInput', // Intentionally camelCase\n'copy', 'cut', 'paste', 'click', 'change', 'contextmenu', 'reset', 'submit'];\nfunction isReplayableDiscreteEvent(eventType) {\n return discreteReplayableEvents.indexOf(eventType) > -1;\n}\n\nfunction createQueuedReplayableEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) {\n return {\n blockedOn: blockedOn,\n domEventName: domEventName,\n eventSystemFlags: eventSystemFlags | IS_REPLAYED,\n nativeEvent: nativeEvent,\n targetContainers: [targetContainer]\n };\n}\n\nfunction queueDiscreteEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) {\n var queuedEvent = createQueuedReplayableEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent);\n queuedDiscreteEvents.push(queuedEvent);\n} // Resets the replaying for this type of continuous event to no event.\n\nfunction clearIfContinuousEvent(domEventName, nativeEvent) {\n switch (domEventName) {\n case 'focusin':\n case 'focusout':\n queuedFocus = null;\n break;\n\n case 'dragenter':\n case 'dragleave':\n queuedDrag = null;\n break;\n\n case 'mouseover':\n case 'mouseout':\n queuedMouse = null;\n break;\n\n case 'pointerover':\n case 'pointerout':\n {\n var pointerId = nativeEvent.pointerId;\n queuedPointers.delete(pointerId);\n break;\n }\n\n case 'gotpointercapture':\n case 'lostpointercapture':\n {\n var _pointerId = nativeEvent.pointerId;\n queuedPointerCaptures.delete(_pointerId);\n break;\n }\n }\n}\n\nfunction accumulateOrCreateContinuousQueuedReplayableEvent(existingQueuedEvent, blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) {\n if (existingQueuedEvent === null || existingQueuedEvent.nativeEvent !== nativeEvent) {\n var queuedEvent = createQueuedReplayableEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent);\n\n if (blockedOn !== null) {\n var _fiber2 = getInstanceFromNode(blockedOn);\n\n if (_fiber2 !== null) {\n // Attempt to increase the priority of this target.\n attemptContinuousHydration(_fiber2);\n }\n }\n\n return queuedEvent;\n } // If we have already queued this exact event, then it's because\n // the different event systems have different DOM event listeners.\n // We can accumulate the flags, and the targetContainers, and\n // store a single event to be replayed.\n\n\n existingQueuedEvent.eventSystemFlags |= eventSystemFlags;\n var targetContainers = existingQueuedEvent.targetContainers;\n\n if (targetContainer !== null && targetContainers.indexOf(targetContainer) === -1) {\n targetContainers.push(targetContainer);\n }\n\n return existingQueuedEvent;\n}\n\nfunction queueIfContinuousEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) {\n // These set relatedTarget to null because the replayed event will be treated as if we\n // moved from outside the window (no target) onto the target once it hydrates.\n // Instead of mutating we could clone the event.\n switch (domEventName) {\n case 'focusin':\n {\n var focusEvent = nativeEvent;\n queuedFocus = accumulateOrCreateContinuousQueuedReplayableEvent(queuedFocus, blockedOn, domEventName, eventSystemFlags, targetContainer, focusEvent);\n return true;\n }\n\n case 'dragenter':\n {\n var dragEvent = nativeEvent;\n queuedDrag = accumulateOrCreateContinuousQueuedReplayableEvent(queuedDrag, blockedOn, domEventName, eventSystemFlags, targetContainer, dragEvent);\n return true;\n }\n\n case 'mouseover':\n {\n var mouseEvent = nativeEvent;\n queuedMouse = accumulateOrCreateContinuousQueuedReplayableEvent(queuedMouse, blockedOn, domEventName, eventSystemFlags, targetContainer, mouseEvent);\n return true;\n }\n\n case 'pointerover':\n {\n var pointerEvent = nativeEvent;\n var pointerId = pointerEvent.pointerId;\n queuedPointers.set(pointerId, accumulateOrCreateContinuousQueuedReplayableEvent(queuedPointers.get(pointerId) || null, blockedOn, domEventName, eventSystemFlags, targetContainer, pointerEvent));\n return true;\n }\n\n case 'gotpointercapture':\n {\n var _pointerEvent = nativeEvent;\n var _pointerId2 = _pointerEvent.pointerId;\n queuedPointerCaptures.set(_pointerId2, accumulateOrCreateContinuousQueuedReplayableEvent(queuedPointerCaptures.get(_pointerId2) || null, blockedOn, domEventName, eventSystemFlags, targetContainer, _pointerEvent));\n return true;\n }\n }\n\n return false;\n} // Check if this target is unblocked. Returns true if it's unblocked.\n\nfunction attemptExplicitHydrationTarget(queuedTarget) {\n // TODO: This function shares a lot of logic with attemptToDispatchEvent.\n // Try to unify them. It's a bit tricky since it would require two return\n // values.\n var targetInst = getClosestInstanceFromNode(queuedTarget.target);\n\n if (targetInst !== null) {\n var nearestMounted = getNearestMountedFiber(targetInst);\n\n if (nearestMounted !== null) {\n var tag = nearestMounted.tag;\n\n if (tag === SuspenseComponent) {\n var instance = getSuspenseInstanceFromFiber(nearestMounted);\n\n if (instance !== null) {\n // We're blocked on hydrating this boundary.\n // Increase its priority.\n queuedTarget.blockedOn = instance;\n attemptHydrationAtPriority(queuedTarget.lanePriority, function () {\n Scheduler.unstable_runWithPriority(queuedTarget.priority, function () {\n attemptHydrationAtCurrentPriority(nearestMounted);\n });\n });\n return;\n }\n } else if (tag === HostRoot) {\n var root = nearestMounted.stateNode;\n\n if (root.hydrate) {\n queuedTarget.blockedOn = getContainerFromFiber(nearestMounted); // We don't currently have a way to increase the priority of\n // a root other than sync.\n\n return;\n }\n }\n }\n }\n\n queuedTarget.blockedOn = null;\n}\n\nfunction attemptReplayContinuousQueuedEvent(queuedEvent) {\n if (queuedEvent.blockedOn !== null) {\n return false;\n }\n\n var targetContainers = queuedEvent.targetContainers;\n\n while (targetContainers.length > 0) {\n var targetContainer = targetContainers[0];\n var nextBlockedOn = attemptToDispatchEvent(queuedEvent.domEventName, queuedEvent.eventSystemFlags, targetContainer, queuedEvent.nativeEvent);\n\n if (nextBlockedOn !== null) {\n // We're still blocked. Try again later.\n var _fiber3 = getInstanceFromNode(nextBlockedOn);\n\n if (_fiber3 !== null) {\n attemptContinuousHydration(_fiber3);\n }\n\n queuedEvent.blockedOn = nextBlockedOn;\n return false;\n } // This target container was successfully dispatched. Try the next.\n\n\n targetContainers.shift();\n }\n\n return true;\n}\n\nfunction attemptReplayContinuousQueuedEventInMap(queuedEvent, key, map) {\n if (attemptReplayContinuousQueuedEvent(queuedEvent)) {\n map.delete(key);\n }\n}\n\nfunction replayUnblockedEvents() {\n hasScheduledReplayAttempt = false; // First replay discrete events.\n\n while (queuedDiscreteEvents.length > 0) {\n var nextDiscreteEvent = queuedDiscreteEvents[0];\n\n if (nextDiscreteEvent.blockedOn !== null) {\n // We're still blocked.\n // Increase the priority of this boundary to unblock\n // the next discrete event.\n var _fiber4 = getInstanceFromNode(nextDiscreteEvent.blockedOn);\n\n if (_fiber4 !== null) {\n attemptUserBlockingHydration(_fiber4);\n }\n\n break;\n }\n\n var targetContainers = nextDiscreteEvent.targetContainers;\n\n while (targetContainers.length > 0) {\n var targetContainer = targetContainers[0];\n var nextBlockedOn = attemptToDispatchEvent(nextDiscreteEvent.domEventName, nextDiscreteEvent.eventSystemFlags, targetContainer, nextDiscreteEvent.nativeEvent);\n\n if (nextBlockedOn !== null) {\n // We're still blocked. Try again later.\n nextDiscreteEvent.blockedOn = nextBlockedOn;\n break;\n } // This target container was successfully dispatched. Try the next.\n\n\n targetContainers.shift();\n }\n\n if (nextDiscreteEvent.blockedOn === null) {\n // We've successfully replayed the first event. Let's try the next one.\n queuedDiscreteEvents.shift();\n }\n } // Next replay any continuous events.\n\n\n if (queuedFocus !== null && attemptReplayContinuousQueuedEvent(queuedFocus)) {\n queuedFocus = null;\n }\n\n if (queuedDrag !== null && attemptReplayContinuousQueuedEvent(queuedDrag)) {\n queuedDrag = null;\n }\n\n if (queuedMouse !== null && attemptReplayContinuousQueuedEvent(queuedMouse)) {\n queuedMouse = null;\n }\n\n queuedPointers.forEach(attemptReplayContinuousQueuedEventInMap);\n queuedPointerCaptures.forEach(attemptReplayContinuousQueuedEventInMap);\n}\n\nfunction scheduleCallbackIfUnblocked(queuedEvent, unblocked) {\n if (queuedEvent.blockedOn === unblocked) {\n queuedEvent.blockedOn = null;\n\n if (!hasScheduledReplayAttempt) {\n hasScheduledReplayAttempt = true; // Schedule a callback to attempt replaying as many events as are\n // now unblocked. This first might not actually be unblocked yet.\n // We could check it early to avoid scheduling an unnecessary callback.\n\n Scheduler.unstable_scheduleCallback(Scheduler.unstable_NormalPriority, replayUnblockedEvents);\n }\n }\n}\n\nfunction retryIfBlockedOn(unblocked) {\n // Mark anything that was blocked on this as no longer blocked\n // and eligible for a replay.\n if (queuedDiscreteEvents.length > 0) {\n scheduleCallbackIfUnblocked(queuedDiscreteEvents[0], unblocked); // This is a exponential search for each boundary that commits. I think it's\n // worth it because we expect very few discrete events to queue up and once\n // we are actually fully unblocked it will be fast to replay them.\n\n for (var i = 1; i < queuedDiscreteEvents.length; i++) {\n var queuedEvent = queuedDiscreteEvents[i];\n\n if (queuedEvent.blockedOn === unblocked) {\n queuedEvent.blockedOn = null;\n }\n }\n }\n\n if (queuedFocus !== null) {\n scheduleCallbackIfUnblocked(queuedFocus, unblocked);\n }\n\n if (queuedDrag !== null) {\n scheduleCallbackIfUnblocked(queuedDrag, unblocked);\n }\n\n if (queuedMouse !== null) {\n scheduleCallbackIfUnblocked(queuedMouse, unblocked);\n }\n\n var unblock = function (queuedEvent) {\n return scheduleCallbackIfUnblocked(queuedEvent, unblocked);\n };\n\n queuedPointers.forEach(unblock);\n queuedPointerCaptures.forEach(unblock);\n\n for (var _i = 0; _i < queuedExplicitHydrationTargets.length; _i++) {\n var queuedTarget = queuedExplicitHydrationTargets[_i];\n\n if (queuedTarget.blockedOn === unblocked) {\n queuedTarget.blockedOn = null;\n }\n }\n\n while (queuedExplicitHydrationTargets.length > 0) {\n var nextExplicitTarget = queuedExplicitHydrationTargets[0];\n\n if (nextExplicitTarget.blockedOn !== null) {\n // We're still blocked.\n break;\n } else {\n attemptExplicitHydrationTarget(nextExplicitTarget);\n\n if (nextExplicitTarget.blockedOn === null) {\n // We're unblocked.\n queuedExplicitHydrationTargets.shift();\n }\n }\n }\n}\n\nvar DiscreteEvent = 0;\nvar UserBlockingEvent = 1;\nvar ContinuousEvent = 2;\n\n/**\n * Generate a mapping of standard vendor prefixes using the defined style property and event name.\n *\n * @param {string} styleProp\n * @param {string} eventName\n * @returns {object}\n */\n\nfunction makePrefixMap(styleProp, eventName) {\n var prefixes = {};\n prefixes[styleProp.toLowerCase()] = eventName.toLowerCase();\n prefixes['Webkit' + styleProp] = 'webkit' + eventName;\n prefixes['Moz' + styleProp] = 'moz' + eventName;\n return prefixes;\n}\n/**\n * A list of event names to a configurable list of vendor prefixes.\n */\n\n\nvar vendorPrefixes = {\n animationend: makePrefixMap('Animation', 'AnimationEnd'),\n animationiteration: makePrefixMap('Animation', 'AnimationIteration'),\n animationstart: makePrefixMap('Animation', 'AnimationStart'),\n transitionend: makePrefixMap('Transition', 'TransitionEnd')\n};\n/**\n * Event names that have already been detected and prefixed (if applicable).\n */\n\nvar prefixedEventNames = {};\n/**\n * Element to check for prefixes on.\n */\n\nvar style = {};\n/**\n * Bootstrap if a DOM exists.\n */\n\nif (canUseDOM) {\n style = document.createElement('div').style; // On some platforms, in particular some releases of Android 4.x,\n // the un-prefixed \"animation\" and \"transition\" properties are defined on the\n // style object but the events that fire will still be prefixed, so we need\n // to check if the un-prefixed events are usable, and if not remove them from the map.\n\n if (!('AnimationEvent' in window)) {\n delete vendorPrefixes.animationend.animation;\n delete vendorPrefixes.animationiteration.animation;\n delete vendorPrefixes.animationstart.animation;\n } // Same as above\n\n\n if (!('TransitionEvent' in window)) {\n delete vendorPrefixes.transitionend.transition;\n }\n}\n/**\n * Attempts to determine the correct vendor prefixed event name.\n *\n * @param {string} eventName\n * @returns {string}\n */\n\n\nfunction getVendorPrefixedEventName(eventName) {\n if (prefixedEventNames[eventName]) {\n return prefixedEventNames[eventName];\n } else if (!vendorPrefixes[eventName]) {\n return eventName;\n }\n\n var prefixMap = vendorPrefixes[eventName];\n\n for (var styleProp in prefixMap) {\n if (prefixMap.hasOwnProperty(styleProp) && styleProp in style) {\n return prefixedEventNames[eventName] = prefixMap[styleProp];\n }\n }\n\n return eventName;\n}\n\nvar ANIMATION_END = getVendorPrefixedEventName('animationend');\nvar ANIMATION_ITERATION = getVendorPrefixedEventName('animationiteration');\nvar ANIMATION_START = getVendorPrefixedEventName('animationstart');\nvar TRANSITION_END = getVendorPrefixedEventName('transitionend');\n\nvar topLevelEventsToReactNames = new Map();\nvar eventPriorities = new Map(); // We store most of the events in this module in pairs of two strings so we can re-use\n// the code required to apply the same logic for event prioritization and that of the\n// SimpleEventPlugin. This complicates things slightly, but the aim is to reduce code\n// duplication (for which there would be quite a bit). For the events that are not needed\n// for the SimpleEventPlugin (otherDiscreteEvents) we process them separately as an\n// array of top level events.\n// Lastly, we ignore prettier so we can keep the formatting sane.\n// prettier-ignore\n\nvar discreteEventPairsForSimpleEventPlugin = ['cancel', 'cancel', 'click', 'click', 'close', 'close', 'contextmenu', 'contextMenu', 'copy', 'copy', 'cut', 'cut', 'auxclick', 'auxClick', 'dblclick', 'doubleClick', // Careful!\n'dragend', 'dragEnd', 'dragstart', 'dragStart', 'drop', 'drop', 'focusin', 'focus', // Careful!\n'focusout', 'blur', // Careful!\n'input', 'input', 'invalid', 'invalid', 'keydown', 'keyDown', 'keypress', 'keyPress', 'keyup', 'keyUp', 'mousedown', 'mouseDown', 'mouseup', 'mouseUp', 'paste', 'paste', 'pause', 'pause', 'play', 'play', 'pointercancel', 'pointerCancel', 'pointerdown', 'pointerDown', 'pointerup', 'pointerUp', 'ratechange', 'rateChange', 'reset', 'reset', 'seeked', 'seeked', 'submit', 'submit', 'touchcancel', 'touchCancel', 'touchend', 'touchEnd', 'touchstart', 'touchStart', 'volumechange', 'volumeChange'];\nvar otherDiscreteEvents = ['change', 'selectionchange', 'textInput', 'compositionstart', 'compositionend', 'compositionupdate'];\n\n\nvar userBlockingPairsForSimpleEventPlugin = ['drag', 'drag', 'dragenter', 'dragEnter', 'dragexit', 'dragExit', 'dragleave', 'dragLeave', 'dragover', 'dragOver', 'mousemove', 'mouseMove', 'mouseout', 'mouseOut', 'mouseover', 'mouseOver', 'pointermove', 'pointerMove', 'pointerout', 'pointerOut', 'pointerover', 'pointerOver', 'scroll', 'scroll', 'toggle', 'toggle', 'touchmove', 'touchMove', 'wheel', 'wheel']; // prettier-ignore\n\nvar continuousPairsForSimpleEventPlugin = ['abort', 'abort', ANIMATION_END, 'animationEnd', ANIMATION_ITERATION, 'animationIteration', ANIMATION_START, 'animationStart', 'canplay', 'canPlay', 'canplaythrough', 'canPlayThrough', 'durationchange', 'durationChange', 'emptied', 'emptied', 'encrypted', 'encrypted', 'ended', 'ended', 'error', 'error', 'gotpointercapture', 'gotPointerCapture', 'load', 'load', 'loadeddata', 'loadedData', 'loadedmetadata', 'loadedMetadata', 'loadstart', 'loadStart', 'lostpointercapture', 'lostPointerCapture', 'playing', 'playing', 'progress', 'progress', 'seeking', 'seeking', 'stalled', 'stalled', 'suspend', 'suspend', 'timeupdate', 'timeUpdate', TRANSITION_END, 'transitionEnd', 'waiting', 'waiting'];\n/**\n * Turns\n * ['abort', ...]\n *\n * into\n *\n * topLevelEventsToReactNames = new Map([\n * ['abort', 'onAbort'],\n * ]);\n *\n * and registers them.\n */\n\nfunction registerSimplePluginEventsAndSetTheirPriorities(eventTypes, priority) {\n // As the event types are in pairs of two, we need to iterate\n // through in twos. The events are in pairs of two to save code\n // and improve init perf of processing this array, as it will\n // result in far fewer object allocations and property accesses\n // if we only use three arrays to process all the categories of\n // instead of tuples.\n for (var i = 0; i < eventTypes.length; i += 2) {\n var topEvent = eventTypes[i];\n var event = eventTypes[i + 1];\n var capitalizedEvent = event[0].toUpperCase() + event.slice(1);\n var reactName = 'on' + capitalizedEvent;\n eventPriorities.set(topEvent, priority);\n topLevelEventsToReactNames.set(topEvent, reactName);\n registerTwoPhaseEvent(reactName, [topEvent]);\n }\n}\n\nfunction setEventPriorities(eventTypes, priority) {\n for (var i = 0; i < eventTypes.length; i++) {\n eventPriorities.set(eventTypes[i], priority);\n }\n}\n\nfunction getEventPriorityForPluginSystem(domEventName) {\n var priority = eventPriorities.get(domEventName); // Default to a ContinuousEvent. Note: we might\n // want to warn if we can't detect the priority\n // for the event.\n\n return priority === undefined ? ContinuousEvent : priority;\n}\nfunction registerSimpleEvents() {\n registerSimplePluginEventsAndSetTheirPriorities(discreteEventPairsForSimpleEventPlugin, DiscreteEvent);\n registerSimplePluginEventsAndSetTheirPriorities(userBlockingPairsForSimpleEventPlugin, UserBlockingEvent);\n registerSimplePluginEventsAndSetTheirPriorities(continuousPairsForSimpleEventPlugin, ContinuousEvent);\n setEventPriorities(otherDiscreteEvents, DiscreteEvent);\n}\n\nvar Scheduler_now = Scheduler.unstable_now;\n\n{\n // Provide explicit error message when production+profiling bundle of e.g.\n // react-dom is used with production (non-profiling) bundle of\n // scheduler/tracing\n if (!(tracing.__interactionsRef != null && tracing.__interactionsRef.current != null)) {\n {\n throw Error( \"It is not supported to run the profiling version of a renderer (for example, `react-dom/profiling`) without also replacing the `scheduler/tracing` module with `scheduler/tracing-profiling`. Your bundler might have a setting for aliasing both modules. Learn more at https://reactjs.org/link/profiling\" );\n }\n }\n}\n// ascending numbers so we can compare them like numbers. They start at 90 to\n// avoid clashing with Scheduler's priorities.\n\nvar ImmediatePriority = 99;\nvar UserBlockingPriority = 98;\nvar NormalPriority = 97;\nvar LowPriority = 96;\nvar IdlePriority = 95; // NoPriority is the absence of priority. Also React-only.\n\nvar NoPriority = 90;\nvar initialTimeMs = Scheduler_now(); // If the initial timestamp is reasonably small, use Scheduler's `now` directly.\n\nvar SyncLanePriority = 15;\nvar SyncBatchedLanePriority = 14;\nvar InputDiscreteHydrationLanePriority = 13;\nvar InputDiscreteLanePriority = 12;\nvar InputContinuousHydrationLanePriority = 11;\nvar InputContinuousLanePriority = 10;\nvar DefaultHydrationLanePriority = 9;\nvar DefaultLanePriority = 8;\nvar TransitionHydrationPriority = 7;\nvar TransitionPriority = 6;\nvar RetryLanePriority = 5;\nvar SelectiveHydrationLanePriority = 4;\nvar IdleHydrationLanePriority = 3;\nvar IdleLanePriority = 2;\nvar OffscreenLanePriority = 1;\nvar NoLanePriority = 0;\nvar TotalLanes = 31;\nvar NoLanes =\n/* */\n0;\nvar NoLane =\n/* */\n0;\nvar SyncLane =\n/* */\n1;\nvar SyncBatchedLane =\n/* */\n2;\nvar InputDiscreteHydrationLane =\n/* */\n4;\nvar InputDiscreteLanes =\n/* */\n24;\nvar InputContinuousHydrationLane =\n/* */\n32;\nvar InputContinuousLanes =\n/* */\n192;\nvar DefaultHydrationLane =\n/* */\n256;\nvar DefaultLanes =\n/* */\n3584;\nvar TransitionHydrationLane =\n/* */\n4096;\nvar TransitionLanes =\n/* */\n4186112;\nvar RetryLanes =\n/* */\n62914560;\nvar SomeRetryLane =\n/* */\n33554432;\nvar SelectiveHydrationLane =\n/* */\n67108864;\nvar NonIdleLanes =\n/* */\n134217727;\nvar IdleHydrationLane =\n/* */\n134217728;\nvar IdleLanes =\n/* */\n805306368;\nvar OffscreenLane =\n/* */\n1073741824;\nvar NoTimestamp = -1;\nfunction setCurrentUpdateLanePriority(newLanePriority) {\n} // \"Registers\" used to \"return\" multiple values\n// Used by getHighestPriorityLanes and getNextLanes:\n\nvar return_highestLanePriority = DefaultLanePriority;\n\nfunction getHighestPriorityLanes(lanes) {\n if ((SyncLane & lanes) !== NoLanes) {\n return_highestLanePriority = SyncLanePriority;\n return SyncLane;\n }\n\n if ((SyncBatchedLane & lanes) !== NoLanes) {\n return_highestLanePriority = SyncBatchedLanePriority;\n return SyncBatchedLane;\n }\n\n if ((InputDiscreteHydrationLane & lanes) !== NoLanes) {\n return_highestLanePriority = InputDiscreteHydrationLanePriority;\n return InputDiscreteHydrationLane;\n }\n\n var inputDiscreteLanes = InputDiscreteLanes & lanes;\n\n if (inputDiscreteLanes !== NoLanes) {\n return_highestLanePriority = InputDiscreteLanePriority;\n return inputDiscreteLanes;\n }\n\n if ((lanes & InputContinuousHydrationLane) !== NoLanes) {\n return_highestLanePriority = InputContinuousHydrationLanePriority;\n return InputContinuousHydrationLane;\n }\n\n var inputContinuousLanes = InputContinuousLanes & lanes;\n\n if (inputContinuousLanes !== NoLanes) {\n return_highestLanePriority = InputContinuousLanePriority;\n return inputContinuousLanes;\n }\n\n if ((lanes & DefaultHydrationLane) !== NoLanes) {\n return_highestLanePriority = DefaultHydrationLanePriority;\n return DefaultHydrationLane;\n }\n\n var defaultLanes = DefaultLanes & lanes;\n\n if (defaultLanes !== NoLanes) {\n return_highestLanePriority = DefaultLanePriority;\n return defaultLanes;\n }\n\n if ((lanes & TransitionHydrationLane) !== NoLanes) {\n return_highestLanePriority = TransitionHydrationPriority;\n return TransitionHydrationLane;\n }\n\n var transitionLanes = TransitionLanes & lanes;\n\n if (transitionLanes !== NoLanes) {\n return_highestLanePriority = TransitionPriority;\n return transitionLanes;\n }\n\n var retryLanes = RetryLanes & lanes;\n\n if (retryLanes !== NoLanes) {\n return_highestLanePriority = RetryLanePriority;\n return retryLanes;\n }\n\n if (lanes & SelectiveHydrationLane) {\n return_highestLanePriority = SelectiveHydrationLanePriority;\n return SelectiveHydrationLane;\n }\n\n if ((lanes & IdleHydrationLane) !== NoLanes) {\n return_highestLanePriority = IdleHydrationLanePriority;\n return IdleHydrationLane;\n }\n\n var idleLanes = IdleLanes & lanes;\n\n if (idleLanes !== NoLanes) {\n return_highestLanePriority = IdleLanePriority;\n return idleLanes;\n }\n\n if ((OffscreenLane & lanes) !== NoLanes) {\n return_highestLanePriority = OffscreenLanePriority;\n return OffscreenLane;\n }\n\n {\n error('Should have found matching lanes. This is a bug in React.');\n } // This shouldn't be reachable, but as a fallback, return the entire bitmask.\n\n\n return_highestLanePriority = DefaultLanePriority;\n return lanes;\n}\n\nfunction schedulerPriorityToLanePriority(schedulerPriorityLevel) {\n switch (schedulerPriorityLevel) {\n case ImmediatePriority:\n return SyncLanePriority;\n\n case UserBlockingPriority:\n return InputContinuousLanePriority;\n\n case NormalPriority:\n case LowPriority:\n // TODO: Handle LowSchedulerPriority, somehow. Maybe the same lane as hydration.\n return DefaultLanePriority;\n\n case IdlePriority:\n return IdleLanePriority;\n\n default:\n return NoLanePriority;\n }\n}\nfunction lanePriorityToSchedulerPriority(lanePriority) {\n switch (lanePriority) {\n case SyncLanePriority:\n case SyncBatchedLanePriority:\n return ImmediatePriority;\n\n case InputDiscreteHydrationLanePriority:\n case InputDiscreteLanePriority:\n case InputContinuousHydrationLanePriority:\n case InputContinuousLanePriority:\n return UserBlockingPriority;\n\n case DefaultHydrationLanePriority:\n case DefaultLanePriority:\n case TransitionHydrationPriority:\n case TransitionPriority:\n case SelectiveHydrationLanePriority:\n case RetryLanePriority:\n return NormalPriority;\n\n case IdleHydrationLanePriority:\n case IdleLanePriority:\n case OffscreenLanePriority:\n return IdlePriority;\n\n case NoLanePriority:\n return NoPriority;\n\n default:\n {\n {\n throw Error( \"Invalid update priority: \" + lanePriority + \". This is a bug in React.\" );\n }\n }\n\n }\n}\nfunction getNextLanes(root, wipLanes) {\n // Early bailout if there's no pending work left.\n var pendingLanes = root.pendingLanes;\n\n if (pendingLanes === NoLanes) {\n return_highestLanePriority = NoLanePriority;\n return NoLanes;\n }\n\n var nextLanes = NoLanes;\n var nextLanePriority = NoLanePriority;\n var expiredLanes = root.expiredLanes;\n var suspendedLanes = root.suspendedLanes;\n var pingedLanes = root.pingedLanes; // Check if any work has expired.\n\n if (expiredLanes !== NoLanes) {\n nextLanes = expiredLanes;\n nextLanePriority = return_highestLanePriority = SyncLanePriority;\n } else {\n // Do not work on any idle work until all the non-idle work has finished,\n // even if the work is suspended.\n var nonIdlePendingLanes = pendingLanes & NonIdleLanes;\n\n if (nonIdlePendingLanes !== NoLanes) {\n var nonIdleUnblockedLanes = nonIdlePendingLanes & ~suspendedLanes;\n\n if (nonIdleUnblockedLanes !== NoLanes) {\n nextLanes = getHighestPriorityLanes(nonIdleUnblockedLanes);\n nextLanePriority = return_highestLanePriority;\n } else {\n var nonIdlePingedLanes = nonIdlePendingLanes & pingedLanes;\n\n if (nonIdlePingedLanes !== NoLanes) {\n nextLanes = getHighestPriorityLanes(nonIdlePingedLanes);\n nextLanePriority = return_highestLanePriority;\n }\n }\n } else {\n // The only remaining work is Idle.\n var unblockedLanes = pendingLanes & ~suspendedLanes;\n\n if (unblockedLanes !== NoLanes) {\n nextLanes = getHighestPriorityLanes(unblockedLanes);\n nextLanePriority = return_highestLanePriority;\n } else {\n if (pingedLanes !== NoLanes) {\n nextLanes = getHighestPriorityLanes(pingedLanes);\n nextLanePriority = return_highestLanePriority;\n }\n }\n }\n }\n\n if (nextLanes === NoLanes) {\n // This should only be reachable if we're suspended\n // TODO: Consider warning in this path if a fallback timer is not scheduled.\n return NoLanes;\n } // If there are higher priority lanes, we'll include them even if they\n // are suspended.\n\n\n nextLanes = pendingLanes & getEqualOrHigherPriorityLanes(nextLanes); // If we're already in the middle of a render, switching lanes will interrupt\n // it and we'll lose our progress. We should only do this if the new lanes are\n // higher priority.\n\n if (wipLanes !== NoLanes && wipLanes !== nextLanes && // If we already suspended with a delay, then interrupting is fine. Don't\n // bother waiting until the root is complete.\n (wipLanes & suspendedLanes) === NoLanes) {\n getHighestPriorityLanes(wipLanes);\n var wipLanePriority = return_highestLanePriority;\n\n if (nextLanePriority <= wipLanePriority) {\n return wipLanes;\n } else {\n return_highestLanePriority = nextLanePriority;\n }\n } // Check for entangled lanes and add them to the batch.\n //\n // A lane is said to be entangled with another when it's not allowed to render\n // in a batch that does not also include the other lane. Typically we do this\n // when multiple updates have the same source, and we only want to respond to\n // the most recent event from that source.\n //\n // Note that we apply entanglements *after* checking for partial work above.\n // This means that if a lane is entangled during an interleaved event while\n // it's already rendering, we won't interrupt it. This is intentional, since\n // entanglement is usually \"best effort\": we'll try our best to render the\n // lanes in the same batch, but it's not worth throwing out partially\n // completed work in order to do it.\n //\n // For those exceptions where entanglement is semantically important, like\n // useMutableSource, we should ensure that there is no partial work at the\n // time we apply the entanglement.\n\n\n var entangledLanes = root.entangledLanes;\n\n if (entangledLanes !== NoLanes) {\n var entanglements = root.entanglements;\n var lanes = nextLanes & entangledLanes;\n\n while (lanes > 0) {\n var index = pickArbitraryLaneIndex(lanes);\n var lane = 1 << index;\n nextLanes |= entanglements[index];\n lanes &= ~lane;\n }\n }\n\n return nextLanes;\n}\nfunction getMostRecentEventTime(root, lanes) {\n var eventTimes = root.eventTimes;\n var mostRecentEventTime = NoTimestamp;\n\n while (lanes > 0) {\n var index = pickArbitraryLaneIndex(lanes);\n var lane = 1 << index;\n var eventTime = eventTimes[index];\n\n if (eventTime > mostRecentEventTime) {\n mostRecentEventTime = eventTime;\n }\n\n lanes &= ~lane;\n }\n\n return mostRecentEventTime;\n}\n\nfunction computeExpirationTime(lane, currentTime) {\n // TODO: Expiration heuristic is constant per lane, so could use a map.\n getHighestPriorityLanes(lane);\n var priority = return_highestLanePriority;\n\n if (priority >= InputContinuousLanePriority) {\n // User interactions should expire slightly more quickly.\n //\n // NOTE: This is set to the corresponding constant as in Scheduler.js. When\n // we made it larger, a product metric in www regressed, suggesting there's\n // a user interaction that's being starved by a series of synchronous\n // updates. If that theory is correct, the proper solution is to fix the\n // starvation. However, this scenario supports the idea that expiration\n // times are an important safeguard when starvation does happen.\n //\n // Also note that, in the case of user input specifically, this will soon no\n // longer be an issue because we plan to make user input synchronous by\n // default (until you enter `startTransition`, of course.)\n //\n // If weren't planning to make these updates synchronous soon anyway, I\n // would probably make this number a configurable parameter.\n return currentTime + 250;\n } else if (priority >= TransitionPriority) {\n return currentTime + 5000;\n } else {\n // Anything idle priority or lower should never expire.\n return NoTimestamp;\n }\n}\n\nfunction markStarvedLanesAsExpired(root, currentTime) {\n // TODO: This gets called every time we yield. We can optimize by storing\n // the earliest expiration time on the root. Then use that to quickly bail out\n // of this function.\n var pendingLanes = root.pendingLanes;\n var suspendedLanes = root.suspendedLanes;\n var pingedLanes = root.pingedLanes;\n var expirationTimes = root.expirationTimes; // Iterate through the pending lanes and check if we've reached their\n // expiration time. If so, we'll assume the update is being starved and mark\n // it as expired to force it to finish.\n\n var lanes = pendingLanes;\n\n while (lanes > 0) {\n var index = pickArbitraryLaneIndex(lanes);\n var lane = 1 << index;\n var expirationTime = expirationTimes[index];\n\n if (expirationTime === NoTimestamp) {\n // Found a pending lane with no expiration time. If it's not suspended, or\n // if it's pinged, assume it's CPU-bound. Compute a new expiration time\n // using the current time.\n if ((lane & suspendedLanes) === NoLanes || (lane & pingedLanes) !== NoLanes) {\n // Assumes timestamps are monotonically increasing.\n expirationTimes[index] = computeExpirationTime(lane, currentTime);\n }\n } else if (expirationTime <= currentTime) {\n // This lane expired\n root.expiredLanes |= lane;\n }\n\n lanes &= ~lane;\n }\n} // This returns the highest priority pending lanes regardless of whether they\nfunction getLanesToRetrySynchronouslyOnError(root) {\n var everythingButOffscreen = root.pendingLanes & ~OffscreenLane;\n\n if (everythingButOffscreen !== NoLanes) {\n return everythingButOffscreen;\n }\n\n if (everythingButOffscreen & OffscreenLane) {\n return OffscreenLane;\n }\n\n return NoLanes;\n}\nfunction returnNextLanesPriority() {\n return return_highestLanePriority;\n}\nfunction includesNonIdleWork(lanes) {\n return (lanes & NonIdleLanes) !== NoLanes;\n}\nfunction includesOnlyRetries(lanes) {\n return (lanes & RetryLanes) === lanes;\n}\nfunction includesOnlyTransitions(lanes) {\n return (lanes & TransitionLanes) === lanes;\n} // To ensure consistency across multiple updates in the same event, this should\n// be a pure function, so that it always returns the same lane for given inputs.\n\nfunction findUpdateLane(lanePriority, wipLanes) {\n switch (lanePriority) {\n case NoLanePriority:\n break;\n\n case SyncLanePriority:\n return SyncLane;\n\n case SyncBatchedLanePriority:\n return SyncBatchedLane;\n\n case InputDiscreteLanePriority:\n {\n var _lane = pickArbitraryLane(InputDiscreteLanes & ~wipLanes);\n\n if (_lane === NoLane) {\n // Shift to the next priority level\n return findUpdateLane(InputContinuousLanePriority, wipLanes);\n }\n\n return _lane;\n }\n\n case InputContinuousLanePriority:\n {\n var _lane2 = pickArbitraryLane(InputContinuousLanes & ~wipLanes);\n\n if (_lane2 === NoLane) {\n // Shift to the next priority level\n return findUpdateLane(DefaultLanePriority, wipLanes);\n }\n\n return _lane2;\n }\n\n case DefaultLanePriority:\n {\n var _lane3 = pickArbitraryLane(DefaultLanes & ~wipLanes);\n\n if (_lane3 === NoLane) {\n // If all the default lanes are already being worked on, look for a\n // lane in the transition range.\n _lane3 = pickArbitraryLane(TransitionLanes & ~wipLanes);\n\n if (_lane3 === NoLane) {\n // All the transition lanes are taken, too. This should be very\n // rare, but as a last resort, pick a default lane. This will have\n // the effect of interrupting the current work-in-progress render.\n _lane3 = pickArbitraryLane(DefaultLanes);\n }\n }\n\n return _lane3;\n }\n\n case TransitionPriority: // Should be handled by findTransitionLane instead\n\n case RetryLanePriority:\n // Should be handled by findRetryLane instead\n break;\n\n case IdleLanePriority:\n var lane = pickArbitraryLane(IdleLanes & ~wipLanes);\n\n if (lane === NoLane) {\n lane = pickArbitraryLane(IdleLanes);\n }\n\n return lane;\n }\n\n {\n {\n throw Error( \"Invalid update priority: \" + lanePriority + \". This is a bug in React.\" );\n }\n }\n} // To ensure consistency across multiple updates in the same event, this should\n// be pure function, so that it always returns the same lane for given inputs.\n\nfunction findTransitionLane(wipLanes, pendingLanes) {\n // First look for lanes that are completely unclaimed, i.e. have no\n // pending work.\n var lane = pickArbitraryLane(TransitionLanes & ~pendingLanes);\n\n if (lane === NoLane) {\n // If all lanes have pending work, look for a lane that isn't currently\n // being worked on.\n lane = pickArbitraryLane(TransitionLanes & ~wipLanes);\n\n if (lane === NoLane) {\n // If everything is being worked on, pick any lane. This has the\n // effect of interrupting the current work-in-progress.\n lane = pickArbitraryLane(TransitionLanes);\n }\n }\n\n return lane;\n} // To ensure consistency across multiple updates in the same event, this should\n// be pure function, so that it always returns the same lane for given inputs.\n\nfunction findRetryLane(wipLanes) {\n // This is a fork of `findUpdateLane` designed specifically for Suspense\n // \"retries\" — a special update that attempts to flip a Suspense boundary\n // from its placeholder state to its primary/resolved state.\n var lane = pickArbitraryLane(RetryLanes & ~wipLanes);\n\n if (lane === NoLane) {\n lane = pickArbitraryLane(RetryLanes);\n }\n\n return lane;\n}\n\nfunction getHighestPriorityLane(lanes) {\n return lanes & -lanes;\n}\n\nfunction getLowestPriorityLane(lanes) {\n // This finds the most significant non-zero bit.\n var index = 31 - clz32(lanes);\n return index < 0 ? NoLanes : 1 << index;\n}\n\nfunction getEqualOrHigherPriorityLanes(lanes) {\n return (getLowestPriorityLane(lanes) << 1) - 1;\n}\n\nfunction pickArbitraryLane(lanes) {\n // This wrapper function gets inlined. Only exists so to communicate that it\n // doesn't matter which bit is selected; you can pick any bit without\n // affecting the algorithms where its used. Here I'm using\n // getHighestPriorityLane because it requires the fewest operations.\n return getHighestPriorityLane(lanes);\n}\n\nfunction pickArbitraryLaneIndex(lanes) {\n return 31 - clz32(lanes);\n}\n\nfunction laneToIndex(lane) {\n return pickArbitraryLaneIndex(lane);\n}\n\nfunction includesSomeLane(a, b) {\n return (a & b) !== NoLanes;\n}\nfunction isSubsetOfLanes(set, subset) {\n return (set & subset) === subset;\n}\nfunction mergeLanes(a, b) {\n return a | b;\n}\nfunction removeLanes(set, subset) {\n return set & ~subset;\n} // Seems redundant, but it changes the type from a single lane (used for\n// updates) to a group of lanes (used for flushing work).\n\nfunction laneToLanes(lane) {\n return lane;\n}\nfunction higherPriorityLane(a, b) {\n // This works because the bit ranges decrease in priority as you go left.\n return a !== NoLane && a < b ? a : b;\n}\nfunction createLaneMap(initial) {\n // Intentionally pushing one by one.\n // https://v8.dev/blog/elements-kinds#avoid-creating-holes\n var laneMap = [];\n\n for (var i = 0; i < TotalLanes; i++) {\n laneMap.push(initial);\n }\n\n return laneMap;\n}\nfunction markRootUpdated(root, updateLane, eventTime) {\n root.pendingLanes |= updateLane; // TODO: Theoretically, any update to any lane can unblock any other lane. But\n // it's not practical to try every single possible combination. We need a\n // heuristic to decide which lanes to attempt to render, and in which batches.\n // For now, we use the same heuristic as in the old ExpirationTimes model:\n // retry any lane at equal or lower priority, but don't try updates at higher\n // priority without also including the lower priority updates. This works well\n // when considering updates across different priority levels, but isn't\n // sufficient for updates within the same priority, since we want to treat\n // those updates as parallel.\n // Unsuspend any update at equal or lower priority.\n\n var higherPriorityLanes = updateLane - 1; // Turns 0b1000 into 0b0111\n\n root.suspendedLanes &= higherPriorityLanes;\n root.pingedLanes &= higherPriorityLanes;\n var eventTimes = root.eventTimes;\n var index = laneToIndex(updateLane); // We can always overwrite an existing timestamp because we prefer the most\n // recent event, and we assume time is monotonically increasing.\n\n eventTimes[index] = eventTime;\n}\nfunction markRootSuspended(root, suspendedLanes) {\n root.suspendedLanes |= suspendedLanes;\n root.pingedLanes &= ~suspendedLanes; // The suspended lanes are no longer CPU-bound. Clear their expiration times.\n\n var expirationTimes = root.expirationTimes;\n var lanes = suspendedLanes;\n\n while (lanes > 0) {\n var index = pickArbitraryLaneIndex(lanes);\n var lane = 1 << index;\n expirationTimes[index] = NoTimestamp;\n lanes &= ~lane;\n }\n}\nfunction markRootPinged(root, pingedLanes, eventTime) {\n root.pingedLanes |= root.suspendedLanes & pingedLanes;\n}\nfunction markDiscreteUpdatesExpired(root) {\n root.expiredLanes |= InputDiscreteLanes & root.pendingLanes;\n}\nfunction hasDiscreteLanes(lanes) {\n return (lanes & InputDiscreteLanes) !== NoLanes;\n}\nfunction markRootMutableRead(root, updateLane) {\n root.mutableReadLanes |= updateLane & root.pendingLanes;\n}\nfunction markRootFinished(root, remainingLanes) {\n var noLongerPendingLanes = root.pendingLanes & ~remainingLanes;\n root.pendingLanes = remainingLanes; // Let's try everything again\n\n root.suspendedLanes = 0;\n root.pingedLanes = 0;\n root.expiredLanes &= remainingLanes;\n root.mutableReadLanes &= remainingLanes;\n root.entangledLanes &= remainingLanes;\n var entanglements = root.entanglements;\n var eventTimes = root.eventTimes;\n var expirationTimes = root.expirationTimes; // Clear the lanes that no longer have pending work\n\n var lanes = noLongerPendingLanes;\n\n while (lanes > 0) {\n var index = pickArbitraryLaneIndex(lanes);\n var lane = 1 << index;\n entanglements[index] = NoLanes;\n eventTimes[index] = NoTimestamp;\n expirationTimes[index] = NoTimestamp;\n lanes &= ~lane;\n }\n}\nfunction markRootEntangled(root, entangledLanes) {\n root.entangledLanes |= entangledLanes;\n var entanglements = root.entanglements;\n var lanes = entangledLanes;\n\n while (lanes > 0) {\n var index = pickArbitraryLaneIndex(lanes);\n var lane = 1 << index;\n entanglements[index] |= entangledLanes;\n lanes &= ~lane;\n }\n}\nvar clz32 = Math.clz32 ? Math.clz32 : clz32Fallback; // Count leading zeros. Only used on lanes, so assume input is an integer.\n// Based on:\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/clz32\n\nvar log = Math.log;\nvar LN2 = Math.LN2;\n\nfunction clz32Fallback(lanes) {\n if (lanes === 0) {\n return 32;\n }\n\n return 31 - (log(lanes) / LN2 | 0) | 0;\n}\n\n// Intentionally not named imports because Rollup would use dynamic dispatch for\nvar UserBlockingPriority$1 = Scheduler.unstable_UserBlockingPriority,\n runWithPriority = Scheduler.unstable_runWithPriority; // TODO: can we stop exporting these?\n\nvar _enabled = true; // This is exported in FB builds for use by legacy FB layer infra.\n// We'd like to remove this but it's not clear if this is safe.\n\nfunction setEnabled(enabled) {\n _enabled = !!enabled;\n}\nfunction isEnabled() {\n return _enabled;\n}\nfunction createEventListenerWrapperWithPriority(targetContainer, domEventName, eventSystemFlags) {\n var eventPriority = getEventPriorityForPluginSystem(domEventName);\n var listenerWrapper;\n\n switch (eventPriority) {\n case DiscreteEvent:\n listenerWrapper = dispatchDiscreteEvent;\n break;\n\n case UserBlockingEvent:\n listenerWrapper = dispatchUserBlockingUpdate;\n break;\n\n case ContinuousEvent:\n default:\n listenerWrapper = dispatchEvent;\n break;\n }\n\n return listenerWrapper.bind(null, domEventName, eventSystemFlags, targetContainer);\n}\n\nfunction dispatchDiscreteEvent(domEventName, eventSystemFlags, container, nativeEvent) {\n {\n flushDiscreteUpdatesIfNeeded(nativeEvent.timeStamp);\n }\n\n discreteUpdates(dispatchEvent, domEventName, eventSystemFlags, container, nativeEvent);\n}\n\nfunction dispatchUserBlockingUpdate(domEventName, eventSystemFlags, container, nativeEvent) {\n {\n runWithPriority(UserBlockingPriority$1, dispatchEvent.bind(null, domEventName, eventSystemFlags, container, nativeEvent));\n }\n}\n\nfunction dispatchEvent(domEventName, eventSystemFlags, targetContainer, nativeEvent) {\n if (!_enabled) {\n return;\n }\n\n var allowReplay = true;\n\n {\n // TODO: replaying capture phase events is currently broken\n // because we used to do it during top-level native bubble handlers\n // but now we use different bubble and capture handlers.\n // In eager mode, we attach capture listeners early, so we need\n // to filter them out until we fix the logic to handle them correctly.\n // This could've been outside the flag but I put it inside to reduce risk.\n allowReplay = (eventSystemFlags & IS_CAPTURE_PHASE) === 0;\n }\n\n if (allowReplay && hasQueuedDiscreteEvents() && isReplayableDiscreteEvent(domEventName)) {\n // If we already have a queue of discrete events, and this is another discrete\n // event, then we can't dispatch it regardless of its target, since they\n // need to dispatch in order.\n queueDiscreteEvent(null, // Flags that we're not actually blocked on anything as far as we know.\n domEventName, eventSystemFlags, targetContainer, nativeEvent);\n return;\n }\n\n var blockedOn = attemptToDispatchEvent(domEventName, eventSystemFlags, targetContainer, nativeEvent);\n\n if (blockedOn === null) {\n // We successfully dispatched this event.\n if (allowReplay) {\n clearIfContinuousEvent(domEventName, nativeEvent);\n }\n\n return;\n }\n\n if (allowReplay) {\n if (isReplayableDiscreteEvent(domEventName)) {\n // This this to be replayed later once the target is available.\n queueDiscreteEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent);\n return;\n }\n\n if (queueIfContinuousEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent)) {\n return;\n } // We need to clear only if we didn't queue because\n // queueing is accummulative.\n\n\n clearIfContinuousEvent(domEventName, nativeEvent);\n } // This is not replayable so we'll invoke it but without a target,\n // in case the event system needs to trace it.\n\n\n dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, null, targetContainer);\n} // Attempt dispatching an event. Returns a SuspenseInstance or Container if it's blocked.\n\nfunction attemptToDispatchEvent(domEventName, eventSystemFlags, targetContainer, nativeEvent) {\n // TODO: Warn if _enabled is false.\n var nativeEventTarget = getEventTarget(nativeEvent);\n var targetInst = getClosestInstanceFromNode(nativeEventTarget);\n\n if (targetInst !== null) {\n var nearestMounted = getNearestMountedFiber(targetInst);\n\n if (nearestMounted === null) {\n // This tree has been unmounted already. Dispatch without a target.\n targetInst = null;\n } else {\n var tag = nearestMounted.tag;\n\n if (tag === SuspenseComponent) {\n var instance = getSuspenseInstanceFromFiber(nearestMounted);\n\n if (instance !== null) {\n // Queue the event to be replayed later. Abort dispatching since we\n // don't want this event dispatched twice through the event system.\n // TODO: If this is the first discrete event in the queue. Schedule an increased\n // priority for this boundary.\n return instance;\n } // This shouldn't happen, something went wrong but to avoid blocking\n // the whole system, dispatch the event without a target.\n // TODO: Warn.\n\n\n targetInst = null;\n } else if (tag === HostRoot) {\n var root = nearestMounted.stateNode;\n\n if (root.hydrate) {\n // If this happens during a replay something went wrong and it might block\n // the whole system.\n return getContainerFromFiber(nearestMounted);\n }\n\n targetInst = null;\n } else if (nearestMounted !== targetInst) {\n // If we get an event (ex: img onload) before committing that\n // component's mount, ignore it for now (that is, treat it as if it was an\n // event on a non-React tree). We might also consider queueing events and\n // dispatching them after the mount.\n targetInst = null;\n }\n }\n }\n\n dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, targetInst, targetContainer); // We're not blocked on anything.\n\n return null;\n}\n\nfunction addEventBubbleListener(target, eventType, listener) {\n target.addEventListener(eventType, listener, false);\n return listener;\n}\nfunction addEventCaptureListener(target, eventType, listener) {\n target.addEventListener(eventType, listener, true);\n return listener;\n}\nfunction addEventCaptureListenerWithPassiveFlag(target, eventType, listener, passive) {\n target.addEventListener(eventType, listener, {\n capture: true,\n passive: passive\n });\n return listener;\n}\nfunction addEventBubbleListenerWithPassiveFlag(target, eventType, listener, passive) {\n target.addEventListener(eventType, listener, {\n passive: passive\n });\n return listener;\n}\n\n/**\n * These variables store information about text content of a target node,\n * allowing comparison of content before and after a given event.\n *\n * Identify the node where selection currently begins, then observe\n * both its text content and its current position in the DOM. Since the\n * browser may natively replace the target node during composition, we can\n * use its position to find its replacement.\n *\n *\n */\nvar root = null;\nvar startText = null;\nvar fallbackText = null;\nfunction initialize(nativeEventTarget) {\n root = nativeEventTarget;\n startText = getText();\n return true;\n}\nfunction reset() {\n root = null;\n startText = null;\n fallbackText = null;\n}\nfunction getData() {\n if (fallbackText) {\n return fallbackText;\n }\n\n var start;\n var startValue = startText;\n var startLength = startValue.length;\n var end;\n var endValue = getText();\n var endLength = endValue.length;\n\n for (start = 0; start < startLength; start++) {\n if (startValue[start] !== endValue[start]) {\n break;\n }\n }\n\n var minEnd = startLength - start;\n\n for (end = 1; end <= minEnd; end++) {\n if (startValue[startLength - end] !== endValue[endLength - end]) {\n break;\n }\n }\n\n var sliceTail = end > 1 ? 1 - end : undefined;\n fallbackText = endValue.slice(start, sliceTail);\n return fallbackText;\n}\nfunction getText() {\n if ('value' in root) {\n return root.value;\n }\n\n return root.textContent;\n}\n\n/**\n * `charCode` represents the actual \"character code\" and is safe to use with\n * `String.fromCharCode`. As such, only keys that correspond to printable\n * characters produce a valid `charCode`, the only exception to this is Enter.\n * The Tab-key is considered non-printable and does not have a `charCode`,\n * presumably because it does not produce a tab-character in browsers.\n *\n * @param {object} nativeEvent Native browser event.\n * @return {number} Normalized `charCode` property.\n */\nfunction getEventCharCode(nativeEvent) {\n var charCode;\n var keyCode = nativeEvent.keyCode;\n\n if ('charCode' in nativeEvent) {\n charCode = nativeEvent.charCode; // FF does not set `charCode` for the Enter-key, check against `keyCode`.\n\n if (charCode === 0 && keyCode === 13) {\n charCode = 13;\n }\n } else {\n // IE8 does not implement `charCode`, but `keyCode` has the correct value.\n charCode = keyCode;\n } // IE and Edge (on Windows) and Chrome / Safari (on Windows and Linux)\n // report Enter as charCode 10 when ctrl is pressed.\n\n\n if (charCode === 10) {\n charCode = 13;\n } // Some non-printable keys are reported in `charCode`/`keyCode`, discard them.\n // Must not discard the (non-)printable Enter-key.\n\n\n if (charCode >= 32 || charCode === 13) {\n return charCode;\n }\n\n return 0;\n}\n\nfunction functionThatReturnsTrue() {\n return true;\n}\n\nfunction functionThatReturnsFalse() {\n return false;\n} // This is intentionally a factory so that we have different returned constructors.\n// If we had a single constructor, it would be megamorphic and engines would deopt.\n\n\nfunction createSyntheticEvent(Interface) {\n /**\n * Synthetic events are dispatched by event plugins, typically in response to a\n * top-level event delegation handler.\n *\n * These systems should generally use pooling to reduce the frequency of garbage\n * collection. The system should check `isPersistent` to determine whether the\n * event should be released into the pool after being dispatched. Users that\n * need a persisted event should invoke `persist`.\n *\n * Synthetic events (and subclasses) implement the DOM Level 3 Events API by\n * normalizing browser quirks. Subclasses do not necessarily have to implement a\n * DOM interface; custom application-specific events can also subclass this.\n */\n function SyntheticBaseEvent(reactName, reactEventType, targetInst, nativeEvent, nativeEventTarget) {\n this._reactName = reactName;\n this._targetInst = targetInst;\n this.type = reactEventType;\n this.nativeEvent = nativeEvent;\n this.target = nativeEventTarget;\n this.currentTarget = null;\n\n for (var _propName in Interface) {\n if (!Interface.hasOwnProperty(_propName)) {\n continue;\n }\n\n var normalize = Interface[_propName];\n\n if (normalize) {\n this[_propName] = normalize(nativeEvent);\n } else {\n this[_propName] = nativeEvent[_propName];\n }\n }\n\n var defaultPrevented = nativeEvent.defaultPrevented != null ? nativeEvent.defaultPrevented : nativeEvent.returnValue === false;\n\n if (defaultPrevented) {\n this.isDefaultPrevented = functionThatReturnsTrue;\n } else {\n this.isDefaultPrevented = functionThatReturnsFalse;\n }\n\n this.isPropagationStopped = functionThatReturnsFalse;\n return this;\n }\n\n _assign(SyntheticBaseEvent.prototype, {\n preventDefault: function () {\n this.defaultPrevented = true;\n var event = this.nativeEvent;\n\n if (!event) {\n return;\n }\n\n if (event.preventDefault) {\n event.preventDefault(); // $FlowFixMe - flow is not aware of `unknown` in IE\n } else if (typeof event.returnValue !== 'unknown') {\n event.returnValue = false;\n }\n\n this.isDefaultPrevented = functionThatReturnsTrue;\n },\n stopPropagation: function () {\n var event = this.nativeEvent;\n\n if (!event) {\n return;\n }\n\n if (event.stopPropagation) {\n event.stopPropagation(); // $FlowFixMe - flow is not aware of `unknown` in IE\n } else if (typeof event.cancelBubble !== 'unknown') {\n // The ChangeEventPlugin registers a \"propertychange\" event for\n // IE. This event does not support bubbling or cancelling, and\n // any references to cancelBubble throw \"Member not found\". A\n // typeof check of \"unknown\" circumvents this issue (and is also\n // IE specific).\n event.cancelBubble = true;\n }\n\n this.isPropagationStopped = functionThatReturnsTrue;\n },\n\n /**\n * We release all dispatched `SyntheticEvent`s after each event loop, adding\n * them back into the pool. This allows a way to hold onto a reference that\n * won't be added back into the pool.\n */\n persist: function () {// Modern event system doesn't use pooling.\n },\n\n /**\n * Checks if this event should be released back into the pool.\n *\n * @return {boolean} True if this should not be released, false otherwise.\n */\n isPersistent: functionThatReturnsTrue\n });\n\n return SyntheticBaseEvent;\n}\n/**\n * @interface Event\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\n\n\nvar EventInterface = {\n eventPhase: 0,\n bubbles: 0,\n cancelable: 0,\n timeStamp: function (event) {\n return event.timeStamp || Date.now();\n },\n defaultPrevented: 0,\n isTrusted: 0\n};\nvar SyntheticEvent = createSyntheticEvent(EventInterface);\n\nvar UIEventInterface = _assign({}, EventInterface, {\n view: 0,\n detail: 0\n});\n\nvar SyntheticUIEvent = createSyntheticEvent(UIEventInterface);\nvar lastMovementX;\nvar lastMovementY;\nvar lastMouseEvent;\n\nfunction updateMouseMovementPolyfillState(event) {\n if (event !== lastMouseEvent) {\n if (lastMouseEvent && event.type === 'mousemove') {\n lastMovementX = event.screenX - lastMouseEvent.screenX;\n lastMovementY = event.screenY - lastMouseEvent.screenY;\n } else {\n lastMovementX = 0;\n lastMovementY = 0;\n }\n\n lastMouseEvent = event;\n }\n}\n/**\n * @interface MouseEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\n\n\nvar MouseEventInterface = _assign({}, UIEventInterface, {\n screenX: 0,\n screenY: 0,\n clientX: 0,\n clientY: 0,\n pageX: 0,\n pageY: 0,\n ctrlKey: 0,\n shiftKey: 0,\n altKey: 0,\n metaKey: 0,\n getModifierState: getEventModifierState,\n button: 0,\n buttons: 0,\n relatedTarget: function (event) {\n if (event.relatedTarget === undefined) return event.fromElement === event.srcElement ? event.toElement : event.fromElement;\n return event.relatedTarget;\n },\n movementX: function (event) {\n if ('movementX' in event) {\n return event.movementX;\n }\n\n updateMouseMovementPolyfillState(event);\n return lastMovementX;\n },\n movementY: function (event) {\n if ('movementY' in event) {\n return event.movementY;\n } // Don't need to call updateMouseMovementPolyfillState() here\n // because it's guaranteed to have already run when movementX\n // was copied.\n\n\n return lastMovementY;\n }\n});\n\nvar SyntheticMouseEvent = createSyntheticEvent(MouseEventInterface);\n/**\n * @interface DragEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\n\nvar DragEventInterface = _assign({}, MouseEventInterface, {\n dataTransfer: 0\n});\n\nvar SyntheticDragEvent = createSyntheticEvent(DragEventInterface);\n/**\n * @interface FocusEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\n\nvar FocusEventInterface = _assign({}, UIEventInterface, {\n relatedTarget: 0\n});\n\nvar SyntheticFocusEvent = createSyntheticEvent(FocusEventInterface);\n/**\n * @interface Event\n * @see http://www.w3.org/TR/css3-animations/#AnimationEvent-interface\n * @see https://developer.mozilla.org/en-US/docs/Web/API/AnimationEvent\n */\n\nvar AnimationEventInterface = _assign({}, EventInterface, {\n animationName: 0,\n elapsedTime: 0,\n pseudoElement: 0\n});\n\nvar SyntheticAnimationEvent = createSyntheticEvent(AnimationEventInterface);\n/**\n * @interface Event\n * @see http://www.w3.org/TR/clipboard-apis/\n */\n\nvar ClipboardEventInterface = _assign({}, EventInterface, {\n clipboardData: function (event) {\n return 'clipboardData' in event ? event.clipboardData : window.clipboardData;\n }\n});\n\nvar SyntheticClipboardEvent = createSyntheticEvent(ClipboardEventInterface);\n/**\n * @interface Event\n * @see http://www.w3.org/TR/DOM-Level-3-Events/#events-compositionevents\n */\n\nvar CompositionEventInterface = _assign({}, EventInterface, {\n data: 0\n});\n\nvar SyntheticCompositionEvent = createSyntheticEvent(CompositionEventInterface);\n/**\n * @interface Event\n * @see http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105\n * /#events-inputevents\n */\n// Happens to share the same list for now.\n\nvar SyntheticInputEvent = SyntheticCompositionEvent;\n/**\n * Normalization of deprecated HTML5 `key` values\n * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names\n */\n\nvar normalizeKey = {\n Esc: 'Escape',\n Spacebar: ' ',\n Left: 'ArrowLeft',\n Up: 'ArrowUp',\n Right: 'ArrowRight',\n Down: 'ArrowDown',\n Del: 'Delete',\n Win: 'OS',\n Menu: 'ContextMenu',\n Apps: 'ContextMenu',\n Scroll: 'ScrollLock',\n MozPrintableKey: 'Unidentified'\n};\n/**\n * Translation from legacy `keyCode` to HTML5 `key`\n * Only special keys supported, all others depend on keyboard layout or browser\n * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names\n */\n\nvar translateToKey = {\n '8': 'Backspace',\n '9': 'Tab',\n '12': 'Clear',\n '13': 'Enter',\n '16': 'Shift',\n '17': 'Control',\n '18': 'Alt',\n '19': 'Pause',\n '20': 'CapsLock',\n '27': 'Escape',\n '32': ' ',\n '33': 'PageUp',\n '34': 'PageDown',\n '35': 'End',\n '36': 'Home',\n '37': 'ArrowLeft',\n '38': 'ArrowUp',\n '39': 'ArrowRight',\n '40': 'ArrowDown',\n '45': 'Insert',\n '46': 'Delete',\n '112': 'F1',\n '113': 'F2',\n '114': 'F3',\n '115': 'F4',\n '116': 'F5',\n '117': 'F6',\n '118': 'F7',\n '119': 'F8',\n '120': 'F9',\n '121': 'F10',\n '122': 'F11',\n '123': 'F12',\n '144': 'NumLock',\n '145': 'ScrollLock',\n '224': 'Meta'\n};\n/**\n * @param {object} nativeEvent Native browser event.\n * @return {string} Normalized `key` property.\n */\n\nfunction getEventKey(nativeEvent) {\n if (nativeEvent.key) {\n // Normalize inconsistent values reported by browsers due to\n // implementations of a working draft specification.\n // FireFox implements `key` but returns `MozPrintableKey` for all\n // printable characters (normalized to `Unidentified`), ignore it.\n var key = normalizeKey[nativeEvent.key] || nativeEvent.key;\n\n if (key !== 'Unidentified') {\n return key;\n }\n } // Browser does not implement `key`, polyfill as much of it as we can.\n\n\n if (nativeEvent.type === 'keypress') {\n var charCode = getEventCharCode(nativeEvent); // The enter-key is technically both printable and non-printable and can\n // thus be captured by `keypress`, no other non-printable key should.\n\n return charCode === 13 ? 'Enter' : String.fromCharCode(charCode);\n }\n\n if (nativeEvent.type === 'keydown' || nativeEvent.type === 'keyup') {\n // While user keyboard layout determines the actual meaning of each\n // `keyCode` value, almost all function keys have a universal value.\n return translateToKey[nativeEvent.keyCode] || 'Unidentified';\n }\n\n return '';\n}\n/**\n * Translation from modifier key to the associated property in the event.\n * @see http://www.w3.org/TR/DOM-Level-3-Events/#keys-Modifiers\n */\n\n\nvar modifierKeyToProp = {\n Alt: 'altKey',\n Control: 'ctrlKey',\n Meta: 'metaKey',\n Shift: 'shiftKey'\n}; // Older browsers (Safari <= 10, iOS Safari <= 10.2) do not support\n// getModifierState. If getModifierState is not supported, we map it to a set of\n// modifier keys exposed by the event. In this case, Lock-keys are not supported.\n\nfunction modifierStateGetter(keyArg) {\n var syntheticEvent = this;\n var nativeEvent = syntheticEvent.nativeEvent;\n\n if (nativeEvent.getModifierState) {\n return nativeEvent.getModifierState(keyArg);\n }\n\n var keyProp = modifierKeyToProp[keyArg];\n return keyProp ? !!nativeEvent[keyProp] : false;\n}\n\nfunction getEventModifierState(nativeEvent) {\n return modifierStateGetter;\n}\n/**\n * @interface KeyboardEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\n\n\nvar KeyboardEventInterface = _assign({}, UIEventInterface, {\n key: getEventKey,\n code: 0,\n location: 0,\n ctrlKey: 0,\n shiftKey: 0,\n altKey: 0,\n metaKey: 0,\n repeat: 0,\n locale: 0,\n getModifierState: getEventModifierState,\n // Legacy Interface\n charCode: function (event) {\n // `charCode` is the result of a KeyPress event and represents the value of\n // the actual printable character.\n // KeyPress is deprecated, but its replacement is not yet final and not\n // implemented in any major browser. Only KeyPress has charCode.\n if (event.type === 'keypress') {\n return getEventCharCode(event);\n }\n\n return 0;\n },\n keyCode: function (event) {\n // `keyCode` is the result of a KeyDown/Up event and represents the value of\n // physical keyboard key.\n // The actual meaning of the value depends on the users' keyboard layout\n // which cannot be detected. Assuming that it is a US keyboard layout\n // provides a surprisingly accurate mapping for US and European users.\n // Due to this, it is left to the user to implement at this time.\n if (event.type === 'keydown' || event.type === 'keyup') {\n return event.keyCode;\n }\n\n return 0;\n },\n which: function (event) {\n // `which` is an alias for either `keyCode` or `charCode` depending on the\n // type of the event.\n if (event.type === 'keypress') {\n return getEventCharCode(event);\n }\n\n if (event.type === 'keydown' || event.type === 'keyup') {\n return event.keyCode;\n }\n\n return 0;\n }\n});\n\nvar SyntheticKeyboardEvent = createSyntheticEvent(KeyboardEventInterface);\n/**\n * @interface PointerEvent\n * @see http://www.w3.org/TR/pointerevents/\n */\n\nvar PointerEventInterface = _assign({}, MouseEventInterface, {\n pointerId: 0,\n width: 0,\n height: 0,\n pressure: 0,\n tangentialPressure: 0,\n tiltX: 0,\n tiltY: 0,\n twist: 0,\n pointerType: 0,\n isPrimary: 0\n});\n\nvar SyntheticPointerEvent = createSyntheticEvent(PointerEventInterface);\n/**\n * @interface TouchEvent\n * @see http://www.w3.org/TR/touch-events/\n */\n\nvar TouchEventInterface = _assign({}, UIEventInterface, {\n touches: 0,\n targetTouches: 0,\n changedTouches: 0,\n altKey: 0,\n metaKey: 0,\n ctrlKey: 0,\n shiftKey: 0,\n getModifierState: getEventModifierState\n});\n\nvar SyntheticTouchEvent = createSyntheticEvent(TouchEventInterface);\n/**\n * @interface Event\n * @see http://www.w3.org/TR/2009/WD-css3-transitions-20090320/#transition-events-\n * @see https://developer.mozilla.org/en-US/docs/Web/API/TransitionEvent\n */\n\nvar TransitionEventInterface = _assign({}, EventInterface, {\n propertyName: 0,\n elapsedTime: 0,\n pseudoElement: 0\n});\n\nvar SyntheticTransitionEvent = createSyntheticEvent(TransitionEventInterface);\n/**\n * @interface WheelEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\n\nvar WheelEventInterface = _assign({}, MouseEventInterface, {\n deltaX: function (event) {\n return 'deltaX' in event ? event.deltaX : // Fallback to `wheelDeltaX` for Webkit and normalize (right is positive).\n 'wheelDeltaX' in event ? -event.wheelDeltaX : 0;\n },\n deltaY: function (event) {\n return 'deltaY' in event ? event.deltaY : // Fallback to `wheelDeltaY` for Webkit and normalize (down is positive).\n 'wheelDeltaY' in event ? -event.wheelDeltaY : // Fallback to `wheelDelta` for IE<9 and normalize (down is positive).\n 'wheelDelta' in event ? -event.wheelDelta : 0;\n },\n deltaZ: 0,\n // Browsers without \"deltaMode\" is reporting in raw wheel delta where one\n // notch on the scroll is always +/- 120, roughly equivalent to pixels.\n // A good approximation of DOM_DELTA_LINE (1) is 5% of viewport size or\n // ~40 pixels, for DOM_DELTA_SCREEN (2) it is 87.5% of viewport size.\n deltaMode: 0\n});\n\nvar SyntheticWheelEvent = createSyntheticEvent(WheelEventInterface);\n\nvar END_KEYCODES = [9, 13, 27, 32]; // Tab, Return, Esc, Space\n\nvar START_KEYCODE = 229;\nvar canUseCompositionEvent = canUseDOM && 'CompositionEvent' in window;\nvar documentMode = null;\n\nif (canUseDOM && 'documentMode' in document) {\n documentMode = document.documentMode;\n} // Webkit offers a very useful `textInput` event that can be used to\n// directly represent `beforeInput`. The IE `textinput` event is not as\n// useful, so we don't use it.\n\n\nvar canUseTextInputEvent = canUseDOM && 'TextEvent' in window && !documentMode; // In IE9+, we have access to composition events, but the data supplied\n// by the native compositionend event may be incorrect. Japanese ideographic\n// spaces, for instance (\\u3000) are not recorded correctly.\n\nvar useFallbackCompositionData = canUseDOM && (!canUseCompositionEvent || documentMode && documentMode > 8 && documentMode <= 11);\nvar SPACEBAR_CODE = 32;\nvar SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE);\n\nfunction registerEvents() {\n registerTwoPhaseEvent('onBeforeInput', ['compositionend', 'keypress', 'textInput', 'paste']);\n registerTwoPhaseEvent('onCompositionEnd', ['compositionend', 'focusout', 'keydown', 'keypress', 'keyup', 'mousedown']);\n registerTwoPhaseEvent('onCompositionStart', ['compositionstart', 'focusout', 'keydown', 'keypress', 'keyup', 'mousedown']);\n registerTwoPhaseEvent('onCompositionUpdate', ['compositionupdate', 'focusout', 'keydown', 'keypress', 'keyup', 'mousedown']);\n} // Track whether we've ever handled a keypress on the space key.\n\n\nvar hasSpaceKeypress = false;\n/**\n * Return whether a native keypress event is assumed to be a command.\n * This is required because Firefox fires `keypress` events for key commands\n * (cut, copy, select-all, etc.) even though no character is inserted.\n */\n\nfunction isKeypressCommand(nativeEvent) {\n return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) && // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n !(nativeEvent.ctrlKey && nativeEvent.altKey);\n}\n/**\n * Translate native top level events into event types.\n */\n\n\nfunction getCompositionEventType(domEventName) {\n switch (domEventName) {\n case 'compositionstart':\n return 'onCompositionStart';\n\n case 'compositionend':\n return 'onCompositionEnd';\n\n case 'compositionupdate':\n return 'onCompositionUpdate';\n }\n}\n/**\n * Does our fallback best-guess model think this event signifies that\n * composition has begun?\n */\n\n\nfunction isFallbackCompositionStart(domEventName, nativeEvent) {\n return domEventName === 'keydown' && nativeEvent.keyCode === START_KEYCODE;\n}\n/**\n * Does our fallback mode think that this event is the end of composition?\n */\n\n\nfunction isFallbackCompositionEnd(domEventName, nativeEvent) {\n switch (domEventName) {\n case 'keyup':\n // Command keys insert or clear IME input.\n return END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1;\n\n case 'keydown':\n // Expect IME keyCode on each keydown. If we get any other\n // code we must have exited earlier.\n return nativeEvent.keyCode !== START_KEYCODE;\n\n case 'keypress':\n case 'mousedown':\n case 'focusout':\n // Events are not possible without cancelling IME.\n return true;\n\n default:\n return false;\n }\n}\n/**\n * Google Input Tools provides composition data via a CustomEvent,\n * with the `data` property populated in the `detail` object. If this\n * is available on the event object, use it. If not, this is a plain\n * composition event and we have nothing special to extract.\n *\n * @param {object} nativeEvent\n * @return {?string}\n */\n\n\nfunction getDataFromCustomEvent(nativeEvent) {\n var detail = nativeEvent.detail;\n\n if (typeof detail === 'object' && 'data' in detail) {\n return detail.data;\n }\n\n return null;\n}\n/**\n * Check if a composition event was triggered by Korean IME.\n * Our fallback mode does not work well with IE's Korean IME,\n * so just use native composition events when Korean IME is used.\n * Although CompositionEvent.locale property is deprecated,\n * it is available in IE, where our fallback mode is enabled.\n *\n * @param {object} nativeEvent\n * @return {boolean}\n */\n\n\nfunction isUsingKoreanIME(nativeEvent) {\n return nativeEvent.locale === 'ko';\n} // Track the current IME composition status, if any.\n\n\nvar isComposing = false;\n/**\n * @return {?object} A SyntheticCompositionEvent.\n */\n\nfunction extractCompositionEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget) {\n var eventType;\n var fallbackData;\n\n if (canUseCompositionEvent) {\n eventType = getCompositionEventType(domEventName);\n } else if (!isComposing) {\n if (isFallbackCompositionStart(domEventName, nativeEvent)) {\n eventType = 'onCompositionStart';\n }\n } else if (isFallbackCompositionEnd(domEventName, nativeEvent)) {\n eventType = 'onCompositionEnd';\n }\n\n if (!eventType) {\n return null;\n }\n\n if (useFallbackCompositionData && !isUsingKoreanIME(nativeEvent)) {\n // The current composition is stored statically and must not be\n // overwritten while composition continues.\n if (!isComposing && eventType === 'onCompositionStart') {\n isComposing = initialize(nativeEventTarget);\n } else if (eventType === 'onCompositionEnd') {\n if (isComposing) {\n fallbackData = getData();\n }\n }\n }\n\n var listeners = accumulateTwoPhaseListeners(targetInst, eventType);\n\n if (listeners.length > 0) {\n var event = new SyntheticCompositionEvent(eventType, domEventName, null, nativeEvent, nativeEventTarget);\n dispatchQueue.push({\n event: event,\n listeners: listeners\n });\n\n if (fallbackData) {\n // Inject data generated from fallback path into the synthetic event.\n // This matches the property of native CompositionEventInterface.\n event.data = fallbackData;\n } else {\n var customData = getDataFromCustomEvent(nativeEvent);\n\n if (customData !== null) {\n event.data = customData;\n }\n }\n }\n}\n\nfunction getNativeBeforeInputChars(domEventName, nativeEvent) {\n switch (domEventName) {\n case 'compositionend':\n return getDataFromCustomEvent(nativeEvent);\n\n case 'keypress':\n /**\n * If native `textInput` events are available, our goal is to make\n * use of them. However, there is a special case: the spacebar key.\n * In Webkit, preventing default on a spacebar `textInput` event\n * cancels character insertion, but it *also* causes the browser\n * to fall back to its default spacebar behavior of scrolling the\n * page.\n *\n * Tracking at:\n * https://code.google.com/p/chromium/issues/detail?id=355103\n *\n * To avoid this issue, use the keypress event as if no `textInput`\n * event is available.\n */\n var which = nativeEvent.which;\n\n if (which !== SPACEBAR_CODE) {\n return null;\n }\n\n hasSpaceKeypress = true;\n return SPACEBAR_CHAR;\n\n case 'textInput':\n // Record the characters to be added to the DOM.\n var chars = nativeEvent.data; // If it's a spacebar character, assume that we have already handled\n // it at the keypress level and bail immediately. Android Chrome\n // doesn't give us keycodes, so we need to ignore it.\n\n if (chars === SPACEBAR_CHAR && hasSpaceKeypress) {\n return null;\n }\n\n return chars;\n\n default:\n // For other native event types, do nothing.\n return null;\n }\n}\n/**\n * For browsers that do not provide the `textInput` event, extract the\n * appropriate string to use for SyntheticInputEvent.\n */\n\n\nfunction getFallbackBeforeInputChars(domEventName, nativeEvent) {\n // If we are currently composing (IME) and using a fallback to do so,\n // try to extract the composed characters from the fallback object.\n // If composition event is available, we extract a string only at\n // compositionevent, otherwise extract it at fallback events.\n if (isComposing) {\n if (domEventName === 'compositionend' || !canUseCompositionEvent && isFallbackCompositionEnd(domEventName, nativeEvent)) {\n var chars = getData();\n reset();\n isComposing = false;\n return chars;\n }\n\n return null;\n }\n\n switch (domEventName) {\n case 'paste':\n // If a paste event occurs after a keypress, throw out the input\n // chars. Paste events should not lead to BeforeInput events.\n return null;\n\n case 'keypress':\n /**\n * As of v27, Firefox may fire keypress events even when no character\n * will be inserted. A few possibilities:\n *\n * - `which` is `0`. Arrow keys, Esc key, etc.\n *\n * - `which` is the pressed key code, but no char is available.\n * Ex: 'AltGr + d` in Polish. There is no modified character for\n * this key combination and no character is inserted into the\n * document, but FF fires the keypress for char code `100` anyway.\n * No `input` event will occur.\n *\n * - `which` is the pressed key code, but a command combination is\n * being used. Ex: `Cmd+C`. No character is inserted, and no\n * `input` event will occur.\n */\n if (!isKeypressCommand(nativeEvent)) {\n // IE fires the `keypress` event when a user types an emoji via\n // Touch keyboard of Windows. In such a case, the `char` property\n // holds an emoji character like `\\uD83D\\uDE0A`. Because its length\n // is 2, the property `which` does not represent an emoji correctly.\n // In such a case, we directly return the `char` property instead of\n // using `which`.\n if (nativeEvent.char && nativeEvent.char.length > 1) {\n return nativeEvent.char;\n } else if (nativeEvent.which) {\n return String.fromCharCode(nativeEvent.which);\n }\n }\n\n return null;\n\n case 'compositionend':\n return useFallbackCompositionData && !isUsingKoreanIME(nativeEvent) ? null : nativeEvent.data;\n\n default:\n return null;\n }\n}\n/**\n * Extract a SyntheticInputEvent for `beforeInput`, based on either native\n * `textInput` or fallback behavior.\n *\n * @return {?object} A SyntheticInputEvent.\n */\n\n\nfunction extractBeforeInputEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget) {\n var chars;\n\n if (canUseTextInputEvent) {\n chars = getNativeBeforeInputChars(domEventName, nativeEvent);\n } else {\n chars = getFallbackBeforeInputChars(domEventName, nativeEvent);\n } // If no characters are being inserted, no BeforeInput event should\n // be fired.\n\n\n if (!chars) {\n return null;\n }\n\n var listeners = accumulateTwoPhaseListeners(targetInst, 'onBeforeInput');\n\n if (listeners.length > 0) {\n var event = new SyntheticInputEvent('onBeforeInput', 'beforeinput', null, nativeEvent, nativeEventTarget);\n dispatchQueue.push({\n event: event,\n listeners: listeners\n });\n event.data = chars;\n }\n}\n/**\n * Create an `onBeforeInput` event to match\n * http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105/#events-inputevents.\n *\n * This event plugin is based on the native `textInput` event\n * available in Chrome, Safari, Opera, and IE. This event fires after\n * `onKeyPress` and `onCompositionEnd`, but before `onInput`.\n *\n * `beforeInput` is spec'd but not implemented in any browsers, and\n * the `input` event does not provide any useful information about what has\n * actually been added, contrary to the spec. Thus, `textInput` is the best\n * available event to identify the characters that have actually been inserted\n * into the target node.\n *\n * This plugin is also responsible for emitting `composition` events, thus\n * allowing us to share composition fallback code for both `beforeInput` and\n * `composition` event types.\n */\n\n\nfunction extractEvents(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {\n extractCompositionEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);\n extractBeforeInputEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);\n}\n\n/**\n * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary\n */\nvar supportedInputTypes = {\n color: true,\n date: true,\n datetime: true,\n 'datetime-local': true,\n email: true,\n month: true,\n number: true,\n password: true,\n range: true,\n search: true,\n tel: true,\n text: true,\n time: true,\n url: true,\n week: true\n};\n\nfunction isTextInputElement(elem) {\n var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();\n\n if (nodeName === 'input') {\n return !!supportedInputTypes[elem.type];\n }\n\n if (nodeName === 'textarea') {\n return true;\n }\n\n return false;\n}\n\n/**\n * Checks if an event is supported in the current execution environment.\n *\n * NOTE: This will not work correctly for non-generic events such as `change`,\n * `reset`, `load`, `error`, and `select`.\n *\n * Borrows from Modernizr.\n *\n * @param {string} eventNameSuffix Event name, e.g. \"click\".\n * @return {boolean} True if the event is supported.\n * @internal\n * @license Modernizr 3.0.0pre (Custom Build) | MIT\n */\n\nfunction isEventSupported(eventNameSuffix) {\n if (!canUseDOM) {\n return false;\n }\n\n var eventName = 'on' + eventNameSuffix;\n var isSupported = (eventName in document);\n\n if (!isSupported) {\n var element = document.createElement('div');\n element.setAttribute(eventName, 'return;');\n isSupported = typeof element[eventName] === 'function';\n }\n\n return isSupported;\n}\n\nfunction registerEvents$1() {\n registerTwoPhaseEvent('onChange', ['change', 'click', 'focusin', 'focusout', 'input', 'keydown', 'keyup', 'selectionchange']);\n}\n\nfunction createAndAccumulateChangeEvent(dispatchQueue, inst, nativeEvent, target) {\n // Flag this event loop as needing state restore.\n enqueueStateRestore(target);\n var listeners = accumulateTwoPhaseListeners(inst, 'onChange');\n\n if (listeners.length > 0) {\n var event = new SyntheticEvent('onChange', 'change', null, nativeEvent, target);\n dispatchQueue.push({\n event: event,\n listeners: listeners\n });\n }\n}\n/**\n * For IE shims\n */\n\n\nvar activeElement = null;\nvar activeElementInst = null;\n/**\n * SECTION: handle `change` event\n */\n\nfunction shouldUseChangeEvent(elem) {\n var nodeName = elem.nodeName && elem.nodeName.toLowerCase();\n return nodeName === 'select' || nodeName === 'input' && elem.type === 'file';\n}\n\nfunction manualDispatchChangeEvent(nativeEvent) {\n var dispatchQueue = [];\n createAndAccumulateChangeEvent(dispatchQueue, activeElementInst, nativeEvent, getEventTarget(nativeEvent)); // If change and propertychange bubbled, we'd just bind to it like all the\n // other events and have it go through ReactBrowserEventEmitter. Since it\n // doesn't, we manually listen for the events and so we have to enqueue and\n // process the abstract event manually.\n //\n // Batching is necessary here in order to ensure that all event handlers run\n // before the next rerender (including event handlers attached to ancestor\n // elements instead of directly on the input). Without this, controlled\n // components don't work properly in conjunction with event bubbling because\n // the component is rerendered and the value reverted before all the event\n // handlers can run. See https://github.com/facebook/react/issues/708.\n\n batchedUpdates(runEventInBatch, dispatchQueue);\n}\n\nfunction runEventInBatch(dispatchQueue) {\n processDispatchQueue(dispatchQueue, 0);\n}\n\nfunction getInstIfValueChanged(targetInst) {\n var targetNode = getNodeFromInstance(targetInst);\n\n if (updateValueIfChanged(targetNode)) {\n return targetInst;\n }\n}\n\nfunction getTargetInstForChangeEvent(domEventName, targetInst) {\n if (domEventName === 'change') {\n return targetInst;\n }\n}\n/**\n * SECTION: handle `input` event\n */\n\n\nvar isInputEventSupported = false;\n\nif (canUseDOM) {\n // IE9 claims to support the input event but fails to trigger it when\n // deleting text, so we ignore its input events.\n isInputEventSupported = isEventSupported('input') && (!document.documentMode || document.documentMode > 9);\n}\n/**\n * (For IE <=9) Starts tracking propertychange events on the passed-in element\n * and override the value property so that we can distinguish user events from\n * value changes in JS.\n */\n\n\nfunction startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}\n/**\n * (For IE <=9) Removes the event listeners from the currently-tracked element,\n * if any exists.\n */\n\n\nfunction stopWatchingForValueChange() {\n if (!activeElement) {\n return;\n }\n\n activeElement.detachEvent('onpropertychange', handlePropertyChange);\n activeElement = null;\n activeElementInst = null;\n}\n/**\n * (For IE <=9) Handles a propertychange event, sending a `change` event if\n * the value of the active element has changed.\n */\n\n\nfunction handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n}\n\nfunction handleEventsForInputEventPolyfill(domEventName, target, targetInst) {\n if (domEventName === 'focusin') {\n // In IE9, propertychange fires for most input events but is buggy and\n // doesn't fire when text is deleted, but conveniently, selectionchange\n // appears to fire in all of the remaining cases so we catch those and\n // forward the event if the value has changed\n // In either case, we don't want to call the event handler if the value\n // is changed from JS so we redefine a setter for `.value` that updates\n // our activeElementValue variable, allowing us to ignore those changes\n //\n // stopWatching() should be a noop here but we call it just in case we\n // missed a blur event somehow.\n stopWatchingForValueChange();\n startWatchingForValueChange(target, targetInst);\n } else if (domEventName === 'focusout') {\n stopWatchingForValueChange();\n }\n} // For IE8 and IE9.\n\n\nfunction getTargetInstForInputEventPolyfill(domEventName, targetInst) {\n if (domEventName === 'selectionchange' || domEventName === 'keyup' || domEventName === 'keydown') {\n // On the selectionchange event, the target is just document which isn't\n // helpful for us so just check activeElement instead.\n //\n // 99% of the time, keydown and keyup aren't necessary. IE8 fails to fire\n // propertychange on the first input event after setting `value` from a\n // script and fires only keydown, keypress, keyup. Catching keyup usually\n // gets it and catching keydown lets us fire an event for the first\n // keystroke if user does a key repeat (it'll be a little delayed: right\n // before the second keystroke). Other input methods (e.g., paste) seem to\n // fire selectionchange normally.\n return getInstIfValueChanged(activeElementInst);\n }\n}\n/**\n * SECTION: handle `click` event\n */\n\n\nfunction shouldUseClickEvent(elem) {\n // Use the `click` event to detect changes to checkbox and radio inputs.\n // This approach works across all browsers, whereas `change` does not fire\n // until `blur` in IE8.\n var nodeName = elem.nodeName;\n return nodeName && nodeName.toLowerCase() === 'input' && (elem.type === 'checkbox' || elem.type === 'radio');\n}\n\nfunction getTargetInstForClickEvent(domEventName, targetInst) {\n if (domEventName === 'click') {\n return getInstIfValueChanged(targetInst);\n }\n}\n\nfunction getTargetInstForInputOrChangeEvent(domEventName, targetInst) {\n if (domEventName === 'input' || domEventName === 'change') {\n return getInstIfValueChanged(targetInst);\n }\n}\n\nfunction handleControlledInputBlur(node) {\n var state = node._wrapperState;\n\n if (!state || !state.controlled || node.type !== 'number') {\n return;\n }\n\n {\n // If controlled, assign the value attribute to the current value on blur\n setDefaultValue(node, 'number', node.value);\n }\n}\n/**\n * This plugin creates an `onChange` event that normalizes change events\n * across form elements. This event fires at a time when it's possible to\n * change the element's value without seeing a flicker.\n *\n * Supported elements are:\n * - input (see `isTextInputElement`)\n * - textarea\n * - select\n */\n\n\nfunction extractEvents$1(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {\n var targetNode = targetInst ? getNodeFromInstance(targetInst) : window;\n var getTargetInstFunc, handleEventFunc;\n\n if (shouldUseChangeEvent(targetNode)) {\n getTargetInstFunc = getTargetInstForChangeEvent;\n } else if (isTextInputElement(targetNode)) {\n if (isInputEventSupported) {\n getTargetInstFunc = getTargetInstForInputOrChangeEvent;\n } else {\n getTargetInstFunc = getTargetInstForInputEventPolyfill;\n handleEventFunc = handleEventsForInputEventPolyfill;\n }\n } else if (shouldUseClickEvent(targetNode)) {\n getTargetInstFunc = getTargetInstForClickEvent;\n }\n\n if (getTargetInstFunc) {\n var inst = getTargetInstFunc(domEventName, targetInst);\n\n if (inst) {\n createAndAccumulateChangeEvent(dispatchQueue, inst, nativeEvent, nativeEventTarget);\n return;\n }\n }\n\n if (handleEventFunc) {\n handleEventFunc(domEventName, targetNode, targetInst);\n } // When blurring, set the value attribute for number inputs\n\n\n if (domEventName === 'focusout') {\n handleControlledInputBlur(targetNode);\n }\n}\n\nfunction registerEvents$2() {\n registerDirectEvent('onMouseEnter', ['mouseout', 'mouseover']);\n registerDirectEvent('onMouseLeave', ['mouseout', 'mouseover']);\n registerDirectEvent('onPointerEnter', ['pointerout', 'pointerover']);\n registerDirectEvent('onPointerLeave', ['pointerout', 'pointerover']);\n}\n/**\n * For almost every interaction we care about, there will be both a top-level\n * `mouseover` and `mouseout` event that occurs. Only use `mouseout` so that\n * we do not extract duplicate events. However, moving the mouse into the\n * browser from outside will not fire a `mouseout` event. In this case, we use\n * the `mouseover` top-level event.\n */\n\n\nfunction extractEvents$2(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {\n var isOverEvent = domEventName === 'mouseover' || domEventName === 'pointerover';\n var isOutEvent = domEventName === 'mouseout' || domEventName === 'pointerout';\n\n if (isOverEvent && (eventSystemFlags & IS_REPLAYED) === 0) {\n // If this is an over event with a target, we might have already dispatched\n // the event in the out event of the other target. If this is replayed,\n // then it's because we couldn't dispatch against this target previously\n // so we have to do it now instead.\n var related = nativeEvent.relatedTarget || nativeEvent.fromElement;\n\n if (related) {\n // If the related node is managed by React, we can assume that we have\n // already dispatched the corresponding events during its mouseout.\n if (getClosestInstanceFromNode(related) || isContainerMarkedAsRoot(related)) {\n return;\n }\n }\n }\n\n if (!isOutEvent && !isOverEvent) {\n // Must not be a mouse or pointer in or out - ignoring.\n return;\n }\n\n var win; // TODO: why is this nullable in the types but we read from it?\n\n if (nativeEventTarget.window === nativeEventTarget) {\n // `nativeEventTarget` is probably a window object.\n win = nativeEventTarget;\n } else {\n // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8.\n var doc = nativeEventTarget.ownerDocument;\n\n if (doc) {\n win = doc.defaultView || doc.parentWindow;\n } else {\n win = window;\n }\n }\n\n var from;\n var to;\n\n if (isOutEvent) {\n var _related = nativeEvent.relatedTarget || nativeEvent.toElement;\n\n from = targetInst;\n to = _related ? getClosestInstanceFromNode(_related) : null;\n\n if (to !== null) {\n var nearestMounted = getNearestMountedFiber(to);\n\n if (to !== nearestMounted || to.tag !== HostComponent && to.tag !== HostText) {\n to = null;\n }\n }\n } else {\n // Moving to a node from outside the window.\n from = null;\n to = targetInst;\n }\n\n if (from === to) {\n // Nothing pertains to our managed components.\n return;\n }\n\n var SyntheticEventCtor = SyntheticMouseEvent;\n var leaveEventType = 'onMouseLeave';\n var enterEventType = 'onMouseEnter';\n var eventTypePrefix = 'mouse';\n\n if (domEventName === 'pointerout' || domEventName === 'pointerover') {\n SyntheticEventCtor = SyntheticPointerEvent;\n leaveEventType = 'onPointerLeave';\n enterEventType = 'onPointerEnter';\n eventTypePrefix = 'pointer';\n }\n\n var fromNode = from == null ? win : getNodeFromInstance(from);\n var toNode = to == null ? win : getNodeFromInstance(to);\n var leave = new SyntheticEventCtor(leaveEventType, eventTypePrefix + 'leave', from, nativeEvent, nativeEventTarget);\n leave.target = fromNode;\n leave.relatedTarget = toNode;\n var enter = null; // We should only process this nativeEvent if we are processing\n // the first ancestor. Next time, we will ignore the event.\n\n var nativeTargetInst = getClosestInstanceFromNode(nativeEventTarget);\n\n if (nativeTargetInst === targetInst) {\n var enterEvent = new SyntheticEventCtor(enterEventType, eventTypePrefix + 'enter', to, nativeEvent, nativeEventTarget);\n enterEvent.target = toNode;\n enterEvent.relatedTarget = fromNode;\n enter = enterEvent;\n }\n\n accumulateEnterLeaveTwoPhaseListeners(dispatchQueue, leave, enter, from, to);\n}\n\n/**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\nfunction is(x, y) {\n return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y // eslint-disable-line no-self-compare\n ;\n}\n\nvar objectIs = typeof Object.is === 'function' ? Object.is : is;\n\nvar hasOwnProperty$2 = Object.prototype.hasOwnProperty;\n/**\n * Performs equality by iterating through keys on an object and returning false\n * when any key has values which are not strictly equal between the arguments.\n * Returns true when the values of all keys are strictly equal.\n */\n\nfunction shallowEqual(objA, objB) {\n if (objectIs(objA, objB)) {\n return true;\n }\n\n if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n } // Test for A's keys different from B.\n\n\n for (var i = 0; i < keysA.length; i++) {\n if (!hasOwnProperty$2.call(objB, keysA[i]) || !objectIs(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n\n return true;\n}\n\n/**\n * Given any node return the first leaf node without children.\n *\n * @param {DOMElement|DOMTextNode} node\n * @return {DOMElement|DOMTextNode}\n */\n\nfunction getLeafNode(node) {\n while (node && node.firstChild) {\n node = node.firstChild;\n }\n\n return node;\n}\n/**\n * Get the next sibling within a container. This will walk up the\n * DOM if a node's siblings have been exhausted.\n *\n * @param {DOMElement|DOMTextNode} node\n * @return {?DOMElement|DOMTextNode}\n */\n\n\nfunction getSiblingNode(node) {\n while (node) {\n if (node.nextSibling) {\n return node.nextSibling;\n }\n\n node = node.parentNode;\n }\n}\n/**\n * Get object describing the nodes which contain characters at offset.\n *\n * @param {DOMElement|DOMTextNode} root\n * @param {number} offset\n * @return {?object}\n */\n\n\nfunction getNodeForCharacterOffset(root, offset) {\n var node = getLeafNode(root);\n var nodeStart = 0;\n var nodeEnd = 0;\n\n while (node) {\n if (node.nodeType === TEXT_NODE) {\n nodeEnd = nodeStart + node.textContent.length;\n\n if (nodeStart <= offset && nodeEnd >= offset) {\n return {\n node: node,\n offset: offset - nodeStart\n };\n }\n\n nodeStart = nodeEnd;\n }\n\n node = getLeafNode(getSiblingNode(node));\n }\n}\n\n/**\n * @param {DOMElement} outerNode\n * @return {?object}\n */\n\nfunction getOffsets(outerNode) {\n var ownerDocument = outerNode.ownerDocument;\n var win = ownerDocument && ownerDocument.defaultView || window;\n var selection = win.getSelection && win.getSelection();\n\n if (!selection || selection.rangeCount === 0) {\n return null;\n }\n\n var anchorNode = selection.anchorNode,\n anchorOffset = selection.anchorOffset,\n focusNode = selection.focusNode,\n focusOffset = selection.focusOffset; // In Firefox, anchorNode and focusNode can be \"anonymous divs\", e.g. the\n // up/down buttons on an <input type=\"number\">. Anonymous divs do not seem to\n // expose properties, triggering a \"Permission denied error\" if any of its\n // properties are accessed. The only seemingly possible way to avoid erroring\n // is to access a property that typically works for non-anonymous divs and\n // catch any error that may otherwise arise. See\n // https://bugzilla.mozilla.org/show_bug.cgi?id=208427\n\n try {\n /* eslint-disable no-unused-expressions */\n anchorNode.nodeType;\n focusNode.nodeType;\n /* eslint-enable no-unused-expressions */\n } catch (e) {\n return null;\n }\n\n return getModernOffsetsFromPoints(outerNode, anchorNode, anchorOffset, focusNode, focusOffset);\n}\n/**\n * Returns {start, end} where `start` is the character/codepoint index of\n * (anchorNode, anchorOffset) within the textContent of `outerNode`, and\n * `end` is the index of (focusNode, focusOffset).\n *\n * Returns null if you pass in garbage input but we should probably just crash.\n *\n * Exported only for testing.\n */\n\nfunction getModernOffsetsFromPoints(outerNode, anchorNode, anchorOffset, focusNode, focusOffset) {\n var length = 0;\n var start = -1;\n var end = -1;\n var indexWithinAnchor = 0;\n var indexWithinFocus = 0;\n var node = outerNode;\n var parentNode = null;\n\n outer: while (true) {\n var next = null;\n\n while (true) {\n if (node === anchorNode && (anchorOffset === 0 || node.nodeType === TEXT_NODE)) {\n start = length + anchorOffset;\n }\n\n if (node === focusNode && (focusOffset === 0 || node.nodeType === TEXT_NODE)) {\n end = length + focusOffset;\n }\n\n if (node.nodeType === TEXT_NODE) {\n length += node.nodeValue.length;\n }\n\n if ((next = node.firstChild) === null) {\n break;\n } // Moving from `node` to its first child `next`.\n\n\n parentNode = node;\n node = next;\n }\n\n while (true) {\n if (node === outerNode) {\n // If `outerNode` has children, this is always the second time visiting\n // it. If it has no children, this is still the first loop, and the only\n // valid selection is anchorNode and focusNode both equal to this node\n // and both offsets 0, in which case we will have handled above.\n break outer;\n }\n\n if (parentNode === anchorNode && ++indexWithinAnchor === anchorOffset) {\n start = length;\n }\n\n if (parentNode === focusNode && ++indexWithinFocus === focusOffset) {\n end = length;\n }\n\n if ((next = node.nextSibling) !== null) {\n break;\n }\n\n node = parentNode;\n parentNode = node.parentNode;\n } // Moving from `node` to its next sibling `next`.\n\n\n node = next;\n }\n\n if (start === -1 || end === -1) {\n // This should never happen. (Would happen if the anchor/focus nodes aren't\n // actually inside the passed-in node.)\n return null;\n }\n\n return {\n start: start,\n end: end\n };\n}\n/**\n * In modern non-IE browsers, we can support both forward and backward\n * selections.\n *\n * Note: IE10+ supports the Selection object, but it does not support\n * the `extend` method, which means that even in modern IE, it's not possible\n * to programmatically create a backward selection. Thus, for all IE\n * versions, we use the old IE API to create our selections.\n *\n * @param {DOMElement|DOMTextNode} node\n * @param {object} offsets\n */\n\nfunction setOffsets(node, offsets) {\n var doc = node.ownerDocument || document;\n var win = doc && doc.defaultView || window; // Edge fails with \"Object expected\" in some scenarios.\n // (For instance: TinyMCE editor used in a list component that supports pasting to add more,\n // fails when pasting 100+ items)\n\n if (!win.getSelection) {\n return;\n }\n\n var selection = win.getSelection();\n var length = node.textContent.length;\n var start = Math.min(offsets.start, length);\n var end = offsets.end === undefined ? start : Math.min(offsets.end, length); // IE 11 uses modern selection, but doesn't support the extend method.\n // Flip backward selections, so we can set with a single range.\n\n if (!selection.extend && start > end) {\n var temp = end;\n end = start;\n start = temp;\n }\n\n var startMarker = getNodeForCharacterOffset(node, start);\n var endMarker = getNodeForCharacterOffset(node, end);\n\n if (startMarker && endMarker) {\n if (selection.rangeCount === 1 && selection.anchorNode === startMarker.node && selection.anchorOffset === startMarker.offset && selection.focusNode === endMarker.node && selection.focusOffset === endMarker.offset) {\n return;\n }\n\n var range = doc.createRange();\n range.setStart(startMarker.node, startMarker.offset);\n selection.removeAllRanges();\n\n if (start > end) {\n selection.addRange(range);\n selection.extend(endMarker.node, endMarker.offset);\n } else {\n range.setEnd(endMarker.node, endMarker.offset);\n selection.addRange(range);\n }\n }\n}\n\nfunction isTextNode(node) {\n return node && node.nodeType === TEXT_NODE;\n}\n\nfunction containsNode(outerNode, innerNode) {\n if (!outerNode || !innerNode) {\n return false;\n } else if (outerNode === innerNode) {\n return true;\n } else if (isTextNode(outerNode)) {\n return false;\n } else if (isTextNode(innerNode)) {\n return containsNode(outerNode, innerNode.parentNode);\n } else if ('contains' in outerNode) {\n return outerNode.contains(innerNode);\n } else if (outerNode.compareDocumentPosition) {\n return !!(outerNode.compareDocumentPosition(innerNode) & 16);\n } else {\n return false;\n }\n}\n\nfunction isInDocument(node) {\n return node && node.ownerDocument && containsNode(node.ownerDocument.documentElement, node);\n}\n\nfunction isSameOriginFrame(iframe) {\n try {\n // Accessing the contentDocument of a HTMLIframeElement can cause the browser\n // to throw, e.g. if it has a cross-origin src attribute.\n // Safari will show an error in the console when the access results in \"Blocked a frame with origin\". e.g:\n // iframe.contentDocument.defaultView;\n // A safety way is to access one of the cross origin properties: Window or Location\n // Which might result in \"SecurityError\" DOM Exception and it is compatible to Safari.\n // https://html.spec.whatwg.org/multipage/browsers.html#integration-with-idl\n return typeof iframe.contentWindow.location.href === 'string';\n } catch (err) {\n return false;\n }\n}\n\nfunction getActiveElementDeep() {\n var win = window;\n var element = getActiveElement();\n\n while (element instanceof win.HTMLIFrameElement) {\n if (isSameOriginFrame(element)) {\n win = element.contentWindow;\n } else {\n return element;\n }\n\n element = getActiveElement(win.document);\n }\n\n return element;\n}\n/**\n * @ReactInputSelection: React input selection module. Based on Selection.js,\n * but modified to be suitable for react and has a couple of bug fixes (doesn't\n * assume buttons have range selections allowed).\n * Input selection module for React.\n */\n\n/**\n * @hasSelectionCapabilities: we get the element types that support selection\n * from https://html.spec.whatwg.org/#do-not-apply, looking at `selectionStart`\n * and `selectionEnd` rows.\n */\n\n\nfunction hasSelectionCapabilities(elem) {\n var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();\n return nodeName && (nodeName === 'input' && (elem.type === 'text' || elem.type === 'search' || elem.type === 'tel' || elem.type === 'url' || elem.type === 'password') || nodeName === 'textarea' || elem.contentEditable === 'true');\n}\nfunction getSelectionInformation() {\n var focusedElem = getActiveElementDeep();\n return {\n focusedElem: focusedElem,\n selectionRange: hasSelectionCapabilities(focusedElem) ? getSelection(focusedElem) : null\n };\n}\n/**\n * @restoreSelection: If any selection information was potentially lost,\n * restore it. This is useful when performing operations that could remove dom\n * nodes and place them back in, resulting in focus being lost.\n */\n\nfunction restoreSelection(priorSelectionInformation) {\n var curFocusedElem = getActiveElementDeep();\n var priorFocusedElem = priorSelectionInformation.focusedElem;\n var priorSelectionRange = priorSelectionInformation.selectionRange;\n\n if (curFocusedElem !== priorFocusedElem && isInDocument(priorFocusedElem)) {\n if (priorSelectionRange !== null && hasSelectionCapabilities(priorFocusedElem)) {\n setSelection(priorFocusedElem, priorSelectionRange);\n } // Focusing a node can change the scroll position, which is undesirable\n\n\n var ancestors = [];\n var ancestor = priorFocusedElem;\n\n while (ancestor = ancestor.parentNode) {\n if (ancestor.nodeType === ELEMENT_NODE) {\n ancestors.push({\n element: ancestor,\n left: ancestor.scrollLeft,\n top: ancestor.scrollTop\n });\n }\n }\n\n if (typeof priorFocusedElem.focus === 'function') {\n priorFocusedElem.focus();\n }\n\n for (var i = 0; i < ancestors.length; i++) {\n var info = ancestors[i];\n info.element.scrollLeft = info.left;\n info.element.scrollTop = info.top;\n }\n }\n}\n/**\n * @getSelection: Gets the selection bounds of a focused textarea, input or\n * contentEditable node.\n * -@input: Look up selection bounds of this input\n * -@return {start: selectionStart, end: selectionEnd}\n */\n\nfunction getSelection(input) {\n var selection;\n\n if ('selectionStart' in input) {\n // Modern browser with input or textarea.\n selection = {\n start: input.selectionStart,\n end: input.selectionEnd\n };\n } else {\n // Content editable or old IE textarea.\n selection = getOffsets(input);\n }\n\n return selection || {\n start: 0,\n end: 0\n };\n}\n/**\n * @setSelection: Sets the selection bounds of a textarea or input and focuses\n * the input.\n * -@input Set selection bounds of this input or textarea\n * -@offsets Object of same form that is returned from get*\n */\n\nfunction setSelection(input, offsets) {\n var start = offsets.start;\n var end = offsets.end;\n\n if (end === undefined) {\n end = start;\n }\n\n if ('selectionStart' in input) {\n input.selectionStart = start;\n input.selectionEnd = Math.min(end, input.value.length);\n } else {\n setOffsets(input, offsets);\n }\n}\n\nvar skipSelectionChangeEvent = canUseDOM && 'documentMode' in document && document.documentMode <= 11;\n\nfunction registerEvents$3() {\n registerTwoPhaseEvent('onSelect', ['focusout', 'contextmenu', 'dragend', 'focusin', 'keydown', 'keyup', 'mousedown', 'mouseup', 'selectionchange']);\n}\n\nvar activeElement$1 = null;\nvar activeElementInst$1 = null;\nvar lastSelection = null;\nvar mouseDown = false;\n/**\n * Get an object which is a unique representation of the current selection.\n *\n * The return value will not be consistent across nodes or browsers, but\n * two identical selections on the same node will return identical objects.\n */\n\nfunction getSelection$1(node) {\n if ('selectionStart' in node && hasSelectionCapabilities(node)) {\n return {\n start: node.selectionStart,\n end: node.selectionEnd\n };\n } else {\n var win = node.ownerDocument && node.ownerDocument.defaultView || window;\n var selection = win.getSelection();\n return {\n anchorNode: selection.anchorNode,\n anchorOffset: selection.anchorOffset,\n focusNode: selection.focusNode,\n focusOffset: selection.focusOffset\n };\n }\n}\n/**\n * Get document associated with the event target.\n */\n\n\nfunction getEventTargetDocument(eventTarget) {\n return eventTarget.window === eventTarget ? eventTarget.document : eventTarget.nodeType === DOCUMENT_NODE ? eventTarget : eventTarget.ownerDocument;\n}\n/**\n * Poll selection to see whether it's changed.\n *\n * @param {object} nativeEvent\n * @param {object} nativeEventTarget\n * @return {?SyntheticEvent}\n */\n\n\nfunction constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget) {\n // Ensure we have the right element, and that the user is not dragging a\n // selection (this matches native `select` event behavior). In HTML5, select\n // fires only on input and textarea thus if there's no focused element we\n // won't dispatch.\n var doc = getEventTargetDocument(nativeEventTarget);\n\n if (mouseDown || activeElement$1 == null || activeElement$1 !== getActiveElement(doc)) {\n return;\n } // Only fire when selection has actually changed.\n\n\n var currentSelection = getSelection$1(activeElement$1);\n\n if (!lastSelection || !shallowEqual(lastSelection, currentSelection)) {\n lastSelection = currentSelection;\n var listeners = accumulateTwoPhaseListeners(activeElementInst$1, 'onSelect');\n\n if (listeners.length > 0) {\n var event = new SyntheticEvent('onSelect', 'select', null, nativeEvent, nativeEventTarget);\n dispatchQueue.push({\n event: event,\n listeners: listeners\n });\n event.target = activeElement$1;\n }\n }\n}\n/**\n * This plugin creates an `onSelect` event that normalizes select events\n * across form elements.\n *\n * Supported elements are:\n * - input (see `isTextInputElement`)\n * - textarea\n * - contentEditable\n *\n * This differs from native browser implementations in the following ways:\n * - Fires on contentEditable fields as well as inputs.\n * - Fires for collapsed selection.\n * - Fires after user input.\n */\n\n\nfunction extractEvents$3(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {\n\n var targetNode = targetInst ? getNodeFromInstance(targetInst) : window;\n\n switch (domEventName) {\n // Track the input node that has focus.\n case 'focusin':\n if (isTextInputElement(targetNode) || targetNode.contentEditable === 'true') {\n activeElement$1 = targetNode;\n activeElementInst$1 = targetInst;\n lastSelection = null;\n }\n\n break;\n\n case 'focusout':\n activeElement$1 = null;\n activeElementInst$1 = null;\n lastSelection = null;\n break;\n // Don't fire the event while the user is dragging. This matches the\n // semantics of the native select event.\n\n case 'mousedown':\n mouseDown = true;\n break;\n\n case 'contextmenu':\n case 'mouseup':\n case 'dragend':\n mouseDown = false;\n constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget);\n break;\n // Chrome and IE fire non-standard event when selection is changed (and\n // sometimes when it hasn't). IE's event fires out of order with respect\n // to key and input events on deletion, so we discard it.\n //\n // Firefox doesn't support selectionchange, so check selection status\n // after each key entry. The selection changes after keydown and before\n // keyup, but we check on keydown as well in the case of holding down a\n // key, when multiple keydown events are fired but only one keyup is.\n // This is also our approach for IE handling, for the reason above.\n\n case 'selectionchange':\n if (skipSelectionChangeEvent) {\n break;\n }\n\n // falls through\n\n case 'keydown':\n case 'keyup':\n constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget);\n }\n}\n\nfunction extractEvents$4(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {\n var reactName = topLevelEventsToReactNames.get(domEventName);\n\n if (reactName === undefined) {\n return;\n }\n\n var SyntheticEventCtor = SyntheticEvent;\n var reactEventType = domEventName;\n\n switch (domEventName) {\n case 'keypress':\n // Firefox creates a keypress event for function keys too. This removes\n // the unwanted keypress events. Enter is however both printable and\n // non-printable. One would expect Tab to be as well (but it isn't).\n if (getEventCharCode(nativeEvent) === 0) {\n return;\n }\n\n /* falls through */\n\n case 'keydown':\n case 'keyup':\n SyntheticEventCtor = SyntheticKeyboardEvent;\n break;\n\n case 'focusin':\n reactEventType = 'focus';\n SyntheticEventCtor = SyntheticFocusEvent;\n break;\n\n case 'focusout':\n reactEventType = 'blur';\n SyntheticEventCtor = SyntheticFocusEvent;\n break;\n\n case 'beforeblur':\n case 'afterblur':\n SyntheticEventCtor = SyntheticFocusEvent;\n break;\n\n case 'click':\n // Firefox creates a click event on right mouse clicks. This removes the\n // unwanted click events.\n if (nativeEvent.button === 2) {\n return;\n }\n\n /* falls through */\n\n case 'auxclick':\n case 'dblclick':\n case 'mousedown':\n case 'mousemove':\n case 'mouseup': // TODO: Disabled elements should not respond to mouse events\n\n /* falls through */\n\n case 'mouseout':\n case 'mouseover':\n case 'contextmenu':\n SyntheticEventCtor = SyntheticMouseEvent;\n break;\n\n case 'drag':\n case 'dragend':\n case 'dragenter':\n case 'dragexit':\n case 'dragleave':\n case 'dragover':\n case 'dragstart':\n case 'drop':\n SyntheticEventCtor = SyntheticDragEvent;\n break;\n\n case 'touchcancel':\n case 'touchend':\n case 'touchmove':\n case 'touchstart':\n SyntheticEventCtor = SyntheticTouchEvent;\n break;\n\n case ANIMATION_END:\n case ANIMATION_ITERATION:\n case ANIMATION_START:\n SyntheticEventCtor = SyntheticAnimationEvent;\n break;\n\n case TRANSITION_END:\n SyntheticEventCtor = SyntheticTransitionEvent;\n break;\n\n case 'scroll':\n SyntheticEventCtor = SyntheticUIEvent;\n break;\n\n case 'wheel':\n SyntheticEventCtor = SyntheticWheelEvent;\n break;\n\n case 'copy':\n case 'cut':\n case 'paste':\n SyntheticEventCtor = SyntheticClipboardEvent;\n break;\n\n case 'gotpointercapture':\n case 'lostpointercapture':\n case 'pointercancel':\n case 'pointerdown':\n case 'pointermove':\n case 'pointerout':\n case 'pointerover':\n case 'pointerup':\n SyntheticEventCtor = SyntheticPointerEvent;\n break;\n }\n\n var inCapturePhase = (eventSystemFlags & IS_CAPTURE_PHASE) !== 0;\n\n {\n // Some events don't bubble in the browser.\n // In the past, React has always bubbled them, but this can be surprising.\n // We're going to try aligning closer to the browser behavior by not bubbling\n // them in React either. We'll start by not bubbling onScroll, and then expand.\n var accumulateTargetOnly = !inCapturePhase && // TODO: ideally, we'd eventually add all events from\n // nonDelegatedEvents list in DOMPluginEventSystem.\n // Then we can remove this special list.\n // This is a breaking change that can wait until React 18.\n domEventName === 'scroll';\n\n var _listeners = accumulateSinglePhaseListeners(targetInst, reactName, nativeEvent.type, inCapturePhase, accumulateTargetOnly);\n\n if (_listeners.length > 0) {\n // Intentionally create event lazily.\n var _event = new SyntheticEventCtor(reactName, reactEventType, null, nativeEvent, nativeEventTarget);\n\n dispatchQueue.push({\n event: _event,\n listeners: _listeners\n });\n }\n }\n}\n\n// TODO: remove top-level side effect.\nregisterSimpleEvents();\nregisterEvents$2();\nregisterEvents$1();\nregisterEvents$3();\nregisterEvents();\n\nfunction extractEvents$5(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {\n // TODO: we should remove the concept of a \"SimpleEventPlugin\".\n // This is the basic functionality of the event system. All\n // the other plugins are essentially polyfills. So the plugin\n // should probably be inlined somewhere and have its logic\n // be core the to event system. This would potentially allow\n // us to ship builds of React without the polyfilled plugins below.\n extractEvents$4(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags);\n var shouldProcessPolyfillPlugins = (eventSystemFlags & SHOULD_NOT_PROCESS_POLYFILL_EVENT_PLUGINS) === 0; // We don't process these events unless we are in the\n // event's native \"bubble\" phase, which means that we're\n // not in the capture phase. That's because we emulate\n // the capture phase here still. This is a trade-off,\n // because in an ideal world we would not emulate and use\n // the phases properly, like we do with the SimpleEvent\n // plugin. However, the plugins below either expect\n // emulation (EnterLeave) or use state localized to that\n // plugin (BeforeInput, Change, Select). The state in\n // these modules complicates things, as you'll essentially\n // get the case where the capture phase event might change\n // state, only for the following bubble event to come in\n // later and not trigger anything as the state now\n // invalidates the heuristics of the event plugin. We\n // could alter all these plugins to work in such ways, but\n // that might cause other unknown side-effects that we\n // can't forsee right now.\n\n if (shouldProcessPolyfillPlugins) {\n extractEvents$2(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags);\n extractEvents$1(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);\n extractEvents$3(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);\n extractEvents(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);\n }\n} // List of events that need to be individually attached to media elements.\n\n\nvar mediaEventTypes = ['abort', 'canplay', 'canplaythrough', 'durationchange', 'emptied', 'encrypted', 'ended', 'error', 'loadeddata', 'loadedmetadata', 'loadstart', 'pause', 'play', 'playing', 'progress', 'ratechange', 'seeked', 'seeking', 'stalled', 'suspend', 'timeupdate', 'volumechange', 'waiting']; // We should not delegate these events to the container, but rather\n// set them on the actual target element itself. This is primarily\n// because these events do not consistently bubble in the DOM.\n\nvar nonDelegatedEvents = new Set(['cancel', 'close', 'invalid', 'load', 'scroll', 'toggle'].concat(mediaEventTypes));\n\nfunction executeDispatch(event, listener, currentTarget) {\n var type = event.type || 'unknown-event';\n event.currentTarget = currentTarget;\n invokeGuardedCallbackAndCatchFirstError(type, listener, undefined, event);\n event.currentTarget = null;\n}\n\nfunction processDispatchQueueItemsInOrder(event, dispatchListeners, inCapturePhase) {\n var previousInstance;\n\n if (inCapturePhase) {\n for (var i = dispatchListeners.length - 1; i >= 0; i--) {\n var _dispatchListeners$i = dispatchListeners[i],\n instance = _dispatchListeners$i.instance,\n currentTarget = _dispatchListeners$i.currentTarget,\n listener = _dispatchListeners$i.listener;\n\n if (instance !== previousInstance && event.isPropagationStopped()) {\n return;\n }\n\n executeDispatch(event, listener, currentTarget);\n previousInstance = instance;\n }\n } else {\n for (var _i = 0; _i < dispatchListeners.length; _i++) {\n var _dispatchListeners$_i = dispatchListeners[_i],\n _instance = _dispatchListeners$_i.instance,\n _currentTarget = _dispatchListeners$_i.currentTarget,\n _listener = _dispatchListeners$_i.listener;\n\n if (_instance !== previousInstance && event.isPropagationStopped()) {\n return;\n }\n\n executeDispatch(event, _listener, _currentTarget);\n previousInstance = _instance;\n }\n }\n}\n\nfunction processDispatchQueue(dispatchQueue, eventSystemFlags) {\n var inCapturePhase = (eventSystemFlags & IS_CAPTURE_PHASE) !== 0;\n\n for (var i = 0; i < dispatchQueue.length; i++) {\n var _dispatchQueue$i = dispatchQueue[i],\n event = _dispatchQueue$i.event,\n listeners = _dispatchQueue$i.listeners;\n processDispatchQueueItemsInOrder(event, listeners, inCapturePhase); // event system doesn't use pooling.\n } // This would be a good time to rethrow if any of the event handlers threw.\n\n\n rethrowCaughtError();\n}\n\nfunction dispatchEventsForPlugins(domEventName, eventSystemFlags, nativeEvent, targetInst, targetContainer) {\n var nativeEventTarget = getEventTarget(nativeEvent);\n var dispatchQueue = [];\n extractEvents$5(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags);\n processDispatchQueue(dispatchQueue, eventSystemFlags);\n}\n\nfunction listenToNonDelegatedEvent(domEventName, targetElement) {\n var isCapturePhaseListener = false;\n var listenerSet = getEventListenerSet(targetElement);\n var listenerSetKey = getListenerSetKey(domEventName, isCapturePhaseListener);\n\n if (!listenerSet.has(listenerSetKey)) {\n addTrappedEventListener(targetElement, domEventName, IS_NON_DELEGATED, isCapturePhaseListener);\n listenerSet.add(listenerSetKey);\n }\n}\nvar listeningMarker = '_reactListening' + Math.random().toString(36).slice(2);\nfunction listenToAllSupportedEvents(rootContainerElement) {\n {\n if (rootContainerElement[listeningMarker]) {\n // Performance optimization: don't iterate through events\n // for the same portal container or root node more than once.\n // TODO: once we remove the flag, we may be able to also\n // remove some of the bookkeeping maps used for laziness.\n return;\n }\n\n rootContainerElement[listeningMarker] = true;\n allNativeEvents.forEach(function (domEventName) {\n if (!nonDelegatedEvents.has(domEventName)) {\n listenToNativeEvent(domEventName, false, rootContainerElement, null);\n }\n\n listenToNativeEvent(domEventName, true, rootContainerElement, null);\n });\n }\n}\nfunction listenToNativeEvent(domEventName, isCapturePhaseListener, rootContainerElement, targetElement) {\n var eventSystemFlags = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;\n var target = rootContainerElement; // selectionchange needs to be attached to the document\n // otherwise it won't capture incoming events that are only\n // triggered on the document directly.\n\n if (domEventName === 'selectionchange' && rootContainerElement.nodeType !== DOCUMENT_NODE) {\n target = rootContainerElement.ownerDocument;\n } // If the event can be delegated (or is capture phase), we can\n // register it to the root container. Otherwise, we should\n // register the event to the target element and mark it as\n // a non-delegated event.\n\n\n if (targetElement !== null && !isCapturePhaseListener && nonDelegatedEvents.has(domEventName)) {\n // For all non-delegated events, apart from scroll, we attach\n // their event listeners to the respective elements that their\n // events fire on. That means we can skip this step, as event\n // listener has already been added previously. However, we\n // special case the scroll event because the reality is that any\n // element can scroll.\n // TODO: ideally, we'd eventually apply the same logic to all\n // events from the nonDelegatedEvents list. Then we can remove\n // this special case and use the same logic for all events.\n if (domEventName !== 'scroll') {\n return;\n }\n\n eventSystemFlags |= IS_NON_DELEGATED;\n target = targetElement;\n }\n\n var listenerSet = getEventListenerSet(target);\n var listenerSetKey = getListenerSetKey(domEventName, isCapturePhaseListener); // If the listener entry is empty or we should upgrade, then\n // we need to trap an event listener onto the target.\n\n if (!listenerSet.has(listenerSetKey)) {\n if (isCapturePhaseListener) {\n eventSystemFlags |= IS_CAPTURE_PHASE;\n }\n\n addTrappedEventListener(target, domEventName, eventSystemFlags, isCapturePhaseListener);\n listenerSet.add(listenerSetKey);\n }\n}\n\nfunction addTrappedEventListener(targetContainer, domEventName, eventSystemFlags, isCapturePhaseListener, isDeferredListenerForLegacyFBSupport) {\n var listener = createEventListenerWrapperWithPriority(targetContainer, domEventName, eventSystemFlags); // If passive option is not supported, then the event will be\n // active and not passive.\n\n var isPassiveListener = undefined;\n\n if (passiveBrowserEventsSupported) {\n // Browsers introduced an intervention, making these events\n // passive by default on document. React doesn't bind them\n // to document anymore, but changing this now would undo\n // the performance wins from the change. So we emulate\n // the existing behavior manually on the roots now.\n // https://github.com/facebook/react/issues/19651\n if (domEventName === 'touchstart' || domEventName === 'touchmove' || domEventName === 'wheel') {\n isPassiveListener = true;\n }\n }\n\n targetContainer = targetContainer;\n var unsubscribeListener; // When legacyFBSupport is enabled, it's for when we\n\n\n if (isCapturePhaseListener) {\n if (isPassiveListener !== undefined) {\n unsubscribeListener = addEventCaptureListenerWithPassiveFlag(targetContainer, domEventName, listener, isPassiveListener);\n } else {\n unsubscribeListener = addEventCaptureListener(targetContainer, domEventName, listener);\n }\n } else {\n if (isPassiveListener !== undefined) {\n unsubscribeListener = addEventBubbleListenerWithPassiveFlag(targetContainer, domEventName, listener, isPassiveListener);\n } else {\n unsubscribeListener = addEventBubbleListener(targetContainer, domEventName, listener);\n }\n }\n}\n\nfunction isMatchingRootContainer(grandContainer, targetContainer) {\n return grandContainer === targetContainer || grandContainer.nodeType === COMMENT_NODE && grandContainer.parentNode === targetContainer;\n}\n\nfunction dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, targetInst, targetContainer) {\n var ancestorInst = targetInst;\n\n if ((eventSystemFlags & IS_EVENT_HANDLE_NON_MANAGED_NODE) === 0 && (eventSystemFlags & IS_NON_DELEGATED) === 0) {\n var targetContainerNode = targetContainer; // If we are using the legacy FB support flag, we\n\n if (targetInst !== null) {\n // The below logic attempts to work out if we need to change\n // the target fiber to a different ancestor. We had similar logic\n // in the legacy event system, except the big difference between\n // systems is that the modern event system now has an event listener\n // attached to each React Root and React Portal Root. Together,\n // the DOM nodes representing these roots are the \"rootContainer\".\n // To figure out which ancestor instance we should use, we traverse\n // up the fiber tree from the target instance and attempt to find\n // root boundaries that match that of our current \"rootContainer\".\n // If we find that \"rootContainer\", we find the parent fiber\n // sub-tree for that root and make that our ancestor instance.\n var node = targetInst;\n\n mainLoop: while (true) {\n if (node === null) {\n return;\n }\n\n var nodeTag = node.tag;\n\n if (nodeTag === HostRoot || nodeTag === HostPortal) {\n var container = node.stateNode.containerInfo;\n\n if (isMatchingRootContainer(container, targetContainerNode)) {\n break;\n }\n\n if (nodeTag === HostPortal) {\n // The target is a portal, but it's not the rootContainer we're looking for.\n // Normally portals handle their own events all the way down to the root.\n // So we should be able to stop now. However, we don't know if this portal\n // was part of *our* root.\n var grandNode = node.return;\n\n while (grandNode !== null) {\n var grandTag = grandNode.tag;\n\n if (grandTag === HostRoot || grandTag === HostPortal) {\n var grandContainer = grandNode.stateNode.containerInfo;\n\n if (isMatchingRootContainer(grandContainer, targetContainerNode)) {\n // This is the rootContainer we're looking for and we found it as\n // a parent of the Portal. That means we can ignore it because the\n // Portal will bubble through to us.\n return;\n }\n }\n\n grandNode = grandNode.return;\n }\n } // Now we need to find it's corresponding host fiber in the other\n // tree. To do this we can use getClosestInstanceFromNode, but we\n // need to validate that the fiber is a host instance, otherwise\n // we need to traverse up through the DOM till we find the correct\n // node that is from the other tree.\n\n\n while (container !== null) {\n var parentNode = getClosestInstanceFromNode(container);\n\n if (parentNode === null) {\n return;\n }\n\n var parentTag = parentNode.tag;\n\n if (parentTag === HostComponent || parentTag === HostText) {\n node = ancestorInst = parentNode;\n continue mainLoop;\n }\n\n container = container.parentNode;\n }\n }\n\n node = node.return;\n }\n }\n }\n\n batchedEventUpdates(function () {\n return dispatchEventsForPlugins(domEventName, eventSystemFlags, nativeEvent, ancestorInst);\n });\n}\n\nfunction createDispatchListener(instance, listener, currentTarget) {\n return {\n instance: instance,\n listener: listener,\n currentTarget: currentTarget\n };\n}\n\nfunction accumulateSinglePhaseListeners(targetFiber, reactName, nativeEventType, inCapturePhase, accumulateTargetOnly) {\n var captureName = reactName !== null ? reactName + 'Capture' : null;\n var reactEventName = inCapturePhase ? captureName : reactName;\n var listeners = [];\n var instance = targetFiber;\n var lastHostComponent = null; // Accumulate all instances and listeners via the target -> root path.\n\n while (instance !== null) {\n var _instance2 = instance,\n stateNode = _instance2.stateNode,\n tag = _instance2.tag; // Handle listeners that are on HostComponents (i.e. <div>)\n\n if (tag === HostComponent && stateNode !== null) {\n lastHostComponent = stateNode; // createEventHandle listeners\n\n\n if (reactEventName !== null) {\n var listener = getListener(instance, reactEventName);\n\n if (listener != null) {\n listeners.push(createDispatchListener(instance, listener, lastHostComponent));\n }\n }\n } // If we are only accumulating events for the target, then we don't\n // continue to propagate through the React fiber tree to find other\n // listeners.\n\n\n if (accumulateTargetOnly) {\n break;\n }\n\n instance = instance.return;\n }\n\n return listeners;\n} // We should only use this function for:\n// - BeforeInputEventPlugin\n// - ChangeEventPlugin\n// - SelectEventPlugin\n// This is because we only process these plugins\n// in the bubble phase, so we need to accumulate two\n// phase event listeners (via emulation).\n\nfunction accumulateTwoPhaseListeners(targetFiber, reactName) {\n var captureName = reactName + 'Capture';\n var listeners = [];\n var instance = targetFiber; // Accumulate all instances and listeners via the target -> root path.\n\n while (instance !== null) {\n var _instance3 = instance,\n stateNode = _instance3.stateNode,\n tag = _instance3.tag; // Handle listeners that are on HostComponents (i.e. <div>)\n\n if (tag === HostComponent && stateNode !== null) {\n var currentTarget = stateNode;\n var captureListener = getListener(instance, captureName);\n\n if (captureListener != null) {\n listeners.unshift(createDispatchListener(instance, captureListener, currentTarget));\n }\n\n var bubbleListener = getListener(instance, reactName);\n\n if (bubbleListener != null) {\n listeners.push(createDispatchListener(instance, bubbleListener, currentTarget));\n }\n }\n\n instance = instance.return;\n }\n\n return listeners;\n}\n\nfunction getParent(inst) {\n if (inst === null) {\n return null;\n }\n\n do {\n inst = inst.return; // TODO: If this is a HostRoot we might want to bail out.\n // That is depending on if we want nested subtrees (layers) to bubble\n // events to their parent. We could also go through parentNode on the\n // host node but that wouldn't work for React Native and doesn't let us\n // do the portal feature.\n } while (inst && inst.tag !== HostComponent);\n\n if (inst) {\n return inst;\n }\n\n return null;\n}\n/**\n * Return the lowest common ancestor of A and B, or null if they are in\n * different trees.\n */\n\n\nfunction getLowestCommonAncestor(instA, instB) {\n var nodeA = instA;\n var nodeB = instB;\n var depthA = 0;\n\n for (var tempA = nodeA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n\n var depthB = 0;\n\n for (var tempB = nodeB; tempB; tempB = getParent(tempB)) {\n depthB++;\n } // If A is deeper, crawl up.\n\n\n while (depthA - depthB > 0) {\n nodeA = getParent(nodeA);\n depthA--;\n } // If B is deeper, crawl up.\n\n\n while (depthB - depthA > 0) {\n nodeB = getParent(nodeB);\n depthB--;\n } // Walk in lockstep until we find a match.\n\n\n var depth = depthA;\n\n while (depth--) {\n if (nodeA === nodeB || nodeB !== null && nodeA === nodeB.alternate) {\n return nodeA;\n }\n\n nodeA = getParent(nodeA);\n nodeB = getParent(nodeB);\n }\n\n return null;\n}\n\nfunction accumulateEnterLeaveListenersForEvent(dispatchQueue, event, target, common, inCapturePhase) {\n var registrationName = event._reactName;\n var listeners = [];\n var instance = target;\n\n while (instance !== null) {\n if (instance === common) {\n break;\n }\n\n var _instance4 = instance,\n alternate = _instance4.alternate,\n stateNode = _instance4.stateNode,\n tag = _instance4.tag;\n\n if (alternate !== null && alternate === common) {\n break;\n }\n\n if (tag === HostComponent && stateNode !== null) {\n var currentTarget = stateNode;\n\n if (inCapturePhase) {\n var captureListener = getListener(instance, registrationName);\n\n if (captureListener != null) {\n listeners.unshift(createDispatchListener(instance, captureListener, currentTarget));\n }\n } else if (!inCapturePhase) {\n var bubbleListener = getListener(instance, registrationName);\n\n if (bubbleListener != null) {\n listeners.push(createDispatchListener(instance, bubbleListener, currentTarget));\n }\n }\n }\n\n instance = instance.return;\n }\n\n if (listeners.length !== 0) {\n dispatchQueue.push({\n event: event,\n listeners: listeners\n });\n }\n} // We should only use this function for:\n// - EnterLeaveEventPlugin\n// This is because we only process this plugin\n// in the bubble phase, so we need to accumulate two\n// phase event listeners.\n\n\nfunction accumulateEnterLeaveTwoPhaseListeners(dispatchQueue, leaveEvent, enterEvent, from, to) {\n var common = from && to ? getLowestCommonAncestor(from, to) : null;\n\n if (from !== null) {\n accumulateEnterLeaveListenersForEvent(dispatchQueue, leaveEvent, from, common, false);\n }\n\n if (to !== null && enterEvent !== null) {\n accumulateEnterLeaveListenersForEvent(dispatchQueue, enterEvent, to, common, true);\n }\n}\nfunction getListenerSetKey(domEventName, capture) {\n return domEventName + \"__\" + (capture ? 'capture' : 'bubble');\n}\n\nvar didWarnInvalidHydration = false;\nvar DANGEROUSLY_SET_INNER_HTML = 'dangerouslySetInnerHTML';\nvar SUPPRESS_CONTENT_EDITABLE_WARNING = 'suppressContentEditableWarning';\nvar SUPPRESS_HYDRATION_WARNING = 'suppressHydrationWarning';\nvar AUTOFOCUS = 'autoFocus';\nvar CHILDREN = 'children';\nvar STYLE = 'style';\nvar HTML$1 = '__html';\nvar HTML_NAMESPACE$1 = Namespaces.html;\nvar warnedUnknownTags;\nvar suppressHydrationWarning;\nvar validatePropertiesInDevelopment;\nvar warnForTextDifference;\nvar warnForPropDifference;\nvar warnForExtraAttributes;\nvar warnForInvalidEventListener;\nvar canDiffStyleForHydrationWarning;\nvar normalizeMarkupForTextOrAttribute;\nvar normalizeHTML;\n\n{\n warnedUnknownTags = {\n // There are working polyfills for <dialog>. Let people use it.\n dialog: true,\n // Electron ships a custom <webview> tag to display external web content in\n // an isolated frame and process.\n // This tag is not present in non Electron environments such as JSDom which\n // is often used for testing purposes.\n // @see https://electronjs.org/docs/api/webview-tag\n webview: true\n };\n\n validatePropertiesInDevelopment = function (type, props) {\n validateProperties(type, props);\n validateProperties$1(type, props);\n validateProperties$2(type, props, {\n registrationNameDependencies: registrationNameDependencies,\n possibleRegistrationNames: possibleRegistrationNames\n });\n }; // IE 11 parses & normalizes the style attribute as opposed to other\n // browsers. It adds spaces and sorts the properties in some\n // non-alphabetical order. Handling that would require sorting CSS\n // properties in the client & server versions or applying\n // `expectedStyle` to a temporary DOM node to read its `style` attribute\n // normalized. Since it only affects IE, we're skipping style warnings\n // in that browser completely in favor of doing all that work.\n // See https://github.com/facebook/react/issues/11807\n\n\n canDiffStyleForHydrationWarning = canUseDOM && !document.documentMode; // HTML parsing normalizes CR and CRLF to LF.\n // It also can turn \\u0000 into \\uFFFD inside attributes.\n // https://www.w3.org/TR/html5/single-page.html#preprocessing-the-input-stream\n // If we have a mismatch, it might be caused by that.\n // We will still patch up in this case but not fire the warning.\n\n var NORMALIZE_NEWLINES_REGEX = /\\r\\n?/g;\n var NORMALIZE_NULL_AND_REPLACEMENT_REGEX = /\\u0000|\\uFFFD/g;\n\n normalizeMarkupForTextOrAttribute = function (markup) {\n var markupString = typeof markup === 'string' ? markup : '' + markup;\n return markupString.replace(NORMALIZE_NEWLINES_REGEX, '\\n').replace(NORMALIZE_NULL_AND_REPLACEMENT_REGEX, '');\n };\n\n warnForTextDifference = function (serverText, clientText) {\n if (didWarnInvalidHydration) {\n return;\n }\n\n var normalizedClientText = normalizeMarkupForTextOrAttribute(clientText);\n var normalizedServerText = normalizeMarkupForTextOrAttribute(serverText);\n\n if (normalizedServerText === normalizedClientText) {\n return;\n }\n\n didWarnInvalidHydration = true;\n\n error('Text content did not match. Server: \"%s\" Client: \"%s\"', normalizedServerText, normalizedClientText);\n };\n\n warnForPropDifference = function (propName, serverValue, clientValue) {\n if (didWarnInvalidHydration) {\n return;\n }\n\n var normalizedClientValue = normalizeMarkupForTextOrAttribute(clientValue);\n var normalizedServerValue = normalizeMarkupForTextOrAttribute(serverValue);\n\n if (normalizedServerValue === normalizedClientValue) {\n return;\n }\n\n didWarnInvalidHydration = true;\n\n error('Prop `%s` did not match. Server: %s Client: %s', propName, JSON.stringify(normalizedServerValue), JSON.stringify(normalizedClientValue));\n };\n\n warnForExtraAttributes = function (attributeNames) {\n if (didWarnInvalidHydration) {\n return;\n }\n\n didWarnInvalidHydration = true;\n var names = [];\n attributeNames.forEach(function (name) {\n names.push(name);\n });\n\n error('Extra attributes from the server: %s', names);\n };\n\n warnForInvalidEventListener = function (registrationName, listener) {\n if (listener === false) {\n error('Expected `%s` listener to be a function, instead got `false`.\\n\\n' + 'If you used to conditionally omit it with %s={condition && value}, ' + 'pass %s={condition ? value : undefined} instead.', registrationName, registrationName, registrationName);\n } else {\n error('Expected `%s` listener to be a function, instead got a value of `%s` type.', registrationName, typeof listener);\n }\n }; // Parse the HTML and read it back to normalize the HTML string so that it\n // can be used for comparison.\n\n\n normalizeHTML = function (parent, html) {\n // We could have created a separate document here to avoid\n // re-initializing custom elements if they exist. But this breaks\n // how <noscript> is being handled. So we use the same document.\n // See the discussion in https://github.com/facebook/react/pull/11157.\n var testElement = parent.namespaceURI === HTML_NAMESPACE$1 ? parent.ownerDocument.createElement(parent.tagName) : parent.ownerDocument.createElementNS(parent.namespaceURI, parent.tagName);\n testElement.innerHTML = html;\n return testElement.innerHTML;\n };\n}\n\nfunction getOwnerDocumentFromRootContainer(rootContainerElement) {\n return rootContainerElement.nodeType === DOCUMENT_NODE ? rootContainerElement : rootContainerElement.ownerDocument;\n}\n\nfunction noop() {}\n\nfunction trapClickOnNonInteractiveElement(node) {\n // Mobile Safari does not fire properly bubble click events on\n // non-interactive elements, which means delegated click listeners do not\n // fire. The workaround for this bug involves attaching an empty click\n // listener on the target node.\n // https://www.quirksmode.org/blog/archives/2010/09/click_event_del.html\n // Just set it using the onclick property so that we don't have to manage any\n // bookkeeping for it. Not sure if we need to clear it when the listener is\n // removed.\n // TODO: Only do this for the relevant Safaris maybe?\n node.onclick = noop;\n}\n\nfunction setInitialDOMProperties(tag, domElement, rootContainerElement, nextProps, isCustomComponentTag) {\n for (var propKey in nextProps) {\n if (!nextProps.hasOwnProperty(propKey)) {\n continue;\n }\n\n var nextProp = nextProps[propKey];\n\n if (propKey === STYLE) {\n {\n if (nextProp) {\n // Freeze the next style object so that we can assume it won't be\n // mutated. We have already warned for this in the past.\n Object.freeze(nextProp);\n }\n } // Relies on `updateStylesByID` not mutating `styleUpdates`.\n\n\n setValueForStyles(domElement, nextProp);\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {\n var nextHtml = nextProp ? nextProp[HTML$1] : undefined;\n\n if (nextHtml != null) {\n setInnerHTML(domElement, nextHtml);\n }\n } else if (propKey === CHILDREN) {\n if (typeof nextProp === 'string') {\n // Avoid setting initial textContent when the text is empty. In IE11 setting\n // textContent on a <textarea> will cause the placeholder to not\n // show within the <textarea> until it has been focused and blurred again.\n // https://github.com/facebook/react/issues/6731#issuecomment-254874553\n var canSetTextContent = tag !== 'textarea' || nextProp !== '';\n\n if (canSetTextContent) {\n setTextContent(domElement, nextProp);\n }\n } else if (typeof nextProp === 'number') {\n setTextContent(domElement, '' + nextProp);\n }\n } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING) ; else if (propKey === AUTOFOCUS) ; else if (registrationNameDependencies.hasOwnProperty(propKey)) {\n if (nextProp != null) {\n if ( typeof nextProp !== 'function') {\n warnForInvalidEventListener(propKey, nextProp);\n }\n\n if (propKey === 'onScroll') {\n listenToNonDelegatedEvent('scroll', domElement);\n }\n }\n } else if (nextProp != null) {\n setValueForProperty(domElement, propKey, nextProp, isCustomComponentTag);\n }\n }\n}\n\nfunction updateDOMProperties(domElement, updatePayload, wasCustomComponentTag, isCustomComponentTag) {\n // TODO: Handle wasCustomComponentTag\n for (var i = 0; i < updatePayload.length; i += 2) {\n var propKey = updatePayload[i];\n var propValue = updatePayload[i + 1];\n\n if (propKey === STYLE) {\n setValueForStyles(domElement, propValue);\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {\n setInnerHTML(domElement, propValue);\n } else if (propKey === CHILDREN) {\n setTextContent(domElement, propValue);\n } else {\n setValueForProperty(domElement, propKey, propValue, isCustomComponentTag);\n }\n }\n}\n\nfunction createElement(type, props, rootContainerElement, parentNamespace) {\n var isCustomComponentTag; // We create tags in the namespace of their parent container, except HTML\n // tags get no namespace.\n\n var ownerDocument = getOwnerDocumentFromRootContainer(rootContainerElement);\n var domElement;\n var namespaceURI = parentNamespace;\n\n if (namespaceURI === HTML_NAMESPACE$1) {\n namespaceURI = getIntrinsicNamespace(type);\n }\n\n if (namespaceURI === HTML_NAMESPACE$1) {\n {\n isCustomComponentTag = isCustomComponent(type, props); // Should this check be gated by parent namespace? Not sure we want to\n // allow <SVG> or <mATH>.\n\n if (!isCustomComponentTag && type !== type.toLowerCase()) {\n error('<%s /> is using incorrect casing. ' + 'Use PascalCase for React components, ' + 'or lowercase for HTML elements.', type);\n }\n }\n\n if (type === 'script') {\n // Create the script via .innerHTML so its \"parser-inserted\" flag is\n // set to true and it does not execute\n var div = ownerDocument.createElement('div');\n\n div.innerHTML = '<script><' + '/script>'; // eslint-disable-line\n // This is guaranteed to yield a script element.\n\n var firstChild = div.firstChild;\n domElement = div.removeChild(firstChild);\n } else if (typeof props.is === 'string') {\n // $FlowIssue `createElement` should be updated for Web Components\n domElement = ownerDocument.createElement(type, {\n is: props.is\n });\n } else {\n // Separate else branch instead of using `props.is || undefined` above because of a Firefox bug.\n // See discussion in https://github.com/facebook/react/pull/6896\n // and discussion in https://bugzilla.mozilla.org/show_bug.cgi?id=1276240\n domElement = ownerDocument.createElement(type); // Normally attributes are assigned in `setInitialDOMProperties`, however the `multiple` and `size`\n // attributes on `select`s needs to be added before `option`s are inserted.\n // This prevents:\n // - a bug where the `select` does not scroll to the correct option because singular\n // `select` elements automatically pick the first item #13222\n // - a bug where the `select` set the first item as selected despite the `size` attribute #14239\n // See https://github.com/facebook/react/issues/13222\n // and https://github.com/facebook/react/issues/14239\n\n if (type === 'select') {\n var node = domElement;\n\n if (props.multiple) {\n node.multiple = true;\n } else if (props.size) {\n // Setting a size greater than 1 causes a select to behave like `multiple=true`, where\n // it is possible that no option is selected.\n //\n // This is only necessary when a select in \"single selection mode\".\n node.size = props.size;\n }\n }\n }\n } else {\n domElement = ownerDocument.createElementNS(namespaceURI, type);\n }\n\n {\n if (namespaceURI === HTML_NAMESPACE$1) {\n if (!isCustomComponentTag && Object.prototype.toString.call(domElement) === '[object HTMLUnknownElement]' && !Object.prototype.hasOwnProperty.call(warnedUnknownTags, type)) {\n warnedUnknownTags[type] = true;\n\n error('The tag <%s> is unrecognized in this browser. ' + 'If you meant to render a React component, start its name with ' + 'an uppercase letter.', type);\n }\n }\n }\n\n return domElement;\n}\nfunction createTextNode(text, rootContainerElement) {\n return getOwnerDocumentFromRootContainer(rootContainerElement).createTextNode(text);\n}\nfunction setInitialProperties(domElement, tag, rawProps, rootContainerElement) {\n var isCustomComponentTag = isCustomComponent(tag, rawProps);\n\n {\n validatePropertiesInDevelopment(tag, rawProps);\n } // TODO: Make sure that we check isMounted before firing any of these events.\n\n\n var props;\n\n switch (tag) {\n case 'dialog':\n listenToNonDelegatedEvent('cancel', domElement);\n listenToNonDelegatedEvent('close', domElement);\n props = rawProps;\n break;\n\n case 'iframe':\n case 'object':\n case 'embed':\n // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the load event.\n listenToNonDelegatedEvent('load', domElement);\n props = rawProps;\n break;\n\n case 'video':\n case 'audio':\n // We listen to these events in case to ensure emulated bubble\n // listeners still fire for all the media events.\n for (var i = 0; i < mediaEventTypes.length; i++) {\n listenToNonDelegatedEvent(mediaEventTypes[i], domElement);\n }\n\n props = rawProps;\n break;\n\n case 'source':\n // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the error event.\n listenToNonDelegatedEvent('error', domElement);\n props = rawProps;\n break;\n\n case 'img':\n case 'image':\n case 'link':\n // We listen to these events in case to ensure emulated bubble\n // listeners still fire for error and load events.\n listenToNonDelegatedEvent('error', domElement);\n listenToNonDelegatedEvent('load', domElement);\n props = rawProps;\n break;\n\n case 'details':\n // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the toggle event.\n listenToNonDelegatedEvent('toggle', domElement);\n props = rawProps;\n break;\n\n case 'input':\n initWrapperState(domElement, rawProps);\n props = getHostProps(domElement, rawProps); // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the invalid event.\n\n listenToNonDelegatedEvent('invalid', domElement);\n\n break;\n\n case 'option':\n validateProps(domElement, rawProps);\n props = getHostProps$1(domElement, rawProps);\n break;\n\n case 'select':\n initWrapperState$1(domElement, rawProps);\n props = getHostProps$2(domElement, rawProps); // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the invalid event.\n\n listenToNonDelegatedEvent('invalid', domElement);\n\n break;\n\n case 'textarea':\n initWrapperState$2(domElement, rawProps);\n props = getHostProps$3(domElement, rawProps); // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the invalid event.\n\n listenToNonDelegatedEvent('invalid', domElement);\n\n break;\n\n default:\n props = rawProps;\n }\n\n assertValidProps(tag, props);\n setInitialDOMProperties(tag, domElement, rootContainerElement, props, isCustomComponentTag);\n\n switch (tag) {\n case 'input':\n // TODO: Make sure we check if this is still unmounted or do any clean\n // up necessary since we never stop tracking anymore.\n track(domElement);\n postMountWrapper(domElement, rawProps, false);\n break;\n\n case 'textarea':\n // TODO: Make sure we check if this is still unmounted or do any clean\n // up necessary since we never stop tracking anymore.\n track(domElement);\n postMountWrapper$3(domElement);\n break;\n\n case 'option':\n postMountWrapper$1(domElement, rawProps);\n break;\n\n case 'select':\n postMountWrapper$2(domElement, rawProps);\n break;\n\n default:\n if (typeof props.onClick === 'function') {\n // TODO: This cast may not be sound for SVG, MathML or custom elements.\n trapClickOnNonInteractiveElement(domElement);\n }\n\n break;\n }\n} // Calculate the diff between the two objects.\n\nfunction diffProperties(domElement, tag, lastRawProps, nextRawProps, rootContainerElement) {\n {\n validatePropertiesInDevelopment(tag, nextRawProps);\n }\n\n var updatePayload = null;\n var lastProps;\n var nextProps;\n\n switch (tag) {\n case 'input':\n lastProps = getHostProps(domElement, lastRawProps);\n nextProps = getHostProps(domElement, nextRawProps);\n updatePayload = [];\n break;\n\n case 'option':\n lastProps = getHostProps$1(domElement, lastRawProps);\n nextProps = getHostProps$1(domElement, nextRawProps);\n updatePayload = [];\n break;\n\n case 'select':\n lastProps = getHostProps$2(domElement, lastRawProps);\n nextProps = getHostProps$2(domElement, nextRawProps);\n updatePayload = [];\n break;\n\n case 'textarea':\n lastProps = getHostProps$3(domElement, lastRawProps);\n nextProps = getHostProps$3(domElement, nextRawProps);\n updatePayload = [];\n break;\n\n default:\n lastProps = lastRawProps;\n nextProps = nextRawProps;\n\n if (typeof lastProps.onClick !== 'function' && typeof nextProps.onClick === 'function') {\n // TODO: This cast may not be sound for SVG, MathML or custom elements.\n trapClickOnNonInteractiveElement(domElement);\n }\n\n break;\n }\n\n assertValidProps(tag, nextProps);\n var propKey;\n var styleName;\n var styleUpdates = null;\n\n for (propKey in lastProps) {\n if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) {\n continue;\n }\n\n if (propKey === STYLE) {\n var lastStyle = lastProps[propKey];\n\n for (styleName in lastStyle) {\n if (lastStyle.hasOwnProperty(styleName)) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n\n styleUpdates[styleName] = '';\n }\n }\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML || propKey === CHILDREN) ; else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING) ; else if (propKey === AUTOFOCUS) ; else if (registrationNameDependencies.hasOwnProperty(propKey)) {\n // This is a special case. If any listener updates we need to ensure\n // that the \"current\" fiber pointer gets updated so we need a commit\n // to update this element.\n if (!updatePayload) {\n updatePayload = [];\n }\n } else {\n // For all other deleted properties we add it to the queue. We use\n // the allowed property list in the commit phase instead.\n (updatePayload = updatePayload || []).push(propKey, null);\n }\n }\n\n for (propKey in nextProps) {\n var nextProp = nextProps[propKey];\n var lastProp = lastProps != null ? lastProps[propKey] : undefined;\n\n if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp || nextProp == null && lastProp == null) {\n continue;\n }\n\n if (propKey === STYLE) {\n {\n if (nextProp) {\n // Freeze the next style object so that we can assume it won't be\n // mutated. We have already warned for this in the past.\n Object.freeze(nextProp);\n }\n }\n\n if (lastProp) {\n // Unset styles on `lastProp` but not on `nextProp`.\n for (styleName in lastProp) {\n if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n\n styleUpdates[styleName] = '';\n }\n } // Update styles that changed since `lastProp`.\n\n\n for (styleName in nextProp) {\n if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) {\n if (!styleUpdates) {\n styleUpdates = {};\n }\n\n styleUpdates[styleName] = nextProp[styleName];\n }\n }\n } else {\n // Relies on `updateStylesByID` not mutating `styleUpdates`.\n if (!styleUpdates) {\n if (!updatePayload) {\n updatePayload = [];\n }\n\n updatePayload.push(propKey, styleUpdates);\n }\n\n styleUpdates = nextProp;\n }\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {\n var nextHtml = nextProp ? nextProp[HTML$1] : undefined;\n var lastHtml = lastProp ? lastProp[HTML$1] : undefined;\n\n if (nextHtml != null) {\n if (lastHtml !== nextHtml) {\n (updatePayload = updatePayload || []).push(propKey, nextHtml);\n }\n }\n } else if (propKey === CHILDREN) {\n if (typeof nextProp === 'string' || typeof nextProp === 'number') {\n (updatePayload = updatePayload || []).push(propKey, '' + nextProp);\n }\n } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING) ; else if (registrationNameDependencies.hasOwnProperty(propKey)) {\n if (nextProp != null) {\n // We eagerly listen to this even though we haven't committed yet.\n if ( typeof nextProp !== 'function') {\n warnForInvalidEventListener(propKey, nextProp);\n }\n\n if (propKey === 'onScroll') {\n listenToNonDelegatedEvent('scroll', domElement);\n }\n }\n\n if (!updatePayload && lastProp !== nextProp) {\n // This is a special case. If any listener updates we need to ensure\n // that the \"current\" props pointer gets updated so we need a commit\n // to update this element.\n updatePayload = [];\n }\n } else if (typeof nextProp === 'object' && nextProp !== null && nextProp.$$typeof === REACT_OPAQUE_ID_TYPE) {\n // If we encounter useOpaqueReference's opaque object, this means we are hydrating.\n // In this case, call the opaque object's toString function which generates a new client\n // ID so client and server IDs match and throws to rerender.\n nextProp.toString();\n } else {\n // For any other property we always add it to the queue and then we\n // filter it out using the allowed property list during the commit.\n (updatePayload = updatePayload || []).push(propKey, nextProp);\n }\n }\n\n if (styleUpdates) {\n {\n validateShorthandPropertyCollisionInDev(styleUpdates, nextProps[STYLE]);\n }\n\n (updatePayload = updatePayload || []).push(STYLE, styleUpdates);\n }\n\n return updatePayload;\n} // Apply the diff.\n\nfunction updateProperties(domElement, updatePayload, tag, lastRawProps, nextRawProps) {\n // Update checked *before* name.\n // In the middle of an update, it is possible to have multiple checked.\n // When a checked radio tries to change name, browser makes another radio's checked false.\n if (tag === 'input' && nextRawProps.type === 'radio' && nextRawProps.name != null) {\n updateChecked(domElement, nextRawProps);\n }\n\n var wasCustomComponentTag = isCustomComponent(tag, lastRawProps);\n var isCustomComponentTag = isCustomComponent(tag, nextRawProps); // Apply the diff.\n\n updateDOMProperties(domElement, updatePayload, wasCustomComponentTag, isCustomComponentTag); // TODO: Ensure that an update gets scheduled if any of the special props\n // changed.\n\n switch (tag) {\n case 'input':\n // Update the wrapper around inputs *after* updating props. This has to\n // happen after `updateDOMProperties`. Otherwise HTML5 input validations\n // raise warnings and prevent the new value from being assigned.\n updateWrapper(domElement, nextRawProps);\n break;\n\n case 'textarea':\n updateWrapper$1(domElement, nextRawProps);\n break;\n\n case 'select':\n // <select> value update needs to occur after <option> children\n // reconciliation\n postUpdateWrapper(domElement, nextRawProps);\n break;\n }\n}\n\nfunction getPossibleStandardName(propName) {\n {\n var lowerCasedName = propName.toLowerCase();\n\n if (!possibleStandardNames.hasOwnProperty(lowerCasedName)) {\n return null;\n }\n\n return possibleStandardNames[lowerCasedName] || null;\n }\n}\n\nfunction diffHydratedProperties(domElement, tag, rawProps, parentNamespace, rootContainerElement) {\n var isCustomComponentTag;\n var extraAttributeNames;\n\n {\n suppressHydrationWarning = rawProps[SUPPRESS_HYDRATION_WARNING] === true;\n isCustomComponentTag = isCustomComponent(tag, rawProps);\n validatePropertiesInDevelopment(tag, rawProps);\n } // TODO: Make sure that we check isMounted before firing any of these events.\n\n\n switch (tag) {\n case 'dialog':\n listenToNonDelegatedEvent('cancel', domElement);\n listenToNonDelegatedEvent('close', domElement);\n break;\n\n case 'iframe':\n case 'object':\n case 'embed':\n // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the load event.\n listenToNonDelegatedEvent('load', domElement);\n break;\n\n case 'video':\n case 'audio':\n // We listen to these events in case to ensure emulated bubble\n // listeners still fire for all the media events.\n for (var i = 0; i < mediaEventTypes.length; i++) {\n listenToNonDelegatedEvent(mediaEventTypes[i], domElement);\n }\n\n break;\n\n case 'source':\n // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the error event.\n listenToNonDelegatedEvent('error', domElement);\n break;\n\n case 'img':\n case 'image':\n case 'link':\n // We listen to these events in case to ensure emulated bubble\n // listeners still fire for error and load events.\n listenToNonDelegatedEvent('error', domElement);\n listenToNonDelegatedEvent('load', domElement);\n break;\n\n case 'details':\n // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the toggle event.\n listenToNonDelegatedEvent('toggle', domElement);\n break;\n\n case 'input':\n initWrapperState(domElement, rawProps); // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the invalid event.\n\n listenToNonDelegatedEvent('invalid', domElement);\n\n break;\n\n case 'option':\n validateProps(domElement, rawProps);\n break;\n\n case 'select':\n initWrapperState$1(domElement, rawProps); // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the invalid event.\n\n listenToNonDelegatedEvent('invalid', domElement);\n\n break;\n\n case 'textarea':\n initWrapperState$2(domElement, rawProps); // We listen to this event in case to ensure emulated bubble\n // listeners still fire for the invalid event.\n\n listenToNonDelegatedEvent('invalid', domElement);\n\n break;\n }\n\n assertValidProps(tag, rawProps);\n\n {\n extraAttributeNames = new Set();\n var attributes = domElement.attributes;\n\n for (var _i = 0; _i < attributes.length; _i++) {\n var name = attributes[_i].name.toLowerCase();\n\n switch (name) {\n // Built-in SSR attribute is allowed\n case 'data-reactroot':\n break;\n // Controlled attributes are not validated\n // TODO: Only ignore them on controlled tags.\n\n case 'value':\n break;\n\n case 'checked':\n break;\n\n case 'selected':\n break;\n\n default:\n // Intentionally use the original name.\n // See discussion in https://github.com/facebook/react/pull/10676.\n extraAttributeNames.add(attributes[_i].name);\n }\n }\n }\n\n var updatePayload = null;\n\n for (var propKey in rawProps) {\n if (!rawProps.hasOwnProperty(propKey)) {\n continue;\n }\n\n var nextProp = rawProps[propKey];\n\n if (propKey === CHILDREN) {\n // For text content children we compare against textContent. This\n // might match additional HTML that is hidden when we read it using\n // textContent. E.g. \"foo\" will match \"f<span>oo</span>\" but that still\n // satisfies our requirement. Our requirement is not to produce perfect\n // HTML and attributes. Ideally we should preserve structure but it's\n // ok not to if the visible content is still enough to indicate what\n // even listeners these nodes might be wired up to.\n // TODO: Warn if there is more than a single textNode as a child.\n // TODO: Should we use domElement.firstChild.nodeValue to compare?\n if (typeof nextProp === 'string') {\n if (domElement.textContent !== nextProp) {\n if ( !suppressHydrationWarning) {\n warnForTextDifference(domElement.textContent, nextProp);\n }\n\n updatePayload = [CHILDREN, nextProp];\n }\n } else if (typeof nextProp === 'number') {\n if (domElement.textContent !== '' + nextProp) {\n if ( !suppressHydrationWarning) {\n warnForTextDifference(domElement.textContent, nextProp);\n }\n\n updatePayload = [CHILDREN, '' + nextProp];\n }\n }\n } else if (registrationNameDependencies.hasOwnProperty(propKey)) {\n if (nextProp != null) {\n if ( typeof nextProp !== 'function') {\n warnForInvalidEventListener(propKey, nextProp);\n }\n\n if (propKey === 'onScroll') {\n listenToNonDelegatedEvent('scroll', domElement);\n }\n }\n } else if ( // Convince Flow we've calculated it (it's DEV-only in this method.)\n typeof isCustomComponentTag === 'boolean') {\n // Validate that the properties correspond to their expected values.\n var serverValue = void 0;\n var propertyInfo = getPropertyInfo(propKey);\n\n if (suppressHydrationWarning) ; else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING || // Controlled attributes are not validated\n // TODO: Only ignore them on controlled tags.\n propKey === 'value' || propKey === 'checked' || propKey === 'selected') ; else if (propKey === DANGEROUSLY_SET_INNER_HTML) {\n var serverHTML = domElement.innerHTML;\n var nextHtml = nextProp ? nextProp[HTML$1] : undefined;\n\n if (nextHtml != null) {\n var expectedHTML = normalizeHTML(domElement, nextHtml);\n\n if (expectedHTML !== serverHTML) {\n warnForPropDifference(propKey, serverHTML, expectedHTML);\n }\n }\n } else if (propKey === STYLE) {\n // $FlowFixMe - Should be inferred as not undefined.\n extraAttributeNames.delete(propKey);\n\n if (canDiffStyleForHydrationWarning) {\n var expectedStyle = createDangerousStringForStyles(nextProp);\n serverValue = domElement.getAttribute('style');\n\n if (expectedStyle !== serverValue) {\n warnForPropDifference(propKey, serverValue, expectedStyle);\n }\n }\n } else if (isCustomComponentTag) {\n // $FlowFixMe - Should be inferred as not undefined.\n extraAttributeNames.delete(propKey.toLowerCase());\n serverValue = getValueForAttribute(domElement, propKey, nextProp);\n\n if (nextProp !== serverValue) {\n warnForPropDifference(propKey, serverValue, nextProp);\n }\n } else if (!shouldIgnoreAttribute(propKey, propertyInfo, isCustomComponentTag) && !shouldRemoveAttribute(propKey, nextProp, propertyInfo, isCustomComponentTag)) {\n var isMismatchDueToBadCasing = false;\n\n if (propertyInfo !== null) {\n // $FlowFixMe - Should be inferred as not undefined.\n extraAttributeNames.delete(propertyInfo.attributeName);\n serverValue = getValueForProperty(domElement, propKey, nextProp, propertyInfo);\n } else {\n var ownNamespace = parentNamespace;\n\n if (ownNamespace === HTML_NAMESPACE$1) {\n ownNamespace = getIntrinsicNamespace(tag);\n }\n\n if (ownNamespace === HTML_NAMESPACE$1) {\n // $FlowFixMe - Should be inferred as not undefined.\n extraAttributeNames.delete(propKey.toLowerCase());\n } else {\n var standardName = getPossibleStandardName(propKey);\n\n if (standardName !== null && standardName !== propKey) {\n // If an SVG prop is supplied with bad casing, it will\n // be successfully parsed from HTML, but will produce a mismatch\n // (and would be incorrectly rendered on the client).\n // However, we already warn about bad casing elsewhere.\n // So we'll skip the misleading extra mismatch warning in this case.\n isMismatchDueToBadCasing = true; // $FlowFixMe - Should be inferred as not undefined.\n\n extraAttributeNames.delete(standardName);\n } // $FlowFixMe - Should be inferred as not undefined.\n\n\n extraAttributeNames.delete(propKey);\n }\n\n serverValue = getValueForAttribute(domElement, propKey, nextProp);\n }\n\n if (nextProp !== serverValue && !isMismatchDueToBadCasing) {\n warnForPropDifference(propKey, serverValue, nextProp);\n }\n }\n }\n }\n\n {\n // $FlowFixMe - Should be inferred as not undefined.\n if (extraAttributeNames.size > 0 && !suppressHydrationWarning) {\n // $FlowFixMe - Should be inferred as not undefined.\n warnForExtraAttributes(extraAttributeNames);\n }\n }\n\n switch (tag) {\n case 'input':\n // TODO: Make sure we check if this is still unmounted or do any clean\n // up necessary since we never stop tracking anymore.\n track(domElement);\n postMountWrapper(domElement, rawProps, true);\n break;\n\n case 'textarea':\n // TODO: Make sure we check if this is still unmounted or do any clean\n // up necessary since we never stop tracking anymore.\n track(domElement);\n postMountWrapper$3(domElement);\n break;\n\n case 'select':\n case 'option':\n // For input and textarea we current always set the value property at\n // post mount to force it to diverge from attributes. However, for\n // option and select we don't quite do the same thing and select\n // is not resilient to the DOM state changing so we don't do that here.\n // TODO: Consider not doing this for input and textarea.\n break;\n\n default:\n if (typeof rawProps.onClick === 'function') {\n // TODO: This cast may not be sound for SVG, MathML or custom elements.\n trapClickOnNonInteractiveElement(domElement);\n }\n\n break;\n }\n\n return updatePayload;\n}\nfunction diffHydratedText(textNode, text) {\n var isDifferent = textNode.nodeValue !== text;\n return isDifferent;\n}\nfunction warnForUnmatchedText(textNode, text) {\n {\n warnForTextDifference(textNode.nodeValue, text);\n }\n}\nfunction warnForDeletedHydratableElement(parentNode, child) {\n {\n if (didWarnInvalidHydration) {\n return;\n }\n\n didWarnInvalidHydration = true;\n\n error('Did not expect server HTML to contain a <%s> in <%s>.', child.nodeName.toLowerCase(), parentNode.nodeName.toLowerCase());\n }\n}\nfunction warnForDeletedHydratableText(parentNode, child) {\n {\n if (didWarnInvalidHydration) {\n return;\n }\n\n didWarnInvalidHydration = true;\n\n error('Did not expect server HTML to contain the text node \"%s\" in <%s>.', child.nodeValue, parentNode.nodeName.toLowerCase());\n }\n}\nfunction warnForInsertedHydratedElement(parentNode, tag, props) {\n {\n if (didWarnInvalidHydration) {\n return;\n }\n\n didWarnInvalidHydration = true;\n\n error('Expected server HTML to contain a matching <%s> in <%s>.', tag, parentNode.nodeName.toLowerCase());\n }\n}\nfunction warnForInsertedHydratedText(parentNode, text) {\n {\n if (text === '') {\n // We expect to insert empty text nodes since they're not represented in\n // the HTML.\n // TODO: Remove this special case if we can just avoid inserting empty\n // text nodes.\n return;\n }\n\n if (didWarnInvalidHydration) {\n return;\n }\n\n didWarnInvalidHydration = true;\n\n error('Expected server HTML to contain a matching text node for \"%s\" in <%s>.', text, parentNode.nodeName.toLowerCase());\n }\n}\nfunction restoreControlledState$3(domElement, tag, props) {\n switch (tag) {\n case 'input':\n restoreControlledState(domElement, props);\n return;\n\n case 'textarea':\n restoreControlledState$2(domElement, props);\n return;\n\n case 'select':\n restoreControlledState$1(domElement, props);\n return;\n }\n}\n\nvar validateDOMNesting = function () {};\n\nvar updatedAncestorInfo = function () {};\n\n{\n // This validation code was written based on the HTML5 parsing spec:\n // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope\n //\n // Note: this does not catch all invalid nesting, nor does it try to (as it's\n // not clear what practical benefit doing so provides); instead, we warn only\n // for cases where the parser will give a parse tree differing from what React\n // intended. For example, <b><div></div></b> is invalid but we don't warn\n // because it still parses correctly; we do warn for other cases like nested\n // <p> tags where the beginning of the second element implicitly closes the\n // first, causing a confusing mess.\n // https://html.spec.whatwg.org/multipage/syntax.html#special\n var specialTags = ['address', 'applet', 'area', 'article', 'aside', 'base', 'basefont', 'bgsound', 'blockquote', 'body', 'br', 'button', 'caption', 'center', 'col', 'colgroup', 'dd', 'details', 'dir', 'div', 'dl', 'dt', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'frame', 'frameset', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'iframe', 'img', 'input', 'isindex', 'li', 'link', 'listing', 'main', 'marquee', 'menu', 'menuitem', 'meta', 'nav', 'noembed', 'noframes', 'noscript', 'object', 'ol', 'p', 'param', 'plaintext', 'pre', 'script', 'section', 'select', 'source', 'style', 'summary', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'title', 'tr', 'track', 'ul', 'wbr', 'xmp']; // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope\n\n var inScopeTags = ['applet', 'caption', 'html', 'table', 'td', 'th', 'marquee', 'object', 'template', // https://html.spec.whatwg.org/multipage/syntax.html#html-integration-point\n // TODO: Distinguish by namespace here -- for <title>, including it here\n // errs on the side of fewer warnings\n 'foreignObject', 'desc', 'title']; // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-button-scope\n\n var buttonScopeTags = inScopeTags.concat(['button']); // https://html.spec.whatwg.org/multipage/syntax.html#generate-implied-end-tags\n\n var impliedEndTags = ['dd', 'dt', 'li', 'option', 'optgroup', 'p', 'rp', 'rt'];\n var emptyAncestorInfo = {\n current: null,\n formTag: null,\n aTagInScope: null,\n buttonTagInScope: null,\n nobrTagInScope: null,\n pTagInButtonScope: null,\n listItemTagAutoclosing: null,\n dlItemTagAutoclosing: null\n };\n\n updatedAncestorInfo = function (oldInfo, tag) {\n var ancestorInfo = _assign({}, oldInfo || emptyAncestorInfo);\n\n var info = {\n tag: tag\n };\n\n if (inScopeTags.indexOf(tag) !== -1) {\n ancestorInfo.aTagInScope = null;\n ancestorInfo.buttonTagInScope = null;\n ancestorInfo.nobrTagInScope = null;\n }\n\n if (buttonScopeTags.indexOf(tag) !== -1) {\n ancestorInfo.pTagInButtonScope = null;\n } // See rules for 'li', 'dd', 'dt' start tags in\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody\n\n\n if (specialTags.indexOf(tag) !== -1 && tag !== 'address' && tag !== 'div' && tag !== 'p') {\n ancestorInfo.listItemTagAutoclosing = null;\n ancestorInfo.dlItemTagAutoclosing = null;\n }\n\n ancestorInfo.current = info;\n\n if (tag === 'form') {\n ancestorInfo.formTag = info;\n }\n\n if (tag === 'a') {\n ancestorInfo.aTagInScope = info;\n }\n\n if (tag === 'button') {\n ancestorInfo.buttonTagInScope = info;\n }\n\n if (tag === 'nobr') {\n ancestorInfo.nobrTagInScope = info;\n }\n\n if (tag === 'p') {\n ancestorInfo.pTagInButtonScope = info;\n }\n\n if (tag === 'li') {\n ancestorInfo.listItemTagAutoclosing = info;\n }\n\n if (tag === 'dd' || tag === 'dt') {\n ancestorInfo.dlItemTagAutoclosing = info;\n }\n\n return ancestorInfo;\n };\n /**\n * Returns whether\n */\n\n\n var isTagValidWithParent = function (tag, parentTag) {\n // First, let's check if we're in an unusual parsing mode...\n switch (parentTag) {\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inselect\n case 'select':\n return tag === 'option' || tag === 'optgroup' || tag === '#text';\n\n case 'optgroup':\n return tag === 'option' || tag === '#text';\n // Strictly speaking, seeing an <option> doesn't mean we're in a <select>\n // but\n\n case 'option':\n return tag === '#text';\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intd\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incaption\n // No special behavior since these rules fall back to \"in body\" mode for\n // all except special table nodes which cause bad parsing behavior anyway.\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intr\n\n case 'tr':\n return tag === 'th' || tag === 'td' || tag === 'style' || tag === 'script' || tag === 'template';\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intbody\n\n case 'tbody':\n case 'thead':\n case 'tfoot':\n return tag === 'tr' || tag === 'style' || tag === 'script' || tag === 'template';\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incolgroup\n\n case 'colgroup':\n return tag === 'col' || tag === 'template';\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intable\n\n case 'table':\n return tag === 'caption' || tag === 'colgroup' || tag === 'tbody' || tag === 'tfoot' || tag === 'thead' || tag === 'style' || tag === 'script' || tag === 'template';\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inhead\n\n case 'head':\n return tag === 'base' || tag === 'basefont' || tag === 'bgsound' || tag === 'link' || tag === 'meta' || tag === 'title' || tag === 'noscript' || tag === 'noframes' || tag === 'style' || tag === 'script' || tag === 'template';\n // https://html.spec.whatwg.org/multipage/semantics.html#the-html-element\n\n case 'html':\n return tag === 'head' || tag === 'body' || tag === 'frameset';\n\n case 'frameset':\n return tag === 'frame';\n\n case '#document':\n return tag === 'html';\n } // Probably in the \"in body\" parsing mode, so we outlaw only tag combos\n // where the parsing rules cause implicit opens or closes to be added.\n // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody\n\n\n switch (tag) {\n case 'h1':\n case 'h2':\n case 'h3':\n case 'h4':\n case 'h5':\n case 'h6':\n return parentTag !== 'h1' && parentTag !== 'h2' && parentTag !== 'h3' && parentTag !== 'h4' && parentTag !== 'h5' && parentTag !== 'h6';\n\n case 'rp':\n case 'rt':\n return impliedEndTags.indexOf(parentTag) === -1;\n\n case 'body':\n case 'caption':\n case 'col':\n case 'colgroup':\n case 'frameset':\n case 'frame':\n case 'head':\n case 'html':\n case 'tbody':\n case 'td':\n case 'tfoot':\n case 'th':\n case 'thead':\n case 'tr':\n // These tags are only valid with a few parents that have special child\n // parsing rules -- if we're down here, then none of those matched and\n // so we allow it only if we don't know what the parent is, as all other\n // cases are invalid.\n return parentTag == null;\n }\n\n return true;\n };\n /**\n * Returns whether\n */\n\n\n var findInvalidAncestorForTag = function (tag, ancestorInfo) {\n switch (tag) {\n case 'address':\n case 'article':\n case 'aside':\n case 'blockquote':\n case 'center':\n case 'details':\n case 'dialog':\n case 'dir':\n case 'div':\n case 'dl':\n case 'fieldset':\n case 'figcaption':\n case 'figure':\n case 'footer':\n case 'header':\n case 'hgroup':\n case 'main':\n case 'menu':\n case 'nav':\n case 'ol':\n case 'p':\n case 'section':\n case 'summary':\n case 'ul':\n case 'pre':\n case 'listing':\n case 'table':\n case 'hr':\n case 'xmp':\n case 'h1':\n case 'h2':\n case 'h3':\n case 'h4':\n case 'h5':\n case 'h6':\n return ancestorInfo.pTagInButtonScope;\n\n case 'form':\n return ancestorInfo.formTag || ancestorInfo.pTagInButtonScope;\n\n case 'li':\n return ancestorInfo.listItemTagAutoclosing;\n\n case 'dd':\n case 'dt':\n return ancestorInfo.dlItemTagAutoclosing;\n\n case 'button':\n return ancestorInfo.buttonTagInScope;\n\n case 'a':\n // Spec says something about storing a list of markers, but it sounds\n // equivalent to this check.\n return ancestorInfo.aTagInScope;\n\n case 'nobr':\n return ancestorInfo.nobrTagInScope;\n }\n\n return null;\n };\n\n var didWarn$1 = {};\n\n validateDOMNesting = function (childTag, childText, ancestorInfo) {\n ancestorInfo = ancestorInfo || emptyAncestorInfo;\n var parentInfo = ancestorInfo.current;\n var parentTag = parentInfo && parentInfo.tag;\n\n if (childText != null) {\n if (childTag != null) {\n error('validateDOMNesting: when childText is passed, childTag should be null');\n }\n\n childTag = '#text';\n }\n\n var invalidParent = isTagValidWithParent(childTag, parentTag) ? null : parentInfo;\n var invalidAncestor = invalidParent ? null : findInvalidAncestorForTag(childTag, ancestorInfo);\n var invalidParentOrAncestor = invalidParent || invalidAncestor;\n\n if (!invalidParentOrAncestor) {\n return;\n }\n\n var ancestorTag = invalidParentOrAncestor.tag;\n var warnKey = !!invalidParent + '|' + childTag + '|' + ancestorTag;\n\n if (didWarn$1[warnKey]) {\n return;\n }\n\n didWarn$1[warnKey] = true;\n var tagDisplayName = childTag;\n var whitespaceInfo = '';\n\n if (childTag === '#text') {\n if (/\\S/.test(childText)) {\n tagDisplayName = 'Text nodes';\n } else {\n tagDisplayName = 'Whitespace text nodes';\n whitespaceInfo = \" Make sure you don't have any extra whitespace between tags on \" + 'each line of your source code.';\n }\n } else {\n tagDisplayName = '<' + childTag + '>';\n }\n\n if (invalidParent) {\n var info = '';\n\n if (ancestorTag === 'table' && childTag === 'tr') {\n info += ' Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by ' + 'the browser.';\n }\n\n error('validateDOMNesting(...): %s cannot appear as a child of <%s>.%s%s', tagDisplayName, ancestorTag, whitespaceInfo, info);\n } else {\n error('validateDOMNesting(...): %s cannot appear as a descendant of ' + '<%s>.', tagDisplayName, ancestorTag);\n }\n };\n}\n\nvar SUPPRESS_HYDRATION_WARNING$1;\n\n{\n SUPPRESS_HYDRATION_WARNING$1 = 'suppressHydrationWarning';\n}\n\nvar SUSPENSE_START_DATA = '$';\nvar SUSPENSE_END_DATA = '/$';\nvar SUSPENSE_PENDING_START_DATA = '$?';\nvar SUSPENSE_FALLBACK_START_DATA = '$!';\nvar STYLE$1 = 'style';\nvar eventsEnabled = null;\nvar selectionInformation = null;\n\nfunction shouldAutoFocusHostComponent(type, props) {\n switch (type) {\n case 'button':\n case 'input':\n case 'select':\n case 'textarea':\n return !!props.autoFocus;\n }\n\n return false;\n}\nfunction getRootHostContext(rootContainerInstance) {\n var type;\n var namespace;\n var nodeType = rootContainerInstance.nodeType;\n\n switch (nodeType) {\n case DOCUMENT_NODE:\n case DOCUMENT_FRAGMENT_NODE:\n {\n type = nodeType === DOCUMENT_NODE ? '#document' : '#fragment';\n var root = rootContainerInstance.documentElement;\n namespace = root ? root.namespaceURI : getChildNamespace(null, '');\n break;\n }\n\n default:\n {\n var container = nodeType === COMMENT_NODE ? rootContainerInstance.parentNode : rootContainerInstance;\n var ownNamespace = container.namespaceURI || null;\n type = container.tagName;\n namespace = getChildNamespace(ownNamespace, type);\n break;\n }\n }\n\n {\n var validatedTag = type.toLowerCase();\n var ancestorInfo = updatedAncestorInfo(null, validatedTag);\n return {\n namespace: namespace,\n ancestorInfo: ancestorInfo\n };\n }\n}\nfunction getChildHostContext(parentHostContext, type, rootContainerInstance) {\n {\n var parentHostContextDev = parentHostContext;\n var namespace = getChildNamespace(parentHostContextDev.namespace, type);\n var ancestorInfo = updatedAncestorInfo(parentHostContextDev.ancestorInfo, type);\n return {\n namespace: namespace,\n ancestorInfo: ancestorInfo\n };\n }\n}\nfunction getPublicInstance(instance) {\n return instance;\n}\nfunction prepareForCommit(containerInfo) {\n eventsEnabled = isEnabled();\n selectionInformation = getSelectionInformation();\n var activeInstance = null;\n\n setEnabled(false);\n return activeInstance;\n}\nfunction resetAfterCommit(containerInfo) {\n restoreSelection(selectionInformation);\n setEnabled(eventsEnabled);\n eventsEnabled = null;\n selectionInformation = null;\n}\nfunction createInstance(type, props, rootContainerInstance, hostContext, internalInstanceHandle) {\n var parentNamespace;\n\n {\n // TODO: take namespace into account when validating.\n var hostContextDev = hostContext;\n validateDOMNesting(type, null, hostContextDev.ancestorInfo);\n\n if (typeof props.children === 'string' || typeof props.children === 'number') {\n var string = '' + props.children;\n var ownAncestorInfo = updatedAncestorInfo(hostContextDev.ancestorInfo, type);\n validateDOMNesting(null, string, ownAncestorInfo);\n }\n\n parentNamespace = hostContextDev.namespace;\n }\n\n var domElement = createElement(type, props, rootContainerInstance, parentNamespace);\n precacheFiberNode(internalInstanceHandle, domElement);\n updateFiberProps(domElement, props);\n return domElement;\n}\nfunction appendInitialChild(parentInstance, child) {\n parentInstance.appendChild(child);\n}\nfunction finalizeInitialChildren(domElement, type, props, rootContainerInstance, hostContext) {\n setInitialProperties(domElement, type, props, rootContainerInstance);\n return shouldAutoFocusHostComponent(type, props);\n}\nfunction prepareUpdate(domElement, type, oldProps, newProps, rootContainerInstance, hostContext) {\n {\n var hostContextDev = hostContext;\n\n if (typeof newProps.children !== typeof oldProps.children && (typeof newProps.children === 'string' || typeof newProps.children === 'number')) {\n var string = '' + newProps.children;\n var ownAncestorInfo = updatedAncestorInfo(hostContextDev.ancestorInfo, type);\n validateDOMNesting(null, string, ownAncestorInfo);\n }\n }\n\n return diffProperties(domElement, type, oldProps, newProps);\n}\nfunction shouldSetTextContent(type, props) {\n return type === 'textarea' || type === 'option' || type === 'noscript' || typeof props.children === 'string' || typeof props.children === 'number' || typeof props.dangerouslySetInnerHTML === 'object' && props.dangerouslySetInnerHTML !== null && props.dangerouslySetInnerHTML.__html != null;\n}\nfunction createTextInstance(text, rootContainerInstance, hostContext, internalInstanceHandle) {\n {\n var hostContextDev = hostContext;\n validateDOMNesting(null, text, hostContextDev.ancestorInfo);\n }\n\n var textNode = createTextNode(text, rootContainerInstance);\n precacheFiberNode(internalInstanceHandle, textNode);\n return textNode;\n}\n// if a component just imports ReactDOM (e.g. for findDOMNode).\n// Some environments might not have setTimeout or clearTimeout.\n\nvar scheduleTimeout = typeof setTimeout === 'function' ? setTimeout : undefined;\nvar cancelTimeout = typeof clearTimeout === 'function' ? clearTimeout : undefined;\nvar noTimeout = -1; // -------------------\nfunction commitMount(domElement, type, newProps, internalInstanceHandle) {\n // Despite the naming that might imply otherwise, this method only\n // fires if there is an `Update` effect scheduled during mounting.\n // This happens if `finalizeInitialChildren` returns `true` (which it\n // does to implement the `autoFocus` attribute on the client). But\n // there are also other cases when this might happen (such as patching\n // up text content during hydration mismatch). So we'll check this again.\n if (shouldAutoFocusHostComponent(type, newProps)) {\n domElement.focus();\n }\n}\nfunction commitUpdate(domElement, updatePayload, type, oldProps, newProps, internalInstanceHandle) {\n // Update the props handle so that we know which props are the ones with\n // with current event handlers.\n updateFiberProps(domElement, newProps); // Apply the diff to the DOM node.\n\n updateProperties(domElement, updatePayload, type, oldProps, newProps);\n}\nfunction resetTextContent(domElement) {\n setTextContent(domElement, '');\n}\nfunction commitTextUpdate(textInstance, oldText, newText) {\n textInstance.nodeValue = newText;\n}\nfunction appendChild(parentInstance, child) {\n parentInstance.appendChild(child);\n}\nfunction appendChildToContainer(container, child) {\n var parentNode;\n\n if (container.nodeType === COMMENT_NODE) {\n parentNode = container.parentNode;\n parentNode.insertBefore(child, container);\n } else {\n parentNode = container;\n parentNode.appendChild(child);\n } // This container might be used for a portal.\n // If something inside a portal is clicked, that click should bubble\n // through the React tree. However, on Mobile Safari the click would\n // never bubble through the *DOM* tree unless an ancestor with onclick\n // event exists. So we wouldn't see it and dispatch it.\n // This is why we ensure that non React root containers have inline onclick\n // defined.\n // https://github.com/facebook/react/issues/11918\n\n\n var reactRootContainer = container._reactRootContainer;\n\n if ((reactRootContainer === null || reactRootContainer === undefined) && parentNode.onclick === null) {\n // TODO: This cast may not be sound for SVG, MathML or custom elements.\n trapClickOnNonInteractiveElement(parentNode);\n }\n}\nfunction insertBefore(parentInstance, child, beforeChild) {\n parentInstance.insertBefore(child, beforeChild);\n}\nfunction insertInContainerBefore(container, child, beforeChild) {\n if (container.nodeType === COMMENT_NODE) {\n container.parentNode.insertBefore(child, beforeChild);\n } else {\n container.insertBefore(child, beforeChild);\n }\n}\n\nfunction removeChild(parentInstance, child) {\n parentInstance.removeChild(child);\n}\nfunction removeChildFromContainer(container, child) {\n if (container.nodeType === COMMENT_NODE) {\n container.parentNode.removeChild(child);\n } else {\n container.removeChild(child);\n }\n}\nfunction hideInstance(instance) {\n // TODO: Does this work for all element types? What about MathML? Should we\n // pass host context to this method?\n instance = instance;\n var style = instance.style;\n\n if (typeof style.setProperty === 'function') {\n style.setProperty('display', 'none', 'important');\n } else {\n style.display = 'none';\n }\n}\nfunction hideTextInstance(textInstance) {\n textInstance.nodeValue = '';\n}\nfunction unhideInstance(instance, props) {\n instance = instance;\n var styleProp = props[STYLE$1];\n var display = styleProp !== undefined && styleProp !== null && styleProp.hasOwnProperty('display') ? styleProp.display : null;\n instance.style.display = dangerousStyleValue('display', display);\n}\nfunction unhideTextInstance(textInstance, text) {\n textInstance.nodeValue = text;\n}\nfunction clearContainer(container) {\n if (container.nodeType === ELEMENT_NODE) {\n container.textContent = '';\n } else if (container.nodeType === DOCUMENT_NODE) {\n var body = container.body;\n\n if (body != null) {\n body.textContent = '';\n }\n }\n} // -------------------\nfunction canHydrateInstance(instance, type, props) {\n if (instance.nodeType !== ELEMENT_NODE || type.toLowerCase() !== instance.nodeName.toLowerCase()) {\n return null;\n } // This has now been refined to an element node.\n\n\n return instance;\n}\nfunction canHydrateTextInstance(instance, text) {\n if (text === '' || instance.nodeType !== TEXT_NODE) {\n // Empty strings are not parsed by HTML so there won't be a correct match here.\n return null;\n } // This has now been refined to a text node.\n\n\n return instance;\n}\nfunction isSuspenseInstancePending(instance) {\n return instance.data === SUSPENSE_PENDING_START_DATA;\n}\nfunction isSuspenseInstanceFallback(instance) {\n return instance.data === SUSPENSE_FALLBACK_START_DATA;\n}\n\nfunction getNextHydratable(node) {\n // Skip non-hydratable nodes.\n for (; node != null; node = node.nextSibling) {\n var nodeType = node.nodeType;\n\n if (nodeType === ELEMENT_NODE || nodeType === TEXT_NODE) {\n break;\n }\n }\n\n return node;\n}\n\nfunction getNextHydratableSibling(instance) {\n return getNextHydratable(instance.nextSibling);\n}\nfunction getFirstHydratableChild(parentInstance) {\n return getNextHydratable(parentInstance.firstChild);\n}\nfunction hydrateInstance(instance, type, props, rootContainerInstance, hostContext, internalInstanceHandle) {\n precacheFiberNode(internalInstanceHandle, instance); // TODO: Possibly defer this until the commit phase where all the events\n // get attached.\n\n updateFiberProps(instance, props);\n var parentNamespace;\n\n {\n var hostContextDev = hostContext;\n parentNamespace = hostContextDev.namespace;\n }\n\n return diffHydratedProperties(instance, type, props, parentNamespace);\n}\nfunction hydrateTextInstance(textInstance, text, internalInstanceHandle) {\n precacheFiberNode(internalInstanceHandle, textInstance);\n return diffHydratedText(textInstance, text);\n}\nfunction getNextHydratableInstanceAfterSuspenseInstance(suspenseInstance) {\n var node = suspenseInstance.nextSibling; // Skip past all nodes within this suspense boundary.\n // There might be nested nodes so we need to keep track of how\n // deep we are and only break out when we're back on top.\n\n var depth = 0;\n\n while (node) {\n if (node.nodeType === COMMENT_NODE) {\n var data = node.data;\n\n if (data === SUSPENSE_END_DATA) {\n if (depth === 0) {\n return getNextHydratableSibling(node);\n } else {\n depth--;\n }\n } else if (data === SUSPENSE_START_DATA || data === SUSPENSE_FALLBACK_START_DATA || data === SUSPENSE_PENDING_START_DATA) {\n depth++;\n }\n }\n\n node = node.nextSibling;\n } // TODO: Warn, we didn't find the end comment boundary.\n\n\n return null;\n} // Returns the SuspenseInstance if this node is a direct child of a\n// SuspenseInstance. I.e. if its previous sibling is a Comment with\n// SUSPENSE_x_START_DATA. Otherwise, null.\n\nfunction getParentSuspenseInstance(targetInstance) {\n var node = targetInstance.previousSibling; // Skip past all nodes within this suspense boundary.\n // There might be nested nodes so we need to keep track of how\n // deep we are and only break out when we're back on top.\n\n var depth = 0;\n\n while (node) {\n if (node.nodeType === COMMENT_NODE) {\n var data = node.data;\n\n if (data === SUSPENSE_START_DATA || data === SUSPENSE_FALLBACK_START_DATA || data === SUSPENSE_PENDING_START_DATA) {\n if (depth === 0) {\n return node;\n } else {\n depth--;\n }\n } else if (data === SUSPENSE_END_DATA) {\n depth++;\n }\n }\n\n node = node.previousSibling;\n }\n\n return null;\n}\nfunction commitHydratedContainer(container) {\n // Retry if any event replaying was blocked on this.\n retryIfBlockedOn(container);\n}\nfunction commitHydratedSuspenseInstance(suspenseInstance) {\n // Retry if any event replaying was blocked on this.\n retryIfBlockedOn(suspenseInstance);\n}\nfunction didNotMatchHydratedContainerTextInstance(parentContainer, textInstance, text) {\n {\n warnForUnmatchedText(textInstance, text);\n }\n}\nfunction didNotMatchHydratedTextInstance(parentType, parentProps, parentInstance, textInstance, text) {\n if ( parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {\n warnForUnmatchedText(textInstance, text);\n }\n}\nfunction didNotHydrateContainerInstance(parentContainer, instance) {\n {\n if (instance.nodeType === ELEMENT_NODE) {\n warnForDeletedHydratableElement(parentContainer, instance);\n } else if (instance.nodeType === COMMENT_NODE) ; else {\n warnForDeletedHydratableText(parentContainer, instance);\n }\n }\n}\nfunction didNotHydrateInstance(parentType, parentProps, parentInstance, instance) {\n if ( parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {\n if (instance.nodeType === ELEMENT_NODE) {\n warnForDeletedHydratableElement(parentInstance, instance);\n } else if (instance.nodeType === COMMENT_NODE) ; else {\n warnForDeletedHydratableText(parentInstance, instance);\n }\n }\n}\nfunction didNotFindHydratableContainerInstance(parentContainer, type, props) {\n {\n warnForInsertedHydratedElement(parentContainer, type);\n }\n}\nfunction didNotFindHydratableContainerTextInstance(parentContainer, text) {\n {\n warnForInsertedHydratedText(parentContainer, text);\n }\n}\nfunction didNotFindHydratableInstance(parentType, parentProps, parentInstance, type, props) {\n if ( parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {\n warnForInsertedHydratedElement(parentInstance, type);\n }\n}\nfunction didNotFindHydratableTextInstance(parentType, parentProps, parentInstance, text) {\n if ( parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {\n warnForInsertedHydratedText(parentInstance, text);\n }\n}\nfunction didNotFindHydratableSuspenseInstance(parentType, parentProps, parentInstance) {\n if ( parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) ;\n}\nvar clientId = 0;\nfunction makeClientIdInDEV(warnOnAccessInDEV) {\n var id = 'r:' + (clientId++).toString(36);\n return {\n toString: function () {\n warnOnAccessInDEV();\n return id;\n },\n valueOf: function () {\n warnOnAccessInDEV();\n return id;\n }\n };\n}\nfunction isOpaqueHydratingObject(value) {\n return value !== null && typeof value === 'object' && value.$$typeof === REACT_OPAQUE_ID_TYPE;\n}\nfunction makeOpaqueHydratingObject(attemptToReadValue) {\n return {\n $$typeof: REACT_OPAQUE_ID_TYPE,\n toString: attemptToReadValue,\n valueOf: attemptToReadValue\n };\n}\nfunction preparePortalMount(portalInstance) {\n {\n listenToAllSupportedEvents(portalInstance);\n }\n}\n\nvar randomKey = Math.random().toString(36).slice(2);\nvar internalInstanceKey = '__reactFiber$' + randomKey;\nvar internalPropsKey = '__reactProps$' + randomKey;\nvar internalContainerInstanceKey = '__reactContainer$' + randomKey;\nvar internalEventHandlersKey = '__reactEvents$' + randomKey;\nfunction precacheFiberNode(hostInst, node) {\n node[internalInstanceKey] = hostInst;\n}\nfunction markContainerAsRoot(hostRoot, node) {\n node[internalContainerInstanceKey] = hostRoot;\n}\nfunction unmarkContainerAsRoot(node) {\n node[internalContainerInstanceKey] = null;\n}\nfunction isContainerMarkedAsRoot(node) {\n return !!node[internalContainerInstanceKey];\n} // Given a DOM node, return the closest HostComponent or HostText fiber ancestor.\n// If the target node is part of a hydrated or not yet rendered subtree, then\n// this may also return a SuspenseComponent or HostRoot to indicate that.\n// Conceptually the HostRoot fiber is a child of the Container node. So if you\n// pass the Container node as the targetNode, you will not actually get the\n// HostRoot back. To get to the HostRoot, you need to pass a child of it.\n// The same thing applies to Suspense boundaries.\n\nfunction getClosestInstanceFromNode(targetNode) {\n var targetInst = targetNode[internalInstanceKey];\n\n if (targetInst) {\n // Don't return HostRoot or SuspenseComponent here.\n return targetInst;\n } // If the direct event target isn't a React owned DOM node, we need to look\n // to see if one of its parents is a React owned DOM node.\n\n\n var parentNode = targetNode.parentNode;\n\n while (parentNode) {\n // We'll check if this is a container root that could include\n // React nodes in the future. We need to check this first because\n // if we're a child of a dehydrated container, we need to first\n // find that inner container before moving on to finding the parent\n // instance. Note that we don't check this field on the targetNode\n // itself because the fibers are conceptually between the container\n // node and the first child. It isn't surrounding the container node.\n // If it's not a container, we check if it's an instance.\n targetInst = parentNode[internalContainerInstanceKey] || parentNode[internalInstanceKey];\n\n if (targetInst) {\n // Since this wasn't the direct target of the event, we might have\n // stepped past dehydrated DOM nodes to get here. However they could\n // also have been non-React nodes. We need to answer which one.\n // If we the instance doesn't have any children, then there can't be\n // a nested suspense boundary within it. So we can use this as a fast\n // bailout. Most of the time, when people add non-React children to\n // the tree, it is using a ref to a child-less DOM node.\n // Normally we'd only need to check one of the fibers because if it\n // has ever gone from having children to deleting them or vice versa\n // it would have deleted the dehydrated boundary nested inside already.\n // However, since the HostRoot starts out with an alternate it might\n // have one on the alternate so we need to check in case this was a\n // root.\n var alternate = targetInst.alternate;\n\n if (targetInst.child !== null || alternate !== null && alternate.child !== null) {\n // Next we need to figure out if the node that skipped past is\n // nested within a dehydrated boundary and if so, which one.\n var suspenseInstance = getParentSuspenseInstance(targetNode);\n\n while (suspenseInstance !== null) {\n // We found a suspense instance. That means that we haven't\n // hydrated it yet. Even though we leave the comments in the\n // DOM after hydrating, and there are boundaries in the DOM\n // that could already be hydrated, we wouldn't have found them\n // through this pass since if the target is hydrated it would\n // have had an internalInstanceKey on it.\n // Let's get the fiber associated with the SuspenseComponent\n // as the deepest instance.\n var targetSuspenseInst = suspenseInstance[internalInstanceKey];\n\n if (targetSuspenseInst) {\n return targetSuspenseInst;\n } // If we don't find a Fiber on the comment, it might be because\n // we haven't gotten to hydrate it yet. There might still be a\n // parent boundary that hasn't above this one so we need to find\n // the outer most that is known.\n\n\n suspenseInstance = getParentSuspenseInstance(suspenseInstance); // If we don't find one, then that should mean that the parent\n // host component also hasn't hydrated yet. We can return it\n // below since it will bail out on the isMounted check later.\n }\n }\n\n return targetInst;\n }\n\n targetNode = parentNode;\n parentNode = targetNode.parentNode;\n }\n\n return null;\n}\n/**\n * Given a DOM node, return the ReactDOMComponent or ReactDOMTextComponent\n * instance, or null if the node was not rendered by this React.\n */\n\nfunction getInstanceFromNode(node) {\n var inst = node[internalInstanceKey] || node[internalContainerInstanceKey];\n\n if (inst) {\n if (inst.tag === HostComponent || inst.tag === HostText || inst.tag === SuspenseComponent || inst.tag === HostRoot) {\n return inst;\n } else {\n return null;\n }\n }\n\n return null;\n}\n/**\n * Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding\n * DOM node.\n */\n\nfunction getNodeFromInstance(inst) {\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber this, is just the state node right now. We assume it will be\n // a host component or host text.\n return inst.stateNode;\n } // Without this first invariant, passing a non-DOM-component triggers the next\n // invariant for a missing parent, which is super confusing.\n\n\n {\n {\n throw Error( \"getNodeFromInstance: Invalid argument.\" );\n }\n }\n}\nfunction getFiberCurrentPropsFromNode(node) {\n return node[internalPropsKey] || null;\n}\nfunction updateFiberProps(node, props) {\n node[internalPropsKey] = props;\n}\nfunction getEventListenerSet(node) {\n var elementListenerSet = node[internalEventHandlersKey];\n\n if (elementListenerSet === undefined) {\n elementListenerSet = node[internalEventHandlersKey] = new Set();\n }\n\n return elementListenerSet;\n}\n\nvar loggedTypeFailures = {};\nvar ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;\n\nfunction setCurrentlyValidatingElement(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n ReactDebugCurrentFrame$1.setExtraStackFrame(stack);\n } else {\n ReactDebugCurrentFrame$1.setExtraStackFrame(null);\n }\n }\n}\n\nfunction checkPropTypes(typeSpecs, values, location, componentName, element) {\n {\n // $FlowFixMe This is okay but Flow doesn't know it.\n var has = Function.call.bind(Object.prototype.hasOwnProperty);\n\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n 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`.');\n err.name = 'Invariant Violation';\n throw err;\n }\n\n error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');\n } catch (ex) {\n error$1 = ex;\n }\n\n if (error$1 && !(error$1 instanceof Error)) {\n setCurrentlyValidatingElement(element);\n\n 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);\n\n setCurrentlyValidatingElement(null);\n }\n\n if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error$1.message] = true;\n setCurrentlyValidatingElement(element);\n\n error('Failed %s type: %s', location, error$1.message);\n\n setCurrentlyValidatingElement(null);\n }\n }\n }\n }\n}\n\nvar valueStack = [];\nvar fiberStack;\n\n{\n fiberStack = [];\n}\n\nvar index = -1;\n\nfunction createCursor(defaultValue) {\n return {\n current: defaultValue\n };\n}\n\nfunction pop(cursor, fiber) {\n if (index < 0) {\n {\n error('Unexpected pop.');\n }\n\n return;\n }\n\n {\n if (fiber !== fiberStack[index]) {\n error('Unexpected Fiber popped.');\n }\n }\n\n cursor.current = valueStack[index];\n valueStack[index] = null;\n\n {\n fiberStack[index] = null;\n }\n\n index--;\n}\n\nfunction push(cursor, value, fiber) {\n index++;\n valueStack[index] = cursor.current;\n\n {\n fiberStack[index] = fiber;\n }\n\n cursor.current = value;\n}\n\nvar warnedAboutMissingGetChildContext;\n\n{\n warnedAboutMissingGetChildContext = {};\n}\n\nvar emptyContextObject = {};\n\n{\n Object.freeze(emptyContextObject);\n} // A cursor to the current merged context object on the stack.\n\n\nvar contextStackCursor = createCursor(emptyContextObject); // A cursor to a boolean indicating whether the context has changed.\n\nvar didPerformWorkStackCursor = createCursor(false); // Keep track of the previous context object that was on the stack.\n// We use this to get access to the parent context after we have already\n// pushed the next context provider, and now need to merge their contexts.\n\nvar previousContext = emptyContextObject;\n\nfunction getUnmaskedContext(workInProgress, Component, didPushOwnContextIfProvider) {\n {\n if (didPushOwnContextIfProvider && isContextProvider(Component)) {\n // If the fiber is a context provider itself, when we read its context\n // we may have already pushed its own child context on the stack. A context\n // provider should not \"see\" its own child context. Therefore we read the\n // previous (parent) context instead for a context provider.\n return previousContext;\n }\n\n return contextStackCursor.current;\n }\n}\n\nfunction cacheContext(workInProgress, unmaskedContext, maskedContext) {\n {\n var instance = workInProgress.stateNode;\n instance.__reactInternalMemoizedUnmaskedChildContext = unmaskedContext;\n instance.__reactInternalMemoizedMaskedChildContext = maskedContext;\n }\n}\n\nfunction getMaskedContext(workInProgress, unmaskedContext) {\n {\n var type = workInProgress.type;\n var contextTypes = type.contextTypes;\n\n if (!contextTypes) {\n return emptyContextObject;\n } // Avoid recreating masked context unless unmasked context has changed.\n // Failing to do this will result in unnecessary calls to componentWillReceiveProps.\n // This may trigger infinite loops if componentWillReceiveProps calls setState.\n\n\n var instance = workInProgress.stateNode;\n\n if (instance && instance.__reactInternalMemoizedUnmaskedChildContext === unmaskedContext) {\n return instance.__reactInternalMemoizedMaskedChildContext;\n }\n\n var context = {};\n\n for (var key in contextTypes) {\n context[key] = unmaskedContext[key];\n }\n\n {\n var name = getComponentName(type) || 'Unknown';\n checkPropTypes(contextTypes, context, 'context', name);\n } // Cache unmasked context so we can avoid recreating masked context unless necessary.\n // Context is created before the class component is instantiated so check for instance.\n\n\n if (instance) {\n cacheContext(workInProgress, unmaskedContext, context);\n }\n\n return context;\n }\n}\n\nfunction hasContextChanged() {\n {\n return didPerformWorkStackCursor.current;\n }\n}\n\nfunction isContextProvider(type) {\n {\n var childContextTypes = type.childContextTypes;\n return childContextTypes !== null && childContextTypes !== undefined;\n }\n}\n\nfunction popContext(fiber) {\n {\n pop(didPerformWorkStackCursor, fiber);\n pop(contextStackCursor, fiber);\n }\n}\n\nfunction popTopLevelContextObject(fiber) {\n {\n pop(didPerformWorkStackCursor, fiber);\n pop(contextStackCursor, fiber);\n }\n}\n\nfunction pushTopLevelContextObject(fiber, context, didChange) {\n {\n if (!(contextStackCursor.current === emptyContextObject)) {\n {\n throw Error( \"Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n push(contextStackCursor, context, fiber);\n push(didPerformWorkStackCursor, didChange, fiber);\n }\n}\n\nfunction processChildContext(fiber, type, parentContext) {\n {\n var instance = fiber.stateNode;\n var childContextTypes = type.childContextTypes; // TODO (bvaughn) Replace this behavior with an invariant() in the future.\n // It has only been added in Fiber to match the (unintentional) behavior in Stack.\n\n if (typeof instance.getChildContext !== 'function') {\n {\n var componentName = getComponentName(type) || 'Unknown';\n\n if (!warnedAboutMissingGetChildContext[componentName]) {\n warnedAboutMissingGetChildContext[componentName] = true;\n\n error('%s.childContextTypes is specified but there is no getChildContext() method ' + 'on the instance. You can either define getChildContext() on %s or remove ' + 'childContextTypes from it.', componentName, componentName);\n }\n }\n\n return parentContext;\n }\n\n var childContext = instance.getChildContext();\n\n for (var contextKey in childContext) {\n if (!(contextKey in childContextTypes)) {\n {\n throw Error( (getComponentName(type) || 'Unknown') + \".getChildContext(): key \\\"\" + contextKey + \"\\\" is not defined in childContextTypes.\" );\n }\n }\n }\n\n {\n var name = getComponentName(type) || 'Unknown';\n checkPropTypes(childContextTypes, childContext, 'child context', name);\n }\n\n return _assign({}, parentContext, childContext);\n }\n}\n\nfunction pushContextProvider(workInProgress) {\n {\n var instance = workInProgress.stateNode; // We push the context as early as possible to ensure stack integrity.\n // If the instance does not exist yet, we will push null at first,\n // and replace it on the stack later when invalidating the context.\n\n var memoizedMergedChildContext = instance && instance.__reactInternalMemoizedMergedChildContext || emptyContextObject; // Remember the parent context so we can merge with it later.\n // Inherit the parent's did-perform-work value to avoid inadvertently blocking updates.\n\n previousContext = contextStackCursor.current;\n push(contextStackCursor, memoizedMergedChildContext, workInProgress);\n push(didPerformWorkStackCursor, didPerformWorkStackCursor.current, workInProgress);\n return true;\n }\n}\n\nfunction invalidateContextProvider(workInProgress, type, didChange) {\n {\n var instance = workInProgress.stateNode;\n\n if (!instance) {\n {\n throw Error( \"Expected to have an instance by this point. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n if (didChange) {\n // Merge parent and own context.\n // Skip this if we're not updating due to sCU.\n // This avoids unnecessarily recomputing memoized values.\n var mergedContext = processChildContext(workInProgress, type, previousContext);\n instance.__reactInternalMemoizedMergedChildContext = mergedContext; // Replace the old (or empty) context with the new one.\n // It is important to unwind the context in the reverse order.\n\n pop(didPerformWorkStackCursor, workInProgress);\n pop(contextStackCursor, workInProgress); // Now push the new context and mark that it has changed.\n\n push(contextStackCursor, mergedContext, workInProgress);\n push(didPerformWorkStackCursor, didChange, workInProgress);\n } else {\n pop(didPerformWorkStackCursor, workInProgress);\n push(didPerformWorkStackCursor, didChange, workInProgress);\n }\n }\n}\n\nfunction findCurrentUnmaskedContext(fiber) {\n {\n // Currently this is only used with renderSubtreeIntoContainer; not sure if it\n // makes sense elsewhere\n if (!(isFiberMounted(fiber) && fiber.tag === ClassComponent)) {\n {\n throw Error( \"Expected subtree parent to be a mounted class component. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n var node = fiber;\n\n do {\n switch (node.tag) {\n case HostRoot:\n return node.stateNode.context;\n\n case ClassComponent:\n {\n var Component = node.type;\n\n if (isContextProvider(Component)) {\n return node.stateNode.__reactInternalMemoizedMergedChildContext;\n }\n\n break;\n }\n }\n\n node = node.return;\n } while (node !== null);\n\n {\n {\n throw Error( \"Found unexpected detached subtree parent. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n }\n}\n\nvar LegacyRoot = 0;\nvar BlockingRoot = 1;\nvar ConcurrentRoot = 2;\n\nvar rendererID = null;\nvar injectedHook = null;\nvar hasLoggedError = false;\nvar isDevToolsPresent = typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined';\nfunction injectInternals(internals) {\n if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') {\n // No DevTools\n return false;\n }\n\n var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__;\n\n if (hook.isDisabled) {\n // This isn't a real property on the hook, but it can be set to opt out\n // of DevTools integration and associated warnings and logs.\n // https://github.com/facebook/react/issues/3877\n return true;\n }\n\n if (!hook.supportsFiber) {\n {\n error('The installed version of React DevTools is too old and will not work ' + 'with the current version of React. Please update React DevTools. ' + 'https://reactjs.org/link/react-devtools');\n } // DevTools exists, even though it doesn't support Fiber.\n\n\n return true;\n }\n\n try {\n rendererID = hook.inject(internals); // We have successfully injected, so now it is safe to set up hooks.\n\n injectedHook = hook;\n } catch (err) {\n // Catch all errors because it is unsafe to throw during initialization.\n {\n error('React instrumentation encountered an error: %s.', err);\n }\n } // DevTools exists\n\n\n return true;\n}\nfunction onScheduleRoot(root, children) {\n {\n if (injectedHook && typeof injectedHook.onScheduleFiberRoot === 'function') {\n try {\n injectedHook.onScheduleFiberRoot(rendererID, root, children);\n } catch (err) {\n if ( !hasLoggedError) {\n hasLoggedError = true;\n\n error('React instrumentation encountered an error: %s', err);\n }\n }\n }\n }\n}\nfunction onCommitRoot(root, priorityLevel) {\n if (injectedHook && typeof injectedHook.onCommitFiberRoot === 'function') {\n try {\n var didError = (root.current.flags & DidCapture) === DidCapture;\n\n if (enableProfilerTimer) {\n injectedHook.onCommitFiberRoot(rendererID, root, priorityLevel, didError);\n } else {\n injectedHook.onCommitFiberRoot(rendererID, root, undefined, didError);\n }\n } catch (err) {\n {\n if (!hasLoggedError) {\n hasLoggedError = true;\n\n error('React instrumentation encountered an error: %s', err);\n }\n }\n }\n }\n}\nfunction onCommitUnmount(fiber) {\n if (injectedHook && typeof injectedHook.onCommitFiberUnmount === 'function') {\n try {\n injectedHook.onCommitFiberUnmount(rendererID, fiber);\n } catch (err) {\n {\n if (!hasLoggedError) {\n hasLoggedError = true;\n\n error('React instrumentation encountered an error: %s', err);\n }\n }\n }\n }\n}\n\nvar Scheduler_runWithPriority = Scheduler.unstable_runWithPriority,\n Scheduler_scheduleCallback = Scheduler.unstable_scheduleCallback,\n Scheduler_cancelCallback = Scheduler.unstable_cancelCallback,\n Scheduler_shouldYield = Scheduler.unstable_shouldYield,\n Scheduler_requestPaint = Scheduler.unstable_requestPaint,\n Scheduler_now$1 = Scheduler.unstable_now,\n Scheduler_getCurrentPriorityLevel = Scheduler.unstable_getCurrentPriorityLevel,\n Scheduler_ImmediatePriority = Scheduler.unstable_ImmediatePriority,\n Scheduler_UserBlockingPriority = Scheduler.unstable_UserBlockingPriority,\n Scheduler_NormalPriority = Scheduler.unstable_NormalPriority,\n Scheduler_LowPriority = Scheduler.unstable_LowPriority,\n Scheduler_IdlePriority = Scheduler.unstable_IdlePriority;\n\n{\n // Provide explicit error message when production+profiling bundle of e.g.\n // react-dom is used with production (non-profiling) bundle of\n // scheduler/tracing\n if (!(tracing.__interactionsRef != null && tracing.__interactionsRef.current != null)) {\n {\n throw Error( \"It is not supported to run the profiling version of a renderer (for example, `react-dom/profiling`) without also replacing the `scheduler/tracing` module with `scheduler/tracing-profiling`. Your bundler might have a setting for aliasing both modules. Learn more at https://reactjs.org/link/profiling\" );\n }\n }\n}\n\nvar fakeCallbackNode = {}; // Except for NoPriority, these correspond to Scheduler priorities. We use\n// ascending numbers so we can compare them like numbers. They start at 90 to\n// avoid clashing with Scheduler's priorities.\n\nvar ImmediatePriority$1 = 99;\nvar UserBlockingPriority$2 = 98;\nvar NormalPriority$1 = 97;\nvar LowPriority$1 = 96;\nvar IdlePriority$1 = 95; // NoPriority is the absence of priority. Also React-only.\n\nvar NoPriority$1 = 90;\nvar shouldYield = Scheduler_shouldYield;\nvar requestPaint = // Fall back gracefully if we're running an older version of Scheduler.\nScheduler_requestPaint !== undefined ? Scheduler_requestPaint : function () {};\nvar syncQueue = null;\nvar immediateQueueCallbackNode = null;\nvar isFlushingSyncQueue = false;\nvar initialTimeMs$1 = Scheduler_now$1(); // If the initial timestamp is reasonably small, use Scheduler's `now` directly.\n// This will be the case for modern browsers that support `performance.now`. In\n// older browsers, Scheduler falls back to `Date.now`, which returns a Unix\n// timestamp. In that case, subtract the module initialization time to simulate\n// the behavior of performance.now and keep our times small enough to fit\n// within 32 bits.\n// TODO: Consider lifting this into Scheduler.\n\nvar now = initialTimeMs$1 < 10000 ? Scheduler_now$1 : function () {\n return Scheduler_now$1() - initialTimeMs$1;\n};\nfunction getCurrentPriorityLevel() {\n switch (Scheduler_getCurrentPriorityLevel()) {\n case Scheduler_ImmediatePriority:\n return ImmediatePriority$1;\n\n case Scheduler_UserBlockingPriority:\n return UserBlockingPriority$2;\n\n case Scheduler_NormalPriority:\n return NormalPriority$1;\n\n case Scheduler_LowPriority:\n return LowPriority$1;\n\n case Scheduler_IdlePriority:\n return IdlePriority$1;\n\n default:\n {\n {\n throw Error( \"Unknown priority level.\" );\n }\n }\n\n }\n}\n\nfunction reactPriorityToSchedulerPriority(reactPriorityLevel) {\n switch (reactPriorityLevel) {\n case ImmediatePriority$1:\n return Scheduler_ImmediatePriority;\n\n case UserBlockingPriority$2:\n return Scheduler_UserBlockingPriority;\n\n case NormalPriority$1:\n return Scheduler_NormalPriority;\n\n case LowPriority$1:\n return Scheduler_LowPriority;\n\n case IdlePriority$1:\n return Scheduler_IdlePriority;\n\n default:\n {\n {\n throw Error( \"Unknown priority level.\" );\n }\n }\n\n }\n}\n\nfunction runWithPriority$1(reactPriorityLevel, fn) {\n var priorityLevel = reactPriorityToSchedulerPriority(reactPriorityLevel);\n return Scheduler_runWithPriority(priorityLevel, fn);\n}\nfunction scheduleCallback(reactPriorityLevel, callback, options) {\n var priorityLevel = reactPriorityToSchedulerPriority(reactPriorityLevel);\n return Scheduler_scheduleCallback(priorityLevel, callback, options);\n}\nfunction scheduleSyncCallback(callback) {\n // Push this callback into an internal queue. We'll flush these either in\n // the next tick, or earlier if something calls `flushSyncCallbackQueue`.\n if (syncQueue === null) {\n syncQueue = [callback]; // Flush the queue in the next tick, at the earliest.\n\n immediateQueueCallbackNode = Scheduler_scheduleCallback(Scheduler_ImmediatePriority, flushSyncCallbackQueueImpl);\n } else {\n // Push onto existing queue. Don't need to schedule a callback because\n // we already scheduled one when we created the queue.\n syncQueue.push(callback);\n }\n\n return fakeCallbackNode;\n}\nfunction cancelCallback(callbackNode) {\n if (callbackNode !== fakeCallbackNode) {\n Scheduler_cancelCallback(callbackNode);\n }\n}\nfunction flushSyncCallbackQueue() {\n if (immediateQueueCallbackNode !== null) {\n var node = immediateQueueCallbackNode;\n immediateQueueCallbackNode = null;\n Scheduler_cancelCallback(node);\n }\n\n flushSyncCallbackQueueImpl();\n}\n\nfunction flushSyncCallbackQueueImpl() {\n if (!isFlushingSyncQueue && syncQueue !== null) {\n // Prevent re-entrancy.\n isFlushingSyncQueue = true;\n var i = 0;\n\n {\n try {\n var _isSync2 = true;\n var _queue = syncQueue;\n runWithPriority$1(ImmediatePriority$1, function () {\n for (; i < _queue.length; i++) {\n var callback = _queue[i];\n\n do {\n callback = callback(_isSync2);\n } while (callback !== null);\n }\n });\n syncQueue = null;\n } catch (error) {\n // If something throws, leave the remaining callbacks on the queue.\n if (syncQueue !== null) {\n syncQueue = syncQueue.slice(i + 1);\n } // Resume flushing in the next tick\n\n\n Scheduler_scheduleCallback(Scheduler_ImmediatePriority, flushSyncCallbackQueue);\n throw error;\n } finally {\n isFlushingSyncQueue = false;\n }\n }\n }\n}\n\n// TODO: this is special because it gets imported during build.\nvar ReactVersion = '17.0.2';\n\nvar NoMode = 0;\nvar StrictMode = 1; // TODO: Remove BlockingMode and ConcurrentMode by reading from the root\n// tag instead\n\nvar BlockingMode = 2;\nvar ConcurrentMode = 4;\nvar ProfileMode = 8;\nvar DebugTracingMode = 16;\n\nvar ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig;\nvar NoTransition = 0;\nfunction requestCurrentTransition() {\n return ReactCurrentBatchConfig.transition;\n}\n\nvar ReactStrictModeWarnings = {\n recordUnsafeLifecycleWarnings: function (fiber, instance) {},\n flushPendingUnsafeLifecycleWarnings: function () {},\n recordLegacyContextWarning: function (fiber, instance) {},\n flushLegacyContextWarning: function () {},\n discardPendingWarnings: function () {}\n};\n\n{\n var findStrictRoot = function (fiber) {\n var maybeStrictRoot = null;\n var node = fiber;\n\n while (node !== null) {\n if (node.mode & StrictMode) {\n maybeStrictRoot = node;\n }\n\n node = node.return;\n }\n\n return maybeStrictRoot;\n };\n\n var setToSortedString = function (set) {\n var array = [];\n set.forEach(function (value) {\n array.push(value);\n });\n return array.sort().join(', ');\n };\n\n var pendingComponentWillMountWarnings = [];\n var pendingUNSAFE_ComponentWillMountWarnings = [];\n var pendingComponentWillReceivePropsWarnings = [];\n var pendingUNSAFE_ComponentWillReceivePropsWarnings = [];\n var pendingComponentWillUpdateWarnings = [];\n var pendingUNSAFE_ComponentWillUpdateWarnings = []; // Tracks components we have already warned about.\n\n var didWarnAboutUnsafeLifecycles = new Set();\n\n ReactStrictModeWarnings.recordUnsafeLifecycleWarnings = function (fiber, instance) {\n // Dedup strategy: Warn once per component.\n if (didWarnAboutUnsafeLifecycles.has(fiber.type)) {\n return;\n }\n\n if (typeof instance.componentWillMount === 'function' && // Don't warn about react-lifecycles-compat polyfilled components.\n instance.componentWillMount.__suppressDeprecationWarning !== true) {\n pendingComponentWillMountWarnings.push(fiber);\n }\n\n if (fiber.mode & StrictMode && typeof instance.UNSAFE_componentWillMount === 'function') {\n pendingUNSAFE_ComponentWillMountWarnings.push(fiber);\n }\n\n if (typeof instance.componentWillReceiveProps === 'function' && instance.componentWillReceiveProps.__suppressDeprecationWarning !== true) {\n pendingComponentWillReceivePropsWarnings.push(fiber);\n }\n\n if (fiber.mode & StrictMode && typeof instance.UNSAFE_componentWillReceiveProps === 'function') {\n pendingUNSAFE_ComponentWillReceivePropsWarnings.push(fiber);\n }\n\n if (typeof instance.componentWillUpdate === 'function' && instance.componentWillUpdate.__suppressDeprecationWarning !== true) {\n pendingComponentWillUpdateWarnings.push(fiber);\n }\n\n if (fiber.mode & StrictMode && typeof instance.UNSAFE_componentWillUpdate === 'function') {\n pendingUNSAFE_ComponentWillUpdateWarnings.push(fiber);\n }\n };\n\n ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings = function () {\n // We do an initial pass to gather component names\n var componentWillMountUniqueNames = new Set();\n\n if (pendingComponentWillMountWarnings.length > 0) {\n pendingComponentWillMountWarnings.forEach(function (fiber) {\n componentWillMountUniqueNames.add(getComponentName(fiber.type) || 'Component');\n didWarnAboutUnsafeLifecycles.add(fiber.type);\n });\n pendingComponentWillMountWarnings = [];\n }\n\n var UNSAFE_componentWillMountUniqueNames = new Set();\n\n if (pendingUNSAFE_ComponentWillMountWarnings.length > 0) {\n pendingUNSAFE_ComponentWillMountWarnings.forEach(function (fiber) {\n UNSAFE_componentWillMountUniqueNames.add(getComponentName(fiber.type) || 'Component');\n didWarnAboutUnsafeLifecycles.add(fiber.type);\n });\n pendingUNSAFE_ComponentWillMountWarnings = [];\n }\n\n var componentWillReceivePropsUniqueNames = new Set();\n\n if (pendingComponentWillReceivePropsWarnings.length > 0) {\n pendingComponentWillReceivePropsWarnings.forEach(function (fiber) {\n componentWillReceivePropsUniqueNames.add(getComponentName(fiber.type) || 'Component');\n didWarnAboutUnsafeLifecycles.add(fiber.type);\n });\n pendingComponentWillReceivePropsWarnings = [];\n }\n\n var UNSAFE_componentWillReceivePropsUniqueNames = new Set();\n\n if (pendingUNSAFE_ComponentWillReceivePropsWarnings.length > 0) {\n pendingUNSAFE_ComponentWillReceivePropsWarnings.forEach(function (fiber) {\n UNSAFE_componentWillReceivePropsUniqueNames.add(getComponentName(fiber.type) || 'Component');\n didWarnAboutUnsafeLifecycles.add(fiber.type);\n });\n pendingUNSAFE_ComponentWillReceivePropsWarnings = [];\n }\n\n var componentWillUpdateUniqueNames = new Set();\n\n if (pendingComponentWillUpdateWarnings.length > 0) {\n pendingComponentWillUpdateWarnings.forEach(function (fiber) {\n componentWillUpdateUniqueNames.add(getComponentName(fiber.type) || 'Component');\n didWarnAboutUnsafeLifecycles.add(fiber.type);\n });\n pendingComponentWillUpdateWarnings = [];\n }\n\n var UNSAFE_componentWillUpdateUniqueNames = new Set();\n\n if (pendingUNSAFE_ComponentWillUpdateWarnings.length > 0) {\n pendingUNSAFE_ComponentWillUpdateWarnings.forEach(function (fiber) {\n UNSAFE_componentWillUpdateUniqueNames.add(getComponentName(fiber.type) || 'Component');\n didWarnAboutUnsafeLifecycles.add(fiber.type);\n });\n pendingUNSAFE_ComponentWillUpdateWarnings = [];\n } // Finally, we flush all the warnings\n // UNSAFE_ ones before the deprecated ones, since they'll be 'louder'\n\n\n if (UNSAFE_componentWillMountUniqueNames.size > 0) {\n var sortedNames = setToSortedString(UNSAFE_componentWillMountUniqueNames);\n\n error('Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\\n\\n' + '* Move code with side effects to componentDidMount, and set initial state in the constructor.\\n' + '\\nPlease update the following components: %s', sortedNames);\n }\n\n if (UNSAFE_componentWillReceivePropsUniqueNames.size > 0) {\n var _sortedNames = setToSortedString(UNSAFE_componentWillReceivePropsUniqueNames);\n\n error('Using UNSAFE_componentWillReceiveProps in strict mode is not recommended ' + 'and may indicate bugs in your code. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\\n\\n' + '* Move data fetching code or side effects to componentDidUpdate.\\n' + \"* If you're updating state whenever props change, \" + 'refactor your code to use memoization techniques or move it to ' + 'static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state\\n' + '\\nPlease update the following components: %s', _sortedNames);\n }\n\n if (UNSAFE_componentWillUpdateUniqueNames.size > 0) {\n var _sortedNames2 = setToSortedString(UNSAFE_componentWillUpdateUniqueNames);\n\n error('Using UNSAFE_componentWillUpdate in strict mode is not recommended ' + 'and may indicate bugs in your code. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\\n\\n' + '* Move data fetching code or side effects to componentDidUpdate.\\n' + '\\nPlease update the following components: %s', _sortedNames2);\n }\n\n if (componentWillMountUniqueNames.size > 0) {\n var _sortedNames3 = setToSortedString(componentWillMountUniqueNames);\n\n warn('componentWillMount has been renamed, and is not recommended for use. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\\n\\n' + '* Move code with side effects to componentDidMount, and set initial state in the constructor.\\n' + '* Rename componentWillMount to UNSAFE_componentWillMount to suppress ' + 'this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. ' + 'To rename all deprecated lifecycles to their new names, you can run ' + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\\n' + '\\nPlease update the following components: %s', _sortedNames3);\n }\n\n if (componentWillReceivePropsUniqueNames.size > 0) {\n var _sortedNames4 = setToSortedString(componentWillReceivePropsUniqueNames);\n\n warn('componentWillReceiveProps has been renamed, and is not recommended for use. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\\n\\n' + '* Move data fetching code or side effects to componentDidUpdate.\\n' + \"* If you're updating state whenever props change, refactor your \" + 'code to use memoization techniques or move it to ' + 'static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state\\n' + '* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress ' + 'this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. ' + 'To rename all deprecated lifecycles to their new names, you can run ' + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\\n' + '\\nPlease update the following components: %s', _sortedNames4);\n }\n\n if (componentWillUpdateUniqueNames.size > 0) {\n var _sortedNames5 = setToSortedString(componentWillUpdateUniqueNames);\n\n warn('componentWillUpdate has been renamed, and is not recommended for use. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\\n\\n' + '* Move data fetching code or side effects to componentDidUpdate.\\n' + '* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress ' + 'this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. ' + 'To rename all deprecated lifecycles to their new names, you can run ' + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\\n' + '\\nPlease update the following components: %s', _sortedNames5);\n }\n };\n\n var pendingLegacyContextWarning = new Map(); // Tracks components we have already warned about.\n\n var didWarnAboutLegacyContext = new Set();\n\n ReactStrictModeWarnings.recordLegacyContextWarning = function (fiber, instance) {\n var strictRoot = findStrictRoot(fiber);\n\n if (strictRoot === null) {\n error('Expected to find a StrictMode component in a strict mode tree. ' + 'This error is likely caused by a bug in React. Please file an issue.');\n\n return;\n } // Dedup strategy: Warn once per component.\n\n\n if (didWarnAboutLegacyContext.has(fiber.type)) {\n return;\n }\n\n var warningsForRoot = pendingLegacyContextWarning.get(strictRoot);\n\n if (fiber.type.contextTypes != null || fiber.type.childContextTypes != null || instance !== null && typeof instance.getChildContext === 'function') {\n if (warningsForRoot === undefined) {\n warningsForRoot = [];\n pendingLegacyContextWarning.set(strictRoot, warningsForRoot);\n }\n\n warningsForRoot.push(fiber);\n }\n };\n\n ReactStrictModeWarnings.flushLegacyContextWarning = function () {\n pendingLegacyContextWarning.forEach(function (fiberArray, strictRoot) {\n if (fiberArray.length === 0) {\n return;\n }\n\n var firstFiber = fiberArray[0];\n var uniqueNames = new Set();\n fiberArray.forEach(function (fiber) {\n uniqueNames.add(getComponentName(fiber.type) || 'Component');\n didWarnAboutLegacyContext.add(fiber.type);\n });\n var sortedNames = setToSortedString(uniqueNames);\n\n try {\n setCurrentFiber(firstFiber);\n\n error('Legacy context API has been detected within a strict-mode tree.' + '\\n\\nThe old API will be supported in all 16.x releases, but applications ' + 'using it should migrate to the new version.' + '\\n\\nPlease update the following components: %s' + '\\n\\nLearn more about this warning here: https://reactjs.org/link/legacy-context', sortedNames);\n } finally {\n resetCurrentFiber();\n }\n });\n };\n\n ReactStrictModeWarnings.discardPendingWarnings = function () {\n pendingComponentWillMountWarnings = [];\n pendingUNSAFE_ComponentWillMountWarnings = [];\n pendingComponentWillReceivePropsWarnings = [];\n pendingUNSAFE_ComponentWillReceivePropsWarnings = [];\n pendingComponentWillUpdateWarnings = [];\n pendingUNSAFE_ComponentWillUpdateWarnings = [];\n pendingLegacyContextWarning = new Map();\n };\n}\n\nfunction resolveDefaultProps(Component, baseProps) {\n if (Component && Component.defaultProps) {\n // Resolve default props. Taken from ReactElement\n var props = _assign({}, baseProps);\n\n var defaultProps = Component.defaultProps;\n\n for (var propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n\n return props;\n }\n\n return baseProps;\n}\n\n// Max 31 bit integer. The max integer size in V8 for 32-bit systems.\n// Math.pow(2, 30) - 1\n// 0b111111111111111111111111111111\nvar MAX_SIGNED_31_BIT_INT = 1073741823;\n\nvar valueCursor = createCursor(null);\nvar rendererSigil;\n\n{\n // Use this to detect multiple renderers using the same context\n rendererSigil = {};\n}\n\nvar currentlyRenderingFiber = null;\nvar lastContextDependency = null;\nvar lastContextWithAllBitsObserved = null;\nvar isDisallowedContextReadInDEV = false;\nfunction resetContextDependencies() {\n // This is called right before React yields execution, to ensure `readContext`\n // cannot be called outside the render phase.\n currentlyRenderingFiber = null;\n lastContextDependency = null;\n lastContextWithAllBitsObserved = null;\n\n {\n isDisallowedContextReadInDEV = false;\n }\n}\nfunction enterDisallowedContextReadInDEV() {\n {\n isDisallowedContextReadInDEV = true;\n }\n}\nfunction exitDisallowedContextReadInDEV() {\n {\n isDisallowedContextReadInDEV = false;\n }\n}\nfunction pushProvider(providerFiber, nextValue) {\n var context = providerFiber.type._context;\n\n {\n push(valueCursor, context._currentValue, providerFiber);\n context._currentValue = nextValue;\n\n {\n if (context._currentRenderer !== undefined && context._currentRenderer !== null && context._currentRenderer !== rendererSigil) {\n error('Detected multiple renderers concurrently rendering the ' + 'same context provider. This is currently unsupported.');\n }\n\n context._currentRenderer = rendererSigil;\n }\n }\n}\nfunction popProvider(providerFiber) {\n var currentValue = valueCursor.current;\n pop(valueCursor, providerFiber);\n var context = providerFiber.type._context;\n\n {\n context._currentValue = currentValue;\n }\n}\nfunction calculateChangedBits(context, newValue, oldValue) {\n if (objectIs(oldValue, newValue)) {\n // No change\n return 0;\n } else {\n var changedBits = typeof context._calculateChangedBits === 'function' ? context._calculateChangedBits(oldValue, newValue) : MAX_SIGNED_31_BIT_INT;\n\n {\n if ((changedBits & MAX_SIGNED_31_BIT_INT) !== changedBits) {\n error('calculateChangedBits: Expected the return value to be a ' + '31-bit integer. Instead received: %s', changedBits);\n }\n }\n\n return changedBits | 0;\n }\n}\nfunction scheduleWorkOnParentPath(parent, renderLanes) {\n // Update the child lanes of all the ancestors, including the alternates.\n var node = parent;\n\n while (node !== null) {\n var alternate = node.alternate;\n\n if (!isSubsetOfLanes(node.childLanes, renderLanes)) {\n node.childLanes = mergeLanes(node.childLanes, renderLanes);\n\n if (alternate !== null) {\n alternate.childLanes = mergeLanes(alternate.childLanes, renderLanes);\n }\n } else if (alternate !== null && !isSubsetOfLanes(alternate.childLanes, renderLanes)) {\n alternate.childLanes = mergeLanes(alternate.childLanes, renderLanes);\n } else {\n // Neither alternate was updated, which means the rest of the\n // ancestor path already has sufficient priority.\n break;\n }\n\n node = node.return;\n }\n}\nfunction propagateContextChange(workInProgress, context, changedBits, renderLanes) {\n var fiber = workInProgress.child;\n\n if (fiber !== null) {\n // Set the return pointer of the child to the work-in-progress fiber.\n fiber.return = workInProgress;\n }\n\n while (fiber !== null) {\n var nextFiber = void 0; // Visit this fiber.\n\n var list = fiber.dependencies;\n\n if (list !== null) {\n nextFiber = fiber.child;\n var dependency = list.firstContext;\n\n while (dependency !== null) {\n // Check if the context matches.\n if (dependency.context === context && (dependency.observedBits & changedBits) !== 0) {\n // Match! Schedule an update on this fiber.\n if (fiber.tag === ClassComponent) {\n // Schedule a force update on the work-in-progress.\n var update = createUpdate(NoTimestamp, pickArbitraryLane(renderLanes));\n update.tag = ForceUpdate; // TODO: Because we don't have a work-in-progress, this will add the\n // update to the current fiber, too, which means it will persist even if\n // this render is thrown away. Since it's a race condition, not sure it's\n // worth fixing.\n\n enqueueUpdate(fiber, update);\n }\n\n fiber.lanes = mergeLanes(fiber.lanes, renderLanes);\n var alternate = fiber.alternate;\n\n if (alternate !== null) {\n alternate.lanes = mergeLanes(alternate.lanes, renderLanes);\n }\n\n scheduleWorkOnParentPath(fiber.return, renderLanes); // Mark the updated lanes on the list, too.\n\n list.lanes = mergeLanes(list.lanes, renderLanes); // Since we already found a match, we can stop traversing the\n // dependency list.\n\n break;\n }\n\n dependency = dependency.next;\n }\n } else if (fiber.tag === ContextProvider) {\n // Don't scan deeper if this is a matching provider\n nextFiber = fiber.type === workInProgress.type ? null : fiber.child;\n } else {\n // Traverse down.\n nextFiber = fiber.child;\n }\n\n if (nextFiber !== null) {\n // Set the return pointer of the child to the work-in-progress fiber.\n nextFiber.return = fiber;\n } else {\n // No child. Traverse to next sibling.\n nextFiber = fiber;\n\n while (nextFiber !== null) {\n if (nextFiber === workInProgress) {\n // We're back to the root of this subtree. Exit.\n nextFiber = null;\n break;\n }\n\n var sibling = nextFiber.sibling;\n\n if (sibling !== null) {\n // Set the return pointer of the sibling to the work-in-progress fiber.\n sibling.return = nextFiber.return;\n nextFiber = sibling;\n break;\n } // No more siblings. Traverse up.\n\n\n nextFiber = nextFiber.return;\n }\n }\n\n fiber = nextFiber;\n }\n}\nfunction prepareToReadContext(workInProgress, renderLanes) {\n currentlyRenderingFiber = workInProgress;\n lastContextDependency = null;\n lastContextWithAllBitsObserved = null;\n var dependencies = workInProgress.dependencies;\n\n if (dependencies !== null) {\n var firstContext = dependencies.firstContext;\n\n if (firstContext !== null) {\n if (includesSomeLane(dependencies.lanes, renderLanes)) {\n // Context list has a pending update. Mark that this fiber performed work.\n markWorkInProgressReceivedUpdate();\n } // Reset the work-in-progress list\n\n\n dependencies.firstContext = null;\n }\n }\n}\nfunction readContext(context, observedBits) {\n {\n // This warning would fire if you read context inside a Hook like useMemo.\n // Unlike the class check below, it's not enforced in production for perf.\n if (isDisallowedContextReadInDEV) {\n error('Context can only be read while React is rendering. ' + 'In classes, you can read it in the render method or getDerivedStateFromProps. ' + 'In function components, you can read it directly in the function body, but not ' + 'inside Hooks like useReducer() or useMemo().');\n }\n }\n\n if (lastContextWithAllBitsObserved === context) ; else if (observedBits === false || observedBits === 0) ; else {\n var resolvedObservedBits; // Avoid deopting on observable arguments or heterogeneous types.\n\n if (typeof observedBits !== 'number' || observedBits === MAX_SIGNED_31_BIT_INT) {\n // Observe all updates.\n lastContextWithAllBitsObserved = context;\n resolvedObservedBits = MAX_SIGNED_31_BIT_INT;\n } else {\n resolvedObservedBits = observedBits;\n }\n\n var contextItem = {\n context: context,\n observedBits: resolvedObservedBits,\n next: null\n };\n\n if (lastContextDependency === null) {\n if (!(currentlyRenderingFiber !== null)) {\n {\n throw Error( \"Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().\" );\n }\n } // This is the first dependency for this component. Create a new list.\n\n\n lastContextDependency = contextItem;\n currentlyRenderingFiber.dependencies = {\n lanes: NoLanes,\n firstContext: contextItem,\n responders: null\n };\n } else {\n // Append a new context item.\n lastContextDependency = lastContextDependency.next = contextItem;\n }\n }\n\n return context._currentValue ;\n}\n\nvar UpdateState = 0;\nvar ReplaceState = 1;\nvar ForceUpdate = 2;\nvar CaptureUpdate = 3; // Global state that is reset at the beginning of calling `processUpdateQueue`.\n// It should only be read right after calling `processUpdateQueue`, via\n// `checkHasForceUpdateAfterProcessing`.\n\nvar hasForceUpdate = false;\nvar didWarnUpdateInsideUpdate;\nvar currentlyProcessingQueue;\n\n{\n didWarnUpdateInsideUpdate = false;\n currentlyProcessingQueue = null;\n}\n\nfunction initializeUpdateQueue(fiber) {\n var queue = {\n baseState: fiber.memoizedState,\n firstBaseUpdate: null,\n lastBaseUpdate: null,\n shared: {\n pending: null\n },\n effects: null\n };\n fiber.updateQueue = queue;\n}\nfunction cloneUpdateQueue(current, workInProgress) {\n // Clone the update queue from current. Unless it's already a clone.\n var queue = workInProgress.updateQueue;\n var currentQueue = current.updateQueue;\n\n if (queue === currentQueue) {\n var clone = {\n baseState: currentQueue.baseState,\n firstBaseUpdate: currentQueue.firstBaseUpdate,\n lastBaseUpdate: currentQueue.lastBaseUpdate,\n shared: currentQueue.shared,\n effects: currentQueue.effects\n };\n workInProgress.updateQueue = clone;\n }\n}\nfunction createUpdate(eventTime, lane) {\n var update = {\n eventTime: eventTime,\n lane: lane,\n tag: UpdateState,\n payload: null,\n callback: null,\n next: null\n };\n return update;\n}\nfunction enqueueUpdate(fiber, update) {\n var updateQueue = fiber.updateQueue;\n\n if (updateQueue === null) {\n // Only occurs if the fiber has been unmounted.\n return;\n }\n\n var sharedQueue = updateQueue.shared;\n var pending = sharedQueue.pending;\n\n if (pending === null) {\n // This is the first update. Create a circular list.\n update.next = update;\n } else {\n update.next = pending.next;\n pending.next = update;\n }\n\n sharedQueue.pending = update;\n\n {\n if (currentlyProcessingQueue === sharedQueue && !didWarnUpdateInsideUpdate) {\n error('An update (setState, replaceState, or forceUpdate) was scheduled ' + 'from inside an update function. Update functions should be pure, ' + 'with zero side-effects. Consider using componentDidUpdate or a ' + 'callback.');\n\n didWarnUpdateInsideUpdate = true;\n }\n }\n}\nfunction enqueueCapturedUpdate(workInProgress, capturedUpdate) {\n // Captured updates are updates that are thrown by a child during the render\n // phase. They should be discarded if the render is aborted. Therefore,\n // we should only put them on the work-in-progress queue, not the current one.\n var queue = workInProgress.updateQueue; // Check if the work-in-progress queue is a clone.\n\n var current = workInProgress.alternate;\n\n if (current !== null) {\n var currentQueue = current.updateQueue;\n\n if (queue === currentQueue) {\n // The work-in-progress queue is the same as current. This happens when\n // we bail out on a parent fiber that then captures an error thrown by\n // a child. Since we want to append the update only to the work-in\n // -progress queue, we need to clone the updates. We usually clone during\n // processUpdateQueue, but that didn't happen in this case because we\n // skipped over the parent when we bailed out.\n var newFirst = null;\n var newLast = null;\n var firstBaseUpdate = queue.firstBaseUpdate;\n\n if (firstBaseUpdate !== null) {\n // Loop through the updates and clone them.\n var update = firstBaseUpdate;\n\n do {\n var clone = {\n eventTime: update.eventTime,\n lane: update.lane,\n tag: update.tag,\n payload: update.payload,\n callback: update.callback,\n next: null\n };\n\n if (newLast === null) {\n newFirst = newLast = clone;\n } else {\n newLast.next = clone;\n newLast = clone;\n }\n\n update = update.next;\n } while (update !== null); // Append the captured update the end of the cloned list.\n\n\n if (newLast === null) {\n newFirst = newLast = capturedUpdate;\n } else {\n newLast.next = capturedUpdate;\n newLast = capturedUpdate;\n }\n } else {\n // There are no base updates.\n newFirst = newLast = capturedUpdate;\n }\n\n queue = {\n baseState: currentQueue.baseState,\n firstBaseUpdate: newFirst,\n lastBaseUpdate: newLast,\n shared: currentQueue.shared,\n effects: currentQueue.effects\n };\n workInProgress.updateQueue = queue;\n return;\n }\n } // Append the update to the end of the list.\n\n\n var lastBaseUpdate = queue.lastBaseUpdate;\n\n if (lastBaseUpdate === null) {\n queue.firstBaseUpdate = capturedUpdate;\n } else {\n lastBaseUpdate.next = capturedUpdate;\n }\n\n queue.lastBaseUpdate = capturedUpdate;\n}\n\nfunction getStateFromUpdate(workInProgress, queue, update, prevState, nextProps, instance) {\n switch (update.tag) {\n case ReplaceState:\n {\n var payload = update.payload;\n\n if (typeof payload === 'function') {\n // Updater function\n {\n enterDisallowedContextReadInDEV();\n }\n\n var nextState = payload.call(instance, prevState, nextProps);\n\n {\n if ( workInProgress.mode & StrictMode) {\n disableLogs();\n\n try {\n payload.call(instance, prevState, nextProps);\n } finally {\n reenableLogs();\n }\n }\n\n exitDisallowedContextReadInDEV();\n }\n\n return nextState;\n } // State object\n\n\n return payload;\n }\n\n case CaptureUpdate:\n {\n workInProgress.flags = workInProgress.flags & ~ShouldCapture | DidCapture;\n }\n // Intentional fallthrough\n\n case UpdateState:\n {\n var _payload = update.payload;\n var partialState;\n\n if (typeof _payload === 'function') {\n // Updater function\n {\n enterDisallowedContextReadInDEV();\n }\n\n partialState = _payload.call(instance, prevState, nextProps);\n\n {\n if ( workInProgress.mode & StrictMode) {\n disableLogs();\n\n try {\n _payload.call(instance, prevState, nextProps);\n } finally {\n reenableLogs();\n }\n }\n\n exitDisallowedContextReadInDEV();\n }\n } else {\n // Partial state object\n partialState = _payload;\n }\n\n if (partialState === null || partialState === undefined) {\n // Null and undefined are treated as no-ops.\n return prevState;\n } // Merge the partial state and the previous state.\n\n\n return _assign({}, prevState, partialState);\n }\n\n case ForceUpdate:\n {\n hasForceUpdate = true;\n return prevState;\n }\n }\n\n return prevState;\n}\n\nfunction processUpdateQueue(workInProgress, props, instance, renderLanes) {\n // This is always non-null on a ClassComponent or HostRoot\n var queue = workInProgress.updateQueue;\n hasForceUpdate = false;\n\n {\n currentlyProcessingQueue = queue.shared;\n }\n\n var firstBaseUpdate = queue.firstBaseUpdate;\n var lastBaseUpdate = queue.lastBaseUpdate; // Check if there are pending updates. If so, transfer them to the base queue.\n\n var pendingQueue = queue.shared.pending;\n\n if (pendingQueue !== null) {\n queue.shared.pending = null; // The pending queue is circular. Disconnect the pointer between first\n // and last so that it's non-circular.\n\n var lastPendingUpdate = pendingQueue;\n var firstPendingUpdate = lastPendingUpdate.next;\n lastPendingUpdate.next = null; // Append pending updates to base queue\n\n if (lastBaseUpdate === null) {\n firstBaseUpdate = firstPendingUpdate;\n } else {\n lastBaseUpdate.next = firstPendingUpdate;\n }\n\n lastBaseUpdate = lastPendingUpdate; // If there's a current queue, and it's different from the base queue, then\n // we need to transfer the updates to that queue, too. Because the base\n // queue is a singly-linked list with no cycles, we can append to both\n // lists and take advantage of structural sharing.\n // TODO: Pass `current` as argument\n\n var current = workInProgress.alternate;\n\n if (current !== null) {\n // This is always non-null on a ClassComponent or HostRoot\n var currentQueue = current.updateQueue;\n var currentLastBaseUpdate = currentQueue.lastBaseUpdate;\n\n if (currentLastBaseUpdate !== lastBaseUpdate) {\n if (currentLastBaseUpdate === null) {\n currentQueue.firstBaseUpdate = firstPendingUpdate;\n } else {\n currentLastBaseUpdate.next = firstPendingUpdate;\n }\n\n currentQueue.lastBaseUpdate = lastPendingUpdate;\n }\n }\n } // These values may change as we process the queue.\n\n\n if (firstBaseUpdate !== null) {\n // Iterate through the list of updates to compute the result.\n var newState = queue.baseState; // TODO: Don't need to accumulate this. Instead, we can remove renderLanes\n // from the original lanes.\n\n var newLanes = NoLanes;\n var newBaseState = null;\n var newFirstBaseUpdate = null;\n var newLastBaseUpdate = null;\n var update = firstBaseUpdate;\n\n do {\n var updateLane = update.lane;\n var updateEventTime = update.eventTime;\n\n if (!isSubsetOfLanes(renderLanes, updateLane)) {\n // Priority is insufficient. Skip this update. If this is the first\n // skipped update, the previous update/state is the new base\n // update/state.\n var clone = {\n eventTime: updateEventTime,\n lane: updateLane,\n tag: update.tag,\n payload: update.payload,\n callback: update.callback,\n next: null\n };\n\n if (newLastBaseUpdate === null) {\n newFirstBaseUpdate = newLastBaseUpdate = clone;\n newBaseState = newState;\n } else {\n newLastBaseUpdate = newLastBaseUpdate.next = clone;\n } // Update the remaining priority in the queue.\n\n\n newLanes = mergeLanes(newLanes, updateLane);\n } else {\n // This update does have sufficient priority.\n if (newLastBaseUpdate !== null) {\n var _clone = {\n eventTime: updateEventTime,\n // This update is going to be committed so we never want uncommit\n // it. Using NoLane works because 0 is a subset of all bitmasks, so\n // this will never be skipped by the check above.\n lane: NoLane,\n tag: update.tag,\n payload: update.payload,\n callback: update.callback,\n next: null\n };\n newLastBaseUpdate = newLastBaseUpdate.next = _clone;\n } // Process this update.\n\n\n newState = getStateFromUpdate(workInProgress, queue, update, newState, props, instance);\n var callback = update.callback;\n\n if (callback !== null) {\n workInProgress.flags |= Callback;\n var effects = queue.effects;\n\n if (effects === null) {\n queue.effects = [update];\n } else {\n effects.push(update);\n }\n }\n }\n\n update = update.next;\n\n if (update === null) {\n pendingQueue = queue.shared.pending;\n\n if (pendingQueue === null) {\n break;\n } else {\n // An update was scheduled from inside a reducer. Add the new\n // pending updates to the end of the list and keep processing.\n var _lastPendingUpdate = pendingQueue; // Intentionally unsound. Pending updates form a circular list, but we\n // unravel them when transferring them to the base queue.\n\n var _firstPendingUpdate = _lastPendingUpdate.next;\n _lastPendingUpdate.next = null;\n update = _firstPendingUpdate;\n queue.lastBaseUpdate = _lastPendingUpdate;\n queue.shared.pending = null;\n }\n }\n } while (true);\n\n if (newLastBaseUpdate === null) {\n newBaseState = newState;\n }\n\n queue.baseState = newBaseState;\n queue.firstBaseUpdate = newFirstBaseUpdate;\n queue.lastBaseUpdate = newLastBaseUpdate; // Set the remaining expiration time to be whatever is remaining in the queue.\n // This should be fine because the only two other things that contribute to\n // expiration time are props and context. We're already in the middle of the\n // begin phase by the time we start processing the queue, so we've already\n // dealt with the props. Context in components that specify\n // shouldComponentUpdate is tricky; but we'll have to account for\n // that regardless.\n\n markSkippedUpdateLanes(newLanes);\n workInProgress.lanes = newLanes;\n workInProgress.memoizedState = newState;\n }\n\n {\n currentlyProcessingQueue = null;\n }\n}\n\nfunction callCallback(callback, context) {\n if (!(typeof callback === 'function')) {\n {\n throw Error( \"Invalid argument passed as callback. Expected a function. Instead received: \" + callback );\n }\n }\n\n callback.call(context);\n}\n\nfunction resetHasForceUpdateBeforeProcessing() {\n hasForceUpdate = false;\n}\nfunction checkHasForceUpdateAfterProcessing() {\n return hasForceUpdate;\n}\nfunction commitUpdateQueue(finishedWork, finishedQueue, instance) {\n // Commit the effects\n var effects = finishedQueue.effects;\n finishedQueue.effects = null;\n\n if (effects !== null) {\n for (var i = 0; i < effects.length; i++) {\n var effect = effects[i];\n var callback = effect.callback;\n\n if (callback !== null) {\n effect.callback = null;\n callCallback(callback, instance);\n }\n }\n }\n}\n\nvar fakeInternalInstance = {};\nvar isArray = Array.isArray; // React.Component uses a shared frozen object by default.\n// We'll use it to determine whether we need to initialize legacy refs.\n\nvar emptyRefsObject = new React.Component().refs;\nvar didWarnAboutStateAssignmentForComponent;\nvar didWarnAboutUninitializedState;\nvar didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate;\nvar didWarnAboutLegacyLifecyclesAndDerivedState;\nvar didWarnAboutUndefinedDerivedState;\nvar warnOnUndefinedDerivedState;\nvar warnOnInvalidCallback;\nvar didWarnAboutDirectlyAssigningPropsToState;\nvar didWarnAboutContextTypeAndContextTypes;\nvar didWarnAboutInvalidateContextType;\n\n{\n didWarnAboutStateAssignmentForComponent = new Set();\n didWarnAboutUninitializedState = new Set();\n didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate = new Set();\n didWarnAboutLegacyLifecyclesAndDerivedState = new Set();\n didWarnAboutDirectlyAssigningPropsToState = new Set();\n didWarnAboutUndefinedDerivedState = new Set();\n didWarnAboutContextTypeAndContextTypes = new Set();\n didWarnAboutInvalidateContextType = new Set();\n var didWarnOnInvalidCallback = new Set();\n\n warnOnInvalidCallback = function (callback, callerName) {\n if (callback === null || typeof callback === 'function') {\n return;\n }\n\n var key = callerName + '_' + callback;\n\n if (!didWarnOnInvalidCallback.has(key)) {\n didWarnOnInvalidCallback.add(key);\n\n error('%s(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callerName, callback);\n }\n };\n\n warnOnUndefinedDerivedState = function (type, partialState) {\n if (partialState === undefined) {\n var componentName = getComponentName(type) || 'Component';\n\n if (!didWarnAboutUndefinedDerivedState.has(componentName)) {\n didWarnAboutUndefinedDerivedState.add(componentName);\n\n error('%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. ' + 'You have returned undefined.', componentName);\n }\n }\n }; // This is so gross but it's at least non-critical and can be removed if\n // it causes problems. This is meant to give a nicer error message for\n // ReactDOM15.unstable_renderSubtreeIntoContainer(reactDOM16Component,\n // ...)) which otherwise throws a \"_processChildContext is not a function\"\n // exception.\n\n\n Object.defineProperty(fakeInternalInstance, '_processChildContext', {\n enumerable: false,\n value: function () {\n {\n {\n throw Error( \"_processChildContext is not available in React 16+. This likely means you have multiple copies of React and are attempting to nest a React 15 tree inside a React 16 tree using unstable_renderSubtreeIntoContainer, which isn't supported. Try to make sure you have only one copy of React (and ideally, switch to ReactDOM.createPortal).\" );\n }\n }\n }\n });\n Object.freeze(fakeInternalInstance);\n}\n\nfunction applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, nextProps) {\n var prevState = workInProgress.memoizedState;\n\n {\n if ( workInProgress.mode & StrictMode) {\n disableLogs();\n\n try {\n // Invoke the function an extra time to help detect side-effects.\n getDerivedStateFromProps(nextProps, prevState);\n } finally {\n reenableLogs();\n }\n }\n }\n\n var partialState = getDerivedStateFromProps(nextProps, prevState);\n\n {\n warnOnUndefinedDerivedState(ctor, partialState);\n } // Merge the partial state and the previous state.\n\n\n var memoizedState = partialState === null || partialState === undefined ? prevState : _assign({}, prevState, partialState);\n workInProgress.memoizedState = memoizedState; // Once the update queue is empty, persist the derived state onto the\n // base state.\n\n if (workInProgress.lanes === NoLanes) {\n // Queue is always non-null for classes\n var updateQueue = workInProgress.updateQueue;\n updateQueue.baseState = memoizedState;\n }\n}\nvar classComponentUpdater = {\n isMounted: isMounted,\n enqueueSetState: function (inst, payload, callback) {\n var fiber = get(inst);\n var eventTime = requestEventTime();\n var lane = requestUpdateLane(fiber);\n var update = createUpdate(eventTime, lane);\n update.payload = payload;\n\n if (callback !== undefined && callback !== null) {\n {\n warnOnInvalidCallback(callback, 'setState');\n }\n\n update.callback = callback;\n }\n\n enqueueUpdate(fiber, update);\n scheduleUpdateOnFiber(fiber, lane, eventTime);\n },\n enqueueReplaceState: function (inst, payload, callback) {\n var fiber = get(inst);\n var eventTime = requestEventTime();\n var lane = requestUpdateLane(fiber);\n var update = createUpdate(eventTime, lane);\n update.tag = ReplaceState;\n update.payload = payload;\n\n if (callback !== undefined && callback !== null) {\n {\n warnOnInvalidCallback(callback, 'replaceState');\n }\n\n update.callback = callback;\n }\n\n enqueueUpdate(fiber, update);\n scheduleUpdateOnFiber(fiber, lane, eventTime);\n },\n enqueueForceUpdate: function (inst, callback) {\n var fiber = get(inst);\n var eventTime = requestEventTime();\n var lane = requestUpdateLane(fiber);\n var update = createUpdate(eventTime, lane);\n update.tag = ForceUpdate;\n\n if (callback !== undefined && callback !== null) {\n {\n warnOnInvalidCallback(callback, 'forceUpdate');\n }\n\n update.callback = callback;\n }\n\n enqueueUpdate(fiber, update);\n scheduleUpdateOnFiber(fiber, lane, eventTime);\n }\n};\n\nfunction checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext) {\n var instance = workInProgress.stateNode;\n\n if (typeof instance.shouldComponentUpdate === 'function') {\n {\n if ( workInProgress.mode & StrictMode) {\n disableLogs();\n\n try {\n // Invoke the function an extra time to help detect side-effects.\n instance.shouldComponentUpdate(newProps, newState, nextContext);\n } finally {\n reenableLogs();\n }\n }\n }\n\n var shouldUpdate = instance.shouldComponentUpdate(newProps, newState, nextContext);\n\n {\n if (shouldUpdate === undefined) {\n error('%s.shouldComponentUpdate(): Returned undefined instead of a ' + 'boolean value. Make sure to return true or false.', getComponentName(ctor) || 'Component');\n }\n }\n\n return shouldUpdate;\n }\n\n if (ctor.prototype && ctor.prototype.isPureReactComponent) {\n return !shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState);\n }\n\n return true;\n}\n\nfunction checkClassInstance(workInProgress, ctor, newProps) {\n var instance = workInProgress.stateNode;\n\n {\n var name = getComponentName(ctor) || 'Component';\n var renderPresent = instance.render;\n\n if (!renderPresent) {\n if (ctor.prototype && typeof ctor.prototype.render === 'function') {\n error('%s(...): No `render` method found on the returned component ' + 'instance: did you accidentally return an object from the constructor?', name);\n } else {\n error('%s(...): No `render` method found on the returned component ' + 'instance: you may have forgotten to define `render`.', name);\n }\n }\n\n if (instance.getInitialState && !instance.getInitialState.isReactClassApproved && !instance.state) {\n error('getInitialState was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Did you mean to define a state property instead?', name);\n }\n\n if (instance.getDefaultProps && !instance.getDefaultProps.isReactClassApproved) {\n error('getDefaultProps was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Use a static property to define defaultProps instead.', name);\n }\n\n if (instance.propTypes) {\n error('propTypes was defined as an instance property on %s. Use a static ' + 'property to define propTypes instead.', name);\n }\n\n if (instance.contextType) {\n error('contextType was defined as an instance property on %s. Use a static ' + 'property to define contextType instead.', name);\n }\n\n {\n if (instance.contextTypes) {\n error('contextTypes was defined as an instance property on %s. Use a static ' + 'property to define contextTypes instead.', name);\n }\n\n if (ctor.contextType && ctor.contextTypes && !didWarnAboutContextTypeAndContextTypes.has(ctor)) {\n didWarnAboutContextTypeAndContextTypes.add(ctor);\n\n error('%s declares both contextTypes and contextType static properties. ' + 'The legacy contextTypes property will be ignored.', name);\n }\n }\n\n if (typeof instance.componentShouldUpdate === 'function') {\n error('%s has a method called ' + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + 'The name is phrased as a question because the function is ' + 'expected to return a value.', name);\n }\n\n if (ctor.prototype && ctor.prototype.isPureReactComponent && typeof instance.shouldComponentUpdate !== 'undefined') {\n error('%s has a method called shouldComponentUpdate(). ' + 'shouldComponentUpdate should not be used when extending React.PureComponent. ' + 'Please extend React.Component if shouldComponentUpdate is used.', getComponentName(ctor) || 'A pure component');\n }\n\n if (typeof instance.componentDidUnmount === 'function') {\n error('%s has a method called ' + 'componentDidUnmount(). But there is no such lifecycle method. ' + 'Did you mean componentWillUnmount()?', name);\n }\n\n if (typeof instance.componentDidReceiveProps === 'function') {\n error('%s has a method called ' + 'componentDidReceiveProps(). But there is no such lifecycle method. ' + 'If you meant to update the state in response to changing props, ' + 'use componentWillReceiveProps(). If you meant to fetch data or ' + 'run side-effects or mutations after React has updated the UI, use componentDidUpdate().', name);\n }\n\n if (typeof instance.componentWillRecieveProps === 'function') {\n error('%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', name);\n }\n\n if (typeof instance.UNSAFE_componentWillRecieveProps === 'function') {\n error('%s has a method called ' + 'UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?', name);\n }\n\n var hasMutatedProps = instance.props !== newProps;\n\n if (instance.props !== undefined && hasMutatedProps) {\n error('%s(...): When calling super() in `%s`, make sure to pass ' + \"up the same props that your component's constructor was passed.\", name, name);\n }\n\n if (instance.defaultProps) {\n error('Setting defaultProps as an instance property on %s is not supported and will be ignored.' + ' Instead, define defaultProps as a static property on %s.', name, name);\n }\n\n if (typeof instance.getSnapshotBeforeUpdate === 'function' && typeof instance.componentDidUpdate !== 'function' && !didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.has(ctor)) {\n didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.add(ctor);\n\n error('%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). ' + 'This component defines getSnapshotBeforeUpdate() only.', getComponentName(ctor));\n }\n\n if (typeof instance.getDerivedStateFromProps === 'function') {\n error('%s: getDerivedStateFromProps() is defined as an instance method ' + 'and will be ignored. Instead, declare it as a static method.', name);\n }\n\n if (typeof instance.getDerivedStateFromError === 'function') {\n error('%s: getDerivedStateFromError() is defined as an instance method ' + 'and will be ignored. Instead, declare it as a static method.', name);\n }\n\n if (typeof ctor.getSnapshotBeforeUpdate === 'function') {\n error('%s: getSnapshotBeforeUpdate() is defined as a static method ' + 'and will be ignored. Instead, declare it as an instance method.', name);\n }\n\n var _state = instance.state;\n\n if (_state && (typeof _state !== 'object' || isArray(_state))) {\n error('%s.state: must be set to an object or null', name);\n }\n\n if (typeof instance.getChildContext === 'function' && typeof ctor.childContextTypes !== 'object') {\n error('%s.getChildContext(): childContextTypes must be defined in order to ' + 'use getChildContext().', name);\n }\n }\n}\n\nfunction adoptClassInstance(workInProgress, instance) {\n instance.updater = classComponentUpdater;\n workInProgress.stateNode = instance; // The instance needs access to the fiber so that it can schedule updates\n\n set(instance, workInProgress);\n\n {\n instance._reactInternalInstance = fakeInternalInstance;\n }\n}\n\nfunction constructClassInstance(workInProgress, ctor, props) {\n var isLegacyContextConsumer = false;\n var unmaskedContext = emptyContextObject;\n var context = emptyContextObject;\n var contextType = ctor.contextType;\n\n {\n if ('contextType' in ctor) {\n var isValid = // Allow null for conditional declaration\n contextType === null || contextType !== undefined && contextType.$$typeof === REACT_CONTEXT_TYPE && contextType._context === undefined; // Not a <Context.Consumer>\n\n if (!isValid && !didWarnAboutInvalidateContextType.has(ctor)) {\n didWarnAboutInvalidateContextType.add(ctor);\n var addendum = '';\n\n if (contextType === undefined) {\n addendum = ' However, it is set to undefined. ' + 'This can be caused by a typo or by mixing up named and default imports. ' + 'This can also happen due to a circular dependency, so ' + 'try moving the createContext() call to a separate file.';\n } else if (typeof contextType !== 'object') {\n addendum = ' However, it is set to a ' + typeof contextType + '.';\n } else if (contextType.$$typeof === REACT_PROVIDER_TYPE) {\n addendum = ' Did you accidentally pass the Context.Provider instead?';\n } else if (contextType._context !== undefined) {\n // <Context.Consumer>\n addendum = ' Did you accidentally pass the Context.Consumer instead?';\n } else {\n addendum = ' However, it is set to an object with keys {' + Object.keys(contextType).join(', ') + '}.';\n }\n\n error('%s defines an invalid contextType. ' + 'contextType should point to the Context object returned by React.createContext().%s', getComponentName(ctor) || 'Component', addendum);\n }\n }\n }\n\n if (typeof contextType === 'object' && contextType !== null) {\n context = readContext(contextType);\n } else {\n unmaskedContext = getUnmaskedContext(workInProgress, ctor, true);\n var contextTypes = ctor.contextTypes;\n isLegacyContextConsumer = contextTypes !== null && contextTypes !== undefined;\n context = isLegacyContextConsumer ? getMaskedContext(workInProgress, unmaskedContext) : emptyContextObject;\n } // Instantiate twice to help detect side-effects.\n\n\n {\n if ( workInProgress.mode & StrictMode) {\n disableLogs();\n\n try {\n new ctor(props, context); // eslint-disable-line no-new\n } finally {\n reenableLogs();\n }\n }\n }\n\n var instance = new ctor(props, context);\n var state = workInProgress.memoizedState = instance.state !== null && instance.state !== undefined ? instance.state : null;\n adoptClassInstance(workInProgress, instance);\n\n {\n if (typeof ctor.getDerivedStateFromProps === 'function' && state === null) {\n var componentName = getComponentName(ctor) || 'Component';\n\n if (!didWarnAboutUninitializedState.has(componentName)) {\n didWarnAboutUninitializedState.add(componentName);\n\n error('`%s` uses `getDerivedStateFromProps` but its initial state is ' + '%s. This is not recommended. Instead, define the initial state by ' + 'assigning an object to `this.state` in the constructor of `%s`. ' + 'This ensures that `getDerivedStateFromProps` arguments have a consistent shape.', componentName, instance.state === null ? 'null' : 'undefined', componentName);\n }\n } // If new component APIs are defined, \"unsafe\" lifecycles won't be called.\n // Warn about these lifecycles if they are present.\n // Don't warn about react-lifecycles-compat polyfilled methods though.\n\n\n if (typeof ctor.getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function') {\n var foundWillMountName = null;\n var foundWillReceivePropsName = null;\n var foundWillUpdateName = null;\n\n if (typeof instance.componentWillMount === 'function' && instance.componentWillMount.__suppressDeprecationWarning !== true) {\n foundWillMountName = 'componentWillMount';\n } else if (typeof instance.UNSAFE_componentWillMount === 'function') {\n foundWillMountName = 'UNSAFE_componentWillMount';\n }\n\n if (typeof instance.componentWillReceiveProps === 'function' && instance.componentWillReceiveProps.__suppressDeprecationWarning !== true) {\n foundWillReceivePropsName = 'componentWillReceiveProps';\n } else if (typeof instance.UNSAFE_componentWillReceiveProps === 'function') {\n foundWillReceivePropsName = 'UNSAFE_componentWillReceiveProps';\n }\n\n if (typeof instance.componentWillUpdate === 'function' && instance.componentWillUpdate.__suppressDeprecationWarning !== true) {\n foundWillUpdateName = 'componentWillUpdate';\n } else if (typeof instance.UNSAFE_componentWillUpdate === 'function') {\n foundWillUpdateName = 'UNSAFE_componentWillUpdate';\n }\n\n if (foundWillMountName !== null || foundWillReceivePropsName !== null || foundWillUpdateName !== null) {\n var _componentName = getComponentName(ctor) || 'Component';\n\n var newApiName = typeof ctor.getDerivedStateFromProps === 'function' ? 'getDerivedStateFromProps()' : 'getSnapshotBeforeUpdate()';\n\n if (!didWarnAboutLegacyLifecyclesAndDerivedState.has(_componentName)) {\n didWarnAboutLegacyLifecyclesAndDerivedState.add(_componentName);\n\n error('Unsafe legacy lifecycles will not be called for components using new component APIs.\\n\\n' + '%s uses %s but also contains the following legacy lifecycles:%s%s%s\\n\\n' + 'The above lifecycles should be removed. Learn more about this warning here:\\n' + 'https://reactjs.org/link/unsafe-component-lifecycles', _componentName, newApiName, foundWillMountName !== null ? \"\\n \" + foundWillMountName : '', foundWillReceivePropsName !== null ? \"\\n \" + foundWillReceivePropsName : '', foundWillUpdateName !== null ? \"\\n \" + foundWillUpdateName : '');\n }\n }\n }\n } // Cache unmasked context so we can avoid recreating masked context unless necessary.\n // ReactFiberContext usually updates this cache but can't for newly-created instances.\n\n\n if (isLegacyContextConsumer) {\n cacheContext(workInProgress, unmaskedContext, context);\n }\n\n return instance;\n}\n\nfunction callComponentWillMount(workInProgress, instance) {\n var oldState = instance.state;\n\n if (typeof instance.componentWillMount === 'function') {\n instance.componentWillMount();\n }\n\n if (typeof instance.UNSAFE_componentWillMount === 'function') {\n instance.UNSAFE_componentWillMount();\n }\n\n if (oldState !== instance.state) {\n {\n error('%s.componentWillMount(): Assigning directly to this.state is ' + \"deprecated (except inside a component's \" + 'constructor). Use setState instead.', getComponentName(workInProgress.type) || 'Component');\n }\n\n classComponentUpdater.enqueueReplaceState(instance, instance.state, null);\n }\n}\n\nfunction callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext) {\n var oldState = instance.state;\n\n if (typeof instance.componentWillReceiveProps === 'function') {\n instance.componentWillReceiveProps(newProps, nextContext);\n }\n\n if (typeof instance.UNSAFE_componentWillReceiveProps === 'function') {\n instance.UNSAFE_componentWillReceiveProps(newProps, nextContext);\n }\n\n if (instance.state !== oldState) {\n {\n var componentName = getComponentName(workInProgress.type) || 'Component';\n\n if (!didWarnAboutStateAssignmentForComponent.has(componentName)) {\n didWarnAboutStateAssignmentForComponent.add(componentName);\n\n error('%s.componentWillReceiveProps(): Assigning directly to ' + \"this.state is deprecated (except inside a component's \" + 'constructor). Use setState instead.', componentName);\n }\n }\n\n classComponentUpdater.enqueueReplaceState(instance, instance.state, null);\n }\n} // Invokes the mount life-cycles on a previously never rendered instance.\n\n\nfunction mountClassInstance(workInProgress, ctor, newProps, renderLanes) {\n {\n checkClassInstance(workInProgress, ctor, newProps);\n }\n\n var instance = workInProgress.stateNode;\n instance.props = newProps;\n instance.state = workInProgress.memoizedState;\n instance.refs = emptyRefsObject;\n initializeUpdateQueue(workInProgress);\n var contextType = ctor.contextType;\n\n if (typeof contextType === 'object' && contextType !== null) {\n instance.context = readContext(contextType);\n } else {\n var unmaskedContext = getUnmaskedContext(workInProgress, ctor, true);\n instance.context = getMaskedContext(workInProgress, unmaskedContext);\n }\n\n {\n if (instance.state === newProps) {\n var componentName = getComponentName(ctor) || 'Component';\n\n if (!didWarnAboutDirectlyAssigningPropsToState.has(componentName)) {\n didWarnAboutDirectlyAssigningPropsToState.add(componentName);\n\n error('%s: It is not recommended to assign props directly to state ' + \"because updates to props won't be reflected in state. \" + 'In most cases, it is better to use props directly.', componentName);\n }\n }\n\n if (workInProgress.mode & StrictMode) {\n ReactStrictModeWarnings.recordLegacyContextWarning(workInProgress, instance);\n }\n\n {\n ReactStrictModeWarnings.recordUnsafeLifecycleWarnings(workInProgress, instance);\n }\n }\n\n processUpdateQueue(workInProgress, newProps, instance, renderLanes);\n instance.state = workInProgress.memoizedState;\n var getDerivedStateFromProps = ctor.getDerivedStateFromProps;\n\n if (typeof getDerivedStateFromProps === 'function') {\n applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps);\n instance.state = workInProgress.memoizedState;\n } // In order to support react-lifecycles-compat polyfilled components,\n // Unsafe lifecycles should not be invoked for components using the new APIs.\n\n\n if (typeof ctor.getDerivedStateFromProps !== 'function' && typeof instance.getSnapshotBeforeUpdate !== 'function' && (typeof instance.UNSAFE_componentWillMount === 'function' || typeof instance.componentWillMount === 'function')) {\n callComponentWillMount(workInProgress, instance); // If we had additional state updates during this life-cycle, let's\n // process them now.\n\n processUpdateQueue(workInProgress, newProps, instance, renderLanes);\n instance.state = workInProgress.memoizedState;\n }\n\n if (typeof instance.componentDidMount === 'function') {\n workInProgress.flags |= Update;\n }\n}\n\nfunction resumeMountClassInstance(workInProgress, ctor, newProps, renderLanes) {\n var instance = workInProgress.stateNode;\n var oldProps = workInProgress.memoizedProps;\n instance.props = oldProps;\n var oldContext = instance.context;\n var contextType = ctor.contextType;\n var nextContext = emptyContextObject;\n\n if (typeof contextType === 'object' && contextType !== null) {\n nextContext = readContext(contextType);\n } else {\n var nextLegacyUnmaskedContext = getUnmaskedContext(workInProgress, ctor, true);\n nextContext = getMaskedContext(workInProgress, nextLegacyUnmaskedContext);\n }\n\n var getDerivedStateFromProps = ctor.getDerivedStateFromProps;\n var hasNewLifecycles = typeof getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function'; // Note: During these life-cycles, instance.props/instance.state are what\n // ever the previously attempted to render - not the \"current\". However,\n // during componentDidUpdate we pass the \"current\" props.\n // In order to support react-lifecycles-compat polyfilled components,\n // Unsafe lifecycles should not be invoked for components using the new APIs.\n\n if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillReceiveProps === 'function' || typeof instance.componentWillReceiveProps === 'function')) {\n if (oldProps !== newProps || oldContext !== nextContext) {\n callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext);\n }\n }\n\n resetHasForceUpdateBeforeProcessing();\n var oldState = workInProgress.memoizedState;\n var newState = instance.state = oldState;\n processUpdateQueue(workInProgress, newProps, instance, renderLanes);\n newState = workInProgress.memoizedState;\n\n if (oldProps === newProps && oldState === newState && !hasContextChanged() && !checkHasForceUpdateAfterProcessing()) {\n // If an update was already in progress, we should schedule an Update\n // effect even though we're bailing out, so that cWU/cDU are called.\n if (typeof instance.componentDidMount === 'function') {\n workInProgress.flags |= Update;\n }\n\n return false;\n }\n\n if (typeof getDerivedStateFromProps === 'function') {\n applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps);\n newState = workInProgress.memoizedState;\n }\n\n var shouldUpdate = checkHasForceUpdateAfterProcessing() || checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext);\n\n if (shouldUpdate) {\n // In order to support react-lifecycles-compat polyfilled components,\n // Unsafe lifecycles should not be invoked for components using the new APIs.\n if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillMount === 'function' || typeof instance.componentWillMount === 'function')) {\n if (typeof instance.componentWillMount === 'function') {\n instance.componentWillMount();\n }\n\n if (typeof instance.UNSAFE_componentWillMount === 'function') {\n instance.UNSAFE_componentWillMount();\n }\n }\n\n if (typeof instance.componentDidMount === 'function') {\n workInProgress.flags |= Update;\n }\n } else {\n // If an update was already in progress, we should schedule an Update\n // effect even though we're bailing out, so that cWU/cDU are called.\n if (typeof instance.componentDidMount === 'function') {\n workInProgress.flags |= Update;\n } // If shouldComponentUpdate returned false, we should still update the\n // memoized state to indicate that this work can be reused.\n\n\n workInProgress.memoizedProps = newProps;\n workInProgress.memoizedState = newState;\n } // Update the existing instance's state, props, and context pointers even\n // if shouldComponentUpdate returns false.\n\n\n instance.props = newProps;\n instance.state = newState;\n instance.context = nextContext;\n return shouldUpdate;\n} // Invokes the update life-cycles and returns false if it shouldn't rerender.\n\n\nfunction updateClassInstance(current, workInProgress, ctor, newProps, renderLanes) {\n var instance = workInProgress.stateNode;\n cloneUpdateQueue(current, workInProgress);\n var unresolvedOldProps = workInProgress.memoizedProps;\n var oldProps = workInProgress.type === workInProgress.elementType ? unresolvedOldProps : resolveDefaultProps(workInProgress.type, unresolvedOldProps);\n instance.props = oldProps;\n var unresolvedNewProps = workInProgress.pendingProps;\n var oldContext = instance.context;\n var contextType = ctor.contextType;\n var nextContext = emptyContextObject;\n\n if (typeof contextType === 'object' && contextType !== null) {\n nextContext = readContext(contextType);\n } else {\n var nextUnmaskedContext = getUnmaskedContext(workInProgress, ctor, true);\n nextContext = getMaskedContext(workInProgress, nextUnmaskedContext);\n }\n\n var getDerivedStateFromProps = ctor.getDerivedStateFromProps;\n var hasNewLifecycles = typeof getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function'; // Note: During these life-cycles, instance.props/instance.state are what\n // ever the previously attempted to render - not the \"current\". However,\n // during componentDidUpdate we pass the \"current\" props.\n // In order to support react-lifecycles-compat polyfilled components,\n // Unsafe lifecycles should not be invoked for components using the new APIs.\n\n if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillReceiveProps === 'function' || typeof instance.componentWillReceiveProps === 'function')) {\n if (unresolvedOldProps !== unresolvedNewProps || oldContext !== nextContext) {\n callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext);\n }\n }\n\n resetHasForceUpdateBeforeProcessing();\n var oldState = workInProgress.memoizedState;\n var newState = instance.state = oldState;\n processUpdateQueue(workInProgress, newProps, instance, renderLanes);\n newState = workInProgress.memoizedState;\n\n if (unresolvedOldProps === unresolvedNewProps && oldState === newState && !hasContextChanged() && !checkHasForceUpdateAfterProcessing()) {\n // If an update was already in progress, we should schedule an Update\n // effect even though we're bailing out, so that cWU/cDU are called.\n if (typeof instance.componentDidUpdate === 'function') {\n if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) {\n workInProgress.flags |= Update;\n }\n }\n\n if (typeof instance.getSnapshotBeforeUpdate === 'function') {\n if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) {\n workInProgress.flags |= Snapshot;\n }\n }\n\n return false;\n }\n\n if (typeof getDerivedStateFromProps === 'function') {\n applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps);\n newState = workInProgress.memoizedState;\n }\n\n var shouldUpdate = checkHasForceUpdateAfterProcessing() || checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext);\n\n if (shouldUpdate) {\n // In order to support react-lifecycles-compat polyfilled components,\n // Unsafe lifecycles should not be invoked for components using the new APIs.\n if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillUpdate === 'function' || typeof instance.componentWillUpdate === 'function')) {\n if (typeof instance.componentWillUpdate === 'function') {\n instance.componentWillUpdate(newProps, newState, nextContext);\n }\n\n if (typeof instance.UNSAFE_componentWillUpdate === 'function') {\n instance.UNSAFE_componentWillUpdate(newProps, newState, nextContext);\n }\n }\n\n if (typeof instance.componentDidUpdate === 'function') {\n workInProgress.flags |= Update;\n }\n\n if (typeof instance.getSnapshotBeforeUpdate === 'function') {\n workInProgress.flags |= Snapshot;\n }\n } else {\n // If an update was already in progress, we should schedule an Update\n // effect even though we're bailing out, so that cWU/cDU are called.\n if (typeof instance.componentDidUpdate === 'function') {\n if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) {\n workInProgress.flags |= Update;\n }\n }\n\n if (typeof instance.getSnapshotBeforeUpdate === 'function') {\n if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) {\n workInProgress.flags |= Snapshot;\n }\n } // If shouldComponentUpdate returned false, we should still update the\n // memoized props/state to indicate that this work can be reused.\n\n\n workInProgress.memoizedProps = newProps;\n workInProgress.memoizedState = newState;\n } // Update the existing instance's state, props, and context pointers even\n // if shouldComponentUpdate returns false.\n\n\n instance.props = newProps;\n instance.state = newState;\n instance.context = nextContext;\n return shouldUpdate;\n}\n\nvar didWarnAboutMaps;\nvar didWarnAboutGenerators;\nvar didWarnAboutStringRefs;\nvar ownerHasKeyUseWarning;\nvar ownerHasFunctionTypeWarning;\n\nvar warnForMissingKey = function (child, returnFiber) {};\n\n{\n didWarnAboutMaps = false;\n didWarnAboutGenerators = false;\n didWarnAboutStringRefs = {};\n /**\n * Warn if there's no key explicitly set on dynamic arrays of children or\n * object keys are not valid. This allows us to keep track of children between\n * updates.\n */\n\n ownerHasKeyUseWarning = {};\n ownerHasFunctionTypeWarning = {};\n\n warnForMissingKey = function (child, returnFiber) {\n if (child === null || typeof child !== 'object') {\n return;\n }\n\n if (!child._store || child._store.validated || child.key != null) {\n return;\n }\n\n if (!(typeof child._store === 'object')) {\n {\n throw Error( \"React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n child._store.validated = true;\n var componentName = getComponentName(returnFiber.type) || 'Component';\n\n if (ownerHasKeyUseWarning[componentName]) {\n return;\n }\n\n ownerHasKeyUseWarning[componentName] = true;\n\n error('Each child in a list should have a unique ' + '\"key\" prop. See https://reactjs.org/link/warning-keys for ' + 'more information.');\n };\n}\n\nvar isArray$1 = Array.isArray;\n\nfunction coerceRef(returnFiber, current, element) {\n var mixedRef = element.ref;\n\n if (mixedRef !== null && typeof mixedRef !== 'function' && typeof mixedRef !== 'object') {\n {\n // TODO: Clean this up once we turn on the string ref warning for\n // everyone, because the strict mode case will no longer be relevant\n if ((returnFiber.mode & StrictMode || warnAboutStringRefs) && // We warn in ReactElement.js if owner and self are equal for string refs\n // because these cannot be automatically converted to an arrow function\n // using a codemod. Therefore, we don't have to warn about string refs again.\n !(element._owner && element._self && element._owner.stateNode !== element._self)) {\n var componentName = getComponentName(returnFiber.type) || 'Component';\n\n if (!didWarnAboutStringRefs[componentName]) {\n {\n error('A string ref, \"%s\", has been found within a strict mode tree. ' + 'String refs are a source of potential bugs and should be avoided. ' + 'We recommend using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', mixedRef);\n }\n\n didWarnAboutStringRefs[componentName] = true;\n }\n }\n }\n\n if (element._owner) {\n var owner = element._owner;\n var inst;\n\n if (owner) {\n var ownerFiber = owner;\n\n if (!(ownerFiber.tag === ClassComponent)) {\n {\n throw Error( \"Function components cannot have string refs. We recommend using useRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref\" );\n }\n }\n\n inst = ownerFiber.stateNode;\n }\n\n if (!inst) {\n {\n throw Error( \"Missing owner for string ref \" + mixedRef + \". This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n var stringRef = '' + mixedRef; // Check if previous string ref matches new string ref\n\n if (current !== null && current.ref !== null && typeof current.ref === 'function' && current.ref._stringRef === stringRef) {\n return current.ref;\n }\n\n var ref = function (value) {\n var refs = inst.refs;\n\n if (refs === emptyRefsObject) {\n // This is a lazy pooled frozen object, so we need to initialize.\n refs = inst.refs = {};\n }\n\n if (value === null) {\n delete refs[stringRef];\n } else {\n refs[stringRef] = value;\n }\n };\n\n ref._stringRef = stringRef;\n return ref;\n } else {\n if (!(typeof mixedRef === 'string')) {\n {\n throw Error( \"Expected ref to be a function, a string, an object returned by React.createRef(), or null.\" );\n }\n }\n\n if (!element._owner) {\n {\n throw Error( \"Element ref was specified as a string (\" + mixedRef + \") but no owner was set. This could happen for one of the following reasons:\\n1. You may be adding a ref to a function component\\n2. You may be adding a ref to a component that was not created inside a component's render method\\n3. You have multiple copies of React loaded\\nSee https://reactjs.org/link/refs-must-have-owner for more information.\" );\n }\n }\n }\n }\n\n return mixedRef;\n}\n\nfunction throwOnInvalidObjectType(returnFiber, newChild) {\n if (returnFiber.type !== 'textarea') {\n {\n {\n throw Error( \"Objects are not valid as a React child (found: \" + (Object.prototype.toString.call(newChild) === '[object Object]' ? 'object with keys {' + Object.keys(newChild).join(', ') + '}' : newChild) + \"). If you meant to render a collection of children, use an array instead.\" );\n }\n }\n }\n}\n\nfunction warnOnFunctionType(returnFiber) {\n {\n var componentName = getComponentName(returnFiber.type) || 'Component';\n\n if (ownerHasFunctionTypeWarning[componentName]) {\n return;\n }\n\n ownerHasFunctionTypeWarning[componentName] = true;\n\n error('Functions are not valid as a React child. This may happen if ' + 'you return a Component instead of <Component /> from render. ' + 'Or maybe you meant to call this function rather than return it.');\n }\n} // We avoid inlining this to avoid potential deopts from using try/catch.\n// to be able to optimize each path individually by branching early. This needs\n// a compiler or we can do it manually. Helpers that don't need this branching\n// live outside of this function.\n\n\nfunction ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n } // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n\n childToDelete.nextEffect = null;\n childToDelete.flags = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n } // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n\n\n var childToDelete = currentFirstChild;\n\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n // instead.\n var existingChildren = new Map();\n var existingChild = currentFirstChild;\n\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n\n existingChild = existingChild.sibling;\n }\n\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n\n var current = newFiber.alternate;\n\n if (current !== null) {\n var oldIndex = current.index;\n\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.flags = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.flags = Placement;\n }\n\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, lanes) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, lanes) {\n if (current !== null) {\n if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(current, element) )) {\n // Move based on index\n var existing = useFiber(current, element.props);\n existing.ref = coerceRef(returnFiber, current, element);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n } // Insert\n\n\n var created = createFiberFromElement(element, returnFiber.mode, lanes);\n created.ref = coerceRef(returnFiber, current, element);\n created.return = returnFiber;\n return created;\n }\n\n function updatePortal(returnFiber, current, portal, lanes) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || []);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, lanes, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.mode, lanes, key);\n created.return = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment);\n existing.return = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _created = createFiberFromElement(newChild, returnFiber.mode, lanes);\n\n _created.ref = coerceRef(returnFiber, null, newChild);\n _created.return = returnFiber;\n return _created;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created2 = createFiberFromPortal(newChild, returnFiber.mode, lanes);\n\n _created2.return = returnFiber;\n return _created2;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created3 = createFiberFromFragment(newChild, returnFiber.mode, lanes, null);\n\n _created3.return = returnFiber;\n return _created3;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, lanes) {\n // Update the fiber if the keys match, otherwise return null.\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n\n return updateTextNode(returnFiber, oldFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, lanes, key);\n }\n\n return updateElement(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, lanes);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, lanes) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, lanes);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, lanes, newChild.key);\n }\n\n return updateElement(returnFiber, _matchedFiber, newChild, lanes);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n\n return updatePortal(returnFiber, _matchedFiber2, newChild, lanes);\n }\n\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n\n return updateFragment(returnFiber, _matchedFiber3, newChild, lanes, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n return null;\n }\n /**\n * Warns if there is a duplicate or missing key\n */\n\n\n function warnOnInvalidKey(child, knownKeys, returnFiber) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child, returnFiber);\n var key = child.key;\n\n if (typeof key !== 'string') {\n break;\n }\n\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n\n error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);\n\n break;\n }\n }\n\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, lanes) {\n // This algorithm can't optimize by searching from both ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n {\n // First, validate keys.\n var knownKeys = null;\n\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], lanes);\n\n if (_newFiber === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n\n previousNewFiber = _newFiber;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], lanes);\n\n if (_newFiber2 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, lanes) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n var iteratorFn = getIteratorFn(newChildrenIterable);\n\n if (!(typeof iteratorFn === 'function')) {\n {\n throw Error( \"An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n {\n // We don't support rendering Generators because it's a mutation.\n // See https://github.com/facebook/react/issues/12995\n if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag\n newChildrenIterable[Symbol.toStringTag] === 'Generator') {\n if (!didWarnAboutGenerators) {\n error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');\n }\n\n didWarnAboutGenerators = true;\n } // Warn about using Maps as children\n\n\n if (newChildrenIterable.entries === iteratorFn) {\n if (!didWarnAboutMaps) {\n error('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n } // First, validate keys.\n // We'll get a different iterator later for the main pass.\n\n\n var _newChildren = iteratorFn.call(newChildrenIterable);\n\n if (_newChildren) {\n var knownKeys = null;\n\n var _step = _newChildren.next();\n\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n\n if (!(newChildren != null)) {\n {\n throw Error( \"An iterable object provided no iterator.\" );\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n var step = newChildren.next();\n\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);\n\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n\n break;\n }\n\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, lanes);\n\n if (_newFiber3 === null) {\n continue;\n }\n\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n\n previousNewFiber = _newFiber3;\n }\n\n return resultingFirstChild;\n } // Add all children to a key map for quick lookups.\n\n\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.\n\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, lanes);\n\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, lanes) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent);\n existing.return = returnFiber;\n return existing;\n } // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n\n\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, lanes) {\n var key = element.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n switch (child.tag) {\n case Fragment:\n {\n if (element.type === REACT_FRAGMENT_TYPE) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.props.children);\n existing.return = returnFiber;\n\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n\n return existing;\n }\n\n break;\n }\n\n case Block:\n\n // We intentionally fallthrough here if enableBlocksAPI is not on.\n // eslint-disable-next-lined no-fallthrough\n\n default:\n {\n if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:\n isCompatibleFamilyForHotReloading(child, element) )) {\n deleteRemainingChildren(returnFiber, child.sibling);\n\n var _existing3 = useFiber(child, element.props);\n\n _existing3.ref = coerceRef(returnFiber, child, element);\n _existing3.return = returnFiber;\n\n {\n _existing3._debugSource = element._source;\n _existing3._debugOwner = element._owner;\n }\n\n return _existing3;\n }\n\n break;\n }\n } // Didn't match.\n\n\n deleteRemainingChildren(returnFiber, child);\n break;\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.mode, lanes, element.key);\n created.return = returnFiber;\n return created;\n } else {\n var _created4 = createFiberFromElement(element, returnFiber.mode, lanes);\n\n _created4.ref = coerceRef(returnFiber, currentFirstChild, element);\n _created4.return = returnFiber;\n return _created4;\n }\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, lanes) {\n var key = portal.key;\n var child = currentFirstChild;\n\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || []);\n existing.return = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.mode, lanes);\n created.return = returnFiber;\n return created;\n } // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n\n\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, lanes) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]}</> and <>...</>.\n // We treat the ambiguous cases above the same.\n var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;\n\n if (isUnkeyedTopLevelFragment) {\n newChild = newChild.props.children;\n } // Handle object types\n\n\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, lanes));\n\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, lanes));\n\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, lanes));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, lanes);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType(returnFiber);\n }\n }\n\n if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n\n case Block:\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n {\n {\n throw Error( (getComponentName(returnFiber.type) || 'Component') + \"(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.\" );\n }\n }\n }\n }\n } // Remaining cases are all treated as empty.\n\n\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}\n\nvar reconcileChildFibers = ChildReconciler(true);\nvar mountChildFibers = ChildReconciler(false);\nfunction cloneChildFibers(current, workInProgress) {\n if (!(current === null || workInProgress.child === current.child)) {\n {\n throw Error( \"Resuming work not yet implemented.\" );\n }\n }\n\n if (workInProgress.child === null) {\n return;\n }\n\n var currentChild = workInProgress.child;\n var newChild = createWorkInProgress(currentChild, currentChild.pendingProps);\n workInProgress.child = newChild;\n newChild.return = workInProgress;\n\n while (currentChild.sibling !== null) {\n currentChild = currentChild.sibling;\n newChild = newChild.sibling = createWorkInProgress(currentChild, currentChild.pendingProps);\n newChild.return = workInProgress;\n }\n\n newChild.sibling = null;\n} // Reset a workInProgress child set to prepare it for a second pass.\n\nfunction resetChildFibers(workInProgress, lanes) {\n var child = workInProgress.child;\n\n while (child !== null) {\n resetWorkInProgress(child, lanes);\n child = child.sibling;\n }\n}\n\nvar NO_CONTEXT = {};\nvar contextStackCursor$1 = createCursor(NO_CONTEXT);\nvar contextFiberStackCursor = createCursor(NO_CONTEXT);\nvar rootInstanceStackCursor = createCursor(NO_CONTEXT);\n\nfunction requiredContext(c) {\n if (!(c !== NO_CONTEXT)) {\n {\n throw Error( \"Expected host context to exist. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n return c;\n}\n\nfunction getRootHostContainer() {\n var rootInstance = requiredContext(rootInstanceStackCursor.current);\n return rootInstance;\n}\n\nfunction pushHostContainer(fiber, nextRootInstance) {\n // Push current root instance onto the stack;\n // This allows us to reset root when portals are popped.\n push(rootInstanceStackCursor, nextRootInstance, fiber); // Track the context and the Fiber that provided it.\n // This enables us to pop only Fibers that provide unique contexts.\n\n push(contextFiberStackCursor, fiber, fiber); // Finally, we need to push the host context to the stack.\n // However, we can't just call getRootHostContext() and push it because\n // we'd have a different number of entries on the stack depending on\n // whether getRootHostContext() throws somewhere in renderer code or not.\n // So we push an empty value first. This lets us safely unwind on errors.\n\n push(contextStackCursor$1, NO_CONTEXT, fiber);\n var nextRootContext = getRootHostContext(nextRootInstance); // Now that we know this function doesn't throw, replace it.\n\n pop(contextStackCursor$1, fiber);\n push(contextStackCursor$1, nextRootContext, fiber);\n}\n\nfunction popHostContainer(fiber) {\n pop(contextStackCursor$1, fiber);\n pop(contextFiberStackCursor, fiber);\n pop(rootInstanceStackCursor, fiber);\n}\n\nfunction getHostContext() {\n var context = requiredContext(contextStackCursor$1.current);\n return context;\n}\n\nfunction pushHostContext(fiber) {\n var rootInstance = requiredContext(rootInstanceStackCursor.current);\n var context = requiredContext(contextStackCursor$1.current);\n var nextContext = getChildHostContext(context, fiber.type); // Don't push this Fiber's context unless it's unique.\n\n if (context === nextContext) {\n return;\n } // Track the context and the Fiber that provided it.\n // This enables us to pop only Fibers that provide unique contexts.\n\n\n push(contextFiberStackCursor, fiber, fiber);\n push(contextStackCursor$1, nextContext, fiber);\n}\n\nfunction popHostContext(fiber) {\n // Do not pop unless this Fiber provided the current context.\n // pushHostContext() only pushes Fibers that provide unique contexts.\n if (contextFiberStackCursor.current !== fiber) {\n return;\n }\n\n pop(contextStackCursor$1, fiber);\n pop(contextFiberStackCursor, fiber);\n}\n\nvar DefaultSuspenseContext = 0; // The Suspense Context is split into two parts. The lower bits is\n// inherited deeply down the subtree. The upper bits only affect\n// this immediate suspense boundary and gets reset each new\n// boundary or suspense list.\n\nvar SubtreeSuspenseContextMask = 1; // Subtree Flags:\n// InvisibleParentSuspenseContext indicates that one of our parent Suspense\n// boundaries is not currently showing visible main content.\n// Either because it is already showing a fallback or is not mounted at all.\n// We can use this to determine if it is desirable to trigger a fallback at\n// the parent. If not, then we might need to trigger undesirable boundaries\n// and/or suspend the commit to avoid hiding the parent content.\n\nvar InvisibleParentSuspenseContext = 1; // Shallow Flags:\n// ForceSuspenseFallback can be used by SuspenseList to force newly added\n// items into their fallback state during one of the render passes.\n\nvar ForceSuspenseFallback = 2;\nvar suspenseStackCursor = createCursor(DefaultSuspenseContext);\nfunction hasSuspenseContext(parentContext, flag) {\n return (parentContext & flag) !== 0;\n}\nfunction setDefaultShallowSuspenseContext(parentContext) {\n return parentContext & SubtreeSuspenseContextMask;\n}\nfunction setShallowSuspenseContext(parentContext, shallowContext) {\n return parentContext & SubtreeSuspenseContextMask | shallowContext;\n}\nfunction addSubtreeSuspenseContext(parentContext, subtreeContext) {\n return parentContext | subtreeContext;\n}\nfunction pushSuspenseContext(fiber, newContext) {\n push(suspenseStackCursor, newContext, fiber);\n}\nfunction popSuspenseContext(fiber) {\n pop(suspenseStackCursor, fiber);\n}\n\nfunction shouldCaptureSuspense(workInProgress, hasInvisibleParent) {\n // If it was the primary children that just suspended, capture and render the\n // fallback. Otherwise, don't capture and bubble to the next boundary.\n var nextState = workInProgress.memoizedState;\n\n if (nextState !== null) {\n if (nextState.dehydrated !== null) {\n // A dehydrated boundary always captures.\n return true;\n }\n\n return false;\n }\n\n var props = workInProgress.memoizedProps; // In order to capture, the Suspense component must have a fallback prop.\n\n if (props.fallback === undefined) {\n return false;\n } // Regular boundaries always capture.\n\n\n if (props.unstable_avoidThisFallback !== true) {\n return true;\n } // If it's a boundary we should avoid, then we prefer to bubble up to the\n // parent boundary if it is currently invisible.\n\n\n if (hasInvisibleParent) {\n return false;\n } // If the parent is not able to handle it, we must handle it.\n\n\n return true;\n}\nfunction findFirstSuspended(row) {\n var node = row;\n\n while (node !== null) {\n if (node.tag === SuspenseComponent) {\n var state = node.memoizedState;\n\n if (state !== null) {\n var dehydrated = state.dehydrated;\n\n if (dehydrated === null || isSuspenseInstancePending(dehydrated) || isSuspenseInstanceFallback(dehydrated)) {\n return node;\n }\n }\n } else if (node.tag === SuspenseListComponent && // revealOrder undefined can't be trusted because it don't\n // keep track of whether it suspended or not.\n node.memoizedProps.revealOrder !== undefined) {\n var didSuspend = (node.flags & DidCapture) !== NoFlags;\n\n if (didSuspend) {\n return node;\n }\n } else if (node.child !== null) {\n node.child.return = node;\n node = node.child;\n continue;\n }\n\n if (node === row) {\n return null;\n }\n\n while (node.sibling === null) {\n if (node.return === null || node.return === row) {\n return null;\n }\n\n node = node.return;\n }\n\n node.sibling.return = node.return;\n node = node.sibling;\n }\n\n return null;\n}\n\nvar NoFlags$1 =\n/* */\n0; // Represents whether effect should fire.\n\nvar HasEffect =\n/* */\n1; // Represents the phase in which the effect (not the clean-up) fires.\n\nvar Layout =\n/* */\n2;\nvar Passive$1 =\n/* */\n4;\n\n// This may have been an insertion or a hydration.\n\nvar hydrationParentFiber = null;\nvar nextHydratableInstance = null;\nvar isHydrating = false;\n\nfunction enterHydrationState(fiber) {\n\n var parentInstance = fiber.stateNode.containerInfo;\n nextHydratableInstance = getFirstHydratableChild(parentInstance);\n hydrationParentFiber = fiber;\n isHydrating = true;\n return true;\n}\n\nfunction deleteHydratableInstance(returnFiber, instance) {\n {\n switch (returnFiber.tag) {\n case HostRoot:\n didNotHydrateContainerInstance(returnFiber.stateNode.containerInfo, instance);\n break;\n\n case HostComponent:\n didNotHydrateInstance(returnFiber.type, returnFiber.memoizedProps, returnFiber.stateNode, instance);\n break;\n }\n }\n\n var childToDelete = createFiberFromHostInstanceForDeletion();\n childToDelete.stateNode = instance;\n childToDelete.return = returnFiber;\n childToDelete.flags = Deletion; // This might seem like it belongs on progressedFirstDeletion. However,\n // these children are not part of the reconciliation list of children.\n // Even if we abort and rereconcile the children, that will try to hydrate\n // again and the nodes are still in the host tree so these will be\n // recreated.\n\n if (returnFiber.lastEffect !== null) {\n returnFiber.lastEffect.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n}\n\nfunction insertNonHydratedInstance(returnFiber, fiber) {\n fiber.flags = fiber.flags & ~Hydrating | Placement;\n\n {\n switch (returnFiber.tag) {\n case HostRoot:\n {\n var parentContainer = returnFiber.stateNode.containerInfo;\n\n switch (fiber.tag) {\n case HostComponent:\n var type = fiber.type;\n var props = fiber.pendingProps;\n didNotFindHydratableContainerInstance(parentContainer, type);\n break;\n\n case HostText:\n var text = fiber.pendingProps;\n didNotFindHydratableContainerTextInstance(parentContainer, text);\n break;\n }\n\n break;\n }\n\n case HostComponent:\n {\n var parentType = returnFiber.type;\n var parentProps = returnFiber.memoizedProps;\n var parentInstance = returnFiber.stateNode;\n\n switch (fiber.tag) {\n case HostComponent:\n var _type = fiber.type;\n var _props = fiber.pendingProps;\n didNotFindHydratableInstance(parentType, parentProps, parentInstance, _type);\n break;\n\n case HostText:\n var _text = fiber.pendingProps;\n didNotFindHydratableTextInstance(parentType, parentProps, parentInstance, _text);\n break;\n\n case SuspenseComponent:\n didNotFindHydratableSuspenseInstance(parentType, parentProps);\n break;\n }\n\n break;\n }\n\n default:\n return;\n }\n }\n}\n\nfunction tryHydrate(fiber, nextInstance) {\n switch (fiber.tag) {\n case HostComponent:\n {\n var type = fiber.type;\n var props = fiber.pendingProps;\n var instance = canHydrateInstance(nextInstance, type);\n\n if (instance !== null) {\n fiber.stateNode = instance;\n return true;\n }\n\n return false;\n }\n\n case HostText:\n {\n var text = fiber.pendingProps;\n var textInstance = canHydrateTextInstance(nextInstance, text);\n\n if (textInstance !== null) {\n fiber.stateNode = textInstance;\n return true;\n }\n\n return false;\n }\n\n case SuspenseComponent:\n {\n\n return false;\n }\n\n default:\n return false;\n }\n}\n\nfunction tryToClaimNextHydratableInstance(fiber) {\n if (!isHydrating) {\n return;\n }\n\n var nextInstance = nextHydratableInstance;\n\n if (!nextInstance) {\n // Nothing to hydrate. Make it an insertion.\n insertNonHydratedInstance(hydrationParentFiber, fiber);\n isHydrating = false;\n hydrationParentFiber = fiber;\n return;\n }\n\n var firstAttemptedInstance = nextInstance;\n\n if (!tryHydrate(fiber, nextInstance)) {\n // If we can't hydrate this instance let's try the next one.\n // We use this as a heuristic. It's based on intuition and not data so it\n // might be flawed or unnecessary.\n nextInstance = getNextHydratableSibling(firstAttemptedInstance);\n\n if (!nextInstance || !tryHydrate(fiber, nextInstance)) {\n // Nothing to hydrate. Make it an insertion.\n insertNonHydratedInstance(hydrationParentFiber, fiber);\n isHydrating = false;\n hydrationParentFiber = fiber;\n return;\n } // We matched the next one, we'll now assume that the first one was\n // superfluous and we'll delete it. Since we can't eagerly delete it\n // we'll have to schedule a deletion. To do that, this node needs a dummy\n // fiber associated with it.\n\n\n deleteHydratableInstance(hydrationParentFiber, firstAttemptedInstance);\n }\n\n hydrationParentFiber = fiber;\n nextHydratableInstance = getFirstHydratableChild(nextInstance);\n}\n\nfunction prepareToHydrateHostInstance(fiber, rootContainerInstance, hostContext) {\n\n var instance = fiber.stateNode;\n var updatePayload = hydrateInstance(instance, fiber.type, fiber.memoizedProps, rootContainerInstance, hostContext, fiber); // TODO: Type this specific to this type of component.\n\n fiber.updateQueue = updatePayload; // If the update payload indicates that there is a change or if there\n // is a new ref we mark this as an update.\n\n if (updatePayload !== null) {\n return true;\n }\n\n return false;\n}\n\nfunction prepareToHydrateHostTextInstance(fiber) {\n\n var textInstance = fiber.stateNode;\n var textContent = fiber.memoizedProps;\n var shouldUpdate = hydrateTextInstance(textInstance, textContent, fiber);\n\n {\n if (shouldUpdate) {\n // We assume that prepareToHydrateHostTextInstance is called in a context where the\n // hydration parent is the parent host component of this host text.\n var returnFiber = hydrationParentFiber;\n\n if (returnFiber !== null) {\n switch (returnFiber.tag) {\n case HostRoot:\n {\n var parentContainer = returnFiber.stateNode.containerInfo;\n didNotMatchHydratedContainerTextInstance(parentContainer, textInstance, textContent);\n break;\n }\n\n case HostComponent:\n {\n var parentType = returnFiber.type;\n var parentProps = returnFiber.memoizedProps;\n var parentInstance = returnFiber.stateNode;\n didNotMatchHydratedTextInstance(parentType, parentProps, parentInstance, textInstance, textContent);\n break;\n }\n }\n }\n }\n }\n\n return shouldUpdate;\n}\n\nfunction skipPastDehydratedSuspenseInstance(fiber) {\n\n var suspenseState = fiber.memoizedState;\n var suspenseInstance = suspenseState !== null ? suspenseState.dehydrated : null;\n\n if (!suspenseInstance) {\n {\n throw Error( \"Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n return getNextHydratableInstanceAfterSuspenseInstance(suspenseInstance);\n}\n\nfunction popToNextHostParent(fiber) {\n var parent = fiber.return;\n\n while (parent !== null && parent.tag !== HostComponent && parent.tag !== HostRoot && parent.tag !== SuspenseComponent) {\n parent = parent.return;\n }\n\n hydrationParentFiber = parent;\n}\n\nfunction popHydrationState(fiber) {\n\n if (fiber !== hydrationParentFiber) {\n // We're deeper than the current hydration context, inside an inserted\n // tree.\n return false;\n }\n\n if (!isHydrating) {\n // If we're not currently hydrating but we're in a hydration context, then\n // we were an insertion and now need to pop up reenter hydration of our\n // siblings.\n popToNextHostParent(fiber);\n isHydrating = true;\n return false;\n }\n\n var type = fiber.type; // If we have any remaining hydratable nodes, we need to delete them now.\n // We only do this deeper than head and body since they tend to have random\n // other nodes in them. We also ignore components with pure text content in\n // side of them.\n // TODO: Better heuristic.\n\n if (fiber.tag !== HostComponent || type !== 'head' && type !== 'body' && !shouldSetTextContent(type, fiber.memoizedProps)) {\n var nextInstance = nextHydratableInstance;\n\n while (nextInstance) {\n deleteHydratableInstance(fiber, nextInstance);\n nextInstance = getNextHydratableSibling(nextInstance);\n }\n }\n\n popToNextHostParent(fiber);\n\n if (fiber.tag === SuspenseComponent) {\n nextHydratableInstance = skipPastDehydratedSuspenseInstance(fiber);\n } else {\n nextHydratableInstance = hydrationParentFiber ? getNextHydratableSibling(fiber.stateNode) : null;\n }\n\n return true;\n}\n\nfunction resetHydrationState() {\n\n hydrationParentFiber = null;\n nextHydratableInstance = null;\n isHydrating = false;\n}\n\nfunction getIsHydrating() {\n return isHydrating;\n}\n\n// and should be reset before starting a new render.\n// This tracks which mutable sources need to be reset after a render.\n\nvar workInProgressSources = [];\nvar rendererSigil$1;\n\n{\n // Used to detect multiple renderers using the same mutable source.\n rendererSigil$1 = {};\n}\n\nfunction markSourceAsDirty(mutableSource) {\n workInProgressSources.push(mutableSource);\n}\nfunction resetWorkInProgressVersions() {\n for (var i = 0; i < workInProgressSources.length; i++) {\n var mutableSource = workInProgressSources[i];\n\n {\n mutableSource._workInProgressVersionPrimary = null;\n }\n }\n\n workInProgressSources.length = 0;\n}\nfunction getWorkInProgressVersion(mutableSource) {\n {\n return mutableSource._workInProgressVersionPrimary;\n }\n}\nfunction setWorkInProgressVersion(mutableSource, version) {\n {\n mutableSource._workInProgressVersionPrimary = version;\n }\n\n workInProgressSources.push(mutableSource);\n}\nfunction warnAboutMultipleRenderersDEV(mutableSource) {\n {\n {\n if (mutableSource._currentPrimaryRenderer == null) {\n mutableSource._currentPrimaryRenderer = rendererSigil$1;\n } else if (mutableSource._currentPrimaryRenderer !== rendererSigil$1) {\n error('Detected multiple renderers concurrently rendering the ' + 'same mutable source. This is currently unsupported.');\n }\n }\n }\n} // Eager reads the version of a mutable source and stores it on the root.\n\nvar ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher,\n ReactCurrentBatchConfig$1 = ReactSharedInternals.ReactCurrentBatchConfig;\nvar didWarnAboutMismatchedHooksForComponent;\nvar didWarnAboutUseOpaqueIdentifier;\n\n{\n didWarnAboutUseOpaqueIdentifier = {};\n didWarnAboutMismatchedHooksForComponent = new Set();\n}\n\n// These are set right before calling the component.\nvar renderLanes = NoLanes; // The work-in-progress fiber. I've named it differently to distinguish it from\n// the work-in-progress hook.\n\nvar currentlyRenderingFiber$1 = null; // Hooks are stored as a linked list on the fiber's memoizedState field. The\n// current hook list is the list that belongs to the current fiber. The\n// work-in-progress hook list is a new list that will be added to the\n// work-in-progress fiber.\n\nvar currentHook = null;\nvar workInProgressHook = null; // Whether an update was scheduled at any point during the render phase. This\n// does not get reset if we do another render pass; only when we're completely\n// finished evaluating this component. This is an optimization so we know\n// whether we need to clear render phase updates after a throw.\n\nvar didScheduleRenderPhaseUpdate = false; // Where an update was scheduled only during the current render pass. This\n// gets reset after each attempt.\n// TODO: Maybe there's some way to consolidate this with\n// `didScheduleRenderPhaseUpdate`. Or with `numberOfReRenders`.\n\nvar didScheduleRenderPhaseUpdateDuringThisPass = false;\nvar RE_RENDER_LIMIT = 25; // In DEV, this is the name of the currently executing primitive hook\n\nvar currentHookNameInDev = null; // In DEV, this list ensures that hooks are called in the same order between renders.\n// The list stores the order of hooks used during the initial render (mount).\n// Subsequent renders (updates) reference this list.\n\nvar hookTypesDev = null;\nvar hookTypesUpdateIndexDev = -1; // In DEV, this tracks whether currently rendering component needs to ignore\n// the dependencies for Hooks that need them (e.g. useEffect or useMemo).\n// When true, such Hooks will always be \"remounted\". Only used during hot reload.\n\nvar ignorePreviousDependencies = false;\n\nfunction mountHookTypesDev() {\n {\n var hookName = currentHookNameInDev;\n\n if (hookTypesDev === null) {\n hookTypesDev = [hookName];\n } else {\n hookTypesDev.push(hookName);\n }\n }\n}\n\nfunction updateHookTypesDev() {\n {\n var hookName = currentHookNameInDev;\n\n if (hookTypesDev !== null) {\n hookTypesUpdateIndexDev++;\n\n if (hookTypesDev[hookTypesUpdateIndexDev] !== hookName) {\n warnOnHookMismatchInDev(hookName);\n }\n }\n }\n}\n\nfunction checkDepsAreArrayDev(deps) {\n {\n if (deps !== undefined && deps !== null && !Array.isArray(deps)) {\n // Verify deps, but only on mount to avoid extra checks.\n // It's unlikely their type would change as usually you define them inline.\n error('%s received a final argument that is not an array (instead, received `%s`). When ' + 'specified, the final argument must be an array.', currentHookNameInDev, typeof deps);\n }\n }\n}\n\nfunction warnOnHookMismatchInDev(currentHookName) {\n {\n var componentName = getComponentName(currentlyRenderingFiber$1.type);\n\n if (!didWarnAboutMismatchedHooksForComponent.has(componentName)) {\n didWarnAboutMismatchedHooksForComponent.add(componentName);\n\n if (hookTypesDev !== null) {\n var table = '';\n var secondColumnStart = 30;\n\n for (var i = 0; i <= hookTypesUpdateIndexDev; i++) {\n var oldHookName = hookTypesDev[i];\n var newHookName = i === hookTypesUpdateIndexDev ? currentHookName : oldHookName;\n var row = i + 1 + \". \" + oldHookName; // Extra space so second column lines up\n // lol @ IE not supporting String#repeat\n\n while (row.length < secondColumnStart) {\n row += ' ';\n }\n\n row += newHookName + '\\n';\n table += row;\n }\n\n error('React has detected a change in the order of Hooks called by %s. ' + 'This will lead to bugs and errors if not fixed. ' + 'For more information, read the Rules of Hooks: https://reactjs.org/link/rules-of-hooks\\n\\n' + ' Previous render Next render\\n' + ' ------------------------------------------------------\\n' + '%s' + ' ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n', componentName, table);\n }\n }\n }\n}\n\nfunction throwInvalidHookError() {\n {\n {\n 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.\" );\n }\n }\n}\n\nfunction areHookInputsEqual(nextDeps, prevDeps) {\n {\n if (ignorePreviousDependencies) {\n // Only true when this component is being hot reloaded.\n return false;\n }\n }\n\n if (prevDeps === null) {\n {\n error('%s received a final argument during this render, but not during ' + 'the previous render. Even though the final argument is optional, ' + 'its type cannot change between renders.', currentHookNameInDev);\n }\n\n return false;\n }\n\n {\n // Don't bother comparing lengths in prod because these arrays should be\n // passed inline.\n if (nextDeps.length !== prevDeps.length) {\n error('The final argument passed to %s changed size between renders. The ' + 'order and size of this array must remain constant.\\n\\n' + 'Previous: %s\\n' + 'Incoming: %s', currentHookNameInDev, \"[\" + prevDeps.join(', ') + \"]\", \"[\" + nextDeps.join(', ') + \"]\");\n }\n }\n\n for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++) {\n if (objectIs(nextDeps[i], prevDeps[i])) {\n continue;\n }\n\n return false;\n }\n\n return true;\n}\n\nfunction renderWithHooks(current, workInProgress, Component, props, secondArg, nextRenderLanes) {\n renderLanes = nextRenderLanes;\n currentlyRenderingFiber$1 = workInProgress;\n\n {\n hookTypesDev = current !== null ? current._debugHookTypes : null;\n hookTypesUpdateIndexDev = -1; // Used for hot reloading:\n\n ignorePreviousDependencies = current !== null && current.type !== workInProgress.type;\n }\n\n workInProgress.memoizedState = null;\n workInProgress.updateQueue = null;\n workInProgress.lanes = NoLanes; // The following should have already been reset\n // currentHook = null;\n // workInProgressHook = null;\n // didScheduleRenderPhaseUpdate = false;\n // TODO Warn if no hooks are used at all during mount, then some are used during update.\n // Currently we will identify the update render as a mount because memoizedState === null.\n // This is tricky because it's valid for certain types of components (e.g. React.lazy)\n // Using memoizedState to differentiate between mount/update only works if at least one stateful hook is used.\n // Non-stateful hooks (e.g. context) don't get added to memoizedState,\n // so memoizedState would be null during updates and mounts.\n\n {\n if (current !== null && current.memoizedState !== null) {\n ReactCurrentDispatcher$1.current = HooksDispatcherOnUpdateInDEV;\n } else if (hookTypesDev !== null) {\n // This dispatcher handles an edge case where a component is updating,\n // but no stateful hooks have been used.\n // We want to match the production code behavior (which will use HooksDispatcherOnMount),\n // but with the extra DEV validation to ensure hooks ordering hasn't changed.\n // This dispatcher does that.\n ReactCurrentDispatcher$1.current = HooksDispatcherOnMountWithHookTypesInDEV;\n } else {\n ReactCurrentDispatcher$1.current = HooksDispatcherOnMountInDEV;\n }\n }\n\n var children = Component(props, secondArg); // Check if there was a render phase update\n\n if (didScheduleRenderPhaseUpdateDuringThisPass) {\n // Keep rendering in a loop for as long as render phase updates continue to\n // be scheduled. Use a counter to prevent infinite loops.\n var numberOfReRenders = 0;\n\n do {\n didScheduleRenderPhaseUpdateDuringThisPass = false;\n\n if (!(numberOfReRenders < RE_RENDER_LIMIT)) {\n {\n throw Error( \"Too many re-renders. React limits the number of renders to prevent an infinite loop.\" );\n }\n }\n\n numberOfReRenders += 1;\n\n {\n // Even when hot reloading, allow dependencies to stabilize\n // after first render to prevent infinite render phase updates.\n ignorePreviousDependencies = false;\n } // Start over from the beginning of the list\n\n\n currentHook = null;\n workInProgressHook = null;\n workInProgress.updateQueue = null;\n\n {\n // Also validate hook order for cascading updates.\n hookTypesUpdateIndexDev = -1;\n }\n\n ReactCurrentDispatcher$1.current = HooksDispatcherOnRerenderInDEV ;\n children = Component(props, secondArg);\n } while (didScheduleRenderPhaseUpdateDuringThisPass);\n } // We can assume the previous dispatcher is always this one, since we set it\n // at the beginning of the render phase and there's no re-entrancy.\n\n\n ReactCurrentDispatcher$1.current = ContextOnlyDispatcher;\n\n {\n workInProgress._debugHookTypes = hookTypesDev;\n } // This check uses currentHook so that it works the same in DEV and prod bundles.\n // hookTypesDev could catch more cases (e.g. context) but only in DEV bundles.\n\n\n var didRenderTooFewHooks = currentHook !== null && currentHook.next !== null;\n renderLanes = NoLanes;\n currentlyRenderingFiber$1 = null;\n currentHook = null;\n workInProgressHook = null;\n\n {\n currentHookNameInDev = null;\n hookTypesDev = null;\n hookTypesUpdateIndexDev = -1;\n }\n\n didScheduleRenderPhaseUpdate = false;\n\n if (!!didRenderTooFewHooks) {\n {\n throw Error( \"Rendered fewer hooks than expected. This may be caused by an accidental early return statement.\" );\n }\n }\n\n return children;\n}\nfunction bailoutHooks(current, workInProgress, lanes) {\n workInProgress.updateQueue = current.updateQueue;\n workInProgress.flags &= ~(Passive | Update);\n current.lanes = removeLanes(current.lanes, lanes);\n}\nfunction resetHooksAfterThrow() {\n // We can assume the previous dispatcher is always this one, since we set it\n // at the beginning of the render phase and there's no re-entrancy.\n ReactCurrentDispatcher$1.current = ContextOnlyDispatcher;\n\n if (didScheduleRenderPhaseUpdate) {\n // There were render phase updates. These are only valid for this render\n // phase, which we are now aborting. Remove the updates from the queues so\n // they do not persist to the next render. Do not remove updates from hooks\n // that weren't processed.\n //\n // Only reset the updates from the queue if it has a clone. If it does\n // not have a clone, that means it wasn't processed, and the updates were\n // scheduled before we entered the render phase.\n var hook = currentlyRenderingFiber$1.memoizedState;\n\n while (hook !== null) {\n var queue = hook.queue;\n\n if (queue !== null) {\n queue.pending = null;\n }\n\n hook = hook.next;\n }\n\n didScheduleRenderPhaseUpdate = false;\n }\n\n renderLanes = NoLanes;\n currentlyRenderingFiber$1 = null;\n currentHook = null;\n workInProgressHook = null;\n\n {\n hookTypesDev = null;\n hookTypesUpdateIndexDev = -1;\n currentHookNameInDev = null;\n isUpdatingOpaqueValueInRenderPhase = false;\n }\n\n didScheduleRenderPhaseUpdateDuringThisPass = false;\n}\n\nfunction mountWorkInProgressHook() {\n var hook = {\n memoizedState: null,\n baseState: null,\n baseQueue: null,\n queue: null,\n next: null\n };\n\n if (workInProgressHook === null) {\n // This is the first hook in the list\n currentlyRenderingFiber$1.memoizedState = workInProgressHook = hook;\n } else {\n // Append to the end of the list\n workInProgressHook = workInProgressHook.next = hook;\n }\n\n return workInProgressHook;\n}\n\nfunction updateWorkInProgressHook() {\n // This function is used both for updates and for re-renders triggered by a\n // render phase update. It assumes there is either a current hook we can\n // clone, or a work-in-progress hook from a previous render pass that we can\n // use as a base. When we reach the end of the base list, we must switch to\n // the dispatcher used for mounts.\n var nextCurrentHook;\n\n if (currentHook === null) {\n var current = currentlyRenderingFiber$1.alternate;\n\n if (current !== null) {\n nextCurrentHook = current.memoizedState;\n } else {\n nextCurrentHook = null;\n }\n } else {\n nextCurrentHook = currentHook.next;\n }\n\n var nextWorkInProgressHook;\n\n if (workInProgressHook === null) {\n nextWorkInProgressHook = currentlyRenderingFiber$1.memoizedState;\n } else {\n nextWorkInProgressHook = workInProgressHook.next;\n }\n\n if (nextWorkInProgressHook !== null) {\n // There's already a work-in-progress. Reuse it.\n workInProgressHook = nextWorkInProgressHook;\n nextWorkInProgressHook = workInProgressHook.next;\n currentHook = nextCurrentHook;\n } else {\n // Clone from the current hook.\n if (!(nextCurrentHook !== null)) {\n {\n throw Error( \"Rendered more hooks than during the previous render.\" );\n }\n }\n\n currentHook = nextCurrentHook;\n var newHook = {\n memoizedState: currentHook.memoizedState,\n baseState: currentHook.baseState,\n baseQueue: currentHook.baseQueue,\n queue: currentHook.queue,\n next: null\n };\n\n if (workInProgressHook === null) {\n // This is the first hook in the list.\n currentlyRenderingFiber$1.memoizedState = workInProgressHook = newHook;\n } else {\n // Append to the end of the list.\n workInProgressHook = workInProgressHook.next = newHook;\n }\n }\n\n return workInProgressHook;\n}\n\nfunction createFunctionComponentUpdateQueue() {\n return {\n lastEffect: null\n };\n}\n\nfunction basicStateReducer(state, action) {\n // $FlowFixMe: Flow doesn't like mixed types\n return typeof action === 'function' ? action(state) : action;\n}\n\nfunction mountReducer(reducer, initialArg, init) {\n var hook = mountWorkInProgressHook();\n var initialState;\n\n if (init !== undefined) {\n initialState = init(initialArg);\n } else {\n initialState = initialArg;\n }\n\n hook.memoizedState = hook.baseState = initialState;\n var queue = hook.queue = {\n pending: null,\n dispatch: null,\n lastRenderedReducer: reducer,\n lastRenderedState: initialState\n };\n var dispatch = queue.dispatch = dispatchAction.bind(null, currentlyRenderingFiber$1, queue);\n return [hook.memoizedState, dispatch];\n}\n\nfunction updateReducer(reducer, initialArg, init) {\n var hook = updateWorkInProgressHook();\n var queue = hook.queue;\n\n if (!(queue !== null)) {\n {\n throw Error( \"Should have a queue. This is likely a bug in React. Please file an issue.\" );\n }\n }\n\n queue.lastRenderedReducer = reducer;\n var current = currentHook; // The last rebase update that is NOT part of the base state.\n\n var baseQueue = current.baseQueue; // The last pending update that hasn't been processed yet.\n\n var pendingQueue = queue.pending;\n\n if (pendingQueue !== null) {\n // We have new updates that haven't been processed yet.\n // We'll add them to the base queue.\n if (baseQueue !== null) {\n // Merge the pending queue and the base queue.\n var baseFirst = baseQueue.next;\n var pendingFirst = pendingQueue.next;\n baseQueue.next = pendingFirst;\n pendingQueue.next = baseFirst;\n }\n\n {\n if (current.baseQueue !== baseQueue) {\n // Internal invariant that should never happen, but feasibly could in\n // the future if we implement resuming, or some form of that.\n error('Internal error: Expected work-in-progress queue to be a clone. ' + 'This is a bug in React.');\n }\n }\n\n current.baseQueue = baseQueue = pendingQueue;\n queue.pending = null;\n }\n\n if (baseQueue !== null) {\n // We have a queue to process.\n var first = baseQueue.next;\n var newState = current.baseState;\n var newBaseState = null;\n var newBaseQueueFirst = null;\n var newBaseQueueLast = null;\n var update = first;\n\n do {\n var updateLane = update.lane;\n\n if (!isSubsetOfLanes(renderLanes, updateLane)) {\n // Priority is insufficient. Skip this update. If this is the first\n // skipped update, the previous update/state is the new base\n // update/state.\n var clone = {\n lane: updateLane,\n action: update.action,\n eagerReducer: update.eagerReducer,\n eagerState: update.eagerState,\n next: null\n };\n\n if (newBaseQueueLast === null) {\n newBaseQueueFirst = newBaseQueueLast = clone;\n newBaseState = newState;\n } else {\n newBaseQueueLast = newBaseQueueLast.next = clone;\n } // Update the remaining priority in the queue.\n // TODO: Don't need to accumulate this. Instead, we can remove\n // renderLanes from the original lanes.\n\n\n currentlyRenderingFiber$1.lanes = mergeLanes(currentlyRenderingFiber$1.lanes, updateLane);\n markSkippedUpdateLanes(updateLane);\n } else {\n // This update does have sufficient priority.\n if (newBaseQueueLast !== null) {\n var _clone = {\n // This update is going to be committed so we never want uncommit\n // it. Using NoLane works because 0 is a subset of all bitmasks, so\n // this will never be skipped by the check above.\n lane: NoLane,\n action: update.action,\n eagerReducer: update.eagerReducer,\n eagerState: update.eagerState,\n next: null\n };\n newBaseQueueLast = newBaseQueueLast.next = _clone;\n } // Process this update.\n\n\n if (update.eagerReducer === reducer) {\n // If this update was processed eagerly, and its reducer matches the\n // current reducer, we can use the eagerly computed state.\n newState = update.eagerState;\n } else {\n var action = update.action;\n newState = reducer(newState, action);\n }\n }\n\n update = update.next;\n } while (update !== null && update !== first);\n\n if (newBaseQueueLast === null) {\n newBaseState = newState;\n } else {\n newBaseQueueLast.next = newBaseQueueFirst;\n } // Mark that the fiber performed work, but only if the new state is\n // different from the current state.\n\n\n if (!objectIs(newState, hook.memoizedState)) {\n markWorkInProgressReceivedUpdate();\n }\n\n hook.memoizedState = newState;\n hook.baseState = newBaseState;\n hook.baseQueue = newBaseQueueLast;\n queue.lastRenderedState = newState;\n }\n\n var dispatch = queue.dispatch;\n return [hook.memoizedState, dispatch];\n}\n\nfunction rerenderReducer(reducer, initialArg, init) {\n var hook = updateWorkInProgressHook();\n var queue = hook.queue;\n\n if (!(queue !== null)) {\n {\n throw Error( \"Should have a queue. This is likely a bug in React. Please file an issue.\" );\n }\n }\n\n queue.lastRenderedReducer = reducer; // This is a re-render. Apply the new render phase updates to the previous\n // work-in-progress hook.\n\n var dispatch = queue.dispatch;\n var lastRenderPhaseUpdate = queue.pending;\n var newState = hook.memoizedState;\n\n if (lastRenderPhaseUpdate !== null) {\n // The queue doesn't persist past this render pass.\n queue.pending = null;\n var firstRenderPhaseUpdate = lastRenderPhaseUpdate.next;\n var update = firstRenderPhaseUpdate;\n\n do {\n // Process this render phase update. We don't have to check the\n // priority because it will always be the same as the current\n // render's.\n var action = update.action;\n newState = reducer(newState, action);\n update = update.next;\n } while (update !== firstRenderPhaseUpdate); // Mark that the fiber performed work, but only if the new state is\n // different from the current state.\n\n\n if (!objectIs(newState, hook.memoizedState)) {\n markWorkInProgressReceivedUpdate();\n }\n\n hook.memoizedState = newState; // Don't persist the state accumulated from the render phase updates to\n // the base state unless the queue is empty.\n // TODO: Not sure if this is the desired semantics, but it's what we\n // do for gDSFP. I can't remember why.\n\n if (hook.baseQueue === null) {\n hook.baseState = newState;\n }\n\n queue.lastRenderedState = newState;\n }\n\n return [newState, dispatch];\n}\n\nfunction readFromUnsubcribedMutableSource(root, source, getSnapshot) {\n {\n warnAboutMultipleRenderersDEV(source);\n }\n\n var getVersion = source._getVersion;\n var version = getVersion(source._source); // Is it safe for this component to read from this source during the current render?\n\n var isSafeToReadFromSource = false; // Check the version first.\n // If this render has already been started with a specific version,\n // we can use it alone to determine if we can safely read from the source.\n\n var currentRenderVersion = getWorkInProgressVersion(source);\n\n if (currentRenderVersion !== null) {\n // It's safe to read if the store hasn't been mutated since the last time\n // we read something.\n isSafeToReadFromSource = currentRenderVersion === version;\n } else {\n // If there's no version, then this is the first time we've read from the\n // source during the current render pass, so we need to do a bit more work.\n // What we need to determine is if there are any hooks that already\n // subscribed to the source, and if so, whether there are any pending\n // mutations that haven't been synchronized yet.\n //\n // If there are no pending mutations, then `root.mutableReadLanes` will be\n // empty, and we know we can safely read.\n //\n // If there *are* pending mutations, we may still be able to safely read\n // if the currently rendering lanes are inclusive of the pending mutation\n // lanes, since that guarantees that the value we're about to read from\n // the source is consistent with the values that we read during the most\n // recent mutation.\n isSafeToReadFromSource = isSubsetOfLanes(renderLanes, root.mutableReadLanes);\n\n if (isSafeToReadFromSource) {\n // If it's safe to read from this source during the current render,\n // store the version in case other components read from it.\n // A changed version number will let those components know to throw and restart the render.\n setWorkInProgressVersion(source, version);\n }\n }\n\n if (isSafeToReadFromSource) {\n var snapshot = getSnapshot(source._source);\n\n {\n if (typeof snapshot === 'function') {\n error('Mutable source should not return a function as the snapshot value. ' + 'Functions may close over mutable values and cause tearing.');\n }\n }\n\n return snapshot;\n } else {\n // This handles the special case of a mutable source being shared between renderers.\n // In that case, if the source is mutated between the first and second renderer,\n // The second renderer don't know that it needs to reset the WIP version during unwind,\n // (because the hook only marks sources as dirty if it's written to their WIP version).\n // That would cause this tear check to throw again and eventually be visible to the user.\n // We can avoid this infinite loop by explicitly marking the source as dirty.\n //\n // This can lead to tearing in the first renderer when it resumes,\n // but there's nothing we can do about that (short of throwing here and refusing to continue the render).\n markSourceAsDirty(source);\n\n {\n {\n throw Error( \"Cannot read from mutable source during the current render without tearing. This is a bug in React. Please file an issue.\" );\n }\n }\n }\n}\n\nfunction useMutableSource(hook, source, getSnapshot, subscribe) {\n var root = getWorkInProgressRoot();\n\n if (!(root !== null)) {\n {\n throw Error( \"Expected a work-in-progress root. This is a bug in React. Please file an issue.\" );\n }\n }\n\n var getVersion = source._getVersion;\n var version = getVersion(source._source);\n var dispatcher = ReactCurrentDispatcher$1.current; // eslint-disable-next-line prefer-const\n\n var _dispatcher$useState = dispatcher.useState(function () {\n return readFromUnsubcribedMutableSource(root, source, getSnapshot);\n }),\n currentSnapshot = _dispatcher$useState[0],\n setSnapshot = _dispatcher$useState[1];\n\n var snapshot = currentSnapshot; // Grab a handle to the state hook as well.\n // We use it to clear the pending update queue if we have a new source.\n\n var stateHook = workInProgressHook;\n var memoizedState = hook.memoizedState;\n var refs = memoizedState.refs;\n var prevGetSnapshot = refs.getSnapshot;\n var prevSource = memoizedState.source;\n var prevSubscribe = memoizedState.subscribe;\n var fiber = currentlyRenderingFiber$1;\n hook.memoizedState = {\n refs: refs,\n source: source,\n subscribe: subscribe\n }; // Sync the values needed by our subscription handler after each commit.\n\n dispatcher.useEffect(function () {\n refs.getSnapshot = getSnapshot; // Normally the dispatch function for a state hook never changes,\n // but this hook recreates the queue in certain cases to avoid updates from stale sources.\n // handleChange() below needs to reference the dispatch function without re-subscribing,\n // so we use a ref to ensure that it always has the latest version.\n\n refs.setSnapshot = setSnapshot; // Check for a possible change between when we last rendered now.\n\n var maybeNewVersion = getVersion(source._source);\n\n if (!objectIs(version, maybeNewVersion)) {\n var maybeNewSnapshot = getSnapshot(source._source);\n\n {\n if (typeof maybeNewSnapshot === 'function') {\n error('Mutable source should not return a function as the snapshot value. ' + 'Functions may close over mutable values and cause tearing.');\n }\n }\n\n if (!objectIs(snapshot, maybeNewSnapshot)) {\n setSnapshot(maybeNewSnapshot);\n var lane = requestUpdateLane(fiber);\n markRootMutableRead(root, lane);\n } // If the source mutated between render and now,\n // there may be state updates already scheduled from the old source.\n // Entangle the updates so that they render in the same batch.\n\n\n markRootEntangled(root, root.mutableReadLanes);\n }\n }, [getSnapshot, source, subscribe]); // If we got a new source or subscribe function, re-subscribe in a passive effect.\n\n dispatcher.useEffect(function () {\n var handleChange = function () {\n var latestGetSnapshot = refs.getSnapshot;\n var latestSetSnapshot = refs.setSnapshot;\n\n try {\n latestSetSnapshot(latestGetSnapshot(source._source)); // Record a pending mutable source update with the same expiration time.\n\n var lane = requestUpdateLane(fiber);\n markRootMutableRead(root, lane);\n } catch (error) {\n // A selector might throw after a source mutation.\n // e.g. it might try to read from a part of the store that no longer exists.\n // In this case we should still schedule an update with React.\n // Worst case the selector will throw again and then an error boundary will handle it.\n latestSetSnapshot(function () {\n throw error;\n });\n }\n };\n\n var unsubscribe = subscribe(source._source, handleChange);\n\n {\n if (typeof unsubscribe !== 'function') {\n error('Mutable source subscribe function must return an unsubscribe function.');\n }\n }\n\n return unsubscribe;\n }, [source, subscribe]); // If any of the inputs to useMutableSource change, reading is potentially unsafe.\n //\n // If either the source or the subscription have changed we can't can't trust the update queue.\n // Maybe the source changed in a way that the old subscription ignored but the new one depends on.\n //\n // If the getSnapshot function changed, we also shouldn't rely on the update queue.\n // It's possible that the underlying source was mutated between the when the last \"change\" event fired,\n // and when the current render (with the new getSnapshot function) is processed.\n //\n // In both cases, we need to throw away pending updates (since they are no longer relevant)\n // and treat reading from the source as we do in the mount case.\n\n if (!objectIs(prevGetSnapshot, getSnapshot) || !objectIs(prevSource, source) || !objectIs(prevSubscribe, subscribe)) {\n // Create a new queue and setState method,\n // So if there are interleaved updates, they get pushed to the older queue.\n // When this becomes current, the previous queue and dispatch method will be discarded,\n // including any interleaving updates that occur.\n var newQueue = {\n pending: null,\n dispatch: null,\n lastRenderedReducer: basicStateReducer,\n lastRenderedState: snapshot\n };\n newQueue.dispatch = setSnapshot = dispatchAction.bind(null, currentlyRenderingFiber$1, newQueue);\n stateHook.queue = newQueue;\n stateHook.baseQueue = null;\n snapshot = readFromUnsubcribedMutableSource(root, source, getSnapshot);\n stateHook.memoizedState = stateHook.baseState = snapshot;\n }\n\n return snapshot;\n}\n\nfunction mountMutableSource(source, getSnapshot, subscribe) {\n var hook = mountWorkInProgressHook();\n hook.memoizedState = {\n refs: {\n getSnapshot: getSnapshot,\n setSnapshot: null\n },\n source: source,\n subscribe: subscribe\n };\n return useMutableSource(hook, source, getSnapshot, subscribe);\n}\n\nfunction updateMutableSource(source, getSnapshot, subscribe) {\n var hook = updateWorkInProgressHook();\n return useMutableSource(hook, source, getSnapshot, subscribe);\n}\n\nfunction mountState(initialState) {\n var hook = mountWorkInProgressHook();\n\n if (typeof initialState === 'function') {\n // $FlowFixMe: Flow doesn't like mixed types\n initialState = initialState();\n }\n\n hook.memoizedState = hook.baseState = initialState;\n var queue = hook.queue = {\n pending: null,\n dispatch: null,\n lastRenderedReducer: basicStateReducer,\n lastRenderedState: initialState\n };\n var dispatch = queue.dispatch = dispatchAction.bind(null, currentlyRenderingFiber$1, queue);\n return [hook.memoizedState, dispatch];\n}\n\nfunction updateState(initialState) {\n return updateReducer(basicStateReducer);\n}\n\nfunction rerenderState(initialState) {\n return rerenderReducer(basicStateReducer);\n}\n\nfunction pushEffect(tag, create, destroy, deps) {\n var effect = {\n tag: tag,\n create: create,\n destroy: destroy,\n deps: deps,\n // Circular\n next: null\n };\n var componentUpdateQueue = currentlyRenderingFiber$1.updateQueue;\n\n if (componentUpdateQueue === null) {\n componentUpdateQueue = createFunctionComponentUpdateQueue();\n currentlyRenderingFiber$1.updateQueue = componentUpdateQueue;\n componentUpdateQueue.lastEffect = effect.next = effect;\n } else {\n var lastEffect = componentUpdateQueue.lastEffect;\n\n if (lastEffect === null) {\n componentUpdateQueue.lastEffect = effect.next = effect;\n } else {\n var firstEffect = lastEffect.next;\n lastEffect.next = effect;\n effect.next = firstEffect;\n componentUpdateQueue.lastEffect = effect;\n }\n }\n\n return effect;\n}\n\nfunction mountRef(initialValue) {\n var hook = mountWorkInProgressHook();\n var ref = {\n current: initialValue\n };\n\n {\n Object.seal(ref);\n }\n\n hook.memoizedState = ref;\n return ref;\n}\n\nfunction updateRef(initialValue) {\n var hook = updateWorkInProgressHook();\n return hook.memoizedState;\n}\n\nfunction mountEffectImpl(fiberFlags, hookFlags, create, deps) {\n var hook = mountWorkInProgressHook();\n var nextDeps = deps === undefined ? null : deps;\n currentlyRenderingFiber$1.flags |= fiberFlags;\n hook.memoizedState = pushEffect(HasEffect | hookFlags, create, undefined, nextDeps);\n}\n\nfunction updateEffectImpl(fiberFlags, hookFlags, create, deps) {\n var hook = updateWorkInProgressHook();\n var nextDeps = deps === undefined ? null : deps;\n var destroy = undefined;\n\n if (currentHook !== null) {\n var prevEffect = currentHook.memoizedState;\n destroy = prevEffect.destroy;\n\n if (nextDeps !== null) {\n var prevDeps = prevEffect.deps;\n\n if (areHookInputsEqual(nextDeps, prevDeps)) {\n pushEffect(hookFlags, create, destroy, nextDeps);\n return;\n }\n }\n }\n\n currentlyRenderingFiber$1.flags |= fiberFlags;\n hook.memoizedState = pushEffect(HasEffect | hookFlags, create, destroy, nextDeps);\n}\n\nfunction mountEffect(create, deps) {\n {\n // $FlowExpectedError - jest isn't a global, and isn't recognized outside of tests\n if ('undefined' !== typeof jest) {\n warnIfNotCurrentlyActingEffectsInDEV(currentlyRenderingFiber$1);\n }\n }\n\n return mountEffectImpl(Update | Passive, Passive$1, create, deps);\n}\n\nfunction updateEffect(create, deps) {\n {\n // $FlowExpectedError - jest isn't a global, and isn't recognized outside of tests\n if ('undefined' !== typeof jest) {\n warnIfNotCurrentlyActingEffectsInDEV(currentlyRenderingFiber$1);\n }\n }\n\n return updateEffectImpl(Update | Passive, Passive$1, create, deps);\n}\n\nfunction mountLayoutEffect(create, deps) {\n return mountEffectImpl(Update, Layout, create, deps);\n}\n\nfunction updateLayoutEffect(create, deps) {\n return updateEffectImpl(Update, Layout, create, deps);\n}\n\nfunction imperativeHandleEffect(create, ref) {\n if (typeof ref === 'function') {\n var refCallback = ref;\n\n var _inst = create();\n\n refCallback(_inst);\n return function () {\n refCallback(null);\n };\n } else if (ref !== null && ref !== undefined) {\n var refObject = ref;\n\n {\n if (!refObject.hasOwnProperty('current')) {\n error('Expected useImperativeHandle() first argument to either be a ' + 'ref callback or React.createRef() object. Instead received: %s.', 'an object with keys {' + Object.keys(refObject).join(', ') + '}');\n }\n }\n\n var _inst2 = create();\n\n refObject.current = _inst2;\n return function () {\n refObject.current = null;\n };\n }\n}\n\nfunction mountImperativeHandle(ref, create, deps) {\n {\n if (typeof create !== 'function') {\n error('Expected useImperativeHandle() second argument to be a function ' + 'that creates a handle. Instead received: %s.', create !== null ? typeof create : 'null');\n }\n } // TODO: If deps are provided, should we skip comparing the ref itself?\n\n\n var effectDeps = deps !== null && deps !== undefined ? deps.concat([ref]) : null;\n return mountEffectImpl(Update, Layout, imperativeHandleEffect.bind(null, create, ref), effectDeps);\n}\n\nfunction updateImperativeHandle(ref, create, deps) {\n {\n if (typeof create !== 'function') {\n error('Expected useImperativeHandle() second argument to be a function ' + 'that creates a handle. Instead received: %s.', create !== null ? typeof create : 'null');\n }\n } // TODO: If deps are provided, should we skip comparing the ref itself?\n\n\n var effectDeps = deps !== null && deps !== undefined ? deps.concat([ref]) : null;\n return updateEffectImpl(Update, Layout, imperativeHandleEffect.bind(null, create, ref), effectDeps);\n}\n\nfunction mountDebugValue(value, formatterFn) {// This hook is normally a no-op.\n // The react-debug-hooks package injects its own implementation\n // so that e.g. DevTools can display custom hook values.\n}\n\nvar updateDebugValue = mountDebugValue;\n\nfunction mountCallback(callback, deps) {\n var hook = mountWorkInProgressHook();\n var nextDeps = deps === undefined ? null : deps;\n hook.memoizedState = [callback, nextDeps];\n return callback;\n}\n\nfunction updateCallback(callback, deps) {\n var hook = updateWorkInProgressHook();\n var nextDeps = deps === undefined ? null : deps;\n var prevState = hook.memoizedState;\n\n if (prevState !== null) {\n if (nextDeps !== null) {\n var prevDeps = prevState[1];\n\n if (areHookInputsEqual(nextDeps, prevDeps)) {\n return prevState[0];\n }\n }\n }\n\n hook.memoizedState = [callback, nextDeps];\n return callback;\n}\n\nfunction mountMemo(nextCreate, deps) {\n var hook = mountWorkInProgressHook();\n var nextDeps = deps === undefined ? null : deps;\n var nextValue = nextCreate();\n hook.memoizedState = [nextValue, nextDeps];\n return nextValue;\n}\n\nfunction updateMemo(nextCreate, deps) {\n var hook = updateWorkInProgressHook();\n var nextDeps = deps === undefined ? null : deps;\n var prevState = hook.memoizedState;\n\n if (prevState !== null) {\n // Assume these are defined. If they're not, areHookInputsEqual will warn.\n if (nextDeps !== null) {\n var prevDeps = prevState[1];\n\n if (areHookInputsEqual(nextDeps, prevDeps)) {\n return prevState[0];\n }\n }\n }\n\n var nextValue = nextCreate();\n hook.memoizedState = [nextValue, nextDeps];\n return nextValue;\n}\n\nfunction mountDeferredValue(value) {\n var _mountState = mountState(value),\n prevValue = _mountState[0],\n setValue = _mountState[1];\n\n mountEffect(function () {\n var prevTransition = ReactCurrentBatchConfig$1.transition;\n ReactCurrentBatchConfig$1.transition = 1;\n\n try {\n setValue(value);\n } finally {\n ReactCurrentBatchConfig$1.transition = prevTransition;\n }\n }, [value]);\n return prevValue;\n}\n\nfunction updateDeferredValue(value) {\n var _updateState = updateState(),\n prevValue = _updateState[0],\n setValue = _updateState[1];\n\n updateEffect(function () {\n var prevTransition = ReactCurrentBatchConfig$1.transition;\n ReactCurrentBatchConfig$1.transition = 1;\n\n try {\n setValue(value);\n } finally {\n ReactCurrentBatchConfig$1.transition = prevTransition;\n }\n }, [value]);\n return prevValue;\n}\n\nfunction rerenderDeferredValue(value) {\n var _rerenderState = rerenderState(),\n prevValue = _rerenderState[0],\n setValue = _rerenderState[1];\n\n updateEffect(function () {\n var prevTransition = ReactCurrentBatchConfig$1.transition;\n ReactCurrentBatchConfig$1.transition = 1;\n\n try {\n setValue(value);\n } finally {\n ReactCurrentBatchConfig$1.transition = prevTransition;\n }\n }, [value]);\n return prevValue;\n}\n\nfunction startTransition(setPending, callback) {\n var priorityLevel = getCurrentPriorityLevel();\n\n {\n runWithPriority$1(priorityLevel < UserBlockingPriority$2 ? UserBlockingPriority$2 : priorityLevel, function () {\n setPending(true);\n });\n runWithPriority$1(priorityLevel > NormalPriority$1 ? NormalPriority$1 : priorityLevel, function () {\n var prevTransition = ReactCurrentBatchConfig$1.transition;\n ReactCurrentBatchConfig$1.transition = 1;\n\n try {\n setPending(false);\n callback();\n } finally {\n ReactCurrentBatchConfig$1.transition = prevTransition;\n }\n });\n }\n}\n\nfunction mountTransition() {\n var _mountState2 = mountState(false),\n isPending = _mountState2[0],\n setPending = _mountState2[1]; // The `start` method can be stored on a ref, since `setPending`\n // never changes.\n\n\n var start = startTransition.bind(null, setPending);\n mountRef(start);\n return [start, isPending];\n}\n\nfunction updateTransition() {\n var _updateState2 = updateState(),\n isPending = _updateState2[0];\n\n var startRef = updateRef();\n var start = startRef.current;\n return [start, isPending];\n}\n\nfunction rerenderTransition() {\n var _rerenderState2 = rerenderState(),\n isPending = _rerenderState2[0];\n\n var startRef = updateRef();\n var start = startRef.current;\n return [start, isPending];\n}\n\nvar isUpdatingOpaqueValueInRenderPhase = false;\nfunction getIsUpdatingOpaqueValueInRenderPhaseInDEV() {\n {\n return isUpdatingOpaqueValueInRenderPhase;\n }\n}\n\nfunction warnOnOpaqueIdentifierAccessInDEV(fiber) {\n {\n // TODO: Should warn in effects and callbacks, too\n var name = getComponentName(fiber.type) || 'Unknown';\n\n if (getIsRendering() && !didWarnAboutUseOpaqueIdentifier[name]) {\n error('The object passed back from useOpaqueIdentifier is meant to be ' + 'passed through to attributes only. Do not read the ' + 'value directly.');\n\n didWarnAboutUseOpaqueIdentifier[name] = true;\n }\n }\n}\n\nfunction mountOpaqueIdentifier() {\n var makeId = makeClientIdInDEV.bind(null, warnOnOpaqueIdentifierAccessInDEV.bind(null, currentlyRenderingFiber$1)) ;\n\n if (getIsHydrating()) {\n var didUpgrade = false;\n var fiber = currentlyRenderingFiber$1;\n\n var readValue = function () {\n if (!didUpgrade) {\n // Only upgrade once. This works even inside the render phase because\n // the update is added to a shared queue, which outlasts the\n // in-progress render.\n didUpgrade = true;\n\n {\n isUpdatingOpaqueValueInRenderPhase = true;\n setId(makeId());\n isUpdatingOpaqueValueInRenderPhase = false;\n warnOnOpaqueIdentifierAccessInDEV(fiber);\n }\n }\n\n {\n {\n throw Error( \"The object passed back from useOpaqueIdentifier is meant to be passed through to attributes only. Do not read the value directly.\" );\n }\n }\n };\n\n var id = makeOpaqueHydratingObject(readValue);\n var setId = mountState(id)[1];\n\n if ((currentlyRenderingFiber$1.mode & BlockingMode) === NoMode) {\n currentlyRenderingFiber$1.flags |= Update | Passive;\n pushEffect(HasEffect | Passive$1, function () {\n setId(makeId());\n }, undefined, null);\n }\n\n return id;\n } else {\n var _id = makeId();\n\n mountState(_id);\n return _id;\n }\n}\n\nfunction updateOpaqueIdentifier() {\n var id = updateState()[0];\n return id;\n}\n\nfunction rerenderOpaqueIdentifier() {\n var id = rerenderState()[0];\n return id;\n}\n\nfunction dispatchAction(fiber, queue, action) {\n {\n if (typeof arguments[3] === 'function') {\n error(\"State updates from the useState() and useReducer() Hooks don't support the \" + 'second callback argument. To execute a side effect after ' + 'rendering, declare it in the component body with useEffect().');\n }\n }\n\n var eventTime = requestEventTime();\n var lane = requestUpdateLane(fiber);\n var update = {\n lane: lane,\n action: action,\n eagerReducer: null,\n eagerState: null,\n next: null\n }; // Append the update to the end of the list.\n\n var pending = queue.pending;\n\n if (pending === null) {\n // This is the first update. Create a circular list.\n update.next = update;\n } else {\n update.next = pending.next;\n pending.next = update;\n }\n\n queue.pending = update;\n var alternate = fiber.alternate;\n\n if (fiber === currentlyRenderingFiber$1 || alternate !== null && alternate === currentlyRenderingFiber$1) {\n // This is a render phase update. Stash it in a lazily-created map of\n // queue -> linked list of updates. After this render pass, we'll restart\n // and apply the stashed updates on top of the work-in-progress hook.\n didScheduleRenderPhaseUpdateDuringThisPass = didScheduleRenderPhaseUpdate = true;\n } else {\n if (fiber.lanes === NoLanes && (alternate === null || alternate.lanes === NoLanes)) {\n // The queue is currently empty, which means we can eagerly compute the\n // next state before entering the render phase. If the new state is the\n // same as the current state, we may be able to bail out entirely.\n var lastRenderedReducer = queue.lastRenderedReducer;\n\n if (lastRenderedReducer !== null) {\n var prevDispatcher;\n\n {\n prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n }\n\n try {\n var currentState = queue.lastRenderedState;\n var eagerState = lastRenderedReducer(currentState, action); // Stash the eagerly computed state, and the reducer used to compute\n // it, on the update object. If the reducer hasn't changed by the\n // time we enter the render phase, then the eager state can be used\n // without calling the reducer again.\n\n update.eagerReducer = lastRenderedReducer;\n update.eagerState = eagerState;\n\n if (objectIs(eagerState, currentState)) {\n // Fast path. We can bail out without scheduling React to re-render.\n // It's still possible that we'll need to rebase this update later,\n // if the component re-renders for a different reason and by that\n // time the reducer has changed.\n return;\n }\n } catch (error) {// Suppress the error. It will throw again in the render phase.\n } finally {\n {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n }\n }\n }\n\n {\n // $FlowExpectedError - jest isn't a global, and isn't recognized outside of tests\n if ('undefined' !== typeof jest) {\n warnIfNotScopedWithMatchingAct(fiber);\n warnIfNotCurrentlyActingUpdatesInDev(fiber);\n }\n }\n\n scheduleUpdateOnFiber(fiber, lane, eventTime);\n }\n}\n\nvar ContextOnlyDispatcher = {\n readContext: readContext,\n useCallback: throwInvalidHookError,\n useContext: throwInvalidHookError,\n useEffect: throwInvalidHookError,\n useImperativeHandle: throwInvalidHookError,\n useLayoutEffect: throwInvalidHookError,\n useMemo: throwInvalidHookError,\n useReducer: throwInvalidHookError,\n useRef: throwInvalidHookError,\n useState: throwInvalidHookError,\n useDebugValue: throwInvalidHookError,\n useDeferredValue: throwInvalidHookError,\n useTransition: throwInvalidHookError,\n useMutableSource: throwInvalidHookError,\n useOpaqueIdentifier: throwInvalidHookError,\n unstable_isNewReconciler: enableNewReconciler\n};\nvar HooksDispatcherOnMountInDEV = null;\nvar HooksDispatcherOnMountWithHookTypesInDEV = null;\nvar HooksDispatcherOnUpdateInDEV = null;\nvar HooksDispatcherOnRerenderInDEV = null;\nvar InvalidNestedHooksDispatcherOnMountInDEV = null;\nvar InvalidNestedHooksDispatcherOnUpdateInDEV = null;\nvar InvalidNestedHooksDispatcherOnRerenderInDEV = null;\n\n{\n var warnInvalidContextAccess = function () {\n error('Context can only be read while React is rendering. ' + 'In classes, you can read it in the render method or getDerivedStateFromProps. ' + 'In function components, you can read it directly in the function body, but not ' + 'inside Hooks like useReducer() or useMemo().');\n };\n\n var warnInvalidHookAccess = function () {\n error('Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. ' + 'You can only call Hooks at the top level of your React function. ' + 'For more information, see ' + 'https://reactjs.org/link/rules-of-hooks');\n };\n\n HooksDispatcherOnMountInDEV = {\n readContext: function (context, observedBits) {\n return readContext(context, observedBits);\n },\n useCallback: function (callback, deps) {\n currentHookNameInDev = 'useCallback';\n mountHookTypesDev();\n checkDepsAreArrayDev(deps);\n return mountCallback(callback, deps);\n },\n useContext: function (context, observedBits) {\n currentHookNameInDev = 'useContext';\n mountHookTypesDev();\n return readContext(context, observedBits);\n },\n useEffect: function (create, deps) {\n currentHookNameInDev = 'useEffect';\n mountHookTypesDev();\n checkDepsAreArrayDev(deps);\n return mountEffect(create, deps);\n },\n useImperativeHandle: function (ref, create, deps) {\n currentHookNameInDev = 'useImperativeHandle';\n mountHookTypesDev();\n checkDepsAreArrayDev(deps);\n return mountImperativeHandle(ref, create, deps);\n },\n useLayoutEffect: function (create, deps) {\n currentHookNameInDev = 'useLayoutEffect';\n mountHookTypesDev();\n checkDepsAreArrayDev(deps);\n return mountLayoutEffect(create, deps);\n },\n useMemo: function (create, deps) {\n currentHookNameInDev = 'useMemo';\n mountHookTypesDev();\n checkDepsAreArrayDev(deps);\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n try {\n return mountMemo(create, deps);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useReducer: function (reducer, initialArg, init) {\n currentHookNameInDev = 'useReducer';\n mountHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n try {\n return mountReducer(reducer, initialArg, init);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useRef: function (initialValue) {\n currentHookNameInDev = 'useRef';\n mountHookTypesDev();\n return mountRef(initialValue);\n },\n useState: function (initialState) {\n currentHookNameInDev = 'useState';\n mountHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n try {\n return mountState(initialState);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useDebugValue: function (value, formatterFn) {\n currentHookNameInDev = 'useDebugValue';\n mountHookTypesDev();\n return mountDebugValue();\n },\n useDeferredValue: function (value) {\n currentHookNameInDev = 'useDeferredValue';\n mountHookTypesDev();\n return mountDeferredValue(value);\n },\n useTransition: function () {\n currentHookNameInDev = 'useTransition';\n mountHookTypesDev();\n return mountTransition();\n },\n useMutableSource: function (source, getSnapshot, subscribe) {\n currentHookNameInDev = 'useMutableSource';\n mountHookTypesDev();\n return mountMutableSource(source, getSnapshot, subscribe);\n },\n useOpaqueIdentifier: function () {\n currentHookNameInDev = 'useOpaqueIdentifier';\n mountHookTypesDev();\n return mountOpaqueIdentifier();\n },\n unstable_isNewReconciler: enableNewReconciler\n };\n HooksDispatcherOnMountWithHookTypesInDEV = {\n readContext: function (context, observedBits) {\n return readContext(context, observedBits);\n },\n useCallback: function (callback, deps) {\n currentHookNameInDev = 'useCallback';\n updateHookTypesDev();\n return mountCallback(callback, deps);\n },\n useContext: function (context, observedBits) {\n currentHookNameInDev = 'useContext';\n updateHookTypesDev();\n return readContext(context, observedBits);\n },\n useEffect: function (create, deps) {\n currentHookNameInDev = 'useEffect';\n updateHookTypesDev();\n return mountEffect(create, deps);\n },\n useImperativeHandle: function (ref, create, deps) {\n currentHookNameInDev = 'useImperativeHandle';\n updateHookTypesDev();\n return mountImperativeHandle(ref, create, deps);\n },\n useLayoutEffect: function (create, deps) {\n currentHookNameInDev = 'useLayoutEffect';\n updateHookTypesDev();\n return mountLayoutEffect(create, deps);\n },\n useMemo: function (create, deps) {\n currentHookNameInDev = 'useMemo';\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n try {\n return mountMemo(create, deps);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useReducer: function (reducer, initialArg, init) {\n currentHookNameInDev = 'useReducer';\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n try {\n return mountReducer(reducer, initialArg, init);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useRef: function (initialValue) {\n currentHookNameInDev = 'useRef';\n updateHookTypesDev();\n return mountRef(initialValue);\n },\n useState: function (initialState) {\n currentHookNameInDev = 'useState';\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n try {\n return mountState(initialState);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useDebugValue: function (value, formatterFn) {\n currentHookNameInDev = 'useDebugValue';\n updateHookTypesDev();\n return mountDebugValue();\n },\n useDeferredValue: function (value) {\n currentHookNameInDev = 'useDeferredValue';\n updateHookTypesDev();\n return mountDeferredValue(value);\n },\n useTransition: function () {\n currentHookNameInDev = 'useTransition';\n updateHookTypesDev();\n return mountTransition();\n },\n useMutableSource: function (source, getSnapshot, subscribe) {\n currentHookNameInDev = 'useMutableSource';\n updateHookTypesDev();\n return mountMutableSource(source, getSnapshot, subscribe);\n },\n useOpaqueIdentifier: function () {\n currentHookNameInDev = 'useOpaqueIdentifier';\n updateHookTypesDev();\n return mountOpaqueIdentifier();\n },\n unstable_isNewReconciler: enableNewReconciler\n };\n HooksDispatcherOnUpdateInDEV = {\n readContext: function (context, observedBits) {\n return readContext(context, observedBits);\n },\n useCallback: function (callback, deps) {\n currentHookNameInDev = 'useCallback';\n updateHookTypesDev();\n return updateCallback(callback, deps);\n },\n useContext: function (context, observedBits) {\n currentHookNameInDev = 'useContext';\n updateHookTypesDev();\n return readContext(context, observedBits);\n },\n useEffect: function (create, deps) {\n currentHookNameInDev = 'useEffect';\n updateHookTypesDev();\n return updateEffect(create, deps);\n },\n useImperativeHandle: function (ref, create, deps) {\n currentHookNameInDev = 'useImperativeHandle';\n updateHookTypesDev();\n return updateImperativeHandle(ref, create, deps);\n },\n useLayoutEffect: function (create, deps) {\n currentHookNameInDev = 'useLayoutEffect';\n updateHookTypesDev();\n return updateLayoutEffect(create, deps);\n },\n useMemo: function (create, deps) {\n currentHookNameInDev = 'useMemo';\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n try {\n return updateMemo(create, deps);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useReducer: function (reducer, initialArg, init) {\n currentHookNameInDev = 'useReducer';\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n try {\n return updateReducer(reducer, initialArg, init);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useRef: function (initialValue) {\n currentHookNameInDev = 'useRef';\n updateHookTypesDev();\n return updateRef();\n },\n useState: function (initialState) {\n currentHookNameInDev = 'useState';\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n try {\n return updateState(initialState);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useDebugValue: function (value, formatterFn) {\n currentHookNameInDev = 'useDebugValue';\n updateHookTypesDev();\n return updateDebugValue();\n },\n useDeferredValue: function (value) {\n currentHookNameInDev = 'useDeferredValue';\n updateHookTypesDev();\n return updateDeferredValue(value);\n },\n useTransition: function () {\n currentHookNameInDev = 'useTransition';\n updateHookTypesDev();\n return updateTransition();\n },\n useMutableSource: function (source, getSnapshot, subscribe) {\n currentHookNameInDev = 'useMutableSource';\n updateHookTypesDev();\n return updateMutableSource(source, getSnapshot, subscribe);\n },\n useOpaqueIdentifier: function () {\n currentHookNameInDev = 'useOpaqueIdentifier';\n updateHookTypesDev();\n return updateOpaqueIdentifier();\n },\n unstable_isNewReconciler: enableNewReconciler\n };\n HooksDispatcherOnRerenderInDEV = {\n readContext: function (context, observedBits) {\n return readContext(context, observedBits);\n },\n useCallback: function (callback, deps) {\n currentHookNameInDev = 'useCallback';\n updateHookTypesDev();\n return updateCallback(callback, deps);\n },\n useContext: function (context, observedBits) {\n currentHookNameInDev = 'useContext';\n updateHookTypesDev();\n return readContext(context, observedBits);\n },\n useEffect: function (create, deps) {\n currentHookNameInDev = 'useEffect';\n updateHookTypesDev();\n return updateEffect(create, deps);\n },\n useImperativeHandle: function (ref, create, deps) {\n currentHookNameInDev = 'useImperativeHandle';\n updateHookTypesDev();\n return updateImperativeHandle(ref, create, deps);\n },\n useLayoutEffect: function (create, deps) {\n currentHookNameInDev = 'useLayoutEffect';\n updateHookTypesDev();\n return updateLayoutEffect(create, deps);\n },\n useMemo: function (create, deps) {\n currentHookNameInDev = 'useMemo';\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnRerenderInDEV;\n\n try {\n return updateMemo(create, deps);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useReducer: function (reducer, initialArg, init) {\n currentHookNameInDev = 'useReducer';\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnRerenderInDEV;\n\n try {\n return rerenderReducer(reducer, initialArg, init);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useRef: function (initialValue) {\n currentHookNameInDev = 'useRef';\n updateHookTypesDev();\n return updateRef();\n },\n useState: function (initialState) {\n currentHookNameInDev = 'useState';\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnRerenderInDEV;\n\n try {\n return rerenderState(initialState);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useDebugValue: function (value, formatterFn) {\n currentHookNameInDev = 'useDebugValue';\n updateHookTypesDev();\n return updateDebugValue();\n },\n useDeferredValue: function (value) {\n currentHookNameInDev = 'useDeferredValue';\n updateHookTypesDev();\n return rerenderDeferredValue(value);\n },\n useTransition: function () {\n currentHookNameInDev = 'useTransition';\n updateHookTypesDev();\n return rerenderTransition();\n },\n useMutableSource: function (source, getSnapshot, subscribe) {\n currentHookNameInDev = 'useMutableSource';\n updateHookTypesDev();\n return updateMutableSource(source, getSnapshot, subscribe);\n },\n useOpaqueIdentifier: function () {\n currentHookNameInDev = 'useOpaqueIdentifier';\n updateHookTypesDev();\n return rerenderOpaqueIdentifier();\n },\n unstable_isNewReconciler: enableNewReconciler\n };\n InvalidNestedHooksDispatcherOnMountInDEV = {\n readContext: function (context, observedBits) {\n warnInvalidContextAccess();\n return readContext(context, observedBits);\n },\n useCallback: function (callback, deps) {\n currentHookNameInDev = 'useCallback';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountCallback(callback, deps);\n },\n useContext: function (context, observedBits) {\n currentHookNameInDev = 'useContext';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return readContext(context, observedBits);\n },\n useEffect: function (create, deps) {\n currentHookNameInDev = 'useEffect';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountEffect(create, deps);\n },\n useImperativeHandle: function (ref, create, deps) {\n currentHookNameInDev = 'useImperativeHandle';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountImperativeHandle(ref, create, deps);\n },\n useLayoutEffect: function (create, deps) {\n currentHookNameInDev = 'useLayoutEffect';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountLayoutEffect(create, deps);\n },\n useMemo: function (create, deps) {\n currentHookNameInDev = 'useMemo';\n warnInvalidHookAccess();\n mountHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n try {\n return mountMemo(create, deps);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useReducer: function (reducer, initialArg, init) {\n currentHookNameInDev = 'useReducer';\n warnInvalidHookAccess();\n mountHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n try {\n return mountReducer(reducer, initialArg, init);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useRef: function (initialValue) {\n currentHookNameInDev = 'useRef';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountRef(initialValue);\n },\n useState: function (initialState) {\n currentHookNameInDev = 'useState';\n warnInvalidHookAccess();\n mountHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;\n\n try {\n return mountState(initialState);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useDebugValue: function (value, formatterFn) {\n currentHookNameInDev = 'useDebugValue';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountDebugValue();\n },\n useDeferredValue: function (value) {\n currentHookNameInDev = 'useDeferredValue';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountDeferredValue(value);\n },\n useTransition: function () {\n currentHookNameInDev = 'useTransition';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountTransition();\n },\n useMutableSource: function (source, getSnapshot, subscribe) {\n currentHookNameInDev = 'useMutableSource';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountMutableSource(source, getSnapshot, subscribe);\n },\n useOpaqueIdentifier: function () {\n currentHookNameInDev = 'useOpaqueIdentifier';\n warnInvalidHookAccess();\n mountHookTypesDev();\n return mountOpaqueIdentifier();\n },\n unstable_isNewReconciler: enableNewReconciler\n };\n InvalidNestedHooksDispatcherOnUpdateInDEV = {\n readContext: function (context, observedBits) {\n warnInvalidContextAccess();\n return readContext(context, observedBits);\n },\n useCallback: function (callback, deps) {\n currentHookNameInDev = 'useCallback';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateCallback(callback, deps);\n },\n useContext: function (context, observedBits) {\n currentHookNameInDev = 'useContext';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return readContext(context, observedBits);\n },\n useEffect: function (create, deps) {\n currentHookNameInDev = 'useEffect';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateEffect(create, deps);\n },\n useImperativeHandle: function (ref, create, deps) {\n currentHookNameInDev = 'useImperativeHandle';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateImperativeHandle(ref, create, deps);\n },\n useLayoutEffect: function (create, deps) {\n currentHookNameInDev = 'useLayoutEffect';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateLayoutEffect(create, deps);\n },\n useMemo: function (create, deps) {\n currentHookNameInDev = 'useMemo';\n warnInvalidHookAccess();\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n try {\n return updateMemo(create, deps);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useReducer: function (reducer, initialArg, init) {\n currentHookNameInDev = 'useReducer';\n warnInvalidHookAccess();\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n try {\n return updateReducer(reducer, initialArg, init);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useRef: function (initialValue) {\n currentHookNameInDev = 'useRef';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateRef();\n },\n useState: function (initialState) {\n currentHookNameInDev = 'useState';\n warnInvalidHookAccess();\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n try {\n return updateState(initialState);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useDebugValue: function (value, formatterFn) {\n currentHookNameInDev = 'useDebugValue';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateDebugValue();\n },\n useDeferredValue: function (value) {\n currentHookNameInDev = 'useDeferredValue';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateDeferredValue(value);\n },\n useTransition: function () {\n currentHookNameInDev = 'useTransition';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateTransition();\n },\n useMutableSource: function (source, getSnapshot, subscribe) {\n currentHookNameInDev = 'useMutableSource';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateMutableSource(source, getSnapshot, subscribe);\n },\n useOpaqueIdentifier: function () {\n currentHookNameInDev = 'useOpaqueIdentifier';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateOpaqueIdentifier();\n },\n unstable_isNewReconciler: enableNewReconciler\n };\n InvalidNestedHooksDispatcherOnRerenderInDEV = {\n readContext: function (context, observedBits) {\n warnInvalidContextAccess();\n return readContext(context, observedBits);\n },\n useCallback: function (callback, deps) {\n currentHookNameInDev = 'useCallback';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateCallback(callback, deps);\n },\n useContext: function (context, observedBits) {\n currentHookNameInDev = 'useContext';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return readContext(context, observedBits);\n },\n useEffect: function (create, deps) {\n currentHookNameInDev = 'useEffect';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateEffect(create, deps);\n },\n useImperativeHandle: function (ref, create, deps) {\n currentHookNameInDev = 'useImperativeHandle';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateImperativeHandle(ref, create, deps);\n },\n useLayoutEffect: function (create, deps) {\n currentHookNameInDev = 'useLayoutEffect';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateLayoutEffect(create, deps);\n },\n useMemo: function (create, deps) {\n currentHookNameInDev = 'useMemo';\n warnInvalidHookAccess();\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n try {\n return updateMemo(create, deps);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useReducer: function (reducer, initialArg, init) {\n currentHookNameInDev = 'useReducer';\n warnInvalidHookAccess();\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n try {\n return rerenderReducer(reducer, initialArg, init);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useRef: function (initialValue) {\n currentHookNameInDev = 'useRef';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateRef();\n },\n useState: function (initialState) {\n currentHookNameInDev = 'useState';\n warnInvalidHookAccess();\n updateHookTypesDev();\n var prevDispatcher = ReactCurrentDispatcher$1.current;\n ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;\n\n try {\n return rerenderState(initialState);\n } finally {\n ReactCurrentDispatcher$1.current = prevDispatcher;\n }\n },\n useDebugValue: function (value, formatterFn) {\n currentHookNameInDev = 'useDebugValue';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateDebugValue();\n },\n useDeferredValue: function (value) {\n currentHookNameInDev = 'useDeferredValue';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return rerenderDeferredValue(value);\n },\n useTransition: function () {\n currentHookNameInDev = 'useTransition';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return rerenderTransition();\n },\n useMutableSource: function (source, getSnapshot, subscribe) {\n currentHookNameInDev = 'useMutableSource';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return updateMutableSource(source, getSnapshot, subscribe);\n },\n useOpaqueIdentifier: function () {\n currentHookNameInDev = 'useOpaqueIdentifier';\n warnInvalidHookAccess();\n updateHookTypesDev();\n return rerenderOpaqueIdentifier();\n },\n unstable_isNewReconciler: enableNewReconciler\n };\n}\n\nvar now$1 = Scheduler.unstable_now;\nvar commitTime = 0;\nvar profilerStartTime = -1;\n\nfunction getCommitTime() {\n return commitTime;\n}\n\nfunction recordCommitTime() {\n\n commitTime = now$1();\n}\n\nfunction startProfilerTimer(fiber) {\n\n profilerStartTime = now$1();\n\n if (fiber.actualStartTime < 0) {\n fiber.actualStartTime = now$1();\n }\n}\n\nfunction stopProfilerTimerIfRunning(fiber) {\n\n profilerStartTime = -1;\n}\n\nfunction stopProfilerTimerIfRunningAndRecordDelta(fiber, overrideBaseTime) {\n\n if (profilerStartTime >= 0) {\n var elapsedTime = now$1() - profilerStartTime;\n fiber.actualDuration += elapsedTime;\n\n if (overrideBaseTime) {\n fiber.selfBaseDuration = elapsedTime;\n }\n\n profilerStartTime = -1;\n }\n}\n\nfunction transferActualDuration(fiber) {\n // Transfer time spent rendering these children so we don't lose it\n // after we rerender. This is used as a helper in special cases\n // where we should count the work of multiple passes.\n var child = fiber.child;\n\n while (child) {\n fiber.actualDuration += child.actualDuration;\n child = child.sibling;\n }\n}\n\nvar ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;\nvar didReceiveUpdate = false;\nvar didWarnAboutBadClass;\nvar didWarnAboutModulePatternComponent;\nvar didWarnAboutContextTypeOnFunctionComponent;\nvar didWarnAboutGetDerivedStateOnFunctionComponent;\nvar didWarnAboutFunctionRefs;\nvar didWarnAboutReassigningProps;\nvar didWarnAboutRevealOrder;\nvar didWarnAboutTailOptions;\n\n{\n didWarnAboutBadClass = {};\n didWarnAboutModulePatternComponent = {};\n didWarnAboutContextTypeOnFunctionComponent = {};\n didWarnAboutGetDerivedStateOnFunctionComponent = {};\n didWarnAboutFunctionRefs = {};\n didWarnAboutReassigningProps = false;\n didWarnAboutRevealOrder = {};\n didWarnAboutTailOptions = {};\n}\n\nfunction reconcileChildren(current, workInProgress, nextChildren, renderLanes) {\n if (current === null) {\n // If this is a fresh new component that hasn't been rendered yet, we\n // won't update its child set by applying minimal side-effects. Instead,\n // we will add them all to the child before it gets rendered. That means\n // we can optimize this reconciliation pass by not tracking side-effects.\n workInProgress.child = mountChildFibers(workInProgress, null, nextChildren, renderLanes);\n } else {\n // If the current child is the same as the work in progress, it means that\n // we haven't yet started any work on these children. Therefore, we use\n // the clone algorithm to create a copy of all the current children.\n // If we had any progressed work already, that is invalid at this point so\n // let's throw it out.\n workInProgress.child = reconcileChildFibers(workInProgress, current.child, nextChildren, renderLanes);\n }\n}\n\nfunction forceUnmountCurrentAndReconcile(current, workInProgress, nextChildren, renderLanes) {\n // This function is fork of reconcileChildren. It's used in cases where we\n // want to reconcile without matching against the existing set. This has the\n // effect of all current children being unmounted; even if the type and key\n // are the same, the old child is unmounted and a new child is created.\n //\n // To do this, we're going to go through the reconcile algorithm twice. In\n // the first pass, we schedule a deletion for all the current children by\n // passing null.\n workInProgress.child = reconcileChildFibers(workInProgress, current.child, null, renderLanes); // In the second pass, we mount the new children. The trick here is that we\n // pass null in place of where we usually pass the current child set. This has\n // the effect of remounting all children regardless of whether their\n // identities match.\n\n workInProgress.child = reconcileChildFibers(workInProgress, null, nextChildren, renderLanes);\n}\n\nfunction updateForwardRef(current, workInProgress, Component, nextProps, renderLanes) {\n // TODO: current can be non-null here even if the component\n // hasn't yet mounted. This happens after the first render suspends.\n // We'll need to figure out if this is fine or can cause issues.\n {\n if (workInProgress.type !== workInProgress.elementType) {\n // Lazy component props can't be validated in createElement\n // because they're only guaranteed to be resolved here.\n var innerPropTypes = Component.propTypes;\n\n if (innerPropTypes) {\n checkPropTypes(innerPropTypes, nextProps, // Resolved props\n 'prop', getComponentName(Component));\n }\n }\n }\n\n var render = Component.render;\n var ref = workInProgress.ref; // The rest is a fork of updateFunctionComponent\n\n var nextChildren;\n prepareToReadContext(workInProgress, renderLanes);\n\n {\n ReactCurrentOwner$1.current = workInProgress;\n setIsRendering(true);\n nextChildren = renderWithHooks(current, workInProgress, render, nextProps, ref, renderLanes);\n\n if ( workInProgress.mode & StrictMode) {\n disableLogs();\n\n try {\n nextChildren = renderWithHooks(current, workInProgress, render, nextProps, ref, renderLanes);\n } finally {\n reenableLogs();\n }\n }\n\n setIsRendering(false);\n }\n\n if (current !== null && !didReceiveUpdate) {\n bailoutHooks(current, workInProgress, renderLanes);\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n } // React DevTools reads this flag.\n\n\n workInProgress.flags |= PerformedWork;\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n return workInProgress.child;\n}\n\nfunction updateMemoComponent(current, workInProgress, Component, nextProps, updateLanes, renderLanes) {\n if (current === null) {\n var type = Component.type;\n\n if (isSimpleFunctionComponent(type) && Component.compare === null && // SimpleMemoComponent codepath doesn't resolve outer props either.\n Component.defaultProps === undefined) {\n var resolvedType = type;\n\n {\n resolvedType = resolveFunctionForHotReloading(type);\n } // If this is a plain function component without default props,\n // and with only the default shallow comparison, we upgrade it\n // to a SimpleMemoComponent to allow fast path updates.\n\n\n workInProgress.tag = SimpleMemoComponent;\n workInProgress.type = resolvedType;\n\n {\n validateFunctionComponentInDev(workInProgress, type);\n }\n\n return updateSimpleMemoComponent(current, workInProgress, resolvedType, nextProps, updateLanes, renderLanes);\n }\n\n {\n var innerPropTypes = type.propTypes;\n\n if (innerPropTypes) {\n // Inner memo component props aren't currently validated in createElement.\n // We could move it there, but we'd still need this for lazy code path.\n checkPropTypes(innerPropTypes, nextProps, // Resolved props\n 'prop', getComponentName(type));\n }\n }\n\n var child = createFiberFromTypeAndProps(Component.type, null, nextProps, workInProgress, workInProgress.mode, renderLanes);\n child.ref = workInProgress.ref;\n child.return = workInProgress;\n workInProgress.child = child;\n return child;\n }\n\n {\n var _type = Component.type;\n var _innerPropTypes = _type.propTypes;\n\n if (_innerPropTypes) {\n // Inner memo component props aren't currently validated in createElement.\n // We could move it there, but we'd still need this for lazy code path.\n checkPropTypes(_innerPropTypes, nextProps, // Resolved props\n 'prop', getComponentName(_type));\n }\n }\n\n var currentChild = current.child; // This is always exactly one child\n\n if (!includesSomeLane(updateLanes, renderLanes)) {\n // This will be the props with resolved defaultProps,\n // unlike current.memoizedProps which will be the unresolved ones.\n var prevProps = currentChild.memoizedProps; // Default to shallow comparison\n\n var compare = Component.compare;\n compare = compare !== null ? compare : shallowEqual;\n\n if (compare(prevProps, nextProps) && current.ref === workInProgress.ref) {\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n }\n } // React DevTools reads this flag.\n\n\n workInProgress.flags |= PerformedWork;\n var newChild = createWorkInProgress(currentChild, nextProps);\n newChild.ref = workInProgress.ref;\n newChild.return = workInProgress;\n workInProgress.child = newChild;\n return newChild;\n}\n\nfunction updateSimpleMemoComponent(current, workInProgress, Component, nextProps, updateLanes, renderLanes) {\n // TODO: current can be non-null here even if the component\n // hasn't yet mounted. This happens when the inner render suspends.\n // We'll need to figure out if this is fine or can cause issues.\n {\n if (workInProgress.type !== workInProgress.elementType) {\n // Lazy component props can't be validated in createElement\n // because they're only guaranteed to be resolved here.\n var outerMemoType = workInProgress.elementType;\n\n if (outerMemoType.$$typeof === REACT_LAZY_TYPE) {\n // We warn when you define propTypes on lazy()\n // so let's just skip over it to find memo() outer wrapper.\n // Inner props for memo are validated later.\n var lazyComponent = outerMemoType;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n outerMemoType = init(payload);\n } catch (x) {\n outerMemoType = null;\n } // Inner propTypes will be validated in the function component path.\n\n\n var outerPropTypes = outerMemoType && outerMemoType.propTypes;\n\n if (outerPropTypes) {\n checkPropTypes(outerPropTypes, nextProps, // Resolved (SimpleMemoComponent has no defaultProps)\n 'prop', getComponentName(outerMemoType));\n }\n }\n }\n }\n\n if (current !== null) {\n var prevProps = current.memoizedProps;\n\n if (shallowEqual(prevProps, nextProps) && current.ref === workInProgress.ref && ( // Prevent bailout if the implementation changed due to hot reload.\n workInProgress.type === current.type )) {\n didReceiveUpdate = false;\n\n if (!includesSomeLane(renderLanes, updateLanes)) {\n // The pending lanes were cleared at the beginning of beginWork. We're\n // about to bail out, but there might be other lanes that weren't\n // included in the current render. Usually, the priority level of the\n // remaining updates is accumlated during the evaluation of the\n // component (i.e. when processing the update queue). But since since\n // we're bailing out early *without* evaluating the component, we need\n // to account for it here, too. Reset to the value of the current fiber.\n // NOTE: This only applies to SimpleMemoComponent, not MemoComponent,\n // because a MemoComponent fiber does not have hooks or an update queue;\n // rather, it wraps around an inner component, which may or may not\n // contains hooks.\n // TODO: Move the reset at in beginWork out of the common path so that\n // this is no longer necessary.\n workInProgress.lanes = current.lanes;\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n } else if ((current.flags & ForceUpdateForLegacySuspense) !== NoFlags) {\n // This is a special case that only exists for legacy mode.\n // See https://github.com/facebook/react/pull/19216.\n didReceiveUpdate = true;\n }\n }\n }\n\n return updateFunctionComponent(current, workInProgress, Component, nextProps, renderLanes);\n}\n\nfunction updateOffscreenComponent(current, workInProgress, renderLanes) {\n var nextProps = workInProgress.pendingProps;\n var nextChildren = nextProps.children;\n var prevState = current !== null ? current.memoizedState : null;\n\n if (nextProps.mode === 'hidden' || nextProps.mode === 'unstable-defer-without-hiding') {\n if ((workInProgress.mode & ConcurrentMode) === NoMode) {\n // In legacy sync mode, don't defer the subtree. Render it now.\n // TODO: Figure out what we should do in Blocking mode.\n var nextState = {\n baseLanes: NoLanes\n };\n workInProgress.memoizedState = nextState;\n pushRenderLanes(workInProgress, renderLanes);\n } else if (!includesSomeLane(renderLanes, OffscreenLane)) {\n var nextBaseLanes;\n\n if (prevState !== null) {\n var prevBaseLanes = prevState.baseLanes;\n nextBaseLanes = mergeLanes(prevBaseLanes, renderLanes);\n } else {\n nextBaseLanes = renderLanes;\n } // Schedule this fiber to re-render at offscreen priority. Then bailout.\n\n\n {\n markSpawnedWork(OffscreenLane);\n }\n\n workInProgress.lanes = workInProgress.childLanes = laneToLanes(OffscreenLane);\n var _nextState = {\n baseLanes: nextBaseLanes\n };\n workInProgress.memoizedState = _nextState; // We're about to bail out, but we need to push this to the stack anyway\n // to avoid a push/pop misalignment.\n\n pushRenderLanes(workInProgress, nextBaseLanes);\n return null;\n } else {\n // Rendering at offscreen, so we can clear the base lanes.\n var _nextState2 = {\n baseLanes: NoLanes\n };\n workInProgress.memoizedState = _nextState2; // Push the lanes that were skipped when we bailed out.\n\n var subtreeRenderLanes = prevState !== null ? prevState.baseLanes : renderLanes;\n pushRenderLanes(workInProgress, subtreeRenderLanes);\n }\n } else {\n var _subtreeRenderLanes;\n\n if (prevState !== null) {\n _subtreeRenderLanes = mergeLanes(prevState.baseLanes, renderLanes); // Since we're not hidden anymore, reset the state\n\n workInProgress.memoizedState = null;\n } else {\n // We weren't previously hidden, and we still aren't, so there's nothing\n // special to do. Need to push to the stack regardless, though, to avoid\n // a push/pop misalignment.\n _subtreeRenderLanes = renderLanes;\n }\n\n pushRenderLanes(workInProgress, _subtreeRenderLanes);\n }\n\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n return workInProgress.child;\n} // Note: These happen to have identical begin phases, for now. We shouldn't hold\n// ourselves to this constraint, though. If the behavior diverges, we should\n// fork the function.\n\n\nvar updateLegacyHiddenComponent = updateOffscreenComponent;\n\nfunction updateFragment(current, workInProgress, renderLanes) {\n var nextChildren = workInProgress.pendingProps;\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n return workInProgress.child;\n}\n\nfunction updateMode(current, workInProgress, renderLanes) {\n var nextChildren = workInProgress.pendingProps.children;\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n return workInProgress.child;\n}\n\nfunction updateProfiler(current, workInProgress, renderLanes) {\n {\n workInProgress.flags |= Update; // Reset effect durations for the next eventual effect phase.\n // These are reset during render to allow the DevTools commit hook a chance to read them,\n\n var stateNode = workInProgress.stateNode;\n stateNode.effectDuration = 0;\n stateNode.passiveEffectDuration = 0;\n }\n\n var nextProps = workInProgress.pendingProps;\n var nextChildren = nextProps.children;\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n return workInProgress.child;\n}\n\nfunction markRef(current, workInProgress) {\n var ref = workInProgress.ref;\n\n if (current === null && ref !== null || current !== null && current.ref !== ref) {\n // Schedule a Ref effect\n workInProgress.flags |= Ref;\n }\n}\n\nfunction updateFunctionComponent(current, workInProgress, Component, nextProps, renderLanes) {\n {\n if (workInProgress.type !== workInProgress.elementType) {\n // Lazy component props can't be validated in createElement\n // because they're only guaranteed to be resolved here.\n var innerPropTypes = Component.propTypes;\n\n if (innerPropTypes) {\n checkPropTypes(innerPropTypes, nextProps, // Resolved props\n 'prop', getComponentName(Component));\n }\n }\n }\n\n var context;\n\n {\n var unmaskedContext = getUnmaskedContext(workInProgress, Component, true);\n context = getMaskedContext(workInProgress, unmaskedContext);\n }\n\n var nextChildren;\n prepareToReadContext(workInProgress, renderLanes);\n\n {\n ReactCurrentOwner$1.current = workInProgress;\n setIsRendering(true);\n nextChildren = renderWithHooks(current, workInProgress, Component, nextProps, context, renderLanes);\n\n if ( workInProgress.mode & StrictMode) {\n disableLogs();\n\n try {\n nextChildren = renderWithHooks(current, workInProgress, Component, nextProps, context, renderLanes);\n } finally {\n reenableLogs();\n }\n }\n\n setIsRendering(false);\n }\n\n if (current !== null && !didReceiveUpdate) {\n bailoutHooks(current, workInProgress, renderLanes);\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n } // React DevTools reads this flag.\n\n\n workInProgress.flags |= PerformedWork;\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n return workInProgress.child;\n}\n\nfunction updateClassComponent(current, workInProgress, Component, nextProps, renderLanes) {\n {\n if (workInProgress.type !== workInProgress.elementType) {\n // Lazy component props can't be validated in createElement\n // because they're only guaranteed to be resolved here.\n var innerPropTypes = Component.propTypes;\n\n if (innerPropTypes) {\n checkPropTypes(innerPropTypes, nextProps, // Resolved props\n 'prop', getComponentName(Component));\n }\n }\n } // Push context providers early to prevent context stack mismatches.\n // During mounting we don't know the child context yet as the instance doesn't exist.\n // We will invalidate the child context in finishClassComponent() right after rendering.\n\n\n var hasContext;\n\n if (isContextProvider(Component)) {\n hasContext = true;\n pushContextProvider(workInProgress);\n } else {\n hasContext = false;\n }\n\n prepareToReadContext(workInProgress, renderLanes);\n var instance = workInProgress.stateNode;\n var shouldUpdate;\n\n if (instance === null) {\n if (current !== null) {\n // A class component without an instance only mounts if it suspended\n // inside a non-concurrent tree, in an inconsistent state. We want to\n // treat it like a new mount, even though an empty version of it already\n // committed. Disconnect the alternate pointers.\n current.alternate = null;\n workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect\n\n workInProgress.flags |= Placement;\n } // In the initial pass we might need to construct the instance.\n\n\n constructClassInstance(workInProgress, Component, nextProps);\n mountClassInstance(workInProgress, Component, nextProps, renderLanes);\n shouldUpdate = true;\n } else if (current === null) {\n // In a resume, we'll already have an instance we can reuse.\n shouldUpdate = resumeMountClassInstance(workInProgress, Component, nextProps, renderLanes);\n } else {\n shouldUpdate = updateClassInstance(current, workInProgress, Component, nextProps, renderLanes);\n }\n\n var nextUnitOfWork = finishClassComponent(current, workInProgress, Component, shouldUpdate, hasContext, renderLanes);\n\n {\n var inst = workInProgress.stateNode;\n\n if (shouldUpdate && inst.props !== nextProps) {\n if (!didWarnAboutReassigningProps) {\n error('It looks like %s is reassigning its own `this.props` while rendering. ' + 'This is not supported and can lead to confusing bugs.', getComponentName(workInProgress.type) || 'a component');\n }\n\n didWarnAboutReassigningProps = true;\n }\n }\n\n return nextUnitOfWork;\n}\n\nfunction finishClassComponent(current, workInProgress, Component, shouldUpdate, hasContext, renderLanes) {\n // Refs should update even if shouldComponentUpdate returns false\n markRef(current, workInProgress);\n var didCaptureError = (workInProgress.flags & DidCapture) !== NoFlags;\n\n if (!shouldUpdate && !didCaptureError) {\n // Context providers should defer to sCU for rendering\n if (hasContext) {\n invalidateContextProvider(workInProgress, Component, false);\n }\n\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n }\n\n var instance = workInProgress.stateNode; // Rerender\n\n ReactCurrentOwner$1.current = workInProgress;\n var nextChildren;\n\n if (didCaptureError && typeof Component.getDerivedStateFromError !== 'function') {\n // If we captured an error, but getDerivedStateFromError is not defined,\n // unmount all the children. componentDidCatch will schedule an update to\n // re-render a fallback. This is temporary until we migrate everyone to\n // the new API.\n // TODO: Warn in a future release.\n nextChildren = null;\n\n {\n stopProfilerTimerIfRunning();\n }\n } else {\n {\n setIsRendering(true);\n nextChildren = instance.render();\n\n if ( workInProgress.mode & StrictMode) {\n disableLogs();\n\n try {\n instance.render();\n } finally {\n reenableLogs();\n }\n }\n\n setIsRendering(false);\n }\n } // React DevTools reads this flag.\n\n\n workInProgress.flags |= PerformedWork;\n\n if (current !== null && didCaptureError) {\n // If we're recovering from an error, reconcile without reusing any of\n // the existing children. Conceptually, the normal children and the children\n // that are shown on error are two different sets, so we shouldn't reuse\n // normal children even if their identities match.\n forceUnmountCurrentAndReconcile(current, workInProgress, nextChildren, renderLanes);\n } else {\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n } // Memoize state using the values we just used to render.\n // TODO: Restructure so we never read values from the instance.\n\n\n workInProgress.memoizedState = instance.state; // The context might have changed so we need to recalculate it.\n\n if (hasContext) {\n invalidateContextProvider(workInProgress, Component, true);\n }\n\n return workInProgress.child;\n}\n\nfunction pushHostRootContext(workInProgress) {\n var root = workInProgress.stateNode;\n\n if (root.pendingContext) {\n pushTopLevelContextObject(workInProgress, root.pendingContext, root.pendingContext !== root.context);\n } else if (root.context) {\n // Should always be set\n pushTopLevelContextObject(workInProgress, root.context, false);\n }\n\n pushHostContainer(workInProgress, root.containerInfo);\n}\n\nfunction updateHostRoot(current, workInProgress, renderLanes) {\n pushHostRootContext(workInProgress);\n var updateQueue = workInProgress.updateQueue;\n\n if (!(current !== null && updateQueue !== null)) {\n {\n throw Error( \"If the root does not have an updateQueue, we should have already bailed out. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n var nextProps = workInProgress.pendingProps;\n var prevState = workInProgress.memoizedState;\n var prevChildren = prevState !== null ? prevState.element : null;\n cloneUpdateQueue(current, workInProgress);\n processUpdateQueue(workInProgress, nextProps, null, renderLanes);\n var nextState = workInProgress.memoizedState; // Caution: React DevTools currently depends on this property\n // being called \"element\".\n\n var nextChildren = nextState.element;\n\n if (nextChildren === prevChildren) {\n resetHydrationState();\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n }\n\n var root = workInProgress.stateNode;\n\n if (root.hydrate && enterHydrationState(workInProgress)) {\n // If we don't have any current children this might be the first pass.\n // We always try to hydrate. If this isn't a hydration pass there won't\n // be any children to hydrate which is effectively the same thing as\n // not hydrating.\n {\n var mutableSourceEagerHydrationData = root.mutableSourceEagerHydrationData;\n\n if (mutableSourceEagerHydrationData != null) {\n for (var i = 0; i < mutableSourceEagerHydrationData.length; i += 2) {\n var mutableSource = mutableSourceEagerHydrationData[i];\n var version = mutableSourceEagerHydrationData[i + 1];\n setWorkInProgressVersion(mutableSource, version);\n }\n }\n }\n\n var child = mountChildFibers(workInProgress, null, nextChildren, renderLanes);\n workInProgress.child = child;\n var node = child;\n\n while (node) {\n // Mark each child as hydrating. This is a fast path to know whether this\n // tree is part of a hydrating tree. This is used to determine if a child\n // node has fully mounted yet, and for scheduling event replaying.\n // Conceptually this is similar to Placement in that a new subtree is\n // inserted into the React tree here. It just happens to not need DOM\n // mutations because it already exists.\n node.flags = node.flags & ~Placement | Hydrating;\n node = node.sibling;\n }\n } else {\n // Otherwise reset hydration state in case we aborted and resumed another\n // root.\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n resetHydrationState();\n }\n\n return workInProgress.child;\n}\n\nfunction updateHostComponent(current, workInProgress, renderLanes) {\n pushHostContext(workInProgress);\n\n if (current === null) {\n tryToClaimNextHydratableInstance(workInProgress);\n }\n\n var type = workInProgress.type;\n var nextProps = workInProgress.pendingProps;\n var prevProps = current !== null ? current.memoizedProps : null;\n var nextChildren = nextProps.children;\n var isDirectTextChild = shouldSetTextContent(type, nextProps);\n\n if (isDirectTextChild) {\n // We special case a direct text child of a host node. This is a common\n // case. We won't handle it as a reified child. We will instead handle\n // this in the host environment that also has access to this prop. That\n // avoids allocating another HostText fiber and traversing it.\n nextChildren = null;\n } else if (prevProps !== null && shouldSetTextContent(type, prevProps)) {\n // If we're switching from a direct text child to a normal child, or to\n // empty, we need to schedule the text content to be reset.\n workInProgress.flags |= ContentReset;\n }\n\n markRef(current, workInProgress);\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n return workInProgress.child;\n}\n\nfunction updateHostText(current, workInProgress) {\n if (current === null) {\n tryToClaimNextHydratableInstance(workInProgress);\n } // Nothing to do here. This is terminal. We'll do the completion step\n // immediately after.\n\n\n return null;\n}\n\nfunction mountLazyComponent(_current, workInProgress, elementType, updateLanes, renderLanes) {\n if (_current !== null) {\n // A lazy component only mounts if it suspended inside a non-\n // concurrent tree, in an inconsistent state. We want to treat it like\n // a new mount, even though an empty version of it already committed.\n // Disconnect the alternate pointers.\n _current.alternate = null;\n workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect\n\n workInProgress.flags |= Placement;\n }\n\n var props = workInProgress.pendingProps;\n var lazyComponent = elementType;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n var Component = init(payload); // Store the unwrapped component in the type.\n\n workInProgress.type = Component;\n var resolvedTag = workInProgress.tag = resolveLazyComponentTag(Component);\n var resolvedProps = resolveDefaultProps(Component, props);\n var child;\n\n switch (resolvedTag) {\n case FunctionComponent:\n {\n {\n validateFunctionComponentInDev(workInProgress, Component);\n workInProgress.type = Component = resolveFunctionForHotReloading(Component);\n }\n\n child = updateFunctionComponent(null, workInProgress, Component, resolvedProps, renderLanes);\n return child;\n }\n\n case ClassComponent:\n {\n {\n workInProgress.type = Component = resolveClassForHotReloading(Component);\n }\n\n child = updateClassComponent(null, workInProgress, Component, resolvedProps, renderLanes);\n return child;\n }\n\n case ForwardRef:\n {\n {\n workInProgress.type = Component = resolveForwardRefForHotReloading(Component);\n }\n\n child = updateForwardRef(null, workInProgress, Component, resolvedProps, renderLanes);\n return child;\n }\n\n case MemoComponent:\n {\n {\n if (workInProgress.type !== workInProgress.elementType) {\n var outerPropTypes = Component.propTypes;\n\n if (outerPropTypes) {\n checkPropTypes(outerPropTypes, resolvedProps, // Resolved for outer only\n 'prop', getComponentName(Component));\n }\n }\n }\n\n child = updateMemoComponent(null, workInProgress, Component, resolveDefaultProps(Component.type, resolvedProps), // The inner type can have defaults too\n updateLanes, renderLanes);\n return child;\n }\n }\n\n var hint = '';\n\n {\n if (Component !== null && typeof Component === 'object' && Component.$$typeof === REACT_LAZY_TYPE) {\n hint = ' Did you wrap a component in React.lazy() more than once?';\n }\n } // This message intentionally doesn't mention ForwardRef or MemoComponent\n // because the fact that it's a separate type of work is an\n // implementation detail.\n\n\n {\n {\n throw Error( \"Element type is invalid. Received a promise that resolves to: \" + Component + \". Lazy element type must resolve to a class or function.\" + hint );\n }\n }\n}\n\nfunction mountIncompleteClassComponent(_current, workInProgress, Component, nextProps, renderLanes) {\n if (_current !== null) {\n // An incomplete component only mounts if it suspended inside a non-\n // concurrent tree, in an inconsistent state. We want to treat it like\n // a new mount, even though an empty version of it already committed.\n // Disconnect the alternate pointers.\n _current.alternate = null;\n workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect\n\n workInProgress.flags |= Placement;\n } // Promote the fiber to a class and try rendering again.\n\n\n workInProgress.tag = ClassComponent; // The rest of this function is a fork of `updateClassComponent`\n // Push context providers early to prevent context stack mismatches.\n // During mounting we don't know the child context yet as the instance doesn't exist.\n // We will invalidate the child context in finishClassComponent() right after rendering.\n\n var hasContext;\n\n if (isContextProvider(Component)) {\n hasContext = true;\n pushContextProvider(workInProgress);\n } else {\n hasContext = false;\n }\n\n prepareToReadContext(workInProgress, renderLanes);\n constructClassInstance(workInProgress, Component, nextProps);\n mountClassInstance(workInProgress, Component, nextProps, renderLanes);\n return finishClassComponent(null, workInProgress, Component, true, hasContext, renderLanes);\n}\n\nfunction mountIndeterminateComponent(_current, workInProgress, Component, renderLanes) {\n if (_current !== null) {\n // An indeterminate component only mounts if it suspended inside a non-\n // concurrent tree, in an inconsistent state. We want to treat it like\n // a new mount, even though an empty version of it already committed.\n // Disconnect the alternate pointers.\n _current.alternate = null;\n workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect\n\n workInProgress.flags |= Placement;\n }\n\n var props = workInProgress.pendingProps;\n var context;\n\n {\n var unmaskedContext = getUnmaskedContext(workInProgress, Component, false);\n context = getMaskedContext(workInProgress, unmaskedContext);\n }\n\n prepareToReadContext(workInProgress, renderLanes);\n var value;\n\n {\n if (Component.prototype && typeof Component.prototype.render === 'function') {\n var componentName = getComponentName(Component) || 'Unknown';\n\n if (!didWarnAboutBadClass[componentName]) {\n error(\"The <%s /> component appears to have a render method, but doesn't extend React.Component. \" + 'This is likely to cause errors. Change %s to extend React.Component instead.', componentName, componentName);\n\n didWarnAboutBadClass[componentName] = true;\n }\n }\n\n if (workInProgress.mode & StrictMode) {\n ReactStrictModeWarnings.recordLegacyContextWarning(workInProgress, null);\n }\n\n setIsRendering(true);\n ReactCurrentOwner$1.current = workInProgress;\n value = renderWithHooks(null, workInProgress, Component, props, context, renderLanes);\n setIsRendering(false);\n } // React DevTools reads this flag.\n\n\n workInProgress.flags |= PerformedWork;\n\n {\n // Support for module components is deprecated and is removed behind a flag.\n // Whether or not it would crash later, we want to show a good message in DEV first.\n if (typeof value === 'object' && value !== null && typeof value.render === 'function' && value.$$typeof === undefined) {\n var _componentName = getComponentName(Component) || 'Unknown';\n\n if (!didWarnAboutModulePatternComponent[_componentName]) {\n error('The <%s /> component appears to be a function component that returns a class instance. ' + 'Change %s to a class that extends React.Component instead. ' + \"If you can't use a class try assigning the prototype on the function as a workaround. \" + \"`%s.prototype = React.Component.prototype`. Don't use an arrow function since it \" + 'cannot be called with `new` by React.', _componentName, _componentName, _componentName);\n\n didWarnAboutModulePatternComponent[_componentName] = true;\n }\n }\n }\n\n if ( // Run these checks in production only if the flag is off.\n // Eventually we'll delete this branch altogether.\n typeof value === 'object' && value !== null && typeof value.render === 'function' && value.$$typeof === undefined) {\n {\n var _componentName2 = getComponentName(Component) || 'Unknown';\n\n if (!didWarnAboutModulePatternComponent[_componentName2]) {\n error('The <%s /> component appears to be a function component that returns a class instance. ' + 'Change %s to a class that extends React.Component instead. ' + \"If you can't use a class try assigning the prototype on the function as a workaround. \" + \"`%s.prototype = React.Component.prototype`. Don't use an arrow function since it \" + 'cannot be called with `new` by React.', _componentName2, _componentName2, _componentName2);\n\n didWarnAboutModulePatternComponent[_componentName2] = true;\n }\n } // Proceed under the assumption that this is a class instance\n\n\n workInProgress.tag = ClassComponent; // Throw out any hooks that were used.\n\n workInProgress.memoizedState = null;\n workInProgress.updateQueue = null; // Push context providers early to prevent context stack mismatches.\n // During mounting we don't know the child context yet as the instance doesn't exist.\n // We will invalidate the child context in finishClassComponent() right after rendering.\n\n var hasContext = false;\n\n if (isContextProvider(Component)) {\n hasContext = true;\n pushContextProvider(workInProgress);\n } else {\n hasContext = false;\n }\n\n workInProgress.memoizedState = value.state !== null && value.state !== undefined ? value.state : null;\n initializeUpdateQueue(workInProgress);\n var getDerivedStateFromProps = Component.getDerivedStateFromProps;\n\n if (typeof getDerivedStateFromProps === 'function') {\n applyDerivedStateFromProps(workInProgress, Component, getDerivedStateFromProps, props);\n }\n\n adoptClassInstance(workInProgress, value);\n mountClassInstance(workInProgress, Component, props, renderLanes);\n return finishClassComponent(null, workInProgress, Component, true, hasContext, renderLanes);\n } else {\n // Proceed under the assumption that this is a function component\n workInProgress.tag = FunctionComponent;\n\n {\n\n if ( workInProgress.mode & StrictMode) {\n disableLogs();\n\n try {\n value = renderWithHooks(null, workInProgress, Component, props, context, renderLanes);\n } finally {\n reenableLogs();\n }\n }\n }\n\n reconcileChildren(null, workInProgress, value, renderLanes);\n\n {\n validateFunctionComponentInDev(workInProgress, Component);\n }\n\n return workInProgress.child;\n }\n}\n\nfunction validateFunctionComponentInDev(workInProgress, Component) {\n {\n if (Component) {\n if (Component.childContextTypes) {\n error('%s(...): childContextTypes cannot be defined on a function component.', Component.displayName || Component.name || 'Component');\n }\n }\n\n if (workInProgress.ref !== null) {\n var info = '';\n var ownerName = getCurrentFiberOwnerNameInDevOrNull();\n\n if (ownerName) {\n info += '\\n\\nCheck the render method of `' + ownerName + '`.';\n }\n\n var warningKey = ownerName || workInProgress._debugID || '';\n var debugSource = workInProgress._debugSource;\n\n if (debugSource) {\n warningKey = debugSource.fileName + ':' + debugSource.lineNumber;\n }\n\n if (!didWarnAboutFunctionRefs[warningKey]) {\n didWarnAboutFunctionRefs[warningKey] = true;\n\n error('Function components cannot be given refs. ' + 'Attempts to access this ref will fail. ' + 'Did you mean to use React.forwardRef()?%s', info);\n }\n }\n\n if (typeof Component.getDerivedStateFromProps === 'function') {\n var _componentName3 = getComponentName(Component) || 'Unknown';\n\n if (!didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3]) {\n error('%s: Function components do not support getDerivedStateFromProps.', _componentName3);\n\n didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3] = true;\n }\n }\n\n if (typeof Component.contextType === 'object' && Component.contextType !== null) {\n var _componentName4 = getComponentName(Component) || 'Unknown';\n\n if (!didWarnAboutContextTypeOnFunctionComponent[_componentName4]) {\n error('%s: Function components do not support contextType.', _componentName4);\n\n didWarnAboutContextTypeOnFunctionComponent[_componentName4] = true;\n }\n }\n }\n}\n\nvar SUSPENDED_MARKER = {\n dehydrated: null,\n retryLane: NoLane\n};\n\nfunction mountSuspenseOffscreenState(renderLanes) {\n return {\n baseLanes: renderLanes\n };\n}\n\nfunction updateSuspenseOffscreenState(prevOffscreenState, renderLanes) {\n return {\n baseLanes: mergeLanes(prevOffscreenState.baseLanes, renderLanes)\n };\n} // TODO: Probably should inline this back\n\n\nfunction shouldRemainOnFallback(suspenseContext, current, workInProgress, renderLanes) {\n // If we're already showing a fallback, there are cases where we need to\n // remain on that fallback regardless of whether the content has resolved.\n // For example, SuspenseList coordinates when nested content appears.\n if (current !== null) {\n var suspenseState = current.memoizedState;\n\n if (suspenseState === null) {\n // Currently showing content. Don't hide it, even if ForceSuspenseFallack\n // is true. More precise name might be \"ForceRemainSuspenseFallback\".\n // Note: This is a factoring smell. Can't remain on a fallback if there's\n // no fallback to remain on.\n return false;\n }\n } // Not currently showing content. Consult the Suspense context.\n\n\n return hasSuspenseContext(suspenseContext, ForceSuspenseFallback);\n}\n\nfunction getRemainingWorkInPrimaryTree(current, renderLanes) {\n // TODO: Should not remove render lanes that were pinged during this render\n return removeLanes(current.childLanes, renderLanes);\n}\n\nfunction updateSuspenseComponent(current, workInProgress, renderLanes) {\n var nextProps = workInProgress.pendingProps; // This is used by DevTools to force a boundary to suspend.\n\n {\n if (shouldSuspend(workInProgress)) {\n workInProgress.flags |= DidCapture;\n }\n }\n\n var suspenseContext = suspenseStackCursor.current;\n var showFallback = false;\n var didSuspend = (workInProgress.flags & DidCapture) !== NoFlags;\n\n if (didSuspend || shouldRemainOnFallback(suspenseContext, current)) {\n // Something in this boundary's subtree already suspended. Switch to\n // rendering the fallback children.\n showFallback = true;\n workInProgress.flags &= ~DidCapture;\n } else {\n // Attempting the main content\n if (current === null || current.memoizedState !== null) {\n // This is a new mount or this boundary is already showing a fallback state.\n // Mark this subtree context as having at least one invisible parent that could\n // handle the fallback state.\n // Boundaries without fallbacks or should be avoided are not considered since\n // they cannot handle preferred fallback states.\n if (nextProps.fallback !== undefined && nextProps.unstable_avoidThisFallback !== true) {\n suspenseContext = addSubtreeSuspenseContext(suspenseContext, InvisibleParentSuspenseContext);\n }\n }\n }\n\n suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);\n pushSuspenseContext(workInProgress, suspenseContext); // OK, the next part is confusing. We're about to reconcile the Suspense\n // boundary's children. This involves some custom reconcilation logic. Two\n // main reasons this is so complicated.\n //\n // First, Legacy Mode has different semantics for backwards compatibility. The\n // primary tree will commit in an inconsistent state, so when we do the\n // second pass to render the fallback, we do some exceedingly, uh, clever\n // hacks to make that not totally break. Like transferring effects and\n // deletions from hidden tree. In Concurrent Mode, it's much simpler,\n // because we bailout on the primary tree completely and leave it in its old\n // state, no effects. Same as what we do for Offscreen (except that\n // Offscreen doesn't have the first render pass).\n //\n // Second is hydration. During hydration, the Suspense fiber has a slightly\n // different layout, where the child points to a dehydrated fragment, which\n // contains the DOM rendered by the server.\n //\n // Third, even if you set all that aside, Suspense is like error boundaries in\n // that we first we try to render one tree, and if that fails, we render again\n // and switch to a different tree. Like a try/catch block. So we have to track\n // which branch we're currently rendering. Ideally we would model this using\n // a stack.\n\n if (current === null) {\n // Initial mount\n // If we're currently hydrating, try to hydrate this boundary.\n // But only if this has a fallback.\n if (nextProps.fallback !== undefined) {\n tryToClaimNextHydratableInstance(workInProgress); // This could've been a dehydrated suspense component.\n }\n\n var nextPrimaryChildren = nextProps.children;\n var nextFallbackChildren = nextProps.fallback;\n\n if (showFallback) {\n var fallbackFragment = mountSuspenseFallbackChildren(workInProgress, nextPrimaryChildren, nextFallbackChildren, renderLanes);\n var primaryChildFragment = workInProgress.child;\n primaryChildFragment.memoizedState = mountSuspenseOffscreenState(renderLanes);\n workInProgress.memoizedState = SUSPENDED_MARKER;\n return fallbackFragment;\n } else if (typeof nextProps.unstable_expectedLoadTime === 'number') {\n // This is a CPU-bound tree. Skip this tree and show a placeholder to\n // unblock the surrounding content. Then immediately retry after the\n // initial commit.\n var _fallbackFragment = mountSuspenseFallbackChildren(workInProgress, nextPrimaryChildren, nextFallbackChildren, renderLanes);\n\n var _primaryChildFragment = workInProgress.child;\n _primaryChildFragment.memoizedState = mountSuspenseOffscreenState(renderLanes);\n workInProgress.memoizedState = SUSPENDED_MARKER; // Since nothing actually suspended, there will nothing to ping this to\n // get it started back up to attempt the next item. While in terms of\n // priority this work has the same priority as this current render, it's\n // not part of the same transition once the transition has committed. If\n // it's sync, we still want to yield so that it can be painted.\n // Conceptually, this is really the same as pinging. We can use any\n // RetryLane even if it's the one currently rendering since we're leaving\n // it behind on this node.\n\n workInProgress.lanes = SomeRetryLane;\n\n {\n markSpawnedWork(SomeRetryLane);\n }\n\n return _fallbackFragment;\n } else {\n return mountSuspensePrimaryChildren(workInProgress, nextPrimaryChildren, renderLanes);\n }\n } else {\n // This is an update.\n // If the current fiber has a SuspenseState, that means it's already showing\n // a fallback.\n var prevState = current.memoizedState;\n\n if (prevState !== null) {\n\n if (showFallback) {\n var _nextFallbackChildren2 = nextProps.fallback;\n var _nextPrimaryChildren2 = nextProps.children;\n\n var _fallbackChildFragment = updateSuspenseFallbackChildren(current, workInProgress, _nextPrimaryChildren2, _nextFallbackChildren2, renderLanes);\n\n var _primaryChildFragment3 = workInProgress.child;\n var prevOffscreenState = current.child.memoizedState;\n _primaryChildFragment3.memoizedState = prevOffscreenState === null ? mountSuspenseOffscreenState(renderLanes) : updateSuspenseOffscreenState(prevOffscreenState, renderLanes);\n _primaryChildFragment3.childLanes = getRemainingWorkInPrimaryTree(current, renderLanes);\n workInProgress.memoizedState = SUSPENDED_MARKER;\n return _fallbackChildFragment;\n } else {\n var _nextPrimaryChildren3 = nextProps.children;\n\n var _primaryChildFragment4 = updateSuspensePrimaryChildren(current, workInProgress, _nextPrimaryChildren3, renderLanes);\n\n workInProgress.memoizedState = null;\n return _primaryChildFragment4;\n }\n } else {\n // The current tree is not already showing a fallback.\n if (showFallback) {\n // Timed out.\n var _nextFallbackChildren3 = nextProps.fallback;\n var _nextPrimaryChildren4 = nextProps.children;\n\n var _fallbackChildFragment2 = updateSuspenseFallbackChildren(current, workInProgress, _nextPrimaryChildren4, _nextFallbackChildren3, renderLanes);\n\n var _primaryChildFragment5 = workInProgress.child;\n var _prevOffscreenState = current.child.memoizedState;\n _primaryChildFragment5.memoizedState = _prevOffscreenState === null ? mountSuspenseOffscreenState(renderLanes) : updateSuspenseOffscreenState(_prevOffscreenState, renderLanes);\n _primaryChildFragment5.childLanes = getRemainingWorkInPrimaryTree(current, renderLanes); // Skip the primary children, and continue working on the\n // fallback children.\n\n workInProgress.memoizedState = SUSPENDED_MARKER;\n return _fallbackChildFragment2;\n } else {\n // Still haven't timed out. Continue rendering the children, like we\n // normally do.\n var _nextPrimaryChildren5 = nextProps.children;\n\n var _primaryChildFragment6 = updateSuspensePrimaryChildren(current, workInProgress, _nextPrimaryChildren5, renderLanes);\n\n workInProgress.memoizedState = null;\n return _primaryChildFragment6;\n }\n }\n }\n}\n\nfunction mountSuspensePrimaryChildren(workInProgress, primaryChildren, renderLanes) {\n var mode = workInProgress.mode;\n var primaryChildProps = {\n mode: 'visible',\n children: primaryChildren\n };\n var primaryChildFragment = createFiberFromOffscreen(primaryChildProps, mode, renderLanes, null);\n primaryChildFragment.return = workInProgress;\n workInProgress.child = primaryChildFragment;\n return primaryChildFragment;\n}\n\nfunction mountSuspenseFallbackChildren(workInProgress, primaryChildren, fallbackChildren, renderLanes) {\n var mode = workInProgress.mode;\n var progressedPrimaryFragment = workInProgress.child;\n var primaryChildProps = {\n mode: 'hidden',\n children: primaryChildren\n };\n var primaryChildFragment;\n var fallbackChildFragment;\n\n if ((mode & BlockingMode) === NoMode && progressedPrimaryFragment !== null) {\n // In legacy mode, we commit the primary tree as if it successfully\n // completed, even though it's in an inconsistent state.\n primaryChildFragment = progressedPrimaryFragment;\n primaryChildFragment.childLanes = NoLanes;\n primaryChildFragment.pendingProps = primaryChildProps;\n\n if ( workInProgress.mode & ProfileMode) {\n // Reset the durations from the first pass so they aren't included in the\n // final amounts. This seems counterintuitive, since we're intentionally\n // not measuring part of the render phase, but this makes it match what we\n // do in Concurrent Mode.\n primaryChildFragment.actualDuration = 0;\n primaryChildFragment.actualStartTime = -1;\n primaryChildFragment.selfBaseDuration = 0;\n primaryChildFragment.treeBaseDuration = 0;\n }\n\n fallbackChildFragment = createFiberFromFragment(fallbackChildren, mode, renderLanes, null);\n } else {\n primaryChildFragment = createFiberFromOffscreen(primaryChildProps, mode, NoLanes, null);\n fallbackChildFragment = createFiberFromFragment(fallbackChildren, mode, renderLanes, null);\n }\n\n primaryChildFragment.return = workInProgress;\n fallbackChildFragment.return = workInProgress;\n primaryChildFragment.sibling = fallbackChildFragment;\n workInProgress.child = primaryChildFragment;\n return fallbackChildFragment;\n}\n\nfunction createWorkInProgressOffscreenFiber(current, offscreenProps) {\n // The props argument to `createWorkInProgress` is `any` typed, so we use this\n // wrapper function to constrain it.\n return createWorkInProgress(current, offscreenProps);\n}\n\nfunction updateSuspensePrimaryChildren(current, workInProgress, primaryChildren, renderLanes) {\n var currentPrimaryChildFragment = current.child;\n var currentFallbackChildFragment = currentPrimaryChildFragment.sibling;\n var primaryChildFragment = createWorkInProgressOffscreenFiber(currentPrimaryChildFragment, {\n mode: 'visible',\n children: primaryChildren\n });\n\n if ((workInProgress.mode & BlockingMode) === NoMode) {\n primaryChildFragment.lanes = renderLanes;\n }\n\n primaryChildFragment.return = workInProgress;\n primaryChildFragment.sibling = null;\n\n if (currentFallbackChildFragment !== null) {\n // Delete the fallback child fragment\n currentFallbackChildFragment.nextEffect = null;\n currentFallbackChildFragment.flags = Deletion;\n workInProgress.firstEffect = workInProgress.lastEffect = currentFallbackChildFragment;\n }\n\n workInProgress.child = primaryChildFragment;\n return primaryChildFragment;\n}\n\nfunction updateSuspenseFallbackChildren(current, workInProgress, primaryChildren, fallbackChildren, renderLanes) {\n var mode = workInProgress.mode;\n var currentPrimaryChildFragment = current.child;\n var currentFallbackChildFragment = currentPrimaryChildFragment.sibling;\n var primaryChildProps = {\n mode: 'hidden',\n children: primaryChildren\n };\n var primaryChildFragment;\n\n if ( // In legacy mode, we commit the primary tree as if it successfully\n // completed, even though it's in an inconsistent state.\n (mode & BlockingMode) === NoMode && // Make sure we're on the second pass, i.e. the primary child fragment was\n // already cloned. In legacy mode, the only case where this isn't true is\n // when DevTools forces us to display a fallback; we skip the first render\n // pass entirely and go straight to rendering the fallback. (In Concurrent\n // Mode, SuspenseList can also trigger this scenario, but this is a legacy-\n // only codepath.)\n workInProgress.child !== currentPrimaryChildFragment) {\n var progressedPrimaryFragment = workInProgress.child;\n primaryChildFragment = progressedPrimaryFragment;\n primaryChildFragment.childLanes = NoLanes;\n primaryChildFragment.pendingProps = primaryChildProps;\n\n if ( workInProgress.mode & ProfileMode) {\n // Reset the durations from the first pass so they aren't included in the\n // final amounts. This seems counterintuitive, since we're intentionally\n // not measuring part of the render phase, but this makes it match what we\n // do in Concurrent Mode.\n primaryChildFragment.actualDuration = 0;\n primaryChildFragment.actualStartTime = -1;\n primaryChildFragment.selfBaseDuration = currentPrimaryChildFragment.selfBaseDuration;\n primaryChildFragment.treeBaseDuration = currentPrimaryChildFragment.treeBaseDuration;\n } // The fallback fiber was added as a deletion effect during the first pass.\n // However, since we're going to remain on the fallback, we no longer want\n // to delete it. So we need to remove it from the list. Deletions are stored\n // on the same list as effects. We want to keep the effects from the primary\n // tree. So we copy the primary child fragment's effect list, which does not\n // include the fallback deletion effect.\n\n\n var progressedLastEffect = primaryChildFragment.lastEffect;\n\n if (progressedLastEffect !== null) {\n workInProgress.firstEffect = primaryChildFragment.firstEffect;\n workInProgress.lastEffect = progressedLastEffect;\n progressedLastEffect.nextEffect = null;\n } else {\n // TODO: Reset this somewhere else? Lol legacy mode is so weird.\n workInProgress.firstEffect = workInProgress.lastEffect = null;\n }\n } else {\n primaryChildFragment = createWorkInProgressOffscreenFiber(currentPrimaryChildFragment, primaryChildProps);\n }\n\n var fallbackChildFragment;\n\n if (currentFallbackChildFragment !== null) {\n fallbackChildFragment = createWorkInProgress(currentFallbackChildFragment, fallbackChildren);\n } else {\n fallbackChildFragment = createFiberFromFragment(fallbackChildren, mode, renderLanes, null); // Needs a placement effect because the parent (the Suspense boundary) already\n // mounted but this is a new fiber.\n\n fallbackChildFragment.flags |= Placement;\n }\n\n fallbackChildFragment.return = workInProgress;\n primaryChildFragment.return = workInProgress;\n primaryChildFragment.sibling = fallbackChildFragment;\n workInProgress.child = primaryChildFragment;\n return fallbackChildFragment;\n}\n\nfunction scheduleWorkOnFiber(fiber, renderLanes) {\n fiber.lanes = mergeLanes(fiber.lanes, renderLanes);\n var alternate = fiber.alternate;\n\n if (alternate !== null) {\n alternate.lanes = mergeLanes(alternate.lanes, renderLanes);\n }\n\n scheduleWorkOnParentPath(fiber.return, renderLanes);\n}\n\nfunction propagateSuspenseContextChange(workInProgress, firstChild, renderLanes) {\n // Mark any Suspense boundaries with fallbacks as having work to do.\n // If they were previously forced into fallbacks, they may now be able\n // to unblock.\n var node = firstChild;\n\n while (node !== null) {\n if (node.tag === SuspenseComponent) {\n var state = node.memoizedState;\n\n if (state !== null) {\n scheduleWorkOnFiber(node, renderLanes);\n }\n } else if (node.tag === SuspenseListComponent) {\n // If the tail is hidden there might not be an Suspense boundaries\n // to schedule work on. In this case we have to schedule it on the\n // list itself.\n // We don't have to traverse to the children of the list since\n // the list will propagate the change when it rerenders.\n scheduleWorkOnFiber(node, renderLanes);\n } else if (node.child !== null) {\n node.child.return = node;\n node = node.child;\n continue;\n }\n\n if (node === workInProgress) {\n return;\n }\n\n while (node.sibling === null) {\n if (node.return === null || node.return === workInProgress) {\n return;\n }\n\n node = node.return;\n }\n\n node.sibling.return = node.return;\n node = node.sibling;\n }\n}\n\nfunction findLastContentRow(firstChild) {\n // This is going to find the last row among these children that is already\n // showing content on the screen, as opposed to being in fallback state or\n // new. If a row has multiple Suspense boundaries, any of them being in the\n // fallback state, counts as the whole row being in a fallback state.\n // Note that the \"rows\" will be workInProgress, but any nested children\n // will still be current since we haven't rendered them yet. The mounted\n // order may not be the same as the new order. We use the new order.\n var row = firstChild;\n var lastContentRow = null;\n\n while (row !== null) {\n var currentRow = row.alternate; // New rows can't be content rows.\n\n if (currentRow !== null && findFirstSuspended(currentRow) === null) {\n lastContentRow = row;\n }\n\n row = row.sibling;\n }\n\n return lastContentRow;\n}\n\nfunction validateRevealOrder(revealOrder) {\n {\n if (revealOrder !== undefined && revealOrder !== 'forwards' && revealOrder !== 'backwards' && revealOrder !== 'together' && !didWarnAboutRevealOrder[revealOrder]) {\n didWarnAboutRevealOrder[revealOrder] = true;\n\n if (typeof revealOrder === 'string') {\n switch (revealOrder.toLowerCase()) {\n case 'together':\n case 'forwards':\n case 'backwards':\n {\n error('\"%s\" is not a valid value for revealOrder on <SuspenseList />. ' + 'Use lowercase \"%s\" instead.', revealOrder, revealOrder.toLowerCase());\n\n break;\n }\n\n case 'forward':\n case 'backward':\n {\n error('\"%s\" is not a valid value for revealOrder on <SuspenseList />. ' + 'React uses the -s suffix in the spelling. Use \"%ss\" instead.', revealOrder, revealOrder.toLowerCase());\n\n break;\n }\n\n default:\n error('\"%s\" is not a supported revealOrder on <SuspenseList />. ' + 'Did you mean \"together\", \"forwards\" or \"backwards\"?', revealOrder);\n\n break;\n }\n } else {\n error('%s is not a supported value for revealOrder on <SuspenseList />. ' + 'Did you mean \"together\", \"forwards\" or \"backwards\"?', revealOrder);\n }\n }\n }\n}\n\nfunction validateTailOptions(tailMode, revealOrder) {\n {\n if (tailMode !== undefined && !didWarnAboutTailOptions[tailMode]) {\n if (tailMode !== 'collapsed' && tailMode !== 'hidden') {\n didWarnAboutTailOptions[tailMode] = true;\n\n error('\"%s\" is not a supported value for tail on <SuspenseList />. ' + 'Did you mean \"collapsed\" or \"hidden\"?', tailMode);\n } else if (revealOrder !== 'forwards' && revealOrder !== 'backwards') {\n didWarnAboutTailOptions[tailMode] = true;\n\n error('<SuspenseList tail=\"%s\" /> is only valid if revealOrder is ' + '\"forwards\" or \"backwards\". ' + 'Did you mean to specify revealOrder=\"forwards\"?', tailMode);\n }\n }\n }\n}\n\nfunction validateSuspenseListNestedChild(childSlot, index) {\n {\n var isArray = Array.isArray(childSlot);\n var isIterable = !isArray && typeof getIteratorFn(childSlot) === 'function';\n\n if (isArray || isIterable) {\n var type = isArray ? 'array' : 'iterable';\n\n error('A nested %s was passed to row #%s in <SuspenseList />. Wrap it in ' + 'an additional SuspenseList to configure its revealOrder: ' + '<SuspenseList revealOrder=...> ... ' + '<SuspenseList revealOrder=...>{%s}</SuspenseList> ... ' + '</SuspenseList>', type, index, type);\n\n return false;\n }\n }\n\n return true;\n}\n\nfunction validateSuspenseListChildren(children, revealOrder) {\n {\n if ((revealOrder === 'forwards' || revealOrder === 'backwards') && children !== undefined && children !== null && children !== false) {\n if (Array.isArray(children)) {\n for (var i = 0; i < children.length; i++) {\n if (!validateSuspenseListNestedChild(children[i], i)) {\n return;\n }\n }\n } else {\n var iteratorFn = getIteratorFn(children);\n\n if (typeof iteratorFn === 'function') {\n var childrenIterator = iteratorFn.call(children);\n\n if (childrenIterator) {\n var step = childrenIterator.next();\n var _i = 0;\n\n for (; !step.done; step = childrenIterator.next()) {\n if (!validateSuspenseListNestedChild(step.value, _i)) {\n return;\n }\n\n _i++;\n }\n }\n } else {\n error('A single row was passed to a <SuspenseList revealOrder=\"%s\" />. ' + 'This is not useful since it needs multiple rows. ' + 'Did you mean to pass multiple children or an array?', revealOrder);\n }\n }\n }\n }\n}\n\nfunction initSuspenseListRenderState(workInProgress, isBackwards, tail, lastContentRow, tailMode, lastEffectBeforeRendering) {\n var renderState = workInProgress.memoizedState;\n\n if (renderState === null) {\n workInProgress.memoizedState = {\n isBackwards: isBackwards,\n rendering: null,\n renderingStartTime: 0,\n last: lastContentRow,\n tail: tail,\n tailMode: tailMode,\n lastEffect: lastEffectBeforeRendering\n };\n } else {\n // We can reuse the existing object from previous renders.\n renderState.isBackwards = isBackwards;\n renderState.rendering = null;\n renderState.renderingStartTime = 0;\n renderState.last = lastContentRow;\n renderState.tail = tail;\n renderState.tailMode = tailMode;\n renderState.lastEffect = lastEffectBeforeRendering;\n }\n} // This can end up rendering this component multiple passes.\n// The first pass splits the children fibers into two sets. A head and tail.\n// We first render the head. If anything is in fallback state, we do another\n// pass through beginWork to rerender all children (including the tail) with\n// the force suspend context. If the first render didn't have anything in\n// in fallback state. Then we render each row in the tail one-by-one.\n// That happens in the completeWork phase without going back to beginWork.\n\n\nfunction updateSuspenseListComponent(current, workInProgress, renderLanes) {\n var nextProps = workInProgress.pendingProps;\n var revealOrder = nextProps.revealOrder;\n var tailMode = nextProps.tail;\n var newChildren = nextProps.children;\n validateRevealOrder(revealOrder);\n validateTailOptions(tailMode, revealOrder);\n validateSuspenseListChildren(newChildren, revealOrder);\n reconcileChildren(current, workInProgress, newChildren, renderLanes);\n var suspenseContext = suspenseStackCursor.current;\n var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback);\n\n if (shouldForceFallback) {\n suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);\n workInProgress.flags |= DidCapture;\n } else {\n var didSuspendBefore = current !== null && (current.flags & DidCapture) !== NoFlags;\n\n if (didSuspendBefore) {\n // If we previously forced a fallback, we need to schedule work\n // on any nested boundaries to let them know to try to render\n // again. This is the same as context updating.\n propagateSuspenseContextChange(workInProgress, workInProgress.child, renderLanes);\n }\n\n suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);\n }\n\n pushSuspenseContext(workInProgress, suspenseContext);\n\n if ((workInProgress.mode & BlockingMode) === NoMode) {\n // In legacy mode, SuspenseList doesn't work so we just\n // use make it a noop by treating it as the default revealOrder.\n workInProgress.memoizedState = null;\n } else {\n switch (revealOrder) {\n case 'forwards':\n {\n var lastContentRow = findLastContentRow(workInProgress.child);\n var tail;\n\n if (lastContentRow === null) {\n // The whole list is part of the tail.\n // TODO: We could fast path by just rendering the tail now.\n tail = workInProgress.child;\n workInProgress.child = null;\n } else {\n // Disconnect the tail rows after the content row.\n // We're going to render them separately later.\n tail = lastContentRow.sibling;\n lastContentRow.sibling = null;\n }\n\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n tail, lastContentRow, tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'backwards':\n {\n // We're going to find the first row that has existing content.\n // At the same time we're going to reverse the list of everything\n // we pass in the meantime. That's going to be our tail in reverse\n // order.\n var _tail = null;\n var row = workInProgress.child;\n workInProgress.child = null;\n\n while (row !== null) {\n var currentRow = row.alternate; // New rows can't be content rows.\n\n if (currentRow !== null && findFirstSuspended(currentRow) === null) {\n // This is the beginning of the main content.\n workInProgress.child = row;\n break;\n }\n\n var nextRow = row.sibling;\n row.sibling = _tail;\n _tail = row;\n row = nextRow;\n } // TODO: If workInProgress.child is null, we can continue on the tail immediately.\n\n\n initSuspenseListRenderState(workInProgress, true, // isBackwards\n _tail, null, // last\n tailMode, workInProgress.lastEffect);\n break;\n }\n\n case 'together':\n {\n initSuspenseListRenderState(workInProgress, false, // isBackwards\n null, // tail\n null, // last\n undefined, workInProgress.lastEffect);\n break;\n }\n\n default:\n {\n // The default reveal order is the same as not having\n // a boundary.\n workInProgress.memoizedState = null;\n }\n }\n }\n\n return workInProgress.child;\n}\n\nfunction updatePortalComponent(current, workInProgress, renderLanes) {\n pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);\n var nextChildren = workInProgress.pendingProps;\n\n if (current === null) {\n // Portals are special because we don't append the children during mount\n // but at commit. Therefore we need to track insertions which the normal\n // flow doesn't do during mount. This doesn't happen at the root because\n // the root always starts with a \"current\" with a null child.\n // TODO: Consider unifying this with how the root works.\n workInProgress.child = reconcileChildFibers(workInProgress, null, nextChildren, renderLanes);\n } else {\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n }\n\n return workInProgress.child;\n}\n\nvar hasWarnedAboutUsingNoValuePropOnContextProvider = false;\n\nfunction updateContextProvider(current, workInProgress, renderLanes) {\n var providerType = workInProgress.type;\n var context = providerType._context;\n var newProps = workInProgress.pendingProps;\n var oldProps = workInProgress.memoizedProps;\n var newValue = newProps.value;\n\n {\n if (!('value' in newProps)) {\n if (!hasWarnedAboutUsingNoValuePropOnContextProvider) {\n hasWarnedAboutUsingNoValuePropOnContextProvider = true;\n\n error('The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?');\n }\n }\n\n var providerPropTypes = workInProgress.type.propTypes;\n\n if (providerPropTypes) {\n checkPropTypes(providerPropTypes, newProps, 'prop', 'Context.Provider');\n }\n }\n\n pushProvider(workInProgress, newValue);\n\n if (oldProps !== null) {\n var oldValue = oldProps.value;\n var changedBits = calculateChangedBits(context, newValue, oldValue);\n\n if (changedBits === 0) {\n // No change. Bailout early if children are the same.\n if (oldProps.children === newProps.children && !hasContextChanged()) {\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n }\n } else {\n // The context value changed. Search for matching consumers and schedule\n // them to update.\n propagateContextChange(workInProgress, context, changedBits, renderLanes);\n }\n }\n\n var newChildren = newProps.children;\n reconcileChildren(current, workInProgress, newChildren, renderLanes);\n return workInProgress.child;\n}\n\nvar hasWarnedAboutUsingContextAsConsumer = false;\n\nfunction updateContextConsumer(current, workInProgress, renderLanes) {\n var context = workInProgress.type; // The logic below for Context differs depending on PROD or DEV mode. In\n // DEV mode, we create a separate object for Context.Consumer that acts\n // like a proxy to Context. This proxy object adds unnecessary code in PROD\n // so we use the old behaviour (Context.Consumer references Context) to\n // reduce size and overhead. The separate object references context via\n // a property called \"_context\", which also gives us the ability to check\n // in DEV mode if this property exists or not and warn if it does not.\n\n {\n if (context._context === undefined) {\n // This may be because it's a Context (rather than a Consumer).\n // Or it may be because it's older React where they're the same thing.\n // We only want to warn if we're sure it's a new React.\n if (context !== context.Consumer) {\n if (!hasWarnedAboutUsingContextAsConsumer) {\n hasWarnedAboutUsingContextAsConsumer = true;\n\n error('Rendering <Context> directly is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Consumer> instead?');\n }\n }\n } else {\n context = context._context;\n }\n }\n\n var newProps = workInProgress.pendingProps;\n var render = newProps.children;\n\n {\n if (typeof render !== 'function') {\n error('A context consumer was rendered with multiple children, or a child ' + \"that isn't a function. A context consumer expects a single child \" + 'that is a function. If you did pass a function, make sure there ' + 'is no trailing or leading whitespace around it.');\n }\n }\n\n prepareToReadContext(workInProgress, renderLanes);\n var newValue = readContext(context, newProps.unstable_observedBits);\n var newChildren;\n\n {\n ReactCurrentOwner$1.current = workInProgress;\n setIsRendering(true);\n newChildren = render(newValue);\n setIsRendering(false);\n } // React DevTools reads this flag.\n\n\n workInProgress.flags |= PerformedWork;\n reconcileChildren(current, workInProgress, newChildren, renderLanes);\n return workInProgress.child;\n}\n\nfunction markWorkInProgressReceivedUpdate() {\n didReceiveUpdate = true;\n}\n\nfunction bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) {\n if (current !== null) {\n // Reuse previous dependencies\n workInProgress.dependencies = current.dependencies;\n }\n\n {\n // Don't update \"base\" render times for bailouts.\n stopProfilerTimerIfRunning();\n }\n\n markSkippedUpdateLanes(workInProgress.lanes); // Check if the children have any pending work.\n\n if (!includesSomeLane(renderLanes, workInProgress.childLanes)) {\n // The children don't have any work either. We can skip them.\n // TODO: Once we add back resuming, we should check if the children are\n // a work-in-progress set. If so, we need to transfer their effects.\n return null;\n } else {\n // This fiber doesn't have work, but its subtree does. Clone the child\n // fibers and continue.\n cloneChildFibers(current, workInProgress);\n return workInProgress.child;\n }\n}\n\nfunction remountFiber(current, oldWorkInProgress, newWorkInProgress) {\n {\n var returnFiber = oldWorkInProgress.return;\n\n if (returnFiber === null) {\n throw new Error('Cannot swap the root fiber.');\n } // Disconnect from the old current.\n // It will get deleted.\n\n\n current.alternate = null;\n oldWorkInProgress.alternate = null; // Connect to the new tree.\n\n newWorkInProgress.index = oldWorkInProgress.index;\n newWorkInProgress.sibling = oldWorkInProgress.sibling;\n newWorkInProgress.return = oldWorkInProgress.return;\n newWorkInProgress.ref = oldWorkInProgress.ref; // Replace the child/sibling pointers above it.\n\n if (oldWorkInProgress === returnFiber.child) {\n returnFiber.child = newWorkInProgress;\n } else {\n var prevSibling = returnFiber.child;\n\n if (prevSibling === null) {\n throw new Error('Expected parent to have a child.');\n }\n\n while (prevSibling.sibling !== oldWorkInProgress) {\n prevSibling = prevSibling.sibling;\n\n if (prevSibling === null) {\n throw new Error('Expected to find the previous sibling.');\n }\n }\n\n prevSibling.sibling = newWorkInProgress;\n } // Delete the old fiber and place the new one.\n // Since the old fiber is disconnected, we have to schedule it manually.\n\n\n var last = returnFiber.lastEffect;\n\n if (last !== null) {\n last.nextEffect = current;\n returnFiber.lastEffect = current;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = current;\n }\n\n current.nextEffect = null;\n current.flags = Deletion;\n newWorkInProgress.flags |= Placement; // Restart work from the new fiber.\n\n return newWorkInProgress;\n }\n}\n\nfunction beginWork(current, workInProgress, renderLanes) {\n var updateLanes = workInProgress.lanes;\n\n {\n if (workInProgress._debugNeedsRemount && current !== null) {\n // This will restart the begin phase with a new fiber.\n return remountFiber(current, workInProgress, createFiberFromTypeAndProps(workInProgress.type, workInProgress.key, workInProgress.pendingProps, workInProgress._debugOwner || null, workInProgress.mode, workInProgress.lanes));\n }\n }\n\n if (current !== null) {\n var oldProps = current.memoizedProps;\n var newProps = workInProgress.pendingProps;\n\n if (oldProps !== newProps || hasContextChanged() || ( // Force a re-render if the implementation changed due to hot reload:\n workInProgress.type !== current.type )) {\n // If props or context changed, mark the fiber as having performed work.\n // This may be unset if the props are determined to be equal later (memo).\n didReceiveUpdate = true;\n } else if (!includesSomeLane(renderLanes, updateLanes)) {\n didReceiveUpdate = false; // This fiber does not have any pending work. Bailout without entering\n // the begin phase. There's still some bookkeeping we that needs to be done\n // in this optimized path, mostly pushing stuff onto the stack.\n\n switch (workInProgress.tag) {\n case HostRoot:\n pushHostRootContext(workInProgress);\n resetHydrationState();\n break;\n\n case HostComponent:\n pushHostContext(workInProgress);\n break;\n\n case ClassComponent:\n {\n var Component = workInProgress.type;\n\n if (isContextProvider(Component)) {\n pushContextProvider(workInProgress);\n }\n\n break;\n }\n\n case HostPortal:\n pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);\n break;\n\n case ContextProvider:\n {\n var newValue = workInProgress.memoizedProps.value;\n pushProvider(workInProgress, newValue);\n break;\n }\n\n case Profiler:\n {\n // Profiler should only call onRender when one of its descendants actually rendered.\n var hasChildWork = includesSomeLane(renderLanes, workInProgress.childLanes);\n\n if (hasChildWork) {\n workInProgress.flags |= Update;\n } // Reset effect durations for the next eventual effect phase.\n // These are reset during render to allow the DevTools commit hook a chance to read them,\n\n\n var stateNode = workInProgress.stateNode;\n stateNode.effectDuration = 0;\n stateNode.passiveEffectDuration = 0;\n }\n\n break;\n\n case SuspenseComponent:\n {\n var state = workInProgress.memoizedState;\n\n if (state !== null) {\n // whether to retry the primary children, or to skip over it and\n // go straight to the fallback. Check the priority of the primary\n // child fragment.\n\n\n var primaryChildFragment = workInProgress.child;\n var primaryChildLanes = primaryChildFragment.childLanes;\n\n if (includesSomeLane(renderLanes, primaryChildLanes)) {\n // The primary children have pending work. Use the normal path\n // to attempt to render the primary children again.\n return updateSuspenseComponent(current, workInProgress, renderLanes);\n } else {\n // The primary child fragment does not have pending work marked\n // on it\n pushSuspenseContext(workInProgress, setDefaultShallowSuspenseContext(suspenseStackCursor.current)); // The primary children do not have pending work with sufficient\n // priority. Bailout.\n\n var child = bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n\n if (child !== null) {\n // The fallback children have pending work. Skip over the\n // primary children and work on the fallback.\n return child.sibling;\n } else {\n return null;\n }\n }\n } else {\n pushSuspenseContext(workInProgress, setDefaultShallowSuspenseContext(suspenseStackCursor.current));\n }\n\n break;\n }\n\n case SuspenseListComponent:\n {\n var didSuspendBefore = (current.flags & DidCapture) !== NoFlags;\n\n var _hasChildWork = includesSomeLane(renderLanes, workInProgress.childLanes);\n\n if (didSuspendBefore) {\n if (_hasChildWork) {\n // If something was in fallback state last time, and we have all the\n // same children then we're still in progressive loading state.\n // Something might get unblocked by state updates or retries in the\n // tree which will affect the tail. So we need to use the normal\n // path to compute the correct tail.\n return updateSuspenseListComponent(current, workInProgress, renderLanes);\n } // If none of the children had any work, that means that none of\n // them got retried so they'll still be blocked in the same way\n // as before. We can fast bail out.\n\n\n workInProgress.flags |= DidCapture;\n } // If nothing suspended before and we're rendering the same children,\n // then the tail doesn't matter. Anything new that suspends will work\n // in the \"together\" mode, so we can continue from the state we had.\n\n\n var renderState = workInProgress.memoizedState;\n\n if (renderState !== null) {\n // Reset to the \"together\" mode in case we've started a different\n // update in the past but didn't complete it.\n renderState.rendering = null;\n renderState.tail = null;\n renderState.lastEffect = null;\n }\n\n pushSuspenseContext(workInProgress, suspenseStackCursor.current);\n\n if (_hasChildWork) {\n break;\n } else {\n // If none of the children had any work, that means that none of\n // them got retried so they'll still be blocked in the same way\n // as before. We can fast bail out.\n return null;\n }\n }\n\n case OffscreenComponent:\n case LegacyHiddenComponent:\n {\n // Need to check if the tree still needs to be deferred. This is\n // almost identical to the logic used in the normal update path,\n // so we'll just enter that. The only difference is we'll bail out\n // at the next level instead of this one, because the child props\n // have not changed. Which is fine.\n // TODO: Probably should refactor `beginWork` to split the bailout\n // path from the normal path. I'm tempted to do a labeled break here\n // but I won't :)\n workInProgress.lanes = NoLanes;\n return updateOffscreenComponent(current, workInProgress, renderLanes);\n }\n }\n\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n } else {\n if ((current.flags & ForceUpdateForLegacySuspense) !== NoFlags) {\n // This is a special case that only exists for legacy mode.\n // See https://github.com/facebook/react/pull/19216.\n didReceiveUpdate = true;\n } else {\n // An update was scheduled on this fiber, but there are no new props\n // nor legacy context. Set this to false. If an update queue or context\n // consumer produces a changed value, it will set this to true. Otherwise,\n // the component will assume the children have not changed and bail out.\n didReceiveUpdate = false;\n }\n }\n } else {\n didReceiveUpdate = false;\n } // Before entering the begin phase, clear pending update priority.\n // TODO: This assumes that we're about to evaluate the component and process\n // the update queue. However, there's an exception: SimpleMemoComponent\n // sometimes bails out later in the begin phase. This indicates that we should\n // move this assignment out of the common path and into each branch.\n\n\n workInProgress.lanes = NoLanes;\n\n switch (workInProgress.tag) {\n case IndeterminateComponent:\n {\n return mountIndeterminateComponent(current, workInProgress, workInProgress.type, renderLanes);\n }\n\n case LazyComponent:\n {\n var elementType = workInProgress.elementType;\n return mountLazyComponent(current, workInProgress, elementType, updateLanes, renderLanes);\n }\n\n case FunctionComponent:\n {\n var _Component = workInProgress.type;\n var unresolvedProps = workInProgress.pendingProps;\n var resolvedProps = workInProgress.elementType === _Component ? unresolvedProps : resolveDefaultProps(_Component, unresolvedProps);\n return updateFunctionComponent(current, workInProgress, _Component, resolvedProps, renderLanes);\n }\n\n case ClassComponent:\n {\n var _Component2 = workInProgress.type;\n var _unresolvedProps = workInProgress.pendingProps;\n\n var _resolvedProps = workInProgress.elementType === _Component2 ? _unresolvedProps : resolveDefaultProps(_Component2, _unresolvedProps);\n\n return updateClassComponent(current, workInProgress, _Component2, _resolvedProps, renderLanes);\n }\n\n case HostRoot:\n return updateHostRoot(current, workInProgress, renderLanes);\n\n case HostComponent:\n return updateHostComponent(current, workInProgress, renderLanes);\n\n case HostText:\n return updateHostText(current, workInProgress);\n\n case SuspenseComponent:\n return updateSuspenseComponent(current, workInProgress, renderLanes);\n\n case HostPortal:\n return updatePortalComponent(current, workInProgress, renderLanes);\n\n case ForwardRef:\n {\n var type = workInProgress.type;\n var _unresolvedProps2 = workInProgress.pendingProps;\n\n var _resolvedProps2 = workInProgress.elementType === type ? _unresolvedProps2 : resolveDefaultProps(type, _unresolvedProps2);\n\n return updateForwardRef(current, workInProgress, type, _resolvedProps2, renderLanes);\n }\n\n case Fragment:\n return updateFragment(current, workInProgress, renderLanes);\n\n case Mode:\n return updateMode(current, workInProgress, renderLanes);\n\n case Profiler:\n return updateProfiler(current, workInProgress, renderLanes);\n\n case ContextProvider:\n return updateContextProvider(current, workInProgress, renderLanes);\n\n case ContextConsumer:\n return updateContextConsumer(current, workInProgress, renderLanes);\n\n case MemoComponent:\n {\n var _type2 = workInProgress.type;\n var _unresolvedProps3 = workInProgress.pendingProps; // Resolve outer props first, then resolve inner props.\n\n var _resolvedProps3 = resolveDefaultProps(_type2, _unresolvedProps3);\n\n {\n if (workInProgress.type !== workInProgress.elementType) {\n var outerPropTypes = _type2.propTypes;\n\n if (outerPropTypes) {\n checkPropTypes(outerPropTypes, _resolvedProps3, // Resolved for outer only\n 'prop', getComponentName(_type2));\n }\n }\n }\n\n _resolvedProps3 = resolveDefaultProps(_type2.type, _resolvedProps3);\n return updateMemoComponent(current, workInProgress, _type2, _resolvedProps3, updateLanes, renderLanes);\n }\n\n case SimpleMemoComponent:\n {\n return updateSimpleMemoComponent(current, workInProgress, workInProgress.type, workInProgress.pendingProps, updateLanes, renderLanes);\n }\n\n case IncompleteClassComponent:\n {\n var _Component3 = workInProgress.type;\n var _unresolvedProps4 = workInProgress.pendingProps;\n\n var _resolvedProps4 = workInProgress.elementType === _Component3 ? _unresolvedProps4 : resolveDefaultProps(_Component3, _unresolvedProps4);\n\n return mountIncompleteClassComponent(current, workInProgress, _Component3, _resolvedProps4, renderLanes);\n }\n\n case SuspenseListComponent:\n {\n return updateSuspenseListComponent(current, workInProgress, renderLanes);\n }\n\n case FundamentalComponent:\n {\n\n break;\n }\n\n case ScopeComponent:\n {\n\n break;\n }\n\n case Block:\n {\n\n break;\n }\n\n case OffscreenComponent:\n {\n return updateOffscreenComponent(current, workInProgress, renderLanes);\n }\n\n case LegacyHiddenComponent:\n {\n return updateLegacyHiddenComponent(current, workInProgress, renderLanes);\n }\n }\n\n {\n {\n throw Error( \"Unknown unit of work tag (\" + workInProgress.tag + \"). This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n}\n\nfunction markUpdate(workInProgress) {\n // Tag the fiber with an update effect. This turns a Placement into\n // a PlacementAndUpdate.\n workInProgress.flags |= Update;\n}\n\nfunction markRef$1(workInProgress) {\n workInProgress.flags |= Ref;\n}\n\nvar appendAllChildren;\nvar updateHostContainer;\nvar updateHostComponent$1;\nvar updateHostText$1;\n\n{\n // Mutation mode\n appendAllChildren = function (parent, workInProgress, needsVisibilityToggle, isHidden) {\n // We only have the top Fiber that was created but we need recurse down its\n // children to find all the terminal nodes.\n var node = workInProgress.child;\n\n while (node !== null) {\n if (node.tag === HostComponent || node.tag === HostText) {\n appendInitialChild(parent, node.stateNode);\n } else if (node.tag === HostPortal) ; else if (node.child !== null) {\n node.child.return = node;\n node = node.child;\n continue;\n }\n\n if (node === workInProgress) {\n return;\n }\n\n while (node.sibling === null) {\n if (node.return === null || node.return === workInProgress) {\n return;\n }\n\n node = node.return;\n }\n\n node.sibling.return = node.return;\n node = node.sibling;\n }\n };\n\n updateHostContainer = function (workInProgress) {// Noop\n };\n\n updateHostComponent$1 = function (current, workInProgress, type, newProps, rootContainerInstance) {\n // If we have an alternate, that means this is an update and we need to\n // schedule a side-effect to do the updates.\n var oldProps = current.memoizedProps;\n\n if (oldProps === newProps) {\n // In mutation mode, this is sufficient for a bailout because\n // we won't touch this node even if children changed.\n return;\n } // If we get updated because one of our children updated, we don't\n // have newProps so we'll have to reuse them.\n // TODO: Split the update API as separate for the props vs. children.\n // Even better would be if children weren't special cased at all tho.\n\n\n var instance = workInProgress.stateNode;\n var currentHostContext = getHostContext(); // TODO: Experiencing an error where oldProps is null. Suggests a host\n // component is hitting the resume path. Figure out why. Possibly\n // related to `hidden`.\n\n var updatePayload = prepareUpdate(instance, type, oldProps, newProps, rootContainerInstance, currentHostContext); // TODO: Type this specific to this type of component.\n\n workInProgress.updateQueue = updatePayload; // If the update payload indicates that there is a change or if there\n // is a new ref we mark this as an update. All the work is done in commitWork.\n\n if (updatePayload) {\n markUpdate(workInProgress);\n }\n };\n\n updateHostText$1 = function (current, workInProgress, oldText, newText) {\n // If the text differs, mark it as an update. All the work in done in commitWork.\n if (oldText !== newText) {\n markUpdate(workInProgress);\n }\n };\n}\n\nfunction cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {\n if (getIsHydrating()) {\n // If we're hydrating, we should consume as many items as we can\n // so we don't leave any behind.\n return;\n }\n\n switch (renderState.tailMode) {\n case 'hidden':\n {\n // Any insertions at the end of the tail list after this point\n // should be invisible. If there are already mounted boundaries\n // anything before them are not considered for collapsing.\n // Therefore we need to go through the whole tail to find if\n // there are any.\n var tailNode = renderState.tail;\n var lastTailNode = null;\n\n while (tailNode !== null) {\n if (tailNode.alternate !== null) {\n lastTailNode = tailNode;\n }\n\n tailNode = tailNode.sibling;\n } // Next we're simply going to delete all insertions after the\n // last rendered item.\n\n\n if (lastTailNode === null) {\n // All remaining items in the tail are insertions.\n renderState.tail = null;\n } else {\n // Detach the insertion after the last node that was already\n // inserted.\n lastTailNode.sibling = null;\n }\n\n break;\n }\n\n case 'collapsed':\n {\n // Any insertions at the end of the tail list after this point\n // should be invisible. If there are already mounted boundaries\n // anything before them are not considered for collapsing.\n // Therefore we need to go through the whole tail to find if\n // there are any.\n var _tailNode = renderState.tail;\n var _lastTailNode = null;\n\n while (_tailNode !== null) {\n if (_tailNode.alternate !== null) {\n _lastTailNode = _tailNode;\n }\n\n _tailNode = _tailNode.sibling;\n } // Next we're simply going to delete all insertions after the\n // last rendered item.\n\n\n if (_lastTailNode === null) {\n // All remaining items in the tail are insertions.\n if (!hasRenderedATailFallback && renderState.tail !== null) {\n // We suspended during the head. We want to show at least one\n // row at the tail. So we'll keep on and cut off the rest.\n renderState.tail.sibling = null;\n } else {\n renderState.tail = null;\n }\n } else {\n // Detach the insertion after the last node that was already\n // inserted.\n _lastTailNode.sibling = null;\n }\n\n break;\n }\n }\n}\n\nfunction completeWork(current, workInProgress, renderLanes) {\n var newProps = workInProgress.pendingProps;\n\n switch (workInProgress.tag) {\n case IndeterminateComponent:\n case LazyComponent:\n case SimpleMemoComponent:\n case FunctionComponent:\n case ForwardRef:\n case Fragment:\n case Mode:\n case Profiler:\n case ContextConsumer:\n case MemoComponent:\n return null;\n\n case ClassComponent:\n {\n var Component = workInProgress.type;\n\n if (isContextProvider(Component)) {\n popContext(workInProgress);\n }\n\n return null;\n }\n\n case HostRoot:\n {\n popHostContainer(workInProgress);\n popTopLevelContextObject(workInProgress);\n resetWorkInProgressVersions();\n var fiberRoot = workInProgress.stateNode;\n\n if (fiberRoot.pendingContext) {\n fiberRoot.context = fiberRoot.pendingContext;\n fiberRoot.pendingContext = null;\n }\n\n if (current === null || current.child === null) {\n // If we hydrated, pop so that we can delete any remaining children\n // that weren't hydrated.\n var wasHydrated = popHydrationState(workInProgress);\n\n if (wasHydrated) {\n // If we hydrated, then we'll need to schedule an update for\n // the commit side-effects on the root.\n markUpdate(workInProgress);\n } else if (!fiberRoot.hydrate) {\n // Schedule an effect to clear this container at the start of the next commit.\n // This handles the case of React rendering into a container with previous children.\n // It's also safe to do for updates too, because current.child would only be null\n // if the previous render was null (so the the container would already be empty).\n workInProgress.flags |= Snapshot;\n }\n }\n\n updateHostContainer(workInProgress);\n return null;\n }\n\n case HostComponent:\n {\n popHostContext(workInProgress);\n var rootContainerInstance = getRootHostContainer();\n var type = workInProgress.type;\n\n if (current !== null && workInProgress.stateNode != null) {\n updateHostComponent$1(current, workInProgress, type, newProps, rootContainerInstance);\n\n if (current.ref !== workInProgress.ref) {\n markRef$1(workInProgress);\n }\n } else {\n if (!newProps) {\n if (!(workInProgress.stateNode !== null)) {\n {\n throw Error( \"We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n } // This can happen when we abort work.\n\n\n return null;\n }\n\n var currentHostContext = getHostContext(); // TODO: Move createInstance to beginWork and keep it on a context\n // \"stack\" as the parent. Then append children as we go in beginWork\n // or completeWork depending on whether we want to add them top->down or\n // bottom->up. Top->down is faster in IE11.\n\n var _wasHydrated = popHydrationState(workInProgress);\n\n if (_wasHydrated) {\n // TODO: Move this and createInstance step into the beginPhase\n // to consolidate.\n if (prepareToHydrateHostInstance(workInProgress, rootContainerInstance, currentHostContext)) {\n // If changes to the hydrated node need to be applied at the\n // commit-phase we mark this as such.\n markUpdate(workInProgress);\n }\n } else {\n var instance = createInstance(type, newProps, rootContainerInstance, currentHostContext, workInProgress);\n appendAllChildren(instance, workInProgress, false, false);\n workInProgress.stateNode = instance; // Certain renderers require commit-time effects for initial mount.\n // (eg DOM renderer supports auto-focus for certain elements).\n // Make sure such renderers get scheduled for later work.\n\n if (finalizeInitialChildren(instance, type, newProps, rootContainerInstance)) {\n markUpdate(workInProgress);\n }\n }\n\n if (workInProgress.ref !== null) {\n // If there is a ref on a host node we need to schedule a callback\n markRef$1(workInProgress);\n }\n }\n\n return null;\n }\n\n case HostText:\n {\n var newText = newProps;\n\n if (current && workInProgress.stateNode != null) {\n var oldText = current.memoizedProps; // If we have an alternate, that means this is an update and we need\n // to schedule a side-effect to do the updates.\n\n updateHostText$1(current, workInProgress, oldText, newText);\n } else {\n if (typeof newText !== 'string') {\n if (!(workInProgress.stateNode !== null)) {\n {\n throw Error( \"We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n } // This can happen when we abort work.\n\n }\n\n var _rootContainerInstance = getRootHostContainer();\n\n var _currentHostContext = getHostContext();\n\n var _wasHydrated2 = popHydrationState(workInProgress);\n\n if (_wasHydrated2) {\n if (prepareToHydrateHostTextInstance(workInProgress)) {\n markUpdate(workInProgress);\n }\n } else {\n workInProgress.stateNode = createTextInstance(newText, _rootContainerInstance, _currentHostContext, workInProgress);\n }\n }\n\n return null;\n }\n\n case SuspenseComponent:\n {\n popSuspenseContext(workInProgress);\n var nextState = workInProgress.memoizedState;\n\n if ((workInProgress.flags & DidCapture) !== NoFlags) {\n // Something suspended. Re-render with the fallback children.\n workInProgress.lanes = renderLanes; // Do not reset the effect list.\n\n if ( (workInProgress.mode & ProfileMode) !== NoMode) {\n transferActualDuration(workInProgress);\n }\n\n return workInProgress;\n }\n\n var nextDidTimeout = nextState !== null;\n var prevDidTimeout = false;\n\n if (current === null) {\n if (workInProgress.memoizedProps.fallback !== undefined) {\n popHydrationState(workInProgress);\n }\n } else {\n var prevState = current.memoizedState;\n prevDidTimeout = prevState !== null;\n }\n\n if (nextDidTimeout && !prevDidTimeout) {\n // If this subtreee is running in blocking mode we can suspend,\n // otherwise we won't suspend.\n // TODO: This will still suspend a synchronous tree if anything\n // in the concurrent tree already suspended during this render.\n // This is a known bug.\n if ((workInProgress.mode & BlockingMode) !== NoMode) {\n // TODO: Move this back to throwException because this is too late\n // if this is a large tree which is common for initial loads. We\n // don't know if we should restart a render or not until we get\n // this marker, and this is too late.\n // If this render already had a ping or lower pri updates,\n // and this is the first time we know we're going to suspend we\n // should be able to immediately restart from within throwException.\n var hasInvisibleChildContext = current === null && workInProgress.memoizedProps.unstable_avoidThisFallback !== true;\n\n if (hasInvisibleChildContext || hasSuspenseContext(suspenseStackCursor.current, InvisibleParentSuspenseContext)) {\n // If this was in an invisible tree or a new render, then showing\n // this boundary is ok.\n renderDidSuspend();\n } else {\n // Otherwise, we're going to have to hide content so we should\n // suspend for longer if possible.\n renderDidSuspendDelayIfPossible();\n }\n }\n }\n\n {\n // TODO: Only schedule updates if these values are non equal, i.e. it changed.\n if (nextDidTimeout || prevDidTimeout) {\n // If this boundary just timed out, schedule an effect to attach a\n // retry listener to the promise. This flag is also used to hide the\n // primary children. In mutation mode, we also need the flag to\n // *unhide* children that were previously hidden, so check if this\n // is currently timed out, too.\n workInProgress.flags |= Update;\n }\n }\n\n return null;\n }\n\n case HostPortal:\n popHostContainer(workInProgress);\n updateHostContainer(workInProgress);\n\n if (current === null) {\n preparePortalMount(workInProgress.stateNode.containerInfo);\n }\n\n return null;\n\n case ContextProvider:\n // Pop provider fiber\n popProvider(workInProgress);\n return null;\n\n case IncompleteClassComponent:\n {\n // Same as class component case. I put it down here so that the tags are\n // sequential to ensure this switch is compiled to a jump table.\n var _Component = workInProgress.type;\n\n if (isContextProvider(_Component)) {\n popContext(workInProgress);\n }\n\n return null;\n }\n\n case SuspenseListComponent:\n {\n popSuspenseContext(workInProgress);\n var renderState = workInProgress.memoizedState;\n\n if (renderState === null) {\n // We're running in the default, \"independent\" mode.\n // We don't do anything in this mode.\n return null;\n }\n\n var didSuspendAlready = (workInProgress.flags & DidCapture) !== NoFlags;\n var renderedTail = renderState.rendering;\n\n if (renderedTail === null) {\n // We just rendered the head.\n if (!didSuspendAlready) {\n // This is the first pass. We need to figure out if anything is still\n // suspended in the rendered set.\n // If new content unsuspended, but there's still some content that\n // didn't. Then we need to do a second pass that forces everything\n // to keep showing their fallbacks.\n // We might be suspended if something in this render pass suspended, or\n // something in the previous committed pass suspended. Otherwise,\n // there's no chance so we can skip the expensive call to\n // findFirstSuspended.\n var cannotBeSuspended = renderHasNotSuspendedYet() && (current === null || (current.flags & DidCapture) === NoFlags);\n\n if (!cannotBeSuspended) {\n var row = workInProgress.child;\n\n while (row !== null) {\n var suspended = findFirstSuspended(row);\n\n if (suspended !== null) {\n didSuspendAlready = true;\n workInProgress.flags |= DidCapture;\n cutOffTailIfNeeded(renderState, false); // If this is a newly suspended tree, it might not get committed as\n // part of the second pass. In that case nothing will subscribe to\n // its thennables. Instead, we'll transfer its thennables to the\n // SuspenseList so that it can retry if they resolve.\n // There might be multiple of these in the list but since we're\n // going to wait for all of them anyway, it doesn't really matter\n // which ones gets to ping. In theory we could get clever and keep\n // track of how many dependencies remain but it gets tricky because\n // in the meantime, we can add/remove/change items and dependencies.\n // We might bail out of the loop before finding any but that\n // doesn't matter since that means that the other boundaries that\n // we did find already has their listeners attached.\n\n var newThennables = suspended.updateQueue;\n\n if (newThennables !== null) {\n workInProgress.updateQueue = newThennables;\n workInProgress.flags |= Update;\n } // Rerender the whole list, but this time, we'll force fallbacks\n // to stay in place.\n // Reset the effect list before doing the second pass since that's now invalid.\n\n\n if (renderState.lastEffect === null) {\n workInProgress.firstEffect = null;\n }\n\n workInProgress.lastEffect = renderState.lastEffect; // Reset the child fibers to their original state.\n\n resetChildFibers(workInProgress, renderLanes); // Set up the Suspense Context to force suspense and immediately\n // rerender the children.\n\n pushSuspenseContext(workInProgress, setShallowSuspenseContext(suspenseStackCursor.current, ForceSuspenseFallback));\n return workInProgress.child;\n }\n\n row = row.sibling;\n }\n }\n\n if (renderState.tail !== null && now() > getRenderTargetTime()) {\n // We have already passed our CPU deadline but we still have rows\n // left in the tail. We'll just give up further attempts to render\n // the main content and only render fallbacks.\n workInProgress.flags |= DidCapture;\n didSuspendAlready = true;\n cutOffTailIfNeeded(renderState, false); // Since nothing actually suspended, there will nothing to ping this\n // to get it started back up to attempt the next item. While in terms\n // of priority this work has the same priority as this current render,\n // it's not part of the same transition once the transition has\n // committed. If it's sync, we still want to yield so that it can be\n // painted. Conceptually, this is really the same as pinging.\n // We can use any RetryLane even if it's the one currently rendering\n // since we're leaving it behind on this node.\n\n workInProgress.lanes = SomeRetryLane;\n\n {\n markSpawnedWork(SomeRetryLane);\n }\n }\n } else {\n cutOffTailIfNeeded(renderState, false);\n } // Next we're going to render the tail.\n\n } else {\n // Append the rendered row to the child list.\n if (!didSuspendAlready) {\n var _suspended = findFirstSuspended(renderedTail);\n\n if (_suspended !== null) {\n workInProgress.flags |= DidCapture;\n didSuspendAlready = true; // Ensure we transfer the update queue to the parent so that it doesn't\n // get lost if this row ends up dropped during a second pass.\n\n var _newThennables = _suspended.updateQueue;\n\n if (_newThennables !== null) {\n workInProgress.updateQueue = _newThennables;\n workInProgress.flags |= Update;\n }\n\n cutOffTailIfNeeded(renderState, true); // This might have been modified.\n\n if (renderState.tail === null && renderState.tailMode === 'hidden' && !renderedTail.alternate && !getIsHydrating() // We don't cut it if we're hydrating.\n ) {\n // We need to delete the row we just rendered.\n // Reset the effect list to what it was before we rendered this\n // child. The nested children have already appended themselves.\n var lastEffect = workInProgress.lastEffect = renderState.lastEffect; // Remove any effects that were appended after this point.\n\n if (lastEffect !== null) {\n lastEffect.nextEffect = null;\n } // We're done.\n\n\n return null;\n }\n } else if ( // The time it took to render last row is greater than the remaining\n // time we have to render. So rendering one more row would likely\n // exceed it.\n now() * 2 - renderState.renderingStartTime > getRenderTargetTime() && renderLanes !== OffscreenLane) {\n // We have now passed our CPU deadline and we'll just give up further\n // attempts to render the main content and only render fallbacks.\n // The assumption is that this is usually faster.\n workInProgress.flags |= DidCapture;\n didSuspendAlready = true;\n cutOffTailIfNeeded(renderState, false); // Since nothing actually suspended, there will nothing to ping this\n // to get it started back up to attempt the next item. While in terms\n // of priority this work has the same priority as this current render,\n // it's not part of the same transition once the transition has\n // committed. If it's sync, we still want to yield so that it can be\n // painted. Conceptually, this is really the same as pinging.\n // We can use any RetryLane even if it's the one currently rendering\n // since we're leaving it behind on this node.\n\n workInProgress.lanes = SomeRetryLane;\n\n {\n markSpawnedWork(SomeRetryLane);\n }\n }\n }\n\n if (renderState.isBackwards) {\n // The effect list of the backwards tail will have been added\n // to the end. This breaks the guarantee that life-cycles fire in\n // sibling order but that isn't a strong guarantee promised by React.\n // Especially since these might also just pop in during future commits.\n // Append to the beginning of the list.\n renderedTail.sibling = workInProgress.child;\n workInProgress.child = renderedTail;\n } else {\n var previousSibling = renderState.last;\n\n if (previousSibling !== null) {\n previousSibling.sibling = renderedTail;\n } else {\n workInProgress.child = renderedTail;\n }\n\n renderState.last = renderedTail;\n }\n }\n\n if (renderState.tail !== null) {\n // We still have tail rows to render.\n // Pop a row.\n var next = renderState.tail;\n renderState.rendering = next;\n renderState.tail = next.sibling;\n renderState.lastEffect = workInProgress.lastEffect;\n renderState.renderingStartTime = now();\n next.sibling = null; // Restore the context.\n // TODO: We can probably just avoid popping it instead and only\n // setting it the first time we go from not suspended to suspended.\n\n var suspenseContext = suspenseStackCursor.current;\n\n if (didSuspendAlready) {\n suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);\n } else {\n suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);\n }\n\n pushSuspenseContext(workInProgress, suspenseContext); // Do a pass over the next row.\n\n return next;\n }\n\n return null;\n }\n\n case FundamentalComponent:\n {\n\n break;\n }\n\n case ScopeComponent:\n {\n\n break;\n }\n\n case Block:\n\n break;\n\n case OffscreenComponent:\n case LegacyHiddenComponent:\n {\n popRenderLanes(workInProgress);\n\n if (current !== null) {\n var _nextState = workInProgress.memoizedState;\n var _prevState = current.memoizedState;\n var prevIsHidden = _prevState !== null;\n var nextIsHidden = _nextState !== null;\n\n if (prevIsHidden !== nextIsHidden && newProps.mode !== 'unstable-defer-without-hiding') {\n workInProgress.flags |= Update;\n }\n }\n\n return null;\n }\n }\n\n {\n {\n throw Error( \"Unknown unit of work tag (\" + workInProgress.tag + \"). This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n}\n\nfunction unwindWork(workInProgress, renderLanes) {\n switch (workInProgress.tag) {\n case ClassComponent:\n {\n var Component = workInProgress.type;\n\n if (isContextProvider(Component)) {\n popContext(workInProgress);\n }\n\n var flags = workInProgress.flags;\n\n if (flags & ShouldCapture) {\n workInProgress.flags = flags & ~ShouldCapture | DidCapture;\n\n if ( (workInProgress.mode & ProfileMode) !== NoMode) {\n transferActualDuration(workInProgress);\n }\n\n return workInProgress;\n }\n\n return null;\n }\n\n case HostRoot:\n {\n popHostContainer(workInProgress);\n popTopLevelContextObject(workInProgress);\n resetWorkInProgressVersions();\n var _flags = workInProgress.flags;\n\n if (!((_flags & DidCapture) === NoFlags)) {\n {\n throw Error( \"The root failed to unmount after an error. This is likely a bug in React. Please file an issue.\" );\n }\n }\n\n workInProgress.flags = _flags & ~ShouldCapture | DidCapture;\n return workInProgress;\n }\n\n case HostComponent:\n {\n // TODO: popHydrationState\n popHostContext(workInProgress);\n return null;\n }\n\n case SuspenseComponent:\n {\n popSuspenseContext(workInProgress);\n\n var _flags2 = workInProgress.flags;\n\n if (_flags2 & ShouldCapture) {\n workInProgress.flags = _flags2 & ~ShouldCapture | DidCapture; // Captured a suspense effect. Re-render the boundary.\n\n if ( (workInProgress.mode & ProfileMode) !== NoMode) {\n transferActualDuration(workInProgress);\n }\n\n return workInProgress;\n }\n\n return null;\n }\n\n case SuspenseListComponent:\n {\n popSuspenseContext(workInProgress); // SuspenseList doesn't actually catch anything. It should've been\n // caught by a nested boundary. If not, it should bubble through.\n\n return null;\n }\n\n case HostPortal:\n popHostContainer(workInProgress);\n return null;\n\n case ContextProvider:\n popProvider(workInProgress);\n return null;\n\n case OffscreenComponent:\n case LegacyHiddenComponent:\n popRenderLanes(workInProgress);\n return null;\n\n default:\n return null;\n }\n}\n\nfunction unwindInterruptedWork(interruptedWork) {\n switch (interruptedWork.tag) {\n case ClassComponent:\n {\n var childContextTypes = interruptedWork.type.childContextTypes;\n\n if (childContextTypes !== null && childContextTypes !== undefined) {\n popContext(interruptedWork);\n }\n\n break;\n }\n\n case HostRoot:\n {\n popHostContainer(interruptedWork);\n popTopLevelContextObject(interruptedWork);\n resetWorkInProgressVersions();\n break;\n }\n\n case HostComponent:\n {\n popHostContext(interruptedWork);\n break;\n }\n\n case HostPortal:\n popHostContainer(interruptedWork);\n break;\n\n case SuspenseComponent:\n popSuspenseContext(interruptedWork);\n break;\n\n case SuspenseListComponent:\n popSuspenseContext(interruptedWork);\n break;\n\n case ContextProvider:\n popProvider(interruptedWork);\n break;\n\n case OffscreenComponent:\n case LegacyHiddenComponent:\n popRenderLanes(interruptedWork);\n break;\n }\n}\n\nfunction createCapturedValue(value, source) {\n // If the value is an error, call this function immediately after it is thrown\n // so the stack is accurate.\n return {\n value: value,\n source: source,\n stack: getStackByFiberInDevAndProd(source)\n };\n}\n\n// This module is forked in different environments.\n// By default, return `true` to log errors to the console.\n// Forks can return `false` if this isn't desirable.\nfunction showErrorDialog(boundary, errorInfo) {\n return true;\n}\n\nfunction logCapturedError(boundary, errorInfo) {\n try {\n var logError = showErrorDialog(boundary, errorInfo); // Allow injected showErrorDialog() to prevent default console.error logging.\n // This enables renderers like ReactNative to better manage redbox behavior.\n\n if (logError === false) {\n return;\n }\n\n var error = errorInfo.value;\n\n if (true) {\n var source = errorInfo.source;\n var stack = errorInfo.stack;\n var componentStack = stack !== null ? stack : ''; // Browsers support silencing uncaught errors by calling\n // `preventDefault()` in window `error` handler.\n // We record this information as an expando on the error.\n\n if (error != null && error._suppressLogging) {\n if (boundary.tag === ClassComponent) {\n // The error is recoverable and was silenced.\n // Ignore it and don't print the stack addendum.\n // This is handy for testing error boundaries without noise.\n return;\n } // The error is fatal. Since the silencing might have\n // been accidental, we'll surface it anyway.\n // However, the browser would have silenced the original error\n // so we'll print it first, and then print the stack addendum.\n\n\n console['error'](error); // Don't transform to our wrapper\n // For a more detailed description of this block, see:\n // https://github.com/facebook/react/pull/13384\n }\n\n var componentName = source ? getComponentName(source.type) : null;\n var componentNameMessage = componentName ? \"The above error occurred in the <\" + componentName + \"> component:\" : 'The above error occurred in one of your React components:';\n var errorBoundaryMessage;\n var errorBoundaryName = getComponentName(boundary.type);\n\n if (errorBoundaryName) {\n errorBoundaryMessage = \"React will try to recreate this component tree from scratch \" + (\"using the error boundary you provided, \" + errorBoundaryName + \".\");\n } else {\n errorBoundaryMessage = 'Consider adding an error boundary to your tree to customize error handling behavior.\\n' + 'Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.';\n }\n\n var combinedMessage = componentNameMessage + \"\\n\" + componentStack + \"\\n\\n\" + (\"\" + errorBoundaryMessage); // In development, we provide our own message with just the component stack.\n // We don't include the original error message and JS stack because the browser\n // has already printed it. Even if the application swallows the error, it is still\n // displayed by the browser thanks to the DEV-only fake event trick in ReactErrorUtils.\n\n console['error'](combinedMessage); // Don't transform to our wrapper\n } else {}\n } catch (e) {\n // This method must not throw, or React internal state will get messed up.\n // If console.error is overridden, or logCapturedError() shows a dialog that throws,\n // we want to report this error outside of the normal stack as a last resort.\n // https://github.com/facebook/react/issues/13188\n setTimeout(function () {\n throw e;\n });\n }\n}\n\nvar PossiblyWeakMap$1 = typeof WeakMap === 'function' ? WeakMap : Map;\n\nfunction createRootErrorUpdate(fiber, errorInfo, lane) {\n var update = createUpdate(NoTimestamp, lane); // Unmount the root by rendering null.\n\n update.tag = CaptureUpdate; // Caution: React DevTools currently depends on this property\n // being called \"element\".\n\n update.payload = {\n element: null\n };\n var error = errorInfo.value;\n\n update.callback = function () {\n onUncaughtError(error);\n logCapturedError(fiber, errorInfo);\n };\n\n return update;\n}\n\nfunction createClassErrorUpdate(fiber, errorInfo, lane) {\n var update = createUpdate(NoTimestamp, lane);\n update.tag = CaptureUpdate;\n var getDerivedStateFromError = fiber.type.getDerivedStateFromError;\n\n if (typeof getDerivedStateFromError === 'function') {\n var error$1 = errorInfo.value;\n\n update.payload = function () {\n logCapturedError(fiber, errorInfo);\n return getDerivedStateFromError(error$1);\n };\n }\n\n var inst = fiber.stateNode;\n\n if (inst !== null && typeof inst.componentDidCatch === 'function') {\n update.callback = function callback() {\n {\n markFailedErrorBoundaryForHotReloading(fiber);\n }\n\n if (typeof getDerivedStateFromError !== 'function') {\n // To preserve the preexisting retry behavior of error boundaries,\n // we keep track of which ones already failed during this batch.\n // This gets reset before we yield back to the browser.\n // TODO: Warn in strict mode if getDerivedStateFromError is\n // not defined.\n markLegacyErrorBoundaryAsFailed(this); // Only log here if componentDidCatch is the only error boundary method defined\n\n logCapturedError(fiber, errorInfo);\n }\n\n var error$1 = errorInfo.value;\n var stack = errorInfo.stack;\n this.componentDidCatch(error$1, {\n componentStack: stack !== null ? stack : ''\n });\n\n {\n if (typeof getDerivedStateFromError !== 'function') {\n // If componentDidCatch is the only error boundary method defined,\n // then it needs to call setState to recover from errors.\n // If no state update is scheduled then the boundary will swallow the error.\n if (!includesSomeLane(fiber.lanes, SyncLane)) {\n error('%s: Error boundaries should implement getDerivedStateFromError(). ' + 'In that method, return a state update to display an error message or fallback UI.', getComponentName(fiber.type) || 'Unknown');\n }\n }\n }\n };\n } else {\n update.callback = function () {\n markFailedErrorBoundaryForHotReloading(fiber);\n };\n }\n\n return update;\n}\n\nfunction attachPingListener(root, wakeable, lanes) {\n // Attach a listener to the promise to \"ping\" the root and retry. But only if\n // one does not already exist for the lanes we're currently rendering (which\n // acts like a \"thread ID\" here).\n var pingCache = root.pingCache;\n var threadIDs;\n\n if (pingCache === null) {\n pingCache = root.pingCache = new PossiblyWeakMap$1();\n threadIDs = new Set();\n pingCache.set(wakeable, threadIDs);\n } else {\n threadIDs = pingCache.get(wakeable);\n\n if (threadIDs === undefined) {\n threadIDs = new Set();\n pingCache.set(wakeable, threadIDs);\n }\n }\n\n if (!threadIDs.has(lanes)) {\n // Memoize using the thread ID to prevent redundant listeners.\n threadIDs.add(lanes);\n var ping = pingSuspendedRoot.bind(null, root, wakeable, lanes);\n wakeable.then(ping, ping);\n }\n}\n\nfunction throwException(root, returnFiber, sourceFiber, value, rootRenderLanes) {\n // The source fiber did not complete.\n sourceFiber.flags |= Incomplete; // Its effect list is no longer valid.\n\n sourceFiber.firstEffect = sourceFiber.lastEffect = null;\n\n if (value !== null && typeof value === 'object' && typeof value.then === 'function') {\n // This is a wakeable.\n var wakeable = value;\n\n if ((sourceFiber.mode & BlockingMode) === NoMode) {\n // Reset the memoizedState to what it was before we attempted\n // to render it.\n var currentSource = sourceFiber.alternate;\n\n if (currentSource) {\n sourceFiber.updateQueue = currentSource.updateQueue;\n sourceFiber.memoizedState = currentSource.memoizedState;\n sourceFiber.lanes = currentSource.lanes;\n } else {\n sourceFiber.updateQueue = null;\n sourceFiber.memoizedState = null;\n }\n }\n\n var hasInvisibleParentBoundary = hasSuspenseContext(suspenseStackCursor.current, InvisibleParentSuspenseContext); // Schedule the nearest Suspense to re-render the timed out view.\n\n var _workInProgress = returnFiber;\n\n do {\n if (_workInProgress.tag === SuspenseComponent && shouldCaptureSuspense(_workInProgress, hasInvisibleParentBoundary)) {\n // Found the nearest boundary.\n // Stash the promise on the boundary fiber. If the boundary times out, we'll\n // attach another listener to flip the boundary back to its normal state.\n var wakeables = _workInProgress.updateQueue;\n\n if (wakeables === null) {\n var updateQueue = new Set();\n updateQueue.add(wakeable);\n _workInProgress.updateQueue = updateQueue;\n } else {\n wakeables.add(wakeable);\n } // If the boundary is outside of blocking mode, we should *not*\n // suspend the commit. Pretend as if the suspended component rendered\n // null and keep rendering. In the commit phase, we'll schedule a\n // subsequent synchronous update to re-render the Suspense.\n //\n // Note: It doesn't matter whether the component that suspended was\n // inside a blocking mode tree. If the Suspense is outside of it, we\n // should *not* suspend the commit.\n\n\n if ((_workInProgress.mode & BlockingMode) === NoMode) {\n _workInProgress.flags |= DidCapture;\n sourceFiber.flags |= ForceUpdateForLegacySuspense; // We're going to commit this fiber even though it didn't complete.\n // But we shouldn't call any lifecycle methods or callbacks. Remove\n // all lifecycle effect tags.\n\n sourceFiber.flags &= ~(LifecycleEffectMask | Incomplete);\n\n if (sourceFiber.tag === ClassComponent) {\n var currentSourceFiber = sourceFiber.alternate;\n\n if (currentSourceFiber === null) {\n // This is a new mount. Change the tag so it's not mistaken for a\n // completed class component. For example, we should not call\n // componentWillUnmount if it is deleted.\n sourceFiber.tag = IncompleteClassComponent;\n } else {\n // When we try rendering again, we should not reuse the current fiber,\n // since it's known to be in an inconsistent state. Use a force update to\n // prevent a bail out.\n var update = createUpdate(NoTimestamp, SyncLane);\n update.tag = ForceUpdate;\n enqueueUpdate(sourceFiber, update);\n }\n } // The source fiber did not complete. Mark it with Sync priority to\n // indicate that it still has pending work.\n\n\n sourceFiber.lanes = mergeLanes(sourceFiber.lanes, SyncLane); // Exit without suspending.\n\n return;\n } // Confirmed that the boundary is in a concurrent mode tree. Continue\n // with the normal suspend path.\n //\n // After this we'll use a set of heuristics to determine whether this\n // render pass will run to completion or restart or \"suspend\" the commit.\n // The actual logic for this is spread out in different places.\n //\n // This first principle is that if we're going to suspend when we complete\n // a root, then we should also restart if we get an update or ping that\n // might unsuspend it, and vice versa. The only reason to suspend is\n // because you think you might want to restart before committing. However,\n // it doesn't make sense to restart only while in the period we're suspended.\n //\n // Restarting too aggressively is also not good because it starves out any\n // intermediate loading state. So we use heuristics to determine when.\n // Suspense Heuristics\n //\n // If nothing threw a Promise or all the same fallbacks are already showing,\n // then don't suspend/restart.\n //\n // If this is an initial render of a new tree of Suspense boundaries and\n // those trigger a fallback, then don't suspend/restart. We want to ensure\n // that we can show the initial loading state as quickly as possible.\n //\n // If we hit a \"Delayed\" case, such as when we'd switch from content back into\n // a fallback, then we should always suspend/restart. Transitions apply\n // to this case. If none is defined, JND is used instead.\n //\n // If we're already showing a fallback and it gets \"retried\", allowing us to show\n // another level, but there's still an inner boundary that would show a fallback,\n // then we suspend/restart for 500ms since the last time we showed a fallback\n // anywhere in the tree. This effectively throttles progressive loading into a\n // consistent train of commits. This also gives us an opportunity to restart to\n // get to the completed state slightly earlier.\n //\n // If there's ambiguity due to batching it's resolved in preference of:\n // 1) \"delayed\", 2) \"initial render\", 3) \"retry\".\n //\n // We want to ensure that a \"busy\" state doesn't get force committed. We want to\n // ensure that new initial loading states can commit as soon as possible.\n\n\n attachPingListener(root, wakeable, rootRenderLanes);\n _workInProgress.flags |= ShouldCapture;\n _workInProgress.lanes = rootRenderLanes;\n return;\n } // This boundary already captured during this render. Continue to the next\n // boundary.\n\n\n _workInProgress = _workInProgress.return;\n } while (_workInProgress !== null); // No boundary was found. Fallthrough to error mode.\n // TODO: Use invariant so the message is stripped in prod?\n\n\n value = new Error((getComponentName(sourceFiber.type) || 'A React component') + ' suspended while rendering, but no fallback UI was specified.\\n' + '\\n' + 'Add a <Suspense fallback=...> component higher in the tree to ' + 'provide a loading indicator or placeholder to display.');\n } // We didn't find a boundary that could handle this type of exception. Start\n // over and traverse parent path again, this time treating the exception\n // as an error.\n\n\n renderDidError();\n value = createCapturedValue(value, sourceFiber);\n var workInProgress = returnFiber;\n\n do {\n switch (workInProgress.tag) {\n case HostRoot:\n {\n var _errorInfo = value;\n workInProgress.flags |= ShouldCapture;\n var lane = pickArbitraryLane(rootRenderLanes);\n workInProgress.lanes = mergeLanes(workInProgress.lanes, lane);\n\n var _update = createRootErrorUpdate(workInProgress, _errorInfo, lane);\n\n enqueueCapturedUpdate(workInProgress, _update);\n return;\n }\n\n case ClassComponent:\n // Capture and retry\n var errorInfo = value;\n var ctor = workInProgress.type;\n var instance = workInProgress.stateNode;\n\n if ((workInProgress.flags & DidCapture) === NoFlags && (typeof ctor.getDerivedStateFromError === 'function' || instance !== null && typeof instance.componentDidCatch === 'function' && !isAlreadyFailedLegacyErrorBoundary(instance))) {\n workInProgress.flags |= ShouldCapture;\n\n var _lane = pickArbitraryLane(rootRenderLanes);\n\n workInProgress.lanes = mergeLanes(workInProgress.lanes, _lane); // Schedule the error boundary to re-render using updated state\n\n var _update2 = createClassErrorUpdate(workInProgress, errorInfo, _lane);\n\n enqueueCapturedUpdate(workInProgress, _update2);\n return;\n }\n\n break;\n }\n\n workInProgress = workInProgress.return;\n } while (workInProgress !== null);\n}\n\nvar didWarnAboutUndefinedSnapshotBeforeUpdate = null;\n\n{\n didWarnAboutUndefinedSnapshotBeforeUpdate = new Set();\n}\n\nvar PossiblyWeakSet = typeof WeakSet === 'function' ? WeakSet : Set;\n\nvar callComponentWillUnmountWithTimer = function (current, instance) {\n instance.props = current.memoizedProps;\n instance.state = current.memoizedState;\n\n {\n instance.componentWillUnmount();\n }\n}; // Capture errors so they don't interrupt unmounting.\n\n\nfunction safelyCallComponentWillUnmount(current, instance) {\n {\n invokeGuardedCallback(null, callComponentWillUnmountWithTimer, null, current, instance);\n\n if (hasCaughtError()) {\n var unmountError = clearCaughtError();\n captureCommitPhaseError(current, unmountError);\n }\n }\n}\n\nfunction safelyDetachRef(current) {\n var ref = current.ref;\n\n if (ref !== null) {\n if (typeof ref === 'function') {\n {\n invokeGuardedCallback(null, ref, null, null);\n\n if (hasCaughtError()) {\n var refError = clearCaughtError();\n captureCommitPhaseError(current, refError);\n }\n }\n } else {\n ref.current = null;\n }\n }\n}\n\nfunction safelyCallDestroy(current, destroy) {\n {\n invokeGuardedCallback(null, destroy, null);\n\n if (hasCaughtError()) {\n var error = clearCaughtError();\n captureCommitPhaseError(current, error);\n }\n }\n}\n\nfunction commitBeforeMutationLifeCycles(current, finishedWork) {\n switch (finishedWork.tag) {\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n case Block:\n {\n return;\n }\n\n case ClassComponent:\n {\n if (finishedWork.flags & Snapshot) {\n if (current !== null) {\n var prevProps = current.memoizedProps;\n var prevState = current.memoizedState;\n var instance = finishedWork.stateNode; // We could update instance props and state here,\n // but instead we rely on them being set during last render.\n // TODO: revisit this when we implement resuming.\n\n {\n if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {\n if (instance.props !== finishedWork.memoizedProps) {\n error('Expected %s props to match memoized props before ' + 'getSnapshotBeforeUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');\n }\n\n if (instance.state !== finishedWork.memoizedState) {\n error('Expected %s state to match memoized state before ' + 'getSnapshotBeforeUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.state`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');\n }\n }\n }\n\n var snapshot = instance.getSnapshotBeforeUpdate(finishedWork.elementType === finishedWork.type ? prevProps : resolveDefaultProps(finishedWork.type, prevProps), prevState);\n\n {\n var didWarnSet = didWarnAboutUndefinedSnapshotBeforeUpdate;\n\n if (snapshot === undefined && !didWarnSet.has(finishedWork.type)) {\n didWarnSet.add(finishedWork.type);\n\n error('%s.getSnapshotBeforeUpdate(): A snapshot value (or null) ' + 'must be returned. You have returned undefined.', getComponentName(finishedWork.type));\n }\n }\n\n instance.__reactInternalSnapshotBeforeUpdate = snapshot;\n }\n }\n\n return;\n }\n\n case HostRoot:\n {\n {\n if (finishedWork.flags & Snapshot) {\n var root = finishedWork.stateNode;\n clearContainer(root.containerInfo);\n }\n }\n\n return;\n }\n\n case HostComponent:\n case HostText:\n case HostPortal:\n case IncompleteClassComponent:\n // Nothing to do for these component types\n return;\n }\n\n {\n {\n throw Error( \"This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n}\n\nfunction commitHookEffectListUnmount(tag, finishedWork) {\n var updateQueue = finishedWork.updateQueue;\n var lastEffect = updateQueue !== null ? updateQueue.lastEffect : null;\n\n if (lastEffect !== null) {\n var firstEffect = lastEffect.next;\n var effect = firstEffect;\n\n do {\n if ((effect.tag & tag) === tag) {\n // Unmount\n var destroy = effect.destroy;\n effect.destroy = undefined;\n\n if (destroy !== undefined) {\n destroy();\n }\n }\n\n effect = effect.next;\n } while (effect !== firstEffect);\n }\n}\n\nfunction commitHookEffectListMount(tag, finishedWork) {\n var updateQueue = finishedWork.updateQueue;\n var lastEffect = updateQueue !== null ? updateQueue.lastEffect : null;\n\n if (lastEffect !== null) {\n var firstEffect = lastEffect.next;\n var effect = firstEffect;\n\n do {\n if ((effect.tag & tag) === tag) {\n // Mount\n var create = effect.create;\n effect.destroy = create();\n\n {\n var destroy = effect.destroy;\n\n if (destroy !== undefined && typeof destroy !== 'function') {\n var addendum = void 0;\n\n if (destroy === null) {\n addendum = ' You returned null. If your effect does not require clean ' + 'up, return undefined (or nothing).';\n } else if (typeof destroy.then === 'function') {\n addendum = '\\n\\nIt looks like you wrote useEffect(async () => ...) or returned a Promise. ' + 'Instead, write the async function inside your effect ' + 'and call it immediately:\\n\\n' + 'useEffect(() => {\\n' + ' async function fetchData() {\\n' + ' // You can await here\\n' + ' const response = await MyAPI.getData(someId);\\n' + ' // ...\\n' + ' }\\n' + ' fetchData();\\n' + \"}, [someId]); // Or [] if effect doesn't need props or state\\n\\n\" + 'Learn more about data fetching with Hooks: https://reactjs.org/link/hooks-data-fetching';\n } else {\n addendum = ' You returned: ' + destroy;\n }\n\n error('An effect function must not return anything besides a function, ' + 'which is used for clean-up.%s', addendum);\n }\n }\n }\n\n effect = effect.next;\n } while (effect !== firstEffect);\n }\n}\n\nfunction schedulePassiveEffects(finishedWork) {\n var updateQueue = finishedWork.updateQueue;\n var lastEffect = updateQueue !== null ? updateQueue.lastEffect : null;\n\n if (lastEffect !== null) {\n var firstEffect = lastEffect.next;\n var effect = firstEffect;\n\n do {\n var _effect = effect,\n next = _effect.next,\n tag = _effect.tag;\n\n if ((tag & Passive$1) !== NoFlags$1 && (tag & HasEffect) !== NoFlags$1) {\n enqueuePendingPassiveHookEffectUnmount(finishedWork, effect);\n enqueuePendingPassiveHookEffectMount(finishedWork, effect);\n }\n\n effect = next;\n } while (effect !== firstEffect);\n }\n}\n\nfunction commitLifeCycles(finishedRoot, current, finishedWork, committedLanes) {\n switch (finishedWork.tag) {\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n case Block:\n {\n // At this point layout effects have already been destroyed (during mutation phase).\n // This is done to prevent sibling component effects from interfering with each other,\n // e.g. a destroy function in one component should never override a ref set\n // by a create function in another component during the same commit.\n {\n commitHookEffectListMount(Layout | HasEffect, finishedWork);\n }\n\n schedulePassiveEffects(finishedWork);\n return;\n }\n\n case ClassComponent:\n {\n var instance = finishedWork.stateNode;\n\n if (finishedWork.flags & Update) {\n if (current === null) {\n // We could update instance props and state here,\n // but instead we rely on them being set during last render.\n // TODO: revisit this when we implement resuming.\n {\n if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {\n if (instance.props !== finishedWork.memoizedProps) {\n error('Expected %s props to match memoized props before ' + 'componentDidMount. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');\n }\n\n if (instance.state !== finishedWork.memoizedState) {\n error('Expected %s state to match memoized state before ' + 'componentDidMount. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.state`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');\n }\n }\n }\n\n {\n instance.componentDidMount();\n }\n } else {\n var prevProps = finishedWork.elementType === finishedWork.type ? current.memoizedProps : resolveDefaultProps(finishedWork.type, current.memoizedProps);\n var prevState = current.memoizedState; // We could update instance props and state here,\n // but instead we rely on them being set during last render.\n // TODO: revisit this when we implement resuming.\n\n {\n if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {\n if (instance.props !== finishedWork.memoizedProps) {\n error('Expected %s props to match memoized props before ' + 'componentDidUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');\n }\n\n if (instance.state !== finishedWork.memoizedState) {\n error('Expected %s state to match memoized state before ' + 'componentDidUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.state`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');\n }\n }\n }\n\n {\n instance.componentDidUpdate(prevProps, prevState, instance.__reactInternalSnapshotBeforeUpdate);\n }\n }\n } // TODO: I think this is now always non-null by the time it reaches the\n // commit phase. Consider removing the type check.\n\n\n var updateQueue = finishedWork.updateQueue;\n\n if (updateQueue !== null) {\n {\n if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {\n if (instance.props !== finishedWork.memoizedProps) {\n error('Expected %s props to match memoized props before ' + 'processing the update queue. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');\n }\n\n if (instance.state !== finishedWork.memoizedState) {\n error('Expected %s state to match memoized state before ' + 'processing the update queue. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.state`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');\n }\n }\n } // We could update instance props and state here,\n // but instead we rely on them being set during last render.\n // TODO: revisit this when we implement resuming.\n\n\n commitUpdateQueue(finishedWork, updateQueue, instance);\n }\n\n return;\n }\n\n case HostRoot:\n {\n // TODO: I think this is now always non-null by the time it reaches the\n // commit phase. Consider removing the type check.\n var _updateQueue = finishedWork.updateQueue;\n\n if (_updateQueue !== null) {\n var _instance = null;\n\n if (finishedWork.child !== null) {\n switch (finishedWork.child.tag) {\n case HostComponent:\n _instance = getPublicInstance(finishedWork.child.stateNode);\n break;\n\n case ClassComponent:\n _instance = finishedWork.child.stateNode;\n break;\n }\n }\n\n commitUpdateQueue(finishedWork, _updateQueue, _instance);\n }\n\n return;\n }\n\n case HostComponent:\n {\n var _instance2 = finishedWork.stateNode; // Renderers may schedule work to be done after host components are mounted\n // (eg DOM renderer may schedule auto-focus for inputs and form controls).\n // These effects should only be committed when components are first mounted,\n // aka when there is no current/alternate.\n\n if (current === null && finishedWork.flags & Update) {\n var type = finishedWork.type;\n var props = finishedWork.memoizedProps;\n commitMount(_instance2, type, props);\n }\n\n return;\n }\n\n case HostText:\n {\n // We have no life-cycles associated with text.\n return;\n }\n\n case HostPortal:\n {\n // We have no life-cycles associated with portals.\n return;\n }\n\n case Profiler:\n {\n {\n var _finishedWork$memoize2 = finishedWork.memoizedProps,\n onCommit = _finishedWork$memoize2.onCommit,\n onRender = _finishedWork$memoize2.onRender;\n var effectDuration = finishedWork.stateNode.effectDuration;\n var commitTime = getCommitTime();\n\n if (typeof onRender === 'function') {\n {\n onRender(finishedWork.memoizedProps.id, current === null ? 'mount' : 'update', finishedWork.actualDuration, finishedWork.treeBaseDuration, finishedWork.actualStartTime, commitTime, finishedRoot.memoizedInteractions);\n }\n }\n }\n\n return;\n }\n\n case SuspenseComponent:\n {\n commitSuspenseHydrationCallbacks(finishedRoot, finishedWork);\n return;\n }\n\n case SuspenseListComponent:\n case IncompleteClassComponent:\n case FundamentalComponent:\n case ScopeComponent:\n case OffscreenComponent:\n case LegacyHiddenComponent:\n return;\n }\n\n {\n {\n throw Error( \"This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n}\n\nfunction hideOrUnhideAllChildren(finishedWork, isHidden) {\n {\n // We only have the top Fiber that was inserted but we need to recurse down its\n // children to find all the terminal nodes.\n var node = finishedWork;\n\n while (true) {\n if (node.tag === HostComponent) {\n var instance = node.stateNode;\n\n if (isHidden) {\n hideInstance(instance);\n } else {\n unhideInstance(node.stateNode, node.memoizedProps);\n }\n } else if (node.tag === HostText) {\n var _instance3 = node.stateNode;\n\n if (isHidden) {\n hideTextInstance(_instance3);\n } else {\n unhideTextInstance(_instance3, node.memoizedProps);\n }\n } else if ((node.tag === OffscreenComponent || node.tag === LegacyHiddenComponent) && node.memoizedState !== null && node !== finishedWork) ; else if (node.child !== null) {\n node.child.return = node;\n node = node.child;\n continue;\n }\n\n if (node === finishedWork) {\n return;\n }\n\n while (node.sibling === null) {\n if (node.return === null || node.return === finishedWork) {\n return;\n }\n\n node = node.return;\n }\n\n node.sibling.return = node.return;\n node = node.sibling;\n }\n }\n}\n\nfunction commitAttachRef(finishedWork) {\n var ref = finishedWork.ref;\n\n if (ref !== null) {\n var instance = finishedWork.stateNode;\n var instanceToUse;\n\n switch (finishedWork.tag) {\n case HostComponent:\n instanceToUse = getPublicInstance(instance);\n break;\n\n default:\n instanceToUse = instance;\n } // Moved outside to ensure DCE works with this flag\n\n if (typeof ref === 'function') {\n ref(instanceToUse);\n } else {\n {\n if (!ref.hasOwnProperty('current')) {\n error('Unexpected ref object provided for %s. ' + 'Use either a ref-setter function or React.createRef().', getComponentName(finishedWork.type));\n }\n }\n\n ref.current = instanceToUse;\n }\n }\n}\n\nfunction commitDetachRef(current) {\n var currentRef = current.ref;\n\n if (currentRef !== null) {\n if (typeof currentRef === 'function') {\n currentRef(null);\n } else {\n currentRef.current = null;\n }\n }\n} // User-originating errors (lifecycles and refs) should not interrupt\n// deletion, so don't let them throw. Host-originating errors should\n// interrupt deletion, so it's okay\n\n\nfunction commitUnmount(finishedRoot, current, renderPriorityLevel) {\n onCommitUnmount(current);\n\n switch (current.tag) {\n case FunctionComponent:\n case ForwardRef:\n case MemoComponent:\n case SimpleMemoComponent:\n case Block:\n {\n var updateQueue = current.updateQueue;\n\n if (updateQueue !== null) {\n var lastEffect = updateQueue.lastEffect;\n\n if (lastEffect !== null) {\n var firstEffect = lastEffect.next;\n var effect = firstEffect;\n\n do {\n var _effect2 = effect,\n destroy = _effect2.destroy,\n tag = _effect2.tag;\n\n if (destroy !== undefined) {\n if ((tag & Passive$1) !== NoFlags$1) {\n enqueuePendingPassiveHookEffectUnmount(current, effect);\n } else {\n {\n safelyCallDestroy(current, destroy);\n }\n }\n }\n\n effect = effect.next;\n } while (effect !== firstEffect);\n }\n }\n\n return;\n }\n\n case ClassComponent:\n {\n safelyDetachRef(current);\n var instance = current.stateNode;\n\n if (typeof instance.componentWillUnmount === 'function') {\n safelyCallComponentWillUnmount(current, instance);\n }\n\n return;\n }\n\n case HostComponent:\n {\n safelyDetachRef(current);\n return;\n }\n\n case HostPortal:\n {\n // TODO: this is recursive.\n // We are also not using this parent because\n // the portal will get pushed immediately.\n {\n unmountHostComponents(finishedRoot, current);\n }\n\n return;\n }\n\n case FundamentalComponent:\n {\n\n return;\n }\n\n case DehydratedFragment:\n {\n\n return;\n }\n\n case ScopeComponent:\n {\n\n return;\n }\n }\n}\n\nfunction commitNestedUnmounts(finishedRoot, root, renderPriorityLevel) {\n // While we're inside a removed host node we don't want to call\n // removeChild on the inner nodes because they're removed by the top\n // call anyway. We also want to call componentWillUnmount on all\n // composites before this host node is removed from the tree. Therefore\n // we do an inner loop while we're still inside the host node.\n var node = root;\n\n while (true) {\n commitUnmount(finishedRoot, node); // Visit children because they may contain more composite or host nodes.\n // Skip portals because commitUnmount() currently visits them recursively.\n\n if (node.child !== null && ( // If we use mutation we drill down into portals using commitUnmount above.\n // If we don't use mutation we drill down into portals here instead.\n node.tag !== HostPortal)) {\n node.child.return = node;\n node = node.child;\n continue;\n }\n\n if (node === root) {\n return;\n }\n\n while (node.sibling === null) {\n if (node.return === null || node.return === root) {\n return;\n }\n\n node = node.return;\n }\n\n node.sibling.return = node.return;\n node = node.sibling;\n }\n}\n\nfunction detachFiberMutation(fiber) {\n // Cut off the return pointers to disconnect it from the tree. Ideally, we\n // should clear the child pointer of the parent alternate to let this\n // get GC:ed but we don't know which for sure which parent is the current\n // one so we'll settle for GC:ing the subtree of this child. This child\n // itself will be GC:ed when the parent updates the next time.\n // Note: we cannot null out sibling here, otherwise it can cause issues\n // with findDOMNode and how it requires the sibling field to carry out\n // traversal in a later effect. See PR #16820. We now clear the sibling\n // field after effects, see: detachFiberAfterEffects.\n //\n // Don't disconnect stateNode now; it will be detached in detachFiberAfterEffects.\n // It may be required if the current component is an error boundary,\n // and one of its descendants throws while unmounting a passive effect.\n fiber.alternate = null;\n fiber.child = null;\n fiber.dependencies = null;\n fiber.firstEffect = null;\n fiber.lastEffect = null;\n fiber.memoizedProps = null;\n fiber.memoizedState = null;\n fiber.pendingProps = null;\n fiber.return = null;\n fiber.updateQueue = null;\n\n {\n fiber._debugOwner = null;\n }\n}\n\nfunction getHostParentFiber(fiber) {\n var parent = fiber.return;\n\n while (parent !== null) {\n if (isHostParent(parent)) {\n return parent;\n }\n\n parent = parent.return;\n }\n\n {\n {\n throw Error( \"Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n}\n\nfunction isHostParent(fiber) {\n return fiber.tag === HostComponent || fiber.tag === HostRoot || fiber.tag === HostPortal;\n}\n\nfunction getHostSibling(fiber) {\n // We're going to search forward into the tree until we find a sibling host\n // node. Unfortunately, if multiple insertions are done in a row we have to\n // search past them. This leads to exponential search for the next sibling.\n // TODO: Find a more efficient way to do this.\n var node = fiber;\n\n siblings: while (true) {\n // If we didn't find anything, let's try the next sibling.\n while (node.sibling === null) {\n if (node.return === null || isHostParent(node.return)) {\n // If we pop out of the root or hit the parent the fiber we are the\n // last sibling.\n return null;\n }\n\n node = node.return;\n }\n\n node.sibling.return = node.return;\n node = node.sibling;\n\n while (node.tag !== HostComponent && node.tag !== HostText && node.tag !== DehydratedFragment) {\n // If it is not host node and, we might have a host node inside it.\n // Try to search down until we find one.\n if (node.flags & Placement) {\n // If we don't have a child, try the siblings instead.\n continue siblings;\n } // If we don't have a child, try the siblings instead.\n // We also skip portals because they are not part of this host tree.\n\n\n if (node.child === null || node.tag === HostPortal) {\n continue siblings;\n } else {\n node.child.return = node;\n node = node.child;\n }\n } // Check if this host node is stable or about to be placed.\n\n\n if (!(node.flags & Placement)) {\n // Found it!\n return node.stateNode;\n }\n }\n}\n\nfunction commitPlacement(finishedWork) {\n\n\n var parentFiber = getHostParentFiber(finishedWork); // Note: these two variables *must* always be updated together.\n\n var parent;\n var isContainer;\n var parentStateNode = parentFiber.stateNode;\n\n switch (parentFiber.tag) {\n case HostComponent:\n parent = parentStateNode;\n isContainer = false;\n break;\n\n case HostRoot:\n parent = parentStateNode.containerInfo;\n isContainer = true;\n break;\n\n case HostPortal:\n parent = parentStateNode.containerInfo;\n isContainer = true;\n break;\n\n case FundamentalComponent:\n\n // eslint-disable-next-line-no-fallthrough\n\n default:\n {\n {\n throw Error( \"Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n }\n\n if (parentFiber.flags & ContentReset) {\n // Reset the text content of the parent before doing any insertions\n resetTextContent(parent); // Clear ContentReset from the effect tag\n\n parentFiber.flags &= ~ContentReset;\n }\n\n var before = getHostSibling(finishedWork); // We only have the top Fiber that was inserted but we need to recurse down its\n // children to find all the terminal nodes.\n\n if (isContainer) {\n insertOrAppendPlacementNodeIntoContainer(finishedWork, before, parent);\n } else {\n insertOrAppendPlacementNode(finishedWork, before, parent);\n }\n}\n\nfunction insertOrAppendPlacementNodeIntoContainer(node, before, parent) {\n var tag = node.tag;\n var isHost = tag === HostComponent || tag === HostText;\n\n if (isHost || enableFundamentalAPI ) {\n var stateNode = isHost ? node.stateNode : node.stateNode.instance;\n\n if (before) {\n insertInContainerBefore(parent, stateNode, before);\n } else {\n appendChildToContainer(parent, stateNode);\n }\n } else if (tag === HostPortal) ; else {\n var child = node.child;\n\n if (child !== null) {\n insertOrAppendPlacementNodeIntoContainer(child, before, parent);\n var sibling = child.sibling;\n\n while (sibling !== null) {\n insertOrAppendPlacementNodeIntoContainer(sibling, before, parent);\n sibling = sibling.sibling;\n }\n }\n }\n}\n\nfunction insertOrAppendPlacementNode(node, before, parent) {\n var tag = node.tag;\n var isHost = tag === HostComponent || tag === HostText;\n\n if (isHost || enableFundamentalAPI ) {\n var stateNode = isHost ? node.stateNode : node.stateNode.instance;\n\n if (before) {\n insertBefore(parent, stateNode, before);\n } else {\n appendChild(parent, stateNode);\n }\n } else if (tag === HostPortal) ; else {\n var child = node.child;\n\n if (child !== null) {\n insertOrAppendPlacementNode(child, before, parent);\n var sibling = child.sibling;\n\n while (sibling !== null) {\n insertOrAppendPlacementNode(sibling, before, parent);\n sibling = sibling.sibling;\n }\n }\n }\n}\n\nfunction unmountHostComponents(finishedRoot, current, renderPriorityLevel) {\n // We only have the top Fiber that was deleted but we need to recurse down its\n // children to find all the terminal nodes.\n var node = current; // Each iteration, currentParent is populated with node's host parent if not\n // currentParentIsValid.\n\n var currentParentIsValid = false; // Note: these two variables *must* always be updated together.\n\n var currentParent;\n var currentParentIsContainer;\n\n while (true) {\n if (!currentParentIsValid) {\n var parent = node.return;\n\n findParent: while (true) {\n if (!(parent !== null)) {\n {\n throw Error( \"Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n var parentStateNode = parent.stateNode;\n\n switch (parent.tag) {\n case HostComponent:\n currentParent = parentStateNode;\n currentParentIsContainer = false;\n break findParent;\n\n case HostRoot:\n currentParent = parentStateNode.containerInfo;\n currentParentIsContainer = true;\n break findParent;\n\n case HostPortal:\n currentParent = parentStateNode.containerInfo;\n currentParentIsContainer = true;\n break findParent;\n\n }\n\n parent = parent.return;\n }\n\n currentParentIsValid = true;\n }\n\n if (node.tag === HostComponent || node.tag === HostText) {\n commitNestedUnmounts(finishedRoot, node); // After all the children have unmounted, it is now safe to remove the\n // node from the tree.\n\n if (currentParentIsContainer) {\n removeChildFromContainer(currentParent, node.stateNode);\n } else {\n removeChild(currentParent, node.stateNode);\n } // Don't visit children because we already visited them.\n\n } else if (node.tag === HostPortal) {\n if (node.child !== null) {\n // When we go into a portal, it becomes the parent to remove from.\n // We will reassign it back when we pop the portal on the way up.\n currentParent = node.stateNode.containerInfo;\n currentParentIsContainer = true; // Visit children because portals might contain host components.\n\n node.child.return = node;\n node = node.child;\n continue;\n }\n } else {\n commitUnmount(finishedRoot, node); // Visit children because we may find more host components below.\n\n if (node.child !== null) {\n node.child.return = node;\n node = node.child;\n continue;\n }\n }\n\n if (node === current) {\n return;\n }\n\n while (node.sibling === null) {\n if (node.return === null || node.return === current) {\n return;\n }\n\n node = node.return;\n\n if (node.tag === HostPortal) {\n // When we go out of the portal, we need to restore the parent.\n // Since we don't keep a stack of them, we will search for it.\n currentParentIsValid = false;\n }\n }\n\n node.sibling.return = node.return;\n node = node.sibling;\n }\n}\n\nfunction commitDeletion(finishedRoot, current, renderPriorityLevel) {\n {\n // Recursively delete all host nodes from the parent.\n // Detach refs and call componentWillUnmount() on the whole subtree.\n unmountHostComponents(finishedRoot, current);\n }\n\n var alternate = current.alternate;\n detachFiberMutation(current);\n\n if (alternate !== null) {\n detachFiberMutation(alternate);\n }\n}\n\nfunction commitWork(current, finishedWork) {\n\n switch (finishedWork.tag) {\n case FunctionComponent:\n case ForwardRef:\n case MemoComponent:\n case SimpleMemoComponent:\n case Block:\n {\n // Layout effects are destroyed during the mutation phase so that all\n // destroy functions for all fibers are called before any create functions.\n // This prevents sibling component effects from interfering with each other,\n // e.g. a destroy function in one component should never override a ref set\n // by a create function in another component during the same commit.\n {\n commitHookEffectListUnmount(Layout | HasEffect, finishedWork);\n }\n\n return;\n }\n\n case ClassComponent:\n {\n return;\n }\n\n case HostComponent:\n {\n var instance = finishedWork.stateNode;\n\n if (instance != null) {\n // Commit the work prepared earlier.\n var newProps = finishedWork.memoizedProps; // For hydration we reuse the update path but we treat the oldProps\n // as the newProps. The updatePayload will contain the real change in\n // this case.\n\n var oldProps = current !== null ? current.memoizedProps : newProps;\n var type = finishedWork.type; // TODO: Type the updateQueue to be specific to host components.\n\n var updatePayload = finishedWork.updateQueue;\n finishedWork.updateQueue = null;\n\n if (updatePayload !== null) {\n commitUpdate(instance, updatePayload, type, oldProps, newProps);\n }\n }\n\n return;\n }\n\n case HostText:\n {\n if (!(finishedWork.stateNode !== null)) {\n {\n throw Error( \"This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n var textInstance = finishedWork.stateNode;\n var newText = finishedWork.memoizedProps; // For hydration we reuse the update path but we treat the oldProps\n // as the newProps. The updatePayload will contain the real change in\n // this case.\n\n var oldText = current !== null ? current.memoizedProps : newText;\n commitTextUpdate(textInstance, oldText, newText);\n return;\n }\n\n case HostRoot:\n {\n {\n var _root = finishedWork.stateNode;\n\n if (_root.hydrate) {\n // We've just hydrated. No need to hydrate again.\n _root.hydrate = false;\n commitHydratedContainer(_root.containerInfo);\n }\n }\n\n return;\n }\n\n case Profiler:\n {\n return;\n }\n\n case SuspenseComponent:\n {\n commitSuspenseComponent(finishedWork);\n attachSuspenseRetryListeners(finishedWork);\n return;\n }\n\n case SuspenseListComponent:\n {\n attachSuspenseRetryListeners(finishedWork);\n return;\n }\n\n case IncompleteClassComponent:\n {\n return;\n }\n\n case FundamentalComponent:\n {\n\n break;\n }\n\n case ScopeComponent:\n {\n\n break;\n }\n\n case OffscreenComponent:\n case LegacyHiddenComponent:\n {\n var newState = finishedWork.memoizedState;\n var isHidden = newState !== null;\n hideOrUnhideAllChildren(finishedWork, isHidden);\n return;\n }\n }\n\n {\n {\n throw Error( \"This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n}\n\nfunction commitSuspenseComponent(finishedWork) {\n var newState = finishedWork.memoizedState;\n\n if (newState !== null) {\n markCommitTimeOfFallback();\n\n {\n // Hide the Offscreen component that contains the primary children. TODO:\n // Ideally, this effect would have been scheduled on the Offscreen fiber\n // itself. That's how unhiding works: the Offscreen component schedules an\n // effect on itself. However, in this case, the component didn't complete,\n // so the fiber was never added to the effect list in the normal path. We\n // could have appended it to the effect list in the Suspense component's\n // second pass, but doing it this way is less complicated. This would be\n // simpler if we got rid of the effect list and traversed the tree, like\n // we're planning to do.\n var primaryChildParent = finishedWork.child;\n hideOrUnhideAllChildren(primaryChildParent, true);\n }\n }\n}\n\nfunction commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) {\n\n var newState = finishedWork.memoizedState;\n\n if (newState === null) {\n var current = finishedWork.alternate;\n\n if (current !== null) {\n var prevState = current.memoizedState;\n\n if (prevState !== null) {\n var suspenseInstance = prevState.dehydrated;\n\n if (suspenseInstance !== null) {\n commitHydratedSuspenseInstance(suspenseInstance);\n }\n }\n }\n }\n}\n\nfunction attachSuspenseRetryListeners(finishedWork) {\n // If this boundary just timed out, then it will have a set of wakeables.\n // For each wakeable, attach a listener so that when it resolves, React\n // attempts to re-render the boundary in the primary (pre-timeout) state.\n var wakeables = finishedWork.updateQueue;\n\n if (wakeables !== null) {\n finishedWork.updateQueue = null;\n var retryCache = finishedWork.stateNode;\n\n if (retryCache === null) {\n retryCache = finishedWork.stateNode = new PossiblyWeakSet();\n }\n\n wakeables.forEach(function (wakeable) {\n // Memoize using the boundary fiber to prevent redundant listeners.\n var retry = resolveRetryWakeable.bind(null, finishedWork, wakeable);\n\n if (!retryCache.has(wakeable)) {\n {\n if (wakeable.__reactDoNotTraceInteractions !== true) {\n retry = tracing.unstable_wrap(retry);\n }\n }\n\n retryCache.add(wakeable);\n wakeable.then(retry, retry);\n }\n });\n }\n} // This function detects when a Suspense boundary goes from visible to hidden.\n// It returns false if the boundary is already hidden.\n// TODO: Use an effect tag.\n\n\nfunction isSuspenseBoundaryBeingHidden(current, finishedWork) {\n if (current !== null) {\n var oldState = current.memoizedState;\n\n if (oldState === null || oldState.dehydrated !== null) {\n var newState = finishedWork.memoizedState;\n return newState !== null && newState.dehydrated === null;\n }\n }\n\n return false;\n}\n\nfunction commitResetTextContent(current) {\n\n resetTextContent(current.stateNode);\n}\n\nvar COMPONENT_TYPE = 0;\nvar HAS_PSEUDO_CLASS_TYPE = 1;\nvar ROLE_TYPE = 2;\nvar TEST_NAME_TYPE = 3;\nvar TEXT_TYPE = 4;\n\nif (typeof Symbol === 'function' && Symbol.for) {\n var symbolFor$1 = Symbol.for;\n COMPONENT_TYPE = symbolFor$1('selector.component');\n HAS_PSEUDO_CLASS_TYPE = symbolFor$1('selector.has_pseudo_class');\n ROLE_TYPE = symbolFor$1('selector.role');\n TEST_NAME_TYPE = symbolFor$1('selector.test_id');\n TEXT_TYPE = symbolFor$1('selector.text');\n}\nvar commitHooks = [];\nfunction onCommitRoot$1() {\n {\n commitHooks.forEach(function (commitHook) {\n return commitHook();\n });\n }\n}\n\nvar ceil = Math.ceil;\nvar ReactCurrentDispatcher$2 = ReactSharedInternals.ReactCurrentDispatcher,\n ReactCurrentOwner$2 = ReactSharedInternals.ReactCurrentOwner,\n IsSomeRendererActing = ReactSharedInternals.IsSomeRendererActing;\nvar NoContext =\n/* */\n0;\nvar BatchedContext =\n/* */\n1;\nvar EventContext =\n/* */\n2;\nvar DiscreteEventContext =\n/* */\n4;\nvar LegacyUnbatchedContext =\n/* */\n8;\nvar RenderContext =\n/* */\n16;\nvar CommitContext =\n/* */\n32;\nvar RetryAfterError =\n/* */\n64;\nvar RootIncomplete = 0;\nvar RootFatalErrored = 1;\nvar RootErrored = 2;\nvar RootSuspended = 3;\nvar RootSuspendedWithDelay = 4;\nvar RootCompleted = 5; // Describes where we are in the React execution stack\n\nvar executionContext = NoContext; // The root we're working on\n\nvar workInProgressRoot = null; // The fiber we're working on\n\nvar workInProgress = null; // The lanes we're rendering\n\nvar workInProgressRootRenderLanes = NoLanes; // Stack that allows components to change the render lanes for its subtree\n// This is a superset of the lanes we started working on at the root. The only\n// case where it's different from `workInProgressRootRenderLanes` is when we\n// enter a subtree that is hidden and needs to be unhidden: Suspense and\n// Offscreen component.\n//\n// Most things in the work loop should deal with workInProgressRootRenderLanes.\n// Most things in begin/complete phases should deal with subtreeRenderLanes.\n\nvar subtreeRenderLanes = NoLanes;\nvar subtreeRenderLanesCursor = createCursor(NoLanes); // Whether to root completed, errored, suspended, etc.\n\nvar workInProgressRootExitStatus = RootIncomplete; // A fatal error, if one is thrown\n\nvar workInProgressRootFatalError = null; // \"Included\" lanes refer to lanes that were worked on during this render. It's\n// slightly different than `renderLanes` because `renderLanes` can change as you\n// enter and exit an Offscreen tree. This value is the combination of all render\n// lanes for the entire render phase.\n\nvar workInProgressRootIncludedLanes = NoLanes; // The work left over by components that were visited during this render. Only\n// includes unprocessed updates, not work in bailed out children.\n\nvar workInProgressRootSkippedLanes = NoLanes; // Lanes that were updated (in an interleaved event) during this render.\n\nvar workInProgressRootUpdatedLanes = NoLanes; // Lanes that were pinged (in an interleaved event) during this render.\n\nvar workInProgressRootPingedLanes = NoLanes;\nvar mostRecentlyUpdatedRoot = null; // The most recent time we committed a fallback. This lets us ensure a train\n// model where we don't commit new loading states in too quick succession.\n\nvar globalMostRecentFallbackTime = 0;\nvar FALLBACK_THROTTLE_MS = 500; // The absolute time for when we should start giving up on rendering\n// more and prefer CPU suspense heuristics instead.\n\nvar workInProgressRootRenderTargetTime = Infinity; // How long a render is supposed to take before we start following CPU\n// suspense heuristics and opt out of rendering more content.\n\nvar RENDER_TIMEOUT_MS = 500;\n\nfunction resetRenderTimer() {\n workInProgressRootRenderTargetTime = now() + RENDER_TIMEOUT_MS;\n}\n\nfunction getRenderTargetTime() {\n return workInProgressRootRenderTargetTime;\n}\nvar nextEffect = null;\nvar hasUncaughtError = false;\nvar firstUncaughtError = null;\nvar legacyErrorBoundariesThatAlreadyFailed = null;\nvar rootDoesHavePassiveEffects = false;\nvar rootWithPendingPassiveEffects = null;\nvar pendingPassiveEffectsRenderPriority = NoPriority$1;\nvar pendingPassiveEffectsLanes = NoLanes;\nvar pendingPassiveHookEffectsMount = [];\nvar pendingPassiveHookEffectsUnmount = [];\nvar rootsWithPendingDiscreteUpdates = null; // Use these to prevent an infinite loop of nested updates\n\nvar NESTED_UPDATE_LIMIT = 50;\nvar nestedUpdateCount = 0;\nvar rootWithNestedUpdates = null;\nvar NESTED_PASSIVE_UPDATE_LIMIT = 50;\nvar nestedPassiveUpdateCount = 0; // Marks the need to reschedule pending interactions at these lanes\n// during the commit phase. This enables them to be traced across components\n// that spawn new work during render. E.g. hidden boundaries, suspended SSR\n// hydration or SuspenseList.\n// TODO: Can use a bitmask instead of an array\n\nvar spawnedWorkDuringRender = null; // If two updates are scheduled within the same event, we should treat their\n// event times as simultaneous, even if the actual clock time has advanced\n// between the first and second call.\n\nvar currentEventTime = NoTimestamp;\nvar currentEventWipLanes = NoLanes;\nvar currentEventPendingLanes = NoLanes; // Dev only flag that tracks if passive effects are currently being flushed.\n// We warn about state updates for unmounted components differently in this case.\n\nvar isFlushingPassiveEffects = false;\nvar focusedInstanceHandle = null;\nvar shouldFireAfterActiveInstanceBlur = false;\nfunction getWorkInProgressRoot() {\n return workInProgressRoot;\n}\nfunction requestEventTime() {\n if ((executionContext & (RenderContext | CommitContext)) !== NoContext) {\n // We're inside React, so it's fine to read the actual time.\n return now();\n } // We're not inside React, so we may be in the middle of a browser event.\n\n\n if (currentEventTime !== NoTimestamp) {\n // Use the same start time for all updates until we enter React again.\n return currentEventTime;\n } // This is the first update since React yielded. Compute a new start time.\n\n\n currentEventTime = now();\n return currentEventTime;\n}\nfunction requestUpdateLane(fiber) {\n // Special cases\n var mode = fiber.mode;\n\n if ((mode & BlockingMode) === NoMode) {\n return SyncLane;\n } else if ((mode & ConcurrentMode) === NoMode) {\n return getCurrentPriorityLevel() === ImmediatePriority$1 ? SyncLane : SyncBatchedLane;\n } // The algorithm for assigning an update to a lane should be stable for all\n // updates at the same priority within the same event. To do this, the inputs\n // to the algorithm must be the same. For example, we use the `renderLanes`\n // to avoid choosing a lane that is already in the middle of rendering.\n //\n // However, the \"included\" lanes could be mutated in between updates in the\n // same event, like if you perform an update inside `flushSync`. Or any other\n // code path that might call `prepareFreshStack`.\n //\n // The trick we use is to cache the first of each of these inputs within an\n // event. Then reset the cached values once we can be sure the event is over.\n // Our heuristic for that is whenever we enter a concurrent work loop.\n //\n // We'll do the same for `currentEventPendingLanes` below.\n\n\n if (currentEventWipLanes === NoLanes) {\n currentEventWipLanes = workInProgressRootIncludedLanes;\n }\n\n var isTransition = requestCurrentTransition() !== NoTransition;\n\n if (isTransition) {\n if (currentEventPendingLanes !== NoLanes) {\n currentEventPendingLanes = mostRecentlyUpdatedRoot !== null ? mostRecentlyUpdatedRoot.pendingLanes : NoLanes;\n }\n\n return findTransitionLane(currentEventWipLanes, currentEventPendingLanes);\n } // TODO: Remove this dependency on the Scheduler priority.\n // To do that, we're replacing it with an update lane priority.\n\n\n var schedulerPriority = getCurrentPriorityLevel(); // The old behavior was using the priority level of the Scheduler.\n // This couples React to the Scheduler internals, so we're replacing it\n // with the currentUpdateLanePriority above. As an example of how this\n // could be problematic, if we're not inside `Scheduler.runWithPriority`,\n // then we'll get the priority of the current running Scheduler task,\n // which is probably not what we want.\n\n var lane;\n\n if ( // TODO: Temporary. We're removing the concept of discrete updates.\n (executionContext & DiscreteEventContext) !== NoContext && schedulerPriority === UserBlockingPriority$2) {\n lane = findUpdateLane(InputDiscreteLanePriority, currentEventWipLanes);\n } else {\n var schedulerLanePriority = schedulerPriorityToLanePriority(schedulerPriority);\n\n lane = findUpdateLane(schedulerLanePriority, currentEventWipLanes);\n }\n\n return lane;\n}\n\nfunction requestRetryLane(fiber) {\n // This is a fork of `requestUpdateLane` designed specifically for Suspense\n // \"retries\" — a special update that attempts to flip a Suspense boundary\n // from its placeholder state to its primary/resolved state.\n // Special cases\n var mode = fiber.mode;\n\n if ((mode & BlockingMode) === NoMode) {\n return SyncLane;\n } else if ((mode & ConcurrentMode) === NoMode) {\n return getCurrentPriorityLevel() === ImmediatePriority$1 ? SyncLane : SyncBatchedLane;\n } // See `requestUpdateLane` for explanation of `currentEventWipLanes`\n\n\n if (currentEventWipLanes === NoLanes) {\n currentEventWipLanes = workInProgressRootIncludedLanes;\n }\n\n return findRetryLane(currentEventWipLanes);\n}\n\nfunction scheduleUpdateOnFiber(fiber, lane, eventTime) {\n checkForNestedUpdates();\n warnAboutRenderPhaseUpdatesInDEV(fiber);\n var root = markUpdateLaneFromFiberToRoot(fiber, lane);\n\n if (root === null) {\n warnAboutUpdateOnUnmountedFiberInDEV(fiber);\n return null;\n } // Mark that the root has a pending update.\n\n\n markRootUpdated(root, lane, eventTime);\n\n if (root === workInProgressRoot) {\n // Received an update to a tree that's in the middle of rendering. Mark\n // that there was an interleaved update work on this root. Unless the\n // `deferRenderPhaseUpdateToNextBatch` flag is off and this is a render\n // phase update. In that case, we don't treat render phase updates as if\n // they were interleaved, for backwards compat reasons.\n {\n workInProgressRootUpdatedLanes = mergeLanes(workInProgressRootUpdatedLanes, lane);\n }\n\n if (workInProgressRootExitStatus === RootSuspendedWithDelay) {\n // The root already suspended with a delay, which means this render\n // definitely won't finish. Since we have a new update, let's mark it as\n // suspended now, right before marking the incoming update. This has the\n // effect of interrupting the current render and switching to the update.\n // TODO: Make sure this doesn't override pings that happen while we've\n // already started rendering.\n markRootSuspended$1(root, workInProgressRootRenderLanes);\n }\n } // TODO: requestUpdateLanePriority also reads the priority. Pass the\n // priority as an argument to that function and this one.\n\n\n var priorityLevel = getCurrentPriorityLevel();\n\n if (lane === SyncLane) {\n if ( // Check if we're inside unbatchedUpdates\n (executionContext & LegacyUnbatchedContext) !== NoContext && // Check if we're not already rendering\n (executionContext & (RenderContext | CommitContext)) === NoContext) {\n // Register pending interactions on the root to avoid losing traced interaction data.\n schedulePendingInteractions(root, lane); // This is a legacy edge case. The initial mount of a ReactDOM.render-ed\n // root inside of batchedUpdates should be synchronous, but layout updates\n // should be deferred until the end of the batch.\n\n performSyncWorkOnRoot(root);\n } else {\n ensureRootIsScheduled(root, eventTime);\n schedulePendingInteractions(root, lane);\n\n if (executionContext === NoContext) {\n // Flush the synchronous work now, unless we're already working or inside\n // a batch. This is intentionally inside scheduleUpdateOnFiber instead of\n // scheduleCallbackForFiber to preserve the ability to schedule a callback\n // without immediately flushing it. We only do this for user-initiated\n // updates, to preserve historical behavior of legacy mode.\n resetRenderTimer();\n flushSyncCallbackQueue();\n }\n }\n } else {\n // Schedule a discrete update but only if it's not Sync.\n if ((executionContext & DiscreteEventContext) !== NoContext && ( // Only updates at user-blocking priority or greater are considered\n // discrete, even inside a discrete event.\n priorityLevel === UserBlockingPriority$2 || priorityLevel === ImmediatePriority$1)) {\n // This is the result of a discrete event. Track the lowest priority\n // discrete update per root so we can flush them early, if needed.\n if (rootsWithPendingDiscreteUpdates === null) {\n rootsWithPendingDiscreteUpdates = new Set([root]);\n } else {\n rootsWithPendingDiscreteUpdates.add(root);\n }\n } // Schedule other updates after in case the callback is sync.\n\n\n ensureRootIsScheduled(root, eventTime);\n schedulePendingInteractions(root, lane);\n } // We use this when assigning a lane for a transition inside\n // `requestUpdateLane`. We assume it's the same as the root being updated,\n // since in the common case of a single root app it probably is. If it's not\n // the same root, then it's not a huge deal, we just might batch more stuff\n // together more than necessary.\n\n\n mostRecentlyUpdatedRoot = root;\n} // This is split into a separate function so we can mark a fiber with pending\n// work without treating it as a typical update that originates from an event;\n// e.g. retrying a Suspense boundary isn't an update, but it does schedule work\n// on a fiber.\n\nfunction markUpdateLaneFromFiberToRoot(sourceFiber, lane) {\n // Update the source fiber's lanes\n sourceFiber.lanes = mergeLanes(sourceFiber.lanes, lane);\n var alternate = sourceFiber.alternate;\n\n if (alternate !== null) {\n alternate.lanes = mergeLanes(alternate.lanes, lane);\n }\n\n {\n if (alternate === null && (sourceFiber.flags & (Placement | Hydrating)) !== NoFlags) {\n warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber);\n }\n } // Walk the parent path to the root and update the child expiration time.\n\n\n var node = sourceFiber;\n var parent = sourceFiber.return;\n\n while (parent !== null) {\n parent.childLanes = mergeLanes(parent.childLanes, lane);\n alternate = parent.alternate;\n\n if (alternate !== null) {\n alternate.childLanes = mergeLanes(alternate.childLanes, lane);\n } else {\n {\n if ((parent.flags & (Placement | Hydrating)) !== NoFlags) {\n warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber);\n }\n }\n }\n\n node = parent;\n parent = parent.return;\n }\n\n if (node.tag === HostRoot) {\n var root = node.stateNode;\n return root;\n } else {\n return null;\n }\n} // Use this function to schedule a task for a root. There's only one task per\n// root; if a task was already scheduled, we'll check to make sure the priority\n// of the existing task is the same as the priority of the next level that the\n// root has work on. This function is called on every update, and right before\n// exiting a task.\n\n\nfunction ensureRootIsScheduled(root, currentTime) {\n var existingCallbackNode = root.callbackNode; // Check if any lanes are being starved by other work. If so, mark them as\n // expired so we know to work on those next.\n\n markStarvedLanesAsExpired(root, currentTime); // Determine the next lanes to work on, and their priority.\n\n var nextLanes = getNextLanes(root, root === workInProgressRoot ? workInProgressRootRenderLanes : NoLanes); // This returns the priority level computed during the `getNextLanes` call.\n\n var newCallbackPriority = returnNextLanesPriority();\n\n if (nextLanes === NoLanes) {\n // Special case: There's nothing to work on.\n if (existingCallbackNode !== null) {\n cancelCallback(existingCallbackNode);\n root.callbackNode = null;\n root.callbackPriority = NoLanePriority;\n }\n\n return;\n } // Check if there's an existing task. We may be able to reuse it.\n\n\n if (existingCallbackNode !== null) {\n var existingCallbackPriority = root.callbackPriority;\n\n if (existingCallbackPriority === newCallbackPriority) {\n // The priority hasn't changed. We can reuse the existing task. Exit.\n return;\n } // The priority changed. Cancel the existing callback. We'll schedule a new\n // one below.\n\n\n cancelCallback(existingCallbackNode);\n } // Schedule a new callback.\n\n\n var newCallbackNode;\n\n if (newCallbackPriority === SyncLanePriority) {\n // Special case: Sync React callbacks are scheduled on a special\n // internal queue\n newCallbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root));\n } else if (newCallbackPriority === SyncBatchedLanePriority) {\n newCallbackNode = scheduleCallback(ImmediatePriority$1, performSyncWorkOnRoot.bind(null, root));\n } else {\n var schedulerPriorityLevel = lanePriorityToSchedulerPriority(newCallbackPriority);\n newCallbackNode = scheduleCallback(schedulerPriorityLevel, performConcurrentWorkOnRoot.bind(null, root));\n }\n\n root.callbackPriority = newCallbackPriority;\n root.callbackNode = newCallbackNode;\n} // This is the entry point for every concurrent task, i.e. anything that\n// goes through Scheduler.\n\n\nfunction performConcurrentWorkOnRoot(root) {\n // Since we know we're in a React event, we can clear the current\n // event time. The next update will compute a new event time.\n currentEventTime = NoTimestamp;\n currentEventWipLanes = NoLanes;\n currentEventPendingLanes = NoLanes;\n\n if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) {\n {\n throw Error( \"Should not already be working.\" );\n }\n } // Flush any pending passive effects before deciding which lanes to work on,\n // in case they schedule additional work.\n\n\n var originalCallbackNode = root.callbackNode;\n var didFlushPassiveEffects = flushPassiveEffects();\n\n if (didFlushPassiveEffects) {\n // Something in the passive effect phase may have canceled the current task.\n // Check if the task node for this root was changed.\n if (root.callbackNode !== originalCallbackNode) {\n // The current task was canceled. Exit. We don't need to call\n // `ensureRootIsScheduled` because the check above implies either that\n // there's a new task, or that there's no remaining work on this root.\n return null;\n }\n } // Determine the next expiration time to work on, using the fields stored\n // on the root.\n\n\n var lanes = getNextLanes(root, root === workInProgressRoot ? workInProgressRootRenderLanes : NoLanes);\n\n if (lanes === NoLanes) {\n // Defensive coding. This is never expected to happen.\n return null;\n }\n\n var exitStatus = renderRootConcurrent(root, lanes);\n\n if (includesSomeLane(workInProgressRootIncludedLanes, workInProgressRootUpdatedLanes)) {\n // The render included lanes that were updated during the render phase.\n // For example, when unhiding a hidden tree, we include all the lanes\n // that were previously skipped when the tree was hidden. That set of\n // lanes is a superset of the lanes we started rendering with.\n //\n // So we'll throw out the current work and restart.\n prepareFreshStack(root, NoLanes);\n } else if (exitStatus !== RootIncomplete) {\n if (exitStatus === RootErrored) {\n executionContext |= RetryAfterError; // If an error occurred during hydration,\n // discard server response and fall back to client side render.\n\n if (root.hydrate) {\n root.hydrate = false;\n clearContainer(root.containerInfo);\n } // If something threw an error, try rendering one more time. We'll render\n // synchronously to block concurrent data mutations, and we'll includes\n // all pending updates are included. If it still fails after the second\n // attempt, we'll give up and commit the resulting tree.\n\n\n lanes = getLanesToRetrySynchronouslyOnError(root);\n\n if (lanes !== NoLanes) {\n exitStatus = renderRootSync(root, lanes);\n }\n }\n\n if (exitStatus === RootFatalErrored) {\n var fatalError = workInProgressRootFatalError;\n prepareFreshStack(root, NoLanes);\n markRootSuspended$1(root, lanes);\n ensureRootIsScheduled(root, now());\n throw fatalError;\n } // We now have a consistent tree. The next step is either to commit it,\n // or, if something suspended, wait to commit it after a timeout.\n\n\n var finishedWork = root.current.alternate;\n root.finishedWork = finishedWork;\n root.finishedLanes = lanes;\n finishConcurrentRender(root, exitStatus, lanes);\n }\n\n ensureRootIsScheduled(root, now());\n\n if (root.callbackNode === originalCallbackNode) {\n // The task node scheduled for this root is the same one that's\n // currently executed. Need to return a continuation.\n return performConcurrentWorkOnRoot.bind(null, root);\n }\n\n return null;\n}\n\nfunction finishConcurrentRender(root, exitStatus, lanes) {\n switch (exitStatus) {\n case RootIncomplete:\n case RootFatalErrored:\n {\n {\n {\n throw Error( \"Root did not complete. This is a bug in React.\" );\n }\n }\n }\n // Flow knows about invariant, so it complains if I add a break\n // statement, but eslint doesn't know about invariant, so it complains\n // if I do. eslint-disable-next-line no-fallthrough\n\n case RootErrored:\n {\n // We should have already attempted to retry this tree. If we reached\n // this point, it errored again. Commit it.\n commitRoot(root);\n break;\n }\n\n case RootSuspended:\n {\n markRootSuspended$1(root, lanes); // We have an acceptable loading state. We need to figure out if we\n // should immediately commit it or wait a bit.\n\n if (includesOnlyRetries(lanes) && // do not delay if we're inside an act() scope\n !shouldForceFlushFallbacksInDEV()) {\n // This render only included retries, no updates. Throttle committing\n // retries so that we don't show too many loading states too quickly.\n var msUntilTimeout = globalMostRecentFallbackTime + FALLBACK_THROTTLE_MS - now(); // Don't bother with a very short suspense time.\n\n if (msUntilTimeout > 10) {\n var nextLanes = getNextLanes(root, NoLanes);\n\n if (nextLanes !== NoLanes) {\n // There's additional work on this root.\n break;\n }\n\n var suspendedLanes = root.suspendedLanes;\n\n if (!isSubsetOfLanes(suspendedLanes, lanes)) {\n // We should prefer to render the fallback of at the last\n // suspended level. Ping the last suspended level to try\n // rendering it again.\n // FIXME: What if the suspended lanes are Idle? Should not restart.\n var eventTime = requestEventTime();\n markRootPinged(root, suspendedLanes);\n break;\n } // The render is suspended, it hasn't timed out, and there's no\n // lower priority work to do. Instead of committing the fallback\n // immediately, wait for more data to arrive.\n\n\n root.timeoutHandle = scheduleTimeout(commitRoot.bind(null, root), msUntilTimeout);\n break;\n }\n } // The work expired. Commit immediately.\n\n\n commitRoot(root);\n break;\n }\n\n case RootSuspendedWithDelay:\n {\n markRootSuspended$1(root, lanes);\n\n if (includesOnlyTransitions(lanes)) {\n // This is a transition, so we should exit without committing a\n // placeholder and without scheduling a timeout. Delay indefinitely\n // until we receive more data.\n break;\n }\n\n if (!shouldForceFlushFallbacksInDEV()) {\n // This is not a transition, but we did trigger an avoided state.\n // Schedule a placeholder to display after a short delay, using the Just\n // Noticeable Difference.\n // TODO: Is the JND optimization worth the added complexity? If this is\n // the only reason we track the event time, then probably not.\n // Consider removing.\n var mostRecentEventTime = getMostRecentEventTime(root, lanes);\n var eventTimeMs = mostRecentEventTime;\n var timeElapsedMs = now() - eventTimeMs;\n\n var _msUntilTimeout = jnd(timeElapsedMs) - timeElapsedMs; // Don't bother with a very short suspense time.\n\n\n if (_msUntilTimeout > 10) {\n // Instead of committing the fallback immediately, wait for more data\n // to arrive.\n root.timeoutHandle = scheduleTimeout(commitRoot.bind(null, root), _msUntilTimeout);\n break;\n }\n } // Commit the placeholder.\n\n\n commitRoot(root);\n break;\n }\n\n case RootCompleted:\n {\n // The work completed. Ready to commit.\n commitRoot(root);\n break;\n }\n\n default:\n {\n {\n {\n throw Error( \"Unknown root exit status.\" );\n }\n }\n }\n }\n}\n\nfunction markRootSuspended$1(root, suspendedLanes) {\n // When suspending, we should always exclude lanes that were pinged or (more\n // rarely, since we try to avoid it) updated during the render phase.\n // TODO: Lol maybe there's a better way to factor this besides this\n // obnoxiously named function :)\n suspendedLanes = removeLanes(suspendedLanes, workInProgressRootPingedLanes);\n suspendedLanes = removeLanes(suspendedLanes, workInProgressRootUpdatedLanes);\n markRootSuspended(root, suspendedLanes);\n} // This is the entry point for synchronous tasks that don't go\n// through Scheduler\n\n\nfunction performSyncWorkOnRoot(root) {\n if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) {\n {\n throw Error( \"Should not already be working.\" );\n }\n }\n\n flushPassiveEffects();\n var lanes;\n var exitStatus;\n\n if (root === workInProgressRoot && includesSomeLane(root.expiredLanes, workInProgressRootRenderLanes)) {\n // There's a partial tree, and at least one of its lanes has expired. Finish\n // rendering it before rendering the rest of the expired work.\n lanes = workInProgressRootRenderLanes;\n exitStatus = renderRootSync(root, lanes);\n\n if (includesSomeLane(workInProgressRootIncludedLanes, workInProgressRootUpdatedLanes)) {\n // The render included lanes that were updated during the render phase.\n // For example, when unhiding a hidden tree, we include all the lanes\n // that were previously skipped when the tree was hidden. That set of\n // lanes is a superset of the lanes we started rendering with.\n //\n // Note that this only happens when part of the tree is rendered\n // concurrently. If the whole tree is rendered synchronously, then there\n // are no interleaved events.\n lanes = getNextLanes(root, lanes);\n exitStatus = renderRootSync(root, lanes);\n }\n } else {\n lanes = getNextLanes(root, NoLanes);\n exitStatus = renderRootSync(root, lanes);\n }\n\n if (root.tag !== LegacyRoot && exitStatus === RootErrored) {\n executionContext |= RetryAfterError; // If an error occurred during hydration,\n // discard server response and fall back to client side render.\n\n if (root.hydrate) {\n root.hydrate = false;\n clearContainer(root.containerInfo);\n } // If something threw an error, try rendering one more time. We'll render\n // synchronously to block concurrent data mutations, and we'll includes\n // all pending updates are included. If it still fails after the second\n // attempt, we'll give up and commit the resulting tree.\n\n\n lanes = getLanesToRetrySynchronouslyOnError(root);\n\n if (lanes !== NoLanes) {\n exitStatus = renderRootSync(root, lanes);\n }\n }\n\n if (exitStatus === RootFatalErrored) {\n var fatalError = workInProgressRootFatalError;\n prepareFreshStack(root, NoLanes);\n markRootSuspended$1(root, lanes);\n ensureRootIsScheduled(root, now());\n throw fatalError;\n } // We now have a consistent tree. Because this is a sync render, we\n // will commit it even if something suspended.\n\n\n var finishedWork = root.current.alternate;\n root.finishedWork = finishedWork;\n root.finishedLanes = lanes;\n commitRoot(root); // Before exiting, make sure there's a callback scheduled for the next\n // pending level.\n\n ensureRootIsScheduled(root, now());\n return null;\n}\nfunction flushDiscreteUpdates() {\n // TODO: Should be able to flush inside batchedUpdates, but not inside `act`.\n // However, `act` uses `batchedUpdates`, so there's no way to distinguish\n // those two cases. Need to fix this before exposing flushDiscreteUpdates\n // as a public API.\n if ((executionContext & (BatchedContext | RenderContext | CommitContext)) !== NoContext) {\n {\n if ((executionContext & RenderContext) !== NoContext) {\n error('unstable_flushDiscreteUpdates: Cannot flush updates when React is ' + 'already rendering.');\n }\n } // We're already rendering, so we can't synchronously flush pending work.\n // This is probably a nested event dispatch triggered by a lifecycle/effect,\n // like `el.focus()`. Exit.\n\n\n return;\n }\n\n flushPendingDiscreteUpdates(); // If the discrete updates scheduled passive effects, flush them now so that\n // they fire before the next serial event.\n\n flushPassiveEffects();\n}\n\nfunction flushPendingDiscreteUpdates() {\n if (rootsWithPendingDiscreteUpdates !== null) {\n // For each root with pending discrete updates, schedule a callback to\n // immediately flush them.\n var roots = rootsWithPendingDiscreteUpdates;\n rootsWithPendingDiscreteUpdates = null;\n roots.forEach(function (root) {\n markDiscreteUpdatesExpired(root);\n ensureRootIsScheduled(root, now());\n });\n } // Now flush the immediate queue.\n\n\n flushSyncCallbackQueue();\n}\n\nfunction batchedUpdates$1(fn, a) {\n var prevExecutionContext = executionContext;\n executionContext |= BatchedContext;\n\n try {\n return fn(a);\n } finally {\n executionContext = prevExecutionContext;\n\n if (executionContext === NoContext) {\n // Flush the immediate callbacks that were scheduled during this batch\n resetRenderTimer();\n flushSyncCallbackQueue();\n }\n }\n}\nfunction batchedEventUpdates$1(fn, a) {\n var prevExecutionContext = executionContext;\n executionContext |= EventContext;\n\n try {\n return fn(a);\n } finally {\n executionContext = prevExecutionContext;\n\n if (executionContext === NoContext) {\n // Flush the immediate callbacks that were scheduled during this batch\n resetRenderTimer();\n flushSyncCallbackQueue();\n }\n }\n}\nfunction discreteUpdates$1(fn, a, b, c, d) {\n var prevExecutionContext = executionContext;\n executionContext |= DiscreteEventContext;\n\n {\n try {\n return runWithPriority$1(UserBlockingPriority$2, fn.bind(null, a, b, c, d));\n } finally {\n executionContext = prevExecutionContext;\n\n if (executionContext === NoContext) {\n // Flush the immediate callbacks that were scheduled during this batch\n resetRenderTimer();\n flushSyncCallbackQueue();\n }\n }\n }\n}\nfunction unbatchedUpdates(fn, a) {\n var prevExecutionContext = executionContext;\n executionContext &= ~BatchedContext;\n executionContext |= LegacyUnbatchedContext;\n\n try {\n return fn(a);\n } finally {\n executionContext = prevExecutionContext;\n\n if (executionContext === NoContext) {\n // Flush the immediate callbacks that were scheduled during this batch\n resetRenderTimer();\n flushSyncCallbackQueue();\n }\n }\n}\nfunction flushSync(fn, a) {\n var prevExecutionContext = executionContext;\n\n if ((prevExecutionContext & (RenderContext | CommitContext)) !== NoContext) {\n {\n error('flushSync was called from inside a lifecycle method. React cannot ' + 'flush when React is already rendering. Consider moving this call to ' + 'a scheduler task or micro task.');\n }\n\n return fn(a);\n }\n\n executionContext |= BatchedContext;\n\n {\n try {\n if (fn) {\n return runWithPriority$1(ImmediatePriority$1, fn.bind(null, a));\n } else {\n return undefined;\n }\n } finally {\n executionContext = prevExecutionContext; // Flush the immediate callbacks that were scheduled during this batch.\n // Note that this will happen even if batchedUpdates is higher up\n // the stack.\n\n flushSyncCallbackQueue();\n }\n }\n}\nfunction pushRenderLanes(fiber, lanes) {\n push(subtreeRenderLanesCursor, subtreeRenderLanes, fiber);\n subtreeRenderLanes = mergeLanes(subtreeRenderLanes, lanes);\n workInProgressRootIncludedLanes = mergeLanes(workInProgressRootIncludedLanes, lanes);\n}\nfunction popRenderLanes(fiber) {\n subtreeRenderLanes = subtreeRenderLanesCursor.current;\n pop(subtreeRenderLanesCursor, fiber);\n}\n\nfunction prepareFreshStack(root, lanes) {\n root.finishedWork = null;\n root.finishedLanes = NoLanes;\n var timeoutHandle = root.timeoutHandle;\n\n if (timeoutHandle !== noTimeout) {\n // The root previous suspended and scheduled a timeout to commit a fallback\n // state. Now that we have additional work, cancel the timeout.\n root.timeoutHandle = noTimeout; // $FlowFixMe Complains noTimeout is not a TimeoutID, despite the check above\n\n cancelTimeout(timeoutHandle);\n }\n\n if (workInProgress !== null) {\n var interruptedWork = workInProgress.return;\n\n while (interruptedWork !== null) {\n unwindInterruptedWork(interruptedWork);\n interruptedWork = interruptedWork.return;\n }\n }\n\n workInProgressRoot = root;\n workInProgress = createWorkInProgress(root.current, null);\n workInProgressRootRenderLanes = subtreeRenderLanes = workInProgressRootIncludedLanes = lanes;\n workInProgressRootExitStatus = RootIncomplete;\n workInProgressRootFatalError = null;\n workInProgressRootSkippedLanes = NoLanes;\n workInProgressRootUpdatedLanes = NoLanes;\n workInProgressRootPingedLanes = NoLanes;\n\n {\n spawnedWorkDuringRender = null;\n }\n\n {\n ReactStrictModeWarnings.discardPendingWarnings();\n }\n}\n\nfunction handleError(root, thrownValue) {\n do {\n var erroredWork = workInProgress;\n\n try {\n // Reset module-level state that was set during the render phase.\n resetContextDependencies();\n resetHooksAfterThrow();\n resetCurrentFiber(); // TODO: I found and added this missing line while investigating a\n // separate issue. Write a regression test using string refs.\n\n ReactCurrentOwner$2.current = null;\n\n if (erroredWork === null || erroredWork.return === null) {\n // Expected to be working on a non-root fiber. This is a fatal error\n // because there's no ancestor that can handle it; the root is\n // supposed to capture all errors that weren't caught by an error\n // boundary.\n workInProgressRootExitStatus = RootFatalErrored;\n workInProgressRootFatalError = thrownValue; // Set `workInProgress` to null. This represents advancing to the next\n // sibling, or the parent if there are no siblings. But since the root\n // has no siblings nor a parent, we set it to null. Usually this is\n // handled by `completeUnitOfWork` or `unwindWork`, but since we're\n // intentionally not calling those, we need set it here.\n // TODO: Consider calling `unwindWork` to pop the contexts.\n\n workInProgress = null;\n return;\n }\n\n if (enableProfilerTimer && erroredWork.mode & ProfileMode) {\n // Record the time spent rendering before an error was thrown. This\n // avoids inaccurate Profiler durations in the case of a\n // suspended render.\n stopProfilerTimerIfRunningAndRecordDelta(erroredWork, true);\n }\n\n throwException(root, erroredWork.return, erroredWork, thrownValue, workInProgressRootRenderLanes);\n completeUnitOfWork(erroredWork);\n } catch (yetAnotherThrownValue) {\n // Something in the return path also threw.\n thrownValue = yetAnotherThrownValue;\n\n if (workInProgress === erroredWork && erroredWork !== null) {\n // If this boundary has already errored, then we had trouble processing\n // the error. Bubble it to the next boundary.\n erroredWork = erroredWork.return;\n workInProgress = erroredWork;\n } else {\n erroredWork = workInProgress;\n }\n\n continue;\n } // Return to the normal work loop.\n\n\n return;\n } while (true);\n}\n\nfunction pushDispatcher() {\n var prevDispatcher = ReactCurrentDispatcher$2.current;\n ReactCurrentDispatcher$2.current = ContextOnlyDispatcher;\n\n if (prevDispatcher === null) {\n // The React isomorphic package does not include a default dispatcher.\n // Instead the first renderer will lazily attach one, in order to give\n // nicer error messages.\n return ContextOnlyDispatcher;\n } else {\n return prevDispatcher;\n }\n}\n\nfunction popDispatcher(prevDispatcher) {\n ReactCurrentDispatcher$2.current = prevDispatcher;\n}\n\nfunction pushInteractions(root) {\n {\n var prevInteractions = tracing.__interactionsRef.current;\n tracing.__interactionsRef.current = root.memoizedInteractions;\n return prevInteractions;\n }\n}\n\nfunction popInteractions(prevInteractions) {\n {\n tracing.__interactionsRef.current = prevInteractions;\n }\n}\n\nfunction markCommitTimeOfFallback() {\n globalMostRecentFallbackTime = now();\n}\nfunction markSkippedUpdateLanes(lane) {\n workInProgressRootSkippedLanes = mergeLanes(lane, workInProgressRootSkippedLanes);\n}\nfunction renderDidSuspend() {\n if (workInProgressRootExitStatus === RootIncomplete) {\n workInProgressRootExitStatus = RootSuspended;\n }\n}\nfunction renderDidSuspendDelayIfPossible() {\n if (workInProgressRootExitStatus === RootIncomplete || workInProgressRootExitStatus === RootSuspended) {\n workInProgressRootExitStatus = RootSuspendedWithDelay;\n } // Check if there are updates that we skipped tree that might have unblocked\n // this render.\n\n\n if (workInProgressRoot !== null && (includesNonIdleWork(workInProgressRootSkippedLanes) || includesNonIdleWork(workInProgressRootUpdatedLanes))) {\n // Mark the current render as suspended so that we switch to working on\n // the updates that were skipped. Usually we only suspend at the end of\n // the render phase.\n // TODO: We should probably always mark the root as suspended immediately\n // (inside this function), since by suspending at the end of the render\n // phase introduces a potential mistake where we suspend lanes that were\n // pinged or updated while we were rendering.\n markRootSuspended$1(workInProgressRoot, workInProgressRootRenderLanes);\n }\n}\nfunction renderDidError() {\n if (workInProgressRootExitStatus !== RootCompleted) {\n workInProgressRootExitStatus = RootErrored;\n }\n} // Called during render to determine if anything has suspended.\n// Returns false if we're not sure.\n\nfunction renderHasNotSuspendedYet() {\n // If something errored or completed, we can't really be sure,\n // so those are false.\n return workInProgressRootExitStatus === RootIncomplete;\n}\n\nfunction renderRootSync(root, lanes) {\n var prevExecutionContext = executionContext;\n executionContext |= RenderContext;\n var prevDispatcher = pushDispatcher(); // If the root or lanes have changed, throw out the existing stack\n // and prepare a fresh one. Otherwise we'll continue where we left off.\n\n if (workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes) {\n prepareFreshStack(root, lanes);\n startWorkOnPendingInteractions(root, lanes);\n }\n\n var prevInteractions = pushInteractions(root);\n\n do {\n try {\n workLoopSync();\n break;\n } catch (thrownValue) {\n handleError(root, thrownValue);\n }\n } while (true);\n\n resetContextDependencies();\n\n {\n popInteractions(prevInteractions);\n }\n\n executionContext = prevExecutionContext;\n popDispatcher(prevDispatcher);\n\n if (workInProgress !== null) {\n // This is a sync render, so we should have finished the whole tree.\n {\n {\n throw Error( \"Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n }\n\n\n workInProgressRoot = null;\n workInProgressRootRenderLanes = NoLanes;\n return workInProgressRootExitStatus;\n} // The work loop is an extremely hot path. Tell Closure not to inline it.\n\n/** @noinline */\n\n\nfunction workLoopSync() {\n // Already timed out, so perform work without checking if we need to yield.\n while (workInProgress !== null) {\n performUnitOfWork(workInProgress);\n }\n}\n\nfunction renderRootConcurrent(root, lanes) {\n var prevExecutionContext = executionContext;\n executionContext |= RenderContext;\n var prevDispatcher = pushDispatcher(); // If the root or lanes have changed, throw out the existing stack\n // and prepare a fresh one. Otherwise we'll continue where we left off.\n\n if (workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes) {\n resetRenderTimer();\n prepareFreshStack(root, lanes);\n startWorkOnPendingInteractions(root, lanes);\n }\n\n var prevInteractions = pushInteractions(root);\n\n do {\n try {\n workLoopConcurrent();\n break;\n } catch (thrownValue) {\n handleError(root, thrownValue);\n }\n } while (true);\n\n resetContextDependencies();\n\n {\n popInteractions(prevInteractions);\n }\n\n popDispatcher(prevDispatcher);\n executionContext = prevExecutionContext;\n\n\n if (workInProgress !== null) {\n\n return RootIncomplete;\n } else {\n\n\n workInProgressRoot = null;\n workInProgressRootRenderLanes = NoLanes; // Return the final exit status.\n\n return workInProgressRootExitStatus;\n }\n}\n/** @noinline */\n\n\nfunction workLoopConcurrent() {\n // Perform work until Scheduler asks us to yield\n while (workInProgress !== null && !shouldYield()) {\n performUnitOfWork(workInProgress);\n }\n}\n\nfunction performUnitOfWork(unitOfWork) {\n // The current, flushed, state of this fiber is the alternate. Ideally\n // nothing should rely on this, but relying on it here means that we don't\n // need an additional field on the work in progress.\n var current = unitOfWork.alternate;\n setCurrentFiber(unitOfWork);\n var next;\n\n if ( (unitOfWork.mode & ProfileMode) !== NoMode) {\n startProfilerTimer(unitOfWork);\n next = beginWork$1(current, unitOfWork, subtreeRenderLanes);\n stopProfilerTimerIfRunningAndRecordDelta(unitOfWork, true);\n } else {\n next = beginWork$1(current, unitOfWork, subtreeRenderLanes);\n }\n\n resetCurrentFiber();\n unitOfWork.memoizedProps = unitOfWork.pendingProps;\n\n if (next === null) {\n // If this doesn't spawn new work, complete the current work.\n completeUnitOfWork(unitOfWork);\n } else {\n workInProgress = next;\n }\n\n ReactCurrentOwner$2.current = null;\n}\n\nfunction completeUnitOfWork(unitOfWork) {\n // Attempt to complete the current unit of work, then move to the next\n // sibling. If there are no more siblings, return to the parent fiber.\n var completedWork = unitOfWork;\n\n do {\n // The current, flushed, state of this fiber is the alternate. Ideally\n // nothing should rely on this, but relying on it here means that we don't\n // need an additional field on the work in progress.\n var current = completedWork.alternate;\n var returnFiber = completedWork.return; // Check if the work completed or if something threw.\n\n if ((completedWork.flags & Incomplete) === NoFlags) {\n setCurrentFiber(completedWork);\n var next = void 0;\n\n if ( (completedWork.mode & ProfileMode) === NoMode) {\n next = completeWork(current, completedWork, subtreeRenderLanes);\n } else {\n startProfilerTimer(completedWork);\n next = completeWork(current, completedWork, subtreeRenderLanes); // Update render duration assuming we didn't error.\n\n stopProfilerTimerIfRunningAndRecordDelta(completedWork, false);\n }\n\n resetCurrentFiber();\n\n if (next !== null) {\n // Completing this fiber spawned new work. Work on that next.\n workInProgress = next;\n return;\n }\n\n resetChildLanes(completedWork);\n\n if (returnFiber !== null && // Do not append effects to parents if a sibling failed to complete\n (returnFiber.flags & Incomplete) === NoFlags) {\n // Append all the effects of the subtree and this fiber onto the effect\n // list of the parent. The completion order of the children affects the\n // side-effect order.\n if (returnFiber.firstEffect === null) {\n returnFiber.firstEffect = completedWork.firstEffect;\n }\n\n if (completedWork.lastEffect !== null) {\n if (returnFiber.lastEffect !== null) {\n returnFiber.lastEffect.nextEffect = completedWork.firstEffect;\n }\n\n returnFiber.lastEffect = completedWork.lastEffect;\n } // If this fiber had side-effects, we append it AFTER the children's\n // side-effects. We can perform certain side-effects earlier if needed,\n // by doing multiple passes over the effect list. We don't want to\n // schedule our own side-effect on our own list because if end up\n // reusing children we'll schedule this effect onto itself since we're\n // at the end.\n\n\n var flags = completedWork.flags; // Skip both NoWork and PerformedWork tags when creating the effect\n // list. PerformedWork effect is read by React DevTools but shouldn't be\n // committed.\n\n if (flags > PerformedWork) {\n if (returnFiber.lastEffect !== null) {\n returnFiber.lastEffect.nextEffect = completedWork;\n } else {\n returnFiber.firstEffect = completedWork;\n }\n\n returnFiber.lastEffect = completedWork;\n }\n }\n } else {\n // This fiber did not complete because something threw. Pop values off\n // the stack without entering the complete phase. If this is a boundary,\n // capture values if possible.\n var _next = unwindWork(completedWork); // Because this fiber did not complete, don't reset its expiration time.\n\n\n if (_next !== null) {\n // If completing this work spawned new work, do that next. We'll come\n // back here again.\n // Since we're restarting, remove anything that is not a host effect\n // from the effect tag.\n _next.flags &= HostEffectMask;\n workInProgress = _next;\n return;\n }\n\n if ( (completedWork.mode & ProfileMode) !== NoMode) {\n // Record the render duration for the fiber that errored.\n stopProfilerTimerIfRunningAndRecordDelta(completedWork, false); // Include the time spent working on failed children before continuing.\n\n var actualDuration = completedWork.actualDuration;\n var child = completedWork.child;\n\n while (child !== null) {\n actualDuration += child.actualDuration;\n child = child.sibling;\n }\n\n completedWork.actualDuration = actualDuration;\n }\n\n if (returnFiber !== null) {\n // Mark the parent fiber as incomplete and clear its effect list.\n returnFiber.firstEffect = returnFiber.lastEffect = null;\n returnFiber.flags |= Incomplete;\n }\n }\n\n var siblingFiber = completedWork.sibling;\n\n if (siblingFiber !== null) {\n // If there is more work to do in this returnFiber, do that next.\n workInProgress = siblingFiber;\n return;\n } // Otherwise, return to the parent\n\n\n completedWork = returnFiber; // Update the next thing we're working on in case something throws.\n\n workInProgress = completedWork;\n } while (completedWork !== null); // We've reached the root.\n\n\n if (workInProgressRootExitStatus === RootIncomplete) {\n workInProgressRootExitStatus = RootCompleted;\n }\n}\n\nfunction resetChildLanes(completedWork) {\n if ( // TODO: Move this check out of the hot path by moving `resetChildLanes`\n // to switch statement in `completeWork`.\n (completedWork.tag === LegacyHiddenComponent || completedWork.tag === OffscreenComponent) && completedWork.memoizedState !== null && !includesSomeLane(subtreeRenderLanes, OffscreenLane) && (completedWork.mode & ConcurrentMode) !== NoLanes) {\n // The children of this component are hidden. Don't bubble their\n // expiration times.\n return;\n }\n\n var newChildLanes = NoLanes; // Bubble up the earliest expiration time.\n\n if ( (completedWork.mode & ProfileMode) !== NoMode) {\n // In profiling mode, resetChildExpirationTime is also used to reset\n // profiler durations.\n var actualDuration = completedWork.actualDuration;\n var treeBaseDuration = completedWork.selfBaseDuration; // When a fiber is cloned, its actualDuration is reset to 0. This value will\n // only be updated if work is done on the fiber (i.e. it doesn't bailout).\n // When work is done, it should bubble to the parent's actualDuration. If\n // the fiber has not been cloned though, (meaning no work was done), then\n // this value will reflect the amount of time spent working on a previous\n // render. In that case it should not bubble. We determine whether it was\n // cloned by comparing the child pointer.\n\n var shouldBubbleActualDurations = completedWork.alternate === null || completedWork.child !== completedWork.alternate.child;\n var child = completedWork.child;\n\n while (child !== null) {\n newChildLanes = mergeLanes(newChildLanes, mergeLanes(child.lanes, child.childLanes));\n\n if (shouldBubbleActualDurations) {\n actualDuration += child.actualDuration;\n }\n\n treeBaseDuration += child.treeBaseDuration;\n child = child.sibling;\n }\n\n var isTimedOutSuspense = completedWork.tag === SuspenseComponent && completedWork.memoizedState !== null;\n\n if (isTimedOutSuspense) {\n // Don't count time spent in a timed out Suspense subtree as part of the base duration.\n var primaryChildFragment = completedWork.child;\n\n if (primaryChildFragment !== null) {\n treeBaseDuration -= primaryChildFragment.treeBaseDuration;\n }\n }\n\n completedWork.actualDuration = actualDuration;\n completedWork.treeBaseDuration = treeBaseDuration;\n } else {\n var _child = completedWork.child;\n\n while (_child !== null) {\n newChildLanes = mergeLanes(newChildLanes, mergeLanes(_child.lanes, _child.childLanes));\n _child = _child.sibling;\n }\n }\n\n completedWork.childLanes = newChildLanes;\n}\n\nfunction commitRoot(root) {\n var renderPriorityLevel = getCurrentPriorityLevel();\n runWithPriority$1(ImmediatePriority$1, commitRootImpl.bind(null, root, renderPriorityLevel));\n return null;\n}\n\nfunction commitRootImpl(root, renderPriorityLevel) {\n do {\n // `flushPassiveEffects` will call `flushSyncUpdateQueue` at the end, which\n // means `flushPassiveEffects` will sometimes result in additional\n // passive effects. So we need to keep flushing in a loop until there are\n // no more pending effects.\n // TODO: Might be better if `flushPassiveEffects` did not automatically\n // flush synchronous work at the end, to avoid factoring hazards like this.\n flushPassiveEffects();\n } while (rootWithPendingPassiveEffects !== null);\n\n flushRenderPhaseStrictModeWarningsInDEV();\n\n if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) {\n {\n throw Error( \"Should not already be working.\" );\n }\n }\n\n var finishedWork = root.finishedWork;\n var lanes = root.finishedLanes;\n\n if (finishedWork === null) {\n\n return null;\n }\n\n root.finishedWork = null;\n root.finishedLanes = NoLanes;\n\n if (!(finishedWork !== root.current)) {\n {\n throw Error( \"Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n } // commitRoot never returns a continuation; it always finishes synchronously.\n // So we can clear these now to allow a new callback to be scheduled.\n\n\n root.callbackNode = null; // Update the first and last pending times on this root. The new first\n // pending time is whatever is left on the root fiber.\n\n var remainingLanes = mergeLanes(finishedWork.lanes, finishedWork.childLanes);\n markRootFinished(root, remainingLanes); // Clear already finished discrete updates in case that a later call of\n // `flushDiscreteUpdates` starts a useless render pass which may cancels\n // a scheduled timeout.\n\n if (rootsWithPendingDiscreteUpdates !== null) {\n if (!hasDiscreteLanes(remainingLanes) && rootsWithPendingDiscreteUpdates.has(root)) {\n rootsWithPendingDiscreteUpdates.delete(root);\n }\n }\n\n if (root === workInProgressRoot) {\n // We can reset these now that they are finished.\n workInProgressRoot = null;\n workInProgress = null;\n workInProgressRootRenderLanes = NoLanes;\n } // Get the list of effects.\n\n\n var firstEffect;\n\n if (finishedWork.flags > PerformedWork) {\n // A fiber's effect list consists only of its children, not itself. So if\n // the root has an effect, we need to add it to the end of the list. The\n // resulting list is the set that would belong to the root's parent, if it\n // had one; that is, all the effects in the tree including the root.\n if (finishedWork.lastEffect !== null) {\n finishedWork.lastEffect.nextEffect = finishedWork;\n firstEffect = finishedWork.firstEffect;\n } else {\n firstEffect = finishedWork;\n }\n } else {\n // There is no effect on the root.\n firstEffect = finishedWork.firstEffect;\n }\n\n if (firstEffect !== null) {\n\n var prevExecutionContext = executionContext;\n executionContext |= CommitContext;\n var prevInteractions = pushInteractions(root); // Reset this to null before calling lifecycles\n\n ReactCurrentOwner$2.current = null; // The commit phase is broken into several sub-phases. We do a separate pass\n // of the effect list for each phase: all mutation effects come before all\n // layout effects, and so on.\n // The first phase a \"before mutation\" phase. We use this phase to read the\n // state of the host tree right before we mutate it. This is where\n // getSnapshotBeforeUpdate is called.\n\n focusedInstanceHandle = prepareForCommit(root.containerInfo);\n shouldFireAfterActiveInstanceBlur = false;\n nextEffect = firstEffect;\n\n do {\n {\n invokeGuardedCallback(null, commitBeforeMutationEffects, null);\n\n if (hasCaughtError()) {\n if (!(nextEffect !== null)) {\n {\n throw Error( \"Should be working on an effect.\" );\n }\n }\n\n var error = clearCaughtError();\n captureCommitPhaseError(nextEffect, error);\n nextEffect = nextEffect.nextEffect;\n }\n }\n } while (nextEffect !== null); // We no longer need to track the active instance fiber\n\n\n focusedInstanceHandle = null;\n\n {\n // Mark the current commit time to be shared by all Profilers in this\n // batch. This enables them to be grouped later.\n recordCommitTime();\n } // The next phase is the mutation phase, where we mutate the host tree.\n\n\n nextEffect = firstEffect;\n\n do {\n {\n invokeGuardedCallback(null, commitMutationEffects, null, root, renderPriorityLevel);\n\n if (hasCaughtError()) {\n if (!(nextEffect !== null)) {\n {\n throw Error( \"Should be working on an effect.\" );\n }\n }\n\n var _error = clearCaughtError();\n\n captureCommitPhaseError(nextEffect, _error);\n nextEffect = nextEffect.nextEffect;\n }\n }\n } while (nextEffect !== null);\n\n resetAfterCommit(root.containerInfo); // The work-in-progress tree is now the current tree. This must come after\n // the mutation phase, so that the previous tree is still current during\n // componentWillUnmount, but before the layout phase, so that the finished\n // work is current during componentDidMount/Update.\n\n root.current = finishedWork; // The next phase is the layout phase, where we call effects that read\n // the host tree after it's been mutated. The idiomatic use case for this is\n // layout, but class component lifecycles also fire here for legacy reasons.\n\n nextEffect = firstEffect;\n\n do {\n {\n invokeGuardedCallback(null, commitLayoutEffects, null, root, lanes);\n\n if (hasCaughtError()) {\n if (!(nextEffect !== null)) {\n {\n throw Error( \"Should be working on an effect.\" );\n }\n }\n\n var _error2 = clearCaughtError();\n\n captureCommitPhaseError(nextEffect, _error2);\n nextEffect = nextEffect.nextEffect;\n }\n }\n } while (nextEffect !== null);\n\n nextEffect = null; // Tell Scheduler to yield at the end of the frame, so the browser has an\n // opportunity to paint.\n\n requestPaint();\n\n {\n popInteractions(prevInteractions);\n }\n\n executionContext = prevExecutionContext;\n } else {\n // No effects.\n root.current = finishedWork; // Measure these anyway so the flamegraph explicitly shows that there were\n // no effects.\n // TODO: Maybe there's a better way to report this.\n\n {\n recordCommitTime();\n }\n }\n\n var rootDidHavePassiveEffects = rootDoesHavePassiveEffects;\n\n if (rootDoesHavePassiveEffects) {\n // This commit has passive effects. Stash a reference to them. But don't\n // schedule a callback until after flushing layout work.\n rootDoesHavePassiveEffects = false;\n rootWithPendingPassiveEffects = root;\n pendingPassiveEffectsLanes = lanes;\n pendingPassiveEffectsRenderPriority = renderPriorityLevel;\n } else {\n // We are done with the effect chain at this point so let's clear the\n // nextEffect pointers to assist with GC. If we have passive effects, we'll\n // clear this in flushPassiveEffects.\n nextEffect = firstEffect;\n\n while (nextEffect !== null) {\n var nextNextEffect = nextEffect.nextEffect;\n nextEffect.nextEffect = null;\n\n if (nextEffect.flags & Deletion) {\n detachFiberAfterEffects(nextEffect);\n }\n\n nextEffect = nextNextEffect;\n }\n } // Read this again, since an effect might have updated it\n\n\n remainingLanes = root.pendingLanes; // Check if there's remaining work on this root\n\n if (remainingLanes !== NoLanes) {\n {\n if (spawnedWorkDuringRender !== null) {\n var expirationTimes = spawnedWorkDuringRender;\n spawnedWorkDuringRender = null;\n\n for (var i = 0; i < expirationTimes.length; i++) {\n scheduleInteractions(root, expirationTimes[i], root.memoizedInteractions);\n }\n }\n\n schedulePendingInteractions(root, remainingLanes);\n }\n } else {\n // If there's no remaining work, we can clear the set of already failed\n // error boundaries.\n legacyErrorBoundariesThatAlreadyFailed = null;\n }\n\n {\n if (!rootDidHavePassiveEffects) {\n // If there are no passive effects, then we can complete the pending interactions.\n // Otherwise, we'll wait until after the passive effects are flushed.\n // Wait to do this until after remaining work has been scheduled,\n // so that we don't prematurely signal complete for interactions when there's e.g. hidden work.\n finishPendingInteractions(root, lanes);\n }\n }\n\n if (remainingLanes === SyncLane) {\n // Count the number of times the root synchronously re-renders without\n // finishing. If there are too many, it indicates an infinite update loop.\n if (root === rootWithNestedUpdates) {\n nestedUpdateCount++;\n } else {\n nestedUpdateCount = 0;\n rootWithNestedUpdates = root;\n }\n } else {\n nestedUpdateCount = 0;\n }\n\n onCommitRoot(finishedWork.stateNode, renderPriorityLevel);\n\n {\n onCommitRoot$1();\n } // Always call this before exiting `commitRoot`, to ensure that any\n // additional work on this root is scheduled.\n\n\n ensureRootIsScheduled(root, now());\n\n if (hasUncaughtError) {\n hasUncaughtError = false;\n var _error3 = firstUncaughtError;\n firstUncaughtError = null;\n throw _error3;\n }\n\n if ((executionContext & LegacyUnbatchedContext) !== NoContext) {\n // a ReactDOM.render-ed root inside of batchedUpdates. The commit fired\n // synchronously, but layout updates should be deferred until the end\n // of the batch.\n\n\n return null;\n } // If layout work was scheduled, flush it now.\n\n\n flushSyncCallbackQueue();\n\n return null;\n}\n\nfunction commitBeforeMutationEffects() {\n while (nextEffect !== null) {\n var current = nextEffect.alternate;\n\n if (!shouldFireAfterActiveInstanceBlur && focusedInstanceHandle !== null) {\n if ((nextEffect.flags & Deletion) !== NoFlags) {\n if (doesFiberContain(nextEffect, focusedInstanceHandle)) {\n shouldFireAfterActiveInstanceBlur = true;\n }\n } else {\n // TODO: Move this out of the hot path using a dedicated effect tag.\n if (nextEffect.tag === SuspenseComponent && isSuspenseBoundaryBeingHidden(current, nextEffect) && doesFiberContain(nextEffect, focusedInstanceHandle)) {\n shouldFireAfterActiveInstanceBlur = true;\n }\n }\n }\n\n var flags = nextEffect.flags;\n\n if ((flags & Snapshot) !== NoFlags) {\n setCurrentFiber(nextEffect);\n commitBeforeMutationLifeCycles(current, nextEffect);\n resetCurrentFiber();\n }\n\n if ((flags & Passive) !== NoFlags) {\n // If there are passive effects, schedule a callback to flush at\n // the earliest opportunity.\n if (!rootDoesHavePassiveEffects) {\n rootDoesHavePassiveEffects = true;\n scheduleCallback(NormalPriority$1, function () {\n flushPassiveEffects();\n return null;\n });\n }\n }\n\n nextEffect = nextEffect.nextEffect;\n }\n}\n\nfunction commitMutationEffects(root, renderPriorityLevel) {\n // TODO: Should probably move the bulk of this function to commitWork.\n while (nextEffect !== null) {\n setCurrentFiber(nextEffect);\n var flags = nextEffect.flags;\n\n if (flags & ContentReset) {\n commitResetTextContent(nextEffect);\n }\n\n if (flags & Ref) {\n var current = nextEffect.alternate;\n\n if (current !== null) {\n commitDetachRef(current);\n }\n } // The following switch statement is only concerned about placement,\n // updates, and deletions. To avoid needing to add a case for every possible\n // bitmap value, we remove the secondary effects from the effect tag and\n // switch on that value.\n\n\n var primaryFlags = flags & (Placement | Update | Deletion | Hydrating);\n\n switch (primaryFlags) {\n case Placement:\n {\n commitPlacement(nextEffect); // Clear the \"placement\" from effect tag so that we know that this is\n // inserted, before any life-cycles like componentDidMount gets called.\n // TODO: findDOMNode doesn't rely on this any more but isMounted does\n // and isMounted is deprecated anyway so we should be able to kill this.\n\n nextEffect.flags &= ~Placement;\n break;\n }\n\n case PlacementAndUpdate:\n {\n // Placement\n commitPlacement(nextEffect); // Clear the \"placement\" from effect tag so that we know that this is\n // inserted, before any life-cycles like componentDidMount gets called.\n\n nextEffect.flags &= ~Placement; // Update\n\n var _current = nextEffect.alternate;\n commitWork(_current, nextEffect);\n break;\n }\n\n case Hydrating:\n {\n nextEffect.flags &= ~Hydrating;\n break;\n }\n\n case HydratingAndUpdate:\n {\n nextEffect.flags &= ~Hydrating; // Update\n\n var _current2 = nextEffect.alternate;\n commitWork(_current2, nextEffect);\n break;\n }\n\n case Update:\n {\n var _current3 = nextEffect.alternate;\n commitWork(_current3, nextEffect);\n break;\n }\n\n case Deletion:\n {\n commitDeletion(root, nextEffect);\n break;\n }\n }\n\n resetCurrentFiber();\n nextEffect = nextEffect.nextEffect;\n }\n}\n\nfunction commitLayoutEffects(root, committedLanes) {\n\n\n while (nextEffect !== null) {\n setCurrentFiber(nextEffect);\n var flags = nextEffect.flags;\n\n if (flags & (Update | Callback)) {\n var current = nextEffect.alternate;\n commitLifeCycles(root, current, nextEffect);\n }\n\n {\n if (flags & Ref) {\n commitAttachRef(nextEffect);\n }\n }\n\n resetCurrentFiber();\n nextEffect = nextEffect.nextEffect;\n }\n}\n\nfunction flushPassiveEffects() {\n // Returns whether passive effects were flushed.\n if (pendingPassiveEffectsRenderPriority !== NoPriority$1) {\n var priorityLevel = pendingPassiveEffectsRenderPriority > NormalPriority$1 ? NormalPriority$1 : pendingPassiveEffectsRenderPriority;\n pendingPassiveEffectsRenderPriority = NoPriority$1;\n\n {\n return runWithPriority$1(priorityLevel, flushPassiveEffectsImpl);\n }\n }\n\n return false;\n}\nfunction enqueuePendingPassiveHookEffectMount(fiber, effect) {\n pendingPassiveHookEffectsMount.push(effect, fiber);\n\n if (!rootDoesHavePassiveEffects) {\n rootDoesHavePassiveEffects = true;\n scheduleCallback(NormalPriority$1, function () {\n flushPassiveEffects();\n return null;\n });\n }\n}\nfunction enqueuePendingPassiveHookEffectUnmount(fiber, effect) {\n pendingPassiveHookEffectsUnmount.push(effect, fiber);\n\n {\n fiber.flags |= PassiveUnmountPendingDev;\n var alternate = fiber.alternate;\n\n if (alternate !== null) {\n alternate.flags |= PassiveUnmountPendingDev;\n }\n }\n\n if (!rootDoesHavePassiveEffects) {\n rootDoesHavePassiveEffects = true;\n scheduleCallback(NormalPriority$1, function () {\n flushPassiveEffects();\n return null;\n });\n }\n}\n\nfunction invokePassiveEffectCreate(effect) {\n var create = effect.create;\n effect.destroy = create();\n}\n\nfunction flushPassiveEffectsImpl() {\n if (rootWithPendingPassiveEffects === null) {\n return false;\n }\n\n var root = rootWithPendingPassiveEffects;\n var lanes = pendingPassiveEffectsLanes;\n rootWithPendingPassiveEffects = null;\n pendingPassiveEffectsLanes = NoLanes;\n\n if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) {\n {\n throw Error( \"Cannot flush passive effects while already rendering.\" );\n }\n }\n\n {\n isFlushingPassiveEffects = true;\n }\n\n var prevExecutionContext = executionContext;\n executionContext |= CommitContext;\n var prevInteractions = pushInteractions(root); // It's important that ALL pending passive effect destroy functions are called\n // before ANY passive effect create functions are called.\n // Otherwise effects in sibling components might interfere with each other.\n // e.g. a destroy function in one component may unintentionally override a ref\n // value set by a create function in another component.\n // Layout effects have the same constraint.\n // First pass: Destroy stale passive effects.\n\n var unmountEffects = pendingPassiveHookEffectsUnmount;\n pendingPassiveHookEffectsUnmount = [];\n\n for (var i = 0; i < unmountEffects.length; i += 2) {\n var _effect = unmountEffects[i];\n var fiber = unmountEffects[i + 1];\n var destroy = _effect.destroy;\n _effect.destroy = undefined;\n\n {\n fiber.flags &= ~PassiveUnmountPendingDev;\n var alternate = fiber.alternate;\n\n if (alternate !== null) {\n alternate.flags &= ~PassiveUnmountPendingDev;\n }\n }\n\n if (typeof destroy === 'function') {\n {\n setCurrentFiber(fiber);\n\n {\n invokeGuardedCallback(null, destroy, null);\n }\n\n if (hasCaughtError()) {\n if (!(fiber !== null)) {\n {\n throw Error( \"Should be working on an effect.\" );\n }\n }\n\n var error = clearCaughtError();\n captureCommitPhaseError(fiber, error);\n }\n\n resetCurrentFiber();\n }\n }\n } // Second pass: Create new passive effects.\n\n\n var mountEffects = pendingPassiveHookEffectsMount;\n pendingPassiveHookEffectsMount = [];\n\n for (var _i = 0; _i < mountEffects.length; _i += 2) {\n var _effect2 = mountEffects[_i];\n var _fiber = mountEffects[_i + 1];\n\n {\n setCurrentFiber(_fiber);\n\n {\n invokeGuardedCallback(null, invokePassiveEffectCreate, null, _effect2);\n }\n\n if (hasCaughtError()) {\n if (!(_fiber !== null)) {\n {\n throw Error( \"Should be working on an effect.\" );\n }\n }\n\n var _error4 = clearCaughtError();\n\n captureCommitPhaseError(_fiber, _error4);\n }\n\n resetCurrentFiber();\n }\n } // Note: This currently assumes there are no passive effects on the root fiber\n // because the root is not part of its own effect list.\n // This could change in the future.\n\n\n var effect = root.current.firstEffect;\n\n while (effect !== null) {\n var nextNextEffect = effect.nextEffect; // Remove nextEffect pointer to assist GC\n\n effect.nextEffect = null;\n\n if (effect.flags & Deletion) {\n detachFiberAfterEffects(effect);\n }\n\n effect = nextNextEffect;\n }\n\n {\n popInteractions(prevInteractions);\n finishPendingInteractions(root, lanes);\n }\n\n {\n isFlushingPassiveEffects = false;\n }\n\n executionContext = prevExecutionContext;\n flushSyncCallbackQueue(); // If additional passive effects were scheduled, increment a counter. If this\n // exceeds the limit, we'll fire a warning.\n\n nestedPassiveUpdateCount = rootWithPendingPassiveEffects === null ? 0 : nestedPassiveUpdateCount + 1;\n return true;\n}\n\nfunction isAlreadyFailedLegacyErrorBoundary(instance) {\n return legacyErrorBoundariesThatAlreadyFailed !== null && legacyErrorBoundariesThatAlreadyFailed.has(instance);\n}\nfunction markLegacyErrorBoundaryAsFailed(instance) {\n if (legacyErrorBoundariesThatAlreadyFailed === null) {\n legacyErrorBoundariesThatAlreadyFailed = new Set([instance]);\n } else {\n legacyErrorBoundariesThatAlreadyFailed.add(instance);\n }\n}\n\nfunction prepareToThrowUncaughtError(error) {\n if (!hasUncaughtError) {\n hasUncaughtError = true;\n firstUncaughtError = error;\n }\n}\n\nvar onUncaughtError = prepareToThrowUncaughtError;\n\nfunction captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error) {\n var errorInfo = createCapturedValue(error, sourceFiber);\n var update = createRootErrorUpdate(rootFiber, errorInfo, SyncLane);\n enqueueUpdate(rootFiber, update);\n var eventTime = requestEventTime();\n var root = markUpdateLaneFromFiberToRoot(rootFiber, SyncLane);\n\n if (root !== null) {\n markRootUpdated(root, SyncLane, eventTime);\n ensureRootIsScheduled(root, eventTime);\n schedulePendingInteractions(root, SyncLane);\n }\n}\n\nfunction captureCommitPhaseError(sourceFiber, error) {\n if (sourceFiber.tag === HostRoot) {\n // Error was thrown at the root. There is no parent, so the root\n // itself should capture it.\n captureCommitPhaseErrorOnRoot(sourceFiber, sourceFiber, error);\n return;\n }\n\n var fiber = sourceFiber.return;\n\n while (fiber !== null) {\n if (fiber.tag === HostRoot) {\n captureCommitPhaseErrorOnRoot(fiber, sourceFiber, error);\n return;\n } else if (fiber.tag === ClassComponent) {\n var ctor = fiber.type;\n var instance = fiber.stateNode;\n\n if (typeof ctor.getDerivedStateFromError === 'function' || typeof instance.componentDidCatch === 'function' && !isAlreadyFailedLegacyErrorBoundary(instance)) {\n var errorInfo = createCapturedValue(error, sourceFiber);\n var update = createClassErrorUpdate(fiber, errorInfo, SyncLane);\n enqueueUpdate(fiber, update);\n var eventTime = requestEventTime();\n var root = markUpdateLaneFromFiberToRoot(fiber, SyncLane);\n\n if (root !== null) {\n markRootUpdated(root, SyncLane, eventTime);\n ensureRootIsScheduled(root, eventTime);\n schedulePendingInteractions(root, SyncLane);\n } else {\n // This component has already been unmounted.\n // We can't schedule any follow up work for the root because the fiber is already unmounted,\n // but we can still call the log-only boundary so the error isn't swallowed.\n //\n // TODO This is only a temporary bandaid for the old reconciler fork.\n // We can delete this special case once the new fork is merged.\n if (typeof instance.componentDidCatch === 'function' && !isAlreadyFailedLegacyErrorBoundary(instance)) {\n try {\n instance.componentDidCatch(error, errorInfo);\n } catch (errorToIgnore) {// TODO Ignore this error? Rethrow it?\n // This is kind of an edge case.\n }\n }\n }\n\n return;\n }\n }\n\n fiber = fiber.return;\n }\n}\nfunction pingSuspendedRoot(root, wakeable, pingedLanes) {\n var pingCache = root.pingCache;\n\n if (pingCache !== null) {\n // The wakeable resolved, so we no longer need to memoize, because it will\n // never be thrown again.\n pingCache.delete(wakeable);\n }\n\n var eventTime = requestEventTime();\n markRootPinged(root, pingedLanes);\n\n if (workInProgressRoot === root && isSubsetOfLanes(workInProgressRootRenderLanes, pingedLanes)) {\n // Received a ping at the same priority level at which we're currently\n // rendering. We might want to restart this render. This should mirror\n // the logic of whether or not a root suspends once it completes.\n // TODO: If we're rendering sync either due to Sync, Batched or expired,\n // we should probably never restart.\n // If we're suspended with delay, or if it's a retry, we'll always suspend\n // so we can always restart.\n if (workInProgressRootExitStatus === RootSuspendedWithDelay || workInProgressRootExitStatus === RootSuspended && includesOnlyRetries(workInProgressRootRenderLanes) && now() - globalMostRecentFallbackTime < FALLBACK_THROTTLE_MS) {\n // Restart from the root.\n prepareFreshStack(root, NoLanes);\n } else {\n // Even though we can't restart right now, we might get an\n // opportunity later. So we mark this render as having a ping.\n workInProgressRootPingedLanes = mergeLanes(workInProgressRootPingedLanes, pingedLanes);\n }\n }\n\n ensureRootIsScheduled(root, eventTime);\n schedulePendingInteractions(root, pingedLanes);\n}\n\nfunction retryTimedOutBoundary(boundaryFiber, retryLane) {\n // The boundary fiber (a Suspense component or SuspenseList component)\n // previously was rendered in its fallback state. One of the promises that\n // suspended it has resolved, which means at least part of the tree was\n // likely unblocked. Try rendering again, at a new expiration time.\n if (retryLane === NoLane) {\n retryLane = requestRetryLane(boundaryFiber);\n } // TODO: Special case idle priority?\n\n\n var eventTime = requestEventTime();\n var root = markUpdateLaneFromFiberToRoot(boundaryFiber, retryLane);\n\n if (root !== null) {\n markRootUpdated(root, retryLane, eventTime);\n ensureRootIsScheduled(root, eventTime);\n schedulePendingInteractions(root, retryLane);\n }\n}\nfunction resolveRetryWakeable(boundaryFiber, wakeable) {\n var retryLane = NoLane; // Default\n\n var retryCache;\n\n {\n retryCache = boundaryFiber.stateNode;\n }\n\n if (retryCache !== null) {\n // The wakeable resolved, so we no longer need to memoize, because it will\n // never be thrown again.\n retryCache.delete(wakeable);\n }\n\n retryTimedOutBoundary(boundaryFiber, retryLane);\n} // Computes the next Just Noticeable Difference (JND) boundary.\n// The theory is that a person can't tell the difference between small differences in time.\n// Therefore, if we wait a bit longer than necessary that won't translate to a noticeable\n// difference in the experience. However, waiting for longer might mean that we can avoid\n// showing an intermediate loading state. The longer we have already waited, the harder it\n// is to tell small differences in time. Therefore, the longer we've already waited,\n// the longer we can wait additionally. At some point we have to give up though.\n// We pick a train model where the next boundary commits at a consistent schedule.\n// These particular numbers are vague estimates. We expect to adjust them based on research.\n\nfunction jnd(timeElapsed) {\n return timeElapsed < 120 ? 120 : timeElapsed < 480 ? 480 : timeElapsed < 1080 ? 1080 : timeElapsed < 1920 ? 1920 : timeElapsed < 3000 ? 3000 : timeElapsed < 4320 ? 4320 : ceil(timeElapsed / 1960) * 1960;\n}\n\nfunction checkForNestedUpdates() {\n if (nestedUpdateCount > NESTED_UPDATE_LIMIT) {\n nestedUpdateCount = 0;\n rootWithNestedUpdates = null;\n\n {\n {\n throw Error( \"Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.\" );\n }\n }\n }\n\n {\n if (nestedPassiveUpdateCount > NESTED_PASSIVE_UPDATE_LIMIT) {\n nestedPassiveUpdateCount = 0;\n\n error('Maximum update depth exceeded. This can happen when a component ' + \"calls setState inside useEffect, but useEffect either doesn't \" + 'have a dependency array, or one of the dependencies changes on ' + 'every render.');\n }\n }\n}\n\nfunction flushRenderPhaseStrictModeWarningsInDEV() {\n {\n ReactStrictModeWarnings.flushLegacyContextWarning();\n\n {\n ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings();\n }\n }\n}\n\nvar didWarnStateUpdateForNotYetMountedComponent = null;\n\nfunction warnAboutUpdateOnNotYetMountedFiberInDEV(fiber) {\n {\n if ((executionContext & RenderContext) !== NoContext) {\n // We let the other warning about render phase updates deal with this one.\n return;\n }\n\n if (!(fiber.mode & (BlockingMode | ConcurrentMode))) {\n return;\n }\n\n var tag = fiber.tag;\n\n if (tag !== IndeterminateComponent && tag !== HostRoot && tag !== ClassComponent && tag !== FunctionComponent && tag !== ForwardRef && tag !== MemoComponent && tag !== SimpleMemoComponent && tag !== Block) {\n // Only warn for user-defined components, not internal ones like Suspense.\n return;\n } // We show the whole stack but dedupe on the top component's name because\n // the problematic code almost always lies inside that component.\n\n\n var componentName = getComponentName(fiber.type) || 'ReactComponent';\n\n if (didWarnStateUpdateForNotYetMountedComponent !== null) {\n if (didWarnStateUpdateForNotYetMountedComponent.has(componentName)) {\n return;\n }\n\n didWarnStateUpdateForNotYetMountedComponent.add(componentName);\n } else {\n didWarnStateUpdateForNotYetMountedComponent = new Set([componentName]);\n }\n\n var previousFiber = current;\n\n try {\n setCurrentFiber(fiber);\n\n error(\"Can't perform a React state update on a component that hasn't mounted yet. \" + 'This indicates that you have a side-effect in your render function that ' + 'asynchronously later calls tries to update the component. Move this work to ' + 'useEffect instead.');\n } finally {\n if (previousFiber) {\n setCurrentFiber(fiber);\n } else {\n resetCurrentFiber();\n }\n }\n }\n}\n\nvar didWarnStateUpdateForUnmountedComponent = null;\n\nfunction warnAboutUpdateOnUnmountedFiberInDEV(fiber) {\n {\n var tag = fiber.tag;\n\n if (tag !== HostRoot && tag !== ClassComponent && tag !== FunctionComponent && tag !== ForwardRef && tag !== MemoComponent && tag !== SimpleMemoComponent && tag !== Block) {\n // Only warn for user-defined components, not internal ones like Suspense.\n return;\n } // If there are pending passive effects unmounts for this Fiber,\n // we can assume that they would have prevented this update.\n\n\n if ((fiber.flags & PassiveUnmountPendingDev) !== NoFlags) {\n return;\n } // We show the whole stack but dedupe on the top component's name because\n // the problematic code almost always lies inside that component.\n\n\n var componentName = getComponentName(fiber.type) || 'ReactComponent';\n\n if (didWarnStateUpdateForUnmountedComponent !== null) {\n if (didWarnStateUpdateForUnmountedComponent.has(componentName)) {\n return;\n }\n\n didWarnStateUpdateForUnmountedComponent.add(componentName);\n } else {\n didWarnStateUpdateForUnmountedComponent = new Set([componentName]);\n }\n\n if (isFlushingPassiveEffects) ; else {\n var previousFiber = current;\n\n try {\n setCurrentFiber(fiber);\n\n error(\"Can't perform a React state update on an unmounted component. This \" + 'is a no-op, but it indicates a memory leak in your application. To ' + 'fix, cancel all subscriptions and asynchronous tasks in %s.', tag === ClassComponent ? 'the componentWillUnmount method' : 'a useEffect cleanup function');\n } finally {\n if (previousFiber) {\n setCurrentFiber(fiber);\n } else {\n resetCurrentFiber();\n }\n }\n }\n }\n}\n\nvar beginWork$1;\n\n{\n var dummyFiber = null;\n\n beginWork$1 = function (current, unitOfWork, lanes) {\n // If a component throws an error, we replay it again in a synchronously\n // dispatched event, so that the debugger will treat it as an uncaught\n // error See ReactErrorUtils for more information.\n // Before entering the begin phase, copy the work-in-progress onto a dummy\n // fiber. If beginWork throws, we'll use this to reset the state.\n var originalWorkInProgressCopy = assignFiberPropertiesInDEV(dummyFiber, unitOfWork);\n\n try {\n return beginWork(current, unitOfWork, lanes);\n } catch (originalError) {\n if (originalError !== null && typeof originalError === 'object' && typeof originalError.then === 'function') {\n // Don't replay promises. Treat everything else like an error.\n throw originalError;\n } // Keep this code in sync with handleError; any changes here must have\n // corresponding changes there.\n\n\n resetContextDependencies();\n resetHooksAfterThrow(); // Don't reset current debug fiber, since we're about to work on the\n // same fiber again.\n // Unwind the failed stack frame\n\n unwindInterruptedWork(unitOfWork); // Restore the original properties of the fiber.\n\n assignFiberPropertiesInDEV(unitOfWork, originalWorkInProgressCopy);\n\n if ( unitOfWork.mode & ProfileMode) {\n // Reset the profiler timer.\n startProfilerTimer(unitOfWork);\n } // Run beginWork again.\n\n\n invokeGuardedCallback(null, beginWork, null, current, unitOfWork, lanes);\n\n if (hasCaughtError()) {\n var replayError = clearCaughtError(); // `invokeGuardedCallback` sometimes sets an expando `_suppressLogging`.\n // Rethrow this error instead of the original one.\n\n throw replayError;\n } else {\n // This branch is reachable if the render phase is impure.\n throw originalError;\n }\n }\n };\n}\n\nvar didWarnAboutUpdateInRender = false;\nvar didWarnAboutUpdateInRenderForAnotherComponent;\n\n{\n didWarnAboutUpdateInRenderForAnotherComponent = new Set();\n}\n\nfunction warnAboutRenderPhaseUpdatesInDEV(fiber) {\n {\n if (isRendering && (executionContext & RenderContext) !== NoContext && !getIsUpdatingOpaqueValueInRenderPhaseInDEV()) {\n switch (fiber.tag) {\n case FunctionComponent:\n case ForwardRef:\n case SimpleMemoComponent:\n {\n var renderingComponentName = workInProgress && getComponentName(workInProgress.type) || 'Unknown'; // Dedupe by the rendering component because it's the one that needs to be fixed.\n\n var dedupeKey = renderingComponentName;\n\n if (!didWarnAboutUpdateInRenderForAnotherComponent.has(dedupeKey)) {\n didWarnAboutUpdateInRenderForAnotherComponent.add(dedupeKey);\n var setStateComponentName = getComponentName(fiber.type) || 'Unknown';\n\n error('Cannot update a component (`%s`) while rendering a ' + 'different component (`%s`). To locate the bad setState() call inside `%s`, ' + 'follow the stack trace as described in https://reactjs.org/link/setstate-in-render', setStateComponentName, renderingComponentName, renderingComponentName);\n }\n\n break;\n }\n\n case ClassComponent:\n {\n if (!didWarnAboutUpdateInRender) {\n error('Cannot update during an existing state transition (such as ' + 'within `render`). Render methods should be a pure ' + 'function of props and state.');\n\n didWarnAboutUpdateInRender = true;\n }\n\n break;\n }\n }\n }\n }\n} // a 'shared' variable that changes when act() opens/closes in tests.\n\n\nvar IsThisRendererActing = {\n current: false\n};\nfunction warnIfNotScopedWithMatchingAct(fiber) {\n {\n if ( IsSomeRendererActing.current === true && IsThisRendererActing.current !== true) {\n var previousFiber = current;\n\n try {\n setCurrentFiber(fiber);\n\n error(\"It looks like you're using the wrong act() around your test interactions.\\n\" + 'Be sure to use the matching version of act() corresponding to your renderer:\\n\\n' + '// for react-dom:\\n' + // Break up imports to avoid accidentally parsing them as dependencies.\n 'import {act} fr' + \"om 'react-dom/test-utils';\\n\" + '// ...\\n' + 'act(() => ...);\\n\\n' + '// for react-test-renderer:\\n' + // Break up imports to avoid accidentally parsing them as dependencies.\n 'import TestRenderer fr' + \"om react-test-renderer';\\n\" + 'const {act} = TestRenderer;\\n' + '// ...\\n' + 'act(() => ...);');\n } finally {\n if (previousFiber) {\n setCurrentFiber(fiber);\n } else {\n resetCurrentFiber();\n }\n }\n }\n }\n}\nfunction warnIfNotCurrentlyActingEffectsInDEV(fiber) {\n {\n if ( (fiber.mode & StrictMode) !== NoMode && IsSomeRendererActing.current === false && IsThisRendererActing.current === false) {\n error('An update to %s ran an effect, but was not wrapped in act(...).\\n\\n' + 'When testing, code that causes React state updates should be ' + 'wrapped into act(...):\\n\\n' + 'act(() => {\\n' + ' /* fire events that update state */\\n' + '});\\n' + '/* assert on the output */\\n\\n' + \"This ensures that you're testing the behavior the user would see \" + 'in the browser.' + ' Learn more at https://reactjs.org/link/wrap-tests-with-act', getComponentName(fiber.type));\n }\n }\n}\n\nfunction warnIfNotCurrentlyActingUpdatesInDEV(fiber) {\n {\n if ( executionContext === NoContext && IsSomeRendererActing.current === false && IsThisRendererActing.current === false) {\n var previousFiber = current;\n\n try {\n setCurrentFiber(fiber);\n\n error('An update to %s inside a test was not wrapped in act(...).\\n\\n' + 'When testing, code that causes React state updates should be ' + 'wrapped into act(...):\\n\\n' + 'act(() => {\\n' + ' /* fire events that update state */\\n' + '});\\n' + '/* assert on the output */\\n\\n' + \"This ensures that you're testing the behavior the user would see \" + 'in the browser.' + ' Learn more at https://reactjs.org/link/wrap-tests-with-act', getComponentName(fiber.type));\n } finally {\n if (previousFiber) {\n setCurrentFiber(fiber);\n } else {\n resetCurrentFiber();\n }\n }\n }\n }\n}\n\nvar warnIfNotCurrentlyActingUpdatesInDev = warnIfNotCurrentlyActingUpdatesInDEV; // In tests, we want to enforce a mocked scheduler.\n\nvar didWarnAboutUnmockedScheduler = false; // TODO Before we release concurrent mode, revisit this and decide whether a mocked\n// scheduler is the actual recommendation. The alternative could be a testing build,\n// a new lib, or whatever; we dunno just yet. This message is for early adopters\n// to get their tests right.\n\nfunction warnIfUnmockedScheduler(fiber) {\n {\n if (didWarnAboutUnmockedScheduler === false && Scheduler.unstable_flushAllWithoutAsserting === undefined) {\n if (fiber.mode & BlockingMode || fiber.mode & ConcurrentMode) {\n didWarnAboutUnmockedScheduler = true;\n\n error('In Concurrent or Sync modes, the \"scheduler\" module needs to be mocked ' + 'to guarantee consistent behaviour across tests and browsers. ' + 'For example, with jest: \\n' + // Break up requires to avoid accidentally parsing them as dependencies.\n \"jest.mock('scheduler', () => require\" + \"('scheduler/unstable_mock'));\\n\\n\" + 'For more info, visit https://reactjs.org/link/mock-scheduler');\n }\n }\n }\n}\n\nfunction computeThreadID(root, lane) {\n // Interaction threads are unique per root and expiration time.\n // NOTE: Intentionally unsound cast. All that matters is that it's a number\n // and it represents a batch of work. Could make a helper function instead,\n // but meh this is fine for now.\n return lane * 1000 + root.interactionThreadID;\n}\n\nfunction markSpawnedWork(lane) {\n\n if (spawnedWorkDuringRender === null) {\n spawnedWorkDuringRender = [lane];\n } else {\n spawnedWorkDuringRender.push(lane);\n }\n}\n\nfunction scheduleInteractions(root, lane, interactions) {\n\n if (interactions.size > 0) {\n var pendingInteractionMap = root.pendingInteractionMap;\n var pendingInteractions = pendingInteractionMap.get(lane);\n\n if (pendingInteractions != null) {\n interactions.forEach(function (interaction) {\n if (!pendingInteractions.has(interaction)) {\n // Update the pending async work count for previously unscheduled interaction.\n interaction.__count++;\n }\n\n pendingInteractions.add(interaction);\n });\n } else {\n pendingInteractionMap.set(lane, new Set(interactions)); // Update the pending async work count for the current interactions.\n\n interactions.forEach(function (interaction) {\n interaction.__count++;\n });\n }\n\n var subscriber = tracing.__subscriberRef.current;\n\n if (subscriber !== null) {\n var threadID = computeThreadID(root, lane);\n subscriber.onWorkScheduled(interactions, threadID);\n }\n }\n}\n\nfunction schedulePendingInteractions(root, lane) {\n\n scheduleInteractions(root, lane, tracing.__interactionsRef.current);\n}\n\nfunction startWorkOnPendingInteractions(root, lanes) {\n // we can accurately attribute time spent working on it, And so that cascading\n // work triggered during the render phase will be associated with it.\n\n\n var interactions = new Set();\n root.pendingInteractionMap.forEach(function (scheduledInteractions, scheduledLane) {\n if (includesSomeLane(lanes, scheduledLane)) {\n scheduledInteractions.forEach(function (interaction) {\n return interactions.add(interaction);\n });\n }\n }); // Store the current set of interactions on the FiberRoot for a few reasons:\n // We can re-use it in hot functions like performConcurrentWorkOnRoot()\n // without having to recalculate it. We will also use it in commitWork() to\n // pass to any Profiler onRender() hooks. This also provides DevTools with a\n // way to access it when the onCommitRoot() hook is called.\n\n root.memoizedInteractions = interactions;\n\n if (interactions.size > 0) {\n var subscriber = tracing.__subscriberRef.current;\n\n if (subscriber !== null) {\n var threadID = computeThreadID(root, lanes);\n\n try {\n subscriber.onWorkStarted(interactions, threadID);\n } catch (error) {\n // If the subscriber throws, rethrow it in a separate task\n scheduleCallback(ImmediatePriority$1, function () {\n throw error;\n });\n }\n }\n }\n}\n\nfunction finishPendingInteractions(root, committedLanes) {\n\n var remainingLanesAfterCommit = root.pendingLanes;\n var subscriber;\n\n try {\n subscriber = tracing.__subscriberRef.current;\n\n if (subscriber !== null && root.memoizedInteractions.size > 0) {\n // FIXME: More than one lane can finish in a single commit.\n var threadID = computeThreadID(root, committedLanes);\n subscriber.onWorkStopped(root.memoizedInteractions, threadID);\n }\n } catch (error) {\n // If the subscriber throws, rethrow it in a separate task\n scheduleCallback(ImmediatePriority$1, function () {\n throw error;\n });\n } finally {\n // Clear completed interactions from the pending Map.\n // Unless the render was suspended or cascading work was scheduled,\n // In which case leave pending interactions until the subsequent render.\n var pendingInteractionMap = root.pendingInteractionMap;\n pendingInteractionMap.forEach(function (scheduledInteractions, lane) {\n // Only decrement the pending interaction count if we're done.\n // If there's still work at the current priority,\n // That indicates that we are waiting for suspense data.\n if (!includesSomeLane(remainingLanesAfterCommit, lane)) {\n pendingInteractionMap.delete(lane);\n scheduledInteractions.forEach(function (interaction) {\n interaction.__count--;\n\n if (subscriber !== null && interaction.__count === 0) {\n try {\n subscriber.onInteractionScheduledWorkCompleted(interaction);\n } catch (error) {\n // If the subscriber throws, rethrow it in a separate task\n scheduleCallback(ImmediatePriority$1, function () {\n throw error;\n });\n }\n }\n });\n }\n });\n }\n} // `act` testing API\n\nfunction shouldForceFlushFallbacksInDEV() {\n // Never force flush in production. This function should get stripped out.\n return actingUpdatesScopeDepth > 0;\n}\n// so we can tell if any async act() calls try to run in parallel.\n\n\nvar actingUpdatesScopeDepth = 0;\n\nfunction detachFiberAfterEffects(fiber) {\n fiber.sibling = null;\n fiber.stateNode = null;\n}\n\nvar resolveFamily = null; // $FlowFixMe Flow gets confused by a WeakSet feature check below.\n\nvar failedBoundaries = null;\nvar setRefreshHandler = function (handler) {\n {\n resolveFamily = handler;\n }\n};\nfunction resolveFunctionForHotReloading(type) {\n {\n if (resolveFamily === null) {\n // Hot reloading is disabled.\n return type;\n }\n\n var family = resolveFamily(type);\n\n if (family === undefined) {\n return type;\n } // Use the latest known implementation.\n\n\n return family.current;\n }\n}\nfunction resolveClassForHotReloading(type) {\n // No implementation differences.\n return resolveFunctionForHotReloading(type);\n}\nfunction resolveForwardRefForHotReloading(type) {\n {\n if (resolveFamily === null) {\n // Hot reloading is disabled.\n return type;\n }\n\n var family = resolveFamily(type);\n\n if (family === undefined) {\n // Check if we're dealing with a real forwardRef. Don't want to crash early.\n if (type !== null && type !== undefined && typeof type.render === 'function') {\n // ForwardRef is special because its resolved .type is an object,\n // but it's possible that we only have its inner render function in the map.\n // If that inner render function is different, we'll build a new forwardRef type.\n var currentRender = resolveFunctionForHotReloading(type.render);\n\n if (type.render !== currentRender) {\n var syntheticType = {\n $$typeof: REACT_FORWARD_REF_TYPE,\n render: currentRender\n };\n\n if (type.displayName !== undefined) {\n syntheticType.displayName = type.displayName;\n }\n\n return syntheticType;\n }\n }\n\n return type;\n } // Use the latest known implementation.\n\n\n return family.current;\n }\n}\nfunction isCompatibleFamilyForHotReloading(fiber, element) {\n {\n if (resolveFamily === null) {\n // Hot reloading is disabled.\n return false;\n }\n\n var prevType = fiber.elementType;\n var nextType = element.type; // If we got here, we know types aren't === equal.\n\n var needsCompareFamilies = false;\n var $$typeofNextType = typeof nextType === 'object' && nextType !== null ? nextType.$$typeof : null;\n\n switch (fiber.tag) {\n case ClassComponent:\n {\n if (typeof nextType === 'function') {\n needsCompareFamilies = true;\n }\n\n break;\n }\n\n case FunctionComponent:\n {\n if (typeof nextType === 'function') {\n needsCompareFamilies = true;\n } else if ($$typeofNextType === REACT_LAZY_TYPE) {\n // We don't know the inner type yet.\n // We're going to assume that the lazy inner type is stable,\n // and so it is sufficient to avoid reconciling it away.\n // We're not going to unwrap or actually use the new lazy type.\n needsCompareFamilies = true;\n }\n\n break;\n }\n\n case ForwardRef:\n {\n if ($$typeofNextType === REACT_FORWARD_REF_TYPE) {\n needsCompareFamilies = true;\n } else if ($$typeofNextType === REACT_LAZY_TYPE) {\n needsCompareFamilies = true;\n }\n\n break;\n }\n\n case MemoComponent:\n case SimpleMemoComponent:\n {\n if ($$typeofNextType === REACT_MEMO_TYPE) {\n // TODO: if it was but can no longer be simple,\n // we shouldn't set this.\n needsCompareFamilies = true;\n } else if ($$typeofNextType === REACT_LAZY_TYPE) {\n needsCompareFamilies = true;\n }\n\n break;\n }\n\n default:\n return false;\n } // Check if both types have a family and it's the same one.\n\n\n if (needsCompareFamilies) {\n // Note: memo() and forwardRef() we'll compare outer rather than inner type.\n // This means both of them need to be registered to preserve state.\n // If we unwrapped and compared the inner types for wrappers instead,\n // then we would risk falsely saying two separate memo(Foo)\n // calls are equivalent because they wrap the same Foo function.\n var prevFamily = resolveFamily(prevType);\n\n if (prevFamily !== undefined && prevFamily === resolveFamily(nextType)) {\n return true;\n }\n }\n\n return false;\n }\n}\nfunction markFailedErrorBoundaryForHotReloading(fiber) {\n {\n if (resolveFamily === null) {\n // Hot reloading is disabled.\n return;\n }\n\n if (typeof WeakSet !== 'function') {\n return;\n }\n\n if (failedBoundaries === null) {\n failedBoundaries = new WeakSet();\n }\n\n failedBoundaries.add(fiber);\n }\n}\nvar scheduleRefresh = function (root, update) {\n {\n if (resolveFamily === null) {\n // Hot reloading is disabled.\n return;\n }\n\n var staleFamilies = update.staleFamilies,\n updatedFamilies = update.updatedFamilies;\n flushPassiveEffects();\n flushSync(function () {\n scheduleFibersWithFamiliesRecursively(root.current, updatedFamilies, staleFamilies);\n });\n }\n};\nvar scheduleRoot = function (root, element) {\n {\n if (root.context !== emptyContextObject) {\n // Super edge case: root has a legacy _renderSubtree context\n // but we don't know the parentComponent so we can't pass it.\n // Just ignore. We'll delete this with _renderSubtree code path later.\n return;\n }\n\n flushPassiveEffects();\n flushSync(function () {\n updateContainer(element, root, null, null);\n });\n }\n};\n\nfunction scheduleFibersWithFamiliesRecursively(fiber, updatedFamilies, staleFamilies) {\n {\n var alternate = fiber.alternate,\n child = fiber.child,\n sibling = fiber.sibling,\n tag = fiber.tag,\n type = fiber.type;\n var candidateType = null;\n\n switch (tag) {\n case FunctionComponent:\n case SimpleMemoComponent:\n case ClassComponent:\n candidateType = type;\n break;\n\n case ForwardRef:\n candidateType = type.render;\n break;\n }\n\n if (resolveFamily === null) {\n throw new Error('Expected resolveFamily to be set during hot reload.');\n }\n\n var needsRender = false;\n var needsRemount = false;\n\n if (candidateType !== null) {\n var family = resolveFamily(candidateType);\n\n if (family !== undefined) {\n if (staleFamilies.has(family)) {\n needsRemount = true;\n } else if (updatedFamilies.has(family)) {\n if (tag === ClassComponent) {\n needsRemount = true;\n } else {\n needsRender = true;\n }\n }\n }\n }\n\n if (failedBoundaries !== null) {\n if (failedBoundaries.has(fiber) || alternate !== null && failedBoundaries.has(alternate)) {\n needsRemount = true;\n }\n }\n\n if (needsRemount) {\n fiber._debugNeedsRemount = true;\n }\n\n if (needsRemount || needsRender) {\n scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);\n }\n\n if (child !== null && !needsRemount) {\n scheduleFibersWithFamiliesRecursively(child, updatedFamilies, staleFamilies);\n }\n\n if (sibling !== null) {\n scheduleFibersWithFamiliesRecursively(sibling, updatedFamilies, staleFamilies);\n }\n }\n}\n\nvar findHostInstancesForRefresh = function (root, families) {\n {\n var hostInstances = new Set();\n var types = new Set(families.map(function (family) {\n return family.current;\n }));\n findHostInstancesForMatchingFibersRecursively(root.current, types, hostInstances);\n return hostInstances;\n }\n};\n\nfunction findHostInstancesForMatchingFibersRecursively(fiber, types, hostInstances) {\n {\n var child = fiber.child,\n sibling = fiber.sibling,\n tag = fiber.tag,\n type = fiber.type;\n var candidateType = null;\n\n switch (tag) {\n case FunctionComponent:\n case SimpleMemoComponent:\n case ClassComponent:\n candidateType = type;\n break;\n\n case ForwardRef:\n candidateType = type.render;\n break;\n }\n\n var didMatch = false;\n\n if (candidateType !== null) {\n if (types.has(candidateType)) {\n didMatch = true;\n }\n }\n\n if (didMatch) {\n // We have a match. This only drills down to the closest host components.\n // There's no need to search deeper because for the purpose of giving\n // visual feedback, \"flashing\" outermost parent rectangles is sufficient.\n findHostInstancesForFiberShallowly(fiber, hostInstances);\n } else {\n // If there's no match, maybe there will be one further down in the child tree.\n if (child !== null) {\n findHostInstancesForMatchingFibersRecursively(child, types, hostInstances);\n }\n }\n\n if (sibling !== null) {\n findHostInstancesForMatchingFibersRecursively(sibling, types, hostInstances);\n }\n }\n}\n\nfunction findHostInstancesForFiberShallowly(fiber, hostInstances) {\n {\n var foundHostInstances = findChildHostInstancesForFiberShallowly(fiber, hostInstances);\n\n if (foundHostInstances) {\n return;\n } // If we didn't find any host children, fallback to closest host parent.\n\n\n var node = fiber;\n\n while (true) {\n switch (node.tag) {\n case HostComponent:\n hostInstances.add(node.stateNode);\n return;\n\n case HostPortal:\n hostInstances.add(node.stateNode.containerInfo);\n return;\n\n case HostRoot:\n hostInstances.add(node.stateNode.containerInfo);\n return;\n }\n\n if (node.return === null) {\n throw new Error('Expected to reach root first.');\n }\n\n node = node.return;\n }\n }\n}\n\nfunction findChildHostInstancesForFiberShallowly(fiber, hostInstances) {\n {\n var node = fiber;\n var foundHostInstances = false;\n\n while (true) {\n if (node.tag === HostComponent) {\n // We got a match.\n foundHostInstances = true;\n hostInstances.add(node.stateNode); // There may still be more, so keep searching.\n } else if (node.child !== null) {\n node.child.return = node;\n node = node.child;\n continue;\n }\n\n if (node === fiber) {\n return foundHostInstances;\n }\n\n while (node.sibling === null) {\n if (node.return === null || node.return === fiber) {\n return foundHostInstances;\n }\n\n node = node.return;\n }\n\n node.sibling.return = node.return;\n node = node.sibling;\n }\n }\n\n return false;\n}\n\nvar hasBadMapPolyfill;\n\n{\n hasBadMapPolyfill = false;\n\n try {\n var nonExtensibleObject = Object.preventExtensions({});\n /* eslint-disable no-new */\n\n new Map([[nonExtensibleObject, null]]);\n new Set([nonExtensibleObject]);\n /* eslint-enable no-new */\n } catch (e) {\n // TODO: Consider warning about bad polyfills\n hasBadMapPolyfill = true;\n }\n}\n\nvar debugCounter = 1;\n\nfunction FiberNode(tag, pendingProps, key, mode) {\n // Instance\n this.tag = tag;\n this.key = key;\n this.elementType = null;\n this.type = null;\n this.stateNode = null; // Fiber\n\n this.return = null;\n this.child = null;\n this.sibling = null;\n this.index = 0;\n this.ref = null;\n this.pendingProps = pendingProps;\n this.memoizedProps = null;\n this.updateQueue = null;\n this.memoizedState = null;\n this.dependencies = null;\n this.mode = mode; // Effects\n\n this.flags = NoFlags;\n this.nextEffect = null;\n this.firstEffect = null;\n this.lastEffect = null;\n this.lanes = NoLanes;\n this.childLanes = NoLanes;\n this.alternate = null;\n\n {\n // Note: The following is done to avoid a v8 performance cliff.\n //\n // Initializing the fields below to smis and later updating them with\n // double values will cause Fibers to end up having separate shapes.\n // This behavior/bug has something to do with Object.preventExtension().\n // Fortunately this only impacts DEV builds.\n // Unfortunately it makes React unusably slow for some applications.\n // To work around this, initialize the fields below with doubles.\n //\n // Learn more about this here:\n // https://github.com/facebook/react/issues/14365\n // https://bugs.chromium.org/p/v8/issues/detail?id=8538\n this.actualDuration = Number.NaN;\n this.actualStartTime = Number.NaN;\n this.selfBaseDuration = Number.NaN;\n this.treeBaseDuration = Number.NaN; // It's okay to replace the initial doubles with smis after initialization.\n // This won't trigger the performance cliff mentioned above,\n // and it simplifies other profiler code (including DevTools).\n\n this.actualDuration = 0;\n this.actualStartTime = -1;\n this.selfBaseDuration = 0;\n this.treeBaseDuration = 0;\n }\n\n {\n // This isn't directly used but is handy for debugging internals:\n this._debugID = debugCounter++;\n this._debugSource = null;\n this._debugOwner = null;\n this._debugNeedsRemount = false;\n this._debugHookTypes = null;\n\n if (!hasBadMapPolyfill && typeof Object.preventExtensions === 'function') {\n Object.preventExtensions(this);\n }\n }\n} // This is a constructor function, rather than a POJO constructor, still\n// please ensure we do the following:\n// 1) Nobody should add any instance methods on this. Instance methods can be\n// more difficult to predict when they get optimized and they are almost\n// never inlined properly in static compilers.\n// 2) Nobody should rely on `instanceof Fiber` for type testing. We should\n// always know when it is a fiber.\n// 3) We might want to experiment with using numeric keys since they are easier\n// to optimize in a non-JIT environment.\n// 4) We can easily go from a constructor to a createFiber object literal if that\n// is faster.\n// 5) It should be easy to port this to a C struct and keep a C implementation\n// compatible.\n\n\nvar createFiber = function (tag, pendingProps, key, mode) {\n // $FlowFixMe: the shapes are exact here but Flow doesn't like constructors\n return new FiberNode(tag, pendingProps, key, mode);\n};\n\nfunction shouldConstruct$1(Component) {\n var prototype = Component.prototype;\n return !!(prototype && prototype.isReactComponent);\n}\n\nfunction isSimpleFunctionComponent(type) {\n return typeof type === 'function' && !shouldConstruct$1(type) && type.defaultProps === undefined;\n}\nfunction resolveLazyComponentTag(Component) {\n if (typeof Component === 'function') {\n return shouldConstruct$1(Component) ? ClassComponent : FunctionComponent;\n } else if (Component !== undefined && Component !== null) {\n var $$typeof = Component.$$typeof;\n\n if ($$typeof === REACT_FORWARD_REF_TYPE) {\n return ForwardRef;\n }\n\n if ($$typeof === REACT_MEMO_TYPE) {\n return MemoComponent;\n }\n }\n\n return IndeterminateComponent;\n} // This is used to create an alternate fiber to do work on.\n\nfunction createWorkInProgress(current, pendingProps) {\n var workInProgress = current.alternate;\n\n if (workInProgress === null) {\n // We use a double buffering pooling technique because we know that we'll\n // only ever need at most two versions of a tree. We pool the \"other\" unused\n // node that we're free to reuse. This is lazily created to avoid allocating\n // extra objects for things that are never updated. It also allow us to\n // reclaim the extra memory if needed.\n workInProgress = createFiber(current.tag, pendingProps, current.key, current.mode);\n workInProgress.elementType = current.elementType;\n workInProgress.type = current.type;\n workInProgress.stateNode = current.stateNode;\n\n {\n // DEV-only fields\n workInProgress._debugID = current._debugID;\n workInProgress._debugSource = current._debugSource;\n workInProgress._debugOwner = current._debugOwner;\n workInProgress._debugHookTypes = current._debugHookTypes;\n }\n\n workInProgress.alternate = current;\n current.alternate = workInProgress;\n } else {\n workInProgress.pendingProps = pendingProps; // Needed because Blocks store data on type.\n\n workInProgress.type = current.type; // We already have an alternate.\n // Reset the effect tag.\n\n workInProgress.flags = NoFlags; // The effect list is no longer valid.\n\n workInProgress.nextEffect = null;\n workInProgress.firstEffect = null;\n workInProgress.lastEffect = null;\n\n {\n // We intentionally reset, rather than copy, actualDuration & actualStartTime.\n // This prevents time from endlessly accumulating in new commits.\n // This has the downside of resetting values for different priority renders,\n // But works for yielding (the common case) and should support resuming.\n workInProgress.actualDuration = 0;\n workInProgress.actualStartTime = -1;\n }\n }\n\n workInProgress.childLanes = current.childLanes;\n workInProgress.lanes = current.lanes;\n workInProgress.child = current.child;\n workInProgress.memoizedProps = current.memoizedProps;\n workInProgress.memoizedState = current.memoizedState;\n workInProgress.updateQueue = current.updateQueue; // Clone the dependencies object. This is mutated during the render phase, so\n // it cannot be shared with the current fiber.\n\n var currentDependencies = current.dependencies;\n workInProgress.dependencies = currentDependencies === null ? null : {\n lanes: currentDependencies.lanes,\n firstContext: currentDependencies.firstContext\n }; // These will be overridden during the parent's reconciliation\n\n workInProgress.sibling = current.sibling;\n workInProgress.index = current.index;\n workInProgress.ref = current.ref;\n\n {\n workInProgress.selfBaseDuration = current.selfBaseDuration;\n workInProgress.treeBaseDuration = current.treeBaseDuration;\n }\n\n {\n workInProgress._debugNeedsRemount = current._debugNeedsRemount;\n\n switch (workInProgress.tag) {\n case IndeterminateComponent:\n case FunctionComponent:\n case SimpleMemoComponent:\n workInProgress.type = resolveFunctionForHotReloading(current.type);\n break;\n\n case ClassComponent:\n workInProgress.type = resolveClassForHotReloading(current.type);\n break;\n\n case ForwardRef:\n workInProgress.type = resolveForwardRefForHotReloading(current.type);\n break;\n }\n }\n\n return workInProgress;\n} // Used to reuse a Fiber for a second pass.\n\nfunction resetWorkInProgress(workInProgress, renderLanes) {\n // This resets the Fiber to what createFiber or createWorkInProgress would\n // have set the values to before during the first pass. Ideally this wouldn't\n // be necessary but unfortunately many code paths reads from the workInProgress\n // when they should be reading from current and writing to workInProgress.\n // We assume pendingProps, index, key, ref, return are still untouched to\n // avoid doing another reconciliation.\n // Reset the effect tag but keep any Placement tags, since that's something\n // that child fiber is setting, not the reconciliation.\n workInProgress.flags &= Placement; // The effect list is no longer valid.\n\n workInProgress.nextEffect = null;\n workInProgress.firstEffect = null;\n workInProgress.lastEffect = null;\n var current = workInProgress.alternate;\n\n if (current === null) {\n // Reset to createFiber's initial values.\n workInProgress.childLanes = NoLanes;\n workInProgress.lanes = renderLanes;\n workInProgress.child = null;\n workInProgress.memoizedProps = null;\n workInProgress.memoizedState = null;\n workInProgress.updateQueue = null;\n workInProgress.dependencies = null;\n workInProgress.stateNode = null;\n\n {\n // Note: We don't reset the actualTime counts. It's useful to accumulate\n // actual time across multiple render passes.\n workInProgress.selfBaseDuration = 0;\n workInProgress.treeBaseDuration = 0;\n }\n } else {\n // Reset to the cloned values that createWorkInProgress would've.\n workInProgress.childLanes = current.childLanes;\n workInProgress.lanes = current.lanes;\n workInProgress.child = current.child;\n workInProgress.memoizedProps = current.memoizedProps;\n workInProgress.memoizedState = current.memoizedState;\n workInProgress.updateQueue = current.updateQueue; // Needed because Blocks store data on type.\n\n workInProgress.type = current.type; // Clone the dependencies object. This is mutated during the render phase, so\n // it cannot be shared with the current fiber.\n\n var currentDependencies = current.dependencies;\n workInProgress.dependencies = currentDependencies === null ? null : {\n lanes: currentDependencies.lanes,\n firstContext: currentDependencies.firstContext\n };\n\n {\n // Note: We don't reset the actualTime counts. It's useful to accumulate\n // actual time across multiple render passes.\n workInProgress.selfBaseDuration = current.selfBaseDuration;\n workInProgress.treeBaseDuration = current.treeBaseDuration;\n }\n }\n\n return workInProgress;\n}\nfunction createHostRootFiber(tag) {\n var mode;\n\n if (tag === ConcurrentRoot) {\n mode = ConcurrentMode | BlockingMode | StrictMode;\n } else if (tag === BlockingRoot) {\n mode = BlockingMode | StrictMode;\n } else {\n mode = NoMode;\n }\n\n if ( isDevToolsPresent) {\n // Always collect profile timings when DevTools are present.\n // This enables DevTools to start capturing timing at any point\n // Without some nodes in the tree having empty base times.\n mode |= ProfileMode;\n }\n\n return createFiber(HostRoot, null, null, mode);\n}\nfunction createFiberFromTypeAndProps(type, // React$ElementType\nkey, pendingProps, owner, mode, lanes) {\n var fiberTag = IndeterminateComponent; // The resolved type is set if we know what the final type will be. I.e. it's not lazy.\n\n var resolvedType = type;\n\n if (typeof type === 'function') {\n if (shouldConstruct$1(type)) {\n fiberTag = ClassComponent;\n\n {\n resolvedType = resolveClassForHotReloading(resolvedType);\n }\n } else {\n {\n resolvedType = resolveFunctionForHotReloading(resolvedType);\n }\n }\n } else if (typeof type === 'string') {\n fiberTag = HostComponent;\n } else {\n getTag: switch (type) {\n case REACT_FRAGMENT_TYPE:\n return createFiberFromFragment(pendingProps.children, mode, lanes, key);\n\n case REACT_DEBUG_TRACING_MODE_TYPE:\n fiberTag = Mode;\n mode |= DebugTracingMode;\n break;\n\n case REACT_STRICT_MODE_TYPE:\n fiberTag = Mode;\n mode |= StrictMode;\n break;\n\n case REACT_PROFILER_TYPE:\n return createFiberFromProfiler(pendingProps, mode, lanes, key);\n\n case REACT_SUSPENSE_TYPE:\n return createFiberFromSuspense(pendingProps, mode, lanes, key);\n\n case REACT_SUSPENSE_LIST_TYPE:\n return createFiberFromSuspenseList(pendingProps, mode, lanes, key);\n\n case REACT_OFFSCREEN_TYPE:\n return createFiberFromOffscreen(pendingProps, mode, lanes, key);\n\n case REACT_LEGACY_HIDDEN_TYPE:\n return createFiberFromLegacyHidden(pendingProps, mode, lanes, key);\n\n case REACT_SCOPE_TYPE:\n\n // eslint-disable-next-line no-fallthrough\n\n default:\n {\n if (typeof type === 'object' && type !== null) {\n switch (type.$$typeof) {\n case REACT_PROVIDER_TYPE:\n fiberTag = ContextProvider;\n break getTag;\n\n case REACT_CONTEXT_TYPE:\n // This is a consumer\n fiberTag = ContextConsumer;\n break getTag;\n\n case REACT_FORWARD_REF_TYPE:\n fiberTag = ForwardRef;\n\n {\n resolvedType = resolveForwardRefForHotReloading(resolvedType);\n }\n\n break getTag;\n\n case REACT_MEMO_TYPE:\n fiberTag = MemoComponent;\n break getTag;\n\n case REACT_LAZY_TYPE:\n fiberTag = LazyComponent;\n resolvedType = null;\n break getTag;\n\n case REACT_BLOCK_TYPE:\n fiberTag = Block;\n break getTag;\n }\n }\n\n var info = '';\n\n {\n if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {\n 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.';\n }\n\n var ownerName = owner ? getComponentName(owner.type) : null;\n\n if (ownerName) {\n info += '\\n\\nCheck the render method of `' + ownerName + '`.';\n }\n }\n\n {\n {\n throw Error( \"Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: \" + (type == null ? type : typeof type) + \".\" + info );\n }\n }\n }\n }\n }\n\n var fiber = createFiber(fiberTag, pendingProps, key, mode);\n fiber.elementType = type;\n fiber.type = resolvedType;\n fiber.lanes = lanes;\n\n {\n fiber._debugOwner = owner;\n }\n\n return fiber;\n}\nfunction createFiberFromElement(element, mode, lanes) {\n var owner = null;\n\n {\n owner = element._owner;\n }\n\n var type = element.type;\n var key = element.key;\n var pendingProps = element.props;\n var fiber = createFiberFromTypeAndProps(type, key, pendingProps, owner, mode, lanes);\n\n {\n fiber._debugSource = element._source;\n fiber._debugOwner = element._owner;\n }\n\n return fiber;\n}\nfunction createFiberFromFragment(elements, mode, lanes, key) {\n var fiber = createFiber(Fragment, elements, key, mode);\n fiber.lanes = lanes;\n return fiber;\n}\n\nfunction createFiberFromProfiler(pendingProps, mode, lanes, key) {\n {\n if (typeof pendingProps.id !== 'string') {\n error('Profiler must specify an \"id\" as a prop');\n }\n }\n\n var fiber = createFiber(Profiler, pendingProps, key, mode | ProfileMode); // TODO: The Profiler fiber shouldn't have a type. It has a tag.\n\n fiber.elementType = REACT_PROFILER_TYPE;\n fiber.type = REACT_PROFILER_TYPE;\n fiber.lanes = lanes;\n\n {\n fiber.stateNode = {\n effectDuration: 0,\n passiveEffectDuration: 0\n };\n }\n\n return fiber;\n}\n\nfunction createFiberFromSuspense(pendingProps, mode, lanes, key) {\n var fiber = createFiber(SuspenseComponent, pendingProps, key, mode); // TODO: The SuspenseComponent fiber shouldn't have a type. It has a tag.\n // This needs to be fixed in getComponentName so that it relies on the tag\n // instead.\n\n fiber.type = REACT_SUSPENSE_TYPE;\n fiber.elementType = REACT_SUSPENSE_TYPE;\n fiber.lanes = lanes;\n return fiber;\n}\nfunction createFiberFromSuspenseList(pendingProps, mode, lanes, key) {\n var fiber = createFiber(SuspenseListComponent, pendingProps, key, mode);\n\n {\n // TODO: The SuspenseListComponent fiber shouldn't have a type. It has a tag.\n // This needs to be fixed in getComponentName so that it relies on the tag\n // instead.\n fiber.type = REACT_SUSPENSE_LIST_TYPE;\n }\n\n fiber.elementType = REACT_SUSPENSE_LIST_TYPE;\n fiber.lanes = lanes;\n return fiber;\n}\nfunction createFiberFromOffscreen(pendingProps, mode, lanes, key) {\n var fiber = createFiber(OffscreenComponent, pendingProps, key, mode); // TODO: The OffscreenComponent fiber shouldn't have a type. It has a tag.\n // This needs to be fixed in getComponentName so that it relies on the tag\n // instead.\n\n {\n fiber.type = REACT_OFFSCREEN_TYPE;\n }\n\n fiber.elementType = REACT_OFFSCREEN_TYPE;\n fiber.lanes = lanes;\n return fiber;\n}\nfunction createFiberFromLegacyHidden(pendingProps, mode, lanes, key) {\n var fiber = createFiber(LegacyHiddenComponent, pendingProps, key, mode); // TODO: The LegacyHidden fiber shouldn't have a type. It has a tag.\n // This needs to be fixed in getComponentName so that it relies on the tag\n // instead.\n\n {\n fiber.type = REACT_LEGACY_HIDDEN_TYPE;\n }\n\n fiber.elementType = REACT_LEGACY_HIDDEN_TYPE;\n fiber.lanes = lanes;\n return fiber;\n}\nfunction createFiberFromText(content, mode, lanes) {\n var fiber = createFiber(HostText, content, null, mode);\n fiber.lanes = lanes;\n return fiber;\n}\nfunction createFiberFromHostInstanceForDeletion() {\n var fiber = createFiber(HostComponent, null, null, NoMode); // TODO: These should not need a type.\n\n fiber.elementType = 'DELETED';\n fiber.type = 'DELETED';\n return fiber;\n}\nfunction createFiberFromPortal(portal, mode, lanes) {\n var pendingProps = portal.children !== null ? portal.children : [];\n var fiber = createFiber(HostPortal, pendingProps, portal.key, mode);\n fiber.lanes = lanes;\n fiber.stateNode = {\n containerInfo: portal.containerInfo,\n pendingChildren: null,\n // Used by persistent updates\n implementation: portal.implementation\n };\n return fiber;\n} // Used for stashing WIP properties to replay failed work in DEV.\n\nfunction assignFiberPropertiesInDEV(target, source) {\n if (target === null) {\n // This Fiber's initial properties will always be overwritten.\n // We only use a Fiber to ensure the same hidden class so DEV isn't slow.\n target = createFiber(IndeterminateComponent, null, null, NoMode);\n } // This is intentionally written as a list of all properties.\n // We tried to use Object.assign() instead but this is called in\n // the hottest path, and Object.assign() was too slow:\n // https://github.com/facebook/react/issues/12502\n // This code is DEV-only so size is not a concern.\n\n\n target.tag = source.tag;\n target.key = source.key;\n target.elementType = source.elementType;\n target.type = source.type;\n target.stateNode = source.stateNode;\n target.return = source.return;\n target.child = source.child;\n target.sibling = source.sibling;\n target.index = source.index;\n target.ref = source.ref;\n target.pendingProps = source.pendingProps;\n target.memoizedProps = source.memoizedProps;\n target.updateQueue = source.updateQueue;\n target.memoizedState = source.memoizedState;\n target.dependencies = source.dependencies;\n target.mode = source.mode;\n target.flags = source.flags;\n target.nextEffect = source.nextEffect;\n target.firstEffect = source.firstEffect;\n target.lastEffect = source.lastEffect;\n target.lanes = source.lanes;\n target.childLanes = source.childLanes;\n target.alternate = source.alternate;\n\n {\n target.actualDuration = source.actualDuration;\n target.actualStartTime = source.actualStartTime;\n target.selfBaseDuration = source.selfBaseDuration;\n target.treeBaseDuration = source.treeBaseDuration;\n }\n\n target._debugID = source._debugID;\n target._debugSource = source._debugSource;\n target._debugOwner = source._debugOwner;\n target._debugNeedsRemount = source._debugNeedsRemount;\n target._debugHookTypes = source._debugHookTypes;\n return target;\n}\n\nfunction FiberRootNode(containerInfo, tag, hydrate) {\n this.tag = tag;\n this.containerInfo = containerInfo;\n this.pendingChildren = null;\n this.current = null;\n this.pingCache = null;\n this.finishedWork = null;\n this.timeoutHandle = noTimeout;\n this.context = null;\n this.pendingContext = null;\n this.hydrate = hydrate;\n this.callbackNode = null;\n this.callbackPriority = NoLanePriority;\n this.eventTimes = createLaneMap(NoLanes);\n this.expirationTimes = createLaneMap(NoTimestamp);\n this.pendingLanes = NoLanes;\n this.suspendedLanes = NoLanes;\n this.pingedLanes = NoLanes;\n this.expiredLanes = NoLanes;\n this.mutableReadLanes = NoLanes;\n this.finishedLanes = NoLanes;\n this.entangledLanes = NoLanes;\n this.entanglements = createLaneMap(NoLanes);\n\n {\n this.mutableSourceEagerHydrationData = null;\n }\n\n {\n this.interactionThreadID = tracing.unstable_getThreadID();\n this.memoizedInteractions = new Set();\n this.pendingInteractionMap = new Map();\n }\n\n {\n switch (tag) {\n case BlockingRoot:\n this._debugRootType = 'createBlockingRoot()';\n break;\n\n case ConcurrentRoot:\n this._debugRootType = 'createRoot()';\n break;\n\n case LegacyRoot:\n this._debugRootType = 'createLegacyRoot()';\n break;\n }\n }\n}\n\nfunction createFiberRoot(containerInfo, tag, hydrate, hydrationCallbacks) {\n var root = new FiberRootNode(containerInfo, tag, hydrate);\n // stateNode is any.\n\n\n var uninitializedFiber = createHostRootFiber(tag);\n root.current = uninitializedFiber;\n uninitializedFiber.stateNode = root;\n initializeUpdateQueue(uninitializedFiber);\n return root;\n}\n\n// This ensures that the version used for server rendering matches the one\n// that is eventually read during hydration.\n// If they don't match there's a potential tear and a full deopt render is required.\n\nfunction registerMutableSourceForHydration(root, mutableSource) {\n var getVersion = mutableSource._getVersion;\n var version = getVersion(mutableSource._source); // TODO Clear this data once all pending hydration work is finished.\n // Retaining it forever may interfere with GC.\n\n if (root.mutableSourceEagerHydrationData == null) {\n root.mutableSourceEagerHydrationData = [mutableSource, version];\n } else {\n root.mutableSourceEagerHydrationData.push(mutableSource, version);\n }\n}\n\nfunction createPortal(children, containerInfo, // TODO: figure out the API for cross-renderer implementation.\nimplementation) {\n var key = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;\n return {\n // This tag allow us to uniquely identify this as a React Portal\n $$typeof: REACT_PORTAL_TYPE,\n key: key == null ? null : '' + key,\n children: children,\n containerInfo: containerInfo,\n implementation: implementation\n };\n}\n\nvar didWarnAboutNestedUpdates;\nvar didWarnAboutFindNodeInStrictMode;\n\n{\n didWarnAboutNestedUpdates = false;\n didWarnAboutFindNodeInStrictMode = {};\n}\n\nfunction getContextForSubtree(parentComponent) {\n if (!parentComponent) {\n return emptyContextObject;\n }\n\n var fiber = get(parentComponent);\n var parentContext = findCurrentUnmaskedContext(fiber);\n\n if (fiber.tag === ClassComponent) {\n var Component = fiber.type;\n\n if (isContextProvider(Component)) {\n return processChildContext(fiber, Component, parentContext);\n }\n }\n\n return parentContext;\n}\n\nfunction findHostInstanceWithWarning(component, methodName) {\n {\n var fiber = get(component);\n\n if (fiber === undefined) {\n if (typeof component.render === 'function') {\n {\n {\n throw Error( \"Unable to find node on an unmounted component.\" );\n }\n }\n } else {\n {\n {\n throw Error( \"Argument appears to not be a ReactComponent. Keys: \" + Object.keys(component) );\n }\n }\n }\n }\n\n var hostFiber = findCurrentHostFiber(fiber);\n\n if (hostFiber === null) {\n return null;\n }\n\n if (hostFiber.mode & StrictMode) {\n var componentName = getComponentName(fiber.type) || 'Component';\n\n if (!didWarnAboutFindNodeInStrictMode[componentName]) {\n didWarnAboutFindNodeInStrictMode[componentName] = true;\n var previousFiber = current;\n\n try {\n setCurrentFiber(hostFiber);\n\n if (fiber.mode & StrictMode) {\n error('%s is deprecated in StrictMode. ' + '%s was passed an instance of %s which is inside StrictMode. ' + 'Instead, add a ref directly to the element you want to reference. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-find-node', methodName, methodName, componentName);\n } else {\n error('%s is deprecated in StrictMode. ' + '%s was passed an instance of %s which renders StrictMode children. ' + 'Instead, add a ref directly to the element you want to reference. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-find-node', methodName, methodName, componentName);\n }\n } finally {\n // Ideally this should reset to previous but this shouldn't be called in\n // render and there's another warning for that anyway.\n if (previousFiber) {\n setCurrentFiber(previousFiber);\n } else {\n resetCurrentFiber();\n }\n }\n }\n }\n\n return hostFiber.stateNode;\n }\n}\n\nfunction createContainer(containerInfo, tag, hydrate, hydrationCallbacks) {\n return createFiberRoot(containerInfo, tag, hydrate);\n}\nfunction updateContainer(element, container, parentComponent, callback) {\n {\n onScheduleRoot(container, element);\n }\n\n var current$1 = container.current;\n var eventTime = requestEventTime();\n\n {\n // $FlowExpectedError - jest isn't a global, and isn't recognized outside of tests\n if ('undefined' !== typeof jest) {\n warnIfUnmockedScheduler(current$1);\n warnIfNotScopedWithMatchingAct(current$1);\n }\n }\n\n var lane = requestUpdateLane(current$1);\n\n var context = getContextForSubtree(parentComponent);\n\n if (container.context === null) {\n container.context = context;\n } else {\n container.pendingContext = context;\n }\n\n {\n if (isRendering && current !== null && !didWarnAboutNestedUpdates) {\n didWarnAboutNestedUpdates = true;\n\n error('Render methods should be a pure function of props and state; ' + 'triggering nested component updates from render is not allowed. ' + 'If necessary, trigger nested updates in componentDidUpdate.\\n\\n' + 'Check the render method of %s.', getComponentName(current.type) || 'Unknown');\n }\n }\n\n var update = createUpdate(eventTime, lane); // Caution: React DevTools currently depends on this property\n // being called \"element\".\n\n update.payload = {\n element: element\n };\n callback = callback === undefined ? null : callback;\n\n if (callback !== null) {\n {\n if (typeof callback !== 'function') {\n error('render(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callback);\n }\n }\n\n update.callback = callback;\n }\n\n enqueueUpdate(current$1, update);\n scheduleUpdateOnFiber(current$1, lane, eventTime);\n return lane;\n}\nfunction getPublicRootInstance(container) {\n var containerFiber = container.current;\n\n if (!containerFiber.child) {\n return null;\n }\n\n switch (containerFiber.child.tag) {\n case HostComponent:\n return getPublicInstance(containerFiber.child.stateNode);\n\n default:\n return containerFiber.child.stateNode;\n }\n}\n\nfunction markRetryLaneImpl(fiber, retryLane) {\n var suspenseState = fiber.memoizedState;\n\n if (suspenseState !== null && suspenseState.dehydrated !== null) {\n suspenseState.retryLane = higherPriorityLane(suspenseState.retryLane, retryLane);\n }\n} // Increases the priority of thennables when they resolve within this boundary.\n\n\nfunction markRetryLaneIfNotHydrated(fiber, retryLane) {\n markRetryLaneImpl(fiber, retryLane);\n var alternate = fiber.alternate;\n\n if (alternate) {\n markRetryLaneImpl(alternate, retryLane);\n }\n}\n\nfunction attemptUserBlockingHydration$1(fiber) {\n if (fiber.tag !== SuspenseComponent) {\n // We ignore HostRoots here because we can't increase\n // their priority and they should not suspend on I/O,\n // since you have to wrap anything that might suspend in\n // Suspense.\n return;\n }\n\n var eventTime = requestEventTime();\n var lane = InputDiscreteHydrationLane;\n scheduleUpdateOnFiber(fiber, lane, eventTime);\n markRetryLaneIfNotHydrated(fiber, lane);\n}\nfunction attemptContinuousHydration$1(fiber) {\n if (fiber.tag !== SuspenseComponent) {\n // We ignore HostRoots here because we can't increase\n // their priority and they should not suspend on I/O,\n // since you have to wrap anything that might suspend in\n // Suspense.\n return;\n }\n\n var eventTime = requestEventTime();\n var lane = SelectiveHydrationLane;\n scheduleUpdateOnFiber(fiber, lane, eventTime);\n markRetryLaneIfNotHydrated(fiber, lane);\n}\nfunction attemptHydrationAtCurrentPriority$1(fiber) {\n if (fiber.tag !== SuspenseComponent) {\n // We ignore HostRoots here because we can't increase\n // their priority other than synchronously flush it.\n return;\n }\n\n var eventTime = requestEventTime();\n var lane = requestUpdateLane(fiber);\n scheduleUpdateOnFiber(fiber, lane, eventTime);\n markRetryLaneIfNotHydrated(fiber, lane);\n}\nfunction runWithPriority$2(priority, fn) {\n\n try {\n setCurrentUpdateLanePriority(priority);\n return fn();\n } finally {\n }\n}\nfunction findHostInstanceWithNoPortals(fiber) {\n var hostFiber = findCurrentHostFiberWithNoPortals(fiber);\n\n if (hostFiber === null) {\n return null;\n }\n\n if (hostFiber.tag === FundamentalComponent) {\n return hostFiber.stateNode.instance;\n }\n\n return hostFiber.stateNode;\n}\n\nvar shouldSuspendImpl = function (fiber) {\n return false;\n};\n\nfunction shouldSuspend(fiber) {\n return shouldSuspendImpl(fiber);\n}\nvar overrideHookState = null;\nvar overrideHookStateDeletePath = null;\nvar overrideHookStateRenamePath = null;\nvar overrideProps = null;\nvar overridePropsDeletePath = null;\nvar overridePropsRenamePath = null;\nvar scheduleUpdate = null;\nvar setSuspenseHandler = null;\n\n{\n var copyWithDeleteImpl = function (obj, path, index) {\n var key = path[index];\n var updated = Array.isArray(obj) ? obj.slice() : _assign({}, obj);\n\n if (index + 1 === path.length) {\n if (Array.isArray(updated)) {\n updated.splice(key, 1);\n } else {\n delete updated[key];\n }\n\n return updated;\n } // $FlowFixMe number or string is fine here\n\n\n updated[key] = copyWithDeleteImpl(obj[key], path, index + 1);\n return updated;\n };\n\n var copyWithDelete = function (obj, path) {\n return copyWithDeleteImpl(obj, path, 0);\n };\n\n var copyWithRenameImpl = function (obj, oldPath, newPath, index) {\n var oldKey = oldPath[index];\n var updated = Array.isArray(obj) ? obj.slice() : _assign({}, obj);\n\n if (index + 1 === oldPath.length) {\n var newKey = newPath[index]; // $FlowFixMe number or string is fine here\n\n updated[newKey] = updated[oldKey];\n\n if (Array.isArray(updated)) {\n updated.splice(oldKey, 1);\n } else {\n delete updated[oldKey];\n }\n } else {\n // $FlowFixMe number or string is fine here\n updated[oldKey] = copyWithRenameImpl( // $FlowFixMe number or string is fine here\n obj[oldKey], oldPath, newPath, index + 1);\n }\n\n return updated;\n };\n\n var copyWithRename = function (obj, oldPath, newPath) {\n if (oldPath.length !== newPath.length) {\n warn('copyWithRename() expects paths of the same length');\n\n return;\n } else {\n for (var i = 0; i < newPath.length - 1; i++) {\n if (oldPath[i] !== newPath[i]) {\n warn('copyWithRename() expects paths to be the same except for the deepest key');\n\n return;\n }\n }\n }\n\n return copyWithRenameImpl(obj, oldPath, newPath, 0);\n };\n\n var copyWithSetImpl = function (obj, path, index, value) {\n if (index >= path.length) {\n return value;\n }\n\n var key = path[index];\n var updated = Array.isArray(obj) ? obj.slice() : _assign({}, obj); // $FlowFixMe number or string is fine here\n\n updated[key] = copyWithSetImpl(obj[key], path, index + 1, value);\n return updated;\n };\n\n var copyWithSet = function (obj, path, value) {\n return copyWithSetImpl(obj, path, 0, value);\n };\n\n var findHook = function (fiber, id) {\n // For now, the \"id\" of stateful hooks is just the stateful hook index.\n // This may change in the future with e.g. nested hooks.\n var currentHook = fiber.memoizedState;\n\n while (currentHook !== null && id > 0) {\n currentHook = currentHook.next;\n id--;\n }\n\n return currentHook;\n }; // Support DevTools editable values for useState and useReducer.\n\n\n overrideHookState = function (fiber, id, path, value) {\n var hook = findHook(fiber, id);\n\n if (hook !== null) {\n var newState = copyWithSet(hook.memoizedState, path, value);\n hook.memoizedState = newState;\n hook.baseState = newState; // We aren't actually adding an update to the queue,\n // because there is no update we can add for useReducer hooks that won't trigger an error.\n // (There's no appropriate action type for DevTools overrides.)\n // As a result though, React will see the scheduled update as a noop and bailout.\n // Shallow cloning props works as a workaround for now to bypass the bailout check.\n\n fiber.memoizedProps = _assign({}, fiber.memoizedProps);\n scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);\n }\n };\n\n overrideHookStateDeletePath = function (fiber, id, path) {\n var hook = findHook(fiber, id);\n\n if (hook !== null) {\n var newState = copyWithDelete(hook.memoizedState, path);\n hook.memoizedState = newState;\n hook.baseState = newState; // We aren't actually adding an update to the queue,\n // because there is no update we can add for useReducer hooks that won't trigger an error.\n // (There's no appropriate action type for DevTools overrides.)\n // As a result though, React will see the scheduled update as a noop and bailout.\n // Shallow cloning props works as a workaround for now to bypass the bailout check.\n\n fiber.memoizedProps = _assign({}, fiber.memoizedProps);\n scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);\n }\n };\n\n overrideHookStateRenamePath = function (fiber, id, oldPath, newPath) {\n var hook = findHook(fiber, id);\n\n if (hook !== null) {\n var newState = copyWithRename(hook.memoizedState, oldPath, newPath);\n hook.memoizedState = newState;\n hook.baseState = newState; // We aren't actually adding an update to the queue,\n // because there is no update we can add for useReducer hooks that won't trigger an error.\n // (There's no appropriate action type for DevTools overrides.)\n // As a result though, React will see the scheduled update as a noop and bailout.\n // Shallow cloning props works as a workaround for now to bypass the bailout check.\n\n fiber.memoizedProps = _assign({}, fiber.memoizedProps);\n scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);\n }\n }; // Support DevTools props for function components, forwardRef, memo, host components, etc.\n\n\n overrideProps = function (fiber, path, value) {\n fiber.pendingProps = copyWithSet(fiber.memoizedProps, path, value);\n\n if (fiber.alternate) {\n fiber.alternate.pendingProps = fiber.pendingProps;\n }\n\n scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);\n };\n\n overridePropsDeletePath = function (fiber, path) {\n fiber.pendingProps = copyWithDelete(fiber.memoizedProps, path);\n\n if (fiber.alternate) {\n fiber.alternate.pendingProps = fiber.pendingProps;\n }\n\n scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);\n };\n\n overridePropsRenamePath = function (fiber, oldPath, newPath) {\n fiber.pendingProps = copyWithRename(fiber.memoizedProps, oldPath, newPath);\n\n if (fiber.alternate) {\n fiber.alternate.pendingProps = fiber.pendingProps;\n }\n\n scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);\n };\n\n scheduleUpdate = function (fiber) {\n scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);\n };\n\n setSuspenseHandler = function (newShouldSuspendImpl) {\n shouldSuspendImpl = newShouldSuspendImpl;\n };\n}\n\nfunction findHostInstanceByFiber(fiber) {\n var hostFiber = findCurrentHostFiber(fiber);\n\n if (hostFiber === null) {\n return null;\n }\n\n return hostFiber.stateNode;\n}\n\nfunction emptyFindFiberByHostInstance(instance) {\n return null;\n}\n\nfunction getCurrentFiberForDevTools() {\n return current;\n}\n\nfunction injectIntoDevTools(devToolsConfig) {\n var findFiberByHostInstance = devToolsConfig.findFiberByHostInstance;\n var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;\n return injectInternals({\n bundleType: devToolsConfig.bundleType,\n version: devToolsConfig.version,\n rendererPackageName: devToolsConfig.rendererPackageName,\n rendererConfig: devToolsConfig.rendererConfig,\n overrideHookState: overrideHookState,\n overrideHookStateDeletePath: overrideHookStateDeletePath,\n overrideHookStateRenamePath: overrideHookStateRenamePath,\n overrideProps: overrideProps,\n overridePropsDeletePath: overridePropsDeletePath,\n overridePropsRenamePath: overridePropsRenamePath,\n setSuspenseHandler: setSuspenseHandler,\n scheduleUpdate: scheduleUpdate,\n currentDispatcherRef: ReactCurrentDispatcher,\n findHostInstanceByFiber: findHostInstanceByFiber,\n findFiberByHostInstance: findFiberByHostInstance || emptyFindFiberByHostInstance,\n // React Refresh\n findHostInstancesForRefresh: findHostInstancesForRefresh ,\n scheduleRefresh: scheduleRefresh ,\n scheduleRoot: scheduleRoot ,\n setRefreshHandler: setRefreshHandler ,\n // Enables DevTools to append owner stacks to error messages in DEV mode.\n getCurrentFiber: getCurrentFiberForDevTools \n });\n}\n\nfunction ReactDOMRoot(container, options) {\n this._internalRoot = createRootImpl(container, ConcurrentRoot, options);\n}\n\nfunction ReactDOMBlockingRoot(container, tag, options) {\n this._internalRoot = createRootImpl(container, tag, options);\n}\n\nReactDOMRoot.prototype.render = ReactDOMBlockingRoot.prototype.render = function (children) {\n var root = this._internalRoot;\n\n {\n if (typeof arguments[1] === 'function') {\n error('render(...): does not support the second callback argument. ' + 'To execute a side effect after rendering, declare it in a component body with useEffect().');\n }\n\n var container = root.containerInfo;\n\n if (container.nodeType !== COMMENT_NODE) {\n var hostInstance = findHostInstanceWithNoPortals(root.current);\n\n if (hostInstance) {\n if (hostInstance.parentNode !== container) {\n error('render(...): It looks like the React-rendered content of the ' + 'root container was removed without using React. This is not ' + 'supported and will cause errors. Instead, call ' + \"root.unmount() to empty a root's container.\");\n }\n }\n }\n }\n\n updateContainer(children, root, null, null);\n};\n\nReactDOMRoot.prototype.unmount = ReactDOMBlockingRoot.prototype.unmount = function () {\n {\n if (typeof arguments[0] === 'function') {\n error('unmount(...): does not support a callback argument. ' + 'To execute a side effect after rendering, declare it in a component body with useEffect().');\n }\n }\n\n var root = this._internalRoot;\n var container = root.containerInfo;\n updateContainer(null, root, null, function () {\n unmarkContainerAsRoot(container);\n });\n};\n\nfunction createRootImpl(container, tag, options) {\n // Tag is either LegacyRoot or Concurrent Root\n var hydrate = options != null && options.hydrate === true;\n var hydrationCallbacks = options != null && options.hydrationOptions || null;\n var mutableSources = options != null && options.hydrationOptions != null && options.hydrationOptions.mutableSources || null;\n var root = createContainer(container, tag, hydrate);\n markContainerAsRoot(root.current, container);\n var containerNodeType = container.nodeType;\n\n {\n var rootContainerElement = container.nodeType === COMMENT_NODE ? container.parentNode : container;\n listenToAllSupportedEvents(rootContainerElement);\n }\n\n if (mutableSources) {\n for (var i = 0; i < mutableSources.length; i++) {\n var mutableSource = mutableSources[i];\n registerMutableSourceForHydration(root, mutableSource);\n }\n }\n\n return root;\n}\nfunction createLegacyRoot(container, options) {\n return new ReactDOMBlockingRoot(container, LegacyRoot, options);\n}\nfunction isValidContainer(node) {\n return !!(node && (node.nodeType === ELEMENT_NODE || node.nodeType === DOCUMENT_NODE || node.nodeType === DOCUMENT_FRAGMENT_NODE || node.nodeType === COMMENT_NODE && node.nodeValue === ' react-mount-point-unstable '));\n}\n\nvar ReactCurrentOwner$3 = ReactSharedInternals.ReactCurrentOwner;\nvar topLevelUpdateWarnings;\nvar warnedAboutHydrateAPI = false;\n\n{\n topLevelUpdateWarnings = function (container) {\n if (container._reactRootContainer && container.nodeType !== COMMENT_NODE) {\n var hostInstance = findHostInstanceWithNoPortals(container._reactRootContainer._internalRoot.current);\n\n if (hostInstance) {\n if (hostInstance.parentNode !== container) {\n error('render(...): It looks like the React-rendered content of this ' + 'container was removed without using React. This is not ' + 'supported and will cause errors. Instead, call ' + 'ReactDOM.unmountComponentAtNode to empty a container.');\n }\n }\n }\n\n var isRootRenderedBySomeReact = !!container._reactRootContainer;\n var rootEl = getReactRootElementInContainer(container);\n var hasNonRootReactChild = !!(rootEl && getInstanceFromNode(rootEl));\n\n if (hasNonRootReactChild && !isRootRenderedBySomeReact) {\n error('render(...): Replacing React-rendered children with a new root ' + 'component. If you intended to update the children of this node, ' + 'you should instead have the existing children update their state ' + 'and render the new components instead of calling ReactDOM.render.');\n }\n\n if (container.nodeType === ELEMENT_NODE && container.tagName && container.tagName.toUpperCase() === 'BODY') {\n error('render(): Rendering components directly into document.body is ' + 'discouraged, since its children are often manipulated by third-party ' + 'scripts and browser extensions. This may lead to subtle ' + 'reconciliation issues. Try rendering into a container element created ' + 'for your app.');\n }\n };\n}\n\nfunction getReactRootElementInContainer(container) {\n if (!container) {\n return null;\n }\n\n if (container.nodeType === DOCUMENT_NODE) {\n return container.documentElement;\n } else {\n return container.firstChild;\n }\n}\n\nfunction shouldHydrateDueToLegacyHeuristic(container) {\n var rootElement = getReactRootElementInContainer(container);\n return !!(rootElement && rootElement.nodeType === ELEMENT_NODE && rootElement.hasAttribute(ROOT_ATTRIBUTE_NAME));\n}\n\nfunction legacyCreateRootFromDOMContainer(container, forceHydrate) {\n var shouldHydrate = forceHydrate || shouldHydrateDueToLegacyHeuristic(container); // First clear any existing content.\n\n if (!shouldHydrate) {\n var warned = false;\n var rootSibling;\n\n while (rootSibling = container.lastChild) {\n {\n if (!warned && rootSibling.nodeType === ELEMENT_NODE && rootSibling.hasAttribute(ROOT_ATTRIBUTE_NAME)) {\n warned = true;\n\n error('render(): Target node has markup rendered by React, but there ' + 'are unrelated nodes as well. This is most commonly caused by ' + 'white-space inserted around server-rendered markup.');\n }\n }\n\n container.removeChild(rootSibling);\n }\n }\n\n {\n if (shouldHydrate && !forceHydrate && !warnedAboutHydrateAPI) {\n warnedAboutHydrateAPI = true;\n\n warn('render(): Calling ReactDOM.render() to hydrate server-rendered markup ' + 'will stop working in React v18. Replace the ReactDOM.render() call ' + 'with ReactDOM.hydrate() if you want React to attach to the server HTML.');\n }\n }\n\n return createLegacyRoot(container, shouldHydrate ? {\n hydrate: true\n } : undefined);\n}\n\nfunction warnOnInvalidCallback$1(callback, callerName) {\n {\n if (callback !== null && typeof callback !== 'function') {\n error('%s(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callerName, callback);\n }\n }\n}\n\nfunction legacyRenderSubtreeIntoContainer(parentComponent, children, container, forceHydrate, callback) {\n {\n topLevelUpdateWarnings(container);\n warnOnInvalidCallback$1(callback === undefined ? null : callback, 'render');\n } // TODO: Without `any` type, Flow says \"Property cannot be accessed on any\n // member of intersection type.\" Whyyyyyy.\n\n\n var root = container._reactRootContainer;\n var fiberRoot;\n\n if (!root) {\n // Initial mount\n root = container._reactRootContainer = legacyCreateRootFromDOMContainer(container, forceHydrate);\n fiberRoot = root._internalRoot;\n\n if (typeof callback === 'function') {\n var originalCallback = callback;\n\n callback = function () {\n var instance = getPublicRootInstance(fiberRoot);\n originalCallback.call(instance);\n };\n } // Initial mount should not be batched.\n\n\n unbatchedUpdates(function () {\n updateContainer(children, fiberRoot, parentComponent, callback);\n });\n } else {\n fiberRoot = root._internalRoot;\n\n if (typeof callback === 'function') {\n var _originalCallback = callback;\n\n callback = function () {\n var instance = getPublicRootInstance(fiberRoot);\n\n _originalCallback.call(instance);\n };\n } // Update\n\n\n updateContainer(children, fiberRoot, parentComponent, callback);\n }\n\n return getPublicRootInstance(fiberRoot);\n}\n\nfunction findDOMNode(componentOrElement) {\n {\n var owner = ReactCurrentOwner$3.current;\n\n if (owner !== null && owner.stateNode !== null) {\n var warnedAboutRefsInRender = owner.stateNode._warnedAboutRefsInRender;\n\n if (!warnedAboutRefsInRender) {\n error('%s is accessing findDOMNode inside its render(). ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', getComponentName(owner.type) || 'A component');\n }\n\n owner.stateNode._warnedAboutRefsInRender = true;\n }\n }\n\n if (componentOrElement == null) {\n return null;\n }\n\n if (componentOrElement.nodeType === ELEMENT_NODE) {\n return componentOrElement;\n }\n\n {\n return findHostInstanceWithWarning(componentOrElement, 'findDOMNode');\n }\n}\nfunction hydrate(element, container, callback) {\n if (!isValidContainer(container)) {\n {\n throw Error( \"Target container is not a DOM element.\" );\n }\n }\n\n {\n var isModernRoot = isContainerMarkedAsRoot(container) && container._reactRootContainer === undefined;\n\n if (isModernRoot) {\n error('You are calling ReactDOM.hydrate() on a container that was previously ' + 'passed to ReactDOM.createRoot(). This is not supported. ' + 'Did you mean to call createRoot(container, {hydrate: true}).render(element)?');\n }\n } // TODO: throw or warn if we couldn't hydrate?\n\n\n return legacyRenderSubtreeIntoContainer(null, element, container, true, callback);\n}\nfunction render(element, container, callback) {\n if (!isValidContainer(container)) {\n {\n throw Error( \"Target container is not a DOM element.\" );\n }\n }\n\n {\n var isModernRoot = isContainerMarkedAsRoot(container) && container._reactRootContainer === undefined;\n\n if (isModernRoot) {\n error('You are calling ReactDOM.render() on a container that was previously ' + 'passed to ReactDOM.createRoot(). This is not supported. ' + 'Did you mean to call root.render(element)?');\n }\n }\n\n return legacyRenderSubtreeIntoContainer(null, element, container, false, callback);\n}\nfunction unstable_renderSubtreeIntoContainer(parentComponent, element, containerNode, callback) {\n if (!isValidContainer(containerNode)) {\n {\n throw Error( \"Target container is not a DOM element.\" );\n }\n }\n\n if (!(parentComponent != null && has(parentComponent))) {\n {\n throw Error( \"parentComponent must be a valid React Component\" );\n }\n }\n\n return legacyRenderSubtreeIntoContainer(parentComponent, element, containerNode, false, callback);\n}\nfunction unmountComponentAtNode(container) {\n if (!isValidContainer(container)) {\n {\n throw Error( \"unmountComponentAtNode(...): Target container is not a DOM element.\" );\n }\n }\n\n {\n var isModernRoot = isContainerMarkedAsRoot(container) && container._reactRootContainer === undefined;\n\n if (isModernRoot) {\n error('You are calling ReactDOM.unmountComponentAtNode() on a container that was previously ' + 'passed to ReactDOM.createRoot(). This is not supported. Did you mean to call root.unmount()?');\n }\n }\n\n if (container._reactRootContainer) {\n {\n var rootEl = getReactRootElementInContainer(container);\n var renderedByDifferentReact = rootEl && !getInstanceFromNode(rootEl);\n\n if (renderedByDifferentReact) {\n error(\"unmountComponentAtNode(): The node you're attempting to unmount \" + 'was rendered by another copy of React.');\n }\n } // Unmount should not be batched.\n\n\n unbatchedUpdates(function () {\n legacyRenderSubtreeIntoContainer(null, null, container, false, function () {\n // $FlowFixMe This should probably use `delete container._reactRootContainer`\n container._reactRootContainer = null;\n unmarkContainerAsRoot(container);\n });\n }); // If you call unmountComponentAtNode twice in quick succession, you'll\n // get `true` twice. That's probably fine?\n\n return true;\n } else {\n {\n var _rootEl = getReactRootElementInContainer(container);\n\n var hasNonRootReactChild = !!(_rootEl && getInstanceFromNode(_rootEl)); // Check if the container itself is a React root node.\n\n var isContainerReactRoot = container.nodeType === ELEMENT_NODE && isValidContainer(container.parentNode) && !!container.parentNode._reactRootContainer;\n\n if (hasNonRootReactChild) {\n error(\"unmountComponentAtNode(): The node you're attempting to unmount \" + 'was rendered by React and is not a top-level container. %s', isContainerReactRoot ? 'You may have accidentally passed in a React root node instead ' + 'of its container.' : 'Instead, have the parent component update its state and ' + 'rerender in order to remove this component.');\n }\n }\n\n return false;\n }\n}\n\nsetAttemptUserBlockingHydration(attemptUserBlockingHydration$1);\nsetAttemptContinuousHydration(attemptContinuousHydration$1);\nsetAttemptHydrationAtCurrentPriority(attemptHydrationAtCurrentPriority$1);\nsetAttemptHydrationAtPriority(runWithPriority$2);\nvar didWarnAboutUnstableCreatePortal = false;\n\n{\n if (typeof Map !== 'function' || // $FlowIssue Flow incorrectly thinks Map has no prototype\n Map.prototype == null || typeof Map.prototype.forEach !== 'function' || typeof Set !== 'function' || // $FlowIssue Flow incorrectly thinks Set has no prototype\n Set.prototype == null || typeof Set.prototype.clear !== 'function' || typeof Set.prototype.forEach !== 'function') {\n error('React depends on Map and Set built-in types. Make sure that you load a ' + 'polyfill in older browsers. https://reactjs.org/link/react-polyfills');\n }\n}\n\nsetRestoreImplementation(restoreControlledState$3);\nsetBatchingImplementation(batchedUpdates$1, discreteUpdates$1, flushDiscreteUpdates, batchedEventUpdates$1);\n\nfunction createPortal$1(children, container) {\n var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n\n if (!isValidContainer(container)) {\n {\n throw Error( \"Target container is not a DOM element.\" );\n }\n } // TODO: pass ReactDOM portal implementation as third argument\n // $FlowFixMe The Flow type is opaque but there's no way to actually create it.\n\n\n return createPortal(children, container, null, key);\n}\n\nfunction renderSubtreeIntoContainer(parentComponent, element, containerNode, callback) {\n\n return unstable_renderSubtreeIntoContainer(parentComponent, element, containerNode, callback);\n}\n\nfunction unstable_createPortal(children, container) {\n var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n\n {\n if (!didWarnAboutUnstableCreatePortal) {\n didWarnAboutUnstableCreatePortal = true;\n\n warn('The ReactDOM.unstable_createPortal() alias has been deprecated, ' + 'and will be removed in React 18+. Update your code to use ' + 'ReactDOM.createPortal() instead. It has the exact same API, ' + 'but without the \"unstable_\" prefix.');\n }\n }\n\n return createPortal$1(children, container, key);\n}\n\nvar Internals = {\n // Keep in sync with ReactTestUtils.js, and ReactTestUtilsAct.js.\n // This is an array for better minification.\n Events: [getInstanceFromNode, getNodeFromInstance, getFiberCurrentPropsFromNode, enqueueStateRestore, restoreStateIfNeeded, flushPassiveEffects, // TODO: This is related to `act`, not events. Move to separate key?\n IsThisRendererActing]\n};\nvar foundDevTools = injectIntoDevTools({\n findFiberByHostInstance: getClosestInstanceFromNode,\n bundleType: 1 ,\n version: ReactVersion,\n rendererPackageName: 'react-dom'\n});\n\n{\n if (!foundDevTools && canUseDOM && window.top === window.self) {\n // If we're in Chrome or Firefox, provide a download link if not installed.\n if (navigator.userAgent.indexOf('Chrome') > -1 && navigator.userAgent.indexOf('Edge') === -1 || navigator.userAgent.indexOf('Firefox') > -1) {\n var protocol = window.location.protocol; // Don't warn in exotic cases like chrome-extension://.\n\n if (/^(https?|file):$/.test(protocol)) {\n // eslint-disable-next-line react-internal/no-production-logging\n console.info('%cDownload the React DevTools ' + 'for a better development experience: ' + 'https://reactjs.org/link/react-devtools' + (protocol === 'file:' ? '\\nYou might need to use a local HTTP server (instead of file://): ' + 'https://reactjs.org/link/react-devtools-faq' : ''), 'font-weight:bold');\n }\n }\n }\n}\n\nexports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Internals;\nexports.createPortal = createPortal$1;\nexports.findDOMNode = findDOMNode;\nexports.flushSync = flushSync;\nexports.hydrate = hydrate;\nexports.render = render;\nexports.unmountComponentAtNode = unmountComponentAtNode;\nexports.unstable_batchedUpdates = batchedUpdates$1;\nexports.unstable_createPortal = unstable_createPortal;\nexports.unstable_renderSubtreeIntoContainer = renderSubtreeIntoContainer;\nexports.version = ReactVersion;\n })();\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL3JlYWN0LWRvbS9janMvcmVhY3QtZG9tLmRldmVsb3BtZW50LmpzLmpzIiwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRWE7O0FBRWIsSUFBSSxJQUFxQztBQUN6QztBQUNBOztBQUVBLFlBQVksbUJBQU8sQ0FBQyw2Q0FBTztBQUMzQixjQUFjLG1CQUFPLENBQUMsaUZBQWU7QUFDckMsZ0JBQWdCLG1CQUFPLENBQUMscURBQVc7QUFDbkMsY0FBYyxtQkFBTyxDQUFDLCtEQUFtQjs7QUFFekM7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBLDJGQUEyRixhQUFhO0FBQ3hHO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLCtGQUErRixlQUFlO0FBQzlHO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUF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YXQgdGhpcyBtb2R1bGUgaXMgY3VycmVudGx5IHNoYXJlZCBhbmQgYXNzdW1lZCB0byBiZSBzdGF0ZWxlc3MuXG4gKiBJZiB0aGlzIGJlY29tZXMgYW4gYWN0dWFsIE1hcCwgdGhhdCB3aWxsIGJyZWFrLlxuICovXG5mdW5jdGlvbiBnZXQoa2V5KSB7XG4gIHJldHVybiBrZXkuX3JlYWN0SW50ZXJuYWxzO1xufVxuZnVuY3Rpb24gaGFzKGtleSkge1xuICByZXR1cm4ga2V5Ll9yZWFjdEludGVybmFscyAhPT0gdW5kZWZpbmVkO1xufVxuZnVuY3Rpb24gc2V0KGtleSwgdmFsdWUpIHtcbiAga2V5Ll9yZWFjdEludGVybmFscyA9IHZhbHVlO1xufVxuXG4vLyBEb24ndCBjaGFuZ2UgdGhlc2UgdHdvIHZhbHVlcy4gVGhleSdyZSB1c2VkIGJ5IFJlYWN0IERldiBUb29scy5cbnZhciBOb0ZsYWdzID1cbi8qICAgICAgICAgICAgICAgICAgICAgICovXG4wO1xudmFyIFBlcmZvcm1lZFdvcmsgPVxuLyogICAgICAgICAgICAgICAgKi9cbjE7IC8vIFlvdSBjYW4gY2hhbmdlIHRoZSByZXN0IChhbmQgYWRkIG1vcmUpLlxuXG52YXIgUGxhY2VtZW50ID1cbi8qICAgICAgICAgICAgICAgICAgICAqL1xuMjtcbnZhciBVcGRhdGUgPVxuLyogICAgICAgICAgICAgICAgICAgICAgICovXG40O1xudmFyIFBsYWNlbWVudEFuZFVwZGF0ZSA9XG4vKiAgICAgICAgICAgKi9cbjY7XG52YXIgRGVsZXRpb24gPVxuLyogICAgICAgICAgICAgICAgICAgICAqL1xuODtcbnZhciBDb250ZW50UmVzZXQgPVxuLyogICAgICAgICAgICAgICAgICovXG4xNjtcbnZhciBDYWxsYmFjayA9XG4vKiAgICAgICAgICAgICAgICAgICAgICovXG4zMjtcbnZhciBEaWRDYXB0dXJlID1cbi8qICAgICAgICAgICAgICAgICAgICovXG42NDtcbnZhci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hpY2ggY2hpbGQgYmVsb25ncyB0byB3aGljaCBzZXQuXG4gICAgICAvL1xuICAgICAgLy8gU2VhcmNoIHBhcmVudCBBJ3MgY2hpbGQgc2V0XG4gICAgICB2YXIgZGlkRmluZENoaWxkID0gZmFsc2U7XG4gICAgICB2YXIgX2NoaWxkID0gcGFyZW50QS5jaGlsZDtcblxuICAgICAgd2hpbGUgKF9jaGlsZCkge1xuICAgICAgICBpZiAoX2NoaWxkID09PSBhKSB7XG4gICAgICAgICAgZGlkRmluZENoaWxkID0gdHJ1ZTtcbiAgICAgICAgICBhID0gcGFyZW50QTtcbiAgICAgICAgICBiID0gcGFyZW50QjtcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChfY2hpbGQgPT09IGIpIHtcbiAgICAgICAgICBkaWRGaW5kQ2hpbGQgPSB0cnVlO1xuICAgICAgICAgIGIgPSBwYXJlbnRBO1xuICAgICAgICAgIGEgPSBwYXJlbnRCO1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG5cbiAgICAgICAgX2NoaWxkID0gX2NoaWxkLnNpYmxpbmc7XG4gICAgICB9XG5cbiAgICAgIGlmICghZGlkRmluZENoaWxkKSB7XG4gICAgICAgIC8vIFNlYXJjaCBwYXJlbnQgQidzIGNoaWxkIHNldFxuICAgICAgICBfY2hpbGQgPSBwYXJlbnRCLmNoaWxkO1xuXG4gICAgICAgIHdoaWxlIChfY2hpbGQpIHtcbiAgICAgICAgICBpZiAoX2NoaWxkID09PSBhKSB7XG4gICAgICAgICAgICBkaWRGaW5kQ2hpbGQgPSB0cnVlO1xuICAgICAgICAgICAgYSA9IHBhcmVudEI7XG4gICAgICAgICAgICBiID0gcGFyZW50QTtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGlmIChfY2hpbGQgPT09IGIpIHtcbiAgICAgICAgICAgIGRpZEZpbmRDaGlsZCA9IHRydWU7XG4gICAgICAgICAgICBiID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VjdGl2ZUh5ZHJhdGlvbkxhbmVQcmlvcml0eSA9IDQ7XG52YXIgSWRsZUh5ZHJhdGlvbkxhbmVQcmlvcml0eSA9IDM7XG52YXIgSWRsZUxhbmVQcmlvcml0eSA9IDI7XG52YXIgT2Zmc2NyZWVuTGFuZVByaW9yaXR5ID0gMTtcbnZhciBOb0xhbmVQcmlvcml0eSA9IDA7XG52YXIgVG90YWxMYW5lcyA9IDMxO1xudmFyIE5vTGFuZXMgPVxuLyogICAgICAgICAgICAgICAgICAgICAgICAqL1xuMDtcbnZhciBOb0xhbmUgPVxuLyogICAgICAgICAgICAgICAgICAgICAgICAgICovXG4wO1xudmFyIFN5bmNMYW5lID1cbi8qICAgICAgICAgICAgICAgICAgICAgICAgKi9cbjE7XG52YXIgU3luY0JhdGNoZWRMYW5lID1cbi8qICAgICAgICAgICAgICAgICAqL1xuMjtcbnZhciBJbnB1dERpc2NyZXRlSHlkcmF0aW9uTGFuZSA9XG4vKiAgICAgICovXG40O1xudmFyIElucHV0RGlzY3JldGVMYW5lcyA9XG4vKiAgICAgICAgICAgICAgICAgICAgKi9cbjI0O1xudmFyIElucHV0Q29udGludW91c0h5ZHJhdGlvbkxhbmUgPVxuLyogICAgICAgICAgICovXG4zMjtcbnZhciBJbnB1dENvbnRpbnVvdXNMYW5lcyA9XG4vKiAgICAgICAgICAgICAgICAgICovXG4xOTI7XG52YXIgRGVmYXVsdEh5ZHJhdGlvbkxhbmUgPVxuLyogICAgICAgICAgICAqL1xuMjU2O1xudmFyIERlZmF1bHRMYW5lcyA9XG4vKiAgICAgICAgICAgICAgICAgICAqL1xuMzU4NDtcbnZhciBUcmFuc2l0aW9uSHlkcmF0aW9uTGFuZSA9XG4vKiAgICAgICAgICAgICAgICAqL1xuNDA5NjtcbnZhciBUcmFuc2l0aW9uTGFuZXMgPVxuLyogICAgICAgICAgICAgICAgICAgICAgICovXG40MTg2MTEyO1xudmFyIFJldHJ5TGFuZXMgPVxuLyogICAgICAgICAgICAgICAg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ICAgICAgIGlmIChub2RlID09PSBudWxsKSB7XG4gICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG5cbiAgICAgICAgdmFyIG5vZGVUYWcgPSBub2RlLnRhZztcblxuICAgICAgICBpZiAobm9kZVRhZyA9PT0gSG9zdFJvb3QgfHwgbm9kZVRhZyA9PT0gSG9zdFBvcnRhbCkge1xuICAgICAgICAgIHZhciBjb250YWluZXIgPSBub2RlLnN0YXRlTm9kZS5jb250YWluZXJJbmZvO1xuXG4gICAgICAgICAgaWYgKGlzTWF0Y2hpbmdSb290Q29udGFpbmVyKGNvbnRhaW5lciwgdGFyZ2V0Q29udGFpbmVyTm9kZSkpIHtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGlmIChub2RlVGFnID09PSBIb3N0UG9ydGFsKSB7XG4gICAgICAgICAgICAvLyBUaGUgdGFyZ2V0IGlzIGEgcG9ydGFsLCBidXQgaXQncyBub3QgdGhlIHJvb3RDb250YWluZXIgd2UncmUgbG9va2luZyBmb3IuXG4gICAgICAgICAgICAvLyBOb3JtYWxseSBwb3J0YWxzIGhhbmRsZSB0aGVpciBvd24gZXZlbnRzIGFsbCB0aGUgd2F5IGRvd24gdG8gdGhlIHJvb3QuXG4gICAgICAgICAgICAvLyBTbyB3ZSBzaG91bGQgYmUgYWJsZSB0byBzdG9wIG5vdy4gSG93ZXZlciwgd2UgZG9uJ3Qga25vdyBpZiB0aGlzIHBvcnRhbFxuICAgICAgICAgICAgLy8gd2FzIHBhcnQgb2YgKm91ciogcm9vdC5cbiAgICAgICAgICAgIHZhciBncmFuZE5vZGUgPSBub2RlLnJldHVybjtcblxuICAgICAgICAgICAgd2hpbGUgKGdyYW5kTm9kZSAhPT0gbnVsbCkge1xuICAgICAgICAgICAgICB2YXIgZ3JhbmRUYWcgPSBncmFuZE5vZGUudGFnO1xuXG4gICAgICAgICAgICAgIGlmIChncmFuZFRhZyA9PT0gSG9zdFJvb3QgfHwgZ3J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GNvcnJlY3RcbiAgICAgICAgICAvLyBub2RlIHRoYXQgaXMgZnJvbSB0aGUgb3RoZXIgdHJlZS5cblxuXG4gICAgICAgICAgd2hpbGUgKGNvbnRhaW5lciAhPT0gbnVsbCkge1xuICAgICAgICAgICAgdmFyIHBhcmVudE5vZGUgPSBnZXRDbG9zZXN0SW5zdGFuY2VGcm9tTm9kZShjb250YWluZXIpO1xuXG4gICAgICAgICAgICBpZiAocGFyZW50Tm9kZSA9PT0gbnVsbCkge1xuICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHZhciBwYXJlbnRUYWcgPSBwYXJlbnROb2RlLnRhZztcblxuICAgICAgICAgICAgaWYgKHBhcmVudFRhZyA9PT0gSG9zdENvbXBvbmVudCB8fCBwYXJlbnRUYWcgPT09IEhvc3RUZXh0KSB7XG4gICAgICAgICAgICAgIG5vZGUgPSBhbmNlc3Rvckluc3QgPSBwYXJlbnROb2RlO1xuICAgICAgICAgICAgICBjb250aW51ZSBtYWluTG9vcDtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgY29udGFpbmVyID0gY29udGFpbmVyLnBhcmVudE5vZGU7XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgbm9kZSA9IG5vZGUucmV0dXJuO1xuICAgICAgfVxuICAgIH1cbiAgfVxuXG4gIGJhdGNoZWRFdmVudFVwZGF0ZXMoZnVuY3Rpb24gKCkge1xuICAgIHJldHVybiBkaXNwYXRjaEV2ZW50c0ZvclBsdWdpbnMoZG9tRXZlbnROYW1lLCBldmVudFN5c3RlbUZsYWdzLCBuYXRpdmVFdmVudCwgYW5jZXN0b3JJbnN0KTtcbiAgfSk7XG59XG5cbmZ1bmN0aW9uIGNyZWF0ZURpc3BhdGNoTGlzdGVuZXIoaW5zdGFuY2UsIGxpc3RlbmVyLCBjdXJyZW50VGFyZ2V0KSB7XG4gIHJldHVybiB7XG4gICAgaW5zdGFuY2U6IGluc3Rh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UNUX1BPUlRBTF9UWVBFOlxuICAgICAgICAgIHdhcm5Gb3JNaXNzaW5nS2V5KGNoaWxkLCByZXR1cm5GaWJlcik7XG4gICAgICAgICAgdmFyIGtleSA9IGNoaWxkLmtleTtcblxuICAgICAgICAgIGlmICh0eXBlb2Yga2V5ICE9PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKGtub3duS2V5cyA9PT0gbnVsbCkge1xuICAgICAgICAgICAga25vd25LZXlzID0gbmV3IFNldCgpO1xuICAgICAgICAgICAga25vd25LZXlzLmFkZChrZXkpO1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKCFrbm93bktleXMuaGFzKGtleSkpIHtcbiAgICAgICAgICAgIGtub3duS2V5cy5hZGQoa2V5KTtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGVycm9yKCdFbmNvdW50ZXJlZCB0d28gY2hpbGRyZW4gd2l0aCB0aGUgc2FtZSBrZXksIGAlc2AuICcgKyAnS2V5cyBzaG91bGQgYmUgdW5pcXVlIHNvIHRoYXQgY29tcG9uZW50cyBtYWludGFpbiB0aGVpciBpZGVudGl0eSAnICsgJ2Fjcm9zcyB1cGRhdGVzLiBOb24tdW5pcXVlIGtleXMgbWF5IGNhdXNlIGNoaWxkcmVuIHRvIGJlICcgKyAnZHVwbGljYXRlZCBhbmQvb3Igb21pdHRlZCDigJQgdGhlIGJlaGF2aW9yIGlzIHVuc3VwcG9ydGVkIGFuZCAnICsgJ2NvdWxkIGNoYW5nZSBpbiBhIGZ1dHVyZSB2ZXJzaW9uLicsIGtleSk7XG5cbiAgICAgICAgICBicmVhaztcbiAgICAgIH1cbiAgICB9XG5cbiAgICByZXR1cm4ga25vd25LZXlzO1xuICB9XG5cbiAgZnVuY3Rpb24gcmVjb25jaWxlQ2hpbGRyZW5BcnJheShyZXR1cm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ICAgICAgcmV0dXJuIGV4aXN0aW5nO1xuICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICBjYXNlIEJsb2NrOlxuXG4gICAgICAgICAgLy8gV2UgaW50ZW50aW9uYWxseSBmYWxsdGhyb3VnaCBoZXJlIGlmIGVuYWJsZUJsb2Nrc0FQSSBpcyBub3Qgb24uXG4gICAgICAgICAgLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lZCBuby1mYWxsdGhyb3VnaFxuXG4gICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgaWYgKGNoaWxkLmVsZW1lbnRUeXBlID09PSBlbGVtZW50LnR5cGUgfHwgKCAvLyBLZWVwIHRoaXMgY2hlY2sgaW5saW5lIHNvIGl0IG9ubHkgcnVucyBvbiB0aGUgZmFsc2UgcGF0aDpcbiAgICAgICAgICAgICAgIGlzQ29tcGF0aWJsZUZhbWlseUZvckhvdFJlbG9hZGluZyhjaGlsZCwgZWxlbWVudCkgKSkge1xuICAgICAgICAgICAgICAgIGRlbGV0ZVJlbWFpbmluZ0NoaWxkcmVuKHJldHVybkZpYmVyLCBjaGlsZC5zaWJsaW5nKTtcblxuICAgICAgICAgICAgICAgIHZhciBfZXhpc3RpbmczID0gdXNlRmliZXIoY2hpbGQsIGVsZW1lbnQucHJvcHMpO1xuXG4gICAgICAgICAgICAgICAgX2V4aXN0aW5nMy5yZWYgPSBjb2VyY2VSZWYocmV0dXJuRmliZXIsIGNoaWxkLCBlbGVtZW50KTtcbiAgICAgICAgICAgICAgICBfZXhpc3RpbmczLnJldHVybiA9IHJldHVybkZpYmVyO1xuXG4gICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgX2V4aXN0aW5nMy5fZGVidWdTb3VyY2UgPSBlbGVtZW50Ll9zb3VyY2U7XG4gICAgICAgICAgICAgICAgICBfZXhpc3RpbmczLl9kZWJ1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vbmVudCwgdGhyb3cgYW4gZXJyb3IuIElmIEZpYmVyIHJldHVybiB0eXBlcyBhcmUgZGlzYWJsZWQsXG4gICAgICAvLyB3ZSBhbHJlYWR5IHRocmV3IGFib3ZlLlxuICAgICAgc3dpdGNoIChyZXR1cm5GaWJlci50YWcpIHtcbiAgICAgICAgY2FzZSBDbGFzc0NvbXBvbmVudDpcbiAgICAgICAgICB7XG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIHZhciBpbnN0YW5jZSA9IHJldHVybkZpYmVyLnN0YXRlTm9kZTtcblxuICAgICAgICAgICAgICBpZiAoaW5zdGFuY2UucmVuZGVyLl9pc01vY2tGdW5jdGlvbikge1xuICAgICAgICAgICAgICAgIC8vIFdlIGFsbG93IGF1dG8tbW9ja3MgdG8gcHJvY2VlZCBhcyBpZiB0aGV5J3JlIHJldHVybmluZyBudWxsLlxuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICAvLyBJbnRlbnRpb25hbGx5IGZhbGwgdGhyb3VnaCB0byB0aGUgbmV4dCBjYXNlLCB3aGljaCBoYW5kbGVzIGJvdGhcbiAgICAgICAgLy8gZnVuY3Rpb25zIGFuZCBjbGFzc2VzXG4gICAgICAgIC8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZWQgbm8tZmFsbHRocm91Z2hcblxuICAgICAgICBjYXNlIEJsb2NrOlxuICAgICAgICBjYXNlIEZ1bmN0aW9uQ29tcG9uZW50OlxuICAgICAgICBjYXNlIEZvcndhcmRSZWY6XG4gICAgICAgIGNhc2UgU2ltcGxlTWVtb0NvbXBvbmVudDpcbiAgICAgICAgICB7XG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICB0aHJvdyBFcnJvciggKGdldENvbXBvbmVudE5hbWUocmV0dXJuRmliZXIudHlwZSkgfHwgJ0NvbXBvbmVudCcpICsgXCIoLi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gY2hpbGRUb0RlbGV0ZTtcbiAgfSBlbHNlIHtcbiAgICByZXR1cm5GaWJlci5maXJzdEVmZmVjdCA9IHJldHVybkZpYmVyLmxhc3RFZmZlY3QgPSBjaGlsZFRvRGVsZXRlO1xuICB9XG59XG5cbmZ1bmN0aW9uIGluc2VydE5vbkh5ZHJhdGVkSW5zdGFuY2UocmV0dXJuRmliZXIsIGZpYmVyKSB7XG4gIGZpYmVyLmZsYWdzID0gZmliZXIuZmxhZ3MgJiB+SHlkcmF0aW5nIHwgUGxhY2VtZW50O1xuXG4gIHtcbiAgICBzd2l0Y2ggKHJldHVybkZpYmVyLnRhZykge1xuICAgICAgY2FzZSBIb3N0Um9vdDpcbiAgICAgICAge1xuICAgICAgICAgIHZhciBwYXJlbnRDb250YWluZXIgPSByZXR1cm5GaWJlci5zdGF0ZU5vZGUuY29udGFpbmVySW5mbztcblxuICAgICAgICAgIHN3aXRjaCAoZmliZXIudGFnKSB7XG4gICAgICAgICAgICBjYXNlIEhvc3RDb21wb25lbnQ6XG4gICAgICAgICAgICAgIHZhciB0eXBlID0gZmliZXIudHlwZTtcbiAgICAgICAgICAgICAgdmFyIHByb3BzID0gZmliZXIucGVuZGluZ1Byb3BzO1xuICAgICAgICAgICAgICBkaWROb3RGaW5kSHlkcmF0YWJsZUNvbnRhaW5lckluc3RhbmNlKHBhcmVudENvbnRhaW5lciwgdHlwZSk7XG4gICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICBjYXNlIEhvc3RUZXh0OlxuICAgICAgICAgICAgICB2YXIgdGV4dCA9IGZpYmVyLnBlbmRpbmdQcm9wcztcbiAgICAgICAgICAgICAgZGlkTm90RmluZEh5ZHJhdGFibGVDb250YWluZXJUZXh0SW5zdGFuY2UocGFyZW50Q29udGFpbmVyLCB0ZXh0KTtcbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cblxuICAgICAgY2FzZSBIb3N0Q29tcG9uZW50OlxuICAgICAgICB7XG4gICAgICAgICAgdmFyIHBhcmVudFR5cGUgPSByZXR1cm5GaWJlci50eXBlO1xuICAgICAgICAgIHZhciBwYXJlbnRQcm9wcyA9IHJldHVybkZpYmVyLm1lbW9pemVkUHJvcHM7XG4gICAgICAgICAgdmFyIHBhcmVudEluc3RhbmNlID0gcmV0dXJuRmliZXIuc3RhdGVOb2RlO1xuXG4gICAgICAgICAgc3dpdGNoIChmaWJlci50YWcpIHtcbiAgICAgICAgICAgIGNhc2UgSG9zdENvbXBvbmVudDpcbiAgICAgICAgICAgICAgdmFyIF90eXBlID0gZmliZXIudHlwZTtcbiAgICAgICAgICAgICAgdmFyIF9wcm9wcyA9IGZpYmVyLnBlbmRpbmdQcm9wcztcbiAgICAgICAgICAgICAgZGlkTm90RmluZEh5ZHJhdGFibGVJbnN0YW5jZShwYXJlbnRUeXBlLCBwYXJlbnRQcm9wcywgcGFyZW50SW5zdGFuY2UsIF90eXBlKTtcbiAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgIGNhc2UgSG9zdFRleHQ6XG4gICAgICAgICAgICAgIHZhciBfdGV4dCA9IGZpYmVyLnBlbmRpbmdQcm9wcztcbiAgICAgICAgICAgICAgZGlkTm90RmluZEh5ZHJhdGFibGVUZXh0SW5zdGFuY2UocGFyZW50VHlwZSwgcGFyZW50UHJvcHMsIHBhcmVudEluc3RhbmNlLCBfdGV4dCk7XG4gICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICBjYXNlIFN1c3BlbnNlQ29tcG9uZW50OlxuICAgICAgICAgICAgICBkaWROb3RGaW5kSHlkcmF0YWJsZVN1c3BlbnNlSW5zdGFuY2UocGFyZW50VHlwZSwgcGFyZW50UHJvcHMpO1xuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuXG4gICAgICBkZWZhdWx0OlxuICAgICAgICByZ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mVudEZpYmVyO1xuXG4gICAgICBpZiAocmV0dXJuRmliZXIgIT09IG51bGwpIHtcbiAgICAgICAgc3dpdGNoIChyZXR1cm5GaWJlci50YWcpIHtcbiAgICAgICAgICBjYXNlIEhvc3RSb290OlxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICB2YXIgcGFyZW50Q29udGFpbmVyID0gcmV0dXJuRmliZXIuc3RhdGVOb2RlLmNvbnRhaW5lckluZm87XG4gICAgICAgICAgICAgIGRpZE5vdE1hdGNoSHlkcmF0ZWRDb250YWluZXJUZXh0SW5zdGFuY2UocGFyZW50Q29udGFpbmVyLCB0ZXh0SW5zdGFuY2UsIHRleHRDb250ZW50KTtcbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICBjYXNlIEhvc3RDb21wb25lbnQ6XG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIHZhciBwYXJlbnRUeXBlID0gcmV0dXJuRmliZXIudHlwZTtcbiAgICAgICAgICAgICAgdmFyIHBhcmVudFByb3BzID0gcmV0dXJuRmliZXIubWVtb2l6ZWRQcm9wcztcbiAgICAgICAgICAgICAgdmFyIHBhcmVudEluc3RhbmNlID0gcmV0dXJuRmliZXIuc3RhdGVOb2RlO1xuICAgICAgICAgICAgICBkaWROb3RNYXRjaEh5ZHJhdGVkVGV4dEluc3RhbmNlKHBhcmVudFR5cGUsIHBhcmVudFByb3BzLCBwYXJlbnRJbnN0YW5jZSwgdGV4dEluc3RhbmNlLCB0ZXh0Q29udGVudCk7XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG4gICAgfVxuICB9XG5cbiAgcmV0dXJuIHNob3VsZFVwZGF0ZTtcbn1cblxuZnVuY3Rpb24gc2tpcFBhc3REZWh5ZHJhdGVkU3VzcGVuc2VJbnN0YW5jZShmaWJlcikge1xuXG4gIHZhciBzdXNwZW5zZVN0YXRlID0gZmliZXIubWVtb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AgICAgICAgICAvLyBBdCB0aGUgc2FtZSB0aW1lIHdlJ3JlIGdvaW5nIHRvIHJldmVyc2UgdGhlIGxpc3Qgb2YgZXZlcnl0aGluZ1xuICAgICAgICAgIC8vIHdlIHBhc3MgaW4gdGhlIG1lYW50aW1lLiBUaGF0J3MgZ29pbmcgdG8gYmUgb3VyIHRhaWwgaW4gcmV2ZXJzZVxuICAgICAgICAgIC8vIG9yZGVyLlxuICAgICAgICAgIHZhciBfdGFpbCA9IG51bGw7XG4gICAgICAgICAgdmFyIHJvdyA9IHdvcmtJblByb2dyZXNzLmNoaWxkO1xuICAgICAgICAgIHdvcmtJblByb2dyZXNzLmNoaWxkID0gbnVsbDtcblxuICAgICAgICAgIHdoaWxlIChyb3cgIT09IG51bGwpIHtcbiAgICAgICAgICAgIHZhciBjdXJyZW50Um93ID0gcm93LmFsdGVybmF0ZTsgLy8gTmV3IHJvd3MgY2FuJ3QgYmUgY29udGVudCByb3dzLlxuXG4gICAgICAgICAgICBpZiAoY3VycmVudFJvdyAhPT0gbnVsbCAmJiBmaW5kRmlyc3RTdXNwZW5kZWQoY3VycmVudFJvdykgPT09IG51bGwpIHtcbiAgICAgICAgICAgICAgLy8gVGhpcyBpcyB0aGUgYmVnaW5uaW5nIG9mIHRoZSBtYWluIGNvbnRlbnQuXG4gICAgICAgICAgICAgIHdvcmtJblByb2dyZXNzLmNoaWxkID0gcm93O1xuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgdmFyIG5leHRSb3cgPSByb3cuc2libGluZztcbiAgICAgICAgICAgIHJvdy5zaWJsaW5nID0gX3RhaWw7XG4gICAgICAgICAgICBfdGFpbCA9IHJvdztcbiAgICAgICAgICAgIHJvdyA9IG5leHRSb3c7XG4gICAgICAgICAgfSAvLyBUT0RPOiBJZiB3b3JrSW5Qcm9ncmVzcy5jaGlsZCBpcyBudWxsLCB3ZSBjYW4gY29udGludWUgb24gdGhlIHRhaWwgaW1tZWRp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yZXNzKTtcbiAgICAgICAgICBicmVhaztcblxuICAgICAgICBjYXNlIENsYXNzQ29tcG9uZW50OlxuICAgICAgICAgIHtcbiAgICAgICAgICAgIHZhciBDb21wb25lbnQgPSB3b3JrSW5Qcm9ncmVzcy50eXBlO1xuXG4gICAgICAgICAgICBpZiAoaXNDb250ZXh0UHJvdmlkZXIoQ29tcG9uZW50KSkge1xuICAgICAgICAgICAgICBwdXNoQ29udGV4dFByb3ZpZGVyKHdvcmtJblByb2dyZXNzKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgfVxuXG4gICAgICAgIGNhc2UgSG9zdFBvcnRhbDpcbiAgICAgICAgICBwdXNoSG9zdENvbnRhaW5lcih3b3JrSW5Qcm9ncmVzcywgd29ya0luUHJvZ3Jlc3Muc3RhdGVOb2RlLmNvbnRhaW5lckluZm8pO1xuICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgIGNhc2UgQ29udGV4dFByb3ZpZGVyOlxuICAgICAgICAgIHtcbiAgICAgICAgICAgIHZhciBuZXdWYWx1ZSA9IHdvcmtJblByb2dyZXNzLm1lbW9pemVkUHJvcHMudmFsdWU7XG4gICAgICAgICAgICBwdXNoUHJvdmlkZXIod29ya0luUHJvZ3Jlc3MsIG5ld1ZhbHVlKTtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIH1cblxuICAgICAgICBjYXNlIFByb2ZpbGVyOlxuICAgICAgICAgIHtcbiAgICAgICAgICAgIC8vIFByb2ZpbGVyIHNob3VsZCBvbmx5IGNhbGwgb25SZW5kZXIgd2hlbiBvbmUgb2YgaXRzIGRlc2NlbmRhbnRzIGFjdHVhbGx5IHJlbmRlcmVkLlxuICAgICAgICAgICAgdmFyIGhhc0NoaWxkV29yayA9IGluY2x1ZGVzU29tZUxhbmUocmVuZGVyTGFuZXMsIHdvcmtJblByb2dyZXNzLmNoaWxkTGFuZXMpO1xuXG4gICAgICAgICAgICBpZiAoaG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k7XG5cbiAgICAgICAgICAgICAgICBpZiAoY2hpbGQgIT09IG51bGwpIHtcbiAgICAgICAgICAgICAgICAgIC8vIFRoZSBmYWxsYmFjayBjaGlsZHJlbiBoYXZlIHBlbmRpbmcgd29yay4gU2tpcCBvdmVyIHRoZVxuICAgICAgICAgICAgICAgICAgLy8gcHJpbWFyeSBjaGlsZHJlbiBhbmQgd29yayBvbiB0aGUgZmFsbGJhY2suXG4gICAgICAgICAgICAgICAgICByZXR1cm4gY2hpbGQuc2libGluZztcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICBwdXNoU3VzcGVuc2VDb250ZXh0KHdvcmtJblByb2dyZXNzLCBzZXREZWZhdWx0U2hhbGxvd1N1c3BlbnNlQ29udGV4dChzdXNwZW5zZVN0YWNrQ3Vyc29yLmN1cnJlbnQpKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgfVxuXG4gICAgICAgIGNhc2UgU3VzcGVuc2VMaXN0Q29tcG9uZW50OlxuICAgICAgICAgIHtcbiAgICAgICAgICAgIHZhciBkaWRTdXNwZW5kQmVmb3JlID0gKGN1cnJlbnQuZmxhZ3MgJiBEaWRDYXB0dXJlKSAhPT0gTm9GbGFncztcblxuICAgICAgICAgICAgdmFyIF9oYXNDaGlsZFdvcmsgPSBpbmNsdWRlc1NvbWVMYW5lKHJlbmRlckxhbmVzLCB3b3JrSW5Qcm9ncmVzcy5jaGlsZExhbmVzKTtcblxuICAgICAgICAgICAgaWYgKGRpZFN1c3BlbmRCZWZvcmUpIHtcbiAgICAgICAgICAgICAgaWYgKF9oYXNDaGlsZFdvcmspIHtcbiAgICAgICAgICAgICAgICAvLyBJZiBzb21ldGhpbmcgd2FzIGluIGZhbGxiYWNrIHN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lZFNuYXBzaG90QmVmb3JlVXBkYXRlO1xuXG4gICAgICAgICAgICAgIGlmIChzbmFwc2hvdCA9PT0gdW5kZWZpbmVkICYmICFkaWRXYXJuU2V0LmhhcyhmaW5pc2hlZFdvcmsudHlwZSkpIHtcbiAgICAgICAgICAgICAgICBkaWRXYXJuU2V0LmFkZChmaW5pc2hlZFdvcmsudHlwZSk7XG5cbiAgICAgICAgICAgICAgICBlcnJvcignJXMuZ2V0U25hcHNob3RCZWZvcmVVcGRhdGUoKTogQSBzbmFwc2hvdCB2YWx1ZSAob3IgbnVsbCkgJyArICdtdXN0IGJlIHJldHVybmVkLiBZb3UgaGF2ZSByZXR1cm5lZCB1bmRlZmluZWQuJywgZ2V0Q29tcG9uZW50TmFtZShmaW5pc2hlZFdvcmsudHlwZSkpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGluc3RhbmNlLl9fcmVhY3RJbnRlcm5hbFNuYXBzaG90QmVmb3JlVXBkYXRlID0gc25hcHNob3Q7XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuO1xuICAgICAgfVxuXG4gICAgY2FzZSBIb3N0Um9vdDpcbiAgICAgIHtcbiAgICAgICAge1xuICAgICAgICAgIGlmIChmaW5pc2hlZFdvcmsuZmxhZ3MgJiBTbmFwc2hvdCkge1xuICAgICAgICAgICAgdmFyIHJvb3QgPSBmaW5pc2hlZFdvcmsuc3RhdGVOb2RlO1xuICAgICAgICAgICAgY2xlYXJDb250YWluZXIocm9vdC5jb250YWluZXJJbmZvKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm47XG4gICAgICB9XG5cbiAgICBjYXNlIEhvc3RDb21wb25lbnQ6XG4gICAgY2FzZSBIb3N0VGV4dDpcbiAgICBjYXNlIEhvc3RQb3J0YWw6XG4gICAgY2FzZSBJbmNvbXBsZXRlQ2xhc3NDb21wb25lbnQ6XG4gICAgICAvLy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RdWV1ZShmaW5pc2hlZFdvcmssIHVwZGF0ZVF1ZXVlLCBpbnN0YW5jZSk7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm47XG4gICAgICB9XG5cbiAgICBjYXNlIEhvc3RSb290OlxuICAgICAge1xuICAgICAgICAvLyBUT0RPOiBJIHRoaW5rIHRoaXMgaXMgbm93IGFsd2F5cyBub24tbnVsbCBieSB0aGUgdGltZSBpdCByZWFjaGVzIHRoZVxuICAgICAgICAvLyBjb21taXQgcGhhc2UuIENvbnNpZGVyIHJlbW92aW5nIHRoZSB0eXBlIGNoZWNrLlxuICAgICAgICB2YXIgX3VwZGF0ZVF1ZXVlID0gZmluaXNoZWRXb3JrLnVwZGF0ZVF1ZXVlO1xuXG4gICAgICAgIGlmIChfdXBkYXRlUXVldWUgIT09IG51bGwpIHtcbiAgICAgICAgICB2YXIgX2luc3RhbmNlID0gbnVsbDtcblxuICAgICAgICAgIGlmIChmaW5pc2hlZFdvcmsuY2hpbGQgIT09IG51bGwpIHtcbiAgICAgICAgICAgIHN3aXRjaCAoZmluaXNoZWRXb3JrLmNoaWxkLnRhZykge1xuICAgICAgICAgICAgICBjYXNlIEhvc3RDb21wb25lbnQ6XG4gICAgICAgICAgICAgICAgX2luc3RhbmNlID0gZ2V0UHVibGljSW5zdGFuY2UoZmluaXNoZWRXb3JrLmNoaWxkLnN0YXRlTm9kZSk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgICAgY2FzZSBDbGFzc0NvbXBvbmVudDpcbiAgICAgICAgICAgICAgICBfaW5zdGFuY2UgPSBmaW5pc2hlZFdvcmsuY2hpbGQuc3RhdGVOb2RlO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cblxuICAgICAgICAgIGNvbW1pdFVwZGF0ZVF1ZXVlKGZpbmlzaGVkV29yaywgX3VwZGF0ZVF1ZXVlLCBfaW5zdGFuY2UpO1xuICAgICAgICB9XG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ICAgaGlkZUluc3RhbmNlKGluc3RhbmNlKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICB1bmhpZGVJbnN0YW5jZShub2RlLnN0YXRlTm9kZSwgbm9kZS5tZW1vaXplZFByb3BzKTtcbiAgICAgICAgfVxuICAgICAgfSBlbHNlIGlmIChub2RlLnRhZyA9PT0gSG9zdFRleHQpIHtcbiAgICAgICAgdmFyIF9pbnN0YW5jZTMgPSBub2RlLnN0YXRlTm9kZTtcblxuICAgICAgICBpZiAoaXNIaWRkZW4pIHtcbiAgICAgICAgICBoaWRlVGV4dEluc3RhbmNlKF9pbnN0YW5jZTMpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHVuaGlkZVRleHRJbnN0YW5jZShfaW5zdGFuY2UzLCBub2RlLm1lbW9pemVkUHJvcHMpO1xuICAgICAgICB9XG4gICAgICB9IGVsc2UgaWYgKChub2RlLnRhZyA9PT0gT2Zmc2NyZWVuQ29tcG9uZW50IHx8IG5vZGUudGFnID09PSBMZWdhY3lIaWRkZW5Db21wb25lbnQpICYmIG5vZGUubWVtb2l6ZWRTdGF0ZSAhPT0gbnVsbCAmJiBub2RlICE9PSBmaW5pc2hlZFdvcmspIDsgZWxzZSBpZiAobm9kZS5jaGlsZCAhPT0gbnVsbCkge1xuICAgICAgICBub2RlLmNoaWxkLnJldHVybiA9IG5vZGU7XG4gICAgICAgIG5vZGUgPSBub2RlLmNoaWxkO1xuICAgICAgICBjb250aW51ZTtcbiAgICAgIH1cblxuICAgICAgaWYgKG5vZGUgPT09IGZpbmlzaGVkV29yaykge1xuICAgICAgICByZXR1cm47XG4gICAgICB9XG5cbiAgICAgIHdoaWxlIChub2RlLnNpYmxpbmcgPT09IG51bGwpIHtcbiAgICAgICAgaWYgKG5vZGUucmV0dXJuID09PSBudWxsIHx8IG5vZGUucmV0dXJuID09PSBmaW5pc2hlZFdvcmspIHtcbiAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICBub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XRlUXVldWUgIT09IG51bGwpIHtcbiAgICAgICAgICB2YXIgbGFzdEVmZmVjdCA9IHVwZGF0ZVF1ZXVlLmxhc3RFZmZlY3Q7XG5cbiAgICAgICAgICBpZiAobGFzdEVmZmVjdCAhPT0gbnVsbCkge1xuICAgICAgICAgICAgdmFyIGZpcnN0RWZmZWN0ID0gbGFzdEVmZmVjdC5uZXh0O1xuICAgICAgICAgICAgdmFyIGVmZmVjdCA9IGZpcnN0RWZmZWN0O1xuXG4gICAgICAgICAgICBkbyB7XG4gICAgICAgICAgICAgIHZhciBfZWZmZWN0MiA9IGVmZmVjdCxcbiAgICAgICAgICAgICAgICAgIGRlc3Ryb3kgPSBfZWZmZWN0Mi5kZXN0cm95LFxuICAgICAgICAgICAgICAgICAgdGFnID0gX2VmZmVjdDIudGFnO1xuXG4gICAgICAgICAgICAgIGlmIChkZXN0cm95ICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgICAgICBpZiAoKHRhZyAmIFBhc3NpdmUkMSkgIT09IE5vRmxhZ3MkMSkge1xuICAgICAgICAgICAgICAgICAgZW5xdWV1ZVBlbmRpbmdQYXNzaXZlSG9va0VmZmVjdFVubW91bnQoY3VycmVudCwgZWZmZWN0KTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICBzYWZlbHlDYWxsRGVzdHJveShjdXJyZW50LCBkZXN0cm95KTtcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICBlZmZlY3QgPSBlZmZlY3QubmV4dDtcbiAgICAgICAgICAgIH0gd2hpbGUgKGVmZmVjdCAhPT0gZmlyc3RFZmZlY3QpO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybjtcbiAgICAgIH1cblxuICAgIGNhc2UgQ2xhc3NDb21wb25lbnQ6XG4gICAgICB7XG4gICAgICAgIHNhZmVseURldGFjaFJlZihjdXJyZW50KTtcbiAgICAgICAgdmFyIGluc3RhbmNlID0gY3VycmVudC5zdGF0ZU5vZGU7XG5cbiAgICAgICAgaWYgKHR5cGVvZiBpbnN0YW5jZS5jb21wb25lbnRXaWxsVW5tb3VudCA9PT0gJ2Z1bmN0aW9uJykge1xuICAgICAgICAgIHNhZmVseUNhbGxDb21wb25lbnRXaWxsVW5tb3VudChjdXJyZW50LCBpbnN0YW5jZSk7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm47XG4gICAgICB9XG5cbiAgICBjYXNlIEhvc3RDb21wb25lbnQ6XG4gICAgICB7XG4gICAgICAgIHNhZmVseURldGFjaFJlZihjdXJyZW50KTtcbiAgICAgICAgcmV0dXJuO1xuICAgICAgfVxuXG4gICAgY2FzZSBIb3N0UG9ydGFsOlxuICAgICAge1xuICAgICAgICAvLyBUT0RPOiB0aGlzIGlzIHJlY3Vyc2l2ZS5cbiAgICAgICAgLy8gV2UgYXJlIGFsc28gbm90IHVzaW5nIHRoaXMgcGFyZW50IGJlY2F1c2VcbiAgICAgICAgLy8gdGhlIHBvcnRhbCB3aWxsIGdldCBwdXNoZWQgaW1tZWRpYXRlbHkuXG4gICAgICAgIHtcbiAgICAgICAgICB1bm1vdW50SG9zdENvbXBvbmVudHMoZmluaXNoZWRSb290LCBjdXJyZW50KTtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybjtcbiAgICAgIH1cblxuICAgIGNhc2UgRnVuZGFtZW50YWxDb21wb25lbnQ6XG4gICAgICB7XG5cbiAgICAgICAgcmV0dXJuO1xuICAgICAgfVxuXG4gICAgY2FzZSBEZWh5ZHJhdGVkRnJhZ21lbnQ6XG4gICAgICB7XG5cbiAgICAgICAgcmV0dXJuO1xuICAgICAgfVxuXG4gICAgY2FzZSBTY29wZUNvbXBvbmVudDpcbiAgICAgIHtcblxuICAgICAgICByZXR1cm47XG4gICAgICB9XG4gIH1cbn1cblxuZnVuY3Rp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BhcmVudCA9IG5vZGUucmV0dXJuO1xuXG4gICAgICBmaW5kUGFyZW50OiB3aGlsZSAodHJ1ZSkge1xuICAgICAgICBpZiAoIShwYXJlbnQgIT09IG51bGwpKSB7XG4gICAgICAgICAge1xuICAgICAgICAgICAgdGhyb3cgRXJyb3IoIFwiRXhwZWN0ZWQgdG8gZmluZCBhIGhvc3QgcGFyZW50LiBUaGlzIGVycm9yIGlzIGxpa2VseSBjYXVzZWQgYnkgYSBidWcgaW4gUmVhY3QuIFBsZWFzZSBmaWxlIGFuIGlzc3VlLlwiICk7XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgdmFyIHBhcmVudFN0YXRlTm9kZSA9IHBhcmVudC5zdGF0ZU5vZGU7XG5cbiAgICAgICAgc3dpdGNoIChwYXJlbnQudGFnKSB7XG4gICAgICAgICAgY2FzZSBIb3N0Q29tcG9uZW50OlxuICAgICAgICAgICAgY3VycmVudFBhcmVudCA9IHBhcmVudFN0YXRlTm9kZTtcbiAgICAgICAgICAgIGN1cnJlbnRQYXJlbnRJc0NvbnRhaW5lciA9IGZhbHNlO1xuICAgICAgICAgICAgYnJlYWsgZmluZFBhcmVudDtcblxuICAgICAgICAgIGNhc2UgSG9zdFJvb3Q6XG4gICAgICAgICAgICBjdXJyZW50UGFyZW50ID0gcGFyZW50U3RhdGVOb2RlLmNvbnRhaW5lckluZm87XG4gICAgICAgICAgICBjdXJyZW50UGFyZW50SXNDb250YWluZXIgPSB0cnVlO1xuICAgICAgICAgICAgYnJlYWsgZmluZFBhcmVudDtcblxuICAgICAgICAgIGNhc2UgSG9zdFBvcnRhbDpcbiAgICAgICAgICAgIGN1cnJlbnRQYXJlbnQgPSBwYXJlbnRTdGF0ZU5vZGUuY29udGFpbmVySW5mbztcbiAgICAgICAgICAgIGN1cnJlbnRQYXJlbnRJc0NvbnRhaW5lciA9IHRydWU7XG4gICAgICAgICAgICBicmVhayBmaW5kUGFyZW50O1xuXG4gICAgICAgIH1cblxuICA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VzKTtcbiAgICAgICAgICB2YXIgZXZlbnRUaW1lTXMgPSBtb3N0UmVjZW50RXZlbnRUaW1lO1xuICAgICAgICAgIHZhciB0aW1lRWxhcHNlZE1zID0gbm93KCkgLSBldmVudFRpbWVNcztcblxuICAgICAgICAgIHZhciBfbXNVbnRpbFRpbWVvdXQgPSBqbmQodGltZUVsYXBzZWRNcykgLSB0aW1lRWxhcHNlZE1zOyAvLyBEb24ndCBib3RoZXIgd2l0aCBhIHZlcnkgc2hvcnQgc3VzcGVuc2UgdGltZS5cblxuXG4gICAgICAgICAgaWYgKF9tc1VudGlsVGltZW91dCA+IDEwKSB7XG4gICAgICAgICAgICAvLyBJbnN0ZWFkIG9mIGNvbW1pdHRpbmcgdGhlIGZhbGxiYWNrIGltbWVkaWF0ZWx5LCB3YWl0IGZvciBtb3JlIGRhdGFcbiAgICAgICAgICAgIC8vIHRvIGFycml2ZS5cbiAgICAgICAgICAgIHJvb3QudGltZW91dEhhbmRsZSA9IHNjaGVkdWxlVGltZW91dChjb21taXRSb290LmJpbmQobnVsbCwgcm9vdCksIF9tc1VudGlsVGltZW91dCk7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICB9XG4gICAgICAgIH0gLy8gQ29tbWl0IHRoZSBwbGFjZWhvbGRlci5cblxuXG4gICAgICAgIGNvbW1pdFJvb3Qocm9vdCk7XG4gICAgICAgIGJyZWFrO1xuICAgICAgfVxuXG4gICAgY2FzZSBSb290Q29tcGxldGVkOlxuICAgICAge1xuICAgICAgICAvLyBUaGUgd29yayBjb21wbGV0ZWQuIFJlYWR5IHRvIGNvbW1pdC5cbiAgICAgICAgY29tbWl0Um9vdChyb290KTtcbiAgICAgICAgYnJlYWs7XG4gICAgICB9XG5cbiAgICBkZWZhdWx0OlxuICAgICAge1xuICAgICAgICB7XG4gICAgICAgICAge1xuICAgICAgICAgICAgdGhyb3cgRXJyb3IoIFwiVW5rbm93biByb290IGV4aXQgc3RhdHVzLlwiICk7XG4gICAgICAgICAg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YW5jZXNGb3JGaWJlclNoYWxsb3dseShmaWJlciwgaG9zdEluc3RhbmNlcykge1xuICB7XG4gICAgdmFyIG5vZGUgPSBmaWJlcjtcbiAgICB2YXIgZm91bmRIb3N0SW5zdGFuY2VzID0gZmFsc2U7XG5cbiAgICB3aGlsZSAodHJ1ZSkge1xuICAgICAgaWYgKG5vZGUudGFnID09PSBIb3N0Q29tcG9uZW50KSB7XG4gICAgICAgIC8vIFdlIGdvdCBhIG1hdGNoLlxuICAgICAgICBmb3VuZEhvc3RJbnN0YW5jZXMgPSB0cnVlO1xuICAgICAgICBob3N0SW5zdGFuY2VzLmFkZChub2RlLnN0YXRlTm9kZSk7IC8vIFRoZXJlIG1heSBzdGlsbCBiZSBtb3JlLCBzbyBrZWVwIHNlYXJjaGluZy5cbiAgICAgIH0gZWxzZSBpZiAobm9kZS5jaGlsZCAhPT0gbnVsbCkge1xuICAgICAgICBub2RlLmNoaWxkLnJldHVybiA9IG5vZGU7XG4gICAgICAgIG5vZGUgPSBub2RlLmNoaWxkO1xuICAgICAgICBjb250aW51ZTtcbiAgICAgIH1cblxuICAgICAgaWYgKG5vZGUgPT09IGZpYmVyKSB7XG4gICAgICAgIHJldHVybiBmb3VuZEhvc3RJbnN0YW5jZXM7XG4gICAgICB9XG5cbiAgICAgIHdoaWxlIChub2RlLnNpYmxpbmcgPT09IG51bGwpIHtcbiAgICAgICAgaWYgKG5vZGUucmV0dXJuID09PSBudWxsIHx8IG5vZGUucmV0dXJuID09PSBmaWJlcikge1xuICAgICAgICAgIHJldHVybiBmb3VuZEhvc3RJbnN0YW5jZXM7XG4gICAgICAgIH1cblxuICAgICAgICBub2RlID0gbm9kZS5yZXR1cm47XG4gICAgICB9XG5cbiAgICAgIG5vZGUuc2libGluZy5yZXR1cm4gPSBub2RlLnJldHVybjtcbiAgICAgIG5vZGUgPSBub2RlLnNpYmxpbmc7XG4gICAgfVxuICB9XG5cbiAgcmV0dXJuIGZhbHNlO1xufVxuXG52YXIgaGFzQ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odHlwZW9mIHR5cGUgPT09ICdvYmplY3QnICYmIHR5cGUgIT09IG51bGwpIHtcbiAgICAgICAgICAgIHN3aXRjaCAodHlwZS4kJHR5cGVvZikge1xuICAgICAgICAgICAgICBjYXNlIFJFQUNUX1BST1ZJREVSX1RZUEU6XG4gICAgICAgICAgICAgICAgZmliZXJUYWcgPSBDb250ZXh0UHJvdmlkZXI7XG4gICAgICAgICAgICAgICAgYnJlYWsgZ2V0VGFnO1xuXG4gICAgICAgICAgICAgIGNhc2UgUkVBQ1RfQ09OVEVYVF9UWVBFOlxuICAgICAgICAgICAgICAgIC8vIFRoaXMgaXMgYSBjb25zdW1lclxuICAgICAgICAgICAgICAgIGZpYmVyVGFnID0gQ29udGV4dENvbnN1bWVyO1xuICAgICAgICAgICAgICAgIGJyZWFrIGdldFRhZztcblxuICAgICAgICAgICAgICBjYXNlIFJFQUNUX0ZPUldBUkRfUkVGX1RZUEU6XG4gICAgICAgICAgICAgICAgZmliZXJUYWcgPSBGb3J3YXJkUmVmO1xuXG4gICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgcmVzb2x2ZWRUeXBlID0gcmVzb2x2ZUZvcndhcmRSZWZGb3JIb3RSZWxvYWRpbmcocmVzb2x2ZWRUeXBlKTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBicmVhayBnZXRUYWc7XG5cbiAgICAgICAgICAgICAgY2FzZSBSRUFDVF9NRU1PX1RZUEU6XG4gICAgICAgICAgICAgICAgZmliZXJUYWcgPSBNZW1vQ29tcG9uZW50O1xuICAgICAgICAgICAgICAgIGJyZWFrIGdldFRhZztcblxuICAgICAgICAgICAgICBjYXNlIFJFQUNUX0xBWllfVFlQRTpcbiAgICAgICAgICAgICAgICBmaWJlclRhZyA9IExhenlDb21wb25lbnQ7XG4gICAgICAgICAgICAgICAgcmVzb2x2ZWRUeXBlID0gbnVsbDtcbiAgICAgICAgICAgICAgICBicmVhayBnZXRUYWc7XG5cbiAgICAgICAgICAgICAgY2FzZSBSRUFDVF9CTE9DS19UWVBFOlxuICAgICAgICAgICAgICAgIGZpYmVyVGFnID0gQmxvY2s7XG4gICAgICAgICAgICAgICAgYnJlYWsgZ2V0VGFnO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cblxuICAgICAgICAgIHZhciBpbmZvID0gJyc7XG5cbiAgICAgICAgICB7XG4gICAgICAgICAgICBpZiAodHlwZSA9PT0gdW5kZWZpbmVkIHx8IHR5cGVvZiB0eXBlID09PSAnb2JqZWN0JyAmJiB0eXBlICE9PSBudWxsICYmIE9iamVjdC5rZXlzKHR5cGUpLmxlbmd0aCA9PT0gMCkge1xuICAgICAgICAgICAgICBpbmZvICs9ICcgWW91IGxpa2VseSBmb3Jnb3QgdG8gZXhwb3J0IHlvdXIgY29tcG9uZW50IGZyb20gdGhlIGZpbGUgJyArIFwiaXQncyBkZWZpbmVkIGluLCBvciB5b3UgbWlnaHQgaGF2ZSBtaXhlZCB1cCBkZWZhdWx0IGFuZCBcIiArICduYW1lZCBpbXBvcnRzLic7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHZhciBvd25lck5hbWUgPSBvd25lciA/IGdldENvbXBvbmVudE5hbWUob3duZXIudHlwZSkgOiBudWxsO1xuXG4gICAgICAgICAgICBpZiAob3duZXJOYW1lKSB7XG4gICAgICAgICAgICAgIGluZm8gKz0gJ1xcblxcbkNoZWNrIHRoZSByZW5kZXIgbWV0aG9kIG9mIGAnICsgb3duZXJOYW1lICsgJ2AuJztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG5cbiAgICAgICAgICB7XG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIHRocm93IEVycm9yKCBcIkVsZW1lbnQgdHlwZSBpcyBpbnZhbGlkOiBleHBlY3RlZCBhIHN0cmluZyAoZm9yIGJ1aWx0LWluIGNvbXBvbmVudHMpIG9yIGEgY2xhc3MvZnVuY3Rpb24gKGZvciBjb21wb3NpdGUgY29tcG9uZW50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fVxuXG4gIHJldHVybiBwYXJlbnRDb250ZXh0O1xufVxuXG5mdW5jdGlvbiBmaW5kSG9zdEluc3RhbmNlV2l0aFdhcm5pbmcoY29tcG9uZW50LCBtZXRob2ROYW1lKSB7XG4gIHtcbiAgICB2YXIgZmliZXIgPSBnZXQoY29tcG9uZW50KTtcblxuICAgIGlmIChmaWJlciA9PT0gdW5kZWZpbmVkKSB7XG4gICAgICBpZiAodHlwZW9mIGNvbXBvbmVudC5yZW5kZXIgPT09ICdmdW5jdGlvbicpIHtcbiAgICAgICAge1xuICAgICAgICAgIHtcbiAgICAgICAgICAgIHRocm93IEVycm9yKCBcIlVuYWJsZSB0byBmaW5kIG5vZGUgb24gYW4gdW5tb3VudGVkIGNvbXBvbmVudC5cIiApO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfSBlbHNlIHtcbiAgICAgICAge1xuICAgICAgICAgIHtcbiAgICAgICAgICAgIHRocm93IEVycm9yKCBcIkFyZ3VtZW50IGFwcGVhcnMgdG8gbm90IGJlIGEgUmVhY3RDb21wb25lbnQuIEtleXM6IFwiICsgT2JqZWN0LmtleXMoY29tcG9uZW50KSApO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfVxuICAgIH1cblxuICAgIHZhciBob3N0RmliZXIgPSBmaW5kQ3VycmVudEhvc3RGaWJlcihmaWJlcik7XG5cbiAgICBpZiAoaG9zdEZpYmVyID09PSBudWxsKSB7XG4gICAgICByZXR1cm4gbnVsbDtcbiAgICB9XG5cbiAgICBpZiAoaG9zdEZpYmVyLm1vZGUgJiBTdHJpY3RNb2RlKSB7XG4gICAgICB2YXIgY29tcG9uZW50TmFtZSA9IGdldENvbXBvbmVudE5hbWUoZmliZXIudHlwZSkgfHwgJ0NvbXBvbmVudCc7XG5cbiAgICAgIGlmICghZGlkV2FybkFib3V0RmluZE5vZGVJblN0cmljdE1vZGVbY29tcG9uZW50TmFtZV0pIHtcbiAgICAgICAgZGlkV2FybkFib3V0Rmlu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OicgPyAnXFxuWW91IG1pZ2h0IG5lZWQgdG8gdXNlIGEgbG9jYWwgSFRUUCBzZXJ2ZXIgKGluc3RlYWQgb2YgZmlsZTovLyk6ICcgKyAnaHR0cHM6Ly9yZWFjdGpzLm9yZy9saW5rL3JlYWN0LWRldnRvb2xzLWZhcScgOiAnJyksICdmb250LXdlaWdodDpib2xkJyk7XG4gICAgICB9XG4gICAgfVxuICB9XG59XG5cbmV4cG9ydHMuX19TRUNSRVRfSU5URVJOQUxTX0RPX05PVF9VU0VfT1JfWU9VX1dJTExfQkVfRklSRUQgPSBJbnRlcm5hbHM7XG5leHBvcnRzLmNyZWF0ZVBvcnRhbCA9IGNyZWF0ZVBvcnRhbCQxO1xuZXhwb3J0cy5maW5kRE9NTm9kZSA9IGZpbmRET01Ob2RlO1xuZXhwb3J0cy5mbHVzaFN5bmMgPSBmbHVzaFN5bmM7XG5leHBvcnRzLmh5ZHJhdGUgPSBoeWRyYXRlO1xuZXhwb3J0cy5yZW5kZXIgPSByZW5kZXI7XG5leHBvcnRzLnVubW91bnRDb21wb25lbnRBdE5vZGUgPSB1bm1vdW50Q29tcG9uZW50QXROb2RlO1xuZXhwb3J0cy51bnN0YWJsZV9iYXRjaGVkVXBkYXRlcyA9IGJhdGNoZWRVcGRhdGVzJDE7XG5leHBvcnRzLnVuc3RhYmxlX2NyZWF0ZVBvcnRhbCA9IHVuc3RhYmxlX2NyZWF0ZVBvcnRhbDtcbmV4cG9ydHMudW5zdGFibGVfcmVuZGVyU3VidHJlZUludG9Db250YWluZXIgPSByZW5kZXJTdWJ0cmVlSW50b0NvbnRhaW5lcjtcbmV4cG9ydHMudmVyc2lvbiA9IFJlYWN0VmVyc2lvbjtcbiAgfSkoKTtcbn1cbiJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///../node_modules/react-dom/cjs/react-dom.development.js\n"));
/***/ }),
/***/ "../node_modules/react-dom/index.js":
/*!******************************************!*\
!*** ../node_modules/react-dom/index.js ***!
\******************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\n\nfunction checkDCE() {\n /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\n if (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' ||\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function'\n ) {\n return;\n }\n if (true) {\n // This branch is unreachable because this function is only called\n // in production, but the condition is true only in development.\n // Therefore if the branch is still here, dead code elimination wasn't\n // properly applied.\n // Don't change the message. React DevTools relies on it. Also make sure\n // this message doesn't occur elsewhere in this function, or it will cause\n // a false positive.\n throw new Error('^_^');\n }\n try {\n // Verify that the code above has been dead code eliminated (DCE'd).\n __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);\n } catch (err) {\n // DevTools shouldn't crash React, no matter what.\n // We should still report in case we break this code.\n console.error(err);\n }\n}\n\nif (false) {} else {\n module.exports = __webpack_require__(/*! ./cjs/react-dom.development.js */ \"../node_modules/react-dom/cjs/react-dom.development.js\");\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL3JlYWN0LWRvbS9pbmRleC5qcy5qcyIsIm1hcHBpbmdzIjoiQUFBYTs7QUFFYjtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsTUFBTSxJQUFxQztBQUMzQztBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxJQUFJO0FBQ0o7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQSxJQUFJLEtBQXFDLEVBQUUsRUFLMUMsQ0FBQztBQUNGLEVBQUUsb0lBQTBEO0FBQzVEIiwic291cmNlcyI6WyJ3ZWJ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gdGhyb3cgbmV3IEVycm9yKCdeX14nKTtcbiAgfVxuICB0cnkge1xuICAgIC8vIFZlcmlmeSB0aGF0IHRoZSBjb2RlIGFib3ZlIGhhcyBiZWVuIGRlYWQgY29kZSBlbGltaW5hdGVkIChEQ0UnZCkuXG4gICAgX19SRUFDVF9ERVZUT09MU19HTE9CQUxfSE9PS19fLmNoZWNrRENFKGNoZWNrRENFKTtcbiAgfSBjYXRjaCAoZXJyKSB7XG4gICAgLy8gRGV2VG9vbHMgc2hvdWxkbid0IGNyYXNoIFJlYWN0LCBubyBtYXR0ZXIgd2hhdC5cbiAgICAvLyBXZSBzaG91bGQgc3RpbGwgcmVwb3J0IGluIGNhc2Ugd2UgYnJlYWsgdGhpcyBjb2RlLlxuICAgIGNvbnNvbGUuZXJyb3IoZXJyKTtcbiAgfVxufVxuXG5pZiAocHJvY2Vzcy5lbnYuTk9ERV9FTlYgPT09ICdwcm9kdWN0aW9uJykge1xuICAvLyBEQ0UgY2hlY2sgc2hvdWxkIGhhcHBlbiBiZWZvcmUgUmVhY3RET00gYnVuZGxlIGV4ZWN1dGVzIHNvIHRoYXRcbiAgLy8gRGV2VG9vbHMgY2FuIHJlcG9ydCBiYWQgbWluaWZpY2F0aW9uIGR1cmluZyBpbmplY3Rpb24uXG4gIGNoZWNrRENFKCk7XG4gIG1vZHVsZS5leHBvcnRzID0gcmVxdWlyZSgnLi9janMvcmVhY3QtZG9tLnByb2R1Y3Rpb24ubWluLmpzJyk7XG59IGVsc2Uge1xuICBtb2R1bGUuZXhwb3J0cyA9IHJlcXVpcmUoJy4vY2pzL3JlYWN0LWRvbS5kZXZlbG9wbWVudC5qcycpO1xufVxuIl0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///../node_modules/react-dom/index.js\n"));
/***/ }),
/***/ "../node_modules/react/cjs/react.development.js":
/*!******************************************************!*\
!*** ../node_modules/react/cjs/react.development.js ***!
\******************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("/** @license React v17.0.2\n * react.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\nif (true) {\n (function() {\n'use strict';\n\nvar _assign = __webpack_require__(/*! object-assign */ \"../node_modules/next/dist/build/polyfills/object-assign.js\");\n\n// TODO: this is special because it gets imported during build.\nvar ReactVersion = '17.0.2';\n\n// ATTENTION\n// When adding new symbols to this file,\n// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'\n// The Symbol used to tag the ReactElement-like types. If there is no native Symbol\n// nor polyfill, then a plain number is used for performance.\nvar REACT_ELEMENT_TYPE = 0xeac7;\nvar REACT_PORTAL_TYPE = 0xeaca;\nexports.Fragment = 0xeacb;\nexports.StrictMode = 0xeacc;\nexports.Profiler = 0xead2;\nvar REACT_PROVIDER_TYPE = 0xeacd;\nvar REACT_CONTEXT_TYPE = 0xeace;\nvar REACT_FORWARD_REF_TYPE = 0xead0;\nexports.Suspense = 0xead1;\nvar REACT_SUSPENSE_LIST_TYPE = 0xead8;\nvar REACT_MEMO_TYPE = 0xead3;\nvar REACT_LAZY_TYPE = 0xead4;\nvar REACT_BLOCK_TYPE = 0xead9;\nvar REACT_SERVER_BLOCK_TYPE = 0xeada;\nvar REACT_FUNDAMENTAL_TYPE = 0xead5;\nvar REACT_SCOPE_TYPE = 0xead7;\nvar REACT_OPAQUE_ID_TYPE = 0xeae0;\nvar REACT_DEBUG_TRACING_MODE_TYPE = 0xeae1;\nvar REACT_OFFSCREEN_TYPE = 0xeae2;\nvar REACT_LEGACY_HIDDEN_TYPE = 0xeae3;\n\nif (typeof Symbol === 'function' && Symbol.for) {\n var symbolFor = Symbol.for;\n REACT_ELEMENT_TYPE = symbolFor('react.element');\n REACT_PORTAL_TYPE = symbolFor('react.portal');\n exports.Fragment = symbolFor('react.fragment');\n exports.StrictMode = symbolFor('react.strict_mode');\n exports.Profiler = symbolFor('react.profiler');\n REACT_PROVIDER_TYPE = symbolFor('react.provider');\n REACT_CONTEXT_TYPE = symbolFor('react.context');\n REACT_FORWARD_REF_TYPE = symbolFor('react.forward_ref');\n exports.Suspense = symbolFor('react.suspense');\n REACT_SUSPENSE_LIST_TYPE = symbolFor('react.suspense_list');\n REACT_MEMO_TYPE = symbolFor('react.memo');\n REACT_LAZY_TYPE = symbolFor('react.lazy');\n REACT_BLOCK_TYPE = symbolFor('react.block');\n REACT_SERVER_BLOCK_TYPE = symbolFor('react.server.block');\n REACT_FUNDAMENTAL_TYPE = symbolFor('react.fundamental');\n REACT_SCOPE_TYPE = symbolFor('react.scope');\n REACT_OPAQUE_ID_TYPE = symbolFor('react.opaque.id');\n REACT_DEBUG_TRACING_MODE_TYPE = symbolFor('react.debug_trace_mode');\n REACT_OFFSCREEN_TYPE = symbolFor('react.offscreen');\n REACT_LEGACY_HIDDEN_TYPE = symbolFor('react.legacy_hidden');\n}\n\nvar MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\nvar FAUX_ITERATOR_SYMBOL = '@@iterator';\nfunction getIteratorFn(maybeIterable) {\n if (maybeIterable === null || typeof maybeIterable !== 'object') {\n return null;\n }\n\n var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];\n\n if (typeof maybeIterator === 'function') {\n return maybeIterator;\n }\n\n return null;\n}\n\n/**\n * Keeps track of the current dispatcher.\n */\nvar ReactCurrentDispatcher = {\n /**\n * @internal\n * @type {ReactComponent}\n */\n current: null\n};\n\n/**\n * Keeps track of the current batch's configuration such as how long an update\n * should suspend for if it needs to.\n */\nvar ReactCurrentBatchConfig = {\n transition: 0\n};\n\n/**\n * Keeps track of the current owner.\n *\n * The current owner is the component who should own any components that are\n * currently being constructed.\n */\nvar ReactCurrentOwner = {\n /**\n * @internal\n * @type {ReactComponent}\n */\n current: null\n};\n\nvar ReactDebugCurrentFrame = {};\nvar currentExtraStackFrame = null;\nfunction setExtraStackFrame(stack) {\n {\n currentExtraStackFrame = stack;\n }\n}\n\n{\n ReactDebugCurrentFrame.setExtraStackFrame = function (stack) {\n {\n currentExtraStackFrame = stack;\n }\n }; // Stack implementation injected by the current renderer.\n\n\n ReactDebugCurrentFrame.getCurrentStack = null;\n\n ReactDebugCurrentFrame.getStackAddendum = function () {\n var stack = ''; // Add an extra top frame while an element is being validated\n\n if (currentExtraStackFrame) {\n stack += currentExtraStackFrame;\n } // Delegate to the injected renderer-specific implementation\n\n\n var impl = ReactDebugCurrentFrame.getCurrentStack;\n\n if (impl) {\n stack += impl() || '';\n }\n\n return stack;\n };\n}\n\n/**\n * Used by act() to track whether you're inside an act() scope.\n */\nvar IsSomeRendererActing = {\n current: false\n};\n\nvar ReactSharedInternals = {\n ReactCurrentDispatcher: ReactCurrentDispatcher,\n ReactCurrentBatchConfig: ReactCurrentBatchConfig,\n ReactCurrentOwner: ReactCurrentOwner,\n IsSomeRendererActing: IsSomeRendererActing,\n // Used by renderers to avoid bundling object-assign twice in UMD bundles:\n assign: _assign\n};\n\n{\n ReactSharedInternals.ReactDebugCurrentFrame = ReactDebugCurrentFrame;\n}\n\n// by calls to these methods by a Babel plugin.\n//\n// In PROD (or in packages without access to React internals),\n// they are left as they are instead.\n\nfunction warn(format) {\n {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n printWarning('warn', format, args);\n }\n}\nfunction error(format) {\n {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n printWarning('error', format, args);\n }\n}\n\nfunction printWarning(level, format, args) {\n // When changing this logic, you might want to also\n // update consoleWithStackDev.www.js as well.\n {\n var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n var stack = ReactDebugCurrentFrame.getStackAddendum();\n\n if (stack !== '') {\n format += '%s';\n args = args.concat([stack]);\n }\n\n var argsWithFormat = args.map(function (item) {\n return '' + item;\n }); // Careful: RN currently depends on this prefix\n\n argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it\n // breaks IE9: https://github.com/facebook/react/issues/13610\n // eslint-disable-next-line react-internal/no-production-logging\n\n Function.prototype.apply.call(console[level], console, argsWithFormat);\n }\n}\n\nvar didWarnStateUpdateForUnmountedComponent = {};\n\nfunction warnNoop(publicInstance, callerName) {\n {\n var _constructor = publicInstance.constructor;\n var componentName = _constructor && (_constructor.displayName || _constructor.name) || 'ReactClass';\n var warningKey = componentName + \".\" + callerName;\n\n if (didWarnStateUpdateForUnmountedComponent[warningKey]) {\n return;\n }\n\n 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);\n\n didWarnStateUpdateForUnmountedComponent[warningKey] = true;\n }\n}\n/**\n * This is the abstract API for an update queue.\n */\n\n\nvar ReactNoopUpdateQueue = {\n /**\n * Checks whether or not this composite component is mounted.\n * @param {ReactClass} publicInstance The instance we want to test.\n * @return {boolean} True if mounted, false otherwise.\n * @protected\n * @final\n */\n isMounted: function (publicInstance) {\n return false;\n },\n\n /**\n * Forces an update. This should only be invoked when it is known with\n * certainty that we are **not** in a DOM transaction.\n *\n * You may want to call this when you know that some deeper aspect of the\n * component's state has changed but `setState` was not called.\n *\n * This will not invoke `shouldComponentUpdate`, but it will invoke\n * `componentWillUpdate` and `componentDidUpdate`.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {?function} callback Called after component is updated.\n * @param {?string} callerName name of the calling function in the public API.\n * @internal\n */\n enqueueForceUpdate: function (publicInstance, callback, callerName) {\n warnNoop(publicInstance, 'forceUpdate');\n },\n\n /**\n * Replaces all of the state. Always use this or `setState` to mutate state.\n * You should treat `this.state` as immutable.\n *\n * There is no guarantee that `this.state` will be immediately updated, so\n * accessing `this.state` after calling this method may return the old value.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {object} completeState Next state.\n * @param {?function} callback Called after component is updated.\n * @param {?string} callerName name of the calling function in the public API.\n * @internal\n */\n enqueueReplaceState: function (publicInstance, completeState, callback, callerName) {\n warnNoop(publicInstance, 'replaceState');\n },\n\n /**\n * Sets a subset of the state. This only exists because _pendingState is\n * internal. This provides a merging strategy that is not available to deep\n * properties which is confusing. TODO: Expose pendingState or don't use it\n * during the merge.\n *\n * @param {ReactClass} publicInstance The instance that should rerender.\n * @param {object} partialState Next partial state to be merged with state.\n * @param {?function} callback Called after component is updated.\n * @param {?string} Name of the calling function in the public API.\n * @internal\n */\n enqueueSetState: function (publicInstance, partialState, callback, callerName) {\n warnNoop(publicInstance, 'setState');\n }\n};\n\nvar emptyObject = {};\n\n{\n Object.freeze(emptyObject);\n}\n/**\n * Base class helpers for the updating state of a component.\n */\n\n\nfunction Component(props, context, updater) {\n this.props = props;\n this.context = context; // If a component has string refs, we will assign a different object later.\n\n this.refs = emptyObject; // We initialize the default updater but the real one gets injected by the\n // renderer.\n\n this.updater = updater || ReactNoopUpdateQueue;\n}\n\nComponent.prototype.isReactComponent = {};\n/**\n * Sets a subset of the state. Always use this to mutate\n * state. You should treat `this.state` as immutable.\n *\n * There is no guarantee that `this.state` will be immediately updated, so\n * accessing `this.state` after calling this method may return the old value.\n *\n * There is no guarantee that calls to `setState` will run synchronously,\n * as they may eventually be batched together. You can provide an optional\n * callback that will be executed when the call to setState is actually\n * completed.\n *\n * When a function is provided to setState, it will be called at some point in\n * the future (not synchronously). It will be called with the up to date\n * component arguments (state, props, context). These values can be different\n * from this.* because your function may be called after receiveProps but before\n * shouldComponentUpdate, and this new state, props, and context will not yet be\n * assigned to this.\n *\n * @param {object|function} partialState Next partial state or function to\n * produce next partial state to be merged with current state.\n * @param {?function} callback Called after state is updated.\n * @final\n * @protected\n */\n\nComponent.prototype.setState = function (partialState, callback) {\n if (!(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null)) {\n {\n throw Error( \"setState(...): takes an object of state variables to update or a function which returns an object of state variables.\" );\n }\n }\n\n this.updater.enqueueSetState(this, partialState, callback, 'setState');\n};\n/**\n * Forces an update. This should only be invoked when it is known with\n * certainty that we are **not** in a DOM transaction.\n *\n * You may want to call this when you know that some deeper aspect of the\n * component's state has changed but `setState` was not called.\n *\n * This will not invoke `shouldComponentUpdate`, but it will invoke\n * `componentWillUpdate` and `componentDidUpdate`.\n *\n * @param {?function} callback Called after update is complete.\n * @final\n * @protected\n */\n\n\nComponent.prototype.forceUpdate = function (callback) {\n this.updater.enqueueForceUpdate(this, callback, 'forceUpdate');\n};\n/**\n * Deprecated APIs. These APIs used to exist on classic React classes but since\n * we would like to deprecate them, we're not going to move them over to this\n * modern base class. Instead, we define a getter that warns if it's accessed.\n */\n\n\n{\n var deprecatedAPIs = {\n isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'],\n replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).']\n };\n\n var defineDeprecationWarning = function (methodName, info) {\n Object.defineProperty(Component.prototype, methodName, {\n get: function () {\n warn('%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]);\n\n return undefined;\n }\n });\n };\n\n for (var fnName in deprecatedAPIs) {\n if (deprecatedAPIs.hasOwnProperty(fnName)) {\n defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);\n }\n }\n}\n\nfunction ComponentDummy() {}\n\nComponentDummy.prototype = Component.prototype;\n/**\n * Convenience component with default shallow equality check for sCU.\n */\n\nfunction PureComponent(props, context, updater) {\n this.props = props;\n this.context = context; // If a component has string refs, we will assign a different object later.\n\n this.refs = emptyObject;\n this.updater = updater || ReactNoopUpdateQueue;\n}\n\nvar pureComponentPrototype = PureComponent.prototype = new ComponentDummy();\npureComponentPrototype.constructor = PureComponent; // Avoid an extra prototype jump for these methods.\n\n_assign(pureComponentPrototype, Component.prototype);\n\npureComponentPrototype.isPureReactComponent = true;\n\n// an immutable object with a single mutable value\nfunction createRef() {\n var refObject = {\n current: null\n };\n\n {\n Object.seal(refObject);\n }\n\n return refObject;\n}\n\nfunction getWrappedName(outerType, innerType, wrapperName) {\n var functionName = innerType.displayName || innerType.name || '';\n return outerType.displayName || (functionName !== '' ? wrapperName + \"(\" + functionName + \")\" : wrapperName);\n}\n\nfunction getContextName(type) {\n return type.displayName || 'Context';\n}\n\nfunction getComponentName(type) {\n if (type == null) {\n // Host root, text node or just invalid type.\n return null;\n }\n\n {\n if (typeof type.tag === 'number') {\n error('Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.');\n }\n }\n\n if (typeof type === 'function') {\n return type.displayName || type.name || null;\n }\n\n if (typeof type === 'string') {\n return type;\n }\n\n switch (type) {\n case exports.Fragment:\n return 'Fragment';\n\n case REACT_PORTAL_TYPE:\n return 'Portal';\n\n case exports.Profiler:\n return 'Profiler';\n\n case exports.StrictMode:\n return 'StrictMode';\n\n case exports.Suspense:\n return 'Suspense';\n\n case REACT_SUSPENSE_LIST_TYPE:\n return 'SuspenseList';\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_CONTEXT_TYPE:\n var context = type;\n return getContextName(context) + '.Consumer';\n\n case REACT_PROVIDER_TYPE:\n var provider = type;\n return getContextName(provider._context) + '.Provider';\n\n case REACT_FORWARD_REF_TYPE:\n return getWrappedName(type, type.render, 'ForwardRef');\n\n case REACT_MEMO_TYPE:\n return getComponentName(type.type);\n\n case REACT_BLOCK_TYPE:\n return getComponentName(type._render);\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n return getComponentName(init(payload));\n } catch (x) {\n return null;\n }\n }\n }\n }\n\n return null;\n}\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar RESERVED_PROPS = {\n key: true,\n ref: true,\n __self: true,\n __source: true\n};\nvar specialPropKeyWarningShown, specialPropRefWarningShown, didWarnAboutStringRefs;\n\n{\n didWarnAboutStringRefs = {};\n}\n\nfunction hasValidRef(config) {\n {\n if (hasOwnProperty.call(config, 'ref')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;\n\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n\n return config.ref !== undefined;\n}\n\nfunction hasValidKey(config) {\n {\n if (hasOwnProperty.call(config, 'key')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'key').get;\n\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n\n return config.key !== undefined;\n}\n\nfunction defineKeyPropWarningGetter(props, displayName) {\n var warnAboutAccessingKey = function () {\n {\n if (!specialPropKeyWarningShown) {\n specialPropKeyWarningShown = true;\n\n 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);\n }\n }\n };\n\n warnAboutAccessingKey.isReactWarning = true;\n Object.defineProperty(props, 'key', {\n get: warnAboutAccessingKey,\n configurable: true\n });\n}\n\nfunction defineRefPropWarningGetter(props, displayName) {\n var warnAboutAccessingRef = function () {\n {\n if (!specialPropRefWarningShown) {\n specialPropRefWarningShown = true;\n\n 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);\n }\n }\n };\n\n warnAboutAccessingRef.isReactWarning = true;\n Object.defineProperty(props, 'ref', {\n get: warnAboutAccessingRef,\n configurable: true\n });\n}\n\nfunction warnIfStringRefCannotBeAutoConverted(config) {\n {\n if (typeof config.ref === 'string' && ReactCurrentOwner.current && config.__self && ReactCurrentOwner.current.stateNode !== config.__self) {\n var componentName = getComponentName(ReactCurrentOwner.current.type);\n\n if (!didWarnAboutStringRefs[componentName]) {\n 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);\n\n didWarnAboutStringRefs[componentName] = true;\n }\n }\n }\n}\n/**\n * Factory method to create a new React element. This no longer adheres to\n * the class pattern, so do not use new to call it. Also, instanceof check\n * will not work. Instead test $$typeof field against Symbol.for('react.element') to check\n * if something is a React Element.\n *\n * @param {*} type\n * @param {*} props\n * @param {*} key\n * @param {string|object} ref\n * @param {*} owner\n * @param {*} self A *temporary* helper to detect places where `this` is\n * different from the `owner` when React.createElement is called, so that we\n * can warn. We want to get rid of owner and replace string `ref`s with arrow\n * functions, and as long as `this` and owner are the same, there will be no\n * change in behavior.\n * @param {*} source An annotation object (added by a transpiler or otherwise)\n * indicating filename, line number, and/or other information.\n * @internal\n */\n\n\nvar ReactElement = function (type, key, ref, self, source, owner, props) {\n var element = {\n // This tag allows us to uniquely identify this as a React Element\n $$typeof: REACT_ELEMENT_TYPE,\n // Built-in properties that belong on the element\n type: type,\n key: key,\n ref: ref,\n props: props,\n // Record the component responsible for creating this element.\n _owner: owner\n };\n\n {\n // The validation flag is currently mutative. We put it on\n // an external backing store so that we can freeze the whole object.\n // This can be replaced with a WeakMap once they are implemented in\n // commonly used development environments.\n element._store = {}; // To make comparing ReactElements easier for testing purposes, we make\n // the validation flag non-enumerable (where possible, which should\n // include every environment we run tests in), so the test framework\n // ignores it.\n\n Object.defineProperty(element._store, 'validated', {\n configurable: false,\n enumerable: false,\n writable: true,\n value: false\n }); // self and source are DEV only properties.\n\n Object.defineProperty(element, '_self', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: self\n }); // Two elements created in two different places should be considered\n // equal for testing purposes and therefore we hide it from enumeration.\n\n Object.defineProperty(element, '_source', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: source\n });\n\n if (Object.freeze) {\n Object.freeze(element.props);\n Object.freeze(element);\n }\n }\n\n return element;\n};\n/**\n * Create and return a new ReactElement of the given type.\n * See https://reactjs.org/docs/react-api.html#createelement\n */\n\nfunction createElement(type, config, children) {\n var propName; // Reserved names are extracted\n\n var props = {};\n var key = null;\n var ref = null;\n var self = null;\n var source = null;\n\n if (config != null) {\n if (hasValidRef(config)) {\n ref = config.ref;\n\n {\n warnIfStringRefCannotBeAutoConverted(config);\n }\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n }\n\n self = config.__self === undefined ? null : config.__self;\n source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n {\n if (Object.freeze) {\n Object.freeze(childArray);\n }\n }\n\n props.children = childArray;\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n {\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n }\n\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n}\nfunction cloneAndReplaceKey(oldElement, newKey) {\n var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);\n return newElement;\n}\n/**\n * Clone and return a new ReactElement using element as the starting point.\n * See https://reactjs.org/docs/react-api.html#cloneelement\n */\n\nfunction cloneElement(element, config, children) {\n if (!!(element === null || element === undefined)) {\n {\n throw Error( \"React.cloneElement(...): The argument must be a React element, but you passed \" + element + \".\" );\n }\n }\n\n var propName; // Original props are copied\n\n var props = _assign({}, element.props); // Reserved names are extracted\n\n\n var key = element.key;\n var ref = element.ref; // Self is preserved since the owner is preserved.\n\n var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a\n // transpiler, and the original source is probably a better indicator of the\n // true owner.\n\n var source = element._source; // Owner will be preserved, unless ref is overridden\n\n var owner = element._owner;\n\n if (config != null) {\n if (hasValidRef(config)) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n\n if (hasValidKey(config)) {\n key = '' + config.key;\n } // Remaining properties override existing props\n\n\n var defaultProps;\n\n if (element.type && element.type.defaultProps) {\n defaultProps = element.type.defaultProps;\n }\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n if (config[propName] === undefined && defaultProps !== undefined) {\n // Resolve default props\n props[propName] = defaultProps[propName];\n } else {\n props[propName] = config[propName];\n }\n }\n }\n } // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n\n\n var childrenLength = arguments.length - 2;\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n\n props.children = childArray;\n }\n\n return ReactElement(element.type, key, ref, self, source, owner, props);\n}\n/**\n * Verifies the object is a ReactElement.\n * See https://reactjs.org/docs/react-api.html#isvalidelement\n * @param {?object} object\n * @return {boolean} True if `object` is a ReactElement.\n * @final\n */\n\nfunction isValidElement(object) {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n}\n\nvar SEPARATOR = '.';\nvar SUBSEPARATOR = ':';\n/**\n * Escape and wrap key so it is safe to use as a reactid\n *\n * @param {string} key to be escaped.\n * @return {string} the escaped key.\n */\n\nfunction escape(key) {\n var escapeRegex = /[=:]/g;\n var escaperLookup = {\n '=': '=0',\n ':': '=2'\n };\n var escapedString = key.replace(escapeRegex, function (match) {\n return escaperLookup[match];\n });\n return '$' + escapedString;\n}\n/**\n * TODO: Test that a single child and an array with one item have the same key\n * pattern.\n */\n\n\nvar didWarnAboutMaps = false;\nvar userProvidedKeyEscapeRegex = /\\/+/g;\n\nfunction escapeUserProvidedKey(text) {\n return text.replace(userProvidedKeyEscapeRegex, '$&/');\n}\n/**\n * Generate a key string that identifies a element within a set.\n *\n * @param {*} element A element that could contain a manual key.\n * @param {number} index Index that is used if a manual key is not provided.\n * @return {string}\n */\n\n\nfunction getElementKey(element, index) {\n // Do some typechecking here since we call this blindly. We want to ensure\n // that we don't block potential future ES APIs.\n if (typeof element === 'object' && element !== null && element.key != null) {\n // Explicit key\n return escape('' + element.key);\n } // Implicit key determined by the index in the set\n\n\n return index.toString(36);\n}\n\nfunction mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {\n var type = typeof children;\n\n if (type === 'undefined' || type === 'boolean') {\n // All of the above are perceived as null.\n children = null;\n }\n\n var invokeCallback = false;\n\n if (children === null) {\n invokeCallback = true;\n } else {\n switch (type) {\n case 'string':\n case 'number':\n invokeCallback = true;\n break;\n\n case 'object':\n switch (children.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n invokeCallback = true;\n }\n\n }\n }\n\n if (invokeCallback) {\n var _child = children;\n var mappedChild = callback(_child); // If it's the only child, treat the name as if it was wrapped in an array\n // so that it's consistent if the number of children grows:\n\n var childKey = nameSoFar === '' ? SEPARATOR + getElementKey(_child, 0) : nameSoFar;\n\n if (Array.isArray(mappedChild)) {\n var escapedChildKey = '';\n\n if (childKey != null) {\n escapedChildKey = escapeUserProvidedKey(childKey) + '/';\n }\n\n mapIntoArray(mappedChild, array, escapedChildKey, '', function (c) {\n return c;\n });\n } else if (mappedChild != null) {\n if (isValidElement(mappedChild)) {\n mappedChild = cloneAndReplaceKey(mappedChild, // Keep both the (mapped) and old keys if they differ, just as\n // traverseAllChildren used to do for objects as children\n escapedPrefix + ( // $FlowFixMe Flow incorrectly thinks React.Portal doesn't have a key\n mappedChild.key && (!_child || _child.key !== mappedChild.key) ? // $FlowFixMe Flow incorrectly thinks existing element's key can be a number\n escapeUserProvidedKey('' + mappedChild.key) + '/' : '') + childKey);\n }\n\n array.push(mappedChild);\n }\n\n return 1;\n }\n\n var child;\n var nextName;\n var subtreeCount = 0; // Count of children found in the current subtree.\n\n var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;\n\n if (Array.isArray(children)) {\n for (var i = 0; i < children.length; i++) {\n child = children[i];\n nextName = nextNamePrefix + getElementKey(child, i);\n subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);\n }\n } else {\n var iteratorFn = getIteratorFn(children);\n\n if (typeof iteratorFn === 'function') {\n var iterableChildren = children;\n\n {\n // Warn about using Maps as children\n if (iteratorFn === iterableChildren.entries) {\n if (!didWarnAboutMaps) {\n warn('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');\n }\n\n didWarnAboutMaps = true;\n }\n }\n\n var iterator = iteratorFn.call(iterableChildren);\n var step;\n var ii = 0;\n\n while (!(step = iterator.next()).done) {\n child = step.value;\n nextName = nextNamePrefix + getElementKey(child, ii++);\n subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);\n }\n } else if (type === 'object') {\n var childrenString = '' + children;\n\n {\n {\n 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.\" );\n }\n }\n }\n }\n\n return subtreeCount;\n}\n\n/**\n * Maps children that are typically specified as `props.children`.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrenmap\n *\n * The provided mapFunction(child, index) will be called for each\n * leaf child.\n *\n * @param {?*} children Children tree container.\n * @param {function(*, int)} func The map function.\n * @param {*} context Context for mapFunction.\n * @return {object} Object containing the ordered map of results.\n */\nfunction mapChildren(children, func, context) {\n if (children == null) {\n return children;\n }\n\n var result = [];\n var count = 0;\n mapIntoArray(children, result, '', '', function (child) {\n return func.call(context, child, count++);\n });\n return result;\n}\n/**\n * Count the number of children that are typically specified as\n * `props.children`.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrencount\n *\n * @param {?*} children Children tree container.\n * @return {number} The number of children.\n */\n\n\nfunction countChildren(children) {\n var n = 0;\n mapChildren(children, function () {\n n++; // Don't return anything\n });\n return n;\n}\n\n/**\n * Iterates through children that are typically specified as `props.children`.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrenforeach\n *\n * The provided forEachFunc(child, index) will be called for each\n * leaf child.\n *\n * @param {?*} children Children tree container.\n * @param {function(*, int)} forEachFunc\n * @param {*} forEachContext Context for forEachContext.\n */\nfunction forEachChildren(children, forEachFunc, forEachContext) {\n mapChildren(children, function () {\n forEachFunc.apply(this, arguments); // Don't return anything.\n }, forEachContext);\n}\n/**\n * Flatten a children object (typically specified as `props.children`) and\n * return an array with appropriately re-keyed children.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrentoarray\n */\n\n\nfunction toArray(children) {\n return mapChildren(children, function (child) {\n return child;\n }) || [];\n}\n/**\n * Returns the first child in a collection of children and verifies that there\n * is only one child in the collection.\n *\n * See https://reactjs.org/docs/react-api.html#reactchildrenonly\n *\n * The current implementation of this function assumes that a single child gets\n * passed without a wrapper, but the purpose of this helper function is to\n * abstract away the particular structure of children.\n *\n * @param {?object} children Child collection structure.\n * @return {ReactElement} The first and only `ReactElement` contained in the\n * structure.\n */\n\n\nfunction onlyChild(children) {\n if (!isValidElement(children)) {\n {\n throw Error( \"React.Children.only expected to receive a single React element child.\" );\n }\n }\n\n return children;\n}\n\nfunction createContext(defaultValue, calculateChangedBits) {\n if (calculateChangedBits === undefined) {\n calculateChangedBits = null;\n } else {\n {\n if (calculateChangedBits !== null && typeof calculateChangedBits !== 'function') {\n error('createContext: Expected the optional second argument to be a ' + 'function. Instead received: %s', calculateChangedBits);\n }\n }\n }\n\n var context = {\n $$typeof: REACT_CONTEXT_TYPE,\n _calculateChangedBits: calculateChangedBits,\n // As a workaround to support multiple concurrent renderers, we categorize\n // some renderers as primary and others as secondary. We only expect\n // there to be two concurrent renderers at most: React Native (primary) and\n // Fabric (secondary); React DOM (primary) and React ART (secondary).\n // Secondary renderers store their context values on separate fields.\n _currentValue: defaultValue,\n _currentValue2: defaultValue,\n // Used to track how many concurrent renderers this context currently\n // supports within in a single renderer. Such as parallel server rendering.\n _threadCount: 0,\n // These are circular\n Provider: null,\n Consumer: null\n };\n context.Provider = {\n $$typeof: REACT_PROVIDER_TYPE,\n _context: context\n };\n var hasWarnedAboutUsingNestedContextConsumers = false;\n var hasWarnedAboutUsingConsumerProvider = false;\n var hasWarnedAboutDisplayNameOnConsumer = false;\n\n {\n // A separate object, but proxies back to the original context object for\n // backwards compatibility. It has a different $$typeof, so we can properly\n // warn for the incorrect usage of Context as a Consumer.\n var Consumer = {\n $$typeof: REACT_CONTEXT_TYPE,\n _context: context,\n _calculateChangedBits: context._calculateChangedBits\n }; // $FlowFixMe: Flow complains about not setting a value, which is intentional here\n\n Object.defineProperties(Consumer, {\n Provider: {\n get: function () {\n if (!hasWarnedAboutUsingConsumerProvider) {\n hasWarnedAboutUsingConsumerProvider = true;\n\n error('Rendering <Context.Consumer.Provider> is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Provider> instead?');\n }\n\n return context.Provider;\n },\n set: function (_Provider) {\n context.Provider = _Provider;\n }\n },\n _currentValue: {\n get: function () {\n return context._currentValue;\n },\n set: function (_currentValue) {\n context._currentValue = _currentValue;\n }\n },\n _currentValue2: {\n get: function () {\n return context._currentValue2;\n },\n set: function (_currentValue2) {\n context._currentValue2 = _currentValue2;\n }\n },\n _threadCount: {\n get: function () {\n return context._threadCount;\n },\n set: function (_threadCount) {\n context._threadCount = _threadCount;\n }\n },\n Consumer: {\n get: function () {\n if (!hasWarnedAboutUsingNestedContextConsumers) {\n hasWarnedAboutUsingNestedContextConsumers = true;\n\n error('Rendering <Context.Consumer.Consumer> is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Consumer> instead?');\n }\n\n return context.Consumer;\n }\n },\n displayName: {\n get: function () {\n return context.displayName;\n },\n set: function (displayName) {\n if (!hasWarnedAboutDisplayNameOnConsumer) {\n warn('Setting `displayName` on Context.Consumer has no effect. ' + \"You should set it directly on the context with Context.displayName = '%s'.\", displayName);\n\n hasWarnedAboutDisplayNameOnConsumer = true;\n }\n }\n }\n }); // $FlowFixMe: Flow complains about missing properties because it doesn't understand defineProperty\n\n context.Consumer = Consumer;\n }\n\n {\n context._currentRenderer = null;\n context._currentRenderer2 = null;\n }\n\n return context;\n}\n\nvar Uninitialized = -1;\nvar Pending = 0;\nvar Resolved = 1;\nvar Rejected = 2;\n\nfunction lazyInitializer(payload) {\n if (payload._status === Uninitialized) {\n var ctor = payload._result;\n var thenable = ctor(); // Transition to the next state.\n\n var pending = payload;\n pending._status = Pending;\n pending._result = thenable;\n thenable.then(function (moduleObject) {\n if (payload._status === Pending) {\n var defaultExport = moduleObject.default;\n\n {\n if (defaultExport === undefined) {\n 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.\n 'const MyComponent = lazy(() => imp' + \"ort('./MyComponent'))\", moduleObject);\n }\n } // Transition to the next state.\n\n\n var resolved = payload;\n resolved._status = Resolved;\n resolved._result = defaultExport;\n }\n }, function (error) {\n if (payload._status === Pending) {\n // Transition to the next state.\n var rejected = payload;\n rejected._status = Rejected;\n rejected._result = error;\n }\n });\n }\n\n if (payload._status === Resolved) {\n return payload._result;\n } else {\n throw payload._result;\n }\n}\n\nfunction lazy(ctor) {\n var payload = {\n // We use these fields to store the result.\n _status: -1,\n _result: ctor\n };\n var lazyType = {\n $$typeof: REACT_LAZY_TYPE,\n _payload: payload,\n _init: lazyInitializer\n };\n\n {\n // In production, this would just set it on the object.\n var defaultProps;\n var propTypes; // $FlowFixMe\n\n Object.defineProperties(lazyType, {\n defaultProps: {\n configurable: true,\n get: function () {\n return defaultProps;\n },\n set: function (newDefaultProps) {\n 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.');\n\n defaultProps = newDefaultProps; // Match production behavior more closely:\n // $FlowFixMe\n\n Object.defineProperty(lazyType, 'defaultProps', {\n enumerable: true\n });\n }\n },\n propTypes: {\n configurable: true,\n get: function () {\n return propTypes;\n },\n set: function (newPropTypes) {\n 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.');\n\n propTypes = newPropTypes; // Match production behavior more closely:\n // $FlowFixMe\n\n Object.defineProperty(lazyType, 'propTypes', {\n enumerable: true\n });\n }\n }\n });\n }\n\n return lazyType;\n}\n\nfunction forwardRef(render) {\n {\n if (render != null && render.$$typeof === REACT_MEMO_TYPE) {\n error('forwardRef requires a render function but received a `memo` ' + 'component. Instead of forwardRef(memo(...)), use ' + 'memo(forwardRef(...)).');\n } else if (typeof render !== 'function') {\n error('forwardRef requires a render function but was given %s.', render === null ? 'null' : typeof render);\n } else {\n if (render.length !== 0 && render.length !== 2) {\n 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.');\n }\n }\n\n if (render != null) {\n if (render.defaultProps != null || render.propTypes != null) {\n error('forwardRef render functions do not support propTypes or defaultProps. ' + 'Did you accidentally pass a React component?');\n }\n }\n }\n\n var elementType = {\n $$typeof: REACT_FORWARD_REF_TYPE,\n render: render\n };\n\n {\n var ownName;\n Object.defineProperty(elementType, 'displayName', {\n enumerable: false,\n configurable: true,\n get: function () {\n return ownName;\n },\n set: function (name) {\n ownName = name;\n\n if (render.displayName == null) {\n render.displayName = name;\n }\n }\n });\n }\n\n return elementType;\n}\n\n// Filter certain DOM attributes (e.g. src, href) if their values are empty strings.\n\nvar enableScopeAPI = false; // Experimental Create Event Handle API.\n\nfunction isValidElementType(type) {\n if (typeof type === 'string' || typeof type === 'function') {\n return true;\n } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).\n\n\n 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 ) {\n return true;\n }\n\n if (typeof type === 'object' && type !== null) {\n 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) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction memo(type, compare) {\n {\n if (!isValidElementType(type)) {\n error('memo: The first argument must be a component. Instead ' + 'received: %s', type === null ? 'null' : typeof type);\n }\n }\n\n var elementType = {\n $$typeof: REACT_MEMO_TYPE,\n type: type,\n compare: compare === undefined ? null : compare\n };\n\n {\n var ownName;\n Object.defineProperty(elementType, 'displayName', {\n enumerable: false,\n configurable: true,\n get: function () {\n return ownName;\n },\n set: function (name) {\n ownName = name;\n\n if (type.displayName == null) {\n type.displayName = name;\n }\n }\n });\n }\n\n return elementType;\n}\n\nfunction resolveDispatcher() {\n var dispatcher = ReactCurrentDispatcher.current;\n\n if (!(dispatcher !== null)) {\n {\n 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.\" );\n }\n }\n\n return dispatcher;\n}\n\nfunction useContext(Context, unstable_observedBits) {\n var dispatcher = resolveDispatcher();\n\n {\n if (unstable_observedBits !== undefined) {\n 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' : '');\n } // TODO: add a more generic warning for invalid values.\n\n\n if (Context._context !== undefined) {\n var realContext = Context._context; // Don't deduplicate because this legitimately causes bugs\n // and nobody should be using this in existing code.\n\n if (realContext.Consumer === Context) {\n 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?');\n } else if (realContext.Provider === Context) {\n error('Calling useContext(Context.Provider) is not supported. ' + 'Did you mean to call useContext(Context) instead?');\n }\n }\n }\n\n return dispatcher.useContext(Context, unstable_observedBits);\n}\nfunction useState(initialState) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useState(initialState);\n}\nfunction useReducer(reducer, initialArg, init) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useReducer(reducer, initialArg, init);\n}\nfunction useRef(initialValue) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useRef(initialValue);\n}\nfunction useEffect(create, deps) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useEffect(create, deps);\n}\nfunction useLayoutEffect(create, deps) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useLayoutEffect(create, deps);\n}\nfunction useCallback(callback, deps) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useCallback(callback, deps);\n}\nfunction useMemo(create, deps) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useMemo(create, deps);\n}\nfunction useImperativeHandle(ref, create, deps) {\n var dispatcher = resolveDispatcher();\n return dispatcher.useImperativeHandle(ref, create, deps);\n}\nfunction useDebugValue(value, formatterFn) {\n {\n var dispatcher = resolveDispatcher();\n return dispatcher.useDebugValue(value, formatterFn);\n }\n}\n\n// Helpers to patch console.logs to avoid logging during side-effect free\n// replaying on render function. This currently only patches the object\n// lazily which won't cover if the log function was extracted eagerly.\n// We could also eagerly patch the method.\nvar disabledDepth = 0;\nvar prevLog;\nvar prevInfo;\nvar prevWarn;\nvar prevError;\nvar prevGroup;\nvar prevGroupCollapsed;\nvar prevGroupEnd;\n\nfunction disabledLog() {}\n\ndisabledLog.__reactDisabledLog = true;\nfunction disableLogs() {\n {\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n prevLog = console.log;\n prevInfo = console.info;\n prevWarn = console.warn;\n prevError = console.error;\n prevGroup = console.group;\n prevGroupCollapsed = console.groupCollapsed;\n prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099\n\n var props = {\n configurable: true,\n enumerable: true,\n value: disabledLog,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n info: props,\n log: props,\n warn: props,\n error: props,\n group: props,\n groupCollapsed: props,\n groupEnd: props\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n disabledDepth++;\n }\n}\nfunction reenableLogs() {\n {\n disabledDepth--;\n\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n var props = {\n configurable: true,\n enumerable: true,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n log: _assign({}, props, {\n value: prevLog\n }),\n info: _assign({}, props, {\n value: prevInfo\n }),\n warn: _assign({}, props, {\n value: prevWarn\n }),\n error: _assign({}, props, {\n value: prevError\n }),\n group: _assign({}, props, {\n value: prevGroup\n }),\n groupCollapsed: _assign({}, props, {\n value: prevGroupCollapsed\n }),\n groupEnd: _assign({}, props, {\n value: prevGroupEnd\n })\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n if (disabledDepth < 0) {\n error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');\n }\n }\n}\n\nvar ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher;\nvar prefix;\nfunction describeBuiltInComponentFrame(name, source, ownerFn) {\n {\n if (prefix === undefined) {\n // Extract the VM specific prefix used by each line.\n try {\n throw Error();\n } catch (x) {\n var match = x.stack.trim().match(/\\n( *(at )?)/);\n prefix = match && match[1] || '';\n }\n } // We use the prefix to ensure our stacks line up with native stack frames.\n\n\n return '\\n' + prefix + name;\n }\n}\nvar reentry = false;\nvar componentFrameCache;\n\n{\n var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;\n componentFrameCache = new PossiblyWeakMap();\n}\n\nfunction describeNativeComponentFrame(fn, construct) {\n // If something asked for a stack inside a fake render, it should get ignored.\n if (!fn || reentry) {\n return '';\n }\n\n {\n var frame = componentFrameCache.get(fn);\n\n if (frame !== undefined) {\n return frame;\n }\n }\n\n var control;\n reentry = true;\n var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.\n\n Error.prepareStackTrace = undefined;\n var previousDispatcher;\n\n {\n previousDispatcher = ReactCurrentDispatcher$1.current; // Set the dispatcher in DEV because this might be call in the render function\n // for warnings.\n\n ReactCurrentDispatcher$1.current = null;\n disableLogs();\n }\n\n try {\n // This should throw.\n if (construct) {\n // Something should be setting the props in the constructor.\n var Fake = function () {\n throw Error();\n }; // $FlowFixMe\n\n\n Object.defineProperty(Fake.prototype, 'props', {\n set: function () {\n // We use a throwing setter instead of frozen or non-writable props\n // because that won't throw in a non-strict mode function.\n throw Error();\n }\n });\n\n if (typeof Reflect === 'object' && Reflect.construct) {\n // We construct a different control for this case to include any extra\n // frames added by the construct call.\n try {\n Reflect.construct(Fake, []);\n } catch (x) {\n control = x;\n }\n\n Reflect.construct(fn, [], Fake);\n } else {\n try {\n Fake.call();\n } catch (x) {\n control = x;\n }\n\n fn.call(Fake.prototype);\n }\n } else {\n try {\n throw Error();\n } catch (x) {\n control = x;\n }\n\n fn();\n }\n } catch (sample) {\n // This is inlined manually because closure doesn't do it for us.\n if (sample && control && typeof sample.stack === 'string') {\n // This extracts the first frame from the sample that isn't also in the control.\n // Skipping one frame that we assume is the frame that calls the two.\n var sampleLines = sample.stack.split('\\n');\n var controlLines = control.stack.split('\\n');\n var s = sampleLines.length - 1;\n var c = controlLines.length - 1;\n\n while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {\n // We expect at least one stack frame to be shared.\n // Typically this will be the root most one. However, stack frames may be\n // cut off due to maximum stack limits. In this case, one maybe cut off\n // earlier than the other. We assume that the sample is longer or the same\n // and there for cut off earlier. So we should find the root most frame in\n // the sample somewhere in the control.\n c--;\n }\n\n for (; s >= 1 && c >= 0; s--, c--) {\n // Next we find the first one that isn't the same which should be the\n // frame that called our sample function and the control.\n if (sampleLines[s] !== controlLines[c]) {\n // In V8, the first line is describing the message but other VMs don't.\n // If we're about to return the first line, and the control is also on the same\n // line, that's a pretty good indicator that our sample threw at same line as\n // the control. I.e. before we entered the sample frame. So we ignore this result.\n // This can happen if you passed a class to function component, or non-function.\n if (s !== 1 || c !== 1) {\n do {\n s--;\n c--; // We may still have similar intermediate frames from the construct call.\n // The next one that isn't the same should be our match though.\n\n if (c < 0 || sampleLines[s] !== controlLines[c]) {\n // V8 adds a \"new\" prefix for native classes. Let's remove it to make it prettier.\n var _frame = '\\n' + sampleLines[s].replace(' at new ', ' at ');\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, _frame);\n }\n } // Return the line we found.\n\n\n return _frame;\n }\n } while (s >= 1 && c >= 0);\n }\n\n break;\n }\n }\n }\n } finally {\n reentry = false;\n\n {\n ReactCurrentDispatcher$1.current = previousDispatcher;\n reenableLogs();\n }\n\n Error.prepareStackTrace = previousPrepareStackTrace;\n } // Fallback to just using the name if we couldn't make it throw.\n\n\n var name = fn ? fn.displayName || fn.name : '';\n var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, syntheticFrame);\n }\n }\n\n return syntheticFrame;\n}\nfunction describeFunctionComponentFrame(fn, source, ownerFn) {\n {\n return describeNativeComponentFrame(fn, false);\n }\n}\n\nfunction shouldConstruct(Component) {\n var prototype = Component.prototype;\n return !!(prototype && prototype.isReactComponent);\n}\n\nfunction describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {\n\n if (type == null) {\n return '';\n }\n\n if (typeof type === 'function') {\n {\n return describeNativeComponentFrame(type, shouldConstruct(type));\n }\n }\n\n if (typeof type === 'string') {\n return describeBuiltInComponentFrame(type);\n }\n\n switch (type) {\n case exports.Suspense:\n return describeBuiltInComponentFrame('Suspense');\n\n case REACT_SUSPENSE_LIST_TYPE:\n return describeBuiltInComponentFrame('SuspenseList');\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_FORWARD_REF_TYPE:\n return describeFunctionComponentFrame(type.render);\n\n case REACT_MEMO_TYPE:\n // Memo may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);\n\n case REACT_BLOCK_TYPE:\n return describeFunctionComponentFrame(type._render);\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n // Lazy may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);\n } catch (x) {}\n }\n }\n }\n\n return '';\n}\n\nvar loggedTypeFailures = {};\nvar ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;\n\nfunction setCurrentlyValidatingElement(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n ReactDebugCurrentFrame$1.setExtraStackFrame(stack);\n } else {\n ReactDebugCurrentFrame$1.setExtraStackFrame(null);\n }\n }\n}\n\nfunction checkPropTypes(typeSpecs, values, location, componentName, element) {\n {\n // $FlowFixMe This is okay but Flow doesn't know it.\n var has = Function.call.bind(Object.prototype.hasOwnProperty);\n\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n 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`.');\n err.name = 'Invariant Violation';\n throw err;\n }\n\n error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');\n } catch (ex) {\n error$1 = ex;\n }\n\n if (error$1 && !(error$1 instanceof Error)) {\n setCurrentlyValidatingElement(element);\n\n 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);\n\n setCurrentlyValidatingElement(null);\n }\n\n if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error$1.message] = true;\n setCurrentlyValidatingElement(element);\n\n error('Failed %s type: %s', location, error$1.message);\n\n setCurrentlyValidatingElement(null);\n }\n }\n }\n }\n}\n\nfunction setCurrentlyValidatingElement$1(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n setExtraStackFrame(stack);\n } else {\n setExtraStackFrame(null);\n }\n }\n}\n\nvar propTypesMisspellWarningShown;\n\n{\n propTypesMisspellWarningShown = false;\n}\n\nfunction getDeclarationErrorAddendum() {\n if (ReactCurrentOwner.current) {\n var name = getComponentName(ReactCurrentOwner.current.type);\n\n if (name) {\n return '\\n\\nCheck the render method of `' + name + '`.';\n }\n }\n\n return '';\n}\n\nfunction getSourceInfoErrorAddendum(source) {\n if (source !== undefined) {\n var fileName = source.fileName.replace(/^.*[\\\\\\/]/, '');\n var lineNumber = source.lineNumber;\n return '\\n\\nCheck your code at ' + fileName + ':' + lineNumber + '.';\n }\n\n return '';\n}\n\nfunction getSourceInfoErrorAddendumForProps(elementProps) {\n if (elementProps !== null && elementProps !== undefined) {\n return getSourceInfoErrorAddendum(elementProps.__source);\n }\n\n return '';\n}\n/**\n * Warn if there's no key explicitly set on dynamic arrays of children or\n * object keys are not valid. This allows us to keep track of children between\n * updates.\n */\n\n\nvar ownerHasKeyUseWarning = {};\n\nfunction getCurrentComponentErrorInfo(parentType) {\n var info = getDeclarationErrorAddendum();\n\n if (!info) {\n var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;\n\n if (parentName) {\n info = \"\\n\\nCheck the top-level render call using <\" + parentName + \">.\";\n }\n }\n\n return info;\n}\n/**\n * Warn if the element doesn't have an explicit key assigned to it.\n * This element is in an array. The array could grow and shrink or be\n * reordered. All children that haven't already been validated are required to\n * have a \"key\" property assigned to it. Error statuses are cached so a warning\n * will only be shown once.\n *\n * @internal\n * @param {ReactElement} element Element that requires a key.\n * @param {*} parentType element's parent's type.\n */\n\n\nfunction validateExplicitKey(element, parentType) {\n if (!element._store || element._store.validated || element.key != null) {\n return;\n }\n\n element._store.validated = true;\n var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);\n\n if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {\n return;\n }\n\n ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a\n // property, it may be the creator of the child that's responsible for\n // assigning it a key.\n\n var childOwner = '';\n\n if (element && element._owner && element._owner !== ReactCurrentOwner.current) {\n // Give the component that originally created this child.\n childOwner = \" It was passed a child from \" + getComponentName(element._owner.type) + \".\";\n }\n\n {\n setCurrentlyValidatingElement$1(element);\n\n 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);\n\n setCurrentlyValidatingElement$1(null);\n }\n}\n/**\n * Ensure that every element either is passed in a static location, in an\n * array with an explicit keys property defined, or in an object literal\n * with valid key property.\n *\n * @internal\n * @param {ReactNode} node Statically passed child of any type.\n * @param {*} parentType node's parent's type.\n */\n\n\nfunction validateChildKeys(node, parentType) {\n if (typeof node !== 'object') {\n return;\n }\n\n if (Array.isArray(node)) {\n for (var i = 0; i < node.length; i++) {\n var child = node[i];\n\n if (isValidElement(child)) {\n validateExplicitKey(child, parentType);\n }\n }\n } else if (isValidElement(node)) {\n // This element was passed in a valid location.\n if (node._store) {\n node._store.validated = true;\n }\n } else if (node) {\n var iteratorFn = getIteratorFn(node);\n\n if (typeof iteratorFn === 'function') {\n // Entry iterators used to provide implicit keys,\n // but now we print a separate warning for them later.\n if (iteratorFn !== node.entries) {\n var iterator = iteratorFn.call(node);\n var step;\n\n while (!(step = iterator.next()).done) {\n if (isValidElement(step.value)) {\n validateExplicitKey(step.value, parentType);\n }\n }\n }\n }\n }\n}\n/**\n * Given an element, validate that its props follow the propTypes definition,\n * provided by the type.\n *\n * @param {ReactElement} element\n */\n\n\nfunction validatePropTypes(element) {\n {\n var type = element.type;\n\n if (type === null || type === undefined || typeof type === 'string') {\n return;\n }\n\n var propTypes;\n\n if (typeof type === 'function') {\n propTypes = type.propTypes;\n } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.\n // Inner props are checked in the reconciler.\n type.$$typeof === REACT_MEMO_TYPE)) {\n propTypes = type.propTypes;\n } else {\n return;\n }\n\n if (propTypes) {\n // Intentionally inside to avoid triggering lazy initializers:\n var name = getComponentName(type);\n checkPropTypes(propTypes, element.props, 'prop', name, element);\n } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {\n propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:\n\n var _name = getComponentName(type);\n\n error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');\n }\n\n if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {\n error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');\n }\n }\n}\n/**\n * Given a fragment, validate that it can only be provided with fragment props\n * @param {ReactElement} fragment\n */\n\n\nfunction validateFragmentProps(fragment) {\n {\n var keys = Object.keys(fragment.props);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n\n if (key !== 'children' && key !== 'key') {\n setCurrentlyValidatingElement$1(fragment);\n\n error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);\n\n setCurrentlyValidatingElement$1(null);\n break;\n }\n }\n\n if (fragment.ref !== null) {\n setCurrentlyValidatingElement$1(fragment);\n\n error('Invalid attribute `ref` supplied to `React.Fragment`.');\n\n setCurrentlyValidatingElement$1(null);\n }\n }\n}\nfunction createElementWithValidation(type, props, children) {\n var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to\n // succeed and there will likely be errors in render.\n\n if (!validType) {\n var info = '';\n\n if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {\n 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.\";\n }\n\n var sourceInfo = getSourceInfoErrorAddendumForProps(props);\n\n if (sourceInfo) {\n info += sourceInfo;\n } else {\n info += getDeclarationErrorAddendum();\n }\n\n var typeString;\n\n if (type === null) {\n typeString = 'null';\n } else if (Array.isArray(type)) {\n typeString = 'array';\n } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {\n typeString = \"<\" + (getComponentName(type.type) || 'Unknown') + \" />\";\n info = ' Did you accidentally export a JSX literal instead of a component?';\n } else {\n typeString = typeof type;\n }\n\n {\n 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);\n }\n }\n\n var element = createElement.apply(this, arguments); // The result can be nullish if a mock or a custom function is used.\n // TODO: Drop this when these are no longer allowed as the type argument.\n\n if (element == null) {\n return element;\n } // Skip key warning if the type isn't valid since our key validation logic\n // doesn't expect a non-string/function type and can throw confusing errors.\n // We don't want exception behavior to differ between dev and prod.\n // (Rendering will throw with a helpful message and as soon as the type is\n // fixed, the key warnings will appear.)\n\n\n if (validType) {\n for (var i = 2; i < arguments.length; i++) {\n validateChildKeys(arguments[i], type);\n }\n }\n\n if (type === exports.Fragment) {\n validateFragmentProps(element);\n } else {\n validatePropTypes(element);\n }\n\n return element;\n}\nvar didWarnAboutDeprecatedCreateFactory = false;\nfunction createFactoryWithValidation(type) {\n var validatedFactory = createElementWithValidation.bind(null, type);\n validatedFactory.type = type;\n\n {\n if (!didWarnAboutDeprecatedCreateFactory) {\n didWarnAboutDeprecatedCreateFactory = true;\n\n warn('React.createFactory() is deprecated and will be removed in ' + 'a future major release. Consider using JSX ' + 'or use React.createElement() directly instead.');\n } // Legacy hook: remove it\n\n\n Object.defineProperty(validatedFactory, 'type', {\n enumerable: false,\n get: function () {\n warn('Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.');\n\n Object.defineProperty(this, 'type', {\n value: type\n });\n return type;\n }\n });\n }\n\n return validatedFactory;\n}\nfunction cloneElementWithValidation(element, props, children) {\n var newElement = cloneElement.apply(this, arguments);\n\n for (var i = 2; i < arguments.length; i++) {\n validateChildKeys(arguments[i], newElement.type);\n }\n\n validatePropTypes(newElement);\n return newElement;\n}\n\n{\n\n try {\n var frozenObject = Object.freeze({});\n /* eslint-disable no-new */\n\n new Map([[frozenObject, null]]);\n new Set([frozenObject]);\n /* eslint-enable no-new */\n } catch (e) {\n }\n}\n\nvar createElement$1 = createElementWithValidation ;\nvar cloneElement$1 = cloneElementWithValidation ;\nvar createFactory = createFactoryWithValidation ;\nvar Children = {\n map: mapChildren,\n forEach: forEachChildren,\n count: countChildren,\n toArray: toArray,\n only: onlyChild\n};\n\nexports.Children = Children;\nexports.Component = Component;\nexports.PureComponent = PureComponent;\nexports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals;\nexports.cloneElement = cloneElement$1;\nexports.createContext = createContext;\nexports.createElement = createElement$1;\nexports.createFactory = createFactory;\nexports.createRef = createRef;\nexports.forwardRef = forwardRef;\nexports.isValidElement = isValidElement;\nexports.lazy = lazy;\nexports.memo = memo;\nexports.useCallback = useCallback;\nexports.useContext = useContext;\nexports.useDebugValue = useDebugValue;\nexports.useEffect = useEffect;\nexports.useImperativeHandle = useImperativeHandle;\nexports.useLayoutEffect = useLayoutEffect;\nexports.useMemo = useMemo;\nexports.useReducer = useReducer;\nexports.useRef = useRef;\nexports.useState = useState;\nexports.version = ReactVersion;\n })();\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL3JlYWN0L2Nqcy9yZWFjdC5kZXZlbG9wbWVudC5qcy5qcyIsIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVhOztBQUViLElBQUksSUFBcUM7QUFDekM7QUFDQTs7QUFFQSxjQUFjLG1CQUFPLENBQUMsaUZBQWU7O0FBRXJDO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxnQkFBZ0I7QUFD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R1cm4gZ2V0Q29udGV4dE5hbWUoY29udGV4dCkgKyAnLkNvbnN1bWVyJztcblxuICAgICAgY2FzZSBSRUFDVF9QUk9WSURFUl9UWVBFOlxuICAgICAgICB2YXIgcHJvdmlkZXIgPSB0eXBlO1xuICAgICAgICByZXR1cm4gZ2V0Q29udGV4dE5hbWUocHJvdmlkZXIuX2NvbnRleHQpICsgJy5Qcm92aWRlcic7XG5cbiAgICAgIGNhc2UgUkVBQ1RfRk9SV0FSRF9SRUZfVFlQRTpcbiAgICAgICAgcmV0dXJuIGdldFdyYXBwZWROYW1lKHR5cGUsIHR5cGUucmVuZGVyLCAnRm9yd2FyZFJlZicpO1xuXG4gICAgICBjYXNlIFJFQUNUX01FTU9fVFlQRTpcbiAgICAgICAgcmV0dXJuIGdldENvbXBvbmVudE5hbWUodHlwZS50eXBlKTtcblxuICAgICAgY2FzZSBSRUFDVF9CTE9DS19UWVBFOlxuICAgICAgICByZXR1cm4gZ2V0Q29tcG9uZW50TmFtZSh0eXBlLl9yZW5kZXIpO1xuXG4gICAgICBjYXNlIFJFQUNUX0xBWllfVFlQRTpcbiAgICAgICAge1xuICAgICAgICAgIHZhciBsYXp5Q29tcG9uZW50ID0gdHlwZTtcbiAgICAgICAgICB2YXIgcGF5bG9hZCA9IGxhenlDb21wb25lbnQuX3BheWxvYWQ7XG4gICAgICAgICAgdmFyIGluaXQgPSBsYXp5Q29tcG9uZW50Ll9pbml0O1xuXG4gICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgIHJldHVybiBnZXRDb21wb25lbnROYW1lKGluaXQocGF5bG9hZCkpO1xuICAgICAgICAgIH0gY2F0Y2ggKHgpIHtcbiAgICAgICAgICAgIHJldHVybiBudWxsO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cbiAgfVxuXG4gIHJldHVybiBudWxsO1xufVxuXG52YXIgaGFzT3duUHJvcGVydHkgPSBPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5O1xudmFyIFJ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V4dC5fY3VycmVudFZhbHVlO1xuICAgICAgICB9LFxuICAgICAgICBzZXQ6IGZ1bmN0aW9uIChfY3VycmVudFZhbHVlKSB7XG4gICAgICAgICAgY29udGV4dC5fY3VycmVudFZhbHVlID0gX2N1cnJlbnRWYWx1ZTtcbiAgICAgICAgfVxuICAgICAgfSxcbiAgICAgIF9jdXJyZW50VmFsdWUyOiB7XG4gICAgICAgIGdldDogZnVuY3Rpb24gKCkge1xuICAgICAgICAgIHJldHVybiBjb250ZXh0Ll9jdXJyZW50VmFsdWUyO1xuICAgICAgICB9LFxuICAgICAgICBzZXQ6IGZ1bmN0aW9uIChfY3VycmVudFZhbHVlMikge1xuICAgICAgICAgIGNvbnRleHQuX2N1cnJlbnRWYWx1ZTIgPSBfY3VycmVudFZhbHVlMjtcbiAgICAgICAgfVxuICAgICAgfSxcbiAgICAgIF90aHJlYWRDb3VudDoge1xuICAgICAgICBnZXQ6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICByZXR1cm4gY29udGV4dC5fdGhyZWFkQ291bnQ7XG4gICAgICAgIH0sXG4gICAgICAgIHNldDogZnVuY3Rpb24gKF90aHJlYWRDb3VudCkge1xuICAgICAgICAgIGNvbnRleHQuX3RocmVhZENvdW50ID0gX3RocmVhZENvdW50O1xuICAgICAgICB9XG4gICAgICB9LFxuICAgICAgQ29uc3VtZXI6IHtcbiAgICAgICAgZ2V0OiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgaWYgKCFoYXNXYXJuZWRBYm91dFVzaW5nTmVzdGVkQ29udGV4dENvbnN1bWVycykge1xuICAgICAgICAgICAgaGFzV2FybmVkQWJvdXRVc2luZ05lc3RlZENvbnRleHRDb25zdW1lcnMgPSB0cnVlO1xuXG4gICAgICAgICAgICBlcnJvcignUmVuZGVyaW5nIDxDb250ZXh0LkNvbnN1bWVyLkNvbnN1bWVyPiBpcyBub3Qgc3VwcG9ydGVkIGFuZCB3aWxsIGJlIHJlbW92ZWQgaW4gJyArICdhIGZ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ydHMudXNlRWZmZWN0ID0gdXNlRWZmZWN0O1xuZXhwb3J0cy51c2VJbXBlcmF0aXZlSGFuZGxlID0gdXNlSW1wZXJhdGl2ZUhhbmRsZTtcbmV4cG9ydHMudXNlTGF5b3V0RWZmZWN0ID0gdXNlTGF5b3V0RWZmZWN0O1xuZXhwb3J0cy51c2VNZW1vID0gdXNlTWVtbztcbmV4cG9ydHMudXNlUmVkdWNlciA9IHVzZVJlZHVjZXI7XG5leHBvcnRzLnVzZVJlZiA9IHVzZVJlZjtcbmV4cG9ydHMudXNlU3RhdGUgPSB1c2VTdGF0ZTtcbmV4cG9ydHMudmVyc2lvbiA9IFJlYWN0VmVyc2lvbjtcbiAgfSkoKTtcbn1cbiJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///../node_modules/react/cjs/react.development.js\n"));
/***/ }),
/***/ "../node_modules/react/index.js":
/*!**************************************!*\
!*** ../node_modules/react/index.js ***!
\**************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\n\nif (false) {} else {\n module.exports = __webpack_require__(/*! ./cjs/react.development.js */ \"../node_modules/react/cjs/react.development.js\");\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL3JlYWN0L2luZGV4LmpzLmpzIiwibWFwcGluZ3MiOiJBQUFhOztBQUViLElBQUksS0FBcUMsRUFBRSxFQUUxQyxDQUFDO0FBQ0YsRUFBRSx3SEFBc0Q7QUFDeEQiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9fTl9FLy4uL25vZGVfbW9kdWxlcy9yZWFjdC9pbmRleC5qcz83OWQxIl0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0JztcblxuaWYgKHByb2Nlc3MuZW52Lk5PREVfRU5WID09PSAncHJvZHVjdGlvbicpIHtcbiAgbW9kdWxlLmV4cG9ydHMgPSByZXF1aXJlKCcuL2Nqcy9yZWFjdC5wcm9kdWN0aW9uLm1pbi5qcycpO1xufSBlbHNlIHtcbiAgbW9kdWxlLmV4cG9ydHMgPSByZXF1aXJlKCcuL2Nqcy9yZWFjdC5kZXZlbG9wbWVudC5qcycpO1xufVxuIl0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///../node_modules/react/index.js\n"));
/***/ }),
/***/ "../node_modules/scheduler/cjs/scheduler-tracing.development.js":
/*!**********************************************************************!*\
!*** ../node_modules/scheduler/cjs/scheduler-tracing.development.js ***!
\**********************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("/** @license React v0.20.2\n * scheduler-tracing.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\nif (true) {\n (function() {\n'use strict';\n\nvar DEFAULT_THREAD_ID = 0; // Counters used to generate unique IDs.\n\nvar interactionIDCounter = 0;\nvar threadIDCounter = 0; // Set of currently traced interactions.\n// Interactions \"stack\"\n// Meaning that newly traced interactions are appended to the previously active set.\n// When an interaction goes out of scope, the previous set (if any) is restored.\n\nexports.__interactionsRef = null; // Listener(s) to notify when interactions begin and end.\n\nexports.__subscriberRef = null;\n\n{\n exports.__interactionsRef = {\n current: new Set()\n };\n exports.__subscriberRef = {\n current: null\n };\n}\nfunction unstable_clear(callback) {\n\n var prevInteractions = exports.__interactionsRef.current;\n exports.__interactionsRef.current = new Set();\n\n try {\n return callback();\n } finally {\n exports.__interactionsRef.current = prevInteractions;\n }\n}\nfunction unstable_getCurrent() {\n {\n return exports.__interactionsRef.current;\n }\n}\nfunction unstable_getThreadID() {\n return ++threadIDCounter;\n}\nfunction unstable_trace(name, timestamp, callback) {\n var threadID = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : DEFAULT_THREAD_ID;\n\n var interaction = {\n __count: 1,\n id: interactionIDCounter++,\n name: name,\n timestamp: timestamp\n };\n var prevInteractions = exports.__interactionsRef.current; // Traced interactions should stack/accumulate.\n // To do that, clone the current interactions.\n // The previous set will be restored upon completion.\n\n var interactions = new Set(prevInteractions);\n interactions.add(interaction);\n exports.__interactionsRef.current = interactions;\n var subscriber = exports.__subscriberRef.current;\n var returnValue;\n\n try {\n if (subscriber !== null) {\n subscriber.onInteractionTraced(interaction);\n }\n } finally {\n try {\n if (subscriber !== null) {\n subscriber.onWorkStarted(interactions, threadID);\n }\n } finally {\n try {\n returnValue = callback();\n } finally {\n exports.__interactionsRef.current = prevInteractions;\n\n try {\n if (subscriber !== null) {\n subscriber.onWorkStopped(interactions, threadID);\n }\n } finally {\n interaction.__count--; // If no async work was scheduled for this interaction,\n // Notify subscribers that it's completed.\n\n if (subscriber !== null && interaction.__count === 0) {\n subscriber.onInteractionScheduledWorkCompleted(interaction);\n }\n }\n }\n }\n }\n\n return returnValue;\n}\nfunction unstable_wrap(callback) {\n var threadID = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_THREAD_ID;\n\n var wrappedInteractions = exports.__interactionsRef.current;\n var subscriber = exports.__subscriberRef.current;\n\n if (subscriber !== null) {\n subscriber.onWorkScheduled(wrappedInteractions, threadID);\n } // Update the pending async work count for the current interactions.\n // Update after calling subscribers in case of error.\n\n\n wrappedInteractions.forEach(function (interaction) {\n interaction.__count++;\n });\n var hasRun = false;\n\n function wrapped() {\n var prevInteractions = exports.__interactionsRef.current;\n exports.__interactionsRef.current = wrappedInteractions;\n subscriber = exports.__subscriberRef.current;\n\n try {\n var returnValue;\n\n try {\n if (subscriber !== null) {\n subscriber.onWorkStarted(wrappedInteractions, threadID);\n }\n } finally {\n try {\n returnValue = callback.apply(undefined, arguments);\n } finally {\n exports.__interactionsRef.current = prevInteractions;\n\n if (subscriber !== null) {\n subscriber.onWorkStopped(wrappedInteractions, threadID);\n }\n }\n }\n\n return returnValue;\n } finally {\n if (!hasRun) {\n // We only expect a wrapped function to be executed once,\n // But in the event that it's executed more than once\n // Only decrement the outstanding interaction counts once.\n hasRun = true; // Update pending async counts for all wrapped interactions.\n // If this was the last scheduled async work for any of them,\n // Mark them as completed.\n\n wrappedInteractions.forEach(function (interaction) {\n interaction.__count--;\n\n if (subscriber !== null && interaction.__count === 0) {\n subscriber.onInteractionScheduledWorkCompleted(interaction);\n }\n });\n }\n }\n }\n\n wrapped.cancel = function cancel() {\n subscriber = exports.__subscriberRef.current;\n\n try {\n if (subscriber !== null) {\n subscriber.onWorkCanceled(wrappedInteractions, threadID);\n }\n } finally {\n // Update pending async counts for all wrapped interactions.\n // If this was the last scheduled async work for any of them,\n // Mark them as completed.\n wrappedInteractions.forEach(function (interaction) {\n interaction.__count--;\n\n if (subscriber && interaction.__count === 0) {\n subscriber.onInteractionScheduledWorkCompleted(interaction);\n }\n });\n }\n };\n\n return wrapped;\n}\n\nvar subscribers = null;\n\n{\n subscribers = new Set();\n}\n\nfunction unstable_subscribe(subscriber) {\n {\n subscribers.add(subscriber);\n\n if (subscribers.size === 1) {\n exports.__subscriberRef.current = {\n onInteractionScheduledWorkCompleted: onInteractionScheduledWorkCompleted,\n onInteractionTraced: onInteractionTraced,\n onWorkCanceled: onWorkCanceled,\n onWorkScheduled: onWorkScheduled,\n onWorkStarted: onWorkStarted,\n onWorkStopped: onWorkStopped\n };\n }\n }\n}\nfunction unstable_unsubscribe(subscriber) {\n {\n subscribers.delete(subscriber);\n\n if (subscribers.size === 0) {\n exports.__subscriberRef.current = null;\n }\n }\n}\n\nfunction onInteractionTraced(interaction) {\n var didCatchError = false;\n var caughtError = null;\n subscribers.forEach(function (subscriber) {\n try {\n subscriber.onInteractionTraced(interaction);\n } catch (error) {\n if (!didCatchError) {\n didCatchError = true;\n caughtError = error;\n }\n }\n });\n\n if (didCatchError) {\n throw caughtError;\n }\n}\n\nfunction onInteractionScheduledWorkCompleted(interaction) {\n var didCatchError = false;\n var caughtError = null;\n subscribers.forEach(function (subscriber) {\n try {\n subscriber.onInteractionScheduledWorkCompleted(interaction);\n } catch (error) {\n if (!didCatchError) {\n didCatchError = true;\n caughtError = error;\n }\n }\n });\n\n if (didCatchError) {\n throw caughtError;\n }\n}\n\nfunction onWorkScheduled(interactions, threadID) {\n var didCatchError = false;\n var caughtError = null;\n subscribers.forEach(function (subscriber) {\n try {\n subscriber.onWorkScheduled(interactions, threadID);\n } catch (error) {\n if (!didCatchError) {\n didCatchError = true;\n caughtError = error;\n }\n }\n });\n\n if (didCatchError) {\n throw caughtError;\n }\n}\n\nfunction onWorkStarted(interactions, threadID) {\n var didCatchError = false;\n var caughtError = null;\n subscribers.forEach(function (subscriber) {\n try {\n subscriber.onWorkStarted(interactions, threadID);\n } catch (error) {\n if (!didCatchError) {\n didCatchError = true;\n caughtError = error;\n }\n }\n });\n\n if (didCatchError) {\n throw caughtError;\n }\n}\n\nfunction onWorkStopped(interactions, threadID) {\n var didCatchError = false;\n var caughtError = null;\n subscribers.forEach(function (subscriber) {\n try {\n subscriber.onWorkStopped(interactions, threadID);\n } catch (error) {\n if (!didCatchError) {\n didCatchError = true;\n caughtError = error;\n }\n }\n });\n\n if (didCatchError) {\n throw caughtError;\n }\n}\n\nfunction onWorkCanceled(interactions, threadID) {\n var didCatchError = false;\n var caughtError = null;\n subscribers.forEach(function (subscriber) {\n try {\n subscriber.onWorkCanceled(interactions, threadID);\n } catch (error) {\n if (!didCatchError) {\n didCatchError = true;\n caughtError = error;\n }\n }\n });\n\n if (didCatchError) {\n throw caughtError;\n }\n}\n\nexports.unstable_clear = unstable_clear;\nexports.unstable_getCurrent = unstable_getCurrent;\nexports.unstable_getThreadID = unstable_getThreadID;\nexports.unstable_subscribe = unstable_subscribe;\nexports.unstable_trace = unstable_trace;\nexports.unstable_unsubscribe = unstable_unsubscribe;\nexports.unstable_wrap = unstable_wrap;\n })();\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;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mxlX3N1YnNjcmliZTtcbmV4cG9ydHMudW5zdGFibGVfdHJhY2UgPSB1bnN0YWJsZV90cmFjZTtcbmV4cG9ydHMudW5zdGFibGVfdW5zdWJzY3JpYmUgPSB1bnN0YWJsZV91bnN1YnNjcmliZTtcbmV4cG9ydHMudW5zdGFibGVfd3JhcCA9IHVuc3RhYmxlX3dyYXA7XG4gIH0pKCk7XG59XG4iXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///../node_modules/scheduler/cjs/scheduler-tracing.development.js\n"));
/***/ }),
/***/ "../node_modules/scheduler/cjs/scheduler.development.js":
/*!**************************************************************!*\
!*** ../node_modules/scheduler/cjs/scheduler.development.js ***!
\**************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("/** @license React v0.20.2\n * scheduler.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\nif (true) {\n (function() {\n'use strict';\n\nvar enableSchedulerDebugging = false;\nvar enableProfiling = false;\n\nvar requestHostCallback;\nvar requestHostTimeout;\nvar cancelHostTimeout;\nvar requestPaint;\nvar hasPerformanceNow = typeof performance === 'object' && typeof performance.now === 'function';\n\nif (hasPerformanceNow) {\n var localPerformance = performance;\n\n exports.unstable_now = function () {\n return localPerformance.now();\n };\n} else {\n var localDate = Date;\n var initialTime = localDate.now();\n\n exports.unstable_now = function () {\n return localDate.now() - initialTime;\n };\n}\n\nif ( // If Scheduler runs in a non-DOM environment, it falls back to a naive\n// implementation using setTimeout.\ntypeof window === 'undefined' || // Check if MessageChannel is supported, too.\ntypeof MessageChannel !== 'function') {\n // If this accidentally gets imported in a non-browser environment, e.g. JavaScriptCore,\n // fallback to a naive implementation.\n var _callback = null;\n var _timeoutID = null;\n\n var _flushCallback = function () {\n if (_callback !== null) {\n try {\n var currentTime = exports.unstable_now();\n var hasRemainingTime = true;\n\n _callback(hasRemainingTime, currentTime);\n\n _callback = null;\n } catch (e) {\n setTimeout(_flushCallback, 0);\n throw e;\n }\n }\n };\n\n requestHostCallback = function (cb) {\n if (_callback !== null) {\n // Protect against re-entrancy.\n setTimeout(requestHostCallback, 0, cb);\n } else {\n _callback = cb;\n setTimeout(_flushCallback, 0);\n }\n };\n\n requestHostTimeout = function (cb, ms) {\n _timeoutID = setTimeout(cb, ms);\n };\n\n cancelHostTimeout = function () {\n clearTimeout(_timeoutID);\n };\n\n exports.unstable_shouldYield = function () {\n return false;\n };\n\n requestPaint = exports.unstable_forceFrameRate = function () {};\n} else {\n // Capture local references to native APIs, in case a polyfill overrides them.\n var _setTimeout = window.setTimeout;\n var _clearTimeout = window.clearTimeout;\n\n if (typeof console !== 'undefined') {\n // TODO: Scheduler no longer requires these methods to be polyfilled. But\n // maybe we want to continue warning if they don't exist, to preserve the\n // option to rely on it in the future?\n var requestAnimationFrame = window.requestAnimationFrame;\n var cancelAnimationFrame = window.cancelAnimationFrame;\n\n if (typeof requestAnimationFrame !== 'function') {\n // Using console['error'] to evade Babel and ESLint\n console['error'](\"This browser doesn't support requestAnimationFrame. \" + 'Make sure that you load a ' + 'polyfill in older browsers. https://reactjs.org/link/react-polyfills');\n }\n\n if (typeof cancelAnimationFrame !== 'function') {\n // Using console['error'] to evade Babel and ESLint\n console['error'](\"This browser doesn't support cancelAnimationFrame. \" + 'Make sure that you load a ' + 'polyfill in older browsers. https://reactjs.org/link/react-polyfills');\n }\n }\n\n var isMessageLoopRunning = false;\n var scheduledHostCallback = null;\n var taskTimeoutID = -1; // Scheduler periodically yields in case there is other work on the main\n // thread, like user events. By default, it yields multiple times per frame.\n // It does not attempt to align with frame boundaries, since most tasks don't\n // need to be frame aligned; for those that do, use requestAnimationFrame.\n\n var yieldInterval = 5;\n var deadline = 0; // TODO: Make this configurable\n\n {\n // `isInputPending` is not available. Since we have no way of knowing if\n // there's pending input, always yield at the end of the frame.\n exports.unstable_shouldYield = function () {\n return exports.unstable_now() >= deadline;\n }; // Since we yield every frame regardless, `requestPaint` has no effect.\n\n\n requestPaint = function () {};\n }\n\n exports.unstable_forceFrameRate = function (fps) {\n if (fps < 0 || fps > 125) {\n // Using console['error'] to evade Babel and ESLint\n console['error']('forceFrameRate takes a positive int between 0 and 125, ' + 'forcing frame rates higher than 125 fps is not supported');\n return;\n }\n\n if (fps > 0) {\n yieldInterval = Math.floor(1000 / fps);\n } else {\n // reset the framerate\n yieldInterval = 5;\n }\n };\n\n var performWorkUntilDeadline = function () {\n if (scheduledHostCallback !== null) {\n var currentTime = exports.unstable_now(); // Yield after `yieldInterval` ms, regardless of where we are in the vsync\n // cycle. This means there's always time remaining at the beginning of\n // the message event.\n\n deadline = currentTime + yieldInterval;\n var hasTimeRemaining = true;\n\n try {\n var hasMoreWork = scheduledHostCallback(hasTimeRemaining, currentTime);\n\n if (!hasMoreWork) {\n isMessageLoopRunning = false;\n scheduledHostCallback = null;\n } else {\n // If there's more work, schedule the next message event at the end\n // of the preceding one.\n port.postMessage(null);\n }\n } catch (error) {\n // If a scheduler task throws, exit the current browser task so the\n // error can be observed.\n port.postMessage(null);\n throw error;\n }\n } else {\n isMessageLoopRunning = false;\n } // Yielding to the browser will give it a chance to paint, so we can\n };\n\n var channel = new MessageChannel();\n var port = channel.port2;\n channel.port1.onmessage = performWorkUntilDeadline;\n\n requestHostCallback = function (callback) {\n scheduledHostCallback = callback;\n\n if (!isMessageLoopRunning) {\n isMessageLoopRunning = true;\n port.postMessage(null);\n }\n };\n\n requestHostTimeout = function (callback, ms) {\n taskTimeoutID = _setTimeout(function () {\n callback(exports.unstable_now());\n }, ms);\n };\n\n cancelHostTimeout = function () {\n _clearTimeout(taskTimeoutID);\n\n taskTimeoutID = -1;\n };\n}\n\nfunction push(heap, node) {\n var index = heap.length;\n heap.push(node);\n siftUp(heap, node, index);\n}\nfunction peek(heap) {\n var first = heap[0];\n return first === undefined ? null : first;\n}\nfunction pop(heap) {\n var first = heap[0];\n\n if (first !== undefined) {\n var last = heap.pop();\n\n if (last !== first) {\n heap[0] = last;\n siftDown(heap, last, 0);\n }\n\n return first;\n } else {\n return null;\n }\n}\n\nfunction siftUp(heap, node, i) {\n var index = i;\n\n while (true) {\n var parentIndex = index - 1 >>> 1;\n var parent = heap[parentIndex];\n\n if (parent !== undefined && compare(parent, node) > 0) {\n // The parent is larger. Swap positions.\n heap[parentIndex] = node;\n heap[index] = parent;\n index = parentIndex;\n } else {\n // The parent is smaller. Exit.\n return;\n }\n }\n}\n\nfunction siftDown(heap, node, i) {\n var index = i;\n var length = heap.length;\n\n while (index < length) {\n var leftIndex = (index + 1) * 2 - 1;\n var left = heap[leftIndex];\n var rightIndex = leftIndex + 1;\n var right = heap[rightIndex]; // If the left or right node is smaller, swap with the smaller of those.\n\n if (left !== undefined && compare(left, node) < 0) {\n if (right !== undefined && compare(right, left) < 0) {\n heap[index] = right;\n heap[rightIndex] = node;\n index = rightIndex;\n } else {\n heap[index] = left;\n heap[leftIndex] = node;\n index = leftIndex;\n }\n } else if (right !== undefined && compare(right, node) < 0) {\n heap[index] = right;\n heap[rightIndex] = node;\n index = rightIndex;\n } else {\n // Neither child is smaller. Exit.\n return;\n }\n }\n}\n\nfunction compare(a, b) {\n // Compare sort index first, then task id.\n var diff = a.sortIndex - b.sortIndex;\n return diff !== 0 ? diff : a.id - b.id;\n}\n\n// TODO: Use symbols?\nvar ImmediatePriority = 1;\nvar UserBlockingPriority = 2;\nvar NormalPriority = 3;\nvar LowPriority = 4;\nvar IdlePriority = 5;\n\nfunction markTaskErrored(task, ms) {\n}\n\n/* eslint-disable no-var */\n// Math.pow(2, 30) - 1\n// 0b111111111111111111111111111111\n\nvar maxSigned31BitInt = 1073741823; // Times out immediately\n\nvar IMMEDIATE_PRIORITY_TIMEOUT = -1; // Eventually times out\n\nvar USER_BLOCKING_PRIORITY_TIMEOUT = 250;\nvar NORMAL_PRIORITY_TIMEOUT = 5000;\nvar LOW_PRIORITY_TIMEOUT = 10000; // Never times out\n\nvar IDLE_PRIORITY_TIMEOUT = maxSigned31BitInt; // Tasks are stored on a min heap\n\nvar taskQueue = [];\nvar timerQueue = []; // Incrementing id counter. Used to maintain insertion order.\n\nvar taskIdCounter = 1; // Pausing the scheduler is useful for debugging.\nvar currentTask = null;\nvar currentPriorityLevel = NormalPriority; // This is set while performing work, to prevent re-entrancy.\n\nvar isPerformingWork = false;\nvar isHostCallbackScheduled = false;\nvar isHostTimeoutScheduled = false;\n\nfunction advanceTimers(currentTime) {\n // Check for tasks that are no longer delayed and add them to the queue.\n var timer = peek(timerQueue);\n\n while (timer !== null) {\n if (timer.callback === null) {\n // Timer was cancelled.\n pop(timerQueue);\n } else if (timer.startTime <= currentTime) {\n // Timer fired. Transfer to the task queue.\n pop(timerQueue);\n timer.sortIndex = timer.expirationTime;\n push(taskQueue, timer);\n } else {\n // Remaining timers are pending.\n return;\n }\n\n timer = peek(timerQueue);\n }\n}\n\nfunction handleTimeout(currentTime) {\n isHostTimeoutScheduled = false;\n advanceTimers(currentTime);\n\n if (!isHostCallbackScheduled) {\n if (peek(taskQueue) !== null) {\n isHostCallbackScheduled = true;\n requestHostCallback(flushWork);\n } else {\n var firstTimer = peek(timerQueue);\n\n if (firstTimer !== null) {\n requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime);\n }\n }\n }\n}\n\nfunction flushWork(hasTimeRemaining, initialTime) {\n\n\n isHostCallbackScheduled = false;\n\n if (isHostTimeoutScheduled) {\n // We scheduled a timeout but it's no longer needed. Cancel it.\n isHostTimeoutScheduled = false;\n cancelHostTimeout();\n }\n\n isPerformingWork = true;\n var previousPriorityLevel = currentPriorityLevel;\n\n try {\n if (enableProfiling) {\n try {\n return workLoop(hasTimeRemaining, initialTime);\n } catch (error) {\n if (currentTask !== null) {\n var currentTime = exports.unstable_now();\n markTaskErrored(currentTask, currentTime);\n currentTask.isQueued = false;\n }\n\n throw error;\n }\n } else {\n // No catch in prod code path.\n return workLoop(hasTimeRemaining, initialTime);\n }\n } finally {\n currentTask = null;\n currentPriorityLevel = previousPriorityLevel;\n isPerformingWork = false;\n }\n}\n\nfunction workLoop(hasTimeRemaining, initialTime) {\n var currentTime = initialTime;\n advanceTimers(currentTime);\n currentTask = peek(taskQueue);\n\n while (currentTask !== null && !(enableSchedulerDebugging )) {\n if (currentTask.expirationTime > currentTime && (!hasTimeRemaining || exports.unstable_shouldYield())) {\n // This currentTask hasn't expired, and we've reached the deadline.\n break;\n }\n\n var callback = currentTask.callback;\n\n if (typeof callback === 'function') {\n currentTask.callback = null;\n currentPriorityLevel = currentTask.priorityLevel;\n var didUserCallbackTimeout = currentTask.expirationTime <= currentTime;\n\n var continuationCallback = callback(didUserCallbackTimeout);\n currentTime = exports.unstable_now();\n\n if (typeof continuationCallback === 'function') {\n currentTask.callback = continuationCallback;\n } else {\n\n if (currentTask === peek(taskQueue)) {\n pop(taskQueue);\n }\n }\n\n advanceTimers(currentTime);\n } else {\n pop(taskQueue);\n }\n\n currentTask = peek(taskQueue);\n } // Return whether there's additional work\n\n\n if (currentTask !== null) {\n return true;\n } else {\n var firstTimer = peek(timerQueue);\n\n if (firstTimer !== null) {\n requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime);\n }\n\n return false;\n }\n}\n\nfunction unstable_runWithPriority(priorityLevel, eventHandler) {\n switch (priorityLevel) {\n case ImmediatePriority:\n case UserBlockingPriority:\n case NormalPriority:\n case LowPriority:\n case IdlePriority:\n break;\n\n default:\n priorityLevel = NormalPriority;\n }\n\n var previousPriorityLevel = currentPriorityLevel;\n currentPriorityLevel = priorityLevel;\n\n try {\n return eventHandler();\n } finally {\n currentPriorityLevel = previousPriorityLevel;\n }\n}\n\nfunction unstable_next(eventHandler) {\n var priorityLevel;\n\n switch (currentPriorityLevel) {\n case ImmediatePriority:\n case UserBlockingPriority:\n case NormalPriority:\n // Shift down to normal priority\n priorityLevel = NormalPriority;\n break;\n\n default:\n // Anything lower than normal priority should remain at the current level.\n priorityLevel = currentPriorityLevel;\n break;\n }\n\n var previousPriorityLevel = currentPriorityLevel;\n currentPriorityLevel = priorityLevel;\n\n try {\n return eventHandler();\n } finally {\n currentPriorityLevel = previousPriorityLevel;\n }\n}\n\nfunction unstable_wrapCallback(callback) {\n var parentPriorityLevel = currentPriorityLevel;\n return function () {\n // This is a fork of runWithPriority, inlined for performance.\n var previousPriorityLevel = currentPriorityLevel;\n currentPriorityLevel = parentPriorityLevel;\n\n try {\n return callback.apply(this, arguments);\n } finally {\n currentPriorityLevel = previousPriorityLevel;\n }\n };\n}\n\nfunction unstable_scheduleCallback(priorityLevel, callback, options) {\n var currentTime = exports.unstable_now();\n var startTime;\n\n if (typeof options === 'object' && options !== null) {\n var delay = options.delay;\n\n if (typeof delay === 'number' && delay > 0) {\n startTime = currentTime + delay;\n } else {\n startTime = currentTime;\n }\n } else {\n startTime = currentTime;\n }\n\n var timeout;\n\n switch (priorityLevel) {\n case ImmediatePriority:\n timeout = IMMEDIATE_PRIORITY_TIMEOUT;\n break;\n\n case UserBlockingPriority:\n timeout = USER_BLOCKING_PRIORITY_TIMEOUT;\n break;\n\n case IdlePriority:\n timeout = IDLE_PRIORITY_TIMEOUT;\n break;\n\n case LowPriority:\n timeout = LOW_PRIORITY_TIMEOUT;\n break;\n\n case NormalPriority:\n default:\n timeout = NORMAL_PRIORITY_TIMEOUT;\n break;\n }\n\n var expirationTime = startTime + timeout;\n var newTask = {\n id: taskIdCounter++,\n callback: callback,\n priorityLevel: priorityLevel,\n startTime: startTime,\n expirationTime: expirationTime,\n sortIndex: -1\n };\n\n if (startTime > currentTime) {\n // This is a delayed task.\n newTask.sortIndex = startTime;\n push(timerQueue, newTask);\n\n if (peek(taskQueue) === null && newTask === peek(timerQueue)) {\n // All tasks are delayed, and this is the task with the earliest delay.\n if (isHostTimeoutScheduled) {\n // Cancel an existing timeout.\n cancelHostTimeout();\n } else {\n isHostTimeoutScheduled = true;\n } // Schedule a timeout.\n\n\n requestHostTimeout(handleTimeout, startTime - currentTime);\n }\n } else {\n newTask.sortIndex = expirationTime;\n push(taskQueue, newTask);\n // wait until the next time we yield.\n\n\n if (!isHostCallbackScheduled && !isPerformingWork) {\n isHostCallbackScheduled = true;\n requestHostCallback(flushWork);\n }\n }\n\n return newTask;\n}\n\nfunction unstable_pauseExecution() {\n}\n\nfunction unstable_continueExecution() {\n\n if (!isHostCallbackScheduled && !isPerformingWork) {\n isHostCallbackScheduled = true;\n requestHostCallback(flushWork);\n }\n}\n\nfunction unstable_getFirstCallbackNode() {\n return peek(taskQueue);\n}\n\nfunction unstable_cancelCallback(task) {\n // remove from the queue because you can't remove arbitrary nodes from an\n // array based heap, only the first one.)\n\n\n task.callback = null;\n}\n\nfunction unstable_getCurrentPriorityLevel() {\n return currentPriorityLevel;\n}\n\nvar unstable_requestPaint = requestPaint;\nvar unstable_Profiling = null;\n\nexports.unstable_IdlePriority = IdlePriority;\nexports.unstable_ImmediatePriority = ImmediatePriority;\nexports.unstable_LowPriority = LowPriority;\nexports.unstable_NormalPriority = NormalPriority;\nexports.unstable_Profiling = unstable_Profiling;\nexports.unstable_UserBlockingPriority = UserBlockingPriority;\nexports.unstable_cancelCallback = unstable_cancelCallback;\nexports.unstable_continueExecution = unstable_continueExecution;\nexports.unstable_getCurrentPriorityLevel = unstable_getCurrentPriorityLevel;\nexports.unstable_getFirstCallbackNode = unstable_getFirstCallbackNode;\nexports.unstable_next = unstable_next;\nexports.unstable_pauseExecution = unstable_pauseExecution;\nexports.unstable_requestPaint = unstable_requestPaint;\nexports.unstable_runWithPriority = unstable_runWithPriority;\nexports.unstable_scheduleCallback = unstable_scheduleCallback;\nexports.unstable_wrapCallback = unstable_wrapCallback;\n })();\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL3NjaGVkdWxlci9janMvc2NoZWR1bGVyLmRldmVsb3BtZW50LmpzLmpzIiwibWFwcGluZ3MiOiJBQ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xsYmFjayA9IHVuc3RhYmxlX2NhbmNlbENhbGxiYWNrO1xuZXhwb3J0cy51bnN0YWJsZV9jb250aW51ZUV4ZWN1dGlvbiA9IHVuc3RhYmxlX2NvbnRpbnVlRXhlY3V0aW9uO1xuZXhwb3J0cy51bnN0YWJsZV9nZXRDdXJyZW50UHJpb3JpdHlMZXZlbCA9IHVuc3RhYmxlX2dldEN1cnJlbnRQcmlvcml0eUxldmVsO1xuZXhwb3J0cy51bnN0YWJsZV9nZXRGaXJzdENhbGxiYWNrTm9kZSA9IHVuc3RhYmxlX2dldEZpcnN0Q2FsbGJhY2tOb2RlO1xuZXhwb3J0cy51bnN0YWJsZV9uZXh0ID0gdW5zdGFibGVfbmV4dDtcbmV4cG9ydHMudW5zdGFibGVfcGF1c2VFeGVjdXRpb24gPSB1bnN0YWJsZV9wYXVzZUV4ZWN1dGlvbjtcbmV4cG9ydHMudW5zdGFibGVfcmVxdWVzdFBhaW50ID0gdW5zdGFibGVfcmVxdWVzdFBhaW50O1xuZXhwb3J0cy51bnN0YWJsZV9ydW5XaXRoUHJpb3JpdHkgPSB1bnN0YWJsZV9ydW5XaXRoUHJpb3JpdHk7XG5leHBvcnRzLnVuc3RhYmxlX3NjaGVkdWxlQ2FsbGJhY2sgPSB1bnN0YWJsZV9zY2hlZHVsZUNhbGxiYWNrO1xuZXhwb3J0cy51bnN0YWJsZV93cmFwQ2FsbGJhY2sgPSB1bnN0YWJsZV93cmFwQ2FsbGJhY2s7XG4gIH0pKCk7XG59XG4iXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///../node_modules/scheduler/cjs/scheduler.development.js\n"));
/***/ }),
/***/ "../node_modules/scheduler/index.js":
/*!******************************************!*\
!*** ../node_modules/scheduler/index.js ***!
\******************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\n\nif (false) {} else {\n module.exports = __webpack_require__(/*! ./cjs/scheduler.development.js */ \"../node_modules/scheduler/cjs/scheduler.development.js\");\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL3NjaGVkdWxlci9pbmRleC5qcy5qcyIsIm1hcHBpbmdzIjoiQUFBYTs7QUFFYixJQUFJLEtBQXFDLEVBQUUsRUFFMUMsQ0FBQztBQUNGLEVBQUUsb0lBQTBEO0FBQzVEIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vX05fRS8uLi9ub2RlX21vZHVsZXMvc2NoZWR1bGVyL2luZGV4LmpzP2NmMzciXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xuXG5pZiAocHJvY2Vzcy5lbnYuTk9ERV9FTlYgPT09ICdwcm9kdWN0aW9uJykge1xuICBtb2R1bGUuZXhwb3J0cyA9IHJlcXVpcmUoJy4vY2pzL3NjaGVkdWxlci5wcm9kdWN0aW9uLm1pbi5qcycpO1xufSBlbHNlIHtcbiAgbW9kdWxlLmV4cG9ydHMgPSByZXF1aXJlKCcuL2Nqcy9zY2hlZHVsZXIuZGV2ZWxvcG1lbnQuanMnKTtcbn1cbiJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///../node_modules/scheduler/index.js\n"));
/***/ }),
/***/ "../node_modules/scheduler/tracing.js":
/*!********************************************!*\
!*** ../node_modules/scheduler/tracing.js ***!
\********************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
"use strict";
eval(__webpack_require__.ts("\n\nif (false) {} else {\n module.exports = __webpack_require__(/*! ./cjs/scheduler-tracing.development.js */ \"../node_modules/scheduler/cjs/scheduler-tracing.development.js\");\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL3NjaGVkdWxlci90cmFjaW5nLmpzLmpzIiwibWFwcGluZ3MiOiJBQUFhOztBQUViLElBQUksS0FBcUMsRUFBRSxFQUUxQyxDQUFDO0FBQ0YsRUFBRSxvSkFBa0U7QUFDcEUiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9fTl9FLy4uL25vZGVfbW9kdWxlcy9zY2hlZHVsZXIvdHJhY2luZy5qcz8yMjU2Il0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0JztcblxuaWYgKHByb2Nlc3MuZW52Lk5PREVfRU5WID09PSAncHJvZHVjdGlvbicpIHtcbiAgbW9kdWxlLmV4cG9ydHMgPSByZXF1aXJlKCcuL2Nqcy9zY2hlZHVsZXItdHJhY2luZy5wcm9kdWN0aW9uLm1pbi5qcycpO1xufSBlbHNlIHtcbiAgbW9kdWxlLmV4cG9ydHMgPSByZXF1aXJlKCcuL2Nqcy9zY2hlZHVsZXItdHJhY2luZy5kZXZlbG9wbWVudC5qcycpO1xufVxuIl0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///../node_modules/scheduler/tracing.js\n"));
/***/ }),
/***/ "?36cb":
/*!******************************************!*\
!*** ./utils/resolve-rewrites (ignored) ***!
\******************************************/
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
/* (ignored) */
/***/ })
},
/******/ function(__webpack_require__) { // webpackRuntimeModules
/******/ var __webpack_exec__ = function(moduleId) { return __webpack_require__(__webpack_require__.s = moduleId); }
/******/ var __webpack_exports__ = (__webpack_exec__("../node_modules/next/dist/client/next-dev.js"));
/******/ _N_E = __webpack_exports__;
/******/ }
]);